From 84d92731d07b64e1ee12dd7074bf746620bed809 Mon Sep 17 00:00:00 2001 From: Jeff Xiao Date: Mon, 3 Jun 2019 11:42:31 +0900 Subject: [PATCH] Merge updated master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Squashed commit of the following: commit 1a55d84224609c935a5a98d2e824c6773353162f Author: Maarten Dekkers Date: Sat May 25 03:33:37 2019 +0200 Add support for LSJ Ares (#5588) * Add support for LSJ Ares Thanks to the other ports which have made this port possible. * Update Ares code per request * More changes to Ares * Update Ares rules.mk Co-Authored-By: Maartenwut * Remove escaping backslashes from Ares default keymap commit 1da8ad86689ae8fe8c5852201c5914e745f0f38e Author: Doug Raffle Date: Fri May 24 18:06:37 2019 -0400 Added media keys to 1up60rgb:raffle (#5973) commit 4f1537b879366664c94faaef22190c2828115a26 Author: Mark Date: Sat May 25 00:18:57 2019 +0300 [Keyboard] Fix formatting on keyboard to micro connection table (#5968) * Fix formatting on keyboard to micro connection table * Add whitespace to make more readable commit a1e2d51712385a12bba7d592e391200742be5ad7 Author: AbstractKB <49011872+AbstractKB@users.noreply.github.com> Date: Fri May 24 17:10:40 2019 -0400 [Keyboard] Added Abstract Ellipse Rev1 (#5939) * mostly done with first version of Ellipse Rev1 software * mostly done, error with backlight breathing * more testing and changing default keymaps * ready for first release attempt * fix newline in readme * fix copyright and extraneous declarations and symbols * remove more excess backslashes * fixed more formatting commit 362bfc5b15eeacd946f814efb726f4e7fd9a1328 Author: Danny Date: Fri May 24 15:14:14 2019 -0400 Fix cypher iso (#5971) * Reformat JSON to look less like AIDS * Fix location of ISO Enter commit 83afae31ed64ba577a4bd0336131598196d3e8c7 Author: Drashna Jaelre Date: Thu May 23 17:42:06 2019 -0700 Fix up Debouncing in AVR Templates (#5964) commit a37e44b2d7fdb41f01e53e382000f987563d8979 Author: tuesdayjohn Date: Thu May 23 20:41:25 2019 -0400 Added keymap folder matching username; added readme to previous keymap (#5961) * Added keymap folder matching username; added readme into previous keymap * Update keymap.c commit f7caca51f60d8b02a7cdcc16acfaa3d794f70bed Author: Erovia Date: Fri May 24 02:26:15 2019 +0200 Add support for Dimple (#5963) Add support for Dimple, a 40% custom keyboard designed and produced by LazyDesigners. commit 701a1d94358a72d477326fb475c918823492b22d Author: Tobias V. Langhoff Date: Fri May 24 02:12:17 2019 +0200 Fix layout comment (#5967) Swap the "Cmd" and "Alt" keys in the comment to reflect the actual layout. Also change "Cmd" to "Win" for consistency with the default keymap. commit 03e53dc8a2958c44b03b3863c27ce29b94f81f08 Author: Jarrett Drouillard Date: Thu May 23 00:40:16 2019 -0400 [Keymap] changes to my userspace and preonic keymap ( spring 2019 ) (#5881) * feat-user-kuatsure: abstract symbol row out * feat-user-kuatsure: abstract grouped bracket, brace, paren out * fix-preonic-kuatsure: remove eol as requested by @drashna * feat-user-kuatsure: add KC_MAKE and KC_FLSH thanks to @drashna for the help * chore-preonic-kuatsure: remove auto shift * chore-user-kuatsure: move leader seq's to macro syntax * feat-user-kuatsure: add `KC_VRSN` key plus use it preonic keymap * chore-user-kuatsure: namespace keyboard macros `KB` * chore-preonic-kuatsure: move some keyboardy keys around * chore-preonic-kuatsure: remove parens, brackets, braces from lower * chore-user-kuatsure: move tmux window shifts to dbl press leaders * feat-user-kuatsure: add a computer lock leader seq * fix-preonic-kuatsure: go back to lower brackets * chore-preonic-kuatsure: clear out raise * feat-various-kuatsure: add meh + tab mod tap * chore-preonic-kuatsure: `raise` eats `game_mod` layer * fix-preonic-kuatsure: reverse pg up and pg down * chore-user-kuatsure: add double tap to turn off music * chore-user-kuatsure: move like seqs together * chore-preonic-kuatsure: add a few more items to the num pad on raise * feat-user-kuatsure: re-enable td for <> keys * chore-user-kuatsure: give a little more grace period for leader * fix-user-kuatsure: give lock leader a gui buffer no timer or anything, but alfred doesn't boot up as quickly as I would like sometimes gui doesn't do anything but gives a little bit of a time bump * fix-user-kuatsure: changes from @drashna review commit 73715bacc26e47e574a5fbefb4d477cb4b7de9e7 Author: tuesdayjohn Date: Thu May 23 00:13:55 2019 -0400 [Keymap] Added personal keymap in Kinesis matching username; updated old readme.md (#5955) * Added 'tuesdayjohn' folder; updated old readme.md * Update keymap.c * Update readme.md * Update keymap.c commit fcb56534111652b9fa19d9d8e7bce635c7a63eb6 Author: Jonathan Rascher Date: Wed May 22 23:08:48 2019 -0500 [Keymap] Switch Quefrency keymap from I2C back to serial; factor common configs into userspace (#5951) * Switch Quefrency from flaky I2C back to serial * Lower mouse wheel speed on Quefrency slightly * Migrate common settings to userspace * Enable Bootmagic Lite for consistent reset to bootloader. * Turn off some undesired features across all keyboards. * Remove EEPROM reset keybinding from all keyboards since Bootmagic Lite also does an EEPROM reset. * Set backlight and underglow increments consistently across all keyboards since lots of them like to override the deafults. * Set mouse keys consistently across all keyboards. * Update function layer keymap images commit d31c54c8aff2645ca7762ad423735d409561ba39 Author: Ben Date: Thu May 23 06:06:55 2019 +0200 [Keyboard] Add info.json to O4L5x12 (#5950) * [Keyboard] Add info.json to O4L5x12 * Apply suggestions from code review Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Better formatting * Add key_count to all layouts commit 894010786c4a78b939df7114d1c3e70957a8a300 Author: ymzcdg <49898694+ymzcdg@users.noreply.github.com> Date: Thu May 23 05:33:10 2019 +0800 translate docs into Mandarin Chinese (#5890) * translate docs into Mandarin Chinese translate faq_debug.md into Chinese * translate faq_build.md into Chinese translate faq_build.md into Chinese * faq_keymap.md to zh-cn faq_keymap.md to zh-cn commit eb756916c2b1d3b03b1aa26b8bb02e91ce849089 Author: Drashna Jaelre Date: Tue May 21 13:40:50 2019 -0700 [Keyboard] Fix 9key macropad keymap (#5942) Fails to compile on the configurator because tapdance is enabled for the entire keyboard commit fc3965ef70ead4d01209c344f9a5f8e1dcf8a1dd Author: Jesper Nellemann Jakobsen Date: Tue May 21 20:03:57 2019 +0200 [Keymap] Update Mouse key settings (#5946) Set shorter `MOUSEKEY_INTERVAL` and `MOUSEKEY_TIME_TO_MAX`. Move mouse scroll buttons around and update comment to reflect change. commit fdd8c5c50c4f433da6791a4d410f2ee772ee20c3 Author: dsanchezseco Date: Tue May 21 20:01:29 2019 +0200 [Keymap] dsanchezseco for planck (#5944) * added user keymap * updated keymap * updated keymap * swapped positions of alt and altGr commit 419f2c3f4048037901e95504ef38104c77bd715e Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue May 21 11:00:32 2019 -0700 [Keyboard] QMK Configurator support for Diverge TM 2(#5943) commit a0d5f0722f8d045903670babbdc76ad1c5842b7c Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue May 21 13:59:08 2019 -0400 [Keymap] Romac added and tweaks to existing keymaps (#5941) * Initial keymap for Romac * Formatting changes * keymap tweaks * Add new cycle layer key * add cycle layer code * initial upload * keymap updates * keymap updates * keymap updates for new layer names * new enum layers * case added for 4th layer * removed extra space for formatting commit 68501261c3a8dbf04a2f1de7ad23640e8074ab87 Author: Michael Pio Date: Wed May 22 01:49:33 2019 +0800 [Keyboard] Add Ixora keypad (#5931) * added ixora files * upload ixora * update readme * Update keyboards/peiorisboards/ixora/ixora.h Co-Authored-By: fauxpark * Update keyboards/peiorisboards/ixora/ixora.h Co-Authored-By: fauxpark * Update keyboards/peiorisboards/ixora/ixora.h Co-Authored-By: fauxpark * Update keyboards/peiorisboards/ixora/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/peiorisboards/ixora/keymaps/default/keymap.c Co-Authored-By: fauxpark * Update keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c Co-Authored-By: fauxpark * Update keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c Co-Authored-By: fauxpark * update files according to suggestions * removed unused code commit 0aece4ddab37e603699cb4ba9e8b72fdaf5a619c Author: Anthony Leung Date: Tue May 21 09:03:38 2019 -0400 add dz60rgb-ansi layout to configurator (#5938) * add dz60rgb-ansi layout to configurator * fix mekanist's dz60rgb keymap commit d93c53fc62a15ccb38b94aca9dc09284103564e6 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon May 20 15:52:06 2019 -0700 [Keyboard] fix hhkb bottom layer (#5926) commit 5904933a3f2266f97cf43a9ed752ceaf9dee1d0c Author: Jesper Nellemann Jakobsen Date: Tue May 21 00:46:24 2019 +0200 [Keymap] bingocaller's DZ60 MacOS keymap (#5914) * Added customisations and README * Tweak keymap: word traversal/deletion * Add w and b word traversal/deletion keycodes. * Add fine volume control key codes, but don't use them, because they conflict with other key codes. `A` somehow got remapped to fine volume up. * Set mousekey delay to zero * Use SAFE_RANGE for key codes. * Update keymap and README Add new mouse-specific layer 3, activated by pressing and holding space. Add brightness controls to layer 4 (previously, layer 3). Update README: * New keyboard-layout mockup image. * Add actual link to kbdfans.cn. * Update layer descriptions. * Fix indentation in keymap.c * Use _______ over KC_TRNS to increase readability * Custom keys: use #define over process_record_user * Use enum for naming layers * Rename README.md -> readme.md commit 57f5cd3ca7903a8736f79d3d08a7dc6dc75793b3 Author: Kenneth Aloysius Date: Tue May 21 05:43:29 2019 +0700 [Keyboard] YD60MQ support (#5911) * Keep ASCII art consistent with keymap * Possible fix for xyverz ortho keymap: define RGBLED_NUM * Update DZ60 keymap; TODO store old keymap under different directory? * Change RGUI to RALT because 7u spacebar is too long * Save old bottom row keymap * Update Iris keymap: replace backslash with grv * Add ortho_4x12 layout * Added Delete key to Iris keymap * Move delete key * Oh look a new keyboard * ortho4x12: get an adjust layer back * Remove jj40 keymap, add custom power draw #define * Set WhiteFox to advertise only 100mA of power draw * Update WhiteFox keymap * Update WF keymap (2) * Remove lets_split keymap, update community krusli keymap * Add #define for BACKLIGHT_LEVELS (unused) * Update Whitefox keymap * Add YD60 from auto-generated kbfirmware files * Bring files up to speed with new standards * Fix: KEYMAP -> LAYOUT * Fix keymap differences (DZ60 -> YD60) * Update keymap * Update README * Fix RShift position * Specify that the port is for the YD60MQ variant * Update keyboards/iris/keymaps/krusli/keymap.c Co-Authored-By: fauxpark * Fix Iris and Let's Split keymaps * Remove unused keymap file * Use #include QMK_KEYBOARD_H * Add atmel-dfu selection to yd60 * Rename dir to YD60MQ, update definitions * Use new convenience macros/functions for led_set_user * Use #pragma once * Change all ?= to = in rules.mk * Use pragma once for yd60mq.h * Take out DZ60 and Iris changes * Remove now-removed Iris folder * Revert adding ortho_4x12 * Revert on xyverz ortho_4x12 keymap * Undo deleting JJ40 keymap files * Don't revert beyond upstream jj40 state * Extra files from earlier commit is to be deleted * Remove WhiteFox keymap not in upstream yet * Re-add my Let's Split keymap * Revert keymap changes * Cleanup: indentation * Update keyboards/yd60mq/rules.mk Co-Authored-By: fauxpark * Update keyboards/yd60mq/rules.mk Co-Authored-By: fauxpark * Cleanup & move kb backlighting code to yd60mq.c * Update README, rename to lowercase * Update README: rename to lowercase * Update README with links and picture of PCB * Remove PREVENT_STUCK_MODIFIERS Co-Authored-By: Drashna Jaelre commit 843c67d805b72e9bbfaa14f0ef93f1506c1fcc98 Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon May 20 15:19:31 2019 -0700 Plain60: Configurator layout extension (#5929) * Add LAYOUT_60_ansi * Add LAYOUT_60_iso * Add LAYOUT_60_ansi_split_bs_rshift * Add LAYOUT_60_iso_split_bs_rshift * Enable Community Layout support Added: - 60_ansi - 60_ansi_split_bs_rshift - 60_iso * Add LAYOUT_60_hhkb and enable its community layout support commit 566b8c57b1ded327ee462c552563026b0f6fa20e Author: Danny Date: Mon May 20 13:16:40 2019 -0400 [Keyboard] Fix pinout of Levinson Rev 1 scrap sale boards to use non-jumpered pinout (#5935) commit cd826e39d27353aa0ba1e5cd53dd957902703e25 Author: jotix <47826561+jotix@users.noreply.github.com> Date: Mon May 20 12:22:20 2019 -0300 vim style cursor keys (#5932) commit 228e7145c0a8c7415f89b2e6333529381fa3fd77 Author: Jonathan Rascher Date: Sun May 19 19:14:28 2019 -0500 Remove spurious backslashes from my keymaps (#5927) Suggested in #5924. commit 1435a2ca61f0c00d9784ea2f43fd455c96a295c7 Author: Jonathan Rascher Date: Sun May 19 18:11:18 2019 -0500 Update my Quefrency/KBD67 keymaps, adding BDN9 macropad keymap as well (#5924) * Set Quefrency bootloader correctly for Elite-C * Update Quefrency layout to be more like HHKB * Update KBD67 layout to be more like HHKB * Add keymap for BDN9 macropad commit c9a7161d934979770792ff1e91ccfcc3508d240b Author: Ryan Caltabiano Date: Sun May 19 08:34:25 2019 -0500 Reduce rgb matrix firmware size commit e7af23788fbcff8e5bea896b458fb8da1639e66d Author: crilith Date: Sun May 19 14:12:34 2019 -0500 [Keymap] Update keymap.c (#5923) Corrected formatting and added shortcuts. Removed invalid #define commit e8372692c58c3e731a7ccef58ddeaa45e2e71e9f Author: Andrew Kannan Date: Sun May 19 13:03:06 2019 -0400 [Keyboard] Instant60 VIA Support (#5909) * VIA Support for Instant60 * Backlighting updates * Update default keymap * Add Standard layout default VIA supported layout * Clean up some backslashes * Add info.json * Update info json metadata * add info.json for practice65 * Update keyboards/cannonkeys/instant60/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/practice65/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/cannonkeys/instant60/keymaps/via/keymap.c Co-Authored-By: fauxpark * Update keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c Co-Authored-By: fauxpark * Remove unused enum commit b479eff94013c32b6f3f926a23b7e4a6cf7a3a6e Author: marksard <38324387+marksard@users.noreply.github.com> Date: Mon May 20 02:02:13 2019 +0900 [Keymap] Add keymap csprt (#5918) * Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization * Add center sprit keymap for nomu30 commit 6b8be985551efc5a5f95dfea6dc1554352bc46e0 Merge: 2a8fd5823 89e9785d7 Author: Drashna Jaelre Date: Sun May 19 10:01:16 2019 -0700 [Keymap] Drashna Corne Keyboard updates (#5903) * Re-enable Audio And there was much rejoicingmake keebio/iris/rev2:drashna AUDIO_ENABLE=yes! * Re-add debounce to ergodox EZ * Fix rgb matrix helper function * Make sure that RGM Matrix is checked properly * Fix merge commit? * Disable more RGB matrix modes * Increase Debounce for Ergodox EZ The performance improvements have made it necessary, actually * Consolidate RGB Matrix layer indication function And changes to iris * Fix lighting issue for gamepad * Update Corne Keyboard configuration * Update Corne Keyboard layout * Update KC_MAKE macro to better handle crkbd split * Tweaks to Corne Keyboard Layout * Enable RGB Matrix Sleep * Update my code to use layer_state_t typedef commit 2a8fd5823244eb1c7e8906b4118f01d2078c4e28 Author: marksard <38324387+marksard@users.noreply.github.com> Date: Mon May 20 02:00:53 2019 +0900 [Keymap] Add keymap nomu30 likejijs (#5917) * Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization * Add like_jis keymap for nomu30 commit 2ce3c5548ae7329a80d4db73a5ce3e7f092332f3 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun May 19 09:51:56 2019 -0700 [Keyboard] E6V2 BMC OE (#5908) * rename bmc due to confusion as the bmc from r2 is different * update readme * Update keyboards/exclusive/e6v2/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> commit d67eb20aed97410e11a17f7f5799d822f98a7558 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun May 19 09:50:57 2019 -0700 [Keyboard] Pearl Refactors (#5907) * use pragma once * remove custom matrix * remove custom i2c code in favor of QMK's i2c_master * rename to all lower case readme * update readme * turn off bootmagic as it doesn't work anyway * Update keyboards/pearl/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> commit 11c7cd47aee697ac73bf7ec5704086e2a15d7dca Author: jotix <47826561+jotix@users.noreply.github.com> Date: Sun May 19 13:49:23 2019 -0300 [Keymap] jotix ortho_4x12_layout tweakings (#5904) * jotix ortho_4x12_layout tweakings * jotix ortho_4x12_layout tweakings commit e0ecc53f4e0852796e16b170851fa396ab9ae854 Author: fauxpark Date: Mon May 20 02:46:41 2019 +1000 Make DEBUG keycode disable as well as enable (#5898) * Make DEBUG keycode disable as well as enable * print() can always be used regardless of debug_enable state commit 26203401a1748daf664eb3e811aaf9cf0b3a7b5e Author: marksard <38324387+marksard@users.noreply.github.com> Date: Mon May 20 01:43:58 2019 +0900 [Keyboard] Add keyboard treadstone32 (#5888) * Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization * Added Treadstone32 keyboard. * Fixed some code * Fixed some codes * Fixed config.h * modified review point * Fixed redundant include commit 5e7b929717bd6b461816f6800310b2ea90673900 Author: coseyfannitutti <43188488+coseyfannitutti@users.noreply.github.com> Date: Sun May 19 12:43:10 2019 -0400 [Keyboard] Add mullet and mulletpad keyboards (#5878) * Added mullet and mulletpad keyboards * Added mullet and mulletpad keyboards * Update keyboards/coseyfannitutti/mullet/mullet.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mullet/mullet.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mullet/mullet.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/mulletpad.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/mulletpad.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/mulletpad.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mullet/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/mullet.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * removed unnecessary slashes from keymaps * Update keyboards/coseyfannitutti/mullet/mullet.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mullet/rules.mk Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update config.h * Update keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/mulletpad.c Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/mulletpad.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * update config.h * Update keyboards/coseyfannitutti/mullet/rules.mk Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/rules.mk Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/mulletpad.h Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/rules.mk Co-Authored-By: fauxpark * Update keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c Co-Authored-By: fauxpark * update info.json * Update readme.md update readme.me * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/coseyfannitutti/mulletpad/info.json Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> commit 56930a0174b685676b8b34cb9f6436db8f8569ae Author: XScorpion2 Date: Sun May 19 11:39:30 2019 -0500 [Keyboard] Update LED positions to be more physically accurate for Sol rev1 (#5921) commit 5c7b37bbbde969eb056d531c897c1d5f80beeb58 Author: Ryan Caltabiano Date: Wed May 15 22:23:42 2019 -0500 Added custom center point to rgb matrix commit 270b39b2eb44247cff75ddd216a8e67f8f264991 Author: XScorpion2 Date: Sun May 19 11:19:46 2019 -0500 Spirals, Pinwheels, and Documentation....Oh My! RGB Matrix Effects (#5877) * Spirals, Pinwheels, and Documentation....Oh My! * Spiral effect band thickness adjustments * Fixing animation spin directions commit a0d6c5a1136e2c56aa4a57eac08355c2b5d79ad5 Author: XScorpion2 Date: Sun May 19 11:15:50 2019 -0500 [Keymap] Update Xulkal user code (#5920) commit f11fde9bf5898a09201042d612caaff8d4692bb9 Author: XScorpion2 Date: Sun May 19 11:11:08 2019 -0500 Fixing hsv_to_rgb where s = 0 and v < 255 (#5915) * Fixing hsv to rgb where s is 0 and v is < 255 * Update color.c commit 0099bbf9a64a0b4df1093f528481bff39af2c80d Author: XScorpion2 Date: Sun May 19 11:09:06 2019 -0500 Single Color Band scrolling left to right effects (#5867) commit ba26736d7e0679e87e34add2445cdae541e2a0b8 Author: Ryan Caltabiano Date: Sat May 18 15:12:35 2019 -0500 Fix bit count calculation for iterating layers commit 89e9785d7a87e8dbb941dd272c032f34658169fd Author: Drashna Jaelre Date: Fri May 17 15:21:45 2019 -0700 Update my code to use layer_state_t typedef commit 356521864e9f49d50131f4779ff9e56dc8b12e8f Author: Drashna Jaelre Date: Tue May 14 23:26:41 2019 -0700 Enable RGB Matrix Sleep commit ebfc39cc5083dd7c597f274883621b932ce6c33f Author: Drashna Jaelre Date: Tue May 14 09:11:57 2019 -0700 Tweaks to Corne Keyboard Layout commit bcfc24fd13661612b4af3836b174fe02960a13e7 Author: Drashna Jaelre Date: Mon May 13 21:03:17 2019 -0700 Update KC_MAKE macro to better handle crkbd split commit 05e2baaa49ffaef14f704e5b25763fc1ec967b21 Author: Drashna Jaelre Date: Mon May 13 20:58:46 2019 -0700 Update Corne Keyboard layout commit ed08787aaac2f4f96f11f7c074af9c825b6e4917 Author: Drashna Jaelre Date: Mon May 13 20:55:19 2019 -0700 Update Corne Keyboard configuration commit 2a6cb0487656b2f954ff6f01f41628138fed9a58 Author: Drashna Jaelre Date: Mon May 13 19:40:19 2019 -0700 Fix lighting issue for gamepad commit 6689f900fc0ed9022706af7605d40225a3348f63 Author: Drashna Jaelre Date: Mon May 13 14:48:53 2019 -0700 Consolidate RGB Matrix layer indication function And changes to iris commit f520316124fb789af0981fd6e5381f090c300acb Author: Drashna Jaelre Date: Sun May 12 10:33:10 2019 -0700 Increase Debounce for Ergodox EZ The performance improvements have made it necessary, actually commit 667b927004641d6352378af5eb19785572dbc341 Author: Drashna Jaelre Date: Sat May 11 12:25:59 2019 -0700 Disable more RGB matrix modes commit db7c3b9220eb97e3c453e86c461760eda3652700 Author: Drashna Jaelre Date: Fri May 10 01:36:07 2019 -0700 Fix merge commit? commit 6af0c1e1293cbc50b7d5136c2c8260cec1d1a21b Author: Drashna Jaelre Date: Thu May 9 23:50:30 2019 -0700 Make sure that RGM Matrix is checked properly commit 42a6bd2fd4f797a5ef629621cd50ca4ac2a7f835 Author: Drashna Jaelre Date: Tue May 7 21:08:41 2019 -0700 Fix rgb matrix helper function commit ed6d5d5b7be2e41d184b484c70562651ed1f2f45 Author: Drashna Jaelre Date: Tue May 7 14:16:00 2019 -0700 Re-add debounce to ergodox EZ commit f06910f5bf4de66b800342a47f24800e2f229b07 Author: Drashna Jaelre Date: Tue May 7 00:22:55 2019 -0700 Re-enable Audio And there was much rejoicingmake keebio/iris/rev2:drashna AUDIO_ENABLE=yes! commit d85110b6ec5fcdf3ef88b41909ce739b017abbea Author: Josh Date: Fri May 17 16:48:53 2019 -0400 Adds a configurable initial delay to the audio clicky feature (#4286) * Adding an AUDIO_CLICKY_DELAY_DURATION configurable value to the AUDIO_CLICKY feature. * Tweaking my community keymap to work better with my rev 4 planck. commit 00d1d7828c63538122d9d3db7336b9a40c9ffe80 Author: Alex Ong Date: Sat May 18 06:47:50 2019 +1000 Typedef'ed layer_state_t to uint32_t (#3637) * Typedef'ed layer_state_t to uint32_t. This enables future work with layer_state_t to uint8_t for optimization purposes. * Removed accidental xeal60 commit * Revert to egyptian brackets, added sizeof(layer_state_t) so when layer_state_t is redefined it will automagically work. * Add additional typedefs * Add checks for setting layer state * Update tmk_core/common/action_layer.h Co-Authored-By: alex-ong * Revert commit. commit 90a45aac6e8fdbf8d781d711bb6a27574130ff38 Author: Jeremy Bernhardt Date: Fri May 17 14:07:38 2019 -0600 [Keyboard] Butterstick fix (#5900) * Working on chording * Working on chording * Got layouts in order * Initial Georgi support * forgot to add keymaps * Updated readme * Update keyboards/georgi/keymaps/template/readme.md Co-Authored-By: germ * Update keyboards/georgi/georgi.h Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/template/keymap.c Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Disabled features, updated info * Update keyboards/georgi/config.h Co-Authored-By: germ * Update keyboards/georgi/config.h Co-Authored-By: germ * Fixed info.json * Split the number button and fixed gaming mode. * started work on history feature * Working history/multikeyfuckery * type * inital code reduction refactor * Got multikey patched up, optimizing for size * Forgot to remove stuff * fixed key repeat * Key repeat added. * Symshift locking * Midchord Sym shenanigans. * Added only QWERTY mode * Split out header * Added stickybits, minimal layour * Fixing user layout * Whitespace fixing * Fixing Version name * Starting work on BS * Fixing default layout and rules * Updated Butter fw * Copy-paste rebase * more fixing from merge. Fuck * Forgot to roll version * Added revisions as per @mechmerlin * Somehow forgot backspace * Forgot Backspace? commit d0c9ad6433d6ed30e8076fd26c8551f579cb08c8 Author: Jeremy Bernhardt Date: Fri May 17 14:02:22 2019 -0600 [Keyboard] Georgi improvements (#5899) * Georgi improvements * The writing was in the -Wall commit 7a0174f871792c62fdd1b737f2dc9db753695245 Author: Chris Broekema Date: Fri May 17 21:58:28 2019 +0200 [Keyboard] keypad enter should not be remapped in Model M default keymap (#5897) commit b34d2c73fa30d80281d1eab4f354092d25f5a747 Author: kingwangwong <31333140+kingwangwong@users.noreply.github.com> Date: Fri May 17 14:57:10 2019 -0500 [Keymap] Adding my keymap for the minivan/kumo (#5896) * adding my keymap for the KUMO * edited the readme file * edited some more files * edited some more files * edited files from feedback * edited one more files from feedback * edited rules commit 8be32e98d8bd112c24b292d9c25a94f6e2ed71ac Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri May 17 12:54:10 2019 -0700 [Keyboard] New Keyboard: Mars 8.0 TKL (#5894) * fix the things the stupid script broke * create an appropriate LAYOUT macro using LAYOUT_tkl_ansi * create an appropriate keymap stolen from the phantom default keymap * add correct pins used and rgb led numbers * change vendor and device name * add QMK Configurator support * fix up RGB underglow * update readme * introduce new layout macro tkl_iso * add QMK Configurator support for new layout macro * enable backlight and add community layout support commit 49464be64559710318f4d8edc5a92a7a90784734 Author: marksard <38324387+marksard@users.noreply.github.com> Date: Sat May 18 04:40:02 2019 +0900 [Keymap] Add keymap for minivan (#5887) * Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization * Added like_jis keymap for minivan/KUMO keyboard. * Fixed comments * Fixed review commit 9c7818582d9f82b1378cfbfb654dbb8e9348b268 Author: mogira <7379940+mogira@users.noreply.github.com> Date: Sat May 18 04:37:12 2019 +0900 Fix the modifier of font variable in ssd1306.c (#5880) commit 48b01446ba6b74d7e0793f972873a10fceef2f62 Author: Drashna Jaelre Date: Thu May 16 10:28:06 2019 -0700 Make delay for Capslock in Hold-Tap functions configurable (#5497) * Increase delay for Hold-Tap register for CAPSLOCK Because it seems that the 80ms delay wasn't too much * Screw it, make the caps delay a define and make it configurable commit 5a8e387b774f9af6932a61ce17d5e762b141d884 Author: Jan Christoph Ebersbach Date: Thu May 16 18:40:00 2019 +0200 [Keymap] Signum 3.0 Swap positions (#5892) commit 63ddad86a92f11725548cd9775f82e7293aef050 Author: ENDO Katsuhiro Date: Fri May 17 01:39:06 2019 +0900 Add a new keyboard Halberd (#5874) * Add a new keyboard Halberd. * Update default keymap and add new keymap. * Use pragma once. * Comment out IS_COMMAND macro. * Remove unnecessary backslashes. * Remove dead code. * Change layer defines to enum. * Remove DISABLE_JTAG definition. * Change BOOTMAGIC_ENABLE to "lite". * Remove unnecessary line. Co-Authored-By: fauxpark commit 1a28906a3da1f14034b81871b90bcce0ed56c286 Author: Pavlos Vinieratos Date: Thu May 16 18:38:28 2019 +0200 [Keymap] Pvinis/update for iris (#5889) * add default functions * some indenting * add ctl and alt * maybe? commit a8af694d265d5d136e81669ec7b30052a8f4de08 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu May 16 08:52:38 2019 -0700 [Keyboard] Leaf60 hotswap and universal pcb (#5882) * initial commit * copy paste with some fixes the code from fox lab leaf60 repo * add 60_ansi and 60_hhkb and community layout support * add QMK Configurator support * turn bootmagic to lite and turn on rgb and backlights * disable some features so firmware isn't too big * initial commit for hotswap leaf60 * add hotswap support * edits for consistency * add a generic leaf60 readme * turn off console and command to save firmware space * not enabling sleep led enable * not enabling sleep led enable * had one extra key in 60_hhkb * get rid of limit val define * Update keyboards/foxlab/leaf60/hotswap/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/foxlab/leaf60/hotswap/rules.mk Co-Authored-By: fauxpark * Update keyboards/foxlab/leaf60/universal/rules.mk Co-Authored-By: fauxpark commit b541369c45f13369c16de1b887f6ca5b7e589e6d Author: Pavlos Vinieratos Date: Thu May 16 17:21:51 2019 +0200 [Docs] Fix typo in Userspace doc (#5871) * typo * Update docs/feature_userspace.md Co-Authored-By: fauxpark commit fc06975fa3ea31049c8a1dc7a42b78b90db1c89b Author: zvecr Date: Thu May 16 13:54:43 2019 +0100 Add Configurator support for ai03/orbit (#5863) * Add Configurator support for ai03/orbit * Add Configurator support for ai03/orbit - align with documented KLE commit 6764bb0157d621c63b97831afb9061345159df5a Author: zvecr Date: Thu May 16 13:53:48 2019 +0100 Align Configurator support for ai03/lunar (#5864) commit 670a9b7f83dacf2b0e9fb42756935a77598c6677 Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Thu May 16 13:11:28 2019 +0900 Add effect range to rgblight.c (#5856) * add rgblight_set_effect_range() * implement effect range * Arrange the order of function list in rgblight.h . * update docs/feature_rgblight.md * fix RGBLIGHT_RAINBOW_SWIRL_RANGE default value * add example code about Utility Functions * add example code about direct operation functions * When RGBLIGHT_SPLIT is defined, the following function has no meaning and is invalidated. * rgblight_setrgb_master(r, g, b) * rgblight_setrgb_slave(r, g, b) * rgblight_sethsv_master(h, s, v) * rgblight_sethsv_slave(h, s, v) * add temporary test code for rgblight_set_effect_range * fix rgblight_effect_knight() bug * Test End. Revert "add temporary test code for rgblight_set_effect_range" This reverts commit 5680cddd012d68b2db75a532862a7fef250f8973. commit acd3e79add2d47ab664b831936e5b6e71d3b8e15 Author: yiancar Date: Thu May 16 05:09:36 2019 +0100 NK65 Addition (#5865) * Nk65 initial commit * Minor fix for compatibility * Make everything pretty * Update keyboards/nk65/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/nk65/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Chmod Dummy * Update getting_started_introduction.md * Revert "Update getting_started_introduction.md" This reverts commit daf446acf7ae4ae00488b389ce04f2cfca708d44. commit 8680c50d07604836b0fc7c3f97bd77c7830ea083 Author: Erez Zukerman Date: Wed May 15 19:53:45 2019 -0400 Removes Erez personally from QMK (#5883) commit 8bcefc92d0b1494b890dae3f41516acf831f539c Author: zvecr Date: Wed May 15 20:57:35 2019 +0100 Port 40percentclub nein (#5876) commit 547eb55553b386e0dfa5bb78badfa001608b7a34 Author: ENDO Katsuhiro Date: Thu May 16 00:52:30 2019 +0900 Add a new keybord Scythe (#5873) * Add a new keyboard Scythe. * Update info.json. * Use pragma once. * Comment out IS_COMMAND macro. * Remove DISABLE_JTAG definition. * Remove unnecessary backslashes. * Change layer defines to enum. * Remove dead code. * Fix typo(RGBLIGHT_SPLIT). * Change BOOTMAGIC_ENABLE to "lite". * Remove unnecessary keys. Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Fix width. Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Fix hight. Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> commit 7209266ea1bd8b6bce4d468ea016689602499239 Author: Nicholas Shaff Date: Tue May 14 21:31:36 2019 -0500 [Keyboard] Added capslock LED support to the Doro67 Multi PCB. (#5875) commit 4ed474b66a5bcb3ea401c4bc76bd736c7db55e58 Author: Ben Date: Wed May 15 02:00:31 2019 +0200 [Keyboard] Add Keycapsss O4L 5x12 keyboard (#5859) * [Keyboard] Add Keycapsss O4L 5x12 keyboard * Fix layout error in rules.mk * Update keyboards/keycapsss/o4l_5x12/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/keycapsss/o4l_5x12/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/keycapsss/o4l_5x12/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/keycapsss/o4l_5x12/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/keycapsss/o4l_5x12/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/keycapsss/o4l_5x12/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Remove trailing backslashes * Add additional infos to the readme * Remove remaining backslashes * Change 2x2y layout to my needs * Update keyboards/keycapsss/o4l_5x12/o4l_5x12.h Co-Authored-By: Drashna Jaelre * Update keyboards/keycapsss/o4l_5x12/o4l_5x12.h Co-Authored-By: Drashna Jaelre * Update keyboards/keycapsss/o4l_5x12/o4l_5x12.h Co-Authored-By: Drashna Jaelre * Update keymaps to use new layout names * Update keyboards/keycapsss/o4l_5x12/rules.mk Co-Authored-By: Drashna Jaelre commit 3220b2481967b024ca8c06714578ad35204a0de8 Author: XScorpion2 Date: Tue May 14 17:25:26 2019 -0500 Update Zen rev2 info.json file with option positions (#5872) commit fd0ba01d68b03945b87dcf0e95cf85afb99f034d Author: Markus Dieckmann Date: Tue May 14 21:27:49 2019 +0200 [Keymap] Correction for DE_Simple keymap readme (#5870) Replaced erroneous second QWERTZ keymap with diagramm for 'Lower' layer. commit 7c0f2ae6d1c1d3f168a5919287b6608b092b3dba Author: Morton Jonuschat Date: Tue May 14 12:12:29 2019 -0700 [Keymap] Neo2 for ErgoDox on MacOS US QWERTY / ABC Extended keymap (#5862) This is a Neo2 inspired layout that is meant to be fully usable on MacOS when used with the default US QWERTY/ABC Extended keymap. Neo2 layers 1-4 have been almost fully implemented in hardware. Layers 5 and 6 (greek and mathematical symbols) have been left out for now as most of them aren't available on the default keymaps. Layer toggling for layer 3 on the right hand side utilizes a tap-toggle approach that is a combination of MO & LT macros. This is required to allow sending Y when tapped, @ when tapped while the SHIFT modifier is active and support momentarily toggling the layer while the key is held. commit 93a97ec6e5a8f193bb96bba1636b7f67cd47d3fc Author: zvecr Date: Tue May 14 20:05:09 2019 +0100 Fix arch installs as 8.1 is unavailable and #5456 has been merged (#5857) commit b68d8fe82eac0be9ca8862fdf94ae4bfbbb0735e Author: Pavlos Vinieratos Date: Tue May 14 21:02:22 2019 +0200 [Keymap] Pvinis master (#5843) * trying to make my global keymap * refactoring the old keymap using userspace * getting there * move readme and remove community layout * use pragma once instead of ifndefs * just make iris work * iris decent * better naming * add some modifiers on the home row * use symbol and sysctl layers * fix up * a bit faster * add < and > on symbol layer * apparently im not using z all that much.. * okok * fix up stuff * led init is back * bring back led indicators * Update keyboards/ergotravel/keymaps/pvinis/config.h Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * not needed * not needed * delete these for now, until I use the userspace code * remove katamari from here. made a new pr for it * lower case * drashna suggestion :) * move files to correct place * fix missing command commit 4cdb86c730528c8ca5ff90f5b9b01c395d31fc0e Author: XScorpion2 Date: Tue May 14 13:58:56 2019 -0500 [Keyboard] Create RGBKB Folder (#5858) * Move Sol, Zen, & Zygomorph keyboards to RGBKB folder * Updated default keymaps * Fixing more areas due too folder moves * Fixing Zen layer numbers * Fixing zygomorph layer comments * Fixing Colmak comments * Fixing Sol Colmak readme * Macro alignment * Zen rev2 configuration json * Fixing sol ifdef * Fixing Sol info.json commit e8b27a965d4f6abcc2773022f451bdc7eabebf69 Author: roguepullrequest Date: Mon May 13 16:00:20 2019 +0100 Roguepullrequest mousepad (#5860) * First publish of roguepullreqest programmer dvorak planck layout * Removed junk line * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Removed layer songs Removed layer songs for cleanliness. Will use them later. * Update keyboards/planck/keymaps/roguepullrequest/readme.md Co-Authored-By: roguepullrequest * Made basic LSHIFT framework but is not working. Listed other tapdances. * Got LSHIFT to work * Added working RSHIFT * Added working TD_S * Cleaned up LEFT and RIGHT [ { ] } on the UPPER layer. * Cleaned up layout. * Reenabled audio space is not needed right now. * Added tap dances and layout image * Started dactylmanuform layout * Revert "Started dactylmanuform layout" This reverts commit 5ef48e4a23de14db9b843d85d3250e1bf4426817. * Started mousepad version of BDN9...wont compile for some reason. * Fixed BDN9 mousepad layout * Added readme.md to mousepad bdn9 layout. * Updated readme.md for mousepad bdn9 layout. Fixed the tables to finally work. * Unslashed the mousepad keymap for the BDN9 commit 9b46fabe084cd3e15104f88ef5d1f87f215de3c6 Author: XScorpion2 Date: Mon May 13 09:58:15 2019 -0500 Xulkal Keymap Changes (#5861) commit 8e3cbe030c10090301ae94427cf0e6cf31ef31d9 Author: fauxpark Date: Mon May 13 04:22:16 2019 +1000 Add Wasdat controller (#5855) * Add Wasdat controller * Add reset instructions * Clarify ANSI & ISO support commit 7e1d28673ff4c984be889ca1b67a45ca6d3a5065 Author: zvecr Date: Sun May 12 08:01:00 2019 +0100 [Keyboard] Fix file encoding and add readme (#5853) commit 94f104cb6cd8751b49df7fa7e5b0b266e5354f92 Author: Croktopus <39040552+Croktopus@users.noreply.github.com> Date: Sat May 11 23:59:52 2019 -0700 [Keyboard] Added hand wired keyboard "Daishi" (#5712) * added daishi * edits made based on feedback * Update keyboards/handwired/daishi/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/daishi/keymaps/default/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/daishi/keymaps/default/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * made more changes based on feedback * Update keyboards/handwired/daishi/keymaps/default/readme.md Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> * updated usb device info * fixed layouts * fixed LEDs and keymaps commit 0db65190c2f4f72fd99d676d7e8aed6e0cc834f6 Author: takashiski Date: Sun May 12 15:20:45 2019 +0900 [Keyboard] Enable RGBLED_SPLIT on hecomi/alpha (#5836) * remove not need file * set RGBLIGHT_SPLIT * set RGBLIGHT by layer * exchange LED color on layer * Update keyboards/hecomi/alpha/rules.mk I misunderstand RGBLIGHT_SPLIT Co-Authored-By: Drashna Jaelre commit 2b78840ef7e6227949bf6e2f9643449e11df0ac5 Author: zvecr Date: Sun May 12 07:15:18 2019 +0100 [Keyboard] Fix dz60 LAYOUT_60_iso_split_space_bs_rshift api errors (#5852) * Fix LAYOUT_60_iso_split_space_bs_rshift to match comments and Configurator * Fix LAYOUT_60_iso_split_space_bs_rshift to match comments and Configurator commit b32ad8b90cc3b6e8bdcdfa646c658b9848bde105 Author: zvecr Date: Sun May 12 06:57:51 2019 +0100 [Keyboard] Convert Staryu to use DIRECT_PINS and BACKLIGHT_PINS (#5848) * Convert to use DIRECT_PINS and BACKLIGHT_PINS * Convert to use DIRECT_PINS and BACKLIGHT_PINS - remove old comment commit 831d765b52a7d97ac7294e7c89afc34465a2ec32 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sat May 11 22:56:00 2019 -0700 [Keyboard] clarify readme for the growing number of kbd67 revisions (#5844) * clarify readme for the growing number of kbd67 revisions * some pr comment nits commit 8d46bb9cabb9c8e81c7ca1266d97a0126cc80767 Author: XScorpion2 Date: Sun May 12 00:42:57 2019 -0500 [Keyboard] Adding RGBKB Zygomorph Keyboard (#5841) * Initial Zygomorph 5x6 code Split is not working yet * layout changes implement 4 row config option (not done yet), remove layout comments in layout.c * Zygomorph layouts for 5x12, 5x6, 4x12, and 4x6 Also, info.json *should* be nearly usable for the configurator * temporary fix for pin D5 being broken * show D5 issue comment * add build notes * Pin B7 broken in split why? * remove fix * Fix some pin assignments * begin to fix keymap * Create new 5x6 layout * update key positions * Initial Zygomorph 5x6 code Split is not working yet * layout changes implement 4 row config option (not done yet), remove layout comments in layout.c * Zygomorph layouts for 5x12, 5x6, 4x12, and 4x6 Also, info.json *should* be nearly usable for the configurator * temporary fix for pin D5 being broken * show D5 issue comment * add build notes * Pin B7 broken in split why? * remove fix * Fix some pin assignments * begin to fix keymap * Create new 5x6 layout * Rough first pass at split common conversion. Keymap cleanup to cover just the basics. Broke OLED code out into separate example. * Fix readme * Removal of old encoder / oled driver, fix for layout macros * small update * xulkal zygomorph keymaps * Removed the LED_MIRRORED option as leds are always mirrored on Zygomorph * Xulkal keymaps update * split rgb light support * fix line endings * Apply suggestions from code review Co-Authored-By: zvecr * More layout and compile fixes from pr review * Cleaning up rules.mk files * Apply suggestions from code review Co-Authored-By: zvecr * Updating defaults * Apply suggestions from code review Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com> commit c6184d2e7ed9695c22635431394e501b1d5e6271 Author: XScorpion2 Date: Sun May 12 00:20:14 2019 -0500 Added check for event pressed to clear space cadet (#5839) * Added check for pressed to clear space cadet * Found some docs to update * Update docs/quantum_keycodes.md Co-Authored-By: fauxpark * Changes from PR commit ec302295b695e43c5967a6f806c4b4505c651e13 Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat May 11 22:16:07 2019 -0700 [Keyboard] Z-150 Blackheart refactor (#5823) * Fix white space on z150_blackheart.h * Update z150_blackheart.h to use #pragma once include guard * Update z150_blackheart.h to use QMK-preferred K notation * Add QMK Configurator support * Refactor the keymaps - refactor the keymaps into separate files for each layout macro - give credit where credit is due - white space update (four-space indent) * Make Hardware Availability link in readme a rich text link * Convert LED indicators to GPIO commands * Elevate Indicator LED set-up and toggling to keyboard level commit f542c0589bec06501a3990070c08638a9124f055 Author: Mike Roberts Date: Sat May 11 21:12:06 2019 -0400 NEK Type A (#5175) * project creation and config.h import * fix name * cleanup * layout for left * working left with feather pins * full keymap * ? * let's do this * non working twimaster version * it fucking works! * bluetooth! * cleanup * use auto output for ADAFRUIT_BLE * remove auto from custom matrix * better ble auto * fix f1 * revert * fix ble * update readme * Update readme.md * Update readme.md commit d53cbd2dc6ec6877f2815c546c03b39fac7a8afa Author: zvecr Date: Sun May 12 01:55:12 2019 +0100 Update run command now that the install script is unattended, fix mount point for Debian (#5847) commit 5c4707eafc5165904918fad7daff4e566f8f60df Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sat May 11 20:51:37 2019 -0400 [Keymap] Minor keymap updates (#5850) * Move layer toggle key for one handed operation * Add print screen keycode * Cleaning up some tab/space formatting commit 819364ea23c000d3015ca6d15b093ebf96c45732 Author: XScorpion2 Date: Sat May 11 14:31:31 2019 -0500 Fix for Solid Reactive mode bug (#5846) derp, forgot to remove the pragma once commit b9c38cfec844d5ff0cb952be0c27bbdca6279595 Author: William Chang Date: Sat May 11 10:14:42 2019 -0700 Add vim arrow keybindings to layer 1, update readme. (#5842) commit d591ab6263a4c5581d1614b006b5ef52b012c9a8 Author: Paul J. Miller Date: Sat May 11 12:24:49 2019 -0400 feat: add kbd67v2 support (#5777) * feat: add kbd67v2 support * update cr * Update keyboards/kbdfans/kbd67/rev2/config.h Co-Authored-By: Vorror * Update keyboards/kbdfans/kbd67/rev2/config.h Co-Authored-By: Vorror * Update keyboards/kbdfans/kbd67/rev2/rev2.c Co-Authored-By: Vorror * Update keyboards/kbdfans/kbd67/rev2/rules.mk Co-Authored-By: MechMerlin <30334081+mechmerlin@users.noreply.github.com> * Update keyboards/kbdfans/kbd67/rev2/readme.md Co-Authored-By: MechMerlin <30334081+mechmerlin@users.noreply.github.com> commit 7871a465d36d11c4f9216a9e862104e0e770c6f4 Author: ymzcdg <49898694+ymzcdg@users.noreply.github.com> Date: Sun May 12 00:22:16 2019 +0800 translate docs into Mandarin Chinese (#5807) * translate newbs.md into Madarin Chinese translate newbs.md into Madarin Chinese * translate docs into Mandarin Chinese translate getting_started_github.md into Mandarin Chinese * translate getting_started_getting_help.md into Mandarin Chinese translate getting_started_getting_help.md into Mandarin Chinese * contributing.md to Chinese Personify QMK as a girl named Q酱 . It can make more developer read this document and contribute QMK. * getting_started_introduction.md to Chinese getting_started_introduction.md to Chinese * faq.md to Chinese faq.md to Chinese * crlf2lf getting_started_introduction.md ending line fix getting_started_introduction.md * crlf2lf contributing.md crlf2lf contributing.md commit fd23a0e909c8478f3d9103bce410548af2496f92 Author: XScorpion2 Date: Fri May 10 21:56:16 2019 -0500 RGB Matrix Effects: Cycle Out to In & Cycle Out to In Dual (#5812) commit 62ba66d61821fec6a5ad3bdccdf738e15e082461 Author: XScorpion2 Date: Fri May 10 18:55:02 2019 -0500 Cleanup/rgb matrix (#5811) * clean up rgb matrix extern usage Moved rgb matrix boiler plate into macros Rebased onto typing heatmap pr * Fixing the reversed frame buffer access in digital rain * Fixing digital rain & typing heatmap if keyreactive effects are not enabled * Apply suggestions from code review Co-Authored-By: Drashna Jaelre * Adding parenthesizes to DRIVER_LED_TOTAL where necessary * Updated docs * added notes about parentheses commit febaf9dec42ce4d4ade316f811145a291137ee94 Author: Yan-Fa Li Date: Fri May 10 09:50:53 2019 -0700 [Docs] RGB Animation documentation on reducing memory footprint (#5813) * Improve Animation docs with example - example to reduce flash footprint of animations using RGBLIGHT_EFFECT_ defines * Re-order the effects list * Update docs/feature_rgblight.md Co-Authored-By: yanfali * Update docs/feature_rgblight.md Co-Authored-By: yanfali * Update docs/feature_rgblight.md Co-Authored-By: yanfali * Introduce line breaks * Add title for animation speed section * Organize Animation Defines Into Groups * Use the RGB EFFECT recommended by mtei in docs - has the most modes, and STATIC_LIGHT can't really be disabled. * Use more accurate titles for effects and animation - accidentally put a toggle in settings commit 6464dfc91d962faf9c890a373da5e3cbc5b2b743 Author: Andrew Kannan Date: Fri May 10 01:53:36 2019 -0400 [Keyboard] Satisfaction75 i2c fix and VIA layout (#5798) commit d3f3da5112c241e1203bd91ae16cc7b0aa075c0c Author: Torben Hoffmann Date: Fri May 10 07:12:11 2019 +0200 Norman layout for the minidox keyboard (#5747) * Norman layout with Lower and Raise layers working * Add keymap_extra def for Norman layout * Re-org'ed the modifiers as explained in the Readme * Corrected colour legend for KLE that the Readme links to * Use #pragma once in header file * Use pragma once and move user config to config.h * Move definitions to the right file and correct link in Readme * Move def of NM_COLN to the logical place in header file * Add sendstring_norman.h for when the laptop layout is not QWERTY * Update quantum/keymap_extras/sendstring_norman.h Co-Authored-By: lehoff commit 7dcf9237d5cdf83e6f357755c19c14e92e6593c0 Author: William Chang Date: Thu May 9 21:41:26 2019 -0700 [Keymap] Updated keymap and readme (#5834) * Initial commit * Modified keymap and updated readme. * fixed numbering in readme * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Made requested changes in PR. * Rename README.md to readme.md * swapped media control keys * updated right alt key to apply shift key for emacs * updated R_Alt to remove shift * Updated readme commit bce391a663d2848bff8ffffca0e4bad771bd3890 Author: moyi4681 Date: Fri May 10 09:48:07 2019 +0800 [Keyboard] DZTECH: CODE CLEANUP (#5828) * Delete board.c * Delete board.h * Delete board.mk * Delete bootloader_defs.h * Delete chconf.h * Delete halconf.h * Delete mcuconf.h * Update rules.mk * Update config.h * Update config.h * Update config.h * Update config.h * Update config.h * Update rules.mk * Delete bootloader_defs.h * Delete halconf.h * Delete chconf.h * Delete mcuconf.h * Update rules.mk * Update config.h * Update dz40rgb.c * Update dz65rgb.c commit 2835a7074985f25dea9398a7ac211914c9d52fe4 Author: Konstantin Đorđević Date: Thu May 9 20:05:33 2019 +0200 [Keymap] Fix RGB_MATRIX_ENABLE check in users/konstantin/rules.mk (#5832) commit 94c4b6bd740bf1dbc2ff45a4a5f6385d06440ef0 Author: Hannes Egler Date: Thu May 9 18:57:56 2019 +0200 fixed matrix (#5831) commit f5b9690ec79f2bd5c6c74c76c87e870a901c2e8f Author: Danu Widatama Date: Thu May 9 20:35:47 2019 +0700 Add no_caps_lock layout for Satan GH60 (#5829) commit 16f367348a78f10b58fad0c6841c7529f4f73818 Author: Tobias V. Langhoff Date: Thu May 9 06:45:00 2019 +0200 [Docs] Fix Space Cadet link (#5825) Fix broken Space Cadet link in Features list commit aa65cd7a905370ab36f37a3562d3f53387fcae92 Author: Jan Christoph Ebersbach Date: Wed May 8 20:04:32 2019 +0200 [Keymap] Signum3.0 Generate printable keymap (#5818) * Externalize generation of visual text keymap * Generate keymap in Asciidoc format for further processing * Remove artifacts from a2x call commit 86532fa8d34e9395fe1b41fd22eaaf9a2ecd0e8e Author: Jan Christoph Ebersbach Date: Wed May 8 20:03:53 2019 +0200 [Keymap] Signum 3.0, fix, move and change keys (#5820) commit 0f0062b4929b4598aa45d5aeb20d4678b4e06d37 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue May 7 22:15:01 2019 -0700 [Keyboard] Noxary 220 (#5816) * initial commit and script error fixes * add matrix and pin definitions along with LAYOUT macro * add an appropriate keymap * add num lock led support * turn on bootmagic lite along with backlight led support * add QMK Configurator support commit 9d5b4ec97549f3b20465b1e96fb781176a1814ea Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue May 7 21:40:45 2019 -0700 [Keyboard] Add Noxary 260 (#5815) * initial commit * fix script issues * define pins used and electrical matrix size and an appropriate LAYOUT macro * add an appropriate keymap * turn on bootmagic lite and backlight support * Add QMK Configurator support * add caps lock led support * update readme with group buy links commit e52930df245137fdc4cfdda2db94e8ca927f3301 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue May 7 21:39:31 2019 -0700 [Keyboard] Add Noxary 280 (#5814) * initial commit * fixup script issues * define pins used and create an appropriate LAYOUT macro * create an appropriate keymap * turn on backlight and bootmagic lite * add QMK Configurator support * fixup readme * remove doubly defined KC_TRNS from keymap * add support for Caps lock and Scroll lock LEDs commit 60eae7335b711e8d4be7d48ad2290141e04debe7 Author: XScorpion2 Date: Tue May 7 21:17:00 2019 -0500 RGB Matrix Typing Heatmap (#5786) * RGB Matrix Typing Heatmap Effect * Fixing file name and effect init commit af89752bffbaf5dcea30ea16be66b4d682701bc4 Author: XScorpion2 Date: Tue May 7 18:22:46 2019 -0500 rgb_led struct conversion (aka: Per led (key) type rgb matrix effects - part 2) (#5783) * Initial conversion of the rgb_led struct * Converting last keyboard & updating effects to take advantage of the new structure * New struct should not be const * Updated docs * Changing define ___ for no led to NO_LED * Missed converting some keymap usages of the old struct layout commit c7f8548d9af2045996294602d2a4bd9a214ae23c Author: Chuck Lauer Vose Date: Tue May 7 14:43:00 2019 -0700 Add layout description to keymap.c (#5810) commit 12e6d412023b23c64980d30704ae11892e33c512 Author: Rainer Clasen Date: Tue May 7 19:45:10 2019 +0200 [Split] fix split_common i2c backlight disabling (#3886) slave backlight was always on - as get_backlight_level() doesn't indicate if the backlight is enabled or not. also updated the corosponding code for serial transport to stop peeking directly at 'internal' backlight_config structure. commit 2d5c16dfd4ef193c4f692722157aa2b526a4c877 Author: Olivier Poitrey Date: Tue May 7 10:43:08 2019 -0700 [Keymap] crkbd/keymaps/rs: add rs keymap to corne keyboard and adapt others (#5181) Update all my keymaps to work with 40 keys. Refactor code using Userspace. commit 3b132599427a648b1f14aaf30312f05f855625ea Author: kaylanm <1063516+kaylanm@users.noreply.github.com> Date: Tue May 7 09:36:40 2019 -0400 Add remaining RGB light components. (#5785) commit 97b8567a1f4a64fe1d43cf54683472aeb534489b Author: Chuck Lauer Vose Date: Mon May 6 22:36:21 2019 -0700 Adding bdn9 keymap examples for company event (#5800) * Adding bdn9 keymap examples for company event * Simplify some code w/ tap_code16 [pr feedback] - Also remove backslashes - Remove xxx and ___ layer definitions - Properly name enums - Add newline after slack reaction commit f3d5b1091d364468cd9f5510aef9e723d8542279 Author: Drashna Jaelre Date: Mon May 6 22:34:09 2019 -0700 [Keymap] RGB Changes for Drashna Keyboards (#5803) * Disable a bunch of reactive modes * Enable rgb matrix for Corne Keyboard * Convert CRKBD to rgb matrix * Add Gergo keyboard layout * Make Diablo 3 tap dance better * Add basic support for Planck EZ * Fix RGB Matrix stuff * Fix keycodes for Planck EZ * Update CRKBD OLED stuff * Fix typo for sleep on ergodox glow * Improve my gergo layout * Scrolling OLED key logger! * Change gergo layout * Hnadle unicode keycodes if unicode is disabled * Disable COMMAND/CONSOLE for gergo * Fix right side control * Re-enable LTO for all platforms Since I got updated arm gcc binaries that no longer error out on lto * Update formatting to match newer community standards Poor 2 space * Re-alight startup animation to use new HUE range * Streamline gitlab ci scripts * Disabled Space Cadet * Add support for breathing table * Enable new LTO Option And clean up defines that will now be repeatitive * Remove vscode settings * Additional formatting cleanup of config.h files commit 7a751f114114bf3b78d5d8fc8bedf2b42b665dba Author: Brendan Wrafter Date: Tue May 7 01:33:41 2019 -0400 Add Boardwalk keymap (#5806) * Add Boardwalk keyboard layout * Remove backslashes commit e83e3165559eba17a965541726b5c09112bab9d5 Author: XScorpion2 Date: Mon May 6 17:29:13 2019 -0500 [Keyboard] Enable RGBLIGHT_ANIMATIONS by default on the Zen rev2 (#5805) * Enable RGBLIGHT_ANIMATIONS by default on the Zen rev2 * Also fixing OLED as it is upside down commit e01b2d518a1a08ce07278ef9a38c7a793c843749 Author: XScorpion2 Date: Mon May 6 17:06:43 2019 -0500 [Keyboard] Sol keyboard conversion to split common (#5773) * Split common conversion * Updated serial and encoder pins * Fixing default folder until r2 * Fixing oled driver on slave split common * Fixing keymap compile errors * Fixing oled inactivity timer on slave split common * Hoisted oled driver task, init, & activity to keyboard.c * Update keyboards/sol/config.h Co-Authored-By: XScorpion2 * Remove TAPPING_FORCE_HOLD commit 99500243e10c12c0a5005da49aa1986947b27153 Author: skullydazed Date: Mon May 6 10:56:34 2019 -0700 Make python a required build dependency (#5784) * Make python a required build dependency * Add missing color * fixup sabayon linux per @BlitzKraft commit cb1935aaff0fed118954996fc7afb722b6ed21be Author: Konstantin Đorđević Date: Mon May 6 17:41:45 2019 +0200 [Keymap] Update personal userspace and keymaps (now with 4 spaces!) (#5774) * Add FnLk to Melody96 bottom row * Update conditional in userspace makefile Thanks @drashna * Add F keys to Melody96 Fn layer * Add FN_ESC alias to userspace * Update KBD6X keymap * Fix RGB_MATRIX_ENABLE constant name in #if * Remove trailing \ from LAYOUT macro calls * Set RGB mode on EEPROM reset in KBD6X * Swap right and middle mouse buttons in KBD6X * Rearrange RGB controls in KBD6X * Update keycode aliases, replace CLEAR with DEL_NXT in KBD6X Add Clear to KBD6X as RCtrl+` * Convert code to 4 space indents * Tweak RCTRL layer functionality * Replace NUMPAD custom keycode with layer state logic * Update RGB_MATRIX_ENABLE check Co-Authored-By: vomindoraan commit 8a9c90ad78305a1d76663fcb973a1a2ae7177297 Author: Drashna Jaelre Date: Mon May 6 08:35:01 2019 -0700 Re-fix Mousekey Movements (#5740) * Re-fix Mousekey Movements After the new movement model was instroduced, it broke diagonal momement, again. Reapplying fix from #3147 to both old and new acceleration method. * Make diagonal mouse report checks more readable Co-Authored-By: drashna commit fbc40032e73ee80db961c3930a2b5d84ffd51a6f Author: keyhive <42986966+keyhive@users.noreply.github.com> Date: Sun May 5 23:01:43 2019 -0600 [Keyboard] add ut47.2 (#5788) * adding ut47.2 adding ut47.2 * Update keyboards/ut472/ut472.c Co-Authored-By: keyhive <42986966+keyhive@users.noreply.github.com> * Update keyboards/ut472/rules.mk Co-Authored-By: keyhive <42986966+keyhive@users.noreply.github.com> * Update keyboards/ut472/ut472.c Co-Authored-By: keyhive <42986966+keyhive@users.noreply.github.com> * Update keyboards/ut472/rules.mk Co-Authored-By: keyhive <42986966+keyhive@users.noreply.github.com> * changed shift enter special keys to KC_SFTENT changed shift enter special keys to KC_SFTENT * Update keyboards/ut472/ut472.h Co-Authored-By: keyhive <42986966+keyhive@users.noreply.github.com> * Update keyboards/ut472/ut472.h Co-Authored-By: keyhive <42986966+keyhive@users.noreply.github.com> * Update keyboards/ut472/ut472.h Co-Authored-By: keyhive <42986966+keyhive@users.noreply.github.com> * Update keyboards/ut472/readme.md Co-Authored-By: keyhive <42986966+keyhive@users.noreply.github.com> * Update keyboards/ut472/readme.md Co-Authored-By: keyhive <42986966+keyhive@users.noreply.github.com> * updated for sourcing updated for sourcing * Update keyboards/ut472/readme.md Co-Authored-By: keyhive <42986966+keyhive@users.noreply.github.com> * changed flash to make changed flash to make commit e96d196dc985072a30cdc5a520c37e9533894cbf Author: M-AS Date: Mon May 6 00:54:41 2019 -0400 [Keymap] MatthewRobo Massdrop CTRL/DZ60RGB Keymaps (#5799) * added personal CTRL keymap * added personal dz60rgb keymap * enabled new rgb effect * added space cadet shift * media player track buttons now orange * updated keymaps with rgb setting and visual HSV setting preview * fixed source stuff? * added support for underglow toggle (bugged to all hell) * everything now behaves as expected when ti comes to RGB toggles, thank god * removed ifdefs * changed color of MAS_CRM * uh, whitespace commit c2f9e018abbbb1aa8029001fe224b6082127e3a7 Author: Andrew Kannan Date: Mon May 6 00:08:12 2019 -0400 [Keyboard] Add ProjectKeyboard Alice PCB to QMK (#5581) * Update instant60 for tsangan version * Add project alice keyboard * remove * Remove commented out code * Update readme * Add newline * Update keyboards/projectkb/alice/readme.md Co-Authored-By: awkannan * Update keyboards/projectkb/alice/halconf.h Co-Authored-By: awkannan * Update keyboards/projectkb/alice/halconf.h Co-Authored-By: awkannan * Fix ifdef and use helper macros * Add reset keycode * udpate keymap * Add RGB Keycodes * Styling things * remove unused enum * fix commit af22609ba53332b7b1e56f3a79119cec6c2e8c39 Author: Andrew Kannan Date: Sun May 5 19:58:08 2019 -0400 [Keyboard] Practice65 Keyboard (#5795) * Save p65 changes * Save p65 changes * Add reset * update num leds commit e290dc5ad811e9d121e216fba6fe03666772c3a4 Author: XScorpion2 Date: Sun May 5 18:27:02 2019 -0500 Space Cadet: Reducing unnecessary reported keypresses (#5781) * Reducing unnecessary reported keypresses and minor docs / variable name changes * Apply suggestions from code review Co-Authored-By: XScorpion2 commit e14732be9f52d2d79f2334384b52d36825539515 Author: Martinffx Date: Mon May 6 01:25:29 2019 +0200 Add my layout for the KBD67, update readme for default layout to (#5779) display layout. commit eb9ea8492736c14a7c57fd9bac7304e8dd6b7d80 Author: omkbd Date: Mon May 6 08:19:07 2019 +0900 [Keybooard] Update of Ergodash Keyboard (#5772) * Simpler coding use SPLIT_KEYBOARD delete rev1 (rev2→rev1) because rev1is not sold * delete USE_I2C = no * Update readme.md commit 63d53b0f2860dd89c87ff477bd5064d17ec96635 Author: Max <17062872+westfoxtrot@users.noreply.github.com> Date: Sun May 5 23:37:54 2019 +0200 config.qmk.fm support fix for westfoxtrot/aanzee (#5794) * fixed issue with LED indicators corrected error in info.json * fixed issue with led indictors * added fix for key_count to info.json for westfoxtrot/aanzee * fix to support config.qmk.fm correctly and remove unused key from matrix for westfoxtrot/aanzee commit 0213867deaab4a2a39efdeabfce50aa81125e21c Author: kwerdenker Date: Sun May 5 18:31:51 2019 +0200 Fix wrong key assigning in keymap for ISO layout (#5790) commit 3a7c65b42442971bcb3369cc9dc3615b6aad1383 Author: Ryan Caltabiano Date: Sat May 4 12:02:02 2019 -0500 fix line endings commit 9f2fc1179aa39a2728a9606909a2a2795313d8d5 Author: jotix <47826561+jotix@users.noreply.github.com> Date: Sat May 4 13:57:41 2019 -0300 [Keymap] add unicode to jotix's ortho_4x12_layout (#5775) * add unicode to jotix's ortho_4x12_layout * suggested change #define UNICODE_SELECTED_MODES UC_LNX commit 9d97e47df4de36adae48c57474f3836acb78195d Author: Jez Cope Date: Sat May 4 17:46:44 2019 +0100 [Docs] Update Super ALT↯TAB to remove use of unregister_code16 (#5766) The code as originally listed didn't work for me, but replacing `unregister_code16(LALT(KC_TAB));` with `unregister_code(KC_LALT);` fixes the problem and causes the macro to work as intended. Thanks to folks on Discord for helping me figure this out. commit e73587cfd08b2bd73987e7f762194079875df93a Author: Robin Hallabro-Kokko <44033026+hallabro@users.noreply.github.com> Date: Sat May 4 00:41:39 2019 +0000 docker_build.sh: Docker requires access to hosts devices (#5063) * docker_build.sh: Docker requires access to hosts devices This also runs the container interactively which allows the user to interupt the build with Ctrl-C. * docker_build.sh: Mount /dev via $usb_args instead commit 997bafc8ec4ff793d7ded0b9dc3b2fc3d13b81b5 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri May 3 17:28:03 2019 -0700 [Keyboard] Refactor S60x (#5596) * remove files that contributed to default hex file creation * fix up rgb pcb rules and config that previously depended on rules and config in a parent directory * use #pragma once * turn on backlight breathing and use #pragma once * fix config.h and rules.mk to not depend on the parent directory * use #pragma once * removed keyboard info.jsons in favor of a shared one * add in hhkb layout and shared info.json file * fixup readme file * remove cruft * use bootmagic lite over yes * fix config path and use pragma once * commit PR fixes * update manufacturer * set bootloader correctly commit 4c14b5832a7598d19a6a1196aaaafd473f7ed920 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri May 3 17:26:29 2019 -0700 Fix up ps2avrgb templates (#5606) * fix up ps2avrgb templates * set backlight enable to no as per review comments * add back no_uart commit b9f060c98ca8245d105d2f79f3fa675877d0c3da Author: Oliver Granlund Date: Sat May 4 03:25:24 2019 +0300 [Keymap] DZ60 keymap and layout (#5474) * init * function layout planning * nordic keymap v1.0 * Added latest satan layouts, updated readmes * Cleaning code * Renamed ISO -> iso * Updated keymap to work better with Swedish layout * merge conflict * Added dz60 layout * pr issues fixes * removed weirdly positioned files * code cleanup, added dz60 layout json data * Added dz60 layout readme * Renamed layout * removed vscode file * Update keyboards/dz60/dz60.h Co-Authored-By: OlliGranlund commit da995d2aeace38cd548c77f341920fab49501ded Author: zvecr Date: Sat May 4 01:24:07 2019 +0100 [Docs] Add examples to debugging docs (#5555) * Add examples to debugging docs * Add examples to debugging docs - review comments * Update matrix keypress example to use uprintf commit bdc8d89e6b8f49528b716d9bd3343a4f9e9327bd Author: Konstantin Đorđević Date: Fri May 3 18:33:00 2019 +0200 New keycode macro (XP) for shifted character pairs using UNICODEMAP + bug fixes and improvements (#4803) * Expose unicode_saved_mods * Add UNICODEMAP shift pair functionality and XS keycode * Add XS to keycode reference documentation * Pick pair index based on both Shift and Caps Lock state * Add XS to Unicode feature docs * Clean up process_unicode* headers * Extract unicode_map index calculation into function * Pick pair index as XOR rather than OR of Shift and Caps states * unicode_input_start() has to be called before the unicode_map index is calculated * Replace unicodemap_input_error() with more generic unicode_input_cancel() * Replace register+tap+unregister with tap_code16(LCTL(LSFT(KC_U))) * UNICODE_OSX_KEY → UNICODE_KEY_OSX, UNICODE_WINC_KEY → UNICODE_KEY_WINC * Make keycode range checks more robust * Fix keycode range checks for different input modes * Add UNICODE_KEY_LNX, update docs * QK_UNICODEMAP_SHIFT → QK_UNICODEMAP_PAIR * XS → XP, update docs * Tweak Unicode docs * Use recently added MOD_MASK_SHIFT and IS_HOST_LED_ON helpers * Update Unicode table in docs/keycodes.md * Update Unicode docs per review comments * Replace references to Mac OS X with macOS in Unicode docs * As of v0.9.0, WinCompose supports all possible code points * Expand descriptions in XP docs * Update keycode table and cycling docs * Further expand cycling docs commit 41beecfc1847bd0039c508753a212fa18f207e3f Author: Drashna Jaelre Date: Fri May 3 08:24:22 2019 -0700 Add DFU Suffix for ARM boards (#5763) * Add DFU Suffix for ARM boards * Blindly flash DFU SUFFIX ARGS for now * Fix commented out check * Fix DFU Suffix Argument check Thank you jack! * Update Travis CI Scripts to include dfu-util So we can get dfu-suffix as well * Manually add dfu-suffix package * Use external repo for newer version of dfu-util One that includes dfu-suffix * Update .travis.yml * Silence unnecessary output from dfu-suffix commit 29f68459a01c155ca64aed4ec0ba083d0dee0d2e Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Fri May 3 22:20:23 2019 +0900 Fix LIB_SRC insert position (#5731) The insertion point for `$(patsubst %.c,%.clib,$(LIB_SRC))` must be after all normal `SRC += ..` . I modified it to be so. Because LIB_SRC and SRC are assumed to be used in pairs. Similarly, QUANTUM_LIB_SRC and QUANTUM_SRC are assumed to be used in pairs. commit 6a59198a42d49422297ee9320e5d842592573297 Author: moyi4681 Date: Fri May 3 21:19:33 2019 +0800 add dz65rgb (#5756) * add dz68rgb * Update dz68rgb.c * Apply suggestions from code review Co-Authored-By: moyi4681 * Apply suggestions from code review Co-Authored-By: moyi4681 * Apply suggestions from code review Co-Authored-By: moyi4681 * Apply suggestions from code review Co-Authored-By: moyi4681 * Apply suggestions from code review Co-Authored-By: moyi4681 * Apply suggestions from code review Co-Authored-By: moyi4681 * Apply suggestions from code review Co-Authored-By: moyi4681 * Rename keyboards/dztech/dz68rgb/rules.mk to keyboards/dztech/dz65rgb/rules.mk * Update and rename keyboards/dztech/dz68rgb/config.h to keyboards/dztech/dz65rgb/config.h * Update and rename keyboards/dztech/dz68rgb/dz68rgb.c to keyboards/dztech/dz65rgb/dz65rgb.c * Rename keyboards/dztech/dz68rgb/dz68rgb.h to keyboards/dztech/dz65rgb/dz65rgb.h * Update and rename keyboards/dztech/dz68rgb/info.json to keyboards/dztech/dz65rgb/info.json * Update readme.md * Rename keyboards/dztech/dz68rgb/readme.md to keyboards/dztech/dz65rgb/readme.md * Rename keyboards/dztech/dz68rgb/keymaps/default/keymap.c to keyboards/dztech/dz65rgb/keymaps/default/keymap.c * Update dz65rgb.c * Update readme.md * Update keyboards/dztech/dz65rgb/keymaps/default/keymap.c Co-Authored-By: moyi4681 * Update keyboards/dztech/dz65rgb/keymaps/default/keymap.c Co-Authored-By: moyi4681 commit 36bed36cd6830cc1428a3e6df19549e831f0b062 Author: ymzcdg <49898694+ymzcdg@users.noreply.github.com> Date: Fri May 3 21:18:20 2019 +0800 getting_started_introduction.md ->zh-cn (#5767) translate getting_started_introduction.md into Mandarin Chinese commit db440f3e75f1d71e2c26499c7c7500cc48020047 Author: ymzcdg <49898694+ymzcdg@users.noreply.github.com> Date: Fri May 3 13:21:06 2019 +0800 translate the first unit(newbs) (#5753) translate newbs_getting_started.md newbs_building_firmware.md newbs_flashing.md newbs_testing_debugging.md newbs_best_practices.md newbs_learn_more_resources.md into Mandarin Chinese commit 7e655a207e58fb8e5c7d76bd5727558e6b4c8b0c Author: Drashna Jaelre Date: Thu May 2 08:03:42 2019 -0700 Add option to enable LTO easily (#5674) * Add option to enable LTO easily and disable features that cause compiling errors with LTO * Add documentation about LTO option * Add to show_options commit 55d37d9fbcd85a49acbf539d751f0003e7b770ed Author: Teng Date: Thu May 2 16:02:34 2019 +0100 add a new keymap of DZ60 for MacOS (#5760) * add a new keymap of DZ60 for MacOS * dz60:macos_64 1. remove useless bright keys code, change to KC_PAUSE 2. add a documentation link in the readme commit 27b0f8923e845a30adfde13756cb5845b8cd1ab7 Author: Drashna Jaelre Date: Thu May 2 08:01:58 2019 -0700 Change VPATH path addition order (#5754) Specifically, to fix some edge cases, and keep the handling consistent, the userspace folder should not actually be added at the end. Ideally, it should be added after the keymap paths, but before the keyboard's path. This issue was discovered in #5484, and the fix created by mtei. commit 3da8d46a07167fc862e90b6bb232812d5cb64651 Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Thu May 2 23:59:29 2019 +0900 If RGBLIGHT_EFFECT_BREATHE_CENTER is undefined, use fixed breathe table instead of exp() and sin() (#5484) * If RGBLIGHT_EFFECT_BREATHE_CENTER is undefined, use fixed breathe table instead of exp() and sin() * Change rgblight breathing table size to be easily selectable. add RGBLIGHT_BREATHE_TABLE_SIZE macro for customize breathing effect. commit 4db31fb374d365bfa0f5c8a25d089bb2f967352f Author: yynmt <45400583+yynmt@users.noreply.github.com> Date: Thu May 2 23:55:55 2019 +0900 Add new keyboard KagaMidget (#5755) * Add KagaMidget keyboard * Update readme.md commit 3956b7c685e2501ccb6c8dd22081031986688f26 Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Thu May 2 23:37:37 2019 +0900 add '#define USE_SERIAL' to keyboards/mint60/config.h (#5758) If there is no '#define USE_SERIAL', qmk configurator will give an error, so add '#define USE_SERIAL' to `mint60/config.h`。 commit de5c8d86b432f0481f73602d978ac8f4249c3819 Author: Naoto Takai Date: Thu May 2 23:33:04 2019 +0900 Add support for Nomu30 (#5759) commit 7e68faa3361902458ef7d02e4ae156b2ed4e2303 Author: zvecr Date: Thu May 2 05:50:16 2019 +0100 [Keyboard] Plaid - Add compatibility for LAYOUTS = planck_mit planck_grid (#5591) * Add compatibility for LAYOUTS = planck_mit planck_grid * Add compatibility for LAYOUTS = ortho_4x12 * Remove planck_grid community support from Plaid commit 588b2329cbe3b521475c62d5641c713430d8f188 Author: wanleg <32079073+wanleg@users.noreply.github.com> Date: Wed May 1 20:29:00 2019 -0700 Wanleg tuneup / additions (#5752) * change split keyboard tapping term in userspace * fix 5x15 layout numpad movement * minor changes for Nori setup * edit based on 40percentclub refactor change * fix gherkin due to refactor * kbd6x wanleg keymap * kbd6x edits * kbd6x tweak * fn / backlight layer * fix jj40 rgb hex issue * wanleg gherkin lighting * 4x12 layout cleanup * move kbd6x to new kbdfans directory * minor edit related to new kbdfans directory * mac layout for kbd6x * gherkin flip option * tweak tapping term on lets_split * edit for keebio board coalescing * update user readme with git hints * wanleg miniaxe keymap * testing Permissive Hold instead of Mod Tap Interrupt * wiring names * kbd6x keymap * change default backlight behaviour on kbd6x * userspace underglow * userspace underglow * underglow tweaks * user readme update * more layer underglow tweaks * fix userspace for non-underglow-enabled boards * readme edits * readme edits * readme edits * readme edits * Update readme.md * Update readme.md * readme edits * readme edits * update keymap picture commit 6fa88d981c237f19839b2cc4ca4a0d44f84d2043 Author: roguepullrequest Date: Wed May 1 20:27:54 2019 -0700 Roguepullrequest planck layout update (#5751) * First publish of roguepullreqest programmer dvorak planck layout * Removed junk line * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Removed layer songs Removed layer songs for cleanliness. Will use them later. * Update keyboards/planck/keymaps/roguepullrequest/readme.md Co-Authored-By: roguepullrequest * Made basic LSHIFT framework but is not working. Listed other tapdances. * Got LSHIFT to work * Added working RSHIFT * Added working TD_S * Cleaned up LEFT and RIGHT [ { ] } on the UPPER layer. * Cleaned up layout. * Reenabled audio space is not needed right now. * Added tap dances and layout image * Started dactylmanuform layout * Revert "Started dactylmanuform layout" This reverts commit 5ef48e4a23de14db9b843d85d3250e1bf4426817. commit 12a07dae33aaa59b8172f13f25af74e0cf3b82cc Author: XScorpion2 Date: Wed May 1 20:59:01 2019 -0500 Adjusted the linear led table and hsv_to_rgb to better handle 255 hue (#5739) * Adjusted the linear led table and hsv_to_rgb to better handle 255 hue * small math adjustments to better handle specific uint8_t rounding and overflows commit 3235c8527dd292d4a5e5e28302e118f3ef1a043e Author: XScorpion2 Date: Wed May 1 13:36:50 2019 -0500 Simple fix for selecting which tracked key press to work off of for simple reactive effects (#5745) commit 22ba36a4d86c06ce1b6049555525646eb16bb57a Author: XScorpion2 Date: Wed May 1 10:02:02 2019 -0500 rgblight 255 hue (#5547) commit 50bc2dbe77e533959c4b8f821a31b489d25c7cb7 Author: XScorpion2 Date: Wed May 1 07:48:33 2019 -0500 Fixing incorrect usage of RGBLED_NUM in ws2812 driver when used with RGB Matrix (#5744) commit 61ce41ae13242adb113f61ec03dd9ed26acee26b Author: Josh Hinnebusch Date: Wed May 1 01:35:49 2019 -0400 [Keyboard] Update hineybush keyboard projects (#5554) * Add H87a keymap and info * Create readme.md * Add h87a .json for kbfirmware.com use * Update readme.md * Update readme.md * Update h87a files * Delete Makefile * Update readme.md * Delete desktop.ini * update files to match new QMK framework * Update files to match new QMK structure * Update files to match new QMK structure * add layout name information * Add info.json * update keymap to support layout_all * update keymap to support layout_all * update rules.mk to fix filesize * Update readme.md * Update config.h * Update readme.md * Update config.h * Update config.h Add "define CONFIG_H and include "config_common.h" back to file * update config.h to include RGB turnoff when PC goes to sleep * update info.json * update info.json * Update readme.md Add project link * Update readme.md * refactor hineybush projects into single folder. update hineyg80 to modern code * updated layout file to reflect new keymap changes * actually updated all layout names this time, verified make * Update keyboards/hineybush/h87a/h87a.h Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/default/config.h Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/readme.md Co-Authored-By: hineybush * edit based on PR edit requests * update hiney80 files to avoid confusion * update hineyg80.h to reflect matrix * Update keyboards/hineybush/hineyg80/info.json Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/info.json Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/info.json Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/info.json Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/default/config.h Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/keymaps/wkl/config.h Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/default/config.h Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/readme.md Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/readme.md Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/readme.md Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/readme.md Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/default/config.h Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/wkl/config.h Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/wkl/config.h Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/keymaps/default/config.h Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/wkl/config.h Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/readme.md Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/wkl/config.h Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/readme.md Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/hineyg80.c Co-Authored-By: hineybush * update hineyg80 config.h * Update keyboards/hineybush/h87a/keymaps/wkl/keymap.c Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/wkl/keymap.c Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/wkl/keymap.c Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/wkl/keymap.c Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/hineyg80.c Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/hineyg80.c Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/hineyg80.c Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/wkl/keymap.c Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/wkl/keymap.c Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/wkl/keymap.c Co-Authored-By: hineybush * Update keyboards/hineybush/h87a/keymaps/wkl/keymap.c Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/hineyg80.c Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/hineyg80.c Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/hineyg80.c Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/hineyg80.c Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/hineyg80.c Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/hineyg80.c Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/config.h Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/config.h Co-Authored-By: hineybush * Update keyboards/hineybush/hineyg80/config.h Co-Authored-By: hineybush commit e4b5c4426285d4e987fdbcc0c0bb6f7169c72c2e Author: fauxpark Date: Wed May 1 14:54:52 2019 +1000 [Docs] Use HTTPS for qmk.fm link (#5506) * Use HTTPS for qmk.fm link * Fix the rest of the HTTP links commit 074be4fe5e8a783c0147e6fa57182c1a6b61418d Author: Jan Christoph Ebersbach Date: Wed May 1 06:53:29 2019 +0200 [Keyboard] Signum3.0 generate json keymap (#5688) * Remove dependency on sortedcontainers * Sort dictionary on output * Externalize writing of keymap.c into function - serialize layers into one flat list * Add encoding * Generate JSON keymap in addition to keymap.c * Replace XXXXXX with KC_NO commit 670ff2d19f76f4558ccdd317ab362ccfe5e45642 Author: mikethetiger <30720424+mikethetiger@users.noreply.github.com> Date: Tue Apr 30 23:35:21 2019 -0500 [Keymap] Made adjustment to my Preonic keymap (#5733) * Added my Preonic keymap * Update keyboards/preonic/keymaps/mikethetiger/keymap.c Co-Authored-By: mikethetiger <30720424+mikethetiger@users.noreply.github.com> * Update keyboards/preonic/keymaps/mikethetiger/keymap.c Co-Authored-By: mikethetiger <30720424+mikethetiger@users.noreply.github.com> * Added my Preonic keymap * Added my Preonic keymap commit e95283b54512eda893b9d43a9f1b72bf8c03970b Author: XScorpion2 Date: Tue Apr 30 22:55:01 2019 -0500 [Keymap] Xulkal keymap tweeks (#5746) * Minor keymap tweeks and more oled data * Update keymap.c commit 8725197ad679647d2eb7876aee3f9df32edb5766 Author: Benjamin Date: Tue Apr 30 19:29:51 2019 -0700 [Keyboard] Adds support for BM16S keyboard (#5659) * Added support for BM16S keyboard. * Update keyboards/bm16s/bm16s.h Co-Authored-By: bontakun * Update keyboards/bm16s/bm16s.h Co-Authored-By: bontakun * Cleaned up a bunch of unneeded stuff. * Made layout name match. * Changed rules file to have correct bootloader and indention. Updated readme to reflect availability on krepublic. Updated keymap to have more obvious RGB controls. * Removed unnecessary file. * Fixed grammar in readme. Co-Authored-By: bontakun * Migrated to autogenerated layout config, without issue. * Renamed LAYOUT to match community standards. commit d67b99ff3c2cfca63add546ad6d052e2487aa26a Author: Ryan Caltabiano Date: Tue Apr 30 19:54:22 2019 -0500 Added OLED Driver to the summary commit 7c2a7ab817becfef88025b9bef80c4e212cc0913 Author: Daniel Peregolise Date: Tue Apr 30 15:11:57 2019 -0400 [Keyboard] doro67 readme clarification (#5736) * readme clarification * Apply suggestions from code review verbiage updates Co-Authored-By: dperegolise * mechmerlin suggested verbiage commit 5b9667a4bfae068f2b6d17156403e2135f4dbd3e Author: Drashna Jaelre Date: Tue Apr 30 09:18:11 2019 -0700 Ignore VSCode ipsh folder (#5741) commit 0cde8807476d0a7e855124b3145e6dfa1a55de12 Author: Jeremy Bernhardt Date: Tue Apr 30 09:28:01 2019 -0600 🐮🥛 Butterstick Support 🥛🐮 (#5742) * Working on chording * Working on chording * Got layouts in order * Initial Georgi support * forgot to add keymaps * Updated readme * Update keyboards/georgi/keymaps/template/readme.md Co-Authored-By: germ * Update keyboards/georgi/georgi.h Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/template/keymap.c Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Disabled features, updated info * Update keyboards/georgi/config.h Co-Authored-By: germ * Update keyboards/georgi/config.h Co-Authored-By: germ * Fixed info.json * Split the number button and fixed gaming mode. * started work on history feature * Working history/multikeyfuckery * type * inital code reduction refactor * Got multikey patched up, optimizing for size * Forgot to remove stuff * fixed key repeat * Key repeat added. * Symshift locking * Midchord Sym shenanigans. * Added only QWERTY mode * Split out header * Added stickybits, minimal layour * Fixing user layout * Whitespace fixing * Fixing Version name * Starting work on BS * Fixing default layout and rules * Updated Butter fw * Copy-paste rebase * more fixing from merge. Fuck * Forgot to roll version * Added revisions as per @mechmerlin commit b09dc19d3209a0e08f3d534b14d75d144b698558 Author: motform <30436214+motform@users.noreply.github.com> Date: Tue Apr 30 17:25:31 2019 +0200 [Keymap] Add motform planck keymap (swedish colemak) (#5734) * [Keymap] Add motform planck keymap (swedish colemak) * Add readme and remove unused enums (thanks @drasha!) commit bb208f3e3b69fb154f4f78d7538ffa28482f232f Author: XScorpion2 Date: Tue Apr 30 09:55:53 2019 -0500 Implement kb function for rgb matrix to led lookup (#5738) commit 483ad4e3e041084977bc128622aa49c637524b77 Author: Jan Christoph Ebersbach Date: Tue Apr 30 07:06:24 2019 +0200 [Keyboard] Signum 3.0 Fix key order in layout (#5687) * Fix key order in layout * Reduce keyboard dimensions * Reduce space around keys commit 4c2453aa1b71d269f67a25c89848965f9a6d2925 Author: Jan Christoph Ebersbach Date: Tue Apr 30 06:35:34 2019 +0200 [Keyboard] Signum3.0 remove sortedcontainers (#5679) * Remove dependency on sortedcontainers * Sort dictionary on output commit c745d9b82e3f2047feb97a7a8937f27c6e989fd7 Author: XScorpion2 Date: Mon Apr 29 22:21:46 2019 -0500 Simple extended space cadet (#5277) * Simplifying and Extending Space Cadet to work on Ctrl and Alt keys * PR Review feedback * Reverting back to keycodes commit 7d4ae3e66ebe1e9ff52ad4eb87da8cd9f01c142a Author: XScorpion2 Date: Mon Apr 29 19:45:42 2019 -0500 Removed forced in lining for lib8tion functions (#5670) commit 75d72c221d333982d01a7d99ba4f108dc927ea50 Author: Alec Geatches Date: Tue Apr 30 08:44:36 2019 +0800 Change lib8tion library to be usable in user keymaps (#5598) * Move lib8tion header-defined constant into implementation file, add to build * Move b_m16_interleave initializtion to lib8tion.c, change build to include lib8tion.c in QUANTUM_LIB_SRC * Remove left-over whitespace * Move lib8tion include by RGB_MATRIX_ENABLE code in makefile * Revert build changes and change lib8tion b_m16_interleave constant to static commit 507805cd106ca5b5c739e08d37e9c689973b3b30 Author: Jeremy Bernhardt Date: Mon Apr 29 18:29:00 2019 -0600 [Keyboard] Fixing drag-and-drop (#5728) * Fixing drag-and-drop * Forgot to rtfm and do a full build. Added colemak * What commit e77e46f4bf049c33bcb982325bf5e5bf27994550 Author: David Dai Date: Mon Apr 29 17:27:49 2019 -0700 [Keyboard] Adding ortho_4x12 & planck_mit layouts for KBD4X (#5729) * Adding ortho_4x12 & planck_mit layouts for KBD4X. * Adding LAYOUT_kc_ortho_4x12 macro to KBD4x. * Turn off console for KBD4X so firmware size falls within limit. commit 1f0a2d555044e0979c58d4993b4383afa61e7669 Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon Apr 29 17:23:02 2019 -0700 [Keyboard] Minor fixes for Baguette (#5737) * Fix Baguette ISO layout in QMK Configurator Corrected the position of the ISO Enter key. * Fix readme markdown Was missing a line break. commit a7113c8ed090d0ac647f30ee9b8ef41252e568ed Author: XScorpion2 Date: Tue Apr 30 00:18:50 2019 +0200 Updated rgb_led struct field modifier to flags (#5619) Updated effects to test led flags Updated massdrop to use new flags field for led toggle commit 1d784f0f9575b70e35c9c8338b0ff80dc7316d7e Author: Daniel Prilik Date: Mon Apr 29 17:48:41 2019 -0400 RGB Matrix: Custom effects on a kb/user level (#5338) * Revamped custom effects approach See docs for example usage * push-up RGB Matrix default mode Override default effect using RGB_MATRIX_STARTUP_MODE. Useful on boards without EEPROM support (*cough* Massdrop ALT/CTRL *cough*) * update docs commit e337bb82a3b418dfd6c60b8c615322c854e5995d Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon Apr 29 11:04:56 2019 -0700 Fix Planck and Preonic builds (#5658) * Planck: Copy contents of Planck rules.mk to each revision * Planck: Delete Planck rules.mk * Planck: Concatenate duplicate rules Concatenate rules that are set and then overridden into one setting. * Preonic: Copy contents of Preonic rules.mk to each revision * Preonic: Delete Preonic rules.mk * Preonic: Concatenate duplicate rules Concatenate rules that are set and then overridden into one setting. * Planck: Delete non-specific Bootloader settings from revs. 1 and 2 Deleted BOOTLOADER setting code block, as the checks were only valid for revs. 3-5 and the Planck Light. Neither Planck rev1 or rev2 set the bootloader via rules.mk, so there's no setting of BOOTLOADER in their rules.mk files. * Preonic: Fix BOOTLOADER settings code blocks * Preonic: delete extra blank lines from rules.mk files * Preonic: delete AVR-type hardware config blocks from rev3 * Update Planck and Preonic readme files - update Hardware Supported - update/add Install Examples - update Docs paragraph * Enable Bootmagic Lite where it is disabled Enabled Bootmagic Lite for: - Planck Light - Planck revs. 1-5 - Preonic revs. 1 and 2 * Remove `planck_grid` from LAYOUTS rule for all Planck revisions Community has landed on `ortho_4x12`, which is already set; `planck_grid` is redundant. commit 6806398246c7201b84c3af508aa09b6735973d11 Author: loChris <44450518+loChris@users.noreply.github.com> Date: Mon Apr 29 12:34:43 2019 -0400 [Keymap] dz60 keymap w/ hhkb-esque default layer (#5708) * hello world * Update keyboards/dz60/keymaps/zepol_layout/keymap.c Co-Authored-By: loChris <44450518+loChris@users.noreply.github.com> commit 36e950a13fb0368a89c644fdfb28263326018cdd Author: Priyadi Iman Nurcahyo Date: Mon Apr 29 23:33:13 2019 +0700 [Keymap] Added compatibility for Planck rev6 (#5706) * Update code for compatibility with latest QMK * Added compatibility with Planck rev6 * use wait_ms instead of _delay_ms * removed unnecessary rules * disable audio on rev4 only commit b23c3b0fd61c311b429fb1b3391248bf9df2e25d Author: Andrew Kannan Date: Sat Apr 27 23:35:31 2019 -0400 [Keyboard] Satisfaction75 i2c fix and VIA layout (#5726) commit 53c51f1d16b40fdd3e68a6afc5844917d3d58640 Author: fauxpark Date: Sun Apr 28 09:42:16 2019 +1000 A better new_project.sh (#5191) * A better new_project.sh * Fix docstrings * Use single quotes for anything not shown to user * Missed this docstring * Simplify get_git_username() Thanks @vomindoraan * chmod +x * Add docstring for print_error() * Break up git username call into multiple lines * Use with statement here * Conform to PEP 8 even more * Turn it back into a shell script * chmod +x again * Update docs to reflect new keyboard generator usage * Tweak wording slightly * Trim trailing whitespace * Don't actually need to escape the newlines here * As I suspected, you can pass shift a number * Prepend ./ to match the other code block * Minor syntax tweaks * The username token has changed * Replace name in the readme too * Make some reasonable assumptions about the presence of Git commit c3be0520c4c6d4799670ab3639a3de561b4c6c1d Author: fauxpark Date: Sun Apr 28 04:04:28 2019 +1000 Fix sendstring "#" producing "£" instead (#5724) commit 0250cad4208e0d2679fb49afc4d0b97e819eb29f Author: Wilba Date: Sun Apr 28 04:03:36 2019 +1000 [Keyboard] Added WT69-A PCB (#5721) * Added WT69-A * Tweaked some things before PR * Update keyboards/wilba_tech/wt69_a/info.json Co-Authored-By: Wilba6582 * Update keyboards/wilba_tech/wt69_a/readme.md Co-Authored-By: Wilba6582 * Update keyboards/wilba_tech/wt69_a/wt69_a.h Co-Authored-By: Wilba6582 * Update keyboards/wilba_tech/wt69_a/readme.md Co-Authored-By: Wilba6582 * PR fixes * Fixed readme.md * Fixed keymaps commit 27cff473e0a584ea0c9b70ae58127545ddc41475 Author: Jonathan Rascher Date: Sat Apr 27 13:01:39 2019 -0500 [Keymap] Fix typo and function layer image for Quefrency (#5719) commit e2d141582c367e0865abf19700eb50361b9fc2c0 Author: Jonathan Rascher Date: Sat Apr 27 01:55:58 2019 -0500 [Keymap] Initial keyboard layout for KBD67 (#5720) commit 777e8be80aac3f2b1bd3910c401c6504a4f07692 Author: Jonathan Rascher Date: Fri Apr 26 22:48:26 2019 -0500 [Keymap] New keymap for Quefrency 65% with split backspace, RGB, media keys, mouse keys (#5717) * Add initial keyboard layout for Quefrency * Add RGB config and keybindings for Quefrency * Move Quefrency wheel keys to more convenient place * Actually switch from serial to I2C Commit 64708c6 updated the comment, not the #define. D'oh! commit 8faee5c9f67e9a5389754f90ded6983e669aae15 Author: Drashna Jaelre Date: Fri Apr 26 17:24:00 2019 -0700 [Keyboard] Update Gergo to use newer Ergodox Matrix code (#5703) * [Keyboard] Update Gergo to use newer Ergodox Matrix code And update layout macros to be correct * Almost forgot the json file * Remove board specific defines for i2c timeout commit ffd10d41168a7bf3eb2631490c61fb7a552fa6a6 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri Apr 26 11:21:40 2019 -0700 [Keyboard] Eagle/Viper V2 Cleanups (#5709) * cleanup matrix of unused row and column, and add more documentation * update matrix notes * update readmes * update readmes * fix comments E2 to E3 commit 90cd383d4622b7d4603e05ad101916df47775d7c Author: Drashna Jaelre Date: Fri Apr 26 11:03:51 2019 -0700 Fix wakeup function on ChibiOS (#5707) Somebody was a very, very bad boy, and did a poor job of copy-pasting commit 6caaf69357504299cc8c8f44414581d87fbec0b4 Author: jotix <47826561+jotix@users.noreply.github.com> Date: Fri Apr 26 15:02:19 2019 -0300 jotix ortho_4x12 keymap tweakings (#5715) commit f0599542eae4e2a7423d4a3786e15a0b6664021d Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri Apr 26 06:55:27 2019 -0700 QMK Configurator support for the emptystring studio NQG (#5711) * NQG Configurator support * Fix line break in readme file commit 5c302fad215f4488e6f4f0bb5d7088f573fe0d56 Author: moyi4681 Date: Fri Apr 26 21:54:44 2019 +0800 Update rules.mk (#5710) commit 4322c7177168c6622a891bfb14ad4c969e3f8be9 Author: kit-bto <42862131+kit-bto@users.noreply.github.com> Date: Fri Apr 26 15:11:21 2019 +0900 [Keyboard] Add a new keyboard ADKB96 (#5685) * New Keyboard ADKB96 http://bit-trade-one.co.jp/selfmadekb/adkb96/ * New Keyboard ADKB96 http://bit-trade-one.co.jp/selfmadekb/adkb96/ * Update Readme.md * Update Readme.md * Update Readme.md * Update Readme.md * Update Readme.md * Update Readme.md * Update Readme.md * Rename Readme.md to readme.md * Update keyboards/adkb96/adkb96.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update readme.md * Update readme.md * Update keyboards/adkb96/adkb96.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update keyboards/adkb96/adkb96.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update keyboards/adkb96/config.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update keyboards/adkb96/config.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update keyboards/adkb96/config.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update keymap.c * Update keyboards/adkb96/rev1/config.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update keyboards/adkb96/rev1/config.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update config.h * Update keyboards/adkb96/rev1/config.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update keyboards/adkb96/rev1/rev1.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update keyboards/adkb96/rev1/rev1.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update keyboards/adkb96/rev1/rev1.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update rules.mk * Delete rules.mk * Update rules.mk * Update keyboards/adkb96/rules.mk Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update keyboards/adkb96/rules.mk Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update keyboards/adkb96/rev1/config.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update config.h * Update rules.mk * Update config.h * Delete i2c.c * Delete i2c.h * Delete matrix.c * Delete serial.c * Delete serial.h * Delete split_util.c * Delete split_util.h * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Update rev1.c * Update keyboards/adkb96/rev1/config.h Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update keyboards/adkb96/rules.mk Co-Authored-By: kit-bto <42862131+kit-bto@users.noreply.github.com> * Update rev1.h commit 9c98fef4f6d35d9e07865b119550f6e7e9e6610d Author: skullY Date: Thu Apr 25 10:29:12 2019 -0700 test commit commit 9f8c8c53a51ec6bb8acd55683b1d024558b071ab Author: mtei <2170248+mtei@users.noreply.github.com> Date: Wed Apr 24 02:43:44 2019 +0900 add RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; to rgblight_update_dword() commit 5312131d35ee389231bfc596625ac5915264cc16 Author: mtei <2170248+mtei@users.noreply.github.com> Date: Wed Apr 24 02:38:54 2019 +0900 add RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; to eeconfig_update_rgblight_default() commit e6f4173aecaedabe3b2550340321520f45227c7f Author: zvecr Date: Wed Apr 24 19:13:07 2019 +0100 Refactor cospad to current standards and enable support for backlight keycodes (#5582) commit eda924d7dc71bd5bc229cc64dcd89a8703ed8582 Author: Callum Oakley Date: Wed Apr 24 03:31:42 2019 +0100 [Keymap] update (mouse emulation, rev 6 compatibility) (#5696) * mess with mouse emulation some more * reverse scrolling * mouse speed 20 * ndash and £ on symbol layer * rev6 compatibility commit dafdb5f9aee5444691c09388575b23b76bb49cb0 Author: Bob Date: Tue Apr 23 22:29:54 2019 -0400 [Keyboard] fix project zen rev1 bootloader declaration (#5695) commit 479baf98e093b83339c9c1a628d9d25d3d0ab034 Author: Rockman18 Date: Wed Apr 24 04:27:29 2019 +0200 [FIX] Misspelled RGB_YELLOW (#5692) commit 978074e4170c254a6f2cd684c9f695024a5a3e0b Author: Jan Christoph Ebersbach Date: Wed Apr 24 04:26:49 2019 +0200 [Keymap] Fix broken Shift-Insert binding (#5689) commit 703699b81fa499072c17fd63795444e6ef1bfe40 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue Apr 23 19:11:18 2019 -0700 [Keyboard] forgot to omit k05 from the electrical matrix in hhkb layout (#5684) commit d4a5402aeb856bba25943e954585d56cf7230910 Author: Florian Didron Date: Wed Apr 24 11:10:28 2019 +0900 [Keyboard] Fix red an green leds location (#5698) commit 7ae2ded5901bedf2014e254db2b5292cdb72ffe4 Author: ymzcdg <49898694+ymzcdg@users.noreply.github.com> Date: Wed Apr 24 03:37:20 2019 +0800 Translate docs into Chinese (#5693) * Docs translate Translate some docs to Standard Chinese for Chinese Developers. * fix translate fix translate commit d48a5b29d764ee6ac925daf2500bb6101e8b23ca Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon Apr 22 21:52:05 2019 -0700 [Keymap] Fix my userspace RGB bug (#5686) * fix bug that enabled RGBLIGHT_ENABLE on all my boards regardless if it was supported or not * update changelog with new changes for 0.2.2 commit ce8fb1eab923a8ce37022a898597048e5893b078 Author: ishtob Date: Mon Apr 22 23:26:51 2019 -0400 Boston meetup 2019 (#5611) * Add boston_meetup folder for community meetup macropads * Modify OLED indicators to match macropad * PR cleanup * Spelling fix Co-Authored-By: ishtob * convert custom matrix to standard matrix defines * refactor layer define with enum * Remove un-used files * remove "\" in keymap commit a2cec0594b15dc667adf7f1b0e35cb698dc1758d Author: Drashna Jaelre Date: Mon Apr 22 11:55:55 2019 -0700 [Keymap] Update to Drashna Keymaps (#5594) * Start to standardize macro timer * Update Fractal layout Specifically, limit the RGB Lighting, since it's too many for the power, and only have the KITT annimation on the front * Update Iris keymap to use I2C for transport * Remove TAP_CODE_DELAY from keyboard in favor of global setting * Remove Woodpad Since it\'s no longer in my possession * Only enable LTO on AVR boards * Run matrix_scans while doing startup light * Run matrix_scan to get split keyboard code synced properly * Fix rgb mode * Remove custom debouncing settings * Make RGB Light Startup Animation optional * Fix opt def * Remove extra tap code delay value * Fix references to keebio boards * Add support for LP Iris keyboard * Add backlight code * Make startup animation optional * Update gitlab ci script * Remove port declaration * Revert avrgcc changes to gitlab ci file * Don't re-set mods * Remove MACRO_TIMER define * Add custom name for crkbd * Add name for Prime M pad * Add names for ortho 4x12 boards * Add some additional handling for rgb init * Change thumb clusters on ergodox * Switch Orthodox to I2C * Fix Space in ergodox keymap * Use OSL for ergodox layout * Ugh, can't find a good layout * Fix typo * Fix up animation startup * Cries in AVR * Fix makefiles for ergodox ez boards * Add support for "secret songs" in my userspace * Reset debounce to 5ms for Ergodox EZ * Fix gitlab CI yaml file * More crying in AVR * Cannot use rgb light and rgb matrix at the same time due to the WS2812 rgb matrix PR until the "Coexistance" PR is merged * Update ODox for split common and i2c * Add split config * Impement Split code * Add support for xscorpion OLED code * Add OLED display config * Fix OLED screen font * Get OLED set up in vertical mode * Remove old OLED code * add per key support for crkbd * Fix split changes * RGB Tweeaks * More OLED tweaks * Fix rotation stuff * Fix more OLED stuff * Remove custom Debounce from Ergodox layout since it's no longer needed commit 6d73fe12779d6e8527d404572810ea95e714dce7 Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue Apr 23 03:20:13 2019 +0900 fix LIB_SRC and QUANTUM_LIB_SRC for ARM (#5623) * fix LIB_SRC and QUANTUM_LIB_SRC for ARM(chibios) * remove ARFLAGS * tmk_core/arm_atsam.mk:AR: remove 'rcs' commit bb52119a6dfe9c6f0314d1bcd948efda59626a70 Author: M-AS Date: Mon Apr 22 11:37:40 2019 -0400 RGB Matrix Animations: Three/six new reactive effects (wide, cross, nexus) (#5602) * added 3 new RGB_Matrix effects * made cross effect behavior smoother * removed dead code * added effect descriptions commit b61baf4281bde34bfe28aaa1109bd5d5c6471116 Author: Brice Figureau Date: Mon Apr 22 11:34:13 2019 -0400 Fix #3566 use an hardware timer for software PWM stability (#3615) With my XD60, I noticed that when typing the backlight was flickering. The XD60 doesn't have the backlight wired to a hardware PWM pin. I assumed it was a timing issue in the matrix scan that made the PWM lit the LED a bit too longer. I verified it because the more keys that were pressed, the more lighting I observed. This patch makes the software PWM be called during CPU interruptions. It works almost like the hardware PWM, except instead of using the CPU waveform generation, the CPU will fire interruption when the LEDs need be turned on or off. Using the same timer system as for hardware PWM, when the counter will reach OCRxx (the current backlight level), an Output Compare match interrupt will be fired and we'll turn the LEDs off. When the counter reaches its maximum value, an overflow interrupt will be triggered in which we turn the LEDs on. This way we replicate the hardware backlight PWM duty cycle. This gives a better time stability of the PWM computation than pure software PWM, leading to a flicker free backlight. Since this is reusing the hardware PWM code, software PWM also supports backlight breathing. Note that if timer1 is used for audio, backlight will use timer3, and if timer3 is used for audio backlight will use timer1. If both timers are used for audio, then this feature is disabled and we revert to the matrix scan based PWM computation. Signed-off-by: Brice Figureau commit c28a4321123131b6ff1e6c6b302fba764255623b Author: Harshit Goel Date: Mon Apr 22 20:58:17 2019 +0530 added info.json for ymd96 (#4982) * added info.json for ymd96 * fix layout for keymap_custom macrom, correct info.json for default layout * add info layout for iso * add info layout for iso * align layout name, added maintainer username * layout case fix * layout case fix * fix overlapping keys * match layouts to keymaps. commit 066818f5f9cbee4ade1ea94ee167ee2df7d9e559 Author: Erovia Date: Mon Apr 22 17:26:41 2019 +0200 Define RGB colors (#5300) * Define RGB colors Define RGB colors and pass them to the rgblight functions, instead of defining multiple macros. * Add new color definitions support for RGB Matrix * Add/clarify info about new color definitions in Docs * Add deprecation warning banner to rgblight_list.h commit c7583d181a2cae24af60efa93caa3d662e5d48f4 Author: Drashna Jaelre Date: Mon Apr 22 08:25:21 2019 -0700 Update handwired/frenchdev keyboard (#5443) commit 76e78e8ca1a348e85b3e8f351fcb42d94a3634a4 Author: Jason Koh Date: Tue Apr 23 01:15:56 2019 +1000 Atreus rules.mk and readme (#5678) * Update rules and readme to reflect new make usage. * Minor edit. * Minor edit. commit 4ecaa25f3e9ae1bd1b61bab52f6a46cbaf512ae8 Author: XScorpion2 Date: Mon Apr 22 10:14:57 2019 -0500 forgot to update the define usage when 90 degree rotation was moved to a runtime switch (#5676) commit 81d8e6ef3e4d69dba8e9ba40db525ab4181ab3e3 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun Apr 21 19:59:39 2019 -0700 [Keyboard] Doro67 RGB PCB (#5677) * initial commit * get rid of some of the vanilla code * set up matrix and pins * Create LAYOUT macro and an appropriate keymap * support for caps lock LED * add some documentation to the doro67 parent readme * align the language used in the several readme files * initial commit * get rid of some of the vanilla code * set up matrix and pins * Create LAYOUT macro and an appropriate keymap * support for caps lock LED * add some documentation to the doro67 parent readme * align the language used in the several readme files * Use RGB Matrix and fix enter key bug * fix formatting * remove merge conflict artifacts * make a more useful default keymap * add configurator support for the RGB pcb * fix rgb matrix based on new info. Multipler should be reversed * forgot to actually set the pin output for caps lock led * fix offset keys in layer 1 keymap * code cleanup * use macros for the rgb_led calculations struct * set RGB led num to 67 as I mistakenly counted the caps lock led * cleanup config.h file * add RGB note in readme * get consistent naming in config file * fix some inconsistencies * readjust matrix and get rid of macros based on drashna's suggestions commit 98f7af6d3b0e8f1b9d2926de1a10f60661769cc0 Author: George Petri Date: Sun Apr 21 19:43:23 2019 +0300 [Keymap] Add keymap for keebio/quefrency 65% version (#5666) * add keymap * fix readme title * renamed README.md to lowercase, fix typo * renamed README.md to lowercase, for real * add double spaces for github * lowercase name in readme * rename directory to lowercase commit 50e0bdab0012c96736f2a9fe7ef88802c6839e20 Author: moyi4681 Date: Mon Apr 22 00:33:36 2019 +0800 [Keyboard] dz60rgb: update default keymap (#5661) * Update keymap.c * Update config.h * Update dz60rgb.c * Update keymap.c commit e2843c25ceb35ab8c1e22ec16605ee6a854b59d9 Author: Rys Sommefeldt Date: Sun Apr 21 17:15:19 2019 +0100 [Keymap] Shuffle FL1 some more to match keycap legends (#5673) commit b27ddf1edbc5baa317507d7c91054abd2e14de8a Author: XScorpion2 Date: Sun Apr 21 11:13:44 2019 -0500 [Keyboard] Updated rules.mk for Sol to use the correct feature flag (#5672) commit 829ccd3491ca43be79e110b12bdabe96d6e76b0f Author: XScorpion2 Date: Sat Apr 20 20:21:22 2019 -0500 RGB Matrix docs update from mechmerlin discussion (#5667) * RGB Matrix docs update from mechmerlin discussion * alignment * Apply suggestions from code review Co-Authored-By: XScorpion2 commit ff9cd1dd0c2cc3be2a25b388eab183f6ff20b5b6 Author: William Chang Date: Sat Apr 20 17:38:33 2019 -0700 Added keymap/userspace for dz60 build 4 with readme (#5668) * Initial commit * Modified keymap and updated readme. * fixed numbering in readme * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Made requested changes in PR. * Rename README.md to readme.md commit d3268280ef7077ec1c800d30b8e98f1976192a14 Author: Ryan Caltabiano Date: Fri Apr 19 17:27:11 2019 -0500 Removed / replaced questionable logos and added licenses file for safe logos commit 33e27b2a830dc5d24a6f93c95f8fced8bb9ae80f Author: Ryan Caltabiano Date: Fri Apr 19 16:44:09 2019 -0500 Fixing readme from feedback commit dd3a813f871b911012da55a499955307c309a7a5 Author: Ryan Caltabiano Date: Tue Apr 16 18:36:55 2019 -0500 Reducing size of data send in one frame & update Zen rev2 oled usage commit 0a645225b9c863a106921185a6c2e0c340f10694 Author: Ryan Caltabiano Date: Mon Apr 15 22:32:57 2019 -0500 OLED Driver Feature commit b5cb5ec6ddb15cfe336b835055f546f72d440a66 Author: zvecr Date: Sat Apr 20 16:02:59 2019 +0100 Fix koyu readme encoding (#5655) commit a1f251405183c39ade3b149a906b2b85162174ab Author: Jan Christoph Ebersbach Date: Sat Apr 20 08:37:19 2019 +0200 [Keyboard] Layout and configuration updates for Signum 3.0 (#5652) * Make Signum 3.0 compatible with default ortho_4x12 layout * Disable unicode map by default * Add missing backspace key * Add missing delete key * Fix broken gui right command * Move MO5 to a different key an add Esc to L4 * Move MO5 to a different key * Add Del and Bspace to layer 4 commit ed74bd95f641754d3f9a2949fc333590522210aa Author: Rys Sommefeldt Date: Sat Apr 20 07:35:46 2019 +0100 [Keymap] Make the layout friendlier for use with the iPad (#5654) * Make the layout more similar to Apple keyboards to make it friendlier for using with an iPad * Fix config.h pragma, plus second layer mistakes commit edcedd53d1bfb761cca37553729ad881f2a738e6 Author: zvecr Date: Sat Apr 20 07:34:13 2019 +0100 [Keyboard] Add LAYOUT macro and Configurator config (#5656) commit 8170be5b10e92a4f4a8c23ad0c9dd558c4fc90c7 Author: Len Trigg Date: Sat Apr 20 18:33:07 2019 +1200 [Keyboard] crkbd: compile time hand-dependent rgb_matrix LED declarations (#5657) Set RGB_MATRIX_SPLIT_RIGHT=yes when flashing the right hand side of the keyboard. commit 4856552f8bf3d50a95396fc76e26669ed6f3d8b4 Author: Markus Weimar Date: Sat Apr 20 08:18:06 2019 +0200 Update mouse keys docs (#5653) commit 7e67bd791b1804e1e362d8c1e90232440c274cee Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat Apr 20 07:25:08 2019 +0900 Change split_common to use RGBLIGHT_SPLIT (#5509) * add I2C_slave_buffer_t to quantum/split_common/transport.c Improvements to ease the maintenance of the I2C slave buffer layout. And this commit does not change the compilation results. * add temporary pdhelix(Patched Helix) code * temporary cherry-pick from #5020 add new version(#5020) quantum/rgblight.[ch], quantum/rgblight_modes.h * add post_config.h support to build_keyboard.mk * add quantum/rgblight_post_config.h, quantum/split_common/post_config.h Add quantum/rgblight_post_config.h and quantum/split_common/post_config.h using POST_CONFIG_H variable of build_keyboard.mk. quantum/rgblight_post_config.h additionally defines RGBLIGHT_SPLIT if RGBLED_SPIT is defined. quantum/split_common/post_config.h defines RGBLIGHT_SPLIT additionally when master-slave communication is I2C. * Change split_common's transport.c I2C to use the synchronization feature of rgblight.c * Change split_common's transport.c serial to use the synchronization feature of rgblight.c * test RGBLIGHT_SPLIT on keyboards/handwired/pdhelix * Test End Revert "test RGBLIGHT_SPLIT on keyboards/handwired/pdhelix" This reverts commit 80118a6bbd3d9fc4c7797fef0c34bc67aa73aa98. [x] make RGBLIGHT_TEST=1 handwired/pdhelix/i2c:default [x] make RGBLIGHT_TEST=2 handwired/pdhelix/i2c:default (same RGBLIGHT_TEST=3) [x] make RGBLIGHT_TEST=3 handwired/pdhelix/i2c:default [x] make RGBLIGHT_TEST=1 handwired/pdhelix/pd2:default [x] make RGBLIGHT_TEST=2 handwired/pdhelix/pd2:default [x] make RGBLIGHT_TEST=3 handwired/pdhelix/pd2:default [x] make RGBLIGHT_TEST=1 handwired/pdhelix/pd2_2oled:default [x] make RGBLIGHT_TEST=2 handwired/pdhelix/pd2_2oled:default [x] make RGBLIGHT_TEST=3 handwired/pdhelix/pd2_2oled:default * Test End, Revert "temporary cherry-pick from #5020" This reverts commit d35069f68bda0c50370442a5c7aae60c2f4ce5c0. * Test End, Revert "add temporary pdhelix(Patched Helix) code" This reverts commit aebddfc1a879796afae297ef0723a4fe73af3660. * temporarily cherry-pick from #5020 to see if it passes the travis-ci test. add new version(#5020) quantum/rgblight.[ch], quantum/rgblight_modes.h * Passed the travis-ci test. Revert "temporarily cherry-pick from #5020 to see if it passes the travis-ci test." This reverts commit 647c0a9755eb6a05f76d09b2d59bce67b85a841f. * update docs/config_options.md * update split_common/transport.c, improves maintainability of serial transaction IDs. No change in build result. * temporary cherry-pick from #5020 * fix build fail keebio/iris/rev3:default * fix build fail lets_split_eh/eh:default * Revert "temporary cherry-pick from #5020" This reverts commit be48ca1b4515366a097af8dd1cd7b28b7ee09947. * temporary cherry-pick from #5020 (0.6.336) * Revert "temporary cherry-pick from #5020 (0.6.336)" This reverts commit 978d26a8b3cf0acc485838a7d76d6128b77c630c. * temporary cherry-pick from #5020 (0.6.336) commit dfab177f889fd6701e5f898c869be1bf3a2d0ef9 Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat Apr 20 07:05:51 2019 +0900 Add function to support split-keyboard in rgblight.[ch]. (#5020) * add temporary file that is rgblight.c call graph * add rgblight_update_hook() * update rgblight-call-graph.dot (temporary file) * add more hook point * add TODO comment * temporary Revert "add TODO comment" This reverts commit df6165aac9b3a31d1d3e31ce52aadc134b84eac2. * temporary Revert "add more hook point" This reverts commit 64592b06f3bcdaac47c59f922018a273bef76776. * temporary Revert "add rgblight_update_hook()" This reverts commit 432b74c912ed4333e6633e20a1bcda10c6a10eaf. * add rgblight_update_hook() * add more hook point * add TODO comment * implement rgblight_update_hook() * remove rgblight_update_hook(), add RGBLIGHT_SPLIT_SET_CHANGE_XXXX rgblight_update_hook() is too large. change to simple flag setting. * shrink rgblight_config_t * implement rgblight_update_sync() Note: The animation synchronization process has not been implemented yet. * update quantum/rgblight-call-graph.dot (temporary file) * rmove quantum/rgblight-call-graph.dot (temporary file) * update rgblight.c * Add temporary code to Helix keyboard 'five_rows' keymap to test rgblight.c . * fix build break rgblight_update_sync() when all animation off * fix quantum/rgblight.c:rgblight_disable_XX() add RGBLIGHT_SPLIT_SET_CHANGE_MODE * quantum/rgblight.c change code order: move rgblight_update_sync() * add mode_base_table[] to quantum/rgblight.c * quantum/rgblight.c use mode_base_table[] and rgblight_status.base_mode * quantum/rgblkght.c animation timer integration * quantum/rgblkght.c add animation sync for split keyboard * fix mode_base_table[] and snake effect * fix build break keyboards/mxss. keyboards/mxss's local rgblight.c need old version rgblight.h * rgblight.c: fix animation sync * quantum/rgblight.c: fix snake effect sync * quantum/rgblight.c: animation sync interverl 30 sec * quantum/rgblight.c: fix rgblight_effect_rainbow_swirl() and rgblight_effect_knight() * quantum/rgblight.c: add macro RGBLIGHT_SPLIT_ANIMATION * cherry-pick from 'rgblight_modes.h sample implementation' * fix RGBLIGHT_SPLIT_ANIMATION check position * Update temporary code in Helix keyboard 'five_rows' keymap to test rgblight.c * Reduce the firmware size by 1500 bytes when rgblight_effect_breathing() is enabled. * Changed to rgblight_sethsv_eeprom_helper() for easier reading. * add fail-safe code to quantum/rgblight.c:rgblight_task(),rgblight_timer_enable() * remove temporary code in Helix keyboard 'five_rows' keymap * quantum/rgblight.c: add split-keyboard master side sync functions add functions: uint8_t rgblight_get_change_flags(void); void rgblight_clear_change_flags(void); void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo); change function: void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom); * Change rgblight_update_sync() to use write_to_eeprom. * remove TODO comment from quantum/rgblight.h * Revert "fix build break keyboards/mxss." This reverts commit 90b9a1aa7d8af226751500e49e3ea0214cc4e024. (Separated this change into the newly opened PR #5461.) * Revert "Reduce the firmware size by 1500 bytes when rgblight_effect_breathing() is enabled." This reverts commit b61004e63e82cf5334cee4def4ba10cffa88885f. * update quantum/rgblight.c: Code size reduction when not using RGBLIGHT_SPLIT. * Add temporary code to Helix keyboard 'five_rows' keymap to test rgblight.c . * add temporary pdhelix(Patched Helix) code * Add temporary code to split_common/transport.c to test rgblight.c. * Finish testing rgblight.c with helix keyboard. Revert "Add temporary code to Helix keyboard 'five_rows' keymap to test rgblight.c ." This reverts commit 0bf81a4723a977adc0cb09b4272ee5c9b4f2bbbb. * Finish testing rgblight.c with quantum/split_common code. Revert "Add temporary code to split_common/transport.c to test rgblight.c." This reverts commit 71db3e24eef40d4c455fb9fd1664e4487c9d927a. * remove temporary pdhelix(Patched Helix) code This reverts commit 5287e51a394741bcb6028c7cfc0dd0c984645f76. * Added description of RGBLIGHT_SPLIT macro to docs/feature_rgblight.md. * add RGBLIGHT_SPLIT_SET_CHANGE_HSVS to rgblight_init() * Changed to restart animation only when changing mode. When changing hue, sat and val, the animation is not restarted and continues. commit dd64a4e73868027b44a018278039cc42a01e730b Author: Drashna Jaelre Date: Mon Mar 4 22:10:13 2019 -0800 Init RGB Matrix EEPROM I'm not sure how to check if it's the same as RGBLIGHT's EEPROM, but if you don't init it, it **will not** work properly until it is initialized. commit 1ef01ba4c695f2047415df3514e4e5edfaf2bc60 Author: mechmerlin Date: Sat Mar 23 00:08:33 2019 -0700 add -yq flags to actually make it noninteractive commit 746058306b6c3b037fc560a13bb78d088c734401 Author: Danny Nguyen Date: Wed Mar 20 17:45:45 2019 -0400 Make sure NOBITS is set on reset_key Patch from https://github.com/qmk/qmk_firmware/issues/3657#issuecomment-415147411 Long story short, in avr-gcc pre-8.2, reset_key was assigned to a memory area that was in a normal range, but when 8.2 came out, that memory got moved to an out of range area, causing errors like 0x800293 out of range. Apparently, this was fixed up in avr-gcc, but we haven't seen a release with the fix yet (we expected it in 8.3, but that didn't happen for some reason). What this commit does is move the reset_key back to the original memory location it was in before. commit 50fce7f255fa39c90239c6406f9c6b3ca2050114 Author: zvecr Date: Fri Apr 19 21:20:02 2019 +0100 Travis CI - skip unit tests for documentation changes (#5267) * Add script to skip tests on non master branches with only docs changes * Review comments - Use 'grep -c' instead of 'wc -l' commit b60413af60896a7b9d344f9f3dc61904015cb7ca Author: Mike Roberts Date: Fri Apr 19 16:07:35 2019 -0400 Use auto output for Adafruit BLE (#4131) * use auto for adafruit ble * spacing * switch ifdef name commit 55ace26a5dc3650f596a88e776e040c7ec0b92e8 Author: Jack Humbert Date: Fri Apr 19 16:05:31 2019 -0400 Remove default folders for the Planck & Preonic (#3497) * remove planck default folder * Update rules.mk commit 5539d7affb52f467b41eb9245045ee4768a6b391 Author: Jeff Hastings Date: Fri Apr 19 13:43:15 2019 -0400 [Keyboard] Update 1upkeyboards/super16 with code from vendor (#5645) * readme formatting * cleanup rules.mk * update config.h * add numpad layout * Update default keymap * cleanup rules * disable console and commands to fit the bootloader * cleanup whitespace * revert readme changes * revert changes to config.h * remove unused keycodes * add LAYOUTS to rules.mk * remove redundant config setting Co-Authored-By: jeffmhastings commit 7fa854729c4391e5ae3b09e134eccd73f1307ac1 Author: Salt-Peanuts Date: Fri Apr 19 12:23:11 2019 -0400 [Keymap] Added personal keymap to BFO-9000; cleaned up personal files in Kinesis and Rorschach (#5638) * Added personal keymap to BFO-9000; cleaned up personal Kinesis and Rorschach files Added personal keymap to BFO-9000; cleaned up personal Kinesis and Rorschach files * Update keymap.c * Update keymap.c * Update keymap.c * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Update readme.md * Update readme.md commit 5ed7d9c9ca48e1b6f3610f62bb12668d1f75a845 Author: Markus Weimar Date: Fri Apr 19 16:27:23 2019 +0200 Update XD75 keymap by markus (#5651) commit e3a940026ead4a3b4d0a9f536bd4cc5153e4140b Author: Markus Weimar Date: Wed Oct 17 10:40:52 2018 +0200 Improve mouse keys docs and constant speed mode commit 74af596d8ac0e1ee5f308f520b22831ca32f0339 Author: XScorpion2 Date: Thu Apr 18 23:58:38 2019 -0500 [Keyboard] niu_mini reduce firmware size (#5648) * Reducing firmware size by removing audio for keymaps that are not using it. * Update rules.mk commit 8aee82e8b4d8108d8a9a56f8fd61ae1281ee4165 Author: shela Date: Fri Apr 19 09:41:01 2019 +0900 [Keymap] Fix compilation error of feature #4301 (#5649) commit dd290085c9e9c7d87fed64170407ca4cdc3c7433 Author: QMK Bot Date: Thu Apr 18 23:23:52 2019 +0000 convert to unix line-endings [skip ci] commit 068571b9febb46edb64663bf6e84ae821a8219a3 Author: skullydazed Date: Thu Apr 18 15:59:51 2019 -0700 Update our style guide (#5500) * Update our style guide * Clarify muiltple condition ifs * update the ifdef section commit 7a1086e4057a64f841ba178aa9eebb0002722ae2 Author: Alex Ong Date: Fri Apr 19 05:20:57 2019 +1000 [core] Fix for eager_pr #5643 Added extra transfer_matrix_values() call whenever counters don't need updating commit 9e3b38425feedbe8d95c6cb738d713cc6e15af56 Author: YouCanFly <65446+YCF@users.noreply.github.com> Date: Thu Apr 18 17:37:26 2019 -0500 [Keyboard] Update Tetris (#5513) * Update Tetris Add a fake row to config the encoder's keycode easily. * Delete rules.mk * Update keyboards/tetris/readme.md Co-Authored-By: YCF <65446+YCF@users.noreply.github.com> * Update config.h add #define RGBLIGHT_SLEEP commit a58c66df88d1da9c57e5e4ccffb78c7882b55706 Author: Drashna Jaelre Date: Thu Apr 18 14:02:32 2019 -0700 Reduce CRKBD firmware size by reducing layer numbers (#5471) * Reduce CRKBD firmware size by reducing layer numbers * Update layer output code based on mtei's suggestion/code * Fix spacing * Revert "Update layer output code based on mtei's suggestion/code" This reverts commit 036d347db309170afd5676e694adfda69f912615. Unfortunately, because this is NOT in the keymap itself, the layer macros aren't accessible and will error on commit * Add comment for future person commit 162a1d39b6ece786d31b934db3fb1b5721c05568 Author: Øyvind Wilhelmsen <46304257+oeywil@users.noreply.github.com> Date: Thu Apr 18 22:27:05 2019 +0200 Update readme.md (#5647) commit 3542f594d9d6f81edf1de3ead435d19803d83092 Author: patrickmt <40182064+patrickmt@users.noreply.github.com> Date: Thu Apr 18 09:35:50 2019 -0400 Fix wake from suspend LED functionality When waking from suspend, only enable the LED drivers if they were not previously set to disabled by the user. This functionality was removed by the recent updates to adapt Massdrop keyboards to QMK RGB Matrix. Affects Massdrop CTRL and ALT keyboards compiled using Massdrop Configurator mode. commit 0511b522e00ec693214434806948ff2a6249f46f Merge: 8bdbac14a 34239edcb Author: Erez Zukerman Date: Wed Apr 17 21:53:07 2019 -0400 Merge pull request #5642 from fdidron/f/change-ergodoxez-debounce Change Ergodox EZ default debounce commit 34239edcb043fe03f8e547ea94bac7b8ff07657c Author: Florian Didron Date: Thu Apr 18 10:49:13 2019 +0900 Set default debounce to 5 commit 8bdbac14a36f8da5da3175006cff5eb3a3d60c1d Author: roguepullrequest Date: Wed Apr 17 20:39:50 2019 -0500 [Keymap] Roguepullrequest Planck layout update (#5640) * First publish of roguepullreqest programmer dvorak planck layout * Removed junk line * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Removed layer songs Removed layer songs for cleanliness. Will use them later. * Update keyboards/planck/keymaps/roguepullrequest/readme.md Co-Authored-By: roguepullrequest * Made basic LSHIFT framework but is not working. Listed other tapdances. * Got LSHIFT to work * Added working RSHIFT * Added working TD_S * Cleaned up LEFT and RIGHT [ { ] } on the UPPER layer. * Cleaned up layout. * Reenabled audio space is not needed right now. commit 01f4b67ef03e0fe403ae6a17defe23bed6ec6e55 Author: kingwangwong <31333140+kingwangwong@users.noreply.github.com> Date: Wed Apr 17 15:26:20 2019 -0500 [keymap] adding kingwangwong's keymaps (#5626) * Add files via upload * kingwangwong * kingwangwong * revisions and adding atom40 * revisions for 5626 * revisions for 5626 * revisions for 5626. * revisions for 5626, re added safe range * revisions for 5626, added qmkkeyboard * revisions for 5626, quefrency commit f05927a2f0d688f8c4e9496ba995c454511b1a97 Author: Øyvind Wilhelmsen <46304257+oeywil@users.noreply.github.com> Date: Wed Apr 17 20:07:19 2019 +0200 [Keymap] Update to oeywil's keymap (#5614) * Switched to grid, added leader key and space cadet shift * renamed layer, removed sound * fixed comment * added comment * Added tap dance * Added comments * removed useless sound * removed useless comments * removed useless cases * changed to register_code16 function * renamed variables * fixed typo * fixed indentation commit 4cd3afc7e95f8ae58b13be544310c44e1dd5a775 Author: Teodor Tomic Date: Wed Apr 17 15:37:40 2019 +0200 [keymap] TADA68 KBP-V60-like keymap (#5637) * [keymap] Added TADA68 KBParadise V60 like keymap * Remove extra define commit 86855f4417a3793b1e33a8288f2755b782ef3228 Author: Ryan Caltabiano Date: Thu Feb 28 21:20:26 2019 -0600 Xulkal Keymaps commit 416eb1dee7163ae7456e5b2288a2b67790b997c3 Author: marcoSchr <49691247+marcoSchr@users.noreply.github.com> Date: Wed Apr 17 00:57:24 2019 +0200 [Keyboard] Fix macro keycode for alpha keyboard (#5633) commit 0a6beab2243cd9183127041917bb4c3ce6a22bd9 Author: ishtob Date: Tue Apr 16 17:49:24 2019 -0400 [Keyboard] Hadron keymap and config updates (#5632) * update hadron keymaps, code cleanup * keymap update * refactor custom matrix to use quantum matrix defines * fix wrong pin for matrix commit 93b7fccad65aa4c12b37bc3d1a507ae909511587 Author: marcoSchr <49691247+marcoSchr@users.noreply.github.com> Date: Tue Apr 16 19:39:57 2019 +0200 [Keymap] Use Right Alt/Ctrl on right side of OK60 (#5630) * Use Right Alt/Ctrl on right side of OK60 * Update keyboards/ok60/keymaps/default/keymap.c Co-Authored-By: marcoSchr <49691247+marcoSchr@users.noreply.github.com> commit 565a7812ab734db7692d3b3480b456f5e7af0614 Author: Rob Rogers Date: Tue Apr 16 12:29:48 2019 -0500 [Keyboard] Crkbd RGB Matrix config with WS2812 (#5627) commit 838d09b0a9c78e7e57c9d01132154e78ebaaf560 Author: Iason Dimitrakopoulos Date: Tue Apr 16 20:28:29 2019 +0300 [Keymap] Bugfixes on tapdance logic and small changes in layout (#5622) * Add layer switcher functionality * Fixes in left/right bracket functions and other small fixes * used better KCs commit d0fb7005d51be7c876e63e87778d080c8a733a13 Author: Alex Ong Date: Tue Apr 16 05:58:03 2019 +1000 Eager pk/pr optimization (#5621) * Optimizations to eager_pk * eager_pr also uses changed boolean now. commit ffc82ebdb2ee00c14dd225eb057d209d4584a623 Author: XScorpion2 Date: Mon Apr 15 00:29:50 2019 -0400 [Keyboard] Zen keyboard update for Rev2 (#5522) * Updated Zen keyboard for rev2 support * Fixing r1 compile errors * PR feedback and changes for Proton-C compile errors commit 49746830402cc0e1c0227c6c3c06ebc22fcd016c Author: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> Date: Mon Apr 15 06:58:56 2019 +0300 [Keyboard] IBM Model M (ANSI/ISO) Teensy 2.0++ conversion (#5560) * Added initial modelm101 config * Update keyboards/modelm101/keymaps/default/keymap.c Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> * Update keyboards/modelm101/keymaps/iw0rm3r/keymap.c Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> * Update keyboards/modelm101/readme.md Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> * Added wiring notes to clarify use of the config * Small fix * Small fix * Moved modelm101 to converter directory * Added info.json file for QMK configurator * Corrected path Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> * Update keyboards/converter/modelm101/readme.md Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> * Update keyboards/converter/modelm101/modelm101.c Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> * Update keyboards/converter/modelm101/modelm101.c Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> * Update keyboards/converter/modelm101/modelm101.c Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> * Update keyboards/converter/modelm101/modelm101.c Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> * Update keyboards/converter/modelm101/modelm101.c Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> * Update keyboards/converter/modelm101/modelm101.c Co-Authored-By: iw0rm3r <49209191+iw0rm3r@users.noreply.github.com> * Replaced DDR and PORT with QMK functions commit 5fcd744ddba591829a129560992b2e43fb615d4d Author: XScorpion2 Date: Sun Apr 14 20:50:35 2019 -0400 Features/ws2812 matrix driver (#5418) * WS2812 driver implementation for RGB Matrix * Added driver configuration docs commit d7ba190cd9b90bce3a00dfa2a9afe4b3bf0a1dbb Author: roguepullrequest Date: Sun Apr 14 13:35:21 2019 -0500 [Keymap] First publish of roguepullreqest programmer dvorak planck layout (#5612) * First publish of roguepullreqest programmer dvorak planck layout * Removed junk line * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Update keyboards/planck/keymaps/roguepullrequest/keymap.c Co-Authored-By: roguepullrequest * Removed layer songs Removed layer songs for cleanliness. Will use them later. * Update keyboards/planck/keymaps/roguepullrequest/readme.md Co-Authored-By: roguepullrequest commit 66dbcccb48f74e796b33b493113550ee1467785e Merge: e7e13ebdd de161493c Author: Drashna Jaelre Date: Sun Apr 14 11:33:52 2019 -0700 Fix incorrect keyboard dimensions in Configurator API data (#5615) * Fix Ergodone keyboard dimensions in info.json * Fix handwired/prime_exl keyboard dimensions in info.json * Fix KBDfans KBD4x keyboard dimensions in info.json * Fix handwired/not_so_minidox keyboard dimensions in info.json * Fix Canoe keyboard dimensions in info.json * Fix Clueboard Cluecard keyboard dimensions in info.json * Fix Corne (crkbd) keyboard dimensions in info.json * Fix Gergo keyboard dimensions in info.json * Fix handwired/frenchdev keyboard dimensions in info.json * Fix handwired/ortho5x13 keyboard dimensions in info.json * Fix handwired/promethium keyboard dimensions in info.json * Fix Speedo keyboard dimensions in info.json * Fix XD87 keyboard dimensions in info.json * Fix Ergodox EZ keyboard dimensions in info.json * Fix Ergodox Infinity keyboard dimensions in info.json * Fix Keeb.io Iris keyboard dimensions in info.json * Fix Orthodox keyboard dimensions in info.json (all revisions) * Fix Qwertyydox keyboard dimensions in info.json * Fix handwired/tradestation keyboard dimensions in info.json commit e7e13ebdd7dfa6b89326cc1b915539492153b648 Author: roguepullrequest Date: Sun Apr 14 13:32:11 2019 -0500 [Docs] Adding Alt↯Tab example macro (#5616) commit 02b74d521bf84ba776a5920289887ad418806311 Author: Bob Date: Sun Apr 14 14:02:41 2019 -0400 fix combo enabling logic (#5610) commit 61a7aebd1630b35e177dcd4e49694756593428a1 Author: Jeremy Bernhardt Date: Sun Apr 14 12:01:52 2019 -0600 [Keyboard] Georgi FW updates (#5609) * Working on chording * Working on chording * Got layouts in order * Initial Georgi support * forgot to add keymaps * Updated readme * Update keyboards/georgi/keymaps/template/readme.md Co-Authored-By: germ * Update keyboards/georgi/georgi.h Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/template/keymap.c Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Disabled features, updated info * Update keyboards/georgi/config.h Co-Authored-By: germ * Update keyboards/georgi/config.h Co-Authored-By: germ * Fixed info.json * Split the number button and fixed gaming mode. * started work on history feature * Working history/multikeyfuckery * type * inital code reduction refactor * Got multikey patched up, optimizing for size * Forgot to remove stuff * fixed key repeat * Key repeat added. * Symshift locking * Midchord Sym shenanigans. * Added only QWERTY mode * Split out header * Added stickybits, minimal layour * Fixing user layout * Whitespace fixing * Fixing Version name commit de161493c7cad991d0a78fb00784ef70204f88bc Author: noroadsleft Date: Sat Apr 13 12:06:15 2019 -0700 Fix handwired/tradestation keyboard dimensions in info.json commit 58a04162a8c15bdacf3eef3a3a7a71cc216a6a05 Author: noroadsleft Date: Wed Mar 20 15:10:13 2019 -0700 Fix Qwertyydox keyboard dimensions in info.json commit 424c35910974868087cc01bf4e453381440bcee5 Author: noroadsleft Date: Wed Mar 20 15:08:45 2019 -0700 Fix Orthodox keyboard dimensions in info.json (all revisions) commit 165b1683c11d90d6c65ba3df10e330e911327c85 Author: noroadsleft Date: Wed Mar 20 15:00:41 2019 -0700 Fix Keeb.io Iris keyboard dimensions in info.json commit 69f757c3a2d8f60bd4891832d7f368656b26303f Author: noroadsleft Date: Wed Mar 20 14:37:49 2019 -0700 Fix Ergodox Infinity keyboard dimensions in info.json commit 8f3063402da00c0b5542bee5894a91b7ffd78c65 Author: noroadsleft Date: Wed Mar 20 14:37:23 2019 -0700 Fix Ergodox EZ keyboard dimensions in info.json commit 8af1d3ad86ef34b3acc7c93f0e14baf2abd94184 Author: noroadsleft Date: Wed Mar 20 14:16:19 2019 -0700 Fix XD87 keyboard dimensions in info.json commit 8c87274e83853757833ef726c5b048789901b942 Author: noroadsleft Date: Wed Mar 20 14:14:57 2019 -0700 Fix Speedo keyboard dimensions in info.json commit eab6546fda6935466252abfd87e6a10c72c7177c Author: noroadsleft Date: Wed Mar 20 14:10:48 2019 -0700 Fix handwired/promethium keyboard dimensions in info.json commit 2485f73f06459cf26b1e7f5665d90e272f9145d9 Author: noroadsleft Date: Wed Mar 20 14:09:43 2019 -0700 Fix handwired/ortho5x13 keyboard dimensions in info.json commit 814118175b0bb5533b1b0030d1bdf787526283fc Author: noroadsleft Date: Wed Mar 20 14:08:48 2019 -0700 Fix handwired/frenchdev keyboard dimensions in info.json commit de6b56817709ad455f01a2255b387ccba47a0a67 Author: noroadsleft Date: Wed Mar 20 14:06:16 2019 -0700 Fix Gergo keyboard dimensions in info.json commit a20e59ac754ac4ecd24344e08ce2b50dedfcfdcc Author: noroadsleft Date: Wed Mar 20 14:02:55 2019 -0700 Fix Corne (crkbd) keyboard dimensions in info.json commit 7870000d892fa08ea6c9160cef493b5dcdf778b2 Author: noroadsleft Date: Wed Mar 20 14:01:44 2019 -0700 Fix Clueboard Cluecard keyboard dimensions in info.json commit f19d13820604291092ea89c195e962963e72ebb1 Author: noroadsleft Date: Wed Mar 20 14:00:14 2019 -0700 Fix Canoe keyboard dimensions in info.json commit a206f3b7395627270682c814c04e249ccd8ff295 Author: noroadsleft Date: Wed Mar 20 13:58:25 2019 -0700 Fix handwired/not_so_minidox keyboard dimensions in info.json commit 75535cdfa3373c611fef1f4a9166d1b70a194021 Author: noroadsleft Date: Wed Mar 20 13:56:35 2019 -0700 Fix KBDfans KBD4x keyboard dimensions in info.json commit 1529f0b2d7eac3a3f50465c85eec4cb63a41b8e6 Author: noroadsleft Date: Wed Mar 20 13:53:58 2019 -0700 Fix handwired/prime_exl keyboard dimensions in info.json commit b090fe15d703d454b22bea58284411e6afcab386 Author: noroadsleft Date: Mon Mar 4 16:56:46 2019 -0800 Fix Ergodone keyboard dimensions in info.json commit a6857d18e14322fb75bb168ab13fbea0ff631324 Author: Drashna Jaelre Date: Thu Apr 11 15:21:45 2019 -0700 Change table names commit 1d7a06a0a25167ff49702bab39e7e4e60dc6319f Author: Drashna Jaelre Date: Thu Apr 11 15:12:26 2019 -0700 Cleanup code commit e88530af792ce68ebd4d5fd02a843837396daec9 Author: Drashna Jaelre Date: Sat Mar 23 11:25:26 2019 -0700 Make send_char multilined for readaability So future us' will thaank us commit 7148c0b10c298af12172231e79c0cda1c1f76f04 Author: Drashna Jaelre Date: Sun Feb 17 08:58:02 2019 -0800 Clean up some of the code commit a2090d5e863a580d71e29de104844d5fc4fbe036 Author: Drashna Jaelre Date: Tue Oct 2 11:08:41 2018 -0700 Add AltGr/RALT support to Send String commit 6832a067ef8966993319f07f34a4a08b39c2ded4 Author: zvecr Date: Fri Feb 22 21:10:16 2019 +0000 Add vendor and product arguments to atmega32a_program.py - fix hex print commit 0e88d756f92d1254c58e66f9538c07b68ded489c Author: zvecr Date: Fri Feb 22 20:50:58 2019 +0000 Add vendor and product arguments to atmega32a_program.py commit a9a5fd754ed30a3d9453c77b5f622898848d3042 Author: Drashna Jaelre Date: Mon Feb 18 19:00:19 2019 -0800 Max out range for max compatibility commit c27d96b4c1ed8aa5bf9cad20380b8f723b149a83 Author: Drashna Jaelre Date: Mon Dec 10 20:22:51 2018 -0800 Fix ATSAM's USB HID descriptor to support higher heycodes Assuming I understand this correctly, this should set the max scancode to E7 (RGUI), which is the last listed code in the main list (everything else use for internal QMK/TMK stuff). commit 0ee4206bd07abd884f13819d782c72f2e6baa071 Author: zvecr Date: Sun Feb 17 19:14:58 2019 +0000 Fix build detection of keymap and board changes commit e93465ffdb7ad6fc3a13f97a94b914b324a3330a Author: zvecr Date: Sat Jan 26 16:37:31 2019 +0000 Apply MAKEFLAGS to speed up CI commit dc267f96c79b82e6b7eb77a36cdfe8b81e601519 Author: holtenc Date: Fri Apr 12 11:23:04 2019 -0500 Flesh out keymaps and some tweaks to indicators (#5608) * correct indicator light states. function of indicator lights was inverted. these changes correct that. * flesh out keymaps pre production commit 2a55368a59e8fcacff19ab9da7c857fa14fc9a11 Author: mechmerlin Date: Thu Apr 11 18:26:43 2019 -0700 add in the missing #defines commit 2df82514ab9e33342d985e7b6065c3b921402391 Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu Apr 11 15:39:40 2019 -0700 Update ps2avrgb readme template (#5584) - fix markdown formatting on macOS instructions (close code block) - update package install commands - set python3 - use pip3 to install pyusb - fix typo (extra backtick on bootloadhid package install line) - update Keyboard Maintainer line (now unified with AVR template) commit c78bc6a2fecb1853cc095a37c84de3a69dea142f Author: kaylanm <1063516+kaylanm@users.noreply.github.com> Date: Thu Apr 11 15:24:29 2019 -0400 Use DIRECT_PINS for BDN9 (#5603) commit 0137b0231957c0b2fde80ac0e2a769ba4cbd60e7 Author: zvecr Date: Thu Apr 11 19:51:55 2019 +0100 Port DIRECT_PINS from split_common/matrix.c to matrix.c (#5091) * Port DIRECT_PINS from split_common/matrix.c to matrix.c * Reorder matrix.c to remove foward declaration and match split_common/matrix.c * Refactor nano to use DIRECT_PINS * Reorder matrix.c to remove foward declaration and match split_common/matrix.c * Add DIRECT_PINS documentation * Reorder matrix.c to remove foward declaration and match split_common/matrix.c - fix logic from inherited from split_common * Add DIRECT_PINS documentation - review comments commit dc570b0b389d23b8ea8b46311294a7040b5e1e44 Author: さくらんぼ <47372812+sakurachari@users.noreply.github.com> Date: Fri Apr 12 01:07:39 2019 +0900 Keyboard: Add yosino58 Keyboard (#5465) * Keyboard: Add yosino58 Keyboard * Keyboard: Add yosino58 Keyboard commit fa514e63aaed358dbe4d098e7dc31561f148aec0 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed Apr 10 21:19:27 2019 -0700 fix offset in matrix (#5600) commit 606b1fe82f440258f697896c39d306fefcb9033c Author: Noah Frederick Date: Wed Apr 10 21:36:05 2019 -0400 Remove caveat about combos with shared keys (#5601) Combos with shared keys are supported as of https://github.com/qmk/qmk_firmware/pull/2561. Therefore, this caveat no longer applies. commit 4882f7f16d3d5ef850790c935cf02112a615fd3e Author: Konstantin Đorđević Date: Wed Apr 10 23:15:51 2019 +0200 Revert "Update build instructions and docker file to download submodules" (#5533) * Revert "Update build instructions and Dockerfile to download submodules" This reverts commit 93210547bd1bfbbb1ffd56801bb81af46af350a5. * Update build tools docs based on feedback * Fix bad link in build tools docs commit 45620fd289ad81f6bd34cf6a95e86f86d7577b9a Author: zvecr Date: Wed Apr 10 00:39:06 2019 +0100 Remove ps2avrGB since its a hangover from the keyboards/winkeyless refactor (#5592) commit 3761c28bf9a0d8c117b124c8d1a958e033b1e99f Author: Alex Ong Date: Tue Apr 9 14:52:38 2019 +1000 ergodox_ez: fixed bug where debounce() was called without calculating changed (#5589) commit fa4052c26e33b42b65521fd5ba9f94a3a778b275 Author: Jack Humbert Date: Mon Apr 8 19:57:43 2019 -0400 Adds the Planck EZ, 3737 RGB, fixes out-of-tune notes (#5532) * RGB Matrix overhaul Breakout of animations to separate files Integration of optimized int based math lib Overhaul of rgb_matrix.c and animations for performance * Updating effect function api for future extensions * Combined the keypresses || keyreleases define checks into a single define so I stop forgetting it where necessary * Moving define RGB_MATRIX_KEYREACTIVE_ENABLED earlier in the include chain * Adds the Planck EZ, 3737 RGB, fixes out-of-tune notes * fix bug in quantum/rgb_matrix_drivers.c Co-Authored-By: jackhumbert * update command setting to the correct default * correct rgb config * remove commented-out lines * update docs for the 3737 * Update docs/feature_rgb_matrix.md Co-Authored-By: jackhumbert commit bc536b9b6d98e5428a28f6e6ba69675bd77b79cc Author: Bob Date: Mon Apr 8 17:07:15 2019 -0400 Switch process_combo to using global register and timer (#2561) Since combos keep local state about what keys have been previously pressed, when combos are layered, multiple keypresses will register for any key with multiple combos assigned to it. In order to fix this, I switched process_combo to use a global keycode / keyrecord register and timer. When a keypress is consumed by a combo, it gets stored in the register and the timer is updated; when the next keypress takes too long or a key is pressed that isn't part of any combo, the buffer is emitted and the timer reset. This has a few side effects. For instance, I couldn't _not_ fix combo keys printing out of order while also fixing this bug, so combo keys print in order correctly when a combo fails. since combos no longer have local timers, the logic around when combos time out has changed. now that there is a single timer pressing any combo key (including one in a different combo) will reset the timer for all combos, making combo entry a little more lenient. Since combos no longer have local keycode / keyrecord state, there is an edge case where incomplete combo keys can be consumed. if you have a combo for a+s = tab and a combo for b+n = space, if you press a+b+n, only a space will be emitted. This is because when b+n completes successfully, it drops the register. commit f8d365a47847f8e49fde5096aa065dbee08cf728 Author: Drashna Jaelre Date: Mon Apr 8 12:43:03 2019 -0700 Convert BFO9000 to Split Keyboard code (#5568) commit da9bb590551e4e40552f301852074dffccd2c29d Author: zvecr Date: Mon Apr 8 19:35:47 2019 +0100 [Keyboard] Refactor jj4x4 to current standards (#5567) * Refactor 4x4 in line with current ps2avrgb template * Add backlight pwm bodge till #4324 lands * Disable bootmagic lite as it seems to not work on atmega32a/bootloadHID commit 15d7c5f0bdfff97d5d7af6d474cc57d66b6bba94 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon Apr 8 11:03:53 2019 -0700 [Keyboard] Bootmagic does not actually work on BMC boards, removing from panc60 (#5573) * remove unneeded uart setting * use pragma once everywhere * remove custom matrix support * fixup readme * set bootmagic to lite * remove dependency on custom i2c code * use the right header files and function calls * remove bootmagic support as it doesn't work on bmc boards * readme merge artifacts removal commit 3e26886700a42fa6f66e934d4981b3e285784cd9 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon Apr 8 10:55:36 2019 -0700 [Keyboard] Refactor Singa (#5579) * pragma once it all * put amnesia's name everywhere * fixup readme * remove custom matrix * remove unneccessary configs * disable bootmagic * remove custom i2c in favor of i2c_master * fix rgb led num * add in rgb underglow support commit 0456bd668de37f118e717aabf00a132756ea619c Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue Apr 9 02:55:00 2019 +0900 [Docs] update feature_rgblight.md: add some figures (#5578) * Added diagrams to illustrate the RGBLIGHT_LED_MAP macro and the `rgblight_set_clipping_range()` function. * change fig size * change fig size * update figs commit 91b18e263f6373994613c290129e49f18e17cef1 Author: zvecr Date: Mon Apr 8 18:53:15 2019 +0100 [Keyboard] Refactor jj40 to current standards (#5574) * Refactor jj40 in line with current ps2avrgb template * Disable bootmagic lite as it seems to not work on atmega32a/bootloadHID * Add backlight pwm bodge till #4324 lands * Increase planck keymap compatibility commit 9b393700d2fdd4a1159ba265bc399726e92f4e60 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun Apr 7 23:32:01 2019 -0700 [Keyboard] Waldo 60 PCB Refactor (#5583) * use pragma once * modified readme with maintainer info * remove rev1 for the time being * QMK Configurator support for 60_ansi and 60_ansi_split_bs_rshift * add hhkb layout and QMK Configurator support * fix compile issue due to missing DEVICE_VER * use a saner and less complicated default layout * remove unused file * fix up LAYOUT_all and formatting along with QKM Configurator support * turn on bootmagic lite as the hardware reset switch isn't in a standard position * remove default folder commit f44483f6aa381f6caa9cbf7a57bd6ba73bad8ae9 Author: That-Canadian Date: Mon Apr 8 00:05:32 2019 -0400 Adding the Waldo PCB (PCB for the Holz keyboard) (#4817) * Added Waldo keyboard base files and default keymap * Updated Waldo files and added keymap for split shift and split backspace * Updated meta-data for the Waldo board * Apply suggestions from code review Committing suggestions for real this time. Co-Authored-By: That-Canadian * Made suggested changes that were not explicitly made. commit 95ebe9018514b4ff7c06fc7dec1bf302a36474f2 Author: fauxpark Date: Mon Apr 8 12:32:12 2019 +1000 [Keymap] Change SFT_ESC keycode in default Satan keymap to KC_GESC (#5482) commit eef00e4da110746b9dce4a710c7eeb8dab888a14 Author: Jan Christoph Ebersbach Date: Mon Apr 8 04:20:09 2019 +0200 [Keyboard] Add Signum 3.0 for the elite-c (#5478) * Add keyboard Signum 3.0 for the elite-c * Update readme.md * Remove unused macros * Use bootmagic lite instead of full * Add warning to keymap.c that it's auto-generate * Add description for customizing keyboard layouts * Make generate_km.py executable * Make right shift available in numpad layer * Update keyboards/signum/3_0/elitec/readme.md Co-Authored-By: jceb * Update keyboards/signum/3_0/elitec/readme.md Co-Authored-By: jceb * Fix typo in symbol name commit 908966bdf36605301d27cdcae82c3201c156a43f Merge: 6a4c54870 d15bb05c9 Author: Drashna Jaelre Date: Sun Apr 7 19:19:00 2019 -0700 Fixed tap/down/up handling in dynamic keymap macros (#5363) * Fixed tap/down/up handling in dynamic keymap macros * Added SS_TAP_CODE, SS_DOWN_CODE, SS_UP_CODE commit 6a4c54870cff157f1056ca65363c9e862920cbc9 Author: Andrew Kannan Date: Sun Apr 7 21:32:16 2019 -0400 [Keyboard] Instant60 Tsangan (#5580) * Update instant60 for tsangan version * Add extra init hook * Remove hacky first init thing commit 8dd0ff6c7a1ebc70fb70fe64654353d3e5afeb68 Author: fauxpark Date: Fri Feb 1 14:14:39 2019 +1100 Remove keyboard description from Adafruit BLE device name commit 9a701632c49518196008145b9e38c9f959e0d2d2 Author: Konstantin Đorđević Date: Sun Apr 7 16:40:09 2019 +0200 [Keyboard] Remove unnecessary IS_COMMAND definition in treadstone48 (#5566) commit b262f20ad48be429848467074edcf62536d4d3e5 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun Apr 7 07:34:31 2019 -0700 [Keyboard] Refactor HB85 to get rid of custom i2c code (#5570) * remove dependency on custom i2c code * missed a pragma once * fix readme install instructions * config.h cleanup * make the bootmagic key not the same bmc reset key * disable bootmagic functionality as it doesn't seem to work on atmega32a bmc boards commit a8e3462b4bd5706f17f460e36b88b4063ef148f6 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun Apr 7 07:34:01 2019 -0700 [Keyboard] Refactor budget96 to remove custom i2c code in favor of QMK i2c_master (#5571) * remove custom i2c code in favor of QMK i2c_master * fix readme * disable bootmagic as it doesn't work on bmc boards commit b8f7834051f601d028b8182077322c1b45d7c112 Merge: 18a9f7999 1b9f82c84 Author: Drashna Jaelre Date: Sun Apr 7 07:33:10 2019 -0700 Refactor E6V2 BMC PCB to get rid of custom i2c code in favor of QMK i2c_master (#5572) * remove custom i2c code in favor of QMK i2c_master * clean up config file * fix pyusb install instructions * fix naming in usbconfig.h * disable bootmagic as it does not work for bmc boards commit 18a9f7999e15dd234dda55f7946df829ce11d54b Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun Apr 7 07:32:06 2019 -0700 [Keymap] Updates to noroadsleft keymap for KC60 (2019-04-07) (#5576) * Update macros and keycode handling - Update NUBS_Z macro so it repeats when held down - Number row now uses numpad keycodes if Right Alt is being held - coding conventions and formatting update - switched to four-space indent - reformatted a block comment * Update readme files commit 0231caa25aa258a79a7fb73cc57723655055b928 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun Apr 7 07:30:40 2019 -0700 [Keyboard] Refactor FaceW for new BMC changes (#5575) * use #pragma once for guards * update readme and fix pyusb install instructions * replace custom i2c code with QMK i2c_master * remove unneeded code from config.h * fix keyboard name * remove custom matrix and i2c driver * turn off bootmagic, turn on leds * remove keymap in favor of userspace/community layouts keymap * remove custom matrix * update readme commit 1b9f82c8445368dce0e0ada9af1f43956093fa98 Author: mechmerlin Date: Sat Apr 6 19:24:41 2019 -0700 disable bootmagic as it does not work for bmc boards commit 0baa1e2b2fe8e7918e26edac12bb4a6e2e151b1d Author: mechmerlin Date: Sat Apr 6 18:33:32 2019 -0700 fix naming in usbconfig.h commit 8173db634daa0eaa6cfe7dc5a556ff2193ec078f Author: mechmerlin Date: Sat Apr 6 18:31:36 2019 -0700 fix pyusb install instructions commit f6c305ba52f68880585af3cc6c1642a4d76deb7e Author: mechmerlin Date: Sat Apr 6 18:31:00 2019 -0700 clean up config file commit 44435d74447df0b190e02201181416d3d4b8cdff Author: mechmerlin Date: Sat Apr 6 18:30:15 2019 -0700 remove custom i2c code in favor of QMK i2c_master commit 5c1ef2bddc0fa5d4753d33a5ec8fed5d9da736c8 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sat Apr 6 18:08:57 2019 -0700 [Keyboard] Panc60 Refactor (#5559) * remove unneeded uart setting * use pragma once everywhere * remove custom matrix support * fixup readme * set bootmagic to lite * remove dependency on custom i2c code * use the right header files and function calls commit 410984486b0a5c61174c6e4e5a3570f1b09f97dc Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sat Apr 6 17:30:48 2019 -0700 i2c_init update to work with atmega32a boards (#5562) * On i2c_init, enable two wire interface, twi interrupt, and slave address ACK along with pull up resistors. * thanks to some testing by drashna, we know that setting TWI doesn't work for all boards. Putting the new code into an ifdef block commit 2ffa4798a43682a73598c0b43d46abcca7cd6e83 Author: Lenbok Date: Sat Apr 6 13:19:42 2019 +1300 Fix bugs that cause compile failures when enabling only some animations. commit cb33643f0209202e5d195613ad685e3cdae4ef2d Author: Drashna Jaelre Date: Fri Mar 22 14:48:29 2019 -0700 Remove user keymap changes commit c9a2d9d1aa8bb5f257954ea0569f707c0ae758b0 Author: Drashna Jaelre Date: Tue Jan 29 09:09:10 2019 -0800 Additional cleanup of orthodox files and keymaps commit a615a2ae93107c5f4ddcb447a562af1a721a00d9 Author: Drashna Jaelre Date: Mon Jan 28 00:00:42 2019 -0800 Convert Orthodox to Split Common code commit ced2bbdac8018b08f229460b289ff5a7fce5dd43 Author: Bernard Date: Sat Apr 6 03:53:07 2019 +0800 Add a new keyboard: NQG (#5558) * Add new keyboard: NQG * Delete .gitignore .gitignore removed Originally used to ignore .DS_Store files from being committed. * Changed Maintainer information Maintainer link now points to a github account. commit 5701b75e3c10728d424ec058d26ef2e354aba0c0 Author: Drashna Jaelre Date: Fri Apr 5 12:47:25 2019 -0700 Custom Tapping Term per key (#5009) * Add customizable tapping terms * Add Documentation * Fix function * Fixes * It's not a pointer * Add debugging output * Update documentation to be at least vaguely accurate * Use `get_tapping_term(tapping_key.event)` instead `e` doesn't include column and row information, properly. It registers as 255, regardless of the actual keypress. However `tapping_key.event` actually gives the correct column and row information. It appears be the correct structure to use. In fact, it looks like the issue is that `e` is actually the "TICK" structure, as defined in keyboard.h * Use variable tapping term value rather than define * Silly drashna - tapping_key.event, not event * add get_event_keycode() function * Fix typo Co-Authored-By: drashna * Remove post_process_record_quantum since it's the wrong PR * Update quantum/quantum.c Co-Authored-By: drashna * Better handle ifdef statement for permissive hold Since we can't be sure that tapping term is actually 500 * Update quantum.c comments based on feedback * Clean up get_tapping_term function Clean up function so that users don't need to call the event function, and instead only check the keycode * Add ability to run functionality on and off * Make ifdef's more compact commit 4c1760883e2e0ed710348f02bc791786ed0c1b04 Author: James Churchill Date: Sat Apr 6 02:20:43 2019 +1000 Update ps2avrgb template to use standard matrix/i2c code (#4957) * Update ps2avrgb template to use standard matrix/i2c code * Default to an 8x11 matrix in the ps2avrgb template commit dad66cad40131bbc5b7c85bdf107c664a721ba07 Author: Alex Ong Date: Fri Apr 5 15:44:33 2019 +1100 [Keyboard] Simplified handwired/xealous since most of the features are in core now. (#5556) commit 7e5c107d43890eb517184d6fddff9a6da165fc3d Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu Apr 4 15:16:59 2019 -0700 [Keyboard] Move scrabblepad into donutcables directory (#5553) * move scrabblepad into donutcables directory * use pragma once * update scrabblepad readme commit 60668ef39deab4634dbe7fc1119d9de5ee751b28 Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Thu Apr 4 17:41:55 2019 -0400 [Keymap] Additional RGB options set (#5551) * Add new RGB backlight options to config * Add new RGB options commit f698f1e3f4f51431473d54512fd6c0609b9b72ee Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu Apr 4 14:25:35 2019 -0700 [Keyboard] Add Budget96 by Donut Cables (#5550) * initial commit of budget96 * non logic changes * add my name to readme * update matrix.c * make the matrix representation of the layout macro * fix up LAYOUT macro * add missing character * initial keymap commit * put KC_NO where they belong * basic keymap * fix matrix row and col definition * The diagram I was sent and the pins used I was sent were in opposite order from each other. This should fix the issues * update the readme * change up manufacturer for budget96 * update copyright date * fix up the switch matrix and provide a keymap * forgot the keymap * other matrix fixes * missing a few keys in the switch matrix * messed up the row tracing * tweak keymap a bit * use a lower case k * fix spacing for markdown rendering * put in the reset key documentation * clean up the file a little * use LAYOUT_96_ansi * add a second layer for lighting controls * add in lighting support * add QMK Configurator support * use pragma once * remove un needed matrix.c * convert to GPIO methods * turn on rgblight_enable and get rid of custom matrix * set bootloadhid_bootloader to 1 * set bootmagic to lite and set it to k50 * add reset information to readme * use i2c_master instead of custom i2c * restore the custom i2c code * introduce reset key and eep_rst in function layer 1 * fix up pip3 install commands * fix up device and manufacturer names * remove un needed comments * add an ALL layout macro along with QMK Configurator support * move budget96 into donutcables directory since he actually has different boards * add a short donut cables blurb taken from his website * update readme for make instructions to point to the new path * Update keyboards/donutcables/budget96/config.h Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update keyboards/donutcables/budget96/readme.md Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update keyboards/donutcables/budget96/info.json Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * turn on backlight * Update keyboards/donutcables/budget96/readme.md Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * remove extra UART and BOOTLOADER settings that are not needed commit 852d125413388aa3e71d2be91f04ddea534f2af3 Author: Wilba Date: Fri Apr 5 01:10:07 2019 +1100 [Keyboard] Added configurable defaults for RGB backlight parameters. (#5549) * Added configurable defaults for RGB backlight indicators. * Added more configurable defaults commit 3c7cb5cf5dbf9e97db9b98e32beca9ee58a1c246 Author: Deckweiss Date: Thu Apr 4 15:05:06 2019 +0200 Added Hacked Motospeed keyboard (#5534) * Added first configuration for handwired hacked motosped keyboard * Added first keymap * Fixed h file key layout * Swapped Y and Z in default keymap * Added name, email and description * Moved hacked motospeed keyboard to handwired * Changed make command in readme * Formatted readme to be displayed properly with markdown * Formatted keymap and layout to better reflect the physical keyboard * Fixed info.json * Update keyboards/handwired/hacked_motospeed/info.json Co-Authored-By: Deckweiss * Removed .directory from .gitignore Co-Authored-By: Deckweiss * Minor changes and cleanup * Update keyboards/handwired/hacked_motospeed/hacked_motospeed.h Added back newline needed for properly parsing Co-Authored-By: Deckweiss commit 76d982febaf5f154e633d45a9e53cbc21f3853ae Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Thu Apr 4 01:57:41 2019 -0400 [Keymap] New HS60/v2 HHKB keymap for goatmaster (#5545) * Adding new keymap folder for goadmaster * add switch break * zeal60 rgb backlight files * modified for red caps lock key * Remove return statement * Files removed * Add new RGB options * Back to original file commit debd902a3d5788beab8580a26c84d7db2365a638 Author: marksard <38324387+marksard@users.noreply.github.com> Date: Thu Apr 4 14:56:22 2019 +0900 [Keyboard] add treeadstone48 (#5405) * Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization commit 4f4fad83737546db6dd04af9e26320ef7d0610dd Author: Nicholas Shaff Date: Thu Apr 4 00:54:30 2019 -0500 [Keyboard] Doro67 Multi PCB port (#5539) * Initial portover of the doro68.json with corrected column pins. * Initial setup of LAYOUT_ansi and it's use in the default keymap. * Added F keys to default kemap on layer 1. * Added split space (and everything else) layout and a base keymap to be updated. * Renamed split_space to multi. * Changed product_id for doro. * Created a basic doro LAYOUT_iso and default keymap. * Copied over basic layout and keymap. * Added readme.md for doro67 multi. * Removed basic keyboad layout and keymap because it's a separate PCB. * Added backlight controls to the various keymaps. * Added explicit backlight pin define. * Increased number of backlight levels for flexibility. * Removed unnecessary line slashes and unified keymcaps. * Corrected ISO layout and switched position with multi. * Added keymap readme.md files. * Corrected ISO keymap. * Added Layouts to info.json for toolbox. * Re-added slashes as they were necessary here... * Corrected info.json/keymap discreptancies. * Updated copyright messages (and fixed small readme error). * Added missing line break spaces in readme.md Co-Authored-By: ShadeDream * Keymap alignments on default_multi readme.md Co-Authored-By: ShadeDream * Keymap alignments on default_multi readme.md Co-Authored-By: ShadeDream * Keymap alignments on default_multi readme.md Co-Authored-By: ShadeDream * Small alignment adjustment on the default keymap readme.md Co-Authored-By: ShadeDream commit b463415d84867b34f35de2277d419676a602ddb0 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed Apr 3 18:35:53 2019 -0700 [Keyboard] V60 Type R - Turn on leds for Configurator + Refactor (#5546) * use pragma once where applicable * remove ? * update default keymap readme * remove un need include * update readme with newbs guide * set underglow and backlight to be on by default, and explicitly set them to no for the default keymap to handle the non Polestar case. * put mine and benlyall's name in the code * update readme commit 763b26cdb98c2702f7b2f8de239d4edba0fa4065 Author: Daniel Prilik Date: Wed Apr 3 18:30:47 2019 -0700 RGB Matrix support for Massdrop CTRL/ALT (#5328) * port Massdrop CTRL/ALT to use RGB Matrix Co-authored-by: Matt Schneeberger * Massdrop lighting support working This commit is to get the Massdrop lighting code working again through use of the compilation define USE_MASSDROP_CONFIGURATOR added to a keymap's rules.mk. Added keymaps for both CTRL and ALT named default_md and mac_md. These should be used if the Massdrop style lighting is desired. * Updating config based on testing results with patrickmt & compile errors * Updates for PR5328 For CTRL and ALT: Moved location of new RGB Matrix macros from config_led.h to config.h. Added RGB_MATRIX_LED_FLUSH_LIMIT (time between flushes) to config.h for correct LED driver update timing. Re-added missing breathing code for when Massdrop configurator mode is defined. * remove prilik keymap form PR commit 63177760deaf23bb1f676974cecf211676285604 Author: XScorpion2 Date: Wed Apr 3 18:01:17 2019 -0500 Added encoder support to split common code (#5477) * Added slave encoder support to split common * Fixing handwired/xealous/rev1 compile error * Removed unnecessary ifdef commit 17e7762de7e3fdfc61c20aa61022f47370630c6a Author: Alex Ong Date: Thu Apr 4 08:45:55 2019 +1100 Eager Per Row Debouncing added (added to Ergodox) (#5498) * Implemented Eager Per Row debouncing algorithm. Good for when fingers can only press one row at a time (e.g. when keyboard is wired so that "rows" are vertical) * Added documentation for eager_pr * Ported ergodox_ez to eager_pr debouncing. * Removed check for changes in matrix_scan. * Added further clarification in docs. * Accidental merge with ergodox_ez * Small cleanup in eager_pr * Forgot to debounce_init - this would probably cause seg-faults. commit e1e08a494bf9ea46e1385559df76d5f49b8e9087 Merge: eb0bbe997 0e10a66c0 Author: Drashna Jaelre Date: Wed Apr 3 10:25:09 2019 -0700 Merge pull request #5536 from stanrc85/feature/updates [Keymap] Config tweaks and adding zeal60 RGB files to userspace commit eb0bbe997b30f1e6fba1d95adb25d2af04302021 Author: Wilba6582 Date: Wed Apr 3 23:54:34 2019 +1100 Added configurable defaults for RGB backlight indicators. commit cb2f2fd258011e6637ed182f484a4317ac510db8 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed Apr 3 10:17:25 2019 -0700 [Keyboard] Small Refactor of Duck boards (#5521) * first [ass at pulling out common duck library functions * use new library in jetfire * use new library in duck lightsaver * use new library in octagon v2 * put Device into the library * refactor send_value * refactor send_value and send_color * use pragma once * use pragma once * use pragma once * use pragma once * rename backlight_led to indicator_leds to match with other duck boards * rename enum * make #define names consistent * rename ducklib to duck_led * update rules.mk ?= to = * put rgb in the correct order * add debounce debugging printouts * turn on bootmagic lite and set it to the top left most key commonly programmed as Escape * add reset key documentation * fix that typo * Update keyboards/duck/duck_led/duck_led.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * include the correct library commit caefb1c61eca10dcb70ca6481a8a592057de7318 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed Apr 3 09:47:55 2019 -0700 [Keyboard] Quantrik Kyuu 65% Board (#5541) * initial commit * get rid of some of the vanilla cookie cutter code * Put in the matrix size and the pins * add LAYOUT macro and a suitable keymap * Add QMK Configurator support * set bootmagic to lite * put a RESET key into the default keymap * edit kyuu readme file for description and quantrik.com link * Update keyboards/quantrik/kyuu/config.h Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * fix captilization of keyboard name * fix keymap wrapping issue and add MO key * preserve RESET key location * use one of the macros commit 0e10a66c05bfe4b0ea7514673f6e544885108cc5 Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Wed Apr 3 09:21:04 2019 -0400 Call default zeal60 rgb file commit 67793b39122e2d16b6ac194c67e02df8a0c6e0c7 Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Wed Apr 3 09:19:22 2019 -0400 remove call to custom rgb file commit 1a625ae2c0c2cbbb5e4761b577d242c6f90e23ea Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Wed Apr 3 09:18:00 2019 -0400 Removed duplicated zeal60 files commit 6c865772372f1266189270571d3b87a7dd3a2ac6 Author: moyi4681 Date: Wed Apr 3 11:41:00 2019 +0800 [Keyboard] fix dz60rgb response speed (#5540) commit ca19cd8bb8f76cbc12b4f6461cbc78438bda9563 Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue Apr 2 20:33:17 2019 -0400 remove uneeded returns floating around commit c98247e3dd2958bd2d8969dc75170e7e2757b895 Author: XScorpion2 Date: Tue Apr 2 19:24:14 2019 -0500 RGB Matrix Overhaul (#5372) * RGB Matrix overhaul Breakout of animations to separate files Integration of optimized int based math lib Overhaul of rgb_matrix.c and animations for performance * Updating effect function api for future extensions * Combined the keypresses || keyreleases define checks into a single define so I stop forgetting it where necessary * Moving define RGB_MATRIX_KEYREACTIVE_ENABLED earlier in the include chain commit 3cfa24c6848980965996f76a0dba552f4d9c906d Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue Apr 2 19:57:22 2019 -0400 Adding zeal60 rgb files with modifications commit 387ede9e6b3a9309a0329e6108443fa4a27a48bc Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue Apr 2 19:56:28 2019 -0400 Tweaking tapping_term value commit 813d79bac6ff168ea13bf073a28744542a08a59e Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue Apr 2 19:56:11 2019 -0400 Use modified rgb_backlight.c file commit 68d8bb2b3fb8a35fda164539d27754b3f74e0819 Author: Jack Date: Tue Apr 2 18:13:08 2019 -0500 [Keyboard] Add handwired keyboard "Tennie" (#5507) * Add tennie * Jacobs Functions * Switch back to normal layout * Remove define from old template * Fix broken keymaps * Correct style errors, add bootlite * Update readmes. Rename test keymap * Missed comma * Switch rgb from init to post init commit 61b2f2b16e92cf63efa1534a1046bed5aab222a0 Author: DDRnJn Date: Tue Apr 2 14:51:28 2019 -0400 Added some new songs (#5525) Added Fantasie Impromptu and Nocturne Op. 9 No. 1 in B flat minor by Chopin Added Isabella's Lullaby from The Promised Neverland Added Renai Circulation and Platinum Disco from Monogatari Added Terra's theme from Final Fantasy 6 commit b23752c840e4bcd4a6476d6956f2909514d0ecf0 Author: David Rambo Date: Tue Apr 2 14:50:22 2019 -0400 [Keymap] Minor update to my XD75 keymap (#5531) * Updated iris, planck, and xd75 keymaps * Added brightness down and up to commented layout of Symbol layer. * updated config files for planck and iris * removed unnecessary include lines from iris and planck config files * updated XD75's PC layer and its NAVPC toggle layer * fixed typo in alias declaration for C_BSPS * changed alias names for BSPC toggle keys commit e6b3bef077d9810c39bc7e7fd70eb52a4600abf5 Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue Apr 2 12:25:36 2019 -0400 Adjusting tapping term commit 448d3ad8dea82a5a71d29fb26d04f44e2a07123e Author: Nicolas CARPi <3043706+NicolasCARPi@users.noreply.github.com> Date: Tue Apr 2 06:18:06 2019 +0200 [Keymap] Add alternate bépo layout for Ergodox EZ (#5524) The other bépo layouts were a bit too complex/weird or without LED code and hard to transition to for new users. This config is a good base for bépo users. commit 8b8d69f0dfea22936f4b8b9da2917cdf9f838839 Author: AbstractKB <49011872+AbstractKB@users.noreply.github.com> Date: Mon Apr 1 23:58:47 2019 -0400 [Keymap] Updated my personal keymaps for the bfo9000 and jj50 (#5508) * Updated my personal keymaps for the bfo9000 and jj50 * fixed best practices mistakes commit fbee737ff3b767f0ce95da61a154ef6334312887 Author: Garret G <45295190+TheRoyalSweatshirt@users.noreply.github.com> Date: Mon Apr 1 22:31:38 2019 -0500 [Keyboard] add support for romac macropad (#5530) * add support for romac macropad * Update info.json fixed total key_count * Update keymap.c * Update keymap.c * Update README.md * Update config.h * Update romac.h * Update romac.h * Update romac.h * Update rules.mk * Update config.h * Update README.md * Update romac.h * Update README.md * Update README.md * Update README.md * Update config.h * Update config.h * Update config.h * Update info.json * Update info.json * Update info.json * Update keymap.c * Update keymap.c * Update keymap.c * Update README.md * Update README.md * Update README.md * Update config.h * Rename README.md to readme.md * Update rules.mk * Update config.h * Delete .gitattributes * Update romac.h * Update config.h * Update config.h * Update keymap.c * Update keymap.c * Update keymap.c * Update readme.md * Update readme.md * Update readme.md * Update info.json * Update config.h * Update config.h * Update config.h * Update readme.md commit 40c6269f9fdd279b16ee49e49c8fbd256b79ccae Author: zvecr Date: Mon Apr 1 19:32:39 2019 +0100 Fix typo in keyboard_post_init_user example, remove EPRM from Persistent Configuration (EEPROM) (#5528) commit 58b065cfdaca29144fa7fd18d482223bc1ea7308 Author: Alex Mayer Date: Mon Apr 1 12:02:30 2019 -0400 1UP Keyboards: Use Right Variant Of Keys On Right Side Of Board (#5529) commit 3654d0f080c85da3b2ae33cc035777a445cca769 Author: yfuku <30647434+yfuku@users.noreply.github.com> Date: Sun Mar 31 04:16:18 2019 +0900 [Keyboard] add claw44 keyboard (#5511) * add claw44 keyboard * Update keyboards/claw44/lib/layer_state_reader.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/lib/layer_state_reader.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/lib/layer_state_reader.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/lib/layer_state_reader.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/readme.md Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Remove unnecessary code because of default value * Move layer definition * Update keyboards/claw44/keymaps/default/keymap.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/keymaps/yfuku/keymap.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/readme.md Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * default keymap. LAYOUT_kc -> LAYOUT macro * Move rules.mk from keymaps to keyboard level. * add Hardware Supported, Hardware Availability * Update keyboards/claw44/keymaps/default/keymap.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Update keyboards/claw44/keymaps/yfuku/keymap.c Co-Authored-By: yfuku <30647434+yfuku@users.noreply.github.com> * Remove depreciated function commit 4f7dd9edf8cf9b546d7c21fcefb7de09f92474db Author: David Rambo Date: Sat Mar 30 14:05:31 2019 -0400 [Keymap] Updated my iris, planck, and xd75 keymaps (#5515) * Updated iris, planck, and xd75 keymaps * Added brightness down and up to commented layout of Symbol layer. * updated config files for planck and iris * removed unnecessary include lines from iris and planck config files commit 93210547bd1bfbbb1ffd56801bb81af46af350a5 Author: Mikhail Goncharov Date: Tue Apr 10 18:47:56 2018 +0100 Update build instructions and Dockerfile to download submodules commit b846c25a56f1c949094fd2f4f587cb358b7cd8c5 Author: Wilba Date: Sat Mar 30 16:13:28 2019 +1100 [Keyboard] Added RAMA KOYU (#5512) * Initial commit of RAMA KOYU * Changed default layout * removed IS_COMMAND() commit d15bb05c935e378f2e1e912a46c3114697dd00e4 Author: Wilba6582 Date: Sat Mar 30 14:24:13 2019 +1100 Added SS_TAP_CODE, SS_DOWN_CODE, SS_UP_CODE commit 3f9d20032a8559006ae01c985b86f94055ea10e6 Author: jotix <47826561+jotix@users.noreply.github.com> Date: Fri Mar 29 15:21:19 2019 -0300 [Keyboard] Update jot50 readme.md (#5510) commit 8fa9f67256772984110a6e21f19d6fb8594b804d Author: Jeremy Bernhardt Date: Fri Mar 29 11:39:28 2019 -0600 [Keyboard] ErgoTaco Support (#5504) * ErgoTaco support * Update keyboards/ergotaco/ergotaco.h Co-Authored-By: germ * Update keyboards/ergotaco/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/ergotaco/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/ergotaco/readme.md Co-Authored-By: germ * Update keyboards/ergotaco/readme.md Co-Authored-By: germ * Update keyboards/ergotaco/rules.mk Co-Authored-By: germ * juggling rules.mk * Update keyboards/ergotaco/rules.mk Co-Authored-By: germ * updating IS_COMMAND * learning2english Meme-tastic --Drashna commit 3f4d706c98fc3a7f5fcec6ed0b62291b4159f097 Author: Brian Choromanski Date: Fri Mar 29 09:20:25 2019 -0400 Fixing dead links (#5503) * Fixed typo of 'confid.h' to 'config.h' * Fixed broken links in docs * Fixed a lot of dead links * Removed all dead links that I could not find a replacement for * Placed knops links back in * Fixed plank keymaps so that they will compile for planck light * Https doesn't work on knops.io * tv44:budi now compiles * s60_x:amnesia0287 now compiles * Fixed allocation of key_combos so that narze keymap for planck can compile correctly * Disabled rgb on ergodone and infinity * Enabled tap dance so it compiles * Added return statement so it compiles * If compiling on light disable extra functionality * Properly redefined variable so it compiles * Remove remaining dead links commit 4fa7c9f1d0a51465991b926522472e969107e80c Author: tomholford Date: Thu Mar 28 15:31:39 2019 -0700 [Keymap] addition: macro for "screenshot region to clipboard" in macOS (#5505) * Create custom Planck Light keycap See README for details * Link to WhatPulse in README * More remapping, and add RGB LED effects * Remove dead code, address PR feedback from @drashna * Add macro for “screenshot region to clipboard” hotkey for macOS Also remove unused layer / key logic * Remove extraneous comment * Incorporate PR feedback from @drashna. Update README with new mapping. commit 6f6ab261e6bf44c49efedee7ebb769746ca70df7 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu Mar 28 12:52:57 2019 -0700 [Keyboard] revert back to the old custom i2c code for bmc (#5501) commit 2352afb3839431c024113a3dd197251cf8951591 Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Thu Mar 28 14:46:34 2019 -0400 [Keymap] Add custom macro to launch RDP (#5502) * Add keycodes for new macros to keymaps * add macros for commonly used shortcuts * FIx macro code and add comments * Replaced with build in QMK keycodes * Removed macros that duplicated QMK keycodes commit 188a1e66ff092a1db8adeb5410ba995715ef6594 Merge: 04684a94e 7e37daab6 Author: Drashna Jaelre Date: Wed Mar 27 22:13:29 2019 -0700 Update KBD67 readme so that it mentions the KBD65 PCB (#5143) * The code in this directory supports the KBD65 * Update readme.md * Update readme.md * Clear up the confusion between the kbd67/kbd65 naming. * Update keyboards/kbdfans/kbd67/readme.md Co-Authored-By: Hackerpilot commit 04684a94efb280f0716ad7429856fd326af65fa0 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed Mar 27 22:12:17 2019 -0700 [Keyboard] E6V2 Bootmapper Client QMK port (#5495) * initial commit of e6v2 bmc files * update readme with bmc template and reset key location * fix up the switch matrix * add usbconfig.h file * add i2c files * cleanup config.h * cleanup rules.mk and remove non atmega32a architecture code * add an appropriate keymap for testing * update readme with warning not to flash this hex file onto atmega32u4 e6v2 * get rgb lights working * add QMK Configurator support for 60_ansi layout * add hhkb support layout * add additional layouts such as tsangan and all and included QMK Configurator support for them * add bootmagic lite, and have it be set to Esc or the key located at k50 * update readme * fixup spacing for LAYOUT_all electrical matrix * add some pragma once magic * use i2c_master instead of custom i2c.c * remove the custom i2c.c * restore a more valid default keymap * add eep_rst to keymap commit 67ca9e0c85d3f6e95e25ade0899206ed95fe3598 Author: kwerdenker Date: Wed Mar 27 18:39:23 2019 +0100 [Keymap] Add kwer keymap and RGB mod description to cypher (#5479) * Add kwer keymap and RGB mod description to cypher * Add custom led_set_user to keymap * Remove unneccessary include path from keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c Co-Authored-By: kwerdenker commit c98380e0ddf1f1316daeda8c66d690b4ff16134b Author: dsanchezseco Date: Wed Mar 27 18:15:40 2019 +0100 [Keymap] added user keymap (#5499) commit b9f6ff05d09084d624b5736b46b8c8a446fa1892 Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Thu Mar 28 00:51:56 2019 +0900 build size-check enhancement (#5485) * build size-check enhancement Changed to display a warning when the free size of compilation result is less than 512 bytes. * update message.mk * add SIZE_MARGIN variable, change default margin 512 to 1024 for Example. ``` $ make SIZE_MARGIN=2048 crkbd:all $ make crkbd:all ## mergin is 1024 ``` * Update message.mk change message to ‘approaching the maximum’ Co-Authored-By: mtei <2170248+mtei@users.noreply.github.com> commit 6f124b790938e2e74431fc85f2cc1ae04d824f6e Author: Danny Date: Wed Mar 27 11:50:28 2019 -0400 [Keyboard] Add Collide39 keyboard (#5486) * Add Collide39 keyboard * Remove unneeded lines commit 2519de92b50f5df6939d1e404f09650383c2d1a6 Author: Rob Rogers Date: Wed Mar 27 10:42:03 2019 -0500 [Docs] Add udev rule for Input Club bootloaders (#5494) * Add udev rule for Input Club bootloaders * match style with file name above udev rule commit 795c2c27b9cfe8fbda4f30e526dccfc1a5f774c2 Author: martinmksiu Date: Wed Mar 27 03:22:56 2019 +0000 [Keymap] adding keymaps (#3583) * add key map * QWERTY with 40% layers * updated line 21 updated line 21 from "#include "xd75.h" to "#include QMK_KEYBOARD_H" as requested * upload contra folders * Update .directory * Update config.h * Update config.h * Update keymap.c * Update config.h * Update rules.mk * Update keyboards/contra/keymaps/martin_bac/config.h Co-Authored-By: martinmksiu * Update keyboards/xd75/keymaps/martin_cennum/config.h Co-Authored-By: martinmksiu * Delete .directory * upload * Delete rules.mk * Update keyboards/contra/keymaps/msiu/config.h Co-Authored-By: martinmksiu * Update keyboards/katana60/keymaps/msiu/config.h Co-Authored-By: martinmksiu * Update keyboards/katana60/keymaps/msiu/config.h Co-Authored-By: martinmksiu * Update keyboards/katana60/keymaps/msiu/config.h Co-Authored-By: martinmksiu * Update keyboards/katana60/keymaps/msiu/config.h Co-Authored-By: martinmksiu * Delete nano.save * Delete rules.mk * Update keymap.c * Update keymap.c * Update config.h * Update keyboards/lets_split_eh/keymaps/msiu/keymap.c Co-Authored-By: martinmksiu * Update keyboards/lets_split_eh/keymaps/msiu/keymap.c Co-Authored-By: martinmksiu * Update keymap.c * Update keyboards/planck/keymaps/msiu/config.h Co-Authored-By: martinmksiu * Apply suggestions from code review Co-Authored-By: martinmksiu * Update keymap.c * Update readme.md * Update keymap.c commit 346cbd88167e8e9a979517bf51144ff66e904f01 Author: Jon Arintok Date: Wed Mar 27 04:34:33 2019 +0200 Add 3 speed mousekey movement option (#2246) This allows for constant, non-accelerated mouse movement, while retaining the original functionality. Configurable by a define. commit 509668ca7ce224a389a2caa3ff4df19302d4efc1 Author: Fabien Culpo Date: Wed Mar 27 01:41:37 2019 +0000 [Keymap] add redox/rev1:fculpo keymap (#5491) commit d8371b3380ffb07239d4920d3748f4af92d937f5 Author: Danny Date: Tue Mar 26 21:40:01 2019 -0400 [Keymap] Update iris default (#5489) * Update Iris default to include KC_GRV on base layer and match Configurator default * Update default config commit 9ef21d2e1c26b4153368fb3fe887ea7117c5b49b Author: zvecr Date: Wed Mar 27 01:39:09 2019 +0000 Refactor staryu to current standards and enable support for backlight keycodes (#5487) commit a0270b55e1e5326ff097644ffe617574f2311d61 Author: Ryan Caltabiano Date: Tue Mar 26 18:13:13 2019 -0500 Fixing Ergodox_EZ rgb_led initialization commit b90df560f8f5a681eac193b779cb8c5ecb20d681 Author: DDRnJn Date: Sat Mar 23 20:51:28 2019 -0400 Added songs from Nier and Nier Automata Added song of the ancients and kaine salvation fron Nier Added Amusement park, Copied city, Vague Hope cold rain and weight of the world from Nier Automata commit 3510d8dc8d055982ef61e83233f79b4c1d4df2d3 Author: fauxpark Date: Mon Mar 25 11:11:26 2019 +1100 Document an annoyance with Grave Escape and macOS Terminal (#5483) commit f1d921bee6bc371e1613b71240635a9847e685b3 Author: Max <17062872+westfoxtrot@users.noreply.github.com> Date: Sun Mar 24 22:00:48 2019 +0100 Bugfix for recently integrated cypher keyboard (#5481) * fixed issue with LED indicators corrected error in info.json * fixed issue with led indictors commit bfc16765f423dccb9a4b81a3e62b7bb3df48252f Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun Mar 24 14:23:50 2019 +0900 add keyboards/mxss/rgblight.h from e661f1559:quantum/rgblight.h (#5461) This PR is cherry-pick from 90b9a1aa7d8a in PR #5020. @MxBlu copied quantum/rgblight.c to keyboards/mxss/rgblight.c on July 8, 2018. At that time, I think it would be better to copy quantum/rgblight.h at the same time. Because if someone makes a change to `quantum/rgblight.[ch]` that is incompatible with the past, it may cause problems with the compilation of keyboards/mxss. (Like when I changed the prototype of the `rgblight_effect_XXX()` functions of rgblight.c in PR #5020.) commit 74e05f34515bdab146d0512ac4d3d57bc0116e95 Author: Rob Hilgefort Date: Sat Mar 23 18:22:40 2019 -0600 [Keymap] Planck Keymap :: rjhiglefort (#5059) * copy default over as starting point * Getting rid of dvorak and colemak for now, added a couple changes to the keymap * removed refs to bad layers, formatting comments * First version of my ergodox ported layout! * Symbols layer, media layer, updated comments * Hyper as a single key * Fix stuck hyper key when switching layers * Tweak some annoying things about the layout. - move raise left and promote alt - remove swap keys on the last layer - reorganize media keys so they're easier to reach and more intuitive - fix some comment template things * Add readme for rjhilgefort planck layout * readme tweak * PR feedback changes commit f077204fae729e66f8dfa16db82263ff2ff84d59 Author: Danny Date: Sat Mar 23 20:20:14 2019 -0400 Add support for RGB LEDs wired directly to each half's controller (#5392) * Add support for wiring RGB LEDs for both halves directly to their respective controllers RGB LEDs for each half don't need to be chained together across the TRRS cable with this * Add split RGB LED support for serial * Update config/rules for bakingpy layout * Un-nest ifdefs for hand detection * Read RGB config state from memory instead of EEPROM for serial updates * Reuse existing LED pointer instead of creating new one commit 23086808a78c9234232e2ddbf0c977d1fb2cb6ae Author: Max <17062872+westfoxtrot@users.noreply.github.com> Date: Sat Mar 23 19:13:59 2019 +0100 [Keyboard] added cypher keyboard support (#5466) * added the cypher qmk configuration * Update keyboards/westfoxtrot/cypher/cypher.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/cypher.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/cypher.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/cypher.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/keymaps/default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/keymaps/default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/keymaps/default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/info.json Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/info.json Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/readme.md Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cypher/readme.md Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * made modifications as per requests * removed endif from cypher.h commit 3529384c1202c6feca01039d5dcdb0491381ff4c Author: tomholford Date: Fri Mar 22 21:26:32 2019 -0700 [Keymap] Add custom Planck Light keymap (#5464) * Create custom Planck Light keycap See README for details * Link to WhatPulse in README * More remapping, and add RGB LED effects * Remove dead code, address PR feedback from drashna commit 3a7816843cb3fc890351cae2182d65b5deaa323e Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Fri Mar 22 23:50:56 2019 -0400 [Keymap] New tap dance code added to userspace and keymaps (#5468) * Adding new tap dance key * Adding new tap dance code * add code for copy/paste to tap dance * testing tap dance enums * New tap dance keycodes * Fix enums commit 1dda671e4ab44b978cf4fa78fd39c5d647b5ab86 Author: wanleg <32079073+wanleg@users.noreply.github.com> Date: Fri Mar 22 18:26:21 2019 -0700 ISP Flashing Guide - atmega32a info (#4993) * update isp flashing page * update isp flashing page commit f8d5b9f204f97651314b63df6dd33f75788d7ebe Author: moonfall Date: Thu Mar 21 20:14:40 2019 -0700 [Keymap] iris: moonfall: Initial checking of layout. (#5462) Layout is similar to Kinesis/Ergodox. commit dfe02441bb96c17357a0471b8dde74b51d3081d3 Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu Mar 21 06:06:27 2019 -0700 handwired/magicforce61 Refactor (#5459) * handwired/magicforce61: refactor Renamed layout macro KEYMAP to LAYOUT. Keymap now uses #include QMK_KEYBOARD_H. Refactored the default keymap to use non-auto-prepended keycodes per QMK standard. Deleted deprecated action_get_macro block (was unused). * handwired/magicforce61: Configurator support * handwired/magicforce61: readme cleanup Restructured the readme to be more similar to current QMK template. * handwired/magicforce61: replace missing image in readme Replaced the missing wiring image (error 404) with a table. * handwired/magicforce61: rename readme to lowercase * Convert config.h to #pragma once include guard commit 6e4edbd15700a54409cb86f3cc2b34e174138b46 Author: KOBAYASHI Daisuke Date: Thu Mar 21 22:05:50 2019 +0900 Keymap: Add Koba's keymap for KBD67. (#5460) commit 7e37daab6e9074cec7aa711f9dd5cab0a2c4773d Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed Mar 20 17:09:00 2019 -0700 Update keyboards/kbdfans/kbd67/readme.md Co-Authored-By: Hackerpilot commit f7fd7f67bd1286a42326a6832627ef328252db0c Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Thu Mar 21 08:55:24 2019 +0900 rgblight.c: add remap feature (#5243) * rgblight.c: add RGBLIGHT_LED_MAP support * add code to keyboards/helix/rev2/keymaps/five_rows/config.h to test rgblight.c:RGBLIGHT_LED_MAP * Test end. Revert "add code to keyboards/helix/rev2/keymaps/five_rows/config.h to test rgblight.c:RGBLIGHT_LED_MAP" This reverts commit e7488d6f7338460b533d7d19a09deccb011000bf. * update docs/feature_rgblight.md * led_map[] move to PROGMEM commit d5fd8c4f1cf79de17528f7f40948640fa8bb8d7a Author: Felipe Coury Date: Wed Mar 20 19:48:44 2019 -0300 Uses K(row)(col) standard for TGR Alice matrix (#5457) commit 0786f227d8563be3c9a31c0c4153a1b1cebcfc69 Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed Mar 20 13:26:50 2019 -0700 [Keyboard] Refactor MF68 default keymap to use LAYOUT_68_ansi macro (#5455) commit 995b31a565e88b29e1f6a4493e7ab8b3d7951f99 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed Mar 20 10:39:57 2019 -0700 [Keyboard] HB85 Refactor/Layout Addition (#5451) * introduce stt layout with K(row)(col) * set bootmagic to lite * Rename the original LAYOUT to LAYOUT_all Introduce the STT layout In additional the whole matrix was changed to support the K(row)(col) notation. * rename LAYOUT to LAYOUT_all * add QMK Configurator support * stt keymap based on mrpetrov's default configuration on the hb85 he lent me * update readme * introduce basic and aop layouts along with QMK Configurator support for them * add a new line * add EEP_RST to layer 1 as it is needed to get rgb underglow to work * add documentation on how to reset the eeprom on the board * put contributors names where appropriate commit 066465fa6fdf3013a7fac11305d20bb2846fd630 Author: jotix <47826561+jotix@users.noreply.github.com> Date: Wed Mar 20 14:38:39 2019 -0300 [Keymap] jotix layouts adjustments (#5453) commit cd696ed3d13542b09d34e8d78bb19ed6e7eee568 Author: James Churchill Date: Thu Mar 21 00:43:36 2019 +1000 Fix i2c splits with >8 columns (#5454) commit ab294813919d9df803946d990a6a1d783ab69f0a Author: fauxpark Date: Thu Mar 21 01:43:20 2019 +1100 Fix link to Caterina bootloader hex files (#5452) commit 6eb5a25a6ad47d92c185e07e030b8ff4c8190b0c Author: Jason Won Date: Tue Mar 19 22:51:08 2019 -0400 [Keyboard] add quantum matrix calls to zen matrix calls (#5450) commit 8b859872dad82137a060ffca3d36b2323b7c241c Author: jotix <47826561+jotix@users.noreply.github.com> Date: Tue Mar 19 23:46:54 2019 -0300 [Keymap] Jotix (#5448) * jotix layout adjustments * jotix layout readme commit 6e7eff47b374fe4fdb550c5554b6438ec626a5f7 Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue Mar 19 22:45:33 2019 -0400 [Keymap] Keymap and readme updates (#5449) * Remove tap dance code from keymap.c * Add tap dance code to userspace files * Readme updates * Update keymap images commit 4b4eba997fd70cf6faf263384f8559c90f6d8529 Author: Boy_314 <32818287+Boy-314@users.noreply.github.com> Date: Tue Mar 19 17:34:18 2019 -0400 [Keymap] Boy_314's Halfnhalf layout update (#5441) * added Boy_.314's layout for halfnhalf keyboard * reset rules.mk to default * update keymap with qwerty layout, and enable tap dancing * fixed formatting in layout visualization * added rules.mk to custom layout * added mod tap for ctrl/capslock * fixed typo in config.h, remove excess in rules.mk, revert half_n_half rules.mk * added Boy_.314's layout for halfnhalf keyboard * reset rules.mk to default * update keymap with qwerty layout, and enable tap dancing * fixed typo in config.h, remove excess in rules.mk, revert half_n_half rules.mk * added macros to raise layer * fixed mismatched layout/comments * fixed layout switching commit 6a4884e3bdc157a00718eb157f72489c1adf30e0 Author: Konstantin Đorđević Date: Tue Mar 19 22:33:44 2019 +0100 [Keyboard] Remove unnecessary IS_COMMAND definitions from a couple of boards (#5269) * Remove unnecessary IS_COMMAND definition from clueboard/66_hotswap/gen1 * Remove old-style IS_COMMAND definition comment from dozen0 * Use get_mods() instead of keyboard_report->mods in georgi commit 0072fdd799ffe61bf64f12c23335da3adeb083e5 Author: Drashna Jaelre Date: Tue Mar 19 12:57:40 2019 -0700 Cleanup Default Keymaps (#5442) * Cleanup Default Keymaps to conform to QMK Firmware standards * Minor fixes * Revert some changes commit 29bfd634e16e196c86b0a5f63e179af1f9a52902 Author: Drashna Jaelre Date: Tue Mar 19 07:37:22 2019 -0700 Fix dk60 compiler issue on newer compiler versions (#5444) commit afdc67184dd6aedacb321aa1f8fe0d7ceaa438a3 Author: Rob Rogers Date: Tue Mar 19 01:25:34 2019 -0500 correct typo in eeprom split target for dfu (#5445) commit 161d469f2c9cf0ddf7aa5907eb2329d6df1ede85 Author: Drashna Jaelre Date: Mon Mar 18 14:22:33 2019 -0700 [Docs] Recursively clone qmk_firmware repo (#5378) * Recursively clone qmk_firmware repo Specifically, so that it grabs the submodules, since ARM keyboards are becoming more common, and we are seeing more issues about chibiOS not being downloaded (in the error log, rather than by question) * Wrap in shell commit c534a4c775098f2b6cc8e7f36d35cf642f4323a5 Author: Drashna Jaelre Date: Mon Mar 18 14:22:02 2019 -0700 [Docs] Smallish overhaul of the docs (#5281) * Fix up Common functions doc * Add to extra commands to flashing doc * Rearrange and touch up Macros * Expand Newbs Flashing guide * Update process_record documentation * Add git to best practices name in sidebar * Expand FAQ for build/flashing * Add deprecated info to functions * Update docs/feature_macros.md Co-Authored-By: drashna * Update docs/feature_macros.md Co-Authored-By: drashna * Update docs/flashing.md Co-Authored-By: drashna * Update docs/flashing.md Co-Authored-By: drashna * Update docs/keymap.md Co-Authored-By: drashna * Update docs/newbs_flashing.md Co-Authored-By: drashna * Update docs/newbs_flashing.md Co-Authored-By: drashna * Update docs/custom_quantum_functions.md Co-Authored-By: drashna * Update docs/faq_build.md Co-Authored-By: drashna * Update docs/feature_macros.md Co-Authored-By: drashna * Update docs/keymap.md Co-Authored-By: drashna * Fix up Common functions doc * Make pre-init example accurate * Update docs/custom_quantum_functions.md Co-Authored-By: drashna * Zadig Driver catchall * Spelling Depriciated * Completely remove fn_actions section commit 28e182bc8a2976562e0d76a1332527e0a4be81ea Author: Drashna Jaelre Date: Mon Mar 18 14:21:10 2019 -0700 [Keyboard] Reduce compile size of the Lily58 Keyboard (#5412) commit 4f0dc945c32fce91323e5321b6bca70bca4dd1ac Author: Drashna Jaelre Date: Mon Mar 18 14:20:30 2019 -0700 [Docs] Add music_map to audio documentation (#5419) * [Docs] Add music_map to audio documentation * Add link to planck as example commit 618718e04253b8e528f748e11b140bac5b765dc7 Author: Luciano Malavasi Date: Mon Mar 18 11:54:59 2019 -0700 [Keymap] PyroL's TMO50 layout update (#5435) * keymap + alpha * some fixes * keymap + alpha * some fixes * drashna changes * linked main Alpha repo in keyboards/alpha readme * missed a spot * there's another function called FUNC lol * keymap + alpha * some fixes * keymap + alpha * drashna changes * Fixed include * Revert "Fixed include" This reverts commit ea92f261f86d8433eab313cde498adca1682a006. * messed up my git, fixed include * starting work on TMO50 layout * Update keyboards/tmo50/keymaps/default/keymap.c Co-Authored-By: PyrooL * Updated PyroL's TMO50 keymap * Added task manager/Ctrl Alt Del that i stole from the eco keymap * Clean up task manager and ctrl alt del macros Co-Authored-By: PyrooL commit d63f954b25624de5477a707f449beead90182e17 Author: Riley Weber Date: Mon Mar 18 14:51:24 2019 -0400 [Keymap] Add vim-style keymap for lets split (#5399) * initial commit * initial commit * fixed indents * spelling, capitalization, and order. * added dota mode keymap, removed old comments * fixed default keymap always having tilde, instead of grave accent and tilde. Improved dota keymap. * lower does not change backspace to delete anymore * corrected pgup/pgdown * changed period on lower from numpad dot to regular dot * added colemak and dvorak * made colemak/dvorak border keys consistent with querty * updated to match current practices, added custom metakeys for dvorak and colemak * added disclaimer about audio * renamed to lowercase * replaced include guards with #pragma once Co-Authored-By: rileyweber13 * removed unncessary include Co-Authored-By: rileyweber13 * removed defines included in core Co-Authored-By: rileyweber13 * replace defines with an enum, switched from custom function to set_single_persistent_default_layer * removed ifndef/include/endif left over from previous build system * removed unnecessary ifdef block * updated soungs to work with set_single_persistent_default_layer commit 99a8628383803d25c07d3f170ce5791da2c80a51 Author: Andrew Kannan Date: Mon Mar 18 14:12:09 2019 -0400 [Keyboard] CannonKeys Instant60 Keyboard (#5433) * Instant 60 * Instant60 changes again * turn off LSE and features * Working RGB underglow :tada: * Add missing files * Update keymap to have reset * Backlighting on * Backlight code for instant60 * Move 072 files to common folder and use it in Instant60 * Updates * Update keyboards/cannonkeys/instant60/rules.mk Co-Authored-By: awkannan commit 3a2eb68e9e37fddc79ec59769052846a5e1051e8 Author: lucwastiaux Date: Tue Mar 19 02:10:18 2019 +0800 [Keymap] add android studio keyboard shortcuts to dvorak 42 key atreus / ergodox layouts (#5423) * add SCREEN_NAV layer for copy/pasting within screen * working readreg/paste macros * working read reg / paste macros * write log and tran patterns, and expand * add ls -la shortcut, add tab on combined layer * put delete word on the right pinky key on shell_nav layer * add TAB on the right side, add reset key * added Cloud9 macros * add cloud9 shortcuts to atreus layout * added BROWSER_CONTROL layer * finalized browser control layer * adding comment * add browser control layer to atreus * add flashing command line * remove the tab on combined layer * remove the tomouse * remove mouse layer, change log/tran expand patterns, cleanups * add dumptlog macro * add "delete to home" shortcut * fix conflict * remove unneeded mouse layer * add meh shortcuts on the browser_control layer * add/modify some macros * explain the various layers * putty paste is right mouse button * add android studio shortcuts * allow switching between base and alternate base layouts * replace cloud9 shortcuts with android studio * more android studio shortcuts * add two meh shortcuts on keynav layer * additional android studio shortcut * added defines for android studio commit 473dedb309800b1ea11dd6a16948e72bbdf158ae Author: FiNeXdesign Date: Mon Mar 18 19:09:37 2019 +0100 [Keymap] Updated layout after some months of testing. (#5427) * Updated layout after some months of testing. The current setup looks quite better than the initial one. It's not perfect but it allows me to work quite well. The only big problem is the Alt modifiers on the home row which sometimes break the typing if keys are pressed too fast. I'm also not satisfied by the TAB key position on the thumb cluster. Main improvements since previous push: - Shift layouts on both halves - Moved around symbols - Improved number/fn keys - Reorganized thumbs * Used enum as suggested by @drashna :-) commit 83937573d176b87785f4c6eb058ecf8e86033283 Author: Adam Newbold Date: Mon Mar 18 14:06:31 2019 -0400 [Keyboard] Corrected layout for top row keys (#5429) * Corrected column count and adjusted layouts to include missing key The original version reflected 14 columns and omitted KC_GRV, the 15th key on the top row. This revision adds support for the 15h key, and also updates the default (Tsangan) layout to include the HHKB layer keys. * Reverted config.h to version in master branch * Moved K413 to the correct location * Added info.json * Update keyboards/1upkeyboards/1up60hte/1up60hte.h Co-Authored-By: newbold * Update keyboards/1upkeyboards/1up60hte/info.json Co-Authored-By: newbold * Update keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c Co-Authored-By: newbold * Update keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c Co-Authored-By: newbold * Update keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c Co-Authored-By: newbold * Update keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c Co-Authored-By: newbold commit bd61b5b0ed76eb3b9676ef828b9e833cdb3301e5 Author: jotix <47826561+jotix@users.noreply.github.com> Date: Mon Mar 18 14:56:12 2019 -0300 [Keyboard] Add Jot50 handwired board (#5431) commit 68d4f78b2580a2f216112880b18341ca6e429d15 Author: jotix <47826561+jotix@users.noreply.github.com> Date: Mon Mar 18 14:53:47 2019 -0300 [Keyboard] layout fixed in jotanck.h (#5432) commit a6c9e53510d129e6e9fe6936fbfd061f2296a892 Author: holtenc Date: Mon Mar 18 12:42:26 2019 -0500 [Keyboard] correct indicator light states (#5434) function of indicator lights was inverted. these changes correct that. commit 3e7a2c49a6e81ba51a8079494bb99f61942e3d7f Author: layne001365 Date: Tue Mar 19 01:33:57 2019 +0800 [Keyboard] Fix matrix positions for HotDox (#5437) * Add HotDox * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/keymaps/default/keymap.c Co-Authored-By: layne001365 * * Update - keyboards/hotdox/config.h - keyboards/hotdox/hotdox.h - keyboards/hotdox/info.json - keyboards/hotdox/left.h - keyboards/hotdox/left.c - keyboards/hotdox/rules.mk * Replace EPRM with EPRM - keyboards/hotdox/keymaps/default/keymap.c - keyboards/hotdox/keymaps/eozaki/keymap.c - keyboards/hotdox/keymaps/kloki/keymap.c * Remove keymaps readme.md * Remove twimaster.h/ twimaster.c * * Update - remove FORCE_NKRO from keyboards/hotdox/config.h - keyboards/hotdox/hotdox.c - keyboards/hotdox/hotdox.h - keyboards/hotdox/keymaps/default/keymap.c - keyboards/hotdox/left.c - keyboards/hotdox/readme.md - keyboards/hotdox/rules.mk * Update keyboards/hotdox/keymaps/default/keymap.c Co-Authored-By: layne001365 * Update keyboards/hotdox/keymaps/default/keymap.c Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/hotdox.h Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * [Keymaps] reverse the K5C<->K5A, L53<->L51, R55<->R53 position. commit d7b381128e503a57315261841c66c13d3ab5be25 Author: Alexander Kagno Date: Mon Mar 18 17:31:09 2019 +0000 [Keymap] Arkag Userspace Update (#5438) * fresh commit for a new fork for PR to upstream/master * gaming mode added, lighting changes for other modes * rules.mk fixed... * fixed collision issue with aesthetic and shifty modes * fixed collision issue with aesthetic and shifty modes * troubleshooting game mode failing * moved game tapdance key to default layer, fixed issue commit 221ac2eabbc73c9d59583c6d78c779bbfec0d7bc Author: M-AS Date: Sun Mar 17 13:38:51 2019 -0400 New RGB Matrix effect: Single color reactive (#5330) * Adds new RGB Matrix effect: rgb_matrix_config'd reactive LEDs * [Docs] Adds disable for new effect * [Docs] Added new effect to list of effects commit d8df01ca5e43b6322ba2ef5c7613a871ce69282c Author: zvecr Date: Sun Mar 17 17:36:59 2019 +0000 Align docker and vagrant base images (#4905) * Align docker and vagrant base images - update box to debian 9.6 * Align docker and vagrant base images - lock docker image to debian 9 * Align docker and vagrant base images - update vagrant docker to debian 9 commit f9f0a31904d937fea625d1ee523138cb5733c800 Author: cubimon Date: Sun Mar 17 18:35:14 2019 +0100 Unicode fix for new wincompose version (#5082) * unicode fix for new wincompose version * move wincompose case to linux * Change unicode input end to enter commit c74b11a959f58ba52f14f4c1061abc6f84042e29 Author: Samuel Jahnke <118westmaine@gmail.com> Date: Sun Mar 17 10:22:35 2019 -0700 [Keymap] Improvements to Samuel's literate keymap (#5428) * added my own keymap * changed thing * updated keymap Samuel * updated laypout for better one handed use * updated stuff I want * happy with my lagout * formatting * Added new literate config * made everything nice * cleaned * fixed spelling and two small bugs in macros * Made press and lift function for modifiers * made taps occur on press instead of release * added oneshot keys and chars cant be negative! * removed debug message * Added command and qwerty layers * fixed bug with oneshot layer * same bug, different key commit fcc9b4b8e7eed87d25d744e3891baf878816d427 Author: DDRnJn Date: Sun Mar 17 01:34:54 2019 -0400 Added 4 new songs to song_list.h Added Liebesleid by Kriesler (or Rachmaninoff), Michishirube from Violet Evergarden, Melodies of Life from Final Fantasy 9 and Eyes on Me from Final Fantasy 8 commit 50475032305b142ab6eff3b0a6411edf49b28376 Author: jotix <47826561+jotix@users.noreply.github.com> Date: Sun Mar 17 14:16:08 2019 -0300 [Keymap] Jotix (#5424) * ortho_4x12 jotix2 layout * ortho_4x12 jotix2 layout commit c62f6b0825b13d2791838154867c543f1f433030 Author: Nik Richers Date: Sun Mar 17 10:13:45 2019 -0700 [Keymap] Add a tweaked Redox keymap (#5422) * Add nrichers keymap * Additional keymap tweaks, add readme info * Improve descriptions for changes from default keymap * Add image of keymap, update .gitignore to * Add image link Adds an image of the modified keymap. * Improve legibility of keymap changes with colour coding * Tinker with color codes in Markdown * Experiment with colour codes * Tinker more with colour codes * Figured out the easiest way to include colour coding * Undo earlier .gitignore change commit e30c993d75b2edd78c185a5d5f33f2fe10635eb5 Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun Mar 17 10:04:50 2019 -0700 [Keyboard] XD75 refactor (#5420) * Refactor layout macro names Update the names of the layout macros to reflect QMK's desired usage. - KEYMAP renamed to LAYOUT - colinta keymap updated accordingly - KC_KEYMAP renamed to LAYOUT_kc - mtdjr keymap updated accordingly * Update xd75.h to use #pragma once include guard * Update keymaps to use QMK_KEYBOARD_H * Refactor default keymap - updated to use layout macro - remove deprecated action_get_macro function - add functions from QMK keymap.c template - process_record_user - matrix_init_user - matrix_scan_user - led_set_user * Update supporting files - updated config.h files to use #pragma once include guard - remove errant QUANTUM_DIR code block * Rename readme files to fully lowercase filenames * Restructure keyboard readme Updated the readme to better align with the current QMK template. * Bugfixes to supporting files commit e9ace1487887c1f8b4a7e8e6d87c322988bec9ce Author: Drashna Jaelre Date: Fri Mar 15 14:34:58 2019 -0700 [Docs] Add VSCode guide to docs (#5124) * Add VSCode guide to docs * Fix settings menu enumeration * Update docs/other_vscode.md Co-Authored-By: drashna * Update docs/other_vscode.md Co-Authored-By: drashna * Update docs/other_vscode.md Co-Authored-By: drashna * Update docs/other_vscode.md Co-Authored-By: drashna * Update docs/other_vscode.md Co-Authored-By: drashna commit 22e499efdb12d277b9847dea8809ba1b717e071f Author: Danny Date: Fri Mar 15 17:28:38 2019 -0400 [Keyboard] Add handwired split tester (#5413) * Add handwired split tester * Update keyboards/handwired/splittest/readme.md Co-Authored-By: nooges * Update keyboards/handwired/splittest/readme.md Co-Authored-By: nooges commit 3c257c1c6e1685a2ce37951c26d13bcb8fad749d Author: Danny Date: Fri Mar 15 17:05:50 2019 -0400 Add avrdude split EE_HANDS flash commands (#5414) * Add EEPROM avrdude flashing commands for setting handedness * Update docs with info on flashing EEPROM handedness files with commands commit 9c4424ae2cd86002cd2f4140eff7108212ef884e Author: Len Trigg Date: Sat Mar 16 09:46:49 2019 +1300 rgblight split transfer non-eeprom config (#5396) * Make rgblight_update_dword not update eeprom (we already have eeconfig_update_rgblight for that). Make split i2c keyboards transfer active rgblight config rather than eeprom saved version of rgblight config, enabling runtime changes that aren't persisted to eeprom. * prev_level and prev_rgb only store successfully transmitted values commit fabdb3c4e8ce4659539a2b0fa4cafc56a07d6c2d Author: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> Date: Fri Mar 15 11:01:50 2019 -0700 [Keymap] Keymap for Idobo (#5402) * greenshadowmaker keymap for idobo xd75 massdrop * remove uneeded config.h * corrected format to match convention instead of xd75 where I accidentally started from commit 493fbb3dc1423e0d42e57a6dc7ba38b880b37eb5 Author: Drashna Jaelre Date: Fri Mar 15 08:57:44 2019 -0700 [Keymap] Update to drashna keymaps: Conform to QMK Standards Edition (#5377) * Use correct functions for dip switch code * Some planck cleanup * Hopefully fix RGB Sleeping with RGB Matrix * Add rgbmatrix extern * Add numpad 5x6 layout * RGB Tweaks * Add RGB startup animation * Minor RGB Fixes * Turn off RBG on planck * Enable separate storage of EEPROM * Update Macro pad * Add BJohnson Keymap and minor darshna tweaks * Clean up rgb and other code for new numpad * Remove clicky hachy thing * Update my code to use built in MOD_MASK defines * Fix up modifier calls * Tweak to KC_MAKE * Tweak to KC_MAKE * Add Semi-colon to numpad * Preprocess out rgb matrix stuff if not enabled * Formatting of KC_MAKE * Add stuff for matrix and light rgb coexistance * Fix bad spelling * Change where layer indication shows based on rgblight status * Force set mods in KC_MAKE * Optimize CRKBD commit e0a03bfa6c148da2936b27a2285f1928c5574ac0 Author: zvecr Date: Fri Mar 15 15:55:07 2019 +0000 Fix return value of i2c_readReg and i2c_receive (#5410) commit b85e2eef9a44dac2e8d1119199238fd6c225586a Author: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> Date: Thu Mar 14 23:13:24 2019 -0700 [Keymap] Greenshadowmaker keymap for ergodash (#5403) * My Inital Keymap, adjusted for not removing outer keys, and using large inner key * First working version of keymap * RGB investigate * Updated Keymap, added keyboard-layout-editor.com json file * minor fix * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h Ah! Thanks fort the clarification, it was a blind copy/paste Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/config.h Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/rules.mk Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * Update keyboards/ergodash/rev2/keymaps/greenshadowmaker/keymap.c Co-Authored-By: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> * removed persistent_default_layer_set and the QWERTY section as suggested commit 41584c3384c92ffe37270b11fe352f9159283ec1 Author: Boy_314 <32818287+Boy-314@users.noreply.github.com> Date: Fri Mar 15 00:09:35 2019 -0400 [Keymap] Added Boy_314's layout for half n half keyboard (#5373) * added Boy_.314's layout for halfnhalf keyboard * reset rules.mk to default * update keymap with qwerty layout, and enable tap dancing * fixed formatting in layout visualization * added rules.mk to custom layout * added mod tap for ctrl/capslock * fixed typo in config.h, remove excess in rules.mk, revert half_n_half rules.mk commit 205ffc277c1b6cb25d11f0938d4df02048870fa5 Author: zvecr Date: Thu Mar 14 22:55:08 2019 +0000 Align use of atmega32a program script (#5259) * Remove duplicate 'program' files and refactor to use atmega32a_program.py * Update readme references from 'program' to 'atmega32a_program.py' commit c025d813baf7ca1dcd427b293b36603339ac31f7 Author: ginjake Date: Fri Mar 15 07:54:16 2019 +0900 [Keyboard] new keyboard lovelive9 (#5266) * new keyboard lovelive9 * Update keyboards/lovelive9/config.h thank you Co-Authored-By: ginjake * Apply suggestions from code review Co-Authored-By: ginjake * fix review * fix readme * move handwired * Update keyboards/handwired/lovelive9/keymaps/default/keymap.c thanks Co-Authored-By: ginjake * Apply suggestions from code review commit suggestion Co-Authored-By: ginjake * fix spell miss * fix review * fix col and row * fix layout define commit 577e99f1954347380dcde6f7160d95c6a38677d5 Author: zvecr Date: Thu Mar 14 21:22:50 2019 +0000 [Keyboard] Inital port of xd96 (#5401) * Initial import of xd96 based on xd84 code * Configure xd96 port expander mapping * Fix xd96 led count * Fix xd96 port expander reading * Fix xd96 port expander reading * Fix xd96 LAYOUT matrix mapping * Add additional links for xd96 Hardware Availability * Correct Configurator config Co-Authored-By: zvecr * Readme review comments Co-Authored-By: zvecr commit c02c7b75171cf1038a249872806fc6ee926d79b8 Author: Brendan Wrafter Date: Thu Mar 14 17:18:11 2019 -0400 Fix ascii art (#5407) commit 980a41e9049aad53c49b667066a3c5e5cabda113 Author: Jeremy Bernhardt Date: Thu Mar 14 14:59:34 2019 -0600 [Keyboard] Georgi Support (#5384) * Working on chording * Working on chording * Got layouts in order * Initial Georgi support * forgot to add keymaps * Updated readme * Update keyboards/georgi/keymaps/template/readme.md Co-Authored-By: germ * Update keyboards/georgi/georgi.h Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/georgi.c Co-Authored-By: germ * Update keyboards/georgi/rules.mk Co-Authored-By: germ * Update keyboards/georgi/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/georgi/keymaps/template/keymap.c Co-Authored-By: germ * Update keyboards/georgi/matrix.c Co-Authored-By: germ * Disabled features, updated info * Update keyboards/georgi/config.h Co-Authored-By: germ * Update keyboards/georgi/config.h Co-Authored-By: germ * Fixed info.json commit 2558372b3f5b383582ee35f318d75a2dc7a28c6e Author: Alexander Kagno Date: Thu Mar 14 19:04:59 2019 +0000 fresh commit for a new fork for PR to upstream/master (#5406) commit c3b4f65c640c217a0c9bf99d6b30982f966e585c Author: walkerstop Date: Thu Mar 14 08:21:41 2019 -0700 Added info.json for mt980 keyboard and fixes to walker keymap (#5391) * Added info.json and minor fixes to walker keymap * Fix url * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Update keyboards/mt980/info.json Co-Authored-By: walkerstop * Fix user calling keymap functions * cancel oneshot layer on KC_TRNS * Fix to oneshot layer handling * Fix oneshot handling of reset * Move bootmagic key to Esc where it normally resides * Remove deprecated function * Treat shift-numlock as shift-insert in Walker layer commit f9c5b80aedc1ef43baeff6a197dc1c3772e69618 Author: Erovia Date: Thu Mar 14 00:26:25 2019 +0100 Add support for THE60 (#5385) commit 30db1b18e56e0d85bf3d5f7df5e050591f1c6d96 Author: Michael Dye Date: Wed Mar 13 17:23:49 2019 -0600 Added 1up60rgb keymap: mdyevimnav (#5386) Added keymap for 60% board 1up60rgb. The map provides VIM-style navigation on a second layer (L1) with HOME, PGDN, PGUP, and END keys on that same layer one row below the home row. The layout is used by https://github.com/michaeldye. commit 4a908288f13e53258a3ab91574bfd1e9164c126e Author: Drashna Jaelre Date: Wed Mar 13 14:08:21 2019 -0700 Fix i2c calls for HotDox keyboard (#5387) commit f34244a871310fac4ab27f3fd75dc44626ed4eb9 Author: Michael F. Lamb Date: Wed Mar 13 14:00:09 2019 -0700 Sleep until USB port becomes writable before running avrdude (#5393) * sleep until usb port becomes writable before running avrdude * only wait for a writable USB port when not on MSYS using MINGW or MSYS: sleep for one second, as before. otherwise: wait for the port to become writable. * typo * typo commit 5a12b054aeff59ce47d0bd233206249d56352b64 Author: Christian Westerlund Date: Wed Mar 13 19:54:34 2019 +0100 [Keymap] Some more improvements to keymap, currency symbols.. (#5395) acute accent and pipe character also commit 7e306f9c9867ff8160c710caa7a7b8e7820cef9e Author: Jarred Steenvoorden Date: Thu Mar 14 05:22:06 2019 +1100 [Keymap] Add atreus, ergotravel and org60 keymaps (#5381) * Add atreus, ergotravel and org60 keymaps * Cleanup my keymap config files commit 2902035dcc930fc6f2890b902015f2a99bc1c274 Author: Iason Dimitrakopoulos Date: Wed Mar 13 17:06:09 2019 +0200 archetype keymap for jj50 (#5397) * archetype keymap for jj50 keyboard * archetype keymap for jj50 keyboard * PR fixes proposed by mechmerlin commit 73c4c9f9e8d2299d0b3a66b2ea8fa3450b9bad31 Author: walkerstop Date: Tue Mar 12 15:23:09 2019 -0700 Wheat Field Peripherals mt980 (FC980M Layout) PCB Support (#5374) * mt980 keyboard support * Update manufacturer name * Correct indicator LEDs, add walker keymap * Added readme.md * Update keyboards/mt980/mt980.c Co-Authored-By: walkerstop * Treat number pad + and enter as pgup and pgdn when number lock is off * Update keyboards/mt980/mt980.c Co-Authored-By: walkerstop * Update keyboards/mt980/mt980.c Co-Authored-By: walkerstop * Update keyboards/mt980/readme.md Co-Authored-By: walkerstop * Update keyboards/mt980/readme.md Co-Authored-By: walkerstop * Update keyboards/mt980/readme.md Co-Authored-By: walkerstop * Update keyboards/mt980/rules.mk Co-Authored-By: walkerstop commit 131b647a962ba676af8a9ea650cbad0d6b046a55 Author: yiancar Date: Tue Mar 12 22:15:32 2019 +0000 Minor readme fix (#5389) commit 2f3dbb1253839fad1bb2e20db8ef7b88c5fd331a Author: Takuya Urakawa Date: Wed Mar 13 03:48:17 2019 +0900 Add new keyboard Plaid and ATMEGA328p support (#5379) * add plaid * Change usb vid/pid to free id from vusb Trivial fix for vusb core * update readme * update info.json default keymap * fix typo * Replace copyright commit 37932c293c15011f883a91e91ee02631ead44a2e Author: James Churchill Date: Wed Mar 13 03:23:28 2019 +1000 Next set of split_common changes (#4974) * Update split_common to use standard i2c drivers * Eliminate RGB_DIRTY/BACKLIT_DIRTY * Fix avr i2c_master error handling * Fix i2c_slave addressing * Remove unneeded timeout on i2c_stop() * Fix RGB I2C transfers * Remove incorrect comment commit 25bb059e4e42ed2637202230ff3d8b765e1295cd Author: Naoki Katahira Date: Wed Mar 13 02:20:07 2019 +0900 [Keyboard] Lily58 Add info.json file (#5354) * Add info.json file * fix info.json * fix2 info.json * Update keyboards/lily58/rev1/info.json Co-Authored-By: kata0510 * Update2 keyboards/lily58/rev1/info.json Co-Authored-By: kata0510 commit 9e49f19a1a597f90b519f100b852d44493dcfd78 Author: zvecr Date: Tue Mar 12 14:38:05 2019 +0000 KPrepublic bm16a port (#5383) * Initial bm16a port * Initial bm16a port - fix readme formatting commit fe642a84fcf1a52cc761dca231244b7971742d00 Author: moyi4681 Date: Tue Mar 12 22:25:39 2019 +0800 Fix speed issues with RGB Matrix in the DZ60RGB (#5380) * Fix speed issues with RGB Matrix in the DZ60RGB * keep boards in sync commit 395a7793d1c39053e95a699b4c5dc6ae9c304584 Author: Callum Oakley Date: Tue Mar 12 14:21:51 2019 +0000 Keymap update (#5382) * home and end on fn layer (for forward and back with left hand) * space movement shortcuts * mouse layer commit e046872a80263df895a759a55e72ed51cfa70ae7 Author: Andrew Kannan Date: Mon Mar 11 23:47:50 2019 -0400 [Keyboard] Satisfaction75 Protoype/Rev1 split, and new VIA features (#5303) * Add satisfaction75 revision 1 * Update manufacturer * Add tester layout and update rev1 comments * Add ifdef guards for OLED for tester * Add oled disabling rules * Update to save backlight settings and setup for VIA custom config * Add new VIA values to satisfaction75 * Safety guard in clock set mode * Fix mistaken doc edit * Address PR comments * bring the default back to pass travis CI * Address further PR comments commit fd43259cbd09dda47087bb45aecf80a77cdc4c58 Author: jotix <47826561+jotix@users.noreply.github.com> Date: Mon Mar 11 20:53:25 2019 -0300 [Keyboard] Update rules.mk (#5370) MOUSEKEY_ENABLED = yes by default commit 99654c6e4f81d65a6ca3da592eb38ca710123b40 Author: zvecr Date: Mon Mar 11 23:52:04 2019 +0000 [Keyboard] Fix diode and split keyboard configuration for 40percentclub/half_n_half (#5371) commit 8ff4b4dba4026daa15dda1e275c2edf65ba4a3ef Author: Christian Westerlund Date: Mon Mar 11 22:02:31 2019 +0100 [Keymap] Small improvements to this keymap (#5343) * Small fixes, added tilde, print screen and switched alt keys * Comments * .. * Removed fn_actions block commit fe89aef77476d76f3bfe4682b0e9c8a54c8b5329 Author: DDRnJn Date: Mon Mar 11 16:53:22 2019 -0400 Add 3 new songs and add new note type (#5351) * Added 3 new songs and added new note type to musical_notes.h Added Megalovania from Undertale, Kataware Doki from Kimi no Na Wa and La Campanella by Lizst to song_list.h Added the breve (double whole note) and dotted breve note types to musical_notes.h. I included this because the default tempo is quite high, so I thought a note with higher duration was needed * Fixed indentation for new notes in musical_notes.h Changed tabs to spaces in indentation commit e88a75904b0c345d75b02bbf333dd171d31399ae Author: FateEverywhere <41215461+FateEverywhere@users.noreply.github.com> Date: Mon Mar 11 16:49:23 2019 -0400 [Keyboard] Add Stand Aside keyboard (#5360) * 412_64 move to handwired 412_64 and its second printing, Mark Zero Stand Aside, are now obsolesced by new hardware. As only two units exist in the wild not owned by me, I'm moving the definition to handwired. * Mark 3 Stand Aside ready for production. Uploading firmware, compiled and tested, for Mark 3 Stand Aside. The hardware's ready, now the software is too. * Whoops. Should've branched before pushing Stand Aside. Sorry 'bout that. * Revert "Whoops." This reverts commit d222046cfe6183ed0c42286ec9ebb5034a5d1009. * Revert "Mark 3 Stand Aside ready for production." This reverts commit c790899af7a6d92855aebe6a96003f1fe9be66b3. * Mark 3 Stand Aside ready. Initial commit for Mark 3 Stand Aside, ready for production. * Update keyboards/standaside/rules.mk noroadsleft suggested removal of a line, 'LAYOUTS = ortho_4x16'. I agree. Co-Authored-By: FateEverywhere <41215461+FateEverywhere@users.noreply.github.com> * Cleanup for pull request. Making changes requested by Drashna, as they're all good, and I know way less about the standards than they do. * Initial cleanup completion. Missed a few lines in standaside.c, they're cleaned up now. commit 863d54d2fc6c3fade2f6ce112277da1ac7fe3f6d Author: yiancar Date: Mon Mar 11 20:46:55 2019 +0000 [Keyboard] Mechboards Micropad (#5368) commit 2a2f41c6de868c06c06cf437cf7c2b875b8c53a4 Author: layne001365 Date: Tue Mar 12 03:41:16 2019 +0800 [Keyboard] Add HotDox keyboard (#5365) * Add HotDox * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/keymaps/default/keymap.c Co-Authored-By: layne001365 * * Update - keyboards/hotdox/config.h - keyboards/hotdox/hotdox.h - keyboards/hotdox/info.json - keyboards/hotdox/left.h - keyboards/hotdox/left.c - keyboards/hotdox/rules.mk * Replace EPRM with EPRM - keyboards/hotdox/keymaps/default/keymap.c - keyboards/hotdox/keymaps/eozaki/keymap.c - keyboards/hotdox/keymaps/kloki/keymap.c * Remove keymaps readme.md * Remove twimaster.h/ twimaster.c * * Update - remove FORCE_NKRO from keyboards/hotdox/config.h - keyboards/hotdox/hotdox.c - keyboards/hotdox/hotdox.h - keyboards/hotdox/keymaps/default/keymap.c - keyboards/hotdox/left.c - keyboards/hotdox/readme.md - keyboards/hotdox/rules.mk * Update keyboards/hotdox/keymaps/default/keymap.c Co-Authored-By: layne001365 * Update keyboards/hotdox/keymaps/default/keymap.c Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/hotdox.h Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/rules.mk Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 * Update keyboards/hotdox/config.h Co-Authored-By: layne001365 commit bf1e51ec22a8016aa02d84993241c6a85c562a0e Author: trinity1561 <47289299+trinity1561@users.noreply.github.com> Date: Mon Mar 11 14:35:59 2019 -0400 [Keyboard] Update info.json to include macro layout (#5364) * Update info.json Adding layout for the macro version. * Update info.json Changed the macro layout to match exactly like the non-macro version (split backspace and bottow row match) commit d2311afb664c5d640b446b11b43e5d47cddab60e Author: Jarred Steenvoorden Date: Tue Mar 12 01:15:08 2019 +1100 Add crkbd keymap (#5366) commit 5e093ad224fad5497f4f5360c8e430ea267ecac5 Author: zk-phi Date: Mon Mar 11 13:49:08 2019 +0900 [Keyboard] Add keyboard hifumi (#5341) * Add keyboard hifumi * Update keyboards/hifumi/Readme.md Co-Authored-By: zk-phi * Update keyboards/hifumi/Readme.md Co-Authored-By: zk-phi * Update keyboards/hifumi/Readme.md Co-Authored-By: zk-phi * Update keyboards/hifumi/keymaps/default/keymap.c Co-Authored-By: zk-phi * Update keyboards/hifumi/keymaps/test/keymap.c Co-Authored-By: zk-phi * Update keyboards/hifumi/Readme.md Co-Authored-By: zk-phi * Add DIODE_DIRECTION * Rename readme.md commit 0f67232035bc7d9129ab0b91edd3316841ef8cf2 Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun Mar 10 20:21:59 2019 -0700 QMK Configurator bugfix for KBDfans KBD19x (#5362) Configurator was assigning keys in the wrong order around the arrow keys and numpad. Rebuilt the layout contents from scratch. commit 61accb87942c4a314e0d2279943f3ec4e4823042 Author: Eric <34169078+elpeterson@users.noreply.github.com> Date: Sun Mar 10 23:11:45 2019 -0400 [Keymap] Underglow support for Launchpad (#5340) * added my launchpad * updated keymap with legends and fixed layout errors * Added default keymap with added layer for RGB controls and included the necessary config code * fixed layer orders * removed my personal keymap to clean PR * missed an underscore * updated readme * removed more unnecessary code * moved RGB code to its own config phone * moved underglow info to its own readme * removed redundant code from default_rgb config.h file, included QMK KEYBOARD H in place of initial defines in keymap.c * reverted launchpad config * removing the = because I can't figure out why its there * Revert "removing the = because I can't figure out why its there" This reverts commit e3b5e6d568e7225635844ba617aaef4f77727ce6. * reverted rev1/config.h * reverted all files I should not have touched * removing redundant code in rules.mk * readibility improvements to keymap commit eb48e5ebdb03231c29ab2eea06a996fd077daa69 Author: Joel Yauk Date: Sun Mar 10 22:09:56 2019 -0500 [Keyboard] Add ISO backslash key position to facew matrix and keymap files (#5190) * Add ISO backslash key position to matrix and keymap files * Use KC_NO instead of KC_BSLS for unused position in custom keymap * Add new key position to json layout file used by online configurator commit 9bea41c9b239916ae8786e7df02c29fad79ef459 Author: ai03 Date: Sun Mar 10 19:57:36 2019 -0700 [Keyboard] Add Orbit keyboard (#5306) * Get things working except indicators * Attempt to get things working * hmm * Compiles but doesn't run * Make data transfer work * Get all indicators working * Remove old transport * Prepare for pullreq * Revert keymap from testing to production * Final error checking for pull request * Remove autogenerated is_command from config.h * Rewrite pin toggles using qmk functions commit 92c19dae8cfa1bbeeaa447353ac4d7a96e42b330 Author: Wilba6582 Date: Mon Mar 11 12:41:50 2019 +1100 Fixed tap/down/up handling in dynamic keymap macros commit ad12acd3c049e1eef02ac21bb749eda375e09cec Author: the-frey Date: Sun Mar 10 17:17:43 2019 +0000 Add personal keymap for crkbd (#5208) * Add a crkbd layout with nkro on by default, and an emacs-friendly layout for clojure * Added readme and image * Add changes as requested on PR commit c8ad13d0f970c7f424ea5da48181ad449f4ae09f Author: moyi4681 Date: Mon Mar 11 01:15:53 2019 +0800 fix dz60rgb config.qmk.fm non-combile (#5356) * Update config.h * Update config.h * Update config.h * Delete config.h * Update config.h * Update config.h * Update config.h * Delete config.h commit 2b1b5fed2a4b9986efb268a4788dee404d061c84 Author: FateEverywhere <41215461+FateEverywhere@users.noreply.github.com> Date: Sun Mar 10 13:04:10 2019 -0400 412_64 move to handwired (#5359) * 412_64 move to handwired 412_64 and its second printing, Mark Zero Stand Aside, are now obsolesced by new hardware. As only two units exist in the wild not owned by me, I'm moving the definition to handwired. * Mark 3 Stand Aside ready for production. Uploading firmware, compiled and tested, for Mark 3 Stand Aside. The hardware's ready, now the software is too. * Whoops. Should've branched before pushing Stand Aside. Sorry 'bout that. * Revert "Whoops." This reverts commit d222046cfe6183ed0c42286ec9ebb5034a5d1009. * Revert "Mark 3 Stand Aside ready for production." This reverts commit c790899af7a6d92855aebe6a96003f1fe9be66b3. commit ff95c60e464256261777f3a5b159f121fa5d655d Author: Jarred Steenvoorden Date: Mon Mar 11 04:00:55 2019 +1100 Keymap / userspace update (#5358) * Update userspace with common config.h * Add my dz60, satan and xd75 keyboard keymaps * Fixing executable bits changed during last upstream merge * Cleanup unnecessary files and defines * Remove unnecessary defines from userspace config * Add underglow controls to dz60 function layer * Fixing merge conflicts * Fixing exectable bits changed during merge * Userspace update commit 9d915ed051c43edd828d6cdb784a5d094e9b312d Author: epaew Date: Sun Mar 10 01:22:21 2019 +0900 Update edvorak keymap simplify (#5350) * Update edvorakjp layouts * swap master hand * update tapping_term commit cd9e15036e692477d37a3c1a82c5ba1f29b8a11e Author: Vyolle <44031868+Vyolle@users.noreply.github.com> Date: Fri Mar 8 16:37:40 2019 -0600 Swapped Gui keys and Shift Keys. I think it's more ergonomic in this configuration. (#5347) commit fef206f661cc5d572549e91faa2d628493314510 Author: enkore Date: Fri Mar 8 17:11:08 2019 +0100 getting_started_build_tools: dfu-{util,programmer} now available from arch repo See https://www.archlinux.org/packages/extra/x86_64/dfu-programmer/ commit 7b768be784684ed9806374011c4f636aff3d243e Author: Blaž Hrastnik Date: Sat Mar 9 00:58:40 2019 +0900 Shallow clone submodules. (#5279) There's no need to fetch the entire submodule history if we only need the latest revision. Speeds up the download a fair bit. commit 3d446c6050b8dbb60e6d9be9247ed06b2af9d37a Author: Drashna Jaelre Date: Fri Mar 8 07:56:08 2019 -0800 [Docs] Update the KC_MAKE example in Userspace docs (#5337) This includes a much more feature rich version of the code, as well as updating for changes that have occurred in QMK Firmware commit fc87d9b0d5ff66b3ef71dcc1e87b7b2670970b83 Author: linyaofred <46751111+linyaofred@users.noreply.github.com> Date: Fri Mar 8 23:50:46 2019 +0800 fix wrong key order in qmk configurator. (#5342) commit 98b68bec53ee814310cfc003b5b51504951601ec Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu Mar 7 17:58:49 2019 -0800 [Keyboard] New Keyboard: MK60 (#5327) * intial commit * fix up some of the cookie cutter code * define pins used and size of switch matrix * enable lighting settings and bootmagic lite * create the appropriate LAYOUT macro * remove a comma for compilation errors * provide a suitable keymap * disable console and command due to firmware being too large * add Caps Lock LED support * Add QMK Configurator support * fix markdown rendering * fix mechmerlin to mechkeys commit 4a597e031fb2b4e9129f4e719bc20f2e72b0bbdf Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Thu Mar 7 20:13:02 2019 -0500 [Keymap] Smarter KC_MAKE code and removed duplicate MOD_MASK entries (#5331) * Change to predefined MOD_MASK codes * Remove duplicate predefined codes * Better reset keybaord logic * Cleaned up code as requested commit 81fae5c3063933d6a62d20e63b0dcd197130e183 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu Mar 7 17:06:04 2019 -0800 Add in mekanist's keymap. Thanks to MatthewRobo for assisting in creating some of his features (#5335) commit 234c117613fc85c17a1281980f85fef39feba917 Author: Dusty Pomerleau Date: Fri Mar 8 12:03:29 2019 +1100 Keymap update: Use `register_code16()` and its variants in lieu of separate mod registration (#5333) * use `register_code16` and relatives for tapdance code * rename tapdance keys to more closely mirror the `KC` names in QMK * additional naming change to match QMK style commit 6d4f6f3f4965e3e71d878c36da71b745cc18e345 Author: Dusty Pomerleau Date: Fri Mar 8 07:30:02 2019 +1100 [Docs] Add Tap Dance example to the docs (#5326) * add a tapdance example for creating advanced mod-tap and layer-tap keys * add optional curly braces to match QMK conventions * change example to use `register_code16()` and tapdance keycodes more closely matching QMK variants commit ba11a1c8072fd5d2f2d2914e76e9416be9ca1e11 Author: Felipe Coury Date: Wed Mar 6 17:49:16 2019 -0300 [Keyboard] Adds Gray Studio HB85 Initial Support (#5311) * Gray Studio HB85 Initial Support * Fixed README image * Updated README * Disabled Bootmagic and Console for HB85 * Fixed Numpad 4 matrix place * Fixes board crashing with RGB enabled * Moved HB85 files to gray_studio folder * Uses old i2c library since this version makes RGB underglow work * Improved default keymap with underglow control layer * Removes obsolete program and uses generic script instead As per zvecr feedback * Uses GPIO Functions to initialise and set RGB underglow PINS commit 33e9f1c75a6961fa25689aba2586fd0ef1fba75f Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Wed Mar 6 15:20:51 2019 -0500 [Keymap] Add KC_MAKE keycode to my userspace and keymaps (#5324) * Add keycode for KC_MAKE * Add KC_MAKE keycode * Add stanrc85.c file with KC_MAKE * Remove unused include * Improved KC_MAKE stolen from Drashna * Define mod mask for new KC_MAKE code * RESET board to flash after compiling * Remove send_string * RESET fixed in KC_MAKE commit be8257f0a784a07e7dd93ecafe96c1d7774383f7 Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed Mar 6 11:51:41 2019 -0800 [Keyboard] handwired/trackpoint: refactor and readme cleanup (#5325) * handwired/trackpoint: refactor - layout macro KEYMAP renamed to LAYOUT - keymap now uses #include QMK_KEYBOARD_H * handwired/trackpoint: readme cleanup - fix wiring layout image URL - update readme structure * handwired/trackpoint: rename readme to lowercase * handwired/trackpoint: update header files to use #pragma once commit da2eedc0c2587ee8d11ee94cb61e17b4e8717265 Author: jotix <47826561+jotix@users.noreply.github.com> Date: Tue Mar 5 20:59:11 2019 -0300 [Keyboard] re-arrange the pinout for backlight support (#5321) commit 3aa4d55beefc37e8f02e49a97424fd507d033d9b Author: Dusty Pomerleau Date: Wed Mar 6 10:46:05 2019 +1100 [Keymap] update: simplify tapdance code for Minidox/keymaps/dustypomerleau (#5315) * add dusty keymap * change keymap folder to match my github username * initial keymap completed in comments only * layout without NAV completed in comments only * disable Command to prevent interference with Space Cadet keys * switch _ and \ in the symbol layer * Layers complete through _NAV * add thumb keys to _NAV * complete _NUM * all layouts complete; still needs `process_user_record()` * completed first draft of keymap; still needs config.h to match * corrected keycodes for Mac macro-volume keys * fix Mac mute keycode * add missing Mac keycodes for previous and next track * placeholder for qwerty layout, not yet completed; remove unnecessary breaks; add todos * eliminate Preonic branch before switching to Minidox branch: • delete dustypomerleau Preonic keymap folder • complete keymap.c (QWERTY layer, vanilla numbers layer) TODO: • add preferences to config.h • complete the README * edit commented keymap diagrams for clarity in dual function keys * define initial config.h and add rules.mk for mouse key support * fix redundant line after implementation of tap_code() * fixed key_timer declaration, added README and rules * formatting of keymap * add CTPC to config * cycle thumb keys to favor center position * modify config.h for temporary Pro Micro compatibility * remove superfluous call to use serial; homebrewed mod tap keys are still broken with OSL * merge _SYS and _MEDIA on new Z_SYS key * ALT_OP example of new MT macro complete * initial narze-inspired MT fixes in PRU * add (currently superfluous) custom keycode for the _SYS layer * rudimentary `OSL` symbol macros that immediately register the mod and fail to reset the oneshot layer, but do output the proper keys—fix both of these things * remove permissive hold to improve tapping performance * remove calls to `clear_oneshot_layer_state()`, as they have no effect inside `process_record_user()`. Tapdance appears to be the way forward. * final commit before tapdance code; correct layout in comments * initial tapdance code for shifted mod taps * add numeric and ergo NUM layers and pinky shifts for keycuts * add TD() wrappers to tapdance codes and clean up commented layout guides * add faux return to cur_dance to allow compilation - TODO: research what the default clause should be in cur_dance * update commented schematics for better readability * add backspace and delete to lockable layers, Z_SYS -> SYS_Z for consistency, fix schematic errors * add `DOUBLE_SINGLE_TAP` to tapdance cases to allow doubling of the single tap character without waiting tapping term * remove reduced oneshot tapping toggles * update README * newline tweak :) * Update keyboards/minidox/keymaps/dustypomerleau/keymap.c Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * remove `PREVENT_STUCK_MODIFIERS`, as this is default behavior * enable extrakey in rules to enable media keys * enable extrakeys for media key compatibility on macOS * add dash and slash to _NUM layers * change to universal volume keycodes * revert micro volume adjustments to macOS-specific codes due to lack of functionality (macro volume adjustments are still universal) * fix image of _SYS layer in comments * more diagram fixes in comments * fix typo * simplify tapdance code * match _NUM_N to _NUM_E * move slash to allow better use of comma in number layers * match layer and keycode enums to the docs * correct qwerty numlock to match numeric numlock layer commit edef1f93960352bcc97ac75653867e23e3db45fc Merge: 2e8e46542 be1d5c660 Author: Drashna Jaelre Date: Tue Mar 5 15:07:13 2019 -0800 Update personal userspace and keymaps + improve custom functionality (#5289) * Change how desktop commands work * Add DST_MOD_MASK as a config option * DST_RMV → DST_REM * Add melody96:konstantin keymap * Update custom SEND_STRING * Move feature flags from userspace into keyboard rules * Use "Vo-", "Vo+" instead of "VoD", "VoU" in keymap comments * Add RGB controls and numpad Unicode to Melody96 keymap * Add RGB_SET keycode to Melody96 and RGB files to userspace * Generate UNICODE and UNICODEMAP constants using macros * Avoid collisions with X_* send string constants * Use two spaces before inline comments * Add _keymap versions of other custom Quantum functions Not added: eeconfig_update_keymap, eeconfig_read_keymap * Switch to UNICODEMAP in keyboard rules * Make toggle_numpad a nested function in process_record_user * Set Melody96 underglow color to Godspeed blue on EEPROM reset * Remove most _keymap and _user definitions in userspace Some keyboards misuse _user functions by defining them in the base files instead of the corresponding _kb functions (especially led_set_user and matrix_init_user). Until this is fixed (#5148), I've removed definitions in my userspace that could cause linking collisions. * Update GODSPEED_BLUE values and RGB mode keys * Add GODSPEED_YELLOW color * Set preferred intervals for rgblight effects * Update tap dance function names * Replace td_lshift_fn with generic td_mod_layer, add TD_RCTL_FN Move TD_FN_RCTL after TD_RCTL_FN * Replace td_fn_rctrl with generic td_layer_mod * Add blank lines, prefer explicit initialization * ACTION_TAP_DANCE_DOUBLE_MODS → ACTION_TAP_DANCE_DOUBLE_MOD * Update Godspeed colors * Add media controls to Melody96 keymap * Add SysRq, Break combos and other keys to Melody96 keymap commit 2e8e465423a92c97273431f8cf65c7333f2d98e7 Author: vxid <16440823+vxid@users.noreply.github.com> Date: Wed Mar 6 00:05:32 2019 +0100 [Keymap] Add vxid planck layout (#5271) commit 73d8593352b910d9fba0953b54141875f0689486 Author: Marco Monaco Date: Tue Feb 26 00:38:21 2019 -0500 increase size of note counter variable to avoid overflow commit dbfbe0d7f0d829fdebb3be5dff1c1dcc4b677568 Author: Christopher Browne Date: Tue Mar 5 15:22:51 2019 -0500 Adopted LAYOUT, added some keys (#5320) * Add HOME/END keys as upper/lower on arrow-up/down * Reduce .hex file size by turning off unneeded options * Put digit keypad onto left hand upon RAISE; this will sometimes be preferable to double-hits of right hand * Latest super latest version merge * cbbrowne keymap for XD75re * starting notes on XD75re keymap plans * First draft of bottom row of QWERTY * Switch my special bottom line over to QCENT * Dunno * Filling in wanted keys, bit by bit... * Add copyright, extra macro * Clean up comments, remove some experimental code I didn't like * TODO plans for xd75re * clean up keyboard layout * QCENT2 is my new experiment for the main keyboard... * Add a few more main layer keys, and modify LOWER to shift things outwards to conform with main layer * Clean up RAISE layer to conform with main layer, remove QCENT layer as QCENT2 is the new thing * More xd75 changes, now that I actually have it in hand * shift keymap around, as original attempt was a bit too aggressive in keeping to the edges * more revs to XD75 * Dropping parts of the centre keypad in favor of Keys I Really Need * Improve documentation to conform with how builds are done now * Improve documentation to conform with how builds are done now * Add cbbrowne rules file as alternative to having the rules in Makefile * Makefile not needed anymore for individual keymap * Some revs to my keymapping * Add {} * Add PGUP/PGDN * Shifted some middle-range keys around * Needed Tilde, Backquote, and to shift RESET onto FUNCTION layer * Wanted ~ * cbbrowne hasn't anything to do with hadron keymaps * trim unneeded bits * I prefer OrgMode for my notes * Have a right-alt * Layer keys make LED colors change * Add sample user rules for cbbrowne * Add source of xd75 rules * Individualized xd75 rules * Adopt LAYOUT to genericize the layout as an ortholinear 5x15 keyboard commit 8c2a23dee16077b5906ea090cd6fac268d0079f2 Author: Mitchel van Eijgen Date: Tue Mar 5 16:31:54 2019 +0100 Add more "decent" text editors (#5308) I'm a web designer and know there are several "decent" code editors out there, but I would figure not everyone into keyboards is, so I found Sublime text a bit of a hard sell for someone who just need to manipulate some text files. VS Code or Atom would b a much better suit for them instead of dropping $80 on a "decent" text editor. commit 69d6298f6ba4140dc7b3cec9da141ba9e533a367 Author: Eduardo Lourenço Pinto Neto Date: Tue Mar 5 12:28:35 2019 -0300 Add DZ60 Tsangan Layout + Fn layer (#5319) * Fix Mac mute keycode * Add DZ60 Tsangan layout with Fn layer * Add new line at end of the file commit 4c62c7bd6ed41966467985bc22b6b07350ff3991 Author: lf Date: Tue Mar 5 00:08:09 2019 -0600 [Docs] Fix function signature (layer_state_set_*) (#5313) `void uint32_t` is not a return type. commit a8a9a2066e28895c65ed50fa0e76bc0ed70abbfd Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon Mar 4 20:19:05 2019 -0800 Correct keyboard and layout dimensions for 40percent.club Foobar (#5310) commit a903893883c4827daca73e6e170276e4e586f6e0 Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon Mar 4 10:09:37 2019 -0800 Dactyl Manuform 5x6, 5x7, and 6x6: QMK Configurator fixes and partial code clean-up (#5307) * Tidy up 5x6.h - replaced tabs with spaces (QMK convention) - aligned layout macro visually * Fix Configurator support for Dactyl Manuform 5x6 - layout macro had the wrong name in info.json * Tidy up 5x7.h - replaced tabs with spaces (QMK convention) - aligned layout macro visually * Fix Configurator support for Dactyl Manuform 5x7 - corrected keyboard height - layout macro had the wrong name in info.json * Tidy up 6x6.h - replaced tabs with spaces (QMK convention) - aligned layout macro visually * Fix Configurator support for Dactyl Manuform 6x6 - layout macro had the wrong name in info.json commit 3e8ee96b2cf7187ab6923a844627bc37b4de9b81 Author: yiancar Date: Mon Mar 4 16:34:08 2019 +0000 Fixed default to dissable VIA (#5309) This should have gone into previous PR but I am dumb commit c7c4937eef9cb34b73e765390b842282ad9f0544 Author: James Churchill Date: Tue Mar 5 01:44:46 2019 +1000 Clean up debounce a bit (#5255) commit cdfcbfc92dba8198847e26056d8135a5feb0b5ec Author: zvecr Date: Mon Mar 4 14:29:29 2019 +0000 Fix aanzee Configurator config file (#5286) commit 7bfe0879bfa21c041ba256826158d5d03c8bcfe4 Author: yiancar Date: Mon Mar 4 14:28:33 2019 +0000 Separate keymaps to VIA enabled/dissabled. (#5302) * Separate keymaps to VIA enabled/dissabled. - Default rules.mk has been changed to disable via. - VIA keymaps have been added for default keymaps. * Update naming commit 043ef40b92deee76a048612e82436c1b25f03433 Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sun Mar 3 18:31:12 2019 -0500 [Keymap] Add RGB config and controls to userspace (#5299) * Add INSERT and EEP_RST to HS60 keymap * Add INSERT to keymap * Layer based RGB colors * Move RGB code to layer_rgb.c * New file with layer based RGB colors * Use RGB code if RGBLIGHT is enabled * Set RGB options in config.h * Remove rgb enable from init user commit 3305df8e79e02fb785650e9720923ea11e6bcf09 Author: Drashna Jaelre Date: Sun Mar 3 15:29:29 2019 -0800 Add LED Matrix to Features list for easy reference (#5280) commit a2a2ba0eec6aa5fffcc24d25d29883ccc0ae1816 Author: leico Date: Mon Mar 4 03:49:27 2019 +0900 [Keymap] layout/community/ortho4x12/symbolic update (#5274) * change readme.md * diy LayerTap function * fixed forgot update_tri_layer correspound permissive hold * update README * change No_event of general shift * update symbolic layout * merge symbolic_general_shift to symbolic layout * update README.md * following code style * delete excess codes, change codes that don't follows the code style commit 9b0a5486875089f64e21ef10a1c80503bed7bb80 Author: Ray Cielencki Date: Sun Mar 3 13:38:12 2019 -0500 [Keyboard] matrix_init_user shouldn't call itself (#5298) commit be497126e8466ca3125261dd821572a1aa63edb0 Author: omkbd Date: Mon Mar 4 03:36:40 2019 +0900 [Keymap] Update keymap.c (#5290) commit 33806947409e23dcba7cef75d2977d3cffc7cec8 Author: yttyx Date: Sun Mar 3 18:34:41 2019 +0000 Update Atreus layout to match the Niu layout. Fix Niu comment typo. (#5297) commit f9f04ff2a4318798a79e6ec242ae773fdb80b069 Author: KOBAYASHI Daisuke Date: Mon Mar 4 03:33:52 2019 +0900 [Keymap] Fix comment in the KBD67 default keymap. (#5296) commit 98b87e6357038eeb6d7049782821a66f348b7f6d Author: takashiski Date: Mon Mar 4 03:33:19 2019 +0900 [Keyboard] update Hecomi/alpha's info.json (#5295) * remove offset * update layout(I missed) * formatted commit b5d85ddc90e248317fb12832f7072dfbcccd48e5 Author: Adam Newbold Date: Sun Mar 3 13:29:27 2019 -0500 [Keyboard] Adding Numeric Keypad //e converter (#5294) * Adding Numeric Keypad //e to conversions * Update keyboards/converter/numeric_keypad_IIe/config.h //e -> IIe Co-Authored-By: newbold * Update keyboards/converter/numeric_keypad_IIe/config.h //e -> IIe and wrapped description in quotes for comma inclusion Co-Authored-By: newbold * Updating info.json for Configurator * Corrected legend * Update keyboards/converter/numeric_keypad_IIe/info.json Corrected layout Co-Authored-By: newbold commit 6aba3ce9d2bd108c5a7cc65625085505677fca17 Author: Ray Cielencki Date: Sun Mar 3 13:25:08 2019 -0500 [Keyboard] Add support for matrix_scan_user to usb-usb converter (#5291) * [Keyboard] Add support for matrix_scan_user to usb-usb converter * update to matrix_scan_quantum * also add init calls commit 79e0964d2194a26fc011547006a6fc3f8a99947a Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat Mar 2 17:08:42 2019 -0800 handwired/terminus_mini: refactor, Configurator support, and readme cleanup (#5292) * handwired/terminus_mini: refactor - white space changes in terminus_mini.h (alignment) - keymap now uses #include QMK_KEYBOARD_H - refactored TMK macros into QMK process_record_user - refactored TMK layer functions into QMK keycodes - removed redundant keycode definitions * handwired/terminus_mini: Configurator support * handwired/terminus_mini: readme cleanup - completed keyboard description - removed Hardware Availability line (it was blank) - updated Docs links commit be1d5c66093faa8885855a2d133ef20a408233bd Author: Konstantin Đorđević Date: Sat Feb 23 00:47:42 2019 +0100 Add SysRq, Break combos and other keys to Melody96 keymap commit 51182a4f03f2d0c6eef6a0bdd87529c7626e8eab Author: Konstantin Đorđević Date: Wed Feb 20 00:28:34 2019 +0100 Add media controls to Melody96 keymap commit f9c070e1a492b60f1c475302e82b17d9bcfc298c Author: Konstantin Đorđević Date: Tue Feb 19 15:20:11 2019 +0100 Update Godspeed colors commit 9baee84b36fbb9c506e593a2a9bca851ed67b8e8 Author: Konstantin Đorđević Date: Mon Feb 18 12:11:37 2019 +0100 ACTION_TAP_DANCE_DOUBLE_MODS → ACTION_TAP_DANCE_DOUBLE_MOD commit 6a088f7ff6b6e001fdac46252d75863b7611fd0d Author: Konstantin Đorđević Date: Mon Feb 18 06:08:52 2019 +0100 Add blank lines, prefer explicit initialization commit 14908f86fb97bb7ddc269515a48e681799baccf3 Author: Konstantin Đorđević Date: Mon Feb 18 06:00:05 2019 +0100 Replace td_fn_rctrl with generic td_layer_mod commit b05a4b1a4be36e00095eac3188b3b748c5fe1362 Author: Konstantin Đorđević Date: Mon Feb 18 05:41:03 2019 +0100 Replace td_lshift_fn with generic td_mod_layer, add TD_RCTL_FN Move TD_FN_RCTL after TD_RCTL_FN commit 1b3b9414b75e78db14daf61475c54007e8e5e0b9 Author: Konstantin Đorđević Date: Mon Feb 18 05:26:54 2019 +0100 Update tap dance function names commit 45dddfa6c27123ec6b598d561d3c3859882ccbad Author: Konstantin Đorđević Date: Mon Feb 18 04:34:55 2019 +0100 Set preferred intervals for rgblight effects commit fbe2eba4729a1d7b00b76243e146b5324d65976b Author: Konstantin Đorđević Date: Mon Feb 18 03:16:21 2019 +0100 Add GODSPEED_YELLOW color commit de2e03650bd4d6056513991d4481679e246667bb Author: Konstantin Đorđević Date: Sat Feb 16 17:26:39 2019 +0100 Update GODSPEED_BLUE values and RGB mode keys commit 8e0dfdfb5307e8b0abb2f6030c9147cfd12964c8 Author: Konstantin Đorđević Date: Sat Feb 16 18:26:27 2019 +0100 Set Melody96 underglow color to Godspeed blue on EEPROM reset commit f09a237a07f2a3a341f6c6972d2f87eec3235254 Author: Konstantin Đorđević Date: Mon Feb 18 00:44:31 2019 +0100 Remove most _keymap and _user definitions in userspace Some keyboards misuse _user functions by defining them in the base files instead of the corresponding _kb functions (especially led_set_user and matrix_init_user). Until this is fixed (#5148), I've removed definitions in my userspace that could cause linking collisions. commit 784e2af062a9ef0c6d1a4ef7fcc20df79ad4fab1 Author: Konstantin Đorđević Date: Sat Feb 16 18:05:01 2019 +0100 Make toggle_numpad a nested function in process_record_user commit be65a0cc7921a0f6a6397bd7682720b5bd7d9128 Author: Konstantin Đorđević Date: Sat Feb 16 18:03:59 2019 +0100 Add _keymap versions of other custom Quantum functions Not added: eeconfig_update_keymap, eeconfig_read_keymap commit bd43df53bdf0009a152251582a05046bbefb0858 Author: Konstantin Đorđević Date: Sat Feb 16 15:26:14 2019 +0100 Use two spaces before inline comments commit 5a41c06cd7dcf04f5a27ac9b2fa95399c65367d6 Author: Konstantin Đorđević Date: Mon Feb 18 05:01:24 2019 +0100 Switch to UNICODEMAP in keyboard rules commit 7b11d740eaad1aade1a8d1914aab54f2720ab7ba Author: Konstantin Đorđević Date: Tue Feb 12 00:18:52 2019 +0100 Avoid collisions with X_* send string constants commit ddb0f39ebf317c7a23c69ed45efb1882746a01b0 Author: Konstantin Đorđević Date: Mon Feb 11 23:21:41 2019 +0100 Generate UNICODE and UNICODEMAP constants using macros commit 2f07627a5dd38ab1370804f4feb1972250928803 Author: Konstantin Đorđević Date: Mon Feb 11 22:41:51 2019 +0100 Add RGB_SET keycode to Melody96 and RGB files to userspace commit d163b22dfbb4a9092e3b7fc2b18a679e03080a58 Author: Konstantin Đorđević Date: Mon Feb 11 22:04:59 2019 +0100 Add RGB controls and numpad Unicode to Melody96 keymap commit ea23035c53162ee88ca02533d49cb931fdce3bb2 Author: Konstantin Đorđević Date: Mon Feb 11 22:03:14 2019 +0100 Use "Vo-", "Vo+" instead of "VoD", "VoU" in keymap comments commit ef189da2439d8f0cf20a83756400a38310c1caeb Author: Konstantin Đorđević Date: Sat Feb 9 21:45:25 2019 +0100 Move feature flags from userspace into keyboard rules commit db1ace5426ab08842cec23e0da190ab222de6088 Author: Konstantin Đorđević Date: Fri Jan 11 07:55:47 2019 +0100 Add melody96:konstantin keymap commit 012c5ef9bdccc8d752481c3c1d35a0ef47b075c2 Author: Konstantin Đorđević Date: Thu Jan 31 16:02:24 2019 +0100 Update custom SEND_STRING commit f2543c3b9b63433f8f5f7aec9531f7ebddcce4fa Author: Konstantin Đorđević Date: Tue Jan 29 00:37:10 2019 +0100 DST_RMV → DST_REM commit 6695c874fb8660989a129691bbffc6225be67362 Author: Konstantin Đorđević Date: Mon Jan 28 09:05:35 2019 +0100 Add DST_MOD_MASK as a config option commit 6f386ca6ae82be9212700dbfeb73517d077bef5a Author: Konstantin Đorđević Date: Mon Jan 28 09:04:47 2019 +0100 Change how desktop commands work commit 6e48ea082dc27ac25bd0422e974cefe7a00788f6 Author: holtenc Date: Fri Mar 1 21:14:24 2019 -0800 [Keyboard] Initial commit for Prime_E w/ VIA config support (#5285) * Initial Prime_E commit * Via support for Prime_EXL * Backlight testing * update libs * Clean up and addition of VIA compatibility. * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/primekb/prime_e/keymaps/default/keymap.c Co-Authored-By: holtenc * Update keyboards/primekb/prime_e/keymaps/default/keymap.c Co-Authored-By: holtenc * Update keyboards/primekb/prime_e/keymaps/default/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/handwired/prime_exl/keymaps/via/keymap.c Co-Authored-By: holtenc * Update keyboards/primekb/prime_e/keymaps/default/keymap.c Co-Authored-By: holtenc * removed IS_COMMAND from config.h. updated GPIO commands * clean up libs commit 681db534f3e0e8efa3a9a03ae11b995e4a443ca9 Author: moyi4681 Date: Sat Mar 2 11:40:08 2019 +0800 [Keyboard] add dz60rgb ansi and hhkb support; add dz40rgb (#5231) * add dz60rgb keyboard * add info.json * Update config.h * Update rules.mk * Update dz60rgb.h * Update dz60rgb.c * Update keymap.c * Update dz60rgb.h * Create readme.md * Update readme.md * Update keymap.c * Update dz60rgb.h * Update info.json * Update info.json * Update dz60rgb.c add dz60rgb ansi, iso and hhkb support * Update dz60rgb.h add dz60rgb ansi, iso and hhkb support * Add files via upload * Add files via upload * Delete config.h * Delete keymap.c * add ansi,iso and hhkb layout * add dz60rgb ansi,iso and hhkb layout * Update keyboards/dztech/dz40rgb/dz40rgb.c Co-Authored-By: moyi4681 * Update keyboards/dztech/dz60rgb/keymaps/hhkb/config.h Co-Authored-By: moyi4681 * Update keyboards/dztech/dz60rgb/keymaps/hhkb_iso/config.h Co-Authored-By: moyi4681 * Update keyboards/dztech/dz60rgb/keymaps/iso/config.h Co-Authored-By: moyi4681 * Update keyboards/dztech/dz40rgb/rules.mk Co-Authored-By: moyi4681 * Update keyboards/dztech/dz60rgb/keymaps/ansi/config.h Co-Authored-By: moyi4681 * Update keyboards/dztech/dz60rgb/keymaps/default/config.h Co-Authored-By: moyi4681 * Update keyboards/dztech/dz40rgb/keymaps/default/config.h Co-Authored-By: moyi4681 * Update dz40rgb.c commit d8ccabeeef6e2a2fc3c26b2e3da8b75306f98c4d Author: zvecr Date: Sat Mar 2 03:33:05 2019 +0000 [Keyboard] Convert mf68_ble to keymap (#5287) * Initial refactor of handwired bluetooth mod to keymap * Initial refactor of handwired bluetooth mod to keymap - strip out unnecessary duplicate config, update readme * Initial refactor of handwired bluetooth mod to keymap - reduce firmware size * Initial refactor of handwired bluetooth mod to keymap - update readme image commit d5f01ad2f91e7eb8df46a936a73114469209cabc Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Fri Mar 1 14:09:49 2019 -0500 [Keymap] Added INSERT to my keymaps (#5284) * Add INSERT and EEP_RST to HS60 keymap * Add INSERT to keymap commit f4a2e58182dcccd418be07deff19bcdba88b7ddb Author: Andy Date: Fri Mar 1 18:12:20 2019 +0100 HS60 v2: Instructions how to reset and flash (#5241) * HS60 v2: Instructions how to reset and flash * HS60v2 README using place holder for keymap commit 7abf507cb67ea84022673e673c9dddf065975890 Author: unausgeschlafen <44818163+unausgeschlafen@users.noreply.github.com> Date: Fri Mar 1 17:45:42 2019 +0100 [Keymap] unausgeschlafen quefrency keymap (#5273) * unausgeschlafen quefrency keymap * added build & flash instructions * review by drashna commit 5c491da0e7d1c107e549acc7449afc081ef1b8c5 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri Mar 1 08:33:29 2019 -0800 [Keymap] Fix rgblight_enable ifdefs (#5283) commit 41d8be7e75e68f41cdc890d7b9f99ba8d58990d4 Author: Dan Date: Fri Mar 1 11:28:46 2019 -0500 [Keymap] DCompact Layout Updates pt. 3 (#5209) * Fix whitespace and Markdown errors * Add DCompact layout implementation for Levinson keyboard * Rename README.md to readme.md * Rename README.md to readme.md * Rename README.md to readme.md * Update keyboards/keebio/levinson/keymaps/dcompact/keymap.c Co-Authored-By: loksonarius * Update keyboards/keebio/levinson/keymaps/dcompact/keymap.c Co-Authored-By: loksonarius commit a1de199aa9d86d0c325985825e07d5d769a5d786 Author: yynmt <45400583+yynmt@users.noreply.github.com> Date: Fri Mar 1 13:12:56 2019 +0900 [Keyboard] Add Dozen0 (#5272) * Add Dozen0 macropad * Fix readme image * Add info.json * Fix keymap f12 * Fix copyright and replace include guards * remove IS_COMMAND at config.h commit f6a0ee85fd7c4a2452d0f42bd948746525194009 Author: Dusty Pomerleau Date: Fri Mar 1 10:27:34 2019 +1100 [Keymap] update: add extrakey support for macOS media keys (#5263) * add dusty keymap * change keymap folder to match my github username * initial keymap completed in comments only * layout without NAV completed in comments only * disable Command to prevent interference with Space Cadet keys * switch _ and \ in the symbol layer * Layers complete through _NAV * add thumb keys to _NAV * complete _NUM * all layouts complete; still needs `process_user_record()` * completed first draft of keymap; still needs config.h to match * corrected keycodes for Mac macro-volume keys * fix Mac mute keycode * add missing Mac keycodes for previous and next track * placeholder for qwerty layout, not yet completed; remove unnecessary breaks; add todos * eliminate Preonic branch before switching to Minidox branch: • delete dustypomerleau Preonic keymap folder • complete keymap.c (QWERTY layer, vanilla numbers layer) TODO: • add preferences to config.h • complete the README * edit commented keymap diagrams for clarity in dual function keys * define initial config.h and add rules.mk for mouse key support * fix redundant line after implementation of tap_code() * fixed key_timer declaration, added README and rules * formatting of keymap * add CTPC to config * cycle thumb keys to favor center position * modify config.h for temporary Pro Micro compatibility * remove superfluous call to use serial; homebrewed mod tap keys are still broken with OSL * merge _SYS and _MEDIA on new Z_SYS key * ALT_OP example of new MT macro complete * initial narze-inspired MT fixes in PRU * add (currently superfluous) custom keycode for the _SYS layer * rudimentary `OSL` symbol macros that immediately register the mod and fail to reset the oneshot layer, but do output the proper keys—fix both of these things * remove permissive hold to improve tapping performance * remove calls to `clear_oneshot_layer_state()`, as they have no effect inside `process_record_user()`. Tapdance appears to be the way forward. * final commit before tapdance code; correct layout in comments * initial tapdance code for shifted mod taps * add numeric and ergo NUM layers and pinky shifts for keycuts * add TD() wrappers to tapdance codes and clean up commented layout guides * add faux return to cur_dance to allow compilation - TODO: research what the default clause should be in cur_dance * update commented schematics for better readability * add backspace and delete to lockable layers, Z_SYS -> SYS_Z for consistency, fix schematic errors * add `DOUBLE_SINGLE_TAP` to tapdance cases to allow doubling of the single tap character without waiting tapping term * remove reduced oneshot tapping toggles * update README * newline tweak :) * Update keyboards/minidox/keymaps/dustypomerleau/keymap.c Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * remove `PREVENT_STUCK_MODIFIERS`, as this is default behavior * enable extrakey in rules to enable media keys * enable extrakeys for media key compatibility on macOS * add dash and slash to _NUM layers * change to universal volume keycodes * revert micro volume adjustments to macOS-specific codes due to lack of functionality (macro volume adjustments are still universal) commit beb292e7f01712f1b8dd7bd3a2d4469e814bb567 Author: Luciano Malavasi Date: Thu Feb 28 13:02:16 2019 -0800 [Keymap] My TMO50 layout (#5116) * keymap + alpha * some fixes * keymap + alpha * some fixes * drashna changes * linked main Alpha repo in keyboards/alpha readme * missed a spot * there's another function called FUNC lol * keymap + alpha * some fixes * keymap + alpha * drashna changes * Fixed include * Revert "Fixed include" This reverts commit ea92f261f86d8433eab313cde498adca1682a006. * messed up my git, fixed include * starting work on TMO50 layout * Update keyboards/tmo50/keymaps/default/keymap.c Co-Authored-By: PyrooL commit 8dd1dab7cbeb5e149f71b63637574e8408475015 Author: avatak <35812371+avatak@users.noreply.github.com> Date: Thu Feb 28 20:35:42 2019 +0000 Added two songs to song_list.h (FF Prelude and To Boldly Go) (#5252) Adds FF_Prelude (from most Final Fantasy games) and TO_BOLDLY_GO (a melody from the main themes of Star Trek TNG and the original series) commit 7470317d95574487a7dd42f94421d5a954eb924c Author: Tobias Schulte Date: Thu Feb 28 21:33:02 2019 +0100 [Keymap] use steno mode from base (#5220) commit 9b82a9295f413ce7a7d7ce18d95011b92f6d4d56 Author: Graham P Heath Date: Thu Feb 28 14:15:38 2019 -0600 [Docs] Add note about using Unicode Hex Input (#5248) * Add note about using Unicode Hex Input * Update docs * remove extra return, oops commit 220551ed5fa3fc2a6ead4a182bad189b21ab40cc Author: fauxpark Date: Fri Mar 1 07:06:26 2019 +1100 [Keyboard] GH60 Satan improvements (#5264) * GH60 Satan improvements * Link no worky * Accidentally a h * Use MOD_MASK_SHIFT from core * Remove nonexistent layouts from here commit 32b63d676fbfd3a71764459cd89c428ccbde7ddd Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Thu Feb 28 15:02:22 2019 -0500 [Keymap] Cleaning up my config and userspace files (#5265) * Removed since options are in userspace * Removed RGB option that was breaking one of my builds * Remove unused options * Removed options present in userspace, add board specific options here * Removed code also present in userspace * Turns out those lines were needed, added them back * Testing changes * Added code to ensure board read as ANSI instead of default ISO for HS60 * Setting \ key to "MOD" instead of "ALPHA" for lighting commit a872faa53e1b9b9651d3f6ffe6d671e0e211309c Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu Feb 28 11:37:34 2019 -0800 [Keymap] Userspace Keymap Updates (#5215) * enable velocikey for my userspace and explicitly for my 75% layout * add guards to only turn on RGB stuff if the RGB pin is actually defined * update 60_ansi keymap * update the 60_ansi_split_bs_rshift keymap * update 66_ansi keymap * update docs * Update layouts/community/60_ansi/mechmerlin-ansi/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update layouts/community/66_ansi/mechmerlin/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update layouts/community/60_ansi/mechmerlin-ansi/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update layouts/community/60_ansi/mechmerlin-ansi/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * remove my attempt to find a good way to detect this * move audio clicky into user space and do feature setting per keyboard * fixup 66_ansi keymap * update changelog * update readme commit 3ac3bb9b5e5fb2363983f9b0d0fcb38d7148ac16 Author: Juno Nguyen Date: Fri Mar 1 03:12:32 2019 +0800 [Keymap] Added personal keymaps for Planck, Preonic, Vitamins Included by Juno (#5169) * Added personal keymaps for Planck, Preonic, Vitamins Included by Juno * Removing redundancies as suggested * More removals that were missed out in the previous commits * Updated Preonic to use new layout * More redundancies missed out * Updated more optimal code for FN layer LED indicator. * Further codes clean up. commit 95d2a11c446deb3220f4a7aafa8ac6933fada0a9 Author: Christoffer Holmberg Date: Thu Feb 28 16:11:52 2019 +0200 Update Nyquist layout (#5270) * Add Home,End,Insert,Del to Arrow layer * Add Back & Forward to Arrow layer * fix typo commit a120a000d481ed14a87988383be46c5a76604bb6 Author: zvecr Date: Wed Feb 27 15:20:45 2019 +0000 Add Configurator support and readme for boardwalk (#5261) * Add configurator support and readme for boardwalk * Readme review comments commit a0c36ed25318e863d5c47cf2b80423abd934c198 Author: zvecr Date: Tue Feb 26 21:49:05 2019 +0000 [Keyboard] Add configurator support for 40percentclub/half_n_half (#5260) commit dcf4877facd0afbb40a603f931a4fe6e10d7c26d Author: Jeri Mason Date: Tue Feb 26 13:17:28 2019 -0800 Bucktooth 2.0 key layout for Preonic (#5258) Updated layout slightly for better compatibility with sculpted (row-specific) profile keysets. Fix build error on rev 3 toolchain; click waits don't seem to be necessary anymore. commit 659e5d6316893d4b1b5709000d842da6a2fa0cbb Author: mcmadhatter Date: Tue Feb 26 21:05:18 2019 +0000 [Keymap] Hs60 win osx dual (#5249) * Added a dual windows/osx layout Default layer is normal ISO for windows. Second layout is Windows ISO layout but for OSX, but with the keys corrected so you will get the correct shifted and alt'd keys on OSX (keyboard keys match OSX keys without having to change your keyboard type in system preferences). Layer three is configuration and other functions, and layer four is where the shifting magic happens. Also tab and caps lock have been swapped around. * made sure bootmagic is in a seperate rules.mk made sure bootmagic is in a seperate rules.mk * commiting the keymap rules.mk commiting the keymap rules.mk commit 168b0cf64d539e88436b1d93f5d2ad65db1c8591 Author: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Tue Feb 26 22:04:28 2019 +0100 Added a numpad keymap for the vitamins included keyboard (#5247) * Fixed pin for RGB * Added numpad keymap for vitamins included * Implemented changes commit bcaf66bd3238b5a69c7ec5910a116c5668e1695c Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Tue Feb 26 16:01:46 2019 -0500 [Keymap] Converted stanrc85 community layout to userspace (#5244) * Convert community layout to userspace for future use * Big readme update * Move layer toggle to CAPS * Readme updates * Deleted since unused * Removed call to unused .c file commit 11bdf28001382239949541e0442aa170eb561c41 Author: jotix <47826561+jotix@users.noreply.github.com> Date: Tue Feb 26 13:12:56 2019 -0300 LAYOUT_ortho_4x4 (#5257) commit 0d936b2fe6a2518f2562c59f7f84692590d77aa0 Author: fauxpark Date: Wed Feb 27 02:59:34 2019 +1100 Ask for your name when generating a new keyboard (#5214) * Ask for your name when generating a new keyboard * Update docs * Apply suggestions from code review Co-Authored-By: fauxpark commit 7ba2bc765be62f969668847797b7eb3e6665db48 Author: Stick <8531041+nstickney@users.noreply.github.com> Date: Tue Feb 26 01:26:39 2019 -0500 [Keymap] nstickney's layout for iris (#5045) commit 80ddb344152e4ef6663f9b079677b8154fcffbec Author: VM Date: Tue Feb 26 00:30:26 2019 -0500 [Keymap] adding my Levinson keymap (#5177) * [keymap] adding my Levinson keymap pretty self explanatory, added the readme, just in case tested it just now, seems to work fine for my needs * Update keymap.c removing the deprecated persistent layer function as Drashna kindly reminded me * Apply suggestions from code review incorporated the suggestions, and thanks again for taking care of me with my silly changes :) Co-Authored-By: OMGVee * Fix up audio calls commit 7a89b39aadc347a9bbb73601b52ac65704f09da8 Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Mon Feb 25 21:16:20 2019 -0500 [Keymap] HS60 v2 keymap updates (#5250) * Add backlight controls * Add backlight controls and remove RGB underglow * Make HS60 board specific changes to readme * Remove BL_TOGG as it isn't use on this board commit 5838c458d74b6a4af6c65a9d6cdf346db999e980 Author: Nick Christus <136611+nchristus@users.noreply.github.com> Date: Mon Feb 25 19:24:11 2019 -0600 [Keyboard] Added Boardwalk keyboard (#5195) * initial commit * removed key for fn layer * added missing row, misc cleanup * added nchristus keymap, more misc cleanup * Updating ergo60.h, rules * Adding McAllaster keymap * added a bunch of keymaps * added LED code * added userspace * ls vitamins keymap * added Boardwalk keyboard * boardwalk: removed unrelated files * boardwalk: undoing tkc1800 change * boardwalk: undoing tkc1800 change * nchristus keymap cleanup * boardwalk: updates per PR feedback * boardwalk: updated bootloader * boardwalk: additional updates from PR review commit f019cd12a5c88ae50db97e996dd0d6b476b75d77 Author: yttyx Date: Tue Feb 26 01:09:42 2019 +0000 [Keymap] Balance Twelve-based layout for Niu Mini (#5228) * Balance Twelve-based layout for Niu Mini. * niu - Changes following review. * niu - Changes following review. commit 36fce12d080a4dd37a00f504396bd94b7a06e203 Author: zvecr Date: Tue Feb 26 01:07:58 2019 +0000 [Keyboard] Initial refactor of maxipad to conform to current standards (#5233) commit 303859ea284ebd08e305ac1bd907aee399f5a01d Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon Feb 25 17:05:22 2019 -0800 handwired/magicforce68: refactor, Configurator support, and readme cleanup (#5234) * handwired/magicforce68: refactor - layout macro KEYMAP renamed to LAYOUT - keymap now uses #include QMK_KEYBOARD_H - keymap now uses non-auto-prepended keycodes per QMK standard. - deleted deprecated and unused action_get_macro block from default keymap. * handwired/magicforce68: Configurator support * handwired/magicforce68: readme cleanup - updated to current QMK template - rename file to lowercase - fix make commands - Add Docs links commit 65db4042603af6592b8433e384397eb880e5e1f5 Author: Andy Date: Tue Feb 26 02:04:15 2019 +0100 [Keymap] HS60 v2 ISO layout andys8 (#5235) commit d7e3d718d0bd0225c8f2887561cd483461c0a04c Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon Feb 25 17:03:36 2019 -0800 Some minor refactoring of boards in 1upkeyboards directory (#5236) * use #pragma once * get rid of code for unused indicators * pragma once and other small fixes for consistency * use #pragma once * pragma once and other small fixes for consistency * add a short blurb to the readme * turn on compiler optimization flags * remove the compiler optimization * remove compiler optimization for super16 commit da5e9043061ae3baadc7922acddf15dc92bffb7b Author: Danny Nguyen Date: Mon Feb 25 00:12:33 2019 -0500 Fix pinout for Quefrency left half w/macros commit 7276cc24d070925667061251436f45534e2b5918 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon Feb 25 16:59:40 2019 -0800 [Keyboard] KBDFans Minor Fixes (#5238) * pragma once and turn on bootmagic lite * pragma once changes and turning on bootmagic lite * switch to using pragma once * switch to using #pragma once * switch to using #pramga once commit 2c1963d583f51a6ac1d90e7c330781c036b25f16 Author: takashiski Date: Tue Feb 26 09:51:09 2019 +0900 [Keyboard] Hecomi conf (#5246) * add info.json * update readme * remove info.json from no rule.mk folder commit c4451f450570bf6dd858661410a383b2ad4f16dc Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Mon Feb 25 11:02:40 2019 -0500 Corrected HS60 v2 keyboard name in info.json (#5242) * Corrected keyboard name in info.json * Updated maintainer to yiancar commit 79acf1e6602a20a5d82bd70e4fc7b2b34ec2207a Author: Adam Price Date: Mon Feb 25 11:01:50 2019 -0500 atreus default keymap `pagedown` didn't match comment instructions (#5245) commit c1cb95d953f387292640a6df1198b9e97e29497b Author: Hackerpilot Date: Sun Feb 24 20:00:26 2019 -0800 Clear up the confusion between the kbd67/kbd65 naming. commit d093678458ef6e0cb7f4fac1c66df6d3d8f564dd Author: Brian Schott Date: Sat Feb 16 00:00:58 2019 -0800 Update readme.md commit 2fe21c67c597fbb99ee8fae989e227c3c359a2ca Author: Brian Schott Date: Fri Feb 15 23:56:17 2019 -0800 Update readme.md commit 1c2b3143d089c29a898bbfb9ac6a4e12bcab7dba Author: Brian Schott Date: Fri Feb 15 23:55:45 2019 -0800 The code in this directory supports the KBD65 commit d5dcf54e23a39d9d55e99ff9b27ee7d1347bcc1a Author: Konstantin Đorđević Date: Mon Feb 25 00:21:09 2019 +0100 Fix indentation in quantum_keycodes.h (#5221) commit c8de0f78bfa729e610566d41a31aa1615369a597 Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sun Feb 24 18:14:55 2019 -0500 [Keymap] Initial upload of stanrc85 HS60 v2 layout and config (#5217) commit 6f30a6b4079684742c147741b98414b1b2350b0b Author: Fred Silberberg Date: Sun Feb 24 17:57:16 2019 -0500 [Keymap] Added a key to handle copy/paste in and out of a terminal (#5205) commit a69e4406d4ab0a43077bc130dabda536b4fda9ab Author: Tobias Schulte Date: Sun Feb 24 04:32:48 2019 +0100 Fix Tx Bolt ghosting second character on key press (#5229) * convert tabs to spaces * fix #4578: don't call gemini protocol code when in bolt mode Add missing break; statements in switch. The missing break resulted in a fall through and an additional processing of the gemini code. commit 0f62383be57d2e3dacc79a76973295c73e805038 Author: skullydazed Date: Sat Feb 23 17:25:25 2019 -0800 Clueboard 66% Hotswap Support (#5204) * Initial Clueboard 66% arm support * Fix LAYOUT_66_ansi * wip * Bring this branch up to date with led_matrix * Get Clueboard 66% hotswap working with led_matrix * stm32 cleanup * Fix compiling for clueboard 66% hotswap prototype * Reduce the size of the prototype firmware commit 539a6fc8255b5a9f0173dca0b9b6bd94c12a51f4 Author: SpacebarRacecar <42380065+SpacebarRacecar@users.noreply.github.com> Date: Sun Feb 24 02:22:55 2019 +0100 removed old keymaps (#5227) commit 58d035dccc0ef283cf845f53b2edd5722f502932 Author: KOBAYASHI Daisuke Date: Sun Feb 24 10:22:20 2019 +0900 Keymap: Update Koba's keymap for Ergo42. (#5223) commit 791cdd6e3122c3c70904155c0b14b4ad3612dc86 Author: Campbell Barton Date: Sun Feb 24 12:21:01 2019 +1100 Update readme.md (#5230) Correct comment. commit db26d0fbd883bcdc44fc7bcc0b6888de046ca73e Author: mechmerlin Date: Fri Feb 22 08:28:04 2019 -0800 edit the readme to mention the NYM96 since it's the same PCB and is currently on sale at Massdrop commit 24a8bc3fd00ecb435c5d34e72dc7768fbf76e14a Author: jotix <47826561+jotix@users.noreply.github.com> Date: Fri Feb 22 13:47:42 2019 -0300 Jotix keymaps (#5203) * jotix 4x12 keymap * readme corrections * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x4 keymap * jotix ortho 4x4 keymap * jotix keymaps commit 50139d9c5948e802bdb84489e0859fbacafdcec9 Author: TerryMathews Date: Fri Feb 22 11:46:05 2019 -0500 Candybar: remove mousekeys as default (#5210) Binaries compiled at config.qmk.fm are oversized for the MCU. Adjusting default options to compensate. commit c3cf9c0cef2283cce65ad025402b14ad021dc1dc Author: jotix <47826561+jotix@users.noreply.github.com> Date: Fri Feb 22 13:08:25 2019 -0300 Jotpad16 (#5212) * jotix 4x12 keymap * readme corrections * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * jotix ortho 4x12 keymap * add jotpad keyboard * add jotpad keyboard * backlight pin for arduino pro micro * readme correction * readme correction * jotpad16 * Update keyboards/handwired/jotpad16/jotpad16.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/handwired/jotpad16/keymaps/default/keymap.c Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/handwired/jotpad16/readme.md Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> commit e3621c162c32dd12ede78f6e2936724fc1dabcf1 Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat Feb 23 01:07:31 2019 +0900 fix rgblight_effect_breathing interval time (#5213) commit 384fef72d3a08f6bdc4e8557caf0bb78953dab32 Author: noroadsleft Date: Thu Feb 21 15:24:44 2019 -0800 Replace instances of KEYMAP with LAYOUT Many instances in the QMK Docs referenced KEYMAP macros, which is outdated terminology. Replaced most instances of KEYMAP with LAYOUT, to reflect the desired usage. commit 8a2346eda1e9fbdec71adf023a1337d5536fe1fa Author: SpacebarRacecar <42380065+SpacebarRacecar@users.noreply.github.com> Date: Thu Feb 21 18:39:04 2019 +0100 [Keymap] Added preonic and mechmini 2 keymaps (#5202) * added mechmini2 keymap * added preonic keymap * changed readme * correction to mechmini 2 readme * changes to preonic keymap commit 9c73a4a5c6814d09b47ec9d0778051435c047fa3 Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu Feb 21 09:24:59 2019 -0800 Grammar cleanup of Flashing Your Keyboard Newbs Guide (#5201) Fixed references to a "built" (sic) command, and an incorrect word. commit 0c607f8bf78a735466d0e761bc339393a522e2ee Author: jotix <47826561+jotix@users.noreply.github.com> Date: Thu Feb 21 14:08:28 2019 -0300 [Keyboard] add jotanck keyboard (#5192) * add jotanck keyboard * Update keyboards/jotanck/config.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/config.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/config.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/config.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/jotanck.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/jotanck.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/jotanck.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * requested changes * Update keyboards/handwired/jotanck/readme.md Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * add backlight support * add default keymap image to readme * add default keymap image to readme commit c1c5922aae7b60b7c7d13d3769350eed9dda17ab Author: Chris Lewis Date: Fri Feb 22 02:22:46 2019 +1100 Velocikey: Match RGB animation speed to typing speed (#3754) * Draft commit of typing speed RGB control * More information in the readme * Support all RGB animation modes (Fixes #1) * Added support for all RGB light modes to use typing speed Except christmas lights because that is seizure-inducing at high speeds! * Introduced a value range specific to each RGB mode Because some modes are a little too much when running at full speed! * Update readme.md * Update readme.md * Re-arrange typing_speed definitions (Fixes #5) (#6) * Re-arrange variable definitions to avoid including quantum.h from rgblight.c * Fix a compilation error when trying to run make test:all * Tweaks to the typing speed decay rate * Renamed to momentum; moved implementation into dedicated files * Groundwork for toggling momentum on/off (currently always on) * Add EEPROM toggle for momentum-matching * Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic * Move momentum decay task out of rgblight_task() * Fix missing momentum.h in lufa.c * Experimental LED support (untested) * Draft commit of typing speed RGB control * More information in the readme * Support all RGB animation modes (Fixes #1) * Added support for all RGB light modes to use typing speed Except christmas lights because that is seizure-inducing at high speeds! * Introduced a value range specific to each RGB mode Because some modes are a little too much when running at full speed! * Update readme.md * Update readme.md * Re-arrange typing_speed definitions (Fixes #5) (#6) * Re-arrange variable definitions to avoid including quantum.h from rgblight.c * Fix a compilation error when trying to run make test:all * Tweaks to the typing speed decay rate * Renamed to momentum; moved implementation into dedicated files * Groundwork for toggling momentum on/off (currently always on) * Add EEPROM toggle for momentum-matching * Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic * Move momentum decay task out of rgblight_task() * Fix missing momentum.h in lufa.c * Added documentation * Renamed feature to velocikey * Reverted readme to original state * Correct the readme title * Updated feature name in the docs * Update EECONFIG name * Add compile-time toggles for velocikey * Update feature documentation * Revert "Merge branch 'led-support' into master" This reverts commit e123ff5febf61639b9a9020748e1c2e2313460ff, reversing changes made to df111a55b9d4929182e16108b1c0ead15b16df97. * Move velocikey EECONFIG definition to depend on VELOCIKEY_ENABLE * Rename decay_task function to decelerate * Apply suggestions from code review Co-Authored-By: chrislewisdev * Re-order eeconfig definitions * Apply coding conventions * Apply #ifdef check in lufa.c * Refactored interval time checks into one functionc * Small rename * Fix unused function error for layouts not using all rgb effects * Only update EEPROM if Velocikey is enabled * Incorporate code review feedback * Small adjustment to top-end decay rate * Add Velocikey documentation to table of contents * Bring tetris:default keymap size down by disabling audio commit 9f1d781fcb7129a07e671a46461e501e3f1ae59d Author: Johannes Jansson Date: Thu Feb 21 02:27:27 2019 +0100 Updated hand wiring docs (#5198) * renamed KEYMAP to LAYOUT in hand wiring docs * added two additional guides for hand wiring commit de0fb39403e8dbf8c94937c91768debf3c570b62 Author: Chris Lewis Date: Thu Feb 21 09:46:30 2019 +1100 Reduce tetris firmware size by disabling default audio (#5197) commit 657b44cb7cc445575d1f506a78cebd4aa59787e6 Author: Hannes Hornwall Date: Wed Feb 20 21:48:46 2019 +0100 Make escape work after changing the backlight settings on the HS60 V2 (#5193) commit eb7a821c5bc345ea64a1eb08c19b852516ba4696 Author: noroadsleft Date: Wed Feb 20 11:45:36 2019 -0800 Markdown cleanup on Config Options doc Descriptions for B5_AUDIO, B6_AUDIO, and B7_AUDIO under Hardware Options were partially italicized when parsed by Docsify, though rendered as intended by GitHub. commit b6e1e6aeeb2e2affce36a302ae0e14c07c8772c8 Author: tw1t611 Date: Wed Feb 20 17:33:53 2019 +0100 [Keymap] Add kinesis layout. (#5183) * Add kinesis layout. * Remove unneeded code. commit 67495ae24a98a2d7965ba5dda9b1d133caf606ca Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue Feb 19 20:57:15 2019 -0800 [Keyboard] Alf X1.1 QMK Support (#5189) * initial commit * get rid of vanilla cookie cutter code and replace with more correct info * edit config file for pins and switch matrix size * turn on bootmagic lite, and backlight/rgb settings * copy pasta switch matrix from noroads tool * create an appropriate keymap (copy pasta) * disable some features to decrease firmware file size * add qmk configurator support * add in support for caps lock, scroll lock, and num lock leds commit 8ae83b490eb3f8ebc696c9531dff49bdfecd26ed Author: Ben Date: Wed Feb 20 05:49:22 2019 +0100 [Docs] Fix typo in RGB Matrix Driver configuration (#5182) * Fix #3797 firmware not compiling If DRIVER_COUNT 1 firmware will not compile. * Fix typo commit ffb75b720fd0d4d28ed0ae99b66313c06df47183 Author: mechmerlin Date: Mon Feb 18 10:17:47 2019 -0800 move sixshooter into bpiphany directory and edit readme commit 33f1259f89f9d752c9507c5a2cb19a9286cf1388 Author: mechmerlin Date: Tue Feb 19 14:40:37 2019 -0800 get doro67 led working commit 9a64c6b82ef7fc46e35f7d8c35eeccf3961ba0bf Author: zvecr Date: Tue Feb 19 00:48:52 2019 +0000 [Keyboard] XD84 fixes for caps lock led, backlight and firmware size (#5178) * Enable backlight * Enable Link Time Optimization * Enable caps lock led commit 030faf951cb99840394c56803958f249383e9362 Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue Feb 19 06:55:20 2019 +0900 Fix `quantum/split_common/matrix.c: select_col()/select_row()` (#5174) * add temporary pdhelix(Patched Helix) code * add test code into quantum/split_common/matrix.c * add test code into keyboards/handwired/pdhelix/ * Revert "add test code into keyboards/handwired/pdhelix/" This reverts commit 9ed98f0797ddd962c99756689fc4ecb4cd067d3d. * Revert "add test code into quantum/split_common/matrix.c" This reverts commit 1876d3ed69f6c213153a9f6476192be839f16c1f. * Revert "add temporary pdhelix(Patched Helix) code" This reverts commit 41ac92b814e3f894eaf85bc3e5bb945895342fa8. * fix quantum/split_common/matrix.c: select_col()/select_row() commit 100697ebab662b3c19299cf0002d77bac3f00ca6 Author: Drashna Jaelre Date: Mon Feb 18 12:32:38 2019 -0800 Stop all notes on startup, if there is no song and audio is disabled to prevent continouse tone (#5173) commit 149015e799b5d5df49f7e22aa7bce8f607afdd28 Author: Jumail Mundekkat Date: Tue Feb 19 05:00:33 2019 +1100 Fixed grep issue in bootloader build target (#3848) * Changed use of '\s' in grep to '[ \t]' for portability * Pushed DFU Keyboard.h into a shell script * Fixed execution permissions on make_dfu_header,sh commit 0cee0764fd9d53d6bb835e2db2340f2541870386 Author: upinthecloudz <46974709+upinthecloudz@users.noreply.github.com> Date: Mon Feb 18 09:59:08 2019 -0800 Fix Espectro Mac keymap and add new layout option (#4923) * Fix Espectro Mac keymap and add new layout option * Fix keymap * Fix keymap commit feee01192eacdbbdc92e76f965d6c93c695b2d2d Author: Drashna Jaelre Date: Mon Feb 18 09:53:38 2019 -0800 Fix Audio Clicky by adding missing punctuation (#5171) commit 1a6a2a7b75dec3b20311bc6d89923fde3222ba1c Author: zvecr Date: Mon Feb 18 17:03:44 2019 +0000 Relocate usb_detach to utils (#5121) * Relocate usb_detach to utils * Relocate usb_detach to utils - fix up files after move commit 545f95c8f49b8714a2fe2d0fa0f849f305cc7ca3 Author: fauxpark Date: Mon Feb 18 13:51:55 2019 +1100 Migrate ACTION_LAYER_TAP_TOGGLEs to TT() commit efef54032bddadcaf8b2a138121a6fda382b271a Author: Yan-Fa Li Date: Mon Feb 18 08:50:22 2019 -0800 [Docs] Add section about EEPROM on ARM (#5070) * [Docs] Add section about EEPROM on ARM * Add Preonic firmware * Update docs/faq_build.md add hyperlink Co-Authored-By: yanfali commit fc069869896c279f175d2d5acf1ef545278c7102 Author: zvecr Date: Mon Feb 18 16:49:51 2019 +0000 Remove CUSTOM_MATRIX option from diode direction (#5090) * Remove CUSTOM_MATRIX refs from DIODE_DIRECTION * Remove '#define DIODE_DIRECTION CUSTOM_MATRIX' * Remove CUSTOM_MATRIX refs from DIODE_DIRECTION documentation commit 7639edb0aeea7b16f49cad9963d32b7eace9434d Author: zwnk Date: Mon Feb 18 13:49:11 2019 -0300 [Keyboard] handwired dactyl with 2 pro micros added (#5113) * handwired dactyl with 2 pro micros added * dactyl_promicro README updated * dactyl_promicro default layout fixed * requested changes * dactyl_promicro README updated * qmk toolbox link fixed * layout reflects phys. keys positions commit 0e68b6c1a9f5223fa1dc6b18d9204137b4edd921 Author: Rys Sommefeldt Date: Sat Feb 16 13:57:06 2019 +0000 Add UK variant of the SEND_STRING() LUTs commit 3d4aabf251a06cd78867cb71ac41af3c158b042e Merge: 66a86bc50 2cd2078b9 Author: Drashna Jaelre Date: Mon Feb 18 08:36:41 2019 -0800 Update Helix 'led_test' keymap (#5168) Change to use keyboard_post_init_user() hook (#3113) commit 66a86bc50cef34dc7cabc241cf3778a323d7e6f7 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon Feb 18 08:36:12 2019 -0800 [Keymap] update keymap and readme for my 75% layout (#5166) commit f0edc993b7beb15cc9c0443677801daddcae710b Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon Feb 18 08:35:34 2019 -0800 [Keyboard] Winkeyless Directory (#5163) * introduce wkl directory and readme * move bface into winkeyless directory and edit readme for new make instructions * move bmini into the winkeyless directory and edit readme * move bmini ex into winkeyless directory * edit readme some more * add newbs guide to readmes * fix path to bface * temporarily turn off community layout support until we refactor this taking out all the custom ps2avrgb stuff commit 593d08d6aec38aca6f38db4a17f3d8cdcd13bf28 Author: zvecr Date: Mon Feb 18 16:33:10 2019 +0000 [Keyboard] Add LAYOUT_75_iso community layout support (#5161) * Add LAYOUT_75_iso community layout support * Add LAYOUT_75_iso community layout support - review comments commit 2cd2078b9d84449996dc0b01c8ad8cd0b56d9372 Author: mtei <2170248+mtei@users.noreply.github.com> Date: Mon Feb 18 19:01:37 2019 +0900 Update Helix 'led_test' keymap Change to use keyboard_post_init_user() hook (#3113) commit 5cb713148dbc319167517df370ca9dd774ceb31c Author: Konstantin Đorđević Date: Mon Feb 18 07:23:32 2019 +0100 Change Command keycode defaults to match corresponding Bootmagic codes (#5078) * Change Command keycode defaults to match corresponding Bootmagic codes * Make alternate magic key keycodes consistent * Reflect changes from previous commit in tmk_core/common/command.c * Remove unnecessary MAGIC_KEY_* definitions from keymaps compatible with these changes * Swap E and BSPACE for MAGIC_KEY_EEPROM * Add MAGIC_KEY_EEPROM_CLEAR instead of MAGIC_KEY_EEPROM_ALT * Remove BOOTMAGIC_ENABLE checks around EECONFIG stuff * Update Command descriptions commit 4e2369693f7f2ef654db35d158af5cddb98d9703 Author: Konstantin Đorđević Date: Mon Feb 18 04:05:12 2019 +0100 Move RGBLIGHT_LIMIT_VAL definition from rgblight.c to rgblight.h (#5167) commit 657d05593491f7d4d1346f0f06f9972fdbde9095 Author: zvecr Date: Mon Feb 18 01:47:01 2019 +0000 Inital port of xd84 (#5164) * Inital port of xd84 * Inital port of xd84 - review comments commit 278a6c74f34784dde307d6d024aaea0e783c1f3f Author: Olivia Briggs Date: Sun Feb 17 13:28:10 2019 -0500 Add Olivia's TMO50 layout commit dc5933aff7d948c1bb1e6199259509f20d170768 Author: James Churchill Date: Sun Feb 17 17:31:47 2019 +1000 Add clang-format section to contributing.md commit ae9439a3f984641b8bc4c1e0d5c5c1818e0b2e32 Author: James Churchill Date: Sat Jan 19 13:06:19 2019 +1000 Add .clang-format file commit 4eb7248401bb852cca637a061400cd13ac410bb6 Author: rfvizarra Date: Sun Feb 17 17:44:27 2019 +0100 [Keymap] rfvizarra's custom PK60 layout (#5156) * rfvizarra's custom PK60 layout * Update keyboards/playkbtw/pk60/keymaps/rfvizarra/keymap.c Co-Authored-By: rfvizarra * Update keyboards/playkbtw/pk60/keymaps/rfvizarra/readme.md Co-Authored-By: rfvizarra commit 7cbfd8d4a112f8d6afe24bd5bfe23c4e593a622b Author: QMK Bot Date: Sun Feb 17 15:42:49 2019 +0000 convert to unix line-endings [skip ci] commit 3b2a484a5b9b0ddc2e110d5bc40f249ee62352d6 Author: fauxpark Date: Mon Feb 18 02:38:46 2019 +1100 Remove redundant KC_TRNS and KC_NO fillers in remaining keymaps (#5154) commit 8911870b45325a6c5626dbe63fbc7daf4423adca Author: Thomas Spurden Date: Sun Feb 17 15:36:50 2019 +0000 Add isolike iris layout (#5157) Keeps it simple and most keys in a similar position (at least relative to other keys) to a standard ISO layout. commit feabafd1f42138a4b31596dfa3b6eebe5a5f7605 Author: takashiski Date: Sun Feb 17 14:44:08 2019 +0900 define new keyboard "Hecomi" (#5147) * update pinout for matrix * first commit * include split_common.h * change split_common.h to split_util.h * update config.h * update keymap & config * update * remove K70, add K77 * fixed test keymap * add Layer * define to HHKB pro 2 based keymap * change authoer name * define LAYOUT and LAYOUT_KC * replace from LAYOUT_KC to LAYOUT * change name hecomi_alpha to hecomi/alpha * fixed hecomi_alpha to hecomi/alpha * remove unnecessary files * update readme * add DEFAULT_FOLDER * remove hecomi_alpha because change name to hecomi * remove bad LAYOUT macro * remove IS_COMMAND macro * remove unnecessary RGB options * Update keyboards/hecomi/hecomi.h Co-Authored-By: takashiski * Update keyboards/hecomi/hecomi.h Co-Authored-By: takashiski * Update keyboards/hecomi/alpha/rules.mk Co-Authored-By: takashiski * Update keyboards/hecomi/alpha/rules.mk Co-Authored-By: takashiski * Update keyboards/hecomi/hecomi.h Co-Authored-By: takashiski * remove endif * update rule.mk with suggestions commit 39b5958ae8dbcf374ab68366838acb5cbd380d94 Author: QMK Bot Date: Sun Feb 17 05:38:26 2019 +0000 convert to unix line-endings [skip ci] commit e2d3c92199d6cc42a39c5d8729dfff61d78dd7d1 Author: fauxpark Date: Sun Feb 17 16:36:02 2019 +1100 Remove redundant KC_TRNS and KC_NO fillers in default keymaps (#5152) commit 338ca3569ac5b76f55b0664cf9d6eef11211b6b2 Author: zvecr Date: Sun Feb 17 03:13:58 2019 +0000 Add docs on using keyboard_post_init_user to enable debug modes commit 2cee371bf125a6ec541dd7c5a809573facc7c456 Author: ishtob Date: Sat Feb 16 21:39:30 2019 -0500 Haptic feedback generalized - DRV2605 and solenoids (#4939) * initial work to add eeprom to haptic feedback and decouple the feedback process from keyboards * Haptic feedback enhancements: on/off toggle working, feedback order working todo: -work on modes switching -get modes switching to save to eeprom * haptic enhancement - eeprom and modes added * Added set and get functions for haptic feedback * initial implementation of solenoids under haptic feedback * changed eeprom to 32 bits to reserve blocks for future features * start documentation of haptic feedback * change keycode per comment from reviewers * typo fixes * added eeprom for solenoid configs * added solenoid and docs * Add/fix default parameters configs, improve docs * more doc cleanup * add in solenoid buzz toggle, clean up doc * some fixes for error in compiling solenoid * fix a chibios specific i2c read function and added one for AVR controllers in DRV2605L.c * fixes for avr side issues * update keymap * fix keymap compile error * fix bugs found during solenoid testing * set pin that is not powered during bootloader * added warning about certain pins on the MCU may trip solenoid during DFU/bootloader commit a7a647b7f6d707e9c952461beeca1f3637039d36 Author: Rodrigo Feijao Date: Sun Feb 17 02:34:07 2019 +0000 Add support to XD60 Rev3 (#4938) * Add preliminary support to XD60 Rev3 PCB (Supports the 12 underglow LEDs, but split spacebar still not wired/implemented). * * xd60_rev3 folder removed * xd60 rev2 and rev3 added * ifndef replaced with pragma once at rev3 config.h * Readme updated * new updated statement at keyboards/xd60/readme.md Co-Authored-By: rodrigofeijao * Update keyboards/xd60/readme.md Co-Authored-By: rodrigofeijao * Update keyboards/xd60/readme.md Co-Authored-By: rodrigofeijao * Update keyboards/xd60/readme.md Co-Authored-By: rodrigofeijao * Update keyboards/xd60/readme.md Co-Authored-By: rodrigofeijao * * XXXXX removed and replaced with 7X * removed unecessary declarations * Update keyboards/xd60/keymaps/styr/keymap.c Co-Authored-By: rodrigofeijao * action_layer.h include removed * * action_get_macro removed * IS_COMMAND() removed * BOOTLOADER defined commit 16226274c9d217ebca0fefdd957b1e07181d3b46 Author: Drashna Jaelre Date: Sat Feb 16 18:30:14 2019 -0800 Add numpad_5x6 layout support for Prime M keyboard (#5149) * Add numpad_5x6 layout support for Prime M keyboard * fix default layout commit cbb7e91851fea0174a5e950c22c35a4384eac8e7 Author: Drashna Jaelre Date: Sat Feb 16 18:28:04 2019 -0800 Update Drashna user space code to support keyboard_init functions (#5138) * Update code to support keyboard_init functions * Get Minor tweaks commit c8577a9a7320ee0f68378b63b39b649f92016857 Author: VM Date: Sat Feb 16 21:21:01 2019 -0500 [omgvee:keymap] minor changes and fw size optimizations (#5150) - flags for the linker - added INSERT key as I kinda use it for work fairly often - turned on more things in rules.mk since I recovered space via linker flags and whatnot commit f2d597d1d3b31ffd77b8fd0c143f9bb27d617f2b Author: Øyvind Wilhelmsen <46304257+oeywil@users.noreply.github.com> Date: Sat Feb 16 17:11:56 2019 +0100 Planck Keymap for oeywil (#5145) * adding my keymap * fixed includes * removed comments * removed keymap_config_t commit bbd4b5eb887a9e5065765d2d6f2ac919d81a38c6 Author: fauxpark Date: Sun Feb 17 03:11:15 2019 +1100 Remove redundant KC_TRNS and KC_NO fillers in layouts (#5142) commit 3309e91e0b6c7edc0c164e25ff1638c4852b40e7 Author: Rys Sommefeldt Date: Sat Feb 16 00:59:03 2019 +0000 [Keymap] Add new layout for wilba_text WT8-A (#5141) commit e04e55c8720cf8fdd3d31ce07b4723042775a67d Author: fauxpark Date: Sat Feb 16 11:18:13 2019 +1100 Remove redundant KC_TRNS and KC_NO fillers in userspace (#5140) commit 83de3dff013f56cbdb66a1cc422f0e8d6bb7aebb Author: Rys Sommefeldt Date: Fri Feb 15 22:40:56 2019 +0000 [keymap] Add new keymap for TADA68 (#5120) * Add new layout for TADA68 * Remove unnecessary KC_TRNS defines from tada68/mattgemmell and tada68/rys commit 6f50c7eba19c5b9e60387e70928300a86f0d4816 Author: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> Date: Fri Feb 15 20:32:31 2019 +0100 Added APA102 support (#4940) * Fixed pin for RGB * Re-did apa102 stuff * changed to use pincontrol functions * Removed a newline? * Changed to comply with project style commit 2ba54690e68892fe789a50bb1611af329ec2e438 Author: Daniel H Klein Date: Fri Feb 15 11:25:02 2019 -0800 Fix height in info.json for Unigo66 (#5137) * UniGo66 keyboard added * UniGo66 keyboard added * case correction of unigo66 files * create sirius folder * Update keyboards/sirius/unigo66/rules.mk Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/danielhklein/keymap.c Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/default/config.h Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/danielhklein/config.h Co-Authored-By: danielhklein * debugging * correct keymap to layout * readme * remove common config * suggested changes to config.h * default keymap cleanup * bug fixes * fixed height in info.json commit 222380c6364f9891b32e5b677e6cbf3c9e7cf801 Author: Jayesh Vora <45797218+jayeshvora72@users.noreply.github.com> Date: Fri Feb 15 11:35:48 2019 +0530 Fix documentation about one shot tap toggle Based on conversation with Drashna on Discord, we know that if ONE_SHOT_TAP_TOGGLE is 5, then tapping a one shot mod key 5 times holds the one shot key permanently, but to come out of this, you need to press the same key only once. commit 9b3f397ab2aa62c2b8417fa62ff3a4650e3d35ec Author: Eduardo Lourenço Pinto Neto Date: Fri Feb 15 14:58:38 2019 -0200 Update README.md (#5135) Update to new structure commit ecdf14bb62c85a4d6a79de44283452d5707dd5e7 Author: Eduardo Lourenço Pinto Neto Date: Fri Feb 15 14:23:44 2019 -0200 Update keymap.c (#5136) Fix minor bug on toggle layer code from Mac to Windows layer. commit 642f6cf14f2bcc91af61b0d64b4ad0632622dc7a Author: Erovia Date: Fri Feb 15 15:52:04 2019 +0100 Add support for using ranges for RGB (#4981) * Add support for using ranges for RGB This patch adds support for controlling continuous ranges of RGB LEDs. Helper functions for split boards are also available. * RGB Range: Use hardware-platform agnostic wait commit f3bdd436a3e8e37e274fcd1147eb13e05b24fe98 Author: Yan-Fa Li Date: Fri Feb 15 06:50:28 2019 -0800 Update KC_GESC documentation (#5053) * Update KC_GESC documentation - document caveats on OSX and expected behavior with KC_GESC and GUI - clarify documentation slightly - give examples of expected output in actual use * Update OSX -> macOS * Captilization * remove simply commit d04485e32c58503eae857a2b0b8b84ecc2d2880e Author: Samuel Jahnke <118westmaine@gmail.com> Date: Fri Feb 15 06:49:02 2019 -0800 Add samuel's literate keymap file for planck (#4998) * added my own keymap * changed thing * updated keymap Samuel * updated laypout for better one handed use * updated stuff I want * happy with my lagout * formatting * Added new literate config * made everything nice * cleaned * fixed spelling and two small bugs in macros * Made press and lift function for modifiers commit f61c99fdda6b05a64b06b718fbb0ff5db71d8bfd Author: zvecr Date: Fri Feb 15 14:47:47 2019 +0000 Remove duplication of ssh keys and fix usage on PR builds (#5013) commit cd369b710796505fb0dbcfafed546597eee3786d Author: Konstantin Đorđević Date: Fri Feb 15 15:46:42 2019 +0100 docker_build.sh: Run container in interactive mode (#5088) * docker_build.sh: Run container in interactive mode * Add message about QMK Toolbox * Update Docker docs commit cc146e32dcc32c0213c501d734c8c9d61c974ee5 Author: Drashna Jaelre Date: Fri Feb 15 06:37:44 2019 -0800 Improve RGB Light code (#4326) * Improve RGB Light code * Add is_rgblight_initialized as an externed value in rgblight.h * Use remander of hue commit 68fad7b777e629b9837b1f60080a21386002c444 Author: Shihpin Tseng Date: Sat Feb 9 00:12:43 2019 +0800 Enable custom chibios sub-platform commit 7c2bee8b8848d2dbfb3ff1f9d5bdd7558fd74b26 Author: fauxpark Date: Fri Feb 15 16:01:40 2019 +1100 Swap KBD75 caps lock LED pin levels (#5132) commit 1e1b55fbdf61c5a8b6aa8642e3743e4e193d9956 Author: Ben Date: Fri Feb 15 06:00:57 2019 +0100 Improve Encoder documentation (#5130) commit d7754a19b97d65f878a3eaafe379db025bffd3bf Author: Konstantin Đorđević Date: Fri Feb 15 05:55:31 2019 +0100 Remove problematic unicode_map stub definition in process_unicodemap.c (#5110) * Remove problematic unicode_map stub definition in process_unicodemap.c * Add unicode_map declaration to process_unicodemap.h * Disable UNICODEMAP on converter boards that don't use it commit 3a3de84e40262a6cb19767740a4620f821625377 Author: fauxpark Date: Fri Feb 15 15:44:27 2019 +1100 Tweak issue templates (capitalisation mostly) (#5133) * Tweak issue templates (capitalisation mostly) * Consistent headings commit c22f3ba3a2605280b81829a764c29c9e01ae674f Merge: cc5c6b449 7d8c62993 Author: Drashna Jaelre Date: Thu Feb 14 20:36:20 2019 -0800 Debounce refactor / API (#3720) * Added xeal60 via clone of lets split * Delete removed other keymaps * Basic keymap (no FN). Compiles. * Removed NP_STAR and NP_SLSH. * Removed "debounce_algo = manual" in all keyboards with CUSTOM_MATRIX = yes. * Changed order of rules in TMK. Documented feature. * Fixed missing whitespace in debounce documentation Table wasn't working due to missing newline. * Added bold in a few areas. * DO NOT USE - Removed debounce from TMK. * Remove accidental xeal60 commit * DO NOT USE - debounce successfully compiled. * DO NOT USE Revert back to original API to support split_keyboards. * Working eager_pk * Whitespace cleanup. * Restored debounce.h since there wasnt any real change. * Moved debouncing_time variable to inside #if debounce * Removed check for custom_matrix. We can safely include the debounce file for compilation when custom_matrix is used. * Removed #include "matrix.h" from debounce.h * Bug fix - was using MATRIX_ROWS instead of num_rows * Fixed compilation error with debounce_sym_g * Renamed DEBOUNCE_ALGO to DEBOUNCE_TYPE * Malloc array in debounce_eager_pk, since split keyboards only use MATRIX_ROWS/2. * Fix compile error in debounce_eager_pk * Stricter, leaner DEBOUNCE_TYPE section in common_features.mk. Cleanup debounce_type.mk commit cc5c6b449a4a36fc56fa5896b2b8f120e4bb0b31 Author: Drashna Jaelre Date: Thu Feb 14 20:18:54 2019 -0800 Add kb and user level keyboard initialization functions (#3113) * Add suspend functions * Disable RGB code if it's disabled * Add keyboard_init functions * Change where references so it will compile * Wrong command chained in wake up kb function * Fix non-feature file changes * Add documentation * Re-add matrix init docs * add rgblight code to example * Remove suspend code * Clean up docs * Fix docs * Fix suspend code * more doc fixes * change function to startup_* rather than keyboard_init_ * fix spelling error * fix up docs to finish removing keyboard_init * Use Pre and Post init functions * Update Documenation * Remove changes to my keymap and userspace code * Cleanup * Revert changes to extra files * Forgot a semicolon * Make sure all protocols call keyboard_setup * Cleanup functions * Unset startup_user * Remove changes from division keyboard * Readd startup_user function * Remove all to startup_user * Update docs/custom_quantum_functions.md Co-Authored-By: drashna * Update docs/custom_quantum_functions.md Co-Authored-By: drashna * Add suggestion line * Rebase fixes * Update documentation to be more useful/accurate * Cleanup of documentation * Fix spacing inconsistency * Revert unexpected change to keymap commit 40e67a3074293bc8e96574e7d603a943d3ca8d38 Author: zvecr Date: Fri Feb 15 04:14:26 2019 +0000 Add a mechanism for force building a particular community layout (#5027) * Add a mechanism for force building a particular community layout * Add docs for FORCE_LAYOUT argument * Update output name when FORCE_LAYOUT is enabled commit 85022f8bb5129f7118b55556c1ce85bc7d721356 Author: Drashna Jaelre Date: Thu Feb 14 20:12:37 2019 -0800 Fix ARM Audio issues and its EEPROM persistence (#4936) * Don't click if turning audio off On ARM, playing the click when turning off audio causes the audio get stuck and continually play the tone * Fix Audio EEPROM support for ARM * Update touched files to conform to QMK Coding Conventions * Add better check for ARM EEPROM support commit 9e4ac6cf29e6b2ce950135c8f877c95f2d1f1d55 Author: fauxpark Date: Fri Feb 15 15:07:13 2019 +1100 Migrate fn_actions for default keymaps (#4935) * Migrate fn_actions for default keymaps * Rename the Grave/Escape Shift masks * No need for shift_esc_shift_mask * Change breaks to return false * Right align pointers * Add default case * Separate cases with empty lines commit d5bc7fc1575543eb27cffcc465a8f0c4e11b7de7 Author: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Fri Feb 15 10:52:58 2019 +0900 Add makefile target 'show_build_options' and 'show_all_features' (#5048) * Add makefile target 'show_build_options' and 'show_all_features' Example: ``` $ make planck:default:show_all_features QMK Firmware 0.6.266 Making planck/rev5 with keymap default and target show_all_features PLATFORM = AVR FIRMWARE_FORMAT = hex Build Options: BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = no SLEEP_LED_ENABLE = no NKRO_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = no MIDI_ENABLE = no UNICODE_ENABLE = no BLUETOOTH_ENABLE = no AUDIO_ENABLE = yes FAUXCLICKY_ENABLE = HD44780_ENABLE = Other Features: API_SYSEX_ENABLE = no RGB_MATRIX_ENABLE = no ``` * remove duplicate 'SPLIT_KEYBOARD' * add .PHONY, change 'echo' -> '@echo' * update show_options.mk: useing variable BUILD_OPTION_NAMES, HARDWARE_OPTION_NAMES and OTHER_OPTION_NAMES * update show_options.mk: add KEYBOARD,KEYMAP * update show_options.mk: add sorting * update show_options.mk: add show_full_features, add $(origin XXX) * update show_options.mk: Macro names was collected from keyboards/. * update show_options.mk: add some Macro Names commit a08be85780692021943bb11fb716d91994ddb223 Author: Drashna Jaelre Date: Thu Feb 14 13:28:14 2019 -0800 Add pin initializiation for KBD75 (#5129) So that the LED indicator actually works commit 1e6797b4e7d888f0c0449e3cd577dc83eb4c4525 Author: Danilo Vulicevic Date: Thu Feb 14 21:09:27 2019 +0100 [Keymap] Add my personal userspace and update my keymaps (#5128) * Add billypython userspace and dz60 keymap * Disable Bootmagic in dz60:billypython keymap * Update whitefox:billypython keymap with userspace changes Also remove numpad layer commit ce465c084bfdfb3dbd24414397b2542176da423d Author: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu Feb 14 07:07:32 2019 -0800 Updates to noroadsleft keymap for KC60 (#5127) * NUBS_Z: initial version Create a keycode that is normally Z, but KC_NUBS when tapped while Alt is being held. This removes the possibility of using an Alt+Z shortcut. * NUBS_Z: modification Modify NUBS_Z macro to only use alternate operation if Right Alt is being held, rather than responding to either Alt key. Also add QMK version keycode to System layer, Equals key. * Remove unneeded breaks from process_record_user * Macro refactoring - removed G_RST and G_C10R macros - updated G_BRCH macro - outputs `master` if used while Shift is held down; or my git alias for the current branch otherwise - updated G_FTCH macro - outputs `git pull upstream ` if used with Shift; `git fetch upstream ` otherwise - swapped `modifiers` variable for `get_mods()` function directly for checking modifier state - swapped keymap-level modifier mask macros for QMK-core mod mask macros (thanks vomindoraan #4337) - renamed MODS_RALT_MASK to MOD_MASK_RALT (more consistent with the above change) * Update readme files commit 54f18ce0f71efbcb1306cbfe620ed2ad42ee31bc Author: Drashna Jaelre Date: Wed Feb 13 21:11:56 2019 -0800 [Keymap] Update to Drashna keymaps and Userspace (#5122) * Proper rules include * Minor tweaks * Minor tweaks * Add Desitny 2 Swapped layout support * Add keycode to keylogger * Convert my viterbi keymaps * Fix Orthodox keyboard * Add more default layers * Make default layer keycodes more optimized * Update gitlab CI yaml file * Rev6 Cleanup * Fix KC_MAKE macro * Update GitLab CI yaml file * More GitLab CI changes * One final GitLab CI change * Optimize KC_MAKE * Reformatting of config * Feature creeeeeeep * Planck Rev6 updates commit 9841c64de98a0d993e791137d5db482ee96e06ae Author: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Thu Feb 14 00:08:22 2019 -0500 Fix ESC on Default ANSI layer (#5125) commit 64712731495b241dcab29c96c2ccb650a3aa39fd Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed Feb 13 19:49:04 2019 -0800 [Keyboard] KBD19x Bootmagic Enable (lite) and other fixes (#5126) * set bootmagic from no to lite and put in a note in the readme * use pragma once * discovered a compile error when testing with default keymap. The inlined led functions need to be externed in the .c file * might as well turn on mouse keys as well commit 31b75c75fd0408c7ef15d15892a369f8a271e551 Author: Frederick Hirsch Date: Thu Feb 14 02:51:16 2019 +0100 [Keymap] Add fsck keymaps for eco, planck and preonic (#5106) * Add the fsck keymaps for eco, planck and preonic * Review changes for fsck layout commit 8cd6cfcb77b5e90c1ad77486171049c436183175 Author: Daniel H Klein Date: Wed Feb 13 11:03:10 2019 -0800 [Keyboard] Unigo66 beta pcb added, bug fixes for flashing (#5108) * UniGo66 keyboard added * UniGo66 keyboard added * case correction of unigo66 files * create sirius folder * Update keyboards/sirius/unigo66/rules.mk Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/danielhklein/keymap.c Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/default/config.h Co-Authored-By: danielhklein * Update keyboards/sirius/unigo66/keymaps/danielhklein/config.h Co-Authored-By: danielhklein * debugging * correct keymap to layout * readme * remove common config * suggested changes to config.h * default keymap cleanup * bug fixes * beta user pcb added, flashing fixed * syntax fix * updated info.json * fix spelling * fix readme commit 918a52da61f8db245d6389e0ff574f41d4d17ccf Author: buhearns <47539568+buhearns@users.noreply.github.com> Date: Wed Feb 13 18:16:04 2019 +0100 [Keymap] Adding buhearns keymap (#5105) * [Keymap] Adding buhearns keymap * Removing deprecated function with fauxpark's help * Update readme.md * Switching to UNICODE_ENABLE with drashna's help * Update rules.mk * Update config.h * Update config.h Tidying up * Update keymap.c Tidying up * Update readme.md Tidying up * Update rules.mk Tidying up * Removing GESC and adding TILD commit 9a05c5d7876c81ac0f074366fa1790de31fd44e0 Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed Feb 13 08:59:38 2019 -0800 [Keyboard] New Keyboard: Doro67 Regular PCB (#5115) * initial commit with edits to vanilla code * Add QMK Configurator support * add an appropriately generated keymap * pins, matrices, and features added in * moved it all to a regular directory. It's called regular as that's what it's called in the group buy. In the future we will have other directories for the other PCBs that are delivered to customers. * forgot caps lock led support * Update keyboards/doro67/regular/keymaps/default/config.h Use the NAME Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update keyboards/doro67/regular/readme.md Be more explicit Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> commit 6b4549da8ceed736c85195f3bd16ded40131a29c Author: Andrew Kannan Date: Wed Feb 13 11:03:26 2019 -0500 Add Satisfaction75 to QMK, Enable EEPROM on stm32f072 (#5094) * Add stm32f072 base ck4x4 to handwired * add prints * Save these tries * Save changes again * Working hadron oled * OLEd working but ws2812b still iffy: * save another try * Encoder feature + OLED * RTC code * Implement clock setting mode * Whitespace * Encoder hooked up to working LED PWM code * Add missing files * eeprom changes * Save changes * Move i2c master * Move satisfaction75 under cannonkeys * Set proper default folder * Revert some core changes * Undo paved iris changes * Reorganize code for maintainability and prep for new features * Add starting code for clock OLED mode * Clock set mode finished * Add custom encoder modes * Actually add VIA keymap * Gate to only 072 * fix gate for only 072 * Update header guards and includes * Update i2c selection strategy * Update board.c to handle software reset to DFU commit 824aa06c3cecf518cfea9cddd97446c869757c02 Author: Drashna Jaelre Date: Tue Feb 12 21:01:58 2019 -0800 Fix travis_compiled_push.sh script issue (#5114) * Fix travis_compiled_push.sh script issue * fix typo * properly fix push script commit 9cb4c5c092b8d0b4f23f873384e13cf4c2c375a3 Author: Wilba Date: Wed Feb 13 12:05:34 2019 +1100 [Keyboard] Added aeboards/aegis (#5099) * Added aeboards/aegis * PR changes commit 6fcc6538c71abd649ff8c8ac60b190ebd26f3b61 Author: zvecr Date: Wed Feb 13 01:04:47 2019 +0000 [Keyboard] Refactor jj4x4 to enable ortho_4x4 LAYOUT (#5112) * Correct configurator info.json * Refactor to support ortho_4x4 * Refactor to support ortho_4x4 - remove commented out code commit b2ee290c9f506e42dd9c4577c8147646c405aeb0 Author: Danny Date: Tue Feb 12 19:57:24 2019 -0500 [Keyboard] Move Keebio boards to own folder (#5109) * Move boards into keebio folder * Rename keymap * Update BDN9 files * Update BFO-9000 files * Update Chocopad files * Update Dilly files * Update Fourier files, collapse rev1 into main * Update Iris files * Update Laplace files * Update Levinson files, fix buswerks keymap * Update Nyquist files * Fix keymap issues * Update Quefrency files * Update Rorschach files * Update TF68 files * Update Viterbi files * Update Viterbi files * Update Wavelet files * Reformat default layout * Fix up default folder for Iris * Remove already defined aliases commit 994852712dbd183e2c764d624ae8ba7d3efb385a Author: kwerdenker Date: Wed Feb 13 01:48:05 2019 +0100 [Keymap] Plain60 rgb (#5104) * Fix compile error if not used with VIA * Add keymap with support for RGB * Integrate changes from PR code review commit 15297bcfce016b8f03c2004b3db5a26e38cf994e Author: Dusty Pomerleau Date: Wed Feb 13 11:46:40 2019 +1100 [Keymap] Add Minidox keymap by dustypomerleau (#5101) * add dusty keymap * change keymap folder to match my github username * initial keymap completed in comments only * layout without NAV completed in comments only * disable Command to prevent interference with Space Cadet keys * switch _ and \ in the symbol layer * Layers complete through _NAV * add thumb keys to _NAV * complete _NUM * all layouts complete; still needs `process_user_record()` * completed first draft of keymap; still needs config.h to match * corrected keycodes for Mac macro-volume keys * fix Mac mute keycode * add missing Mac keycodes for previous and next track * placeholder for qwerty layout, not yet completed; remove unnecessary breaks; add todos * eliminate Preonic branch before switching to Minidox branch: • delete dustypomerleau Preonic keymap folder • complete keymap.c (QWERTY layer, vanilla numbers layer) TODO: • add preferences to config.h • complete the README * edit commented keymap diagrams for clarity in dual function keys * define initial config.h and add rules.mk for mouse key support * fix redundant line after implementation of tap_code() * fixed key_timer declaration, added README and rules * formatting of keymap * add CTPC to config * cycle thumb keys to favor center position * modify config.h for temporary Pro Micro compatibility * remove superfluous call to use serial; homebrewed mod tap keys are still broken with OSL * merge _SYS and _MEDIA on new Z_SYS key * ALT_OP example of new MT macro complete * initial narze-inspired MT fixes in PRU * add (currently superfluous) custom keycode for the _SYS layer * rudimentary `OSL` symbol macros that immediately register the mod and fail to reset the oneshot layer, but do output the proper keys—fix both of these things * remove permissive hold to improve tapping performance * remove calls to `clear_oneshot_layer_state()`, as they have no effect inside `process_record_user()`. Tapdance appears to be the way forward. * final commit before tapdance code; correct layout in comments * initial tapdance code for shifted mod taps * add numeric and ergo NUM layers and pinky shifts for keycuts * add TD() wrappers to tapdance codes and clean up commented layout guides * add faux return to cur_dance to allow compilation - TODO: research what the default clause should be in cur_dance * update commented schematics for better readability * add backspace and delete to lockable layers, Z_SYS -> SYS_Z for consistency, fix schematic errors * add `DOUBLE_SINGLE_TAP` to tapdance cases to allow doubling of the single tap character without waiting tapping term * remove reduced oneshot tapping toggles * update README * newline tweak :) * Update keyboards/minidox/keymaps/dustypomerleau/keymap.c Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * Update keyboards/minidox/keymaps/dustypomerleau/config.h Co-Authored-By: dustypomerleau * remove `PREVENT_STUCK_MODIFIERS`, as this is default behavior commit d3f7910e680379edd80f8fbe76dd756f7f35c0f3 Author: Drashna Jaelre Date: Tue Feb 12 16:46:04 2019 -0800 Remove AUTOGEN and fix Travis Compiled Push scripts (#5077) * Grab HEX and BIN files from autogen And push them to qmk.fm/compiled * Make autogen copy extension agnostic This way, when travis cl scrpit looks for hex files, it will actually grab bin files, and not hex files for ARM boards * Handle the AUTOGEN in :bin target to properly handle edge cases Both the TADA68 and ATSAM boards generate the hex file and then convert it to a bin file. The changes I made does not handle this well, at all. This removes the hex and replaces it with a bin, if a bin is normally generated. * Revert hex target to original copy command * Check hex and bin separately in compile push script Since I don't know how to script this, well * Simplify push to compiled folder * Further simplify compiled push script * Move AUTOGEN parsing to a more sane location to prevent tech debt Thanks to skully! * Remove AUTOGEN completely, as it's not needed This has the benefit of making everything super simple, since we can pull every hex and bin from the root of the qmk_firmware folder, and move that to th compiled folder. This also removes old and unneeded code, and removes some tech debt that has been accrued, without adding more, in theory. commit c5e10b7203f140e747ac3a95b6964c52110e07df Author: Wilba Date: Wed Feb 13 07:59:56 2019 +1100 Added WT75-A, refactor wilba.tech PCBs (#5100) * Added WT75-A, added "via" keymaps to wilba.tech * Missed file last commit commit 516f51606232f3094cb2a8dfe7a7d27fd31a9f5a Author: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon Feb 11 18:29:57 2019 -0800 [Keyboard] Space65: RGB Animations on by default (#5097) commit 0b3b80afc12e823d859725a30054de65c761ecc6 Author: Mike Bell Date: Mon Feb 11 14:29:11 2019 +0000 Add digital layout for KBD75 (#5095) * Initial commit of digital kbd75 layout * Add readme * Update readme * Update readme with suggestions commit c5221fa1cb1e903600205ba831c841f9d3aad33f Author: skullY Date: Sun Jan 27 17:34:44 2019 -0800 fix the led_matrix.h naming conflict commit 5fc24218113a4c862a05a5e4c900cb1733ef75b7 Author: skullY Date: Sun Jan 27 17:13:23 2019 -0800 Put back an accidentally stripped copyright commit 1a680c1d6a426dfcd43af90c1083da15b0217086 Author: skullY Date: Sun Jan 27 17:07:07 2019 -0800 cleanup commit 84879f28a3e9e61053f7db37724b23bb32fbb0b4 Author: skullY Date: Sun Jan 27 16:58:21 2019 -0800 fix compiling for backlight without led matrix commit c080a3e7c4aa565c696224588b16d4e883f60a7b Author: skullY Date: Sun Jan 27 16:52:07 2019 -0800 cleanup commit 32116f1a4580e36c92870ca800cf3cc9106c35dd Author: skullY Date: Sun Jan 27 16:28:11 2019 -0800 Move the 1 second delay to led_matrix_init commit 24df54b80794144907db94c2cb5ceca928700e2d Author: skullY Date: Sun Jan 27 16:19:55 2019 -0800 Add documentation for led matrix commit cc738e32dd02cbc6e10f3e229332390d3b886e4d Author: skullY Date: Sun Jan 27 16:19:44 2019 -0800 Force backlight on when led matrix is enabled commit 6b74dd6de5359da18e87b2d4894e3ffc3fc89d47 Author: skullY Date: Sat Jan 26 21:25:59 2019 -0800 led_matrix works now commit bf2670601d29551896bab6811b9bb64de2d0ee0e Author: skullY Date: Sat Jan 26 14:33:55 2019 -0800 compiles, but long delay on startup and problems commit 159191a8747891920aea7de2324507daa8a661fb Author: skullY Date: Sat Jan 26 12:39:55 2019 -0800 revert accidental rgb_matrix.h changes commit fd698c43d78ebbc42c1eb2bec74078b791616ad1 Author: skullY Date: Wed Jan 23 15:43:48 2019 -0800 The beginning of a simple led matrix driver for is31fl3731 commit aeafcc9fd3f41fce6506af5ccf9d9a1fe3b968d8 Author: mikethetiger <30720424+mikethetiger@users.noreply.github.com> Date: Sun Feb 10 14:52:03 2019 -0600 [Keymap] Added my THE50 Keymap (#5093) * adding my planck keymap * adding my planck keymap * added my espectro keymap * the50 keymap commit 65d3afc915a725292a4af9cc4aed231cbce25bef Author: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> Date: Sun Feb 10 12:50:55 2019 -0800 [Keyboard] Update ergodash readme.md (#5092) Clarification of Keys to Keymap note added commit 6ba39689d3ed14a69f161cf08c48004eb4e0daea Author: TerryMathews Date: Sun Feb 10 15:44:39 2019 -0500 [Keyboard] Initial support for TKC M0LLY (#5087) * Initial support for TKC M0LLY * Remove depreciated Magic Keys define * Update keyboards/m0lly/README.md Co-Authored-By: TerryMathews * Update keyboards/m0lly/README.md Co-Authored-By: TerryMathews * Update keyboards/m0lly/info.json Co-Authored-By: TerryMathews * Update keyboards/m0lly/info.json Co-Authored-By: TerryMathews * Update keyboards/m0lly/m0lly.h Co-Authored-By: TerryMathews * Suggested review changes commit 6848002601d9b84ed53639aadd035cc640de9aad Author: takashiski Date: Mon Feb 11 05:40:31 2019 +0900 [Keyboard] Namecard rev2 (#5080) * add revision * change to row2col * remove old config.h * remove rule.mk from namecard2x4/ commit e251850cd848445cb20819ea95f2d4d3aea20d9e Author: Joshua Bragge Date: Sat Feb 9 10:18:08 2019 -0700 added missing ; on example (#5089) commit 7d8c62993921383a35f9cd172fe0a1d2e893b2f3 Author: alex-ong Date: Sun Jan 27 07:23:15 2019 +1100 Stricter, leaner DEBOUNCE_TYPE section in common_features.mk. Cleanup debounce_type.mk commit 562c0d702a326488d79963969ef71f2a52664cdc Author: alex-ong Date: Sun Jan 27 00:10:14 2019 +1100 Fix compile error in debounce_eager_pk commit 503e02db79c06f7893e6802eb1a2ab2850a931f1 Merge: 10cc42351 d30d5eeb2 Author: alex-ong Date: Sat Jan 26 23:21:27 2019 +1100 Merge branch 'debounce_refactor' of https://github.com/alex-ong/qmk_firmware into debounce_refactor commit 10cc4235155d0a039faf2dc5c2b1ebe513952c3c Author: alex-ong Date: Sat Jan 26 23:18:24 2019 +1100 Malloc array in debounce_eager_pk, since split keyboards only use MATRIX_ROWS/2. commit d30d5eeb27b7dc66ef18e65dc150cf76121a7148 Author: Alex Ong Date: Sat Jan 26 23:01:07 2019 +1100 Renamed DEBOUNCE_ALGO to DEBOUNCE_TYPE commit 039dde3a519d0626b9dbb2c79373f28b36d29af7 Author: Alex Ong Date: Sat Jan 26 22:57:39 2019 +1100 Fixed compilation error with debounce_sym_g commit 7cb8d3c7a7fe4de4629af21a92f5415cdfdffa0c Author: Alex Ong Date: Sat Jan 26 22:45:25 2019 +1100 Bug fix - was using MATRIX_ROWS instead of num_rows commit b5b119544a4e943b3eb56f6a32f350c428f532f7 Author: Alex Ong Date: Sat Jan 26 22:44:33 2019 +1100 Removed #include "matrix.h" from debounce.h commit cce8dfab394a643fd6d0250bc8a80a721703a154 Author: alex-ong Date: Sat Jan 26 20:37:47 2019 +1100 Removed check for custom_matrix. We can safely include the debounce file for compilation when custom_matrix is used. commit 14ed96aa064323acb0f8ceecaee3516fb372a56c Author: alex-ong Date: Sat Jan 26 18:26:49 2019 +1100 Moved debouncing_time variable to inside #if debounce commit 5b7fc758d7b0d0ef24bc2861c4b2ba6708fbd367 Author: alex-ong Date: Sat Jan 26 17:46:27 2019 +1100 Restored debounce.h since there wasnt any real change. commit 574fc6444bf48d10317c72bc6a5c61f7e46938a3 Author: alex-ong Date: Sat Jan 26 17:38:52 2019 +1100 Whitespace cleanup. commit 4d8733591f30a299d6ac99165c834162d2c08fd1 Author: alex-ong Date: Sat Jan 26 17:29:02 2019 +1100 Working eager_pk commit 123608fb318a42500d64d29aa46c7d08140033fd Author: alex-ong Date: Sat Jan 26 17:10:27 2019 +1100 DO NOT USE Revert back to original API to support split_keyboards. commit d0b691df0ee74863ca54ca697aa4d4212cf401a7 Author: alex-ong Date: Sat Jan 26 17:03:46 2019 +1100 DO NOT USE - debounce successfully compiled. commit 3949ab322dcce75f470ddfbe701c8763add69e63 Author: alex-ong Date: Sat Jan 26 16:59:02 2019 +1100 Remove accidental xeal60 commit commit 39ca330f103bf85fd29b0fb595469221c9c3680c Author: alex-ong Date: Sat Jan 26 16:56:01 2019 +1100 DO NOT USE - Removed debounce from TMK. commit c9ba618654417ec115809a031d315f8327c79ad4 Merge: 2bb2977c1 d977daa8d Author: Alex Ong Date: Sat Jan 26 12:13:19 2019 +1100 DO NOT USE Merge branch 'master' into debounce_refactor Merged, however now there are two debounce.h and debounce.c to mess around with and coalesce. # Conflicts: # quantum/matrix.c commit d977daa8dc9136746425f9e1414e1f93cb161877 Merge: 47c91fc7f 0306e487e Author: Alex Ong Date: Sat Jan 26 11:36:28 2019 +1100 Merge branch 'master' of https://github.com/qmk/qmk_firmware commit 2bb2977c133646c4e056960e72029270d77cc1eb Merge: a55c83896 47c91fc7f Author: Alex Ong Date: Fri Jan 4 19:43:45 2019 +1100 Merge branch 'master' into debounce_refactor # Conflicts: # tmk_core/common/keyboard.c commit 47c91fc7f75ae0a477e55b687aa0fc30da0a283c Merge: ac9b88e8c 563ce3f22 Author: Alex Ong Date: Fri Jan 4 19:39:14 2019 +1100 Merge branch 'master' of https://github.com/qmk/qmk_firmware commit a55c838961c89097ab849ed6cb1f261791e6b9b4 Author: Alex Ong Date: Wed Aug 29 10:49:53 2018 +1000 Added bold in a few areas. commit e8e6268765b052a6f6b53d34f0d8afb200989ba7 Author: Alex Ong Date: Wed Aug 29 10:48:11 2018 +1000 Fixed missing whitespace in debounce documentation Table wasn't working due to missing newline. commit 4db27a2c7614c0aa5a0b46d8e1f5c5cc8216fd1c Author: Alex Ong Date: Wed Aug 29 10:45:53 2018 +1000 Changed order of rules in TMK. Documented feature. commit 3cf7f7322c24e3cab21d402f1a859b60df857603 Author: Alex Ong Date: Wed Aug 29 10:19:36 2018 +1000 Removed "debounce_algo = manual" in all keyboards with CUSTOM_MATRIX = yes. commit ac9b88e8ccbbf38762871504cd827ff0d941c426 Author: Alex Ong Date: Sun Aug 12 21:39:55 2018 +1000 Removed NP_STAR and NP_SLSH. commit 714e0da960c2251298234bcf2159f67dd060710a Author: Alex Ong Date: Sun Aug 12 21:27:51 2018 +1000 Basic keymap (no FN). Compiles. commit c796944354a76f3bd0a8387b9a4016864550ba91 Author: Alex Ong Date: Sun Aug 12 18:25:50 2018 +1000 Delete removed other keymaps commit 2758158a4bb15b0f5ec30de92760133248afe1f8 Author: alex-ong Date: Sun Aug 12 17:23:58 2018 +1000 Added xeal60 via clone of lets split --- .clang-format | 26 + .editorconfig | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 31 +- .github/ISSUE_TEMPLATE/feature_request.md | 16 +- .github/ISSUE_TEMPLATE/other_issues.md | 6 +- .github/PULL_REQUEST_TEMPLATE.md | 28 +- .gitignore | 2 + .travis.yml | 7 +- Dockerfile | 2 +- Makefile | 8 +- Vagrantfile | 8 +- build_keyboard.mk | 27 +- build_layout.mk | 9 + common_features.mk | 97 +- docs/_summary.md | 11 +- docs/config_options.md | 35 +- docs/contributing.md | 40 +- docs/custom_quantum_functions.md | 162 +- docs/faq_build.md | 33 +- docs/faq_keymap.md | 4 +- docs/feature_advanced_keycodes.md | 6 +- docs/feature_audio.md | 34 +- docs/feature_backlight.md | 52 +- docs/feature_combo.md | 3 +- docs/feature_command.md | 13 +- docs/feature_debounce_type.md | 42 + docs/feature_encoders.md | 2 +- docs/feature_grave_esc.md | 10 +- docs/feature_haptic_feedback.md | 147 + docs/feature_layouts.md | 29 + docs/feature_led_matrix.md | 90 + docs/feature_macros.md | 146 +- docs/feature_mouse_keys.md | 142 +- docs/feature_oled_driver.md | 274 ++ docs/feature_rgb_matrix.md | 494 ++- docs/feature_rgblight.md | 318 +- docs/feature_space_cadet.md | 59 + docs/feature_space_cadet_shift.md | 37 - docs/feature_space_cadet_shift_enter.md | 31 - docs/feature_tap_dance.md | 83 + docs/feature_unicode.md | 85 +- docs/feature_userspace.md | 56 +- docs/feature_velocikey.md | 30 + docs/features.md | 3 +- docs/flashing.md | 21 +- docs/getting_started_build_tools.md | 16 +- docs/getting_started_make_guide.md | 4 +- docs/hand_wire.md | 37 +- docs/hardware_avr.md | 48 +- docs/hardware_drivers.md | 6 +- docs/how_keyboards_work.md | 2 +- docs/i2c_driver.md | 20 +- docs/isp_flashing_guide.md | 5 + docs/keycodes.md | 21 +- docs/keymap.md | 64 +- docs/newbs_flashing.md | 75 +- docs/newbs_getting_started.md | 6 +- docs/newbs_testing_debugging.md | 70 +- docs/{eclipse.md => other_eclipse.md} | 0 docs/other_vscode.md | 117 + ...ard_to_qmk_(arm_and_other_chibios_cpus).md | 30 +- docs/quantum_keycodes.md | 7 +- docs/understanding_qmk.md | 14 +- docs/zh-cn/README.md | 32 + docs/zh-cn/_summary.md | 106 + docs/zh-cn/contributing.md | 205 ++ docs/zh-cn/faq.md | 6 + docs/zh-cn/faq_build.md | 150 + docs/zh-cn/faq_debug.md | 233 ++ docs/zh-cn/faq_keymap.md | 212 ++ docs/zh-cn/getting_started_getting_help.md | 15 + docs/zh-cn/getting_started_github.md | 59 + docs/zh-cn/getting_started_introduction.md | 54 + docs/zh-cn/newbs.md | 23 + docs/zh-cn/newbs_best_practices.md | 163 + docs/zh-cn/newbs_building_firmware.md | 81 + docs/zh-cn/newbs_flashing.md | 307 ++ docs/zh-cn/newbs_getting_started.md | 102 + docs/zh-cn/newbs_learn_more_resources.md | 15 + docs/zh-cn/newbs_testing_debugging.md | 43 + drivers/arm/i2c_master.c | 51 +- drivers/arm/i2c_master.h | 30 +- drivers/avr/apa102.c | 101 + drivers/avr/apa102.h | 46 + drivers/avr/i2c_master.c | 172 +- drivers/avr/i2c_master.h | 8 +- drivers/avr/i2c_slave.c | 2 +- drivers/avr/ws2812.c | 25 + drivers/avr/ws2812.h | 5 +- drivers/haptic/DRV2605L.c | 24 +- drivers/haptic/DRV2605L.h | 26 +- drivers/haptic/haptic.c | 248 ++ drivers/haptic/haptic.h | 82 + drivers/haptic/solenoid.c | 109 + drivers/haptic/solenoid.h | 54 + drivers/issi/is31fl3731-simple.c | 246 ++ drivers/issi/is31fl3731-simple.h | 210 ++ drivers/issi/is31fl3733.c | 38 +- drivers/issi/is31fl3733.h | 6 +- drivers/issi/is31fl3737.c | 252 ++ drivers/issi/is31fl3737.h | 207 ++ drivers/oled/glcdfont.c | 240 ++ drivers/oled/licenses.txt | 45 + drivers/oled/oled_driver.c | 531 +++ drivers/oled/oled_driver.h | 192 ++ drivers/qwiic/micro_oled.c | 4 +- keyboards/1upkeyboards/1up60hse/1up60hse.h | 4 +- keyboards/1upkeyboards/1up60hse/config.h | 2 +- .../1up60hse/keymaps/default/keymap.c | 2 +- keyboards/1upkeyboards/1up60hse/rules.mk | 1 + keyboards/1upkeyboards/1up60hte/1up60hte.h | 11 +- keyboards/1upkeyboards/1up60hte/config.h | 2 +- keyboards/1upkeyboards/1up60hte/info.json | 15 + .../1up60hte/keymaps/default/keymap.c | 56 +- .../1up60hte/keymaps/hhkb/keymap.c | 55 +- keyboards/1upkeyboards/1up60hte/rules.mk | 1 + keyboards/1upkeyboards/1up60rgb/1up60rgb.h | 5 +- keyboards/1upkeyboards/1up60rgb/config.h | 5 +- .../1up60rgb/keymaps/default/keymap.c | 2 +- .../1up60rgb/keymaps/mdyevimnav/keymap.c | 48 + .../1up60rgb/keymaps/raffle/keymap.c | 6 +- keyboards/1upkeyboards/1up60rgb/readme.md | 2 +- keyboards/1upkeyboards/1up60rgb/rules.mk | 20 +- keyboards/1upkeyboards/readme.md | 2 + keyboards/1upkeyboards/super16/config.h | 15 +- keyboards/1upkeyboards/super16/info.json | 23 +- .../super16/keymaps/default/config.h | 2 +- .../super16/keymaps/default/keymap.c | 32 +- keyboards/1upkeyboards/super16/rules.mk | 16 +- keyboards/1upkeyboards/super16/super16.c | 22 +- keyboards/1upkeyboards/super16/super16.h | 32 +- keyboards/1upkeyboards/sweet16/config.h | 4 +- .../sweet16/keymaps/default/keymap.c | 2 +- keyboards/1upkeyboards/sweet16/readme.md | 3 +- keyboards/1upkeyboards/sweet16/rules.mk | 3 +- keyboards/1upkeyboards/sweet16/sweet16.h | 4 +- keyboards/40percentclub/25/config.h | 2 +- keyboards/40percentclub/4x4/config.h | 2 +- keyboards/40percentclub/5x5/config.h | 2 +- keyboards/40percentclub/6lit/config.h | 2 +- keyboards/40percentclub/foobar/config.h | 2 +- keyboards/40percentclub/foobar/info.json | 6 +- keyboards/40percentclub/half_n_half/config.h | 5 +- .../40percentclub/half_n_half/half_n_half.h | 29 +- keyboards/40percentclub/half_n_half/info.json | 62 + .../half_n_half/keymaps/Boy_314/config.h | 22 + .../half_n_half/keymaps/Boy_314/keymap.c | 173 + .../half_n_half/keymaps/Boy_314/readme.md | 2 + .../half_n_half/keymaps/Boy_314/rules.mk | 5 + keyboards/40percentclub/half_n_half/rules.mk | 3 + keyboards/40percentclub/i75/promicro/config.h | 2 +- keyboards/40percentclub/i75/teensy2/config.h | 2 +- keyboards/40percentclub/mf68/config.h | 22 + .../mf68/keymaps/default/keymap.c | 62 +- .../mf68/keymaps/mf68_ble/config.h | 43 + .../keymaps/mf68_ble}/keymap.c | 0 .../{ => mf68/keymaps}/mf68_ble/readme.md | 4 +- .../mf68/keymaps/mf68_ble/rules.mk | 66 + keyboards/40percentclub/mf68/rules.mk | 5 +- keyboards/40percentclub/mf68_ble/info.json | 12 - keyboards/40percentclub/mf68_ble/mf68_ble.c | 8 - keyboards/40percentclub/mf68_ble/mf68_ble.h | 37 - keyboards/40percentclub/nano/config.h | 27 +- keyboards/40percentclub/nano/matrix.c | 159 - keyboards/40percentclub/nano/nano.h | 4 +- keyboards/40percentclub/nano/rules.mk | 4 - keyboards/40percentclub/nein/config.h | 239 ++ keyboards/40percentclub/nein/info.json | 22 + .../nein/keymaps/default/keymap.c | 29 + keyboards/40percentclub/nein/nein.c | 16 + keyboards/40percentclub/nein/nein.h | 37 + keyboards/40percentclub/nein/readme.md | 18 + keyboards/40percentclub/nein/rules.mk | 80 + keyboards/40percentclub/nori/config.h | 2 +- keyboards/40percentclub/ut47/config.h | 2 +- .../ut47/keymaps/default/config.h | 2 - keyboards/9key/keymaps/default/keymap.c | 38 +- keyboards/9key/keymaps/tap_dance/keymap.c | 69 + .../keymaps/tap_dance}/rules.mk | 0 keyboards/9key/rules.mk | 4 +- keyboards/abstract/ellipse/info.json | 12 + .../ellipse/keymaps/abstractkb/config.h | 23 + .../ellipse/keymaps/abstractkb/keymap.c | 66 + .../ellipse/keymaps/abstractkb/readme.md | 3 + .../ellipse/keymaps/abstractkb/rules.mk | 1 + .../abstract/ellipse/keymaps/default/config.h | 19 + .../abstract/ellipse/keymaps/default/keymap.c | 66 + .../ellipse/keymaps/default/readme.md | 6 + .../ellipse}/keymaps/default/rules.mk | 0 keyboards/abstract/ellipse/readme.md | 19 + keyboards/abstract/ellipse/rev1/config.h | 245 ++ keyboards/abstract/ellipse/rev1/rev1.c | 43 + keyboards/abstract/ellipse/rev1/rev1.h | 36 + keyboards/abstract/ellipse/rev1/rules.mk | 81 + keyboards/acr60/keymaps/default/keymap.c | 34 +- keyboards/adkb96/adkb96.c | 19 + keyboards/adkb96/adkb96.h | 28 + keyboards/{sol => adkb96}/config.h | 0 keyboards/adkb96/info.json | 494 +++ .../keymaps/default/config.h | 9 +- keyboards/adkb96/keymaps/default/keymap.c | 15 + keyboards/adkb96/readme.md | 17 + keyboards/adkb96/rev1/config.h | 78 + keyboards/adkb96/rev1/rev1.c | 15 + keyboards/adkb96/rev1/rev1.h | 44 + keyboards/adkb96/rules.mk | 78 + keyboards/aeboards/aegis/aegis.c | 17 + keyboards/aeboards/aegis/aegis.h | 43 + keyboards/aeboards/aegis/config.h | 71 + .../aeboards/aegis/keymaps/default/keymap.c | 72 + .../aeboards/aegis/keymaps/default/readme.md | 2 + keyboards/aeboards/aegis/keymaps/via/keymap.c | 72 + .../aeboards/aegis/keymaps/via/readme.md | 2 + keyboards/aeboards/aegis/keymaps/via/rules.mk | 68 + keyboards/aeboards/aegis/readme.md | 14 + keyboards/aeboards/aegis/rules.mk | 65 + keyboards/ai03/lunar/config.h | 2 +- keyboards/ai03/lunar/info.json | 73 +- keyboards/ai03/orbit/config.h | 249 ++ keyboards/ai03/orbit/info.json | 88 + keyboards/ai03/orbit/keymaps/default/keymap.c | 91 + .../ai03/orbit/keymaps/default/readme.md | 3 + keyboards/ai03/orbit/matrix.c | 328 ++ keyboards/ai03/orbit/matrix.h | 3 + keyboards/ai03/orbit/orbit.c | 228 ++ keyboards/ai03/orbit/orbit.h | 65 + keyboards/ai03/orbit/readme.md | 15 + keyboards/ai03/orbit/rules.mk | 92 + keyboards/ai03/orbit/serial.c | 546 +++ keyboards/ai03/orbit/serial.h | 62 + .../ai03/orbit}/split_flags.c | 0 .../ai03/orbit}/split_flags.h | 0 keyboards/ai03/orbit/split_util.c | 87 + keyboards/ai03/orbit/split_util.h | 10 + keyboards/ai03/orbit/transport.c | 238 ++ keyboards/ai03/orbit/transport.h | 42 + keyboards/al1/config.h | 2 +- keyboards/alf/dc60/config.h | 2 +- keyboards/alf/x11/config.h | 245 ++ keyboards/alf/x11/info.json | 103 + keyboards/alf/x11/keymaps/default/config.h | 19 + keyboards/alf/x11/keymaps/default/keymap.c | 78 + keyboards/alf/x11/keymaps/default/readme.md | 1 + keyboards/alf/x11/readme.md | 13 + keyboards/alf/x11/rules.mk | 82 + keyboards/alf/x11/x11.c | 63 + keyboards/alf/x11/x11.h | 43 + keyboards/alice/alice.h | 34 +- keyboards/alice/program | 106 - keyboards/alice/rules.mk | 2 +- keyboards/alpha/keymaps/default/keymap.c | 2 +- keyboards/amj40/keymaps/default/keymap.c | 28 +- keyboards/amj40/keymaps/fabian/keymap.c | 3 - keyboards/amj40/keymaps/myee/keymap.c | 4 - keyboards/amj60/keymaps/default/keymap.c | 4 - .../amj60/keymaps/iso_split_rshift/keymap.c | 18 +- keyboards/amj60/keymaps/maximized/keymap.c | 4 - keyboards/amj96/config.h | 2 +- keyboards/amj96/keymaps/default/config.h | 6 +- keyboards/amjpad/keymaps/default/keymap.c | 6 - keyboards/amjpad/keymaps/max/keymap.c | 2 - keyboards/amjpad/keymaps/ortho_left/keymap.c | 2 - keyboards/amjpad/keymaps/ortho_right/keymap.c | 2 - keyboards/ares/ares.c | 107 + keyboards/ares/ares.h | 37 + keyboards/ares/config.h | 51 + keyboards/ares/info.json | 12 + keyboards/ares/keymaps/default/keymap.c | 40 + keyboards/{bmini => ares}/readme.md | 14 +- keyboards/ares/rules.mk | 48 + keyboards/{ps2avrGB => ares}/usbconfig.h | 8 +- keyboards/atom47/keymaps/LEdiodes/keymap.c | 2 - keyboards/atom47/keymaps/default/keymap.c | 2 - keyboards/atom47/keymaps/maartenwut/keymap.c | 2 - keyboards/atomic/keymaps/default/keymap.c | 2 - keyboards/atomic/keymaps/pvc/keymap.c | 4 +- keyboards/atomic/readme.md | 2 +- keyboards/atreus/keymaps/default/keymap.c | 2 +- .../atreus/keymaps/dvorak_42_key/keymap.c | 23 +- keyboards/atreus/keymaps/erlandsona/keymap.c | 5 - keyboards/atreus/keymaps/xk/keymap.c | 3 - keyboards/atreus/keymaps/xyverz/keymap.c | 4 - keyboards/atreus/keymaps/yttyx/README.md | 158 +- keyboards/atreus/keymaps/yttyx/config.h | 12 +- keyboards/atreus/keymaps/yttyx/keymap.c | 222 +- keyboards/atreus/readme.md | 21 +- keyboards/atreus/rules.mk | 77 +- keyboards/atreus62/keymaps/jarred/config.h | 21 + keyboards/atreus62/keymaps/jarred/keymap.c | 26 + keyboards/atreus62/keymaps/pcewing/keymap.c | 1 - keyboards/atreus62/keymaps/xyverz/keymap.c | 4 - keyboards/baguette/config.h | 2 +- keyboards/baguette/info.json | 2 +- keyboards/baguette/readme.md | 2 +- keyboards/bface/program | 105 - keyboards/bfo9000/serial.c | 230 -- keyboards/bfo9000/serial.h | 27 - keyboards/bigswitch/keymaps/wanleg/config.h | 2 +- keyboards/blockey/config.h | 2 +- keyboards/blockey/keymaps/default/keymap.c | 5 - keyboards/blockey/keymaps/eucalyn/keymap.c | 5 - keyboards/bm16a/bm16a.c | 43 + keyboards/bm16a/bm16a.h | 39 + keyboards/bm16a/config.h | 246 ++ keyboards/bm16a/info.json | 30 + keyboards/bm16a/keymaps/default/config.h | 19 + keyboards/bm16a/keymaps/default/keymap.c | 73 + keyboards/bm16a/keymaps/default/readme.md | 1 + keyboards/bm16a/readme.md | 15 + keyboards/bm16a/rules.mk | 82 + keyboards/bm16s/bm16s.h | 15 + keyboards/bm16s/config.h | 46 + keyboards/bm16s/info.json | 30 + keyboards/bm16s/keymaps/default/keymap.c | 16 + keyboards/bm16s/keymaps/media/keymap.c | 20 + keyboards/bm16s/readme.md | 13 + keyboards/bm16s/rules.mk | 72 + keyboards/boardwalk/boardwalk.h | 78 + keyboards/boardwalk/config.h | 84 + keyboards/boardwalk/info.json | 359 ++ .../boardwalk/keymaps/brendanwr/config.h | 16 + .../boardwalk/keymaps/brendanwr/keymap.c | 95 + keyboards/boardwalk/keymaps/default/config.h | 16 + keyboards/boardwalk/keymaps/default/keymap.c | 162 + keyboards/boardwalk/keymaps/default/readme.md | 1 + .../boardwalk/keymaps/mcallaster/keymap.c | 54 + .../boardwalk/keymaps/nchristus/config.h | 16 + .../boardwalk/keymaps/nchristus/keymap.c | 62 + .../boardwalk/keymaps/nchristus/readme.md | 1 + .../boardwalk/keymaps/nchristus/rules.mk | 14 + keyboards/boardwalk/readme.md | 16 + keyboards/boardwalk/rules.mk | 66 + keyboards/boston_meetup/2019/2019.c | 215 ++ keyboards/boston_meetup/2019/2019.h | 19 + keyboards/boston_meetup/2019/config.h | 196 ++ keyboards/boston_meetup/2019/info.json | 12 + .../2019/keymaps/default/keymap.c | 166 + .../2019/keymaps/default/readme.md | 51 + .../boston_meetup/2019/keymaps/readme.md | 22 + keyboards/boston_meetup/2019/readme.md | 13 + keyboards/boston_meetup/2019/rules.mk | 24 + keyboards/boston_meetup/boston_meetup.c | 2 + keyboards/boston_meetup/boston_meetup.h | 19 + keyboards/boston_meetup/config.h | 60 + keyboards/boston_meetup/readme.md | 14 + keyboards/boston_meetup/rules.mk | 2 + .../frosty_flake/keymaps/QFR_JM/keymap.c | 4 +- .../kitten_paw/keymaps/ickerwx/keymap.c | 8 +- keyboards/{ => bpiphany}/sixshooter/config.h | 2 +- keyboards/{ => bpiphany}/sixshooter/info.json | 0 .../sixshooter/keymaps/default/keymap.c | 0 .../sixshooter/keymaps/default/readme.md | 0 keyboards/{ => bpiphany}/sixshooter/readme.md | 8 +- keyboards/{ => bpiphany}/sixshooter/rules.mk | 0 .../{ => bpiphany}/sixshooter/sixshooter.c | 0 .../{ => bpiphany}/sixshooter/sixshooter.h | 0 .../tiger_lily/keymaps/default/config.h | 7 +- .../unloved_bastard/keymaps/default/config.h | 7 +- keyboards/bthlabs/geekpad/config.h | 2 +- keyboards/butterstick/butterstick.c | 56 + keyboards/butterstick/butterstick.h | 11 + keyboards/butterstick/config.h | 26 + .../butterstick/keymaps/default/keymap.c | 184 + .../keymaps/default/rules.mk | 0 keyboards/butterstick/readme.md | 14 + keyboards/butterstick/rules.mk | 19 + keyboards/butterstick/sten.c | 367 ++ keyboards/butterstick/sten.h | 77 + keyboards/c39/c39.c | 1 + keyboards/c39/c39.h | 17 + keyboards/c39/config.h | 89 + keyboards/c39/info.json | 12 + keyboards/c39/keymaps/default/config.h | 3 + keyboards/c39/keymaps/default/keymap.c | 45 + keyboards/c39/keymaps/default/readme.md | 1 + keyboards/c39/readme.md | 16 + keyboards/{sentraq/s60_x => c39}/rules.mk | 15 +- keyboards/candybar/keymaps/default/keymap.c | 4 +- keyboards/candybar/rules.mk | 5 +- .../boards/ST_STM32F072B_DISCOVERY/board.c | 109 + .../boards/ST_STM32F072B_DISCOVERY/board.h | 922 +++++ .../boards/ST_STM32F072B_DISCOVERY/board.mk | 5 + .../ST_STM32F072B_DISCOVERY/cfg/board.chcfg | 703 ++++ .../cannonkeys/instant60/bootloader_defs.h | 7 + keyboards/cannonkeys/instant60/chconf.h | 524 +++ keyboards/cannonkeys/instant60/config.h | 98 + keyboards/cannonkeys/instant60/halconf.h | 354 ++ keyboards/cannonkeys/instant60/info.json | 15 + keyboards/cannonkeys/instant60/instant60.c | 1 + keyboards/cannonkeys/instant60/instant60.h | 47 + .../instant60/keymaps/default/keymap.c | 48 + .../instant60/keymaps/tsangan/keymap.c | 48 + .../cannonkeys/instant60/keymaps/via/keymap.c | 43 + .../cannonkeys/instant60/keymaps/via/rules.mk | 5 + .../instant60/keymaps/via_standard/keymap.c | 43 + .../instant60/keymaps/via_standard/rules.mk | 5 + keyboards/cannonkeys/instant60/mcuconf.h | 176 + keyboards/cannonkeys/instant60/readme.md | 12 + keyboards/cannonkeys/instant60/rules.mk | 56 + .../boards/GENERIC_STM32_F103/board.c | 56 + .../boards/GENERIC_STM32_F103/board.h | 166 + .../boards/GENERIC_STM32_F103/board.mk | 5 + .../cannonkeys/practice65/bootloader_defs.h | 10 + keyboards/cannonkeys/practice65/chconf.h | 524 +++ keyboards/cannonkeys/practice65/config.h | 78 + keyboards/cannonkeys/practice65/halconf.h | 353 ++ keyboards/cannonkeys/practice65/info.json | 12 + .../practice65/keymaps/default/keymap.c | 48 + .../cannonkeys/practice65/ld/MKL26Z64.ld | 105 + .../ld/STM32F103x8_stm32duino_bootloader.ld | 88 + keyboards/cannonkeys/practice65/mcuconf.h | 209 ++ keyboards/cannonkeys/practice65/practice65.c | 2 + keyboards/cannonkeys/practice65/practice65.h | 19 + keyboards/cannonkeys/practice65/readme.md | 12 + keyboards/cannonkeys/practice65/rules.mk | 53 + .../boards/ST_STM32F072B_DISCOVERY/board.c | 111 + .../boards/ST_STM32F072B_DISCOVERY/board.h | 922 +++++ .../boards/ST_STM32F072B_DISCOVERY/board.mk | 5 + .../ST_STM32F072B_DISCOVERY/cfg/board.chcfg | 703 ++++ .../satisfaction75/bootloader_defs.h | 7 + keyboards/cannonkeys/satisfaction75/chconf.h | 524 +++ keyboards/cannonkeys/satisfaction75/config.h | 120 + keyboards/cannonkeys/satisfaction75/halconf.h | 354 ++ .../cannonkeys/satisfaction75/i2c_master.c | 124 + .../satisfaction75/keymaps/default/keymap.c | 37 + .../satisfaction75/keymaps/jae/keymap.c | 37 + .../satisfaction75/keymaps/tester/keymap.c | 37 + .../satisfaction75/keymaps/tester/rules.mk | 1 + .../satisfaction75/keymaps/via/keymap.c | 51 + .../satisfaction75/keymaps/via/rules.mk | 5 + keyboards/cannonkeys/satisfaction75/led.c | 240 ++ .../cannonkeys/satisfaction75/led_custom.h | 5 + keyboards/cannonkeys/satisfaction75/mcuconf.h | 176 + .../satisfaction75/prototype/prototype.h | 19 + .../satisfaction75/prototype}/rules.mk | 0 keyboards/cannonkeys/satisfaction75/readme.md | 12 + .../cannonkeys/satisfaction75/rev1/rev1.h | 108 + .../satisfaction75/rev1}/rules.mk | 0 keyboards/cannonkeys/satisfaction75/rules.mk | 57 + .../satisfaction75/satisfaction75.c | 476 +++ .../satisfaction75/satisfaction75.h | 113 + .../satisfaction75/satisfaction_encoder.c | 184 + .../satisfaction75/satisfaction_oled.c | 271 ++ keyboards/cannonkeys/stm32f072/keyboard.c | 303 ++ keyboards/cannonkeys/stm32f072/keyboard.h | 23 + keyboards/cannonkeys/stm32f072/led.c | 251 ++ keyboards/cannonkeys/stm32f072/led_custom.h | 6 + keyboards/cannonkeys/stm32f072/ws2812.c | 150 + keyboards/cannonkeys/stm32f072/ws2812.h | 20 + keyboards/canoe/info.json | 2 +- keyboards/catch22/keymaps/default/keymap.c | 2 - .../chibios_test/keymaps/default/keymap.c | 2 +- .../chimera_ergo/keymaps/default/keymap.c | 4 - .../keymaps/dcompact/{README.md => readme.md} | 8 +- .../christmas_tree/keymaps/default/config.h | 7 +- .../christmas_tree/keymaps/default/keymap.c | 4 +- keyboards/ckeys/handwire_101/config.h | 2 +- keyboards/ckeys/nakey/config.h | 2 +- keyboards/ckeys/obelus/config.h | 2 +- .../ckeys/obelus/keymaps/default/config.h | 7 +- .../ckeys/obelus/keymaps/default/keymap.c | 3 - keyboards/claw44/claw44.c | 10 + keyboards/claw44/claw44.h | 5 + keyboards/{orthodox => claw44}/config.h | 17 +- keyboards/{sol => claw44}/i2c.c | 0 keyboards/{sol => claw44}/i2c.h | 5 +- keyboards/claw44/keymaps/default/config.h | 35 + keyboards/claw44/keymaps/default/keymap.c | 169 + keyboards/claw44/keymaps/yfuku/config.h | 36 + keyboards/claw44/keymaps/yfuku/keymap.c | 221 ++ keyboards/claw44/lib/glcdfont.c | 243 ++ keyboards/claw44/lib/host_led_state_reader.c | 15 + keyboards/claw44/lib/keylogger.c | 45 + keyboards/claw44/lib/layer_state_reader.c | 35 + keyboards/claw44/lib/logo_reader.c | 11 + keyboards/claw44/lib/mode_icon_reader.c | 15 + keyboards/claw44/lib/rgb_state_reader.c | 15 + keyboards/claw44/lib/timelogger.c | 16 + keyboards/claw44/readme.md | 15 + .../{ergodash/rev2 => claw44/rev1}/config.h | 41 +- keyboards/{bfo9000 => claw44/rev1}/matrix.c | 133 +- keyboards/claw44/rev1/rev1.c | 8 + keyboards/claw44/rev1/rev1.h | 57 + keyboards/claw44/rev1/rules.mk | 31 + keyboards/claw44/rev1/serial_config.h | 4 + keyboards/claw44/rev1/split_scomm.c | 91 + keyboards/claw44/rev1/split_scomm.h | 24 + .../{orthodox => claw44/rev1}/split_util.c | 26 +- .../{bfo9000 => claw44/rev1}/split_util.h | 1 - keyboards/claw44/rules.mk | 74 + keyboards/claw44/serial.c | 590 ++++ keyboards/claw44/serial.h | 84 + keyboards/claw44/ssd1306.c | 346 ++ keyboards/claw44/ssd1306.h | 91 + keyboards/clueboard/2x1800/config.h | 2 +- .../clueboard/2x1800/keymaps/default/config.h | 2 - keyboards/clueboard/60/rules.mk | 1 + .../clueboard/66/keymaps/magicmonty/keymap.c | 23 +- keyboards/clueboard/66/keymaps/smt/keymap.c | 3 - .../clueboard/66/keymaps/xyverz/keymap.c | 2 - keyboards/clueboard/66/rev4/rules.mk | 1 + keyboards/clueboard/66_hotswap/66_hotswap.h | 4 + keyboards/clueboard/66_hotswap/config.h | 1 - .../66_hotswap/gen1}/chconf.h | 0 keyboards/clueboard/66_hotswap/gen1/config.h | 153 +- keyboards/clueboard/66_hotswap/gen1/gen1.c | 227 +- keyboards/clueboard/66_hotswap/gen1/gen1.h | 104 +- .../66_hotswap/gen1}/halconf.h | 0 keyboards/clueboard/66_hotswap/gen1/info.json | 11 + keyboards/clueboard/66_hotswap/gen1/led.c | 21 + keyboards/clueboard/66_hotswap/gen1/matrix.c | 160 + .../66_hotswap/gen1}/mcuconf.h | 0 keyboards/clueboard/66_hotswap/gen1/rules.mk | 71 +- .../66_hotswap/keymaps/default/keymap.c | 93 +- .../clueboard/66_hotswap/prototype/config.h | 55 + .../66_hotswap/prototype/prototype.c | 63 + .../66_hotswap/prototype/prototype.h | 86 + .../clueboard/66_hotswap/prototype/rules.mk | 24 + keyboards/clueboard/card/info.json | 2 +- .../clueboard/card/keymaps/default/keymap.c | 56 +- .../comet46/keymaps/default-rgbled/keymap.c | 3 - keyboards/comet46/keymaps/default/config.h | 8 +- keyboards/comet46/keymaps/default/keymap.c | 3 - .../comet46/keymaps/satt/action_pseudo_lut.c | 1 + keyboards/comet46/ssd1306.c | 2 +- keyboards/contra/keymaps/dana/keymap.c | 4 - keyboards/contra/keymaps/default/config.h | 8 +- keyboards/contra/keymaps/msiu/config.h | 37 + keyboards/contra/keymaps/msiu/keymap.c | 175 + keyboards/contra/keymaps/msiu/readme.md | 2 + keyboards/contra/keymaps/ryanm101/keymap.c | 3 - .../ibm_terminal/keymaps/default/rules.mk | 3 +- keyboards/converter/ibm_terminal/rules.mk | 1 - keyboards/converter/modelm101/config.h | 123 + keyboards/converter/modelm101/info.json | 12 + .../modelm101/keymaps/default/config.h | 19 + .../modelm101/keymaps/default/keymap.c | 43 + .../modelm101/keymaps/default/readme.md | 1 + .../modelm101/keymaps/iw0rm3r/config.h | 19 + .../modelm101/keymaps/iw0rm3r/keymap.c | 43 + .../modelm101/keymaps/iw0rm3r/readme.md | 5 + keyboards/converter/modelm101/modelm101.c | 67 + keyboards/converter/modelm101/modelm101.h | 45 + keyboards/converter/modelm101/readme.md | 42 + keyboards/converter/modelm101/rules.mk | 81 + .../converter/numeric_keypad_IIe/config.h | 101 + .../converter/numeric_keypad_IIe/info.json | 12 + .../keymaps/default/config.h | 19 + .../keymaps/default/keymap.c | 62 + .../keymaps/default/readme.md | 3 + .../keymaps/newbold/config.h | 19 + .../keymaps/newbold/keymap.c | 68 + .../keymaps/newbold/readme.md | 28 + .../numeric_keypad_IIe/numeric_keypad_IIe.c | 43 + .../numeric_keypad_IIe/numeric_keypad_IIe.h | 30 + .../converter/numeric_keypad_IIe/readme.md | 16 + .../numeric_keypad_IIe}/rules.mk | 15 +- keyboards/converter/palm_usb/readme.md | 7 +- keyboards/converter/palm_usb/rules.mk | 1 - keyboards/converter/sun_usb/rules.mk | 1 - keyboards/converter/usb_usb/config.h | 2 +- keyboards/converter/usb_usb/custom_matrix.cpp | 20 + .../usb_usb/keymaps/default/config.h | 7 +- keyboards/coseyfannitutti/mullet/config.h | 172 + keyboards/coseyfannitutti/mullet/info.json | 12 + .../mullet/keymaps/alternate/keymap.c | 68 + .../mullet/keymaps/default/keymap.c | 68 + keyboards/coseyfannitutti/mullet/mullet.c | 23 + keyboards/coseyfannitutti/mullet/mullet.h | 42 + keyboards/coseyfannitutti/mullet/readme.md | 15 + keyboards/coseyfannitutti/mullet/rules.mk | 80 + keyboards/coseyfannitutti/mulletpad/config.h | 172 + keyboards/coseyfannitutti/mulletpad/info.json | 12 + .../mulletpad/keymaps/default/keymap.c | 27 + .../coseyfannitutti/mulletpad/mulletpad.c | 23 + .../coseyfannitutti/mulletpad/mulletpad.h | 42 + keyboards/coseyfannitutti/mulletpad/readme.md | 15 + keyboards/coseyfannitutti/mulletpad/rules.mk | 82 + keyboards/cospad/config.h | 50 +- keyboards/cospad/cospad.c | 56 +- keyboards/cospad/cospad.h | 126 +- keyboards/cospad/info.json | 76 +- keyboards/cospad/keymaps/default/keymap.c | 126 +- keyboards/cospad/keymaps/detrus/keymap.c | 2 - keyboards/cospad/rules.mk | 43 +- keyboards/crkbd/info.json | 2 +- keyboards/crkbd/keymaps/default/keymap.c | 7 +- keyboards/crkbd/keymaps/drashna/config.h | 61 +- keyboards/crkbd/keymaps/drashna/glcdfont.c | 240 ++ keyboards/crkbd/keymaps/drashna/keymap.c | 347 +- keyboards/crkbd/keymaps/drashna/rules.mk | 42 +- keyboards/crkbd/keymaps/edvorakjp/config.h | 7 +- keyboards/crkbd/keymaps/edvorakjp/keymap.c | 140 +- keyboards/crkbd/keymaps/edvorakjp/oled.c | 18 +- keyboards/crkbd/keymaps/jarred/config.h | 44 + keyboards/crkbd/keymaps/jarred/keymap.c | 182 + keyboards/crkbd/keymaps/jarred/readme.md | 9 + keyboards/crkbd/keymaps/jarred/rules.mk | 31 + keyboards/crkbd/keymaps/like_jis/keymap.c | 6 +- keyboards/crkbd/keymaps/omgvee/config.h | 3 + keyboards/crkbd/keymaps/omgvee/keymap.c | 9 +- keyboards/crkbd/keymaps/omgvee/rules.mk | 7 +- .../default => crkbd/keymaps/rs}/config.h | 20 +- keyboards/crkbd/keymaps/rs/keymap.c | 39 + keyboards/crkbd/keymaps/rs/oled.c | 104 + keyboards/crkbd/keymaps/rs/readme.md | 19 + keyboards/crkbd/keymaps/rs/rules.mk | 32 + keyboards/crkbd/keymaps/thefrey/README.md | 16 + keyboards/crkbd/keymaps/thefrey/config.h | 45 + keyboards/crkbd/keymaps/thefrey/keymap.c | 243 ++ keyboards/crkbd/keymaps/thefrey/rules.mk | 31 + keyboards/crkbd/lib/layer_state_reader.c | 13 +- keyboards/crkbd/rev1/config.h | 7 + keyboards/crkbd/rev1/rev1.c | 100 + keyboards/crkbd/rev1/rules.mk | 6 + keyboards/crkbd/ssd1306.c | 2 +- keyboards/cu24/config.h | 2 +- keyboards/cu24/keymaps/default/keymap.c | 2 +- keyboards/cu75/keymaps/default/config.h | 7 +- keyboards/cu75/keymaps/default/keymap.c | 3 - keyboards/cu75/keymaps/iso/keymap.c | 3 - keyboards/daisy/config.h | 2 +- keyboards/dc01/arrow/config.h | 2 +- keyboards/dc01/left/config.h | 2 +- keyboards/dc01/left/matrix.c | 4 +- keyboards/dc01/numpad/config.h | 2 +- .../dc01/numpad/keymaps/default/keymap.c | 3 - .../dc01/numpad/keymaps/ortho_5x4/keymap.c | 3 - keyboards/dc01/right/config.h | 2 +- .../deltasplit75/keymaps/default/config.h | 10 +- .../deltasplit75/keymaps/default/keymap.c | 5 - .../deltasplit75/keymaps/itsaferbie/keymap.c | 5 - .../deltasplit75/keymaps/mbsurfer/keymap.c | 3 - .../deltasplit75/keymaps/protosplit/keymap.c | 5 - keyboards/dichotomy/keymaps/default/keymap.c | 6 +- keyboards/dilly/keymaps/default/config.h | 6 - keyboards/diverge3/config.h | 2 +- keyboards/diverge3/keymaps/default/config.h | 7 +- keyboards/diverge3/keymaps/default/keymap.c | 3 - keyboards/diverge3/keymaps/workman/keymap.c | 4 +- keyboards/divergetm2/config.h | 2 +- keyboards/divergetm2/info.json | 59 + keyboards/dk60/dk60.c | 10 + keyboards/do60/keymaps/default/keymap.c | 12 +- keyboards/do60/keymaps/test/keymap.c | 9 +- keyboards/donutcables/budget96/budget96.c | 80 + keyboards/donutcables/budget96/budget96.h | 56 + keyboards/donutcables/budget96/config.h | 41 + keyboards/donutcables/budget96/info.json | 16 + .../budget96}/keymaps/default/config.h | 7 +- .../budget96/keymaps/default/keymap.c | 35 + .../budget96/keymaps/default/readme.md | 1 + keyboards/donutcables/budget96/readme.md | 44 + .../budget96}/rules.mk | 13 +- keyboards/donutcables/budget96/usbconfig.h | 394 +++ keyboards/donutcables/readme.md | 12 + .../{ => donutcables}/scrabblepad/config.h | 9 +- .../{ => donutcables}/scrabblepad/info.json | 0 .../scrabblepad/keymaps/default/config.h | 19 + .../scrabblepad/keymaps/default/keymap.c | 2 +- .../scrabblepad/keymaps/default/readme.md | 0 .../scrabblepad/keymaps/random/keymap.c | 0 .../scrabblepad/keymaps/random/readme.md | 0 .../{ => donutcables}/scrabblepad/readme.md | 4 +- .../{ => donutcables}/scrabblepad/rules.mk | 0 .../scrabblepad/scrabblepad.c | 0 .../scrabblepad/scrabblepad.h | 5 +- keyboards/doro67/multi/config.h | 33 + keyboards/doro67/multi/info.json | 18 + .../doro67/multi/keymaps/default/keymap.c | 36 + .../doro67/multi/keymaps/default/readme.md | 43 + .../doro67/multi/keymaps/default_iso/keymap.c | 36 + .../multi/keymaps/default_iso/readme.md | 43 + .../multi/keymaps/default_multi/keymap.c | 36 + .../multi/keymaps/default_multi/readme.md | 46 + keyboards/doro67/multi/multi.c | 50 + keyboards/doro67/multi/multi.h | 59 + keyboards/doro67/multi/readme.md | 20 + keyboards/doro67/multi/rules.mk | 47 + keyboards/doro67/readme.md | 12 + keyboards/doro67/regular/config.h | 31 + keyboards/doro67/regular/info.json | 82 + .../doro67/regular/keymaps/default/config.h | 19 + .../doro67/regular/keymaps/default/keymap.c | 134 + .../doro67/regular/keymaps/default/readme.md | 5 + keyboards/doro67/regular/readme.md | 19 + keyboards/doro67/regular/regular.c | 47 + keyboards/doro67/regular/regular.h | 41 + keyboards/doro67/regular/rules.mk | 81 + keyboards/doro67/rgb/config.h | 71 + keyboards/doro67/rgb/info.json | 82 + keyboards/doro67/rgb/keymaps/default/config.h | 19 + keyboards/doro67/rgb/keymaps/default/keymap.c | 62 + .../doro67/rgb/keymaps/default/readme.md | 7 + keyboards/doro67/rgb/readme.md | 23 + keyboards/doro67/rgb/rgb.c | 84 + keyboards/doro67/rgb/rgb.h | 41 + keyboards/doro67/rgb/rules.mk | 83 + keyboards/dozen0/config.h | 222 ++ keyboards/dozen0/dozen0.c | 43 + keyboards/dozen0/dozen0.h | 34 + keyboards/dozen0/info.json | 16 + keyboards/dozen0/keymaps/default/config.h | 19 + keyboards/dozen0/keymaps/default/keymap.c | 40 + keyboards/dozen0/keymaps/default/readme.md | 8 + keyboards/dozen0/keymaps/f12/config.h | 19 + keyboards/dozen0/keymaps/f12/keymap.c | 40 + keyboards/dozen0/readme.md | 15 + keyboards/dozen0/rules.mk | 81 + keyboards/duck/duck_led/duck_led.c | 7 + keyboards/duck/duck_led/duck_led.h | 16 + keyboards/duck/eagle_viper/readme.md | 7 +- keyboards/duck/eagle_viper/v2/config.h | 8 +- .../duck/eagle_viper/v2/indicator_leds.c | 23 +- .../duck/eagle_viper/v2/indicator_leds.h | 1 - keyboards/duck/eagle_viper/v2/matrix.c | 63 +- keyboards/duck/eagle_viper/v2/readme.md | 4 +- keyboards/duck/eagle_viper/v2/rules.mk | 28 +- keyboards/duck/eagle_viper/v2/v2.h | 4 +- keyboards/duck/jetfire/config.h | 6 +- .../{backlight_led.c => indicator_leds.c} | 43 +- .../{backlight_led.h => indicator_leds.h} | 11 +- keyboards/duck/jetfire/jetfire.c | 10 +- keyboards/duck/jetfire/jetfire.h | 4 +- keyboards/duck/jetfire/readme.md | 2 +- keyboards/duck/jetfire/rules.mk | 6 +- keyboards/duck/lightsaver/config.h | 8 +- keyboards/duck/lightsaver/indicator_leds.c | 49 +- keyboards/duck/lightsaver/lightsaver.h | 4 +- keyboards/duck/lightsaver/matrix.c | 3 + keyboards/duck/lightsaver/rules.mk | 28 +- keyboards/duck/octagon/v1/config.h | 9 +- keyboards/duck/octagon/v1/matrix.c | 3 + keyboards/duck/octagon/v1/rules.mk | 26 +- keyboards/duck/octagon/v1/v1.h | 4 +- keyboards/duck/octagon/v2/config.h | 8 +- keyboards/duck/octagon/v2/indicator_leds.c | 36 +- keyboards/duck/octagon/v2/indicator_leds.h | 6 +- keyboards/duck/octagon/v2/matrix.c | 3 + keyboards/duck/octagon/v2/readme.md | 2 + keyboards/duck/octagon/v2/rules.mk | 28 +- keyboards/duck/octagon/v2/v2.h | 4 +- keyboards/dz60/dz60.h | 27 + keyboards/dz60/info.json | 4 + keyboards/dz60/keymaps/LEdiodes/keymap.c | 2 - keyboards/dz60/keymaps/atlacat/keymap.c | 3 - .../dz60/keymaps/billiams/build_flash.sh | 9 + keyboards/dz60/keymaps/billiams/config.h | 1 + keyboards/dz60/keymaps/billiams/keymap.c | 48 + keyboards/dz60/keymaps/billiams/readme.md | 72 + keyboards/dz60/keymaps/billypython/config.h | 3 + keyboards/dz60/keymaps/billypython/keymap.c | 46 + keyboards/dz60/keymaps/billypython/rules.mk | 8 + keyboards/dz60/keymaps/bingocaller/config.h | 3 + keyboards/dz60/keymaps/bingocaller/keymap.c | 93 + keyboards/dz60/keymaps/bingocaller/readme.md | 114 + keyboards/dz60/keymaps/edulpn/README.md | 10 + keyboards/dz60/keymaps/edulpn/keymap.c | 18 + keyboards/dz60/keymaps/hailbreno/keymap.c | 1 - .../dz60/keymaps/iso_split-spacebar/keymap.c | 5 - keyboards/dz60/keymaps/iso_uk/keymap.c | 6 - keyboards/dz60/keymaps/krusli/keymap.c | 2 - keyboards/dz60/keymaps/macos_64/config.h | 9 + keyboards/dz60/keymaps/macos_64/keymap.c | 42 + keyboards/dz60/keymaps/macos_64/readme.md | 45 + keyboards/dz60/keymaps/macos_64/rules.mk | 2 + keyboards/dz60/keymaps/macos_arrow/keymap.c | 41 +- keyboards/dz60/keymaps/macos_arrow/rules.mk | 4 +- .../dz60/keymaps/marianas/keyDefinitions.h | 1 - keyboards/dz60/keymaps/n0velty/keymap.c | 2 - .../dz60/keymaps/olligranlund_iso/keymap.c | 38 + .../dz60/keymaps/olligranlund_iso/readme.md | 6 + keyboards/dz60/keymaps/tailcall/keymap.c | 3 - keyboards/dz60/keymaps/zepol_layout/keymap.c | 25 + keyboards/dztech/dz40rgb/config.h | 32 + keyboards/dztech/dz40rgb/dz40rgb.c | 203 ++ keyboards/dztech/dz40rgb/dz40rgb.h | 27 + .../dztech/dz40rgb/keymaps/default/config.h | 3 + .../dztech/dz40rgb/keymaps/default/keymap.c | 71 + .../dz40rgb/keymaps/split_space/config.h | 5 + .../dz40rgb/keymaps/split_space/keymap.c | 96 + keyboards/dztech/dz40rgb/rules.mk | 14 + keyboards/dztech/dz60rgb/config.h | 16 +- keyboards/dztech/dz60rgb/dz60rgb.c | 443 ++- keyboards/dztech/dz60rgb/dz60rgb.h | 56 + keyboards/dztech/dz60rgb/info.json | 9 +- .../dztech/dz60rgb/keymaps/ansi/config.h | 2 + .../dztech/dz60rgb/keymaps/ansi/keymap.c | 78 + .../dztech/dz60rgb/keymaps/default/keymap.c | 213 +- .../dztech/dz60rgb/keymaps/hhkb/config.h | 2 + .../dztech/dz60rgb/keymaps/hhkb/keymap.c | 79 + .../dztech/dz60rgb/keymaps/hhkb_iso/config.h | 2 + .../dztech/dz60rgb/keymaps/hhkb_iso/keymap.c | 79 + keyboards/dztech/dz60rgb/keymaps/iso/config.h | 2 + keyboards/dztech/dz60rgb/keymaps/iso/keymap.c | 78 + .../dz60rgb/keymaps/matthewrobo/config.h | 60 + .../dz60rgb/keymaps/matthewrobo/keymap.c | 331 ++ .../dz60rgb/keymaps/matthewrobo/rules.mk | 7 + .../dztech/dz60rgb/keymaps/mekanist/keymap.c | 173 + .../dztech/dz60rgb/keymaps/mekanist/readme.md | 34 + keyboards/dztech/dz60rgb/rules.mk | 47 +- keyboards/dztech/dz65rgb/config.h | 29 + keyboards/dztech/dz65rgb/dz65rgb.c | 116 + keyboards/dztech/dz65rgb/dz65rgb.h | 16 + keyboards/dztech/dz65rgb/info.json | 12 + .../dztech/dz65rgb/keymaps/default/keymap.c | 40 + keyboards/dztech/dz65rgb/readme.md | 14 + keyboards/dztech/dz65rgb/rules.mk | 14 + keyboards/eco/keymaps/default/keymap.c | 4 - keyboards/eco/keymaps/fsck/config.h | 19 + keyboards/eco/keymaps/fsck/keymap.c | 76 + keyboards/eco/keymaps/fsck/readme.md | 5 + keyboards/eco/keymaps/fsck/rules.mk | 19 + keyboards/eco/keymaps/hexwire/keymap.c | 2 - keyboards/eco/keymaps/that_canadian/keymap.c | 4 - keyboards/eco/keymaps/xyverz/keymap.c | 4 - keyboards/emptystring/NQG/NQG.c | 1 + keyboards/emptystring/NQG/NQG.h | 15 + keyboards/emptystring/NQG/config.h | 42 + keyboards/emptystring/NQG/info.json | 50 + .../emptystring/NQG/keymaps/default/keymap.c | 61 + .../emptystring/NQG/keymaps/default/rules.mk | 1 + keyboards/emptystring/NQG/readme.md | 15 + keyboards/emptystring/NQG/rules.mk | 64 + keyboards/ep/40/config.h | 2 +- keyboards/ep/96/config.h | 2 +- .../ergo42/keymaps/biacco-biacco/keymap.c | 4 - .../ergo42/keymaps/biacco-macOS/keymap.c | 4 - .../ergo42/keymaps/biacco-underglow/keymap.c | 4 - keyboards/ergo42/keymaps/biacco/keymap.c | 4 - .../keymaps/default-illustrator/keymap.c | 4 - .../ergo42/keymaps/default-underglow/keymap.c | 4 - keyboards/ergo42/keymaps/default/keymap.c | 4 - keyboards/ergo42/keymaps/hdbx/keymap.c | 3 - keyboards/ergo42/keymaps/ichi-t/keymap.c | 4 - keyboards/ergo42/keymaps/koba/keymap.c | 52 +- keyboards/ergo42/keymaps/koba/readme.md | 4 +- keyboards/ergo42/keymaps/koba/readme_ja.md | 2 +- keyboards/ergo42/keymaps/yshrsmz/keymap.c | 4 - keyboards/ergodash/ergodash.h | 22 +- keyboards/ergodash/matrix.c | 490 --- keyboards/ergodash/mini/config.h | 39 +- .../ergodash/mini/keymaps/default/config.h | 8 +- .../ergodash/mini/keymaps/default/keymap.c | 3 - .../ergodash/mini/keymaps/default/rules.mk | 3 + keyboards/ergodash/mini/rules.mk | 1 + keyboards/ergodash/readme.md | 17 +- keyboards/ergodash/rev1/config.h | 55 +- keyboards/ergodash/rev1/info.json | 8 +- .../ergodash/rev1/keymaps/default/config.h | 13 +- .../ergodash/rev1/keymaps/default/keymap.c | 135 +- .../ergodash/rev1/keymaps/default/rules.mk | 3 + .../rev1/keymaps/greenshadowmaker}/config.h | 2 +- .../keyboard-layout-editor.json | 460 +++ .../rev1/keymaps/greenshadowmaker/keymap.c | 136 + .../rev1/keymaps/greenshadowmaker}/rules.mk | 4 +- keyboards/ergodash/rev1/rev1.h | 44 +- keyboards/ergodash/rev1/rules.mk | 2 + keyboards/ergodash/rev2/info.json | 13 - .../ergodash/rev2/keymaps/default/keymap.c | 159 - keyboards/ergodash/rev2/rev2.c | 39 - keyboards/ergodash/rev2/rev2.h | 66 - keyboards/ergodash/rules.mk | 41 +- keyboards/ergodash/serial.c | 228 -- keyboards/ergodash/serial.h | 26 - keyboards/ergodash/split_util.c | 86 - keyboards/ergodash/split_util.h | 20 - keyboards/ergodone/info.json | 4 +- keyboards/ergodone/keymaps/default/keymap.c | 8 +- keyboards/ergodone/keymaps/eozaki/keymap.c | 4 - keyboards/ergodone/keymaps/erovia/keymap.c | 8 +- keyboards/ergodox_ez/config.h | 4 +- keyboards/ergodox_ez/ergodox_ez.c | 106 +- keyboards/ergodox_ez/info.json | 6 +- .../ergodox_ez/keymaps/blakedietz/keymap.c | 6 +- keyboards/ergodox_ez/keymaps/default/keymap.c | 6 +- .../ergodox_ez/keymaps/default_osx/keymap.c | 6 +- .../ergodox_ez/keymaps/dvorak_42_key/keymap.c | 88 +- keyboards/ergodox_ez/keymaps/kou/keymap.c | 5 - .../ergodox_ez/keymaps/profet_80/keymap.c | 6 +- keyboards/ergodox_ez/keymaps/pvinis/keymap.c | 330 ++ .../ergodox_ez/keymaps/pvinis/readme.md | 0 keyboards/ergodox_ez/keymaps/pvinis/rules.mk | 1 + keyboards/ergodox_ez/keymaps/skug/keymap.c | 4 - .../ergodox_ez/keymaps/smurmann/keymap.c | 6 - keyboards/ergodox_ez/keymaps/steno/keymap.c | 112 +- keyboards/ergodox_ez/keymaps/steno/rules.mk | 2 +- keyboards/ergodox_ez/keymaps/vim/keymap.c | 5 - keyboards/ergodox_ez/matrix.c | 469 ++- keyboards/ergodox_ez/rules.mk | 1 + keyboards/ergodox_infinity/info.json | 4 +- .../ergodox_infinity/keymaps/default/keymap.c | 8 +- .../ergodox_infinity/keymaps/gordon/keymap.c | 4 - .../keymaps/halfkeyboard/keymap.c | 5 - .../keymaps/input_club/keymap.c | 4 - .../ergodox_infinity/keymaps/narze/keymap.c | 4 - .../keymaps/nordic_ergo/keymap.c | 8 +- .../ergodox_infinity/keymaps/rask/keymap.c | 4 - keyboards/ergodox_infinity/rules.mk | 1 + keyboards/ergotaco/config.h | 61 + keyboards/ergotaco/ergotaco.c | 72 + keyboards/ergotaco/ergotaco.h | 50 + keyboards/ergotaco/info.json | 61 + keyboards/ergotaco/keymaps/default/keymap.c | 42 + keyboards/ergotaco/keymaps/default/readme.md | 6 + keyboards/ergotaco/keymaps/default/rules.mk | 10 + keyboards/ergotaco/matrix.c | 362 ++ keyboards/ergotaco/readme.md | 24 + keyboards/ergotaco/rules.mk | 26 + keyboards/ergotravel/keymaps/ckofy/keymap.c | 6 +- keyboards/ergotravel/keymaps/default/keymap.c | 4 +- keyboards/ergotravel/keymaps/ian/keymap.c | 6 +- keyboards/ergotravel/keymaps/jarred/config.h | 29 + keyboards/ergotravel/keymaps/jarred/keymap.c | 50 + .../keymaps/jpconstantineau/keymap.c | 3 +- keyboards/ergotravel/keymaps/rs/keymap.c | 45 +- keyboards/ergotravel/keymaps/rs/readme.md | 14 +- keyboards/ergotravel/keymaps/viet/keymap.c | 3 +- keyboards/espectro/espectro.h | 21 +- keyboards/espectro/keymaps/mac/keymap.c | 3 - keyboards/exclusive/e6_rgb/e6_rgb.c | 130 +- keyboards/exclusive/e6v2/oe_bmc/config.h | 49 + keyboards/exclusive/e6v2/oe_bmc/info.json | 24 + .../e6v2/oe_bmc/keymaps/default/config.h | 19 + .../e6v2/oe_bmc/keymaps/default/keymap.c | 74 + .../e6v2/oe_bmc/keymaps/default/readme.md | 1 + keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c | 96 + keyboards/exclusive/e6v2/oe_bmc/oe_bmc.h | 101 + keyboards/exclusive/e6v2/oe_bmc/readme.md | 44 + keyboards/exclusive/e6v2/oe_bmc/rules.mk | 90 + keyboards/exclusive/e6v2/oe_bmc/usbconfig.h | 393 +++ keyboards/exclusive/e6v2/readme.md | 2 +- keyboards/facew/config.h | 7 +- keyboards/facew/facew.c | 4 +- keyboards/facew/facew.h | 9 +- keyboards/facew/i2c.c | 106 - keyboards/facew/i2c.h | 27 - keyboards/facew/info.json | 2 +- keyboards/facew/keymaps/default/keymap.c | 6 +- keyboards/facew/keymaps/mechmerlin/keymap.c | 51 - keyboards/facew/keymaps/mechmerlin/readme.md | 18 - keyboards/facew/matrix.c | 106 - keyboards/facew/readme.md | 20 +- keyboards/facew/rules.mk | 9 +- keyboards/facew/usbconfig.h | 13 +- keyboards/fc660c/config.h | 2 +- keyboards/fc660c/keymaps/default/config.h | 7 +- .../fc660c/keymaps/spacebarracecar/config.h | 8 - .../fc660c/keymaps/spacebarracecar/keymap.c | 38 - .../fc660c/keymaps/spacebarracecar/rules.mk | 6 - keyboards/fc980c/README.md | 2 +- keyboards/fc980c/config.h | 2 +- keyboards/fc980c/keymaps/default/config.h | 6 +- keyboards/fleuron/config.h | 2 +- keyboards/fleuron/keymaps/default/keymap.c | 3 - .../fleuron/keymaps/dollartacos/keymap.c | 3 - .../fortitude60/keymaps/default/config.h | 7 +- .../fortitude60/keymaps/default/keymap.c | 4 - .../four_banger/keymaps/default/keymap.c | 2 +- keyboards/fourier/rev1/rev1.h | 21 - keyboards/foxlab/leaf60/hotswap/config.h | 229 ++ keyboards/foxlab/leaf60/hotswap/hotswap.c | 59 + keyboards/foxlab/leaf60/hotswap/hotswap.h | 40 + keyboards/foxlab/leaf60/hotswap/info.json | 12 + .../leaf60/hotswap/keymaps/default/config.h | 19 + .../leaf60/hotswap/keymaps/default/keymap.c | 46 + .../leaf60/hotswap/keymaps/default/readme.md | 1 + keyboards/foxlab/leaf60/hotswap/readme.md | 13 + keyboards/foxlab/leaf60/hotswap/rules.mk | 80 + keyboards/foxlab/leaf60/readme.md | 7 + keyboards/foxlab/leaf60/universal/config.h | 229 ++ keyboards/foxlab/leaf60/universal/info.json | 20 + .../leaf60/universal/keymaps/default/config.h | 19 + .../leaf60/universal/keymaps/default/keymap.c | 46 + .../universal/keymaps/default/readme.md | 1 + keyboards/foxlab/leaf60/universal/readme.md | 13 + keyboards/foxlab/leaf60/universal/rules.mk | 82 + keyboards/foxlab/leaf60/universal/universal.c | 61 + keyboards/foxlab/leaf60/universal/universal.h | 68 + keyboards/ft/mars80/config.h | 50 + keyboards/ft/mars80/info.json | 16 + keyboards/ft/mars80/keymaps/default/config.h | 19 + keyboards/ft/mars80/keymaps/default/keymap.c | 75 + keyboards/ft/mars80/keymaps/default/readme.md | 1 + keyboards/ft/mars80/mars80.c | 91 + keyboards/ft/mars80/mars80.h | 63 + keyboards/ft/mars80/readme.md | 44 + keyboards/ft/mars80/rules.mk | 50 + keyboards/ft/mars80/usbconfig.h | 393 +++ keyboards/georgi/config.h | 72 + keyboards/georgi/georgi.c | 68 + keyboards/georgi/georgi.h | 82 + keyboards/georgi/info.json | 133 + keyboards/georgi/keymaps/colemak-dh/keymap.c | 306 ++ keyboards/georgi/keymaps/colemak-dh/readme.md | 11 + keyboards/georgi/keymaps/colemak-dh/rules.mk | 45 + keyboards/georgi/keymaps/default/keymap.c | 248 ++ keyboards/georgi/keymaps/default/readme.md | 11 + keyboards/georgi/keymaps/default/rules.mk | 42 + keyboards/georgi/keymaps/minimal/keymap.c | 223 ++ keyboards/georgi/keymaps/minimal/readme.md | 11 + keyboards/georgi/keymaps/minimal/rules.mk | 41 + keyboards/georgi/keymaps/norman/keymap.c | 267 ++ keyboards/georgi/keymaps/norman/readme.md | 11 + keyboards/georgi/keymaps/norman/rules.mk | 35 + keyboards/georgi/matrix.c | 398 +++ keyboards/georgi/readme.md | 32 + keyboards/georgi/rules.mk | 23 + keyboards/georgi/sten.c | 418 +++ keyboards/georgi/sten.h | 85 + keyboards/gergo/gergo.c | 20 +- keyboards/gergo/gergo.h | 18 +- keyboards/gergo/i2cmaster.h | 178 - keyboards/gergo/info.json | 44 +- keyboards/gergo/keymaps/colemak/keymap.c | 174 + keyboards/gergo/keymaps/colemak/readme.md | 16 + keyboards/gergo/keymaps/colemak/rules.mk | 36 + keyboards/gergo/keymaps/default/config.h | 3 + keyboards/gergo/keymaps/default/keymap.c | 75 +- keyboards/gergo/keymaps/default/rules.mk | 5 +- keyboards/gergo/keymaps/drashna/keymap.c | 113 + keyboards/gergo/keymaps/drashna/rules.mk | 2 + keyboards/gergo/keymaps/germ/config.h | 3 + keyboards/gergo/keymaps/germ/keymap.c | 128 + keyboards/gergo/keymaps/germ/readme.md | 10 + keyboards/gergo/keymaps/germ/rules.mk | 37 + keyboards/gergo/matrix.c | 279 +- keyboards/gergo/rules.mk | 3 +- keyboards/gh60/keymaps/chaser/keymap.c | 4 - keyboards/gh60/keymaps/default/keymap.c | 10 +- keyboards/gh60/keymaps/emiilsd/keymap.c | 3 - keyboards/gh60/keymaps/xyverz/keymap.c | 4 - keyboards/gray_studio/cod67/config.h | 2 +- .../{ps2avrGB => gray_studio/hb85}/config.h | 22 +- keyboards/gray_studio/hb85/hb85.c | 75 + keyboards/gray_studio/hb85/hb85.h | 100 + keyboards/gray_studio/hb85/info.json | 24 + .../gray_studio/hb85/keymaps/default/keymap.c | 46 + .../gray_studio/hb85/keymaps/stt/keymap.c | 38 + keyboards/gray_studio/hb85/readme.md | 48 + keyboards/gray_studio/hb85/rules.mk | 48 + keyboards/gray_studio/hb85/usbconfig.h | 393 +++ keyboards/gray_studio/space65/config.h | 4 +- keyboards/gray_studio/space65/rules.mk | 4 +- keyboards/h87a/h87a.h | 47 - keyboards/h87a/info.json | 12 - .../hadron/ver2/keymaps/default/keymap.c | 8 +- keyboards/hadron/ver2/keymaps/readme.md | 1 - .../hadron/ver2/keymaps/side_numpad/keymap.c | 3 - keyboards/hadron/ver3/chconf.h | 4 +- keyboards/hadron/ver3/config.h | 45 +- keyboards/hadron/ver3/halconf.h | 2 +- .../hadron/ver3/keymaps/default/keymap.c | 15 +- keyboards/hadron/ver3/keymaps/ishtob/keymap.c | 10 +- keyboards/hadron/ver3/keymaps/readme.md | 7 +- keyboards/hadron/ver3/matrix.c | 195 -- keyboards/hadron/ver3/mcuconf.h | 2 +- keyboards/hadron/ver3/rules.mk | 48 +- keyboards/hadron/ver3/ver3.c | 57 +- keyboards/hadron/ver3/ver3.h | 9 +- keyboards/halberd/config.h | 232 ++ keyboards/halberd/halberd.c | 43 + keyboards/halberd/halberd.h | 40 + keyboards/halberd/info.json | 13 + keyboards/halberd/keymaps/default/config.h | 19 + keyboards/halberd/keymaps/default/keymap.c | 160 + keyboards/halberd/keymaps/default/readme.md | 1 + .../halberd/keymaps/right_modifiers/config.h | 19 + .../halberd/keymaps/right_modifiers/keymap.c | 160 + .../halberd/keymaps/right_modifiers/readme.md | 2 + keyboards/halberd/readme.md | 15 + keyboards/halberd/rules.mk | 80 + keyboards/{ => handwired}/412_64/412_64.c | 0 keyboards/{ => handwired}/412_64/412_64.h | 0 keyboards/{ => handwired}/412_64/config.h | 2 +- .../412_64/keymaps/default/config.h | 0 .../412_64/keymaps/default/keymap.c | 0 .../412_64/keymaps/default/rules.mk | 0 keyboards/{ => handwired}/412_64/readme.md | 8 +- keyboards/{ => handwired}/412_64/rules.mk | 0 keyboards/handwired/ck4x4/bootloader_defs.h | 7 + keyboards/handwired/ck4x4/chconf.h | 524 +++ keyboards/handwired/ck4x4/ck4x4.c | 1 + keyboards/handwired/ck4x4/ck4x4.h | 15 + keyboards/handwired/ck4x4/config.h | 70 + keyboards/handwired/ck4x4/halconf.h | 353 ++ .../ck4x4/keymaps/default/keymap.c} | 18 +- keyboards/handwired/ck4x4/mcuconf.h | 171 + keyboards/handwired/ck4x4/readme.md | 3 + keyboards/handwired/ck4x4/rules.mk | 49 + .../handwired/dactyl/keymaps/default/keymap.c | 6 +- .../handwired/dactyl/keymaps/dvorak/keymap.c | 6 +- .../4x5/keymaps/default/config.h | 2 - .../4x5/keymaps/default/keymap.c | 5 +- keyboards/handwired/dactyl_manuform/5x6/5x6.h | 54 +- .../handwired/dactyl_manuform/5x6/info.json | 2 +- .../5x6/keymaps/333fred/keymap.c | 16 +- .../5x6/keymaps/default/keymap.c | 4 - .../5x6/keymaps/impstyle/keymap.c | 4 - keyboards/handwired/dactyl_manuform/5x7/5x7.h | 66 +- .../handwired/dactyl_manuform/5x7/info.json | 4 +- .../5x7/keymaps/default/keymap.c | 4 - keyboards/handwired/dactyl_manuform/6x6/6x6.h | 60 +- .../handwired/dactyl_manuform/6x6/info.json | 2 +- .../6x6/keymaps/default/keymap.c | 2 - keyboards/handwired/dactyl_manuform/readme.md | 16 +- keyboards/handwired/dactyl_promicro/config.h | 83 + .../dactyl_promicro/dactyl_promicro.c} | 14 +- .../dactyl_promicro/dactyl_promicro.h | 39 + .../dactyl_promicro/keymaps/default/config.h | 25 + .../dactyl_promicro/keymaps/default/keymap.c | 47 + .../dactyl_promicro/keymaps/impstyle/config.h | 25 + .../dactyl_promicro/keymaps/impstyle/keymap.c | 47 + keyboards/handwired/dactyl_promicro/readme.md | 93 + .../dactyl_promicro}/rules.mk | 17 +- keyboards/handwired/daishi/config.h | 61 + keyboards/handwired/daishi/daishi.c | 22 + keyboards/handwired/daishi/daishi.h | 25 + .../handwired/daishi/keymaps/default/keymap.c | 124 + .../daishi/keymaps/default/readme.md | 5 + keyboards/handwired/daishi/readme.md | 15 + keyboards/handwired/daishi/rules.mk | 66 + keyboards/handwired/datahand/config.h | 2 +- keyboards/handwired/downbubble/config.h | 2 +- keyboards/handwired/frenchdev/config.h | 5 +- keyboards/handwired/frenchdev/frenchdev.c | 54 +- keyboards/handwired/frenchdev/frenchdev.h | 8 +- keyboards/handwired/frenchdev/i2cmaster.h | 178 - keyboards/handwired/frenchdev/info.json | 2 +- .../frenchdev/keymaps/default/keymap.c | 154 +- keyboards/handwired/frenchdev/matrix.c | 34 +- keyboards/handwired/frenchdev/readme.md | 1 - keyboards/handwired/frenchdev/rules.mk | 6 +- keyboards/handwired/frenchdev/twimaster.c | 208 -- .../gamenum/keymaps/default/keymap.c | 56 +- keyboards/handwired/hacked_motospeed/config.h | 249 ++ .../hacked_motospeed/hacked_motospeed.c | 43 + .../hacked_motospeed/hacked_motospeed.h | 46 + .../handwired/hacked_motospeed/info.json | 12 + .../hacked_motospeed/keymaps/default/config.h | 19 + .../hacked_motospeed/keymaps/default/keymap.c | 65 + .../keymaps/default/readme.md | 1 + .../handwired/hacked_motospeed/readme.md | 23 + keyboards/handwired/hacked_motospeed/rules.mk | 81 + .../hexon38/keymaps/default/keymap.c | 2 +- keyboards/handwired/ibm122m/config.h | 2 +- keyboards/handwired/jn68m/config.h | 2 +- keyboards/handwired/jot50/config.h | 38 + .../rev1/rev1.c => handwired/jot50/jot50.c} | 5 +- keyboards/handwired/jot50/jot50.h | 19 + .../handwired/jot50/keymaps/default/keymap.c | 84 + keyboards/handwired/jot50/readme.md | 35 + .../{preonic => handwired/jot50}/rules.mk | 24 +- keyboards/handwired/jotanck/config.h | 39 + keyboards/handwired/jotanck/jotanck.c | 6 + keyboards/handwired/jotanck/jotanck.h | 17 + .../jotanck/keymaps/default/keymap.c | 92 + keyboards/handwired/jotanck/readme.md | 38 + keyboards/handwired/jotanck/rules.mk | 66 + keyboards/handwired/jotpad16/config.h | 38 + keyboards/handwired/jotpad16/jotpad16.c | 6 + keyboards/handwired/jotpad16/jotpad16.h | 18 + .../jotpad16/keymaps/default/keymap.c | 34 + keyboards/handwired/jotpad16/readme.md | 39 + keyboards/handwired/jotpad16/rules.mk | 66 + keyboards/handwired/kbod/config.h | 2 +- .../handwired/kbod/keymaps/default/keymap.c | 37 +- keyboards/handwired/lovelive9/config.h | 39 + keyboards/handwired/lovelive9/info.json | 12 + .../lovelive9/keymaps/default/keymap.c | 338 ++ keyboards/handwired/lovelive9/lovelive9.c | 7 + keyboards/handwired/lovelive9/lovelive9.h | 9 + keyboards/handwired/lovelive9/readme.md | 14 + keyboards/handwired/lovelive9/rules.mk | 67 + .../maartenwut/keymaps/default/keymap.c | 7 +- keyboards/handwired/magicforce61/README.md | 24 - keyboards/handwired/magicforce61/config.h | 7 +- keyboards/handwired/magicforce61/info.json | 74 + .../magicforce61/keymaps/default/keymap.c | 93 +- .../handwired/magicforce61/magicforce61.h | 17 +- keyboards/handwired/magicforce61/readme.md | 31 + keyboards/handwired/magicforce68/README.md | 20 - keyboards/handwired/magicforce68/info.json | 81 + .../magicforce68/keymaps/default/keymap.c | 73 +- .../handwired/magicforce68/magicforce68.h | 14 +- keyboards/handwired/magicforce68/readme.md | 24 + .../handwired/mechboards_micropad/config.h | 245 ++ .../handwired/mechboards_micropad/info.json | 12 + .../keymaps/default/keymap.c | 84 + .../keymaps/default/readme.md | 4 + .../mechboards_micropad/mechboards_micropad.c | 43 + .../mechboards_micropad/mechboards_micropad.h | 33 + .../handwired/mechboards_micropad/readme.md | 14 + .../handwired/mechboards_micropad/rules.mk | 81 + .../minorca/keymaps/default/config.h | 8 +- keyboards/handwired/not_so_minidox/info.json | 2 +- .../not_so_minidox/keymaps/default/keymap.c | 4 - keyboards/handwired/ortho5x13/info.json | 2 +- keyboards/handwired/prime_exl/config.h | 26 +- keyboards/handwired/prime_exl/info.json | 4 +- .../prime_exl/keymaps/default/keymap.c | 42 +- .../handwired/prime_exl/keymaps/via/keymap.c | 101 + .../handwired/prime_exl/keymaps/via/readme.md | 1 + .../handwired/prime_exl/keymaps/via/rules.mk | 86 + keyboards/handwired/prime_exl/prime_exl.c | 3 +- keyboards/handwired/prime_exl/prime_exl.h | 6 +- keyboards/handwired/promethium/info.json | 2 +- .../promethium/keymaps/default/keymap.c | 5 +- .../promethium/keymaps/priyadi/keymap.c | 7 +- .../space_oddity/keymaps/default/keymap.c | 2 - keyboards/handwired/splittest/config.h | 75 + .../splittest/keymaps/default/config.h | 23 + .../splittest/keymaps/default/keymap.c | 5 + keyboards/handwired/splittest/readme.md | 26 + .../{fourier => handwired/splittest}/rules.mk | 3 - keyboards/handwired/splittest/splittest.c | 1 + keyboards/handwired/splittest/splittest.h | 5 + keyboards/handwired/tennie/config.h | 240 ++ keyboards/handwired/tennie/info.json | 12 + .../handwired/tennie/keymaps/default/config.h | 19 + .../handwired/tennie/keymaps/default/keymap.c | 95 + .../tennie/keymaps/default/readme.md | 68 + .../tennie/keymaps/simple-numbpad/config.h | 19 + .../tennie/keymaps/simple-numbpad/keymap.c | 37 + .../tennie/keymaps/simple-numbpad/readme.md | 18 + .../tennie/keymaps/soundboard/config.h | 19 + .../tennie/keymaps/soundboard/keymap.c | 37 + .../tennie/keymaps/soundboard/readme.md | 19 + keyboards/handwired/tennie/readme.md | 15 + keyboards/handwired/tennie/rules.mk | 80 + keyboards/handwired/tennie/tennie.c | 45 + keyboards/handwired/tennie/tennie.h | 37 + keyboards/handwired/terminus_mini/config.h | 2 +- keyboards/handwired/terminus_mini/info.json | 59 + .../terminus_mini/keymaps/default/config.h | 9 +- .../terminus_mini/keymaps/default/keymap.c | 135 +- keyboards/handwired/terminus_mini/readme.md | 7 +- .../handwired/terminus_mini/terminus_mini.h | 16 +- keyboards/handwired/trackpoint/README.md | 10 - keyboards/handwired/trackpoint/config.h | 119 +- .../trackpoint/keymaps/default/keymap.c | 4 +- keyboards/handwired/trackpoint/readme.md | 19 + keyboards/handwired/trackpoint/trackpoint.h | 11 +- keyboards/handwired/tradestation/info.json | 2 +- .../traveller/keymaps/default/keymap.c | 112 +- keyboards/handwired/woodpad/config.h | 2 +- .../woodpad/keymaps/default/config.h | 7 +- .../woodpad/keymaps/default/keymap.c | 8 +- .../woodpad/keymaps/drashna/README.md | 25 - .../woodpad/keymaps/drashna/keymap.c | 104 - .../woodpad/keymaps/drashna/rules.mk | 10 - keyboards/handwired/xealous/config.h | 12 +- keyboards/handwired/xealous/debounce.c | 63 - .../xealous/keymaps/default/keymap.c | 3 - keyboards/handwired/xealous/matrix.c | 329 +- keyboards/handwired/xealous/rules.mk | 6 +- keyboards/hecomi/alpha/config.h | 247 ++ keyboards/hecomi/alpha/info.json | 364 ++ keyboards/hecomi/alpha/readme.md | 21 + keyboards/hecomi/alpha/rules.mk | 82 + keyboards/hecomi/hecomi.c | 44 + keyboards/hecomi/hecomi.h | 89 + keyboards/hecomi/keymaps/default/config.h | 19 + keyboards/hecomi/keymaps/default/keymap.c | 105 + keyboards/hecomi/keymaps/default/readme.md | 1 + keyboards/hecomi/readme.md | 17 + keyboards/hecomi/rules.mk | 85 + keyboards/helix/pico/keymaps/biacco/keymap.c | 3 - keyboards/helix/pico/keymaps/default/config.h | 5 +- keyboards/helix/pico/keymaps/default/keymap.c | 4 - .../helix/rev1/keymaps/OLED_sample/keymap.c | 4 - keyboards/helix/rev1/keymaps/default/config.h | 7 +- keyboards/helix/rev1/keymaps/default/keymap.c | 4 - keyboards/helix/rev2/keymaps/default/config.h | 5 +- keyboards/helix/rev2/keymaps/default/keymap.c | 11 - .../helix/rev2/keymaps/edvorakjp/config.h | 18 +- .../helix/rev2/keymaps/edvorakjp/keymap.c | 27 +- .../rev2/keymaps/edvorakjp/keymap_4rows.c | 102 +- .../rev2/keymaps/edvorakjp/keymap_5rows.c | 122 +- .../rev2/keymaps/edvorakjp/keymap_xrows.h | 31 +- keyboards/helix/rev2/keymaps/edvorakjp/oled.c | 14 +- .../helix/rev2/keymaps/edvorakjp/rules.mk | 1 + .../helix/rev2/keymaps/five_rows_jis/keymap.c | 4 - keyboards/helix/rev2/keymaps/froggy/keymap.c | 4 - .../rev2/keymaps/led_test/led_test_init.c | 16 +- keyboards/helix/rev2/keymaps/yshrsmz/keymap.c | 4 - keyboards/hhkb/keymaps/bakingpy/keymap.c | 2 - keyboards/hhkb/keymaps/enoch_jp/keymap.c | 1 - keyboards/hhkb/keymaps/jp/keymap.c | 2 - keyboards/hhkb/keymaps/jp_mac/keymap.c | 2 - keyboards/hhkb/keymaps/rdg_jp/keymap.c | 2 - keyboards/hhkb/keymaps/sh_jp/keymap.c | 2 - .../hhkb/keymaps/shela/action_pseudo_lut.c | 1 + keyboards/hhkb/keymaps/smt/keymap.c | 4 - keyboards/hid_liber/config.h | 2 +- keyboards/hid_liber/keymaps/bakageta/keymap.c | 1 - keyboards/hid_liber/keymaps/default/keymap.c | 5 +- keyboards/hifumi/config.h | 56 + keyboards/hifumi/hifumi.h | 31 + keyboards/hifumi/info.json | 12 + keyboards/hifumi/keymaps/default/keymap.c | 47 + .../config.h => hifumi/keymaps/test/keymap.c} | 41 +- keyboards/hifumi/readme.md | 13 + keyboards/hifumi/rules.mk | 62 + keyboards/{ => hineybush}/h87a/config.h | 3 +- keyboards/{ => hineybush}/h87a/h87a.c | 0 keyboards/hineybush/h87a/h87a.h | 90 + keyboards/hineybush/h87a/info.json | 20 + .../hineybush/h87a/keymaps/default/config.h | 21 + .../h87a/keymaps/default/keymap.c | 2 +- .../hineybush/h87a/keymaps/default/readme.md | 1 + .../h87a/keymaps/gam3cat/config.h | 0 .../h87a/keymaps/gam3cat/keymap.c | 0 .../h87a/keymaps/gam3cat/readme.md | 0 .../h87a/keymaps/gam3cat/rules.mk | 0 keyboards/hineybush/h87a/keymaps/wkl/config.h | 21 + keyboards/hineybush/h87a/keymaps/wkl/keymap.c | 73 + .../hineybush/h87a/keymaps/wkl/readme.md | 1 + keyboards/{ => hineybush}/h87a/readme.md | 17 +- keyboards/{ => hineybush}/h87a/rules.mk | 0 keyboards/hineybush/hineyg80/config.h | 47 + keyboards/hineybush/hineyg80/hineyg80.c | 63 + keyboards/hineybush/hineyg80/hineyg80.h | 89 + keyboards/hineybush/hineyg80/info.json | 19 + .../hineyg80/keymaps/default/config.h | 19 + .../hineyg80/keymaps/default/keymap.c | 58 + .../hineyg80/keymaps/default/readme.md | 1 + .../hineybush/hineyg80/keymaps/wkl/config.h | 19 + .../hineybush/hineyg80/keymaps/wkl/keymap.c | 60 + .../hineybush/hineyg80/keymaps/wkl/readme.md | 1 + keyboards/hineybush/hineyg80/readme.md | 16 + keyboards/hineybush/hineyg80/rules.mk | 81 + keyboards/hotdox/config.h | 78 + keyboards/hotdox/hotdox.c | 44 + keyboards/hotdox/hotdox.h | 187 ++ keyboards/hotdox/info.json | 107 + keyboards/hotdox/keymaps/default/keymap.c | 189 ++ keyboards/hotdox/keymaps/eozaki/keymap.c | 192 ++ keyboards/hotdox/keymaps/kloki/keymap.c | 210 ++ keyboards/hotdox/left.c | 130 + keyboards/hotdox/left.h | 57 + keyboards/hotdox/matrix.c | 283 ++ keyboards/hotdox/readme.md | 23 + keyboards/hotdox/rules.mk | 82 + keyboards/hs60/v1/config.h | 5 +- keyboards/hs60/v1/v1.c | 218 +- keyboards/hs60/v2/config.h | 25 +- keyboards/hs60/v2/info.json | 4 +- keyboards/hs60/v2/keymaps/ansi/readme.md | 6 +- keyboards/hs60/v2/keymaps/ansi_via/config.h | 23 + keyboards/hs60/v2/keymaps/ansi_via/keymap.c | 60 + keyboards/hs60/v2/keymaps/ansi_via/readme.md | 6 + keyboards/hs60/v2/keymaps/ansi_via/rules.mk | 67 + keyboards/hs60/v2/keymaps/default/readme.md | 4 +- .../hs60/v2/keymaps/default_via/keymap.c | 60 + .../hs60/v2/keymaps/default_via/readme.md | 6 + .../hs60/v2/keymaps/default_via/rules.mk | 67 + keyboards/hs60/v2/keymaps/goatmaster/config.h | 37 + keyboards/hs60/v2/keymaps/goatmaster/keymap.c | 71 + .../hs60/v2/keymaps/goatmaster/readme.md | 6 + keyboards/hs60/v2/keymaps/goatmaster/rules.mk | 67 + keyboards/hs60/v2/keymaps/hhkb/readme.md | 4 +- keyboards/hs60/v2/keymaps/hhkb_via/config.h | 34 + keyboards/hs60/v2/keymaps/hhkb_via/keymap.c | 60 + keyboards/hs60/v2/keymaps/hhkb_via/readme.md | 6 + keyboards/hs60/v2/keymaps/hhkb_via/rules.mk | 67 + keyboards/hs60/v2/keymaps/iso_andys8/keymap.c | 61 + .../hs60/v2/keymaps/iso_andys8/readme.md | 4 + keyboards/hs60/v2/keymaps/iso_andys8/rules.mk | 67 + keyboards/hs60/v2/keymaps/stanrc85/config.h | 41 + keyboards/hs60/v2/keymaps/stanrc85/keymap.c | 59 + keyboards/hs60/v2/keymaps/stanrc85/readme.md | 48 + keyboards/hs60/v2/keymaps/stanrc85/rules.mk | 67 + .../hs60/v2/keymaps/win_osx_dual/keymap.c | 97 + .../hs60/v2/keymaps/win_osx_dual/readme.md | 6 + .../hs60/v2/keymaps/win_osx_dual/rules.mk | 67 + keyboards/hs60/v2/readme.md | 21 +- keyboards/hs60/v2/rules.mk | 5 +- keyboards/idobo/config.h | 2 +- .../keyboard-layout-editor-gsm-idobo.json | 190 ++ .../idobo/keymaps/greenshadowmaker/keymap.c | 152 + .../idobo/keymaps/greenshadowmaker/readme.md | 3 + .../idobo/keymaps/greenshadowmaker/rules.mk | 3 + keyboards/infinity60/rules.mk | 1 + keyboards/iris/keymaps/davidrambo/readme.md | 3 - keyboards/iris/keymaps/edvorakjp/keymap.c | 166 - keyboards/iris/keymaps/edvorakjp/rules.mk | 16 - keyboards/iris/keymaps/rs/readme.md | 13 - .../v32u4/keymaps/dead_encryption/keymap.c | 2 +- keyboards/jc65/v32u4/keymaps/default/config.h | 4 +- keyboards/jd45/keymaps/mjt/keymap.c | 6 +- keyboards/jj40/README.md | 2 +- keyboards/jj40/backlight.c | 213 -- keyboards/jj40/backlight_custom.h | 15 - keyboards/jj40/breathing_custom.h | 140 - keyboards/jj40/config.h | 40 +- keyboards/jj40/i2c.c | 104 - keyboards/jj40/i2c.h | 25 - keyboards/jj40/jj40.c | 61 +- keyboards/jj40/jj40.h | 86 +- keyboards/jj40/keymaps/ajp10304/keymap.c | 4 - keyboards/jj40/keymaps/default/keymap.c | 59 +- keyboards/jj40/keymaps/waples/keymap.c | 2 - keyboards/jj40/matrix.c | 112 - keyboards/jj40/rules.mk | 44 +- keyboards/jj40/tools/usb_detach.c | 33 - keyboards/jj4x4/README.md | 2 +- keyboards/jj4x4/backlight.c | 213 -- keyboards/jj4x4/backlight_custom.h | 15 - keyboards/jj4x4/breathing_custom.h | 140 - keyboards/jj4x4/config.h | 29 +- keyboards/jj4x4/i2c.c | 104 - keyboards/jj4x4/info.json | 39 +- keyboards/jj4x4/jj4x4.c | 61 +- keyboards/jj4x4/jj4x4.h | 25 +- keyboards/jj4x4/keymaps/default/keymap.c | 89 +- keyboards/jj4x4/rules.mk | 42 +- keyboards/jj4x4/tools/README.md | 16 - keyboards/jj4x4/usbconfig.h | 4 +- keyboards/jj50/README.md | 2 +- keyboards/jj50/keymaps/abstractkb/keymap.c | 135 + keyboards/jj50/keymaps/abstractkb/readme.md | 6 + keyboards/jj50/keymaps/archetype/README.md | 22 + keyboards/jj50/keymaps/archetype/config.h | 9 + keyboards/jj50/keymaps/archetype/keymap.c | 277 ++ keyboards/jj50/keymaps/archetype/rules.mk | 65 + keyboards/jj50/keymaps/default/keymap.c | 4 +- keyboards/jj50/program | 74 - keyboards/jj50/rules.mk | 2 +- keyboards/jm60/keymaps/default/keymap.c | 2 - keyboards/jm60/keymaps/poker3/keymap.c | 2 - keyboards/k_type/keymaps/belak/keymap.c | 2 - keyboards/k_type/keymaps/default/keymap.c | 2 +- keyboards/k_type/rules.mk | 1 + keyboards/kagamidget/config.h | 222 ++ keyboards/kagamidget/info.json | 18 + keyboards/kagamidget/kagamidget.c | 43 + keyboards/kagamidget/kagamidget.h | 39 + keyboards/kagamidget/keymaps/default/config.h | 19 + keyboards/kagamidget/keymaps/default/keymap.c | 118 + .../kagamidget/keymaps/default/readme.md | 49 + keyboards/kagamidget/readme.md | 14 + keyboards/kagamidget/rules.mk | 83 + keyboards/katana60/config.h | 2 +- keyboards/katana60/keymaps/colemak/keymap.c | 3 - keyboards/katana60/keymaps/default/config.h | 7 +- keyboards/katana60/keymaps/default/keymap.c | 3 - keyboards/katana60/keymaps/msiu/config.h | 21 + keyboards/katana60/keymaps/msiu/keymap.c | 70 + keyboards/katana60/keymaps/msiu/readme.md | 3 + .../katana60/keymaps/rominronin/keymap.c | 3 - keyboards/kbdfans/kbd19x/config.h | 2 +- keyboards/kbdfans/kbd19x/info.json | 415 +-- keyboards/kbdfans/kbd19x/kbd19x.c | 9 + keyboards/kbdfans/kbd19x/kbd19x.h | 4 +- keyboards/kbdfans/kbd19x/readme.md | 2 + keyboards/kbdfans/kbd19x/rules.mk | 4 +- keyboards/kbdfans/kbd4x/config.h | 2 +- keyboards/kbdfans/kbd4x/info.json | 2 +- keyboards/kbdfans/kbd4x/kbd4x.h | 24 +- keyboards/kbdfans/kbd4x/rules.mk | 6 +- keyboards/kbdfans/kbd66/config.h | 6 +- keyboards/kbdfans/kbd66/kbd66.h | 4 +- .../kbdfans/kbd66/keymaps/default/config.h | 7 +- .../kbdfans/kbd66/keymaps/maartenwut/config.h | 0 keyboards/kbdfans/kbd66/rules.mk | 2 +- keyboards/kbdfans/kbd67/hotswap/config.h | 4 +- .../kbd67/hotswap/keymaps/bcat/keymap.c | 29 + .../kbd67/hotswap/keymaps/bcat/readme.md | 13 + keyboards/kbdfans/kbd67/hotswap/readme.md | 4 +- keyboards/kbdfans/kbd67/readme.md | 17 +- keyboards/kbdfans/kbd67/rev1/config.h | 2 +- .../kbd67/rev1/keymaps/default/keymap.c | 18 +- .../kbd67/rev1/keymaps/default/readme.md | 32 + .../kbdfans/kbd67/rev1/keymaps/koba/config.h | 17 + .../kbdfans/kbd67/rev1/keymaps/koba/keymap.c | 61 + .../kbdfans/kbd67/rev1/keymaps/koba/readme.md | 7 + .../kbd67/rev1/keymaps/martinffx/config.h | 19 + .../kbd67/rev1/keymaps/martinffx/keymap.c | 99 + .../kbd67/rev1/keymaps/martinffx/readme.md | 33 + keyboards/kbdfans/kbd67/rev1/readme.md | 8 +- keyboards/kbdfans/kbd67/rev1/rev1.h | 4 +- .../s60_x => kbdfans/kbd67/rev2}/config.h | 46 +- keyboards/kbdfans/kbd67/rev2/info.json | 16 + .../kbd67/rev2/keymaps/default/config.h | 19 + .../kbd67/rev2/keymaps/default/keymap.c | 99 + .../kbd67/rev2/keymaps/default/readme.md | 1 + .../kbdfans/kbd67/rev2/keymaps/koba/config.h | 17 + .../kbdfans/kbd67/rev2/keymaps/koba/keymap.c | 61 + .../kbdfans/kbd67/rev2/keymaps/koba/readme.md | 7 + keyboards/kbdfans/kbd67/rev2/readme.md | 13 + keyboards/kbdfans/kbd67/rev2/rev2.c | 42 + keyboards/kbdfans/kbd67/rev2/rev2.h | 57 + keyboards/kbdfans/kbd67/rev2/rules.mk | 82 + keyboards/kbdfans/kbd6x/config.h | 2 +- keyboards/kbdfans/kbd6x/kbd6x.h | 5 +- .../kbdfans/kbd6x/keymaps/konstantin/keymap.c | 154 +- .../kbdfans/kbd6x/keymaps/konstantin/rules.mk | 13 +- .../kbdfans/kbd6x/keymaps/wanleg/keymap.c | 82 + .../kbdfans/kbd6x/keymaps/wanleg/rules.mk | 3 + keyboards/kbdfans/kbd75/kbd75.h | 4 +- .../kbdfans/kbd75/keymaps/digital/keymap.c | 22 + .../kbdfans/kbd75/keymaps/digital/readme.md | 5 + .../kbdfans/kbd75/keymaps/edulpn/README.md | 2 +- .../kbdfans/kbd75/keymaps/edulpn/keymap.c | 2 +- .../kbd75/keymaps/kingwangwong/keymap.c | 145 + keyboards/kbdfans/kbd75/rev1/rev1.c | 13 +- keyboards/kbdfans/kbd75/rev2/rev2.c | 13 +- keyboards/kbdfans/kbd8x/config.h | 2 +- keyboards/kc60/keymaps/dbroqua/keymap.c | 1 - keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c | 1 - keyboards/kc60/keymaps/noroadsleft/keymap.c | 670 ++-- keyboards/kc60/keymaps/noroadsleft/readme.md | 2 +- .../kc60/keymaps/noroadsleft/readme_ch1.md | 2 - .../kc60/keymaps/noroadsleft/readme_ch2.md | 2 - .../kc60/keymaps/noroadsleft/readme_ch3.md | 6 +- .../kc60/keymaps/noroadsleft/readme_ch4.md | 4 +- .../kc60/keymaps/noroadsleft/readme_ch5.md | 88 +- .../kc60/keymaps/noroadsleft/readme_git.md | 62 +- keyboards/kc60/keymaps/stanleylai/readme.md | 4 +- keyboards/kc60/readme.md | 1 - keyboards/kc60se/config.h | 2 +- keyboards/kc60se/keymaps/default/config.h | 7 +- keyboards/{ => keebio}/bdn9/bdn9.c | 0 keyboards/{ => keebio}/bdn9/bdn9.h | 4 +- keyboards/{ => keebio}/bdn9/config.h | 15 +- keyboards/{ => keebio}/bdn9/info.json | 0 keyboards/keebio/bdn9/keymaps/bcat/keymap.c | 43 + keyboards/keebio/bdn9/keymaps/bcat/readme.md | 7 + .../bdn9/keymaps/default/keymap.c | 23 +- .../keebio/bdn9/keymaps/mousepad/config.h | 3 + .../keebio/bdn9/keymaps/mousepad/keymap.c | 81 + .../keebio/bdn9/keymaps/mousepad/readme.md | 16 + .../keebio/bdn9/keymaps/mousepad/rule.mk | 2 + .../bdn9/keymaps/vosechu-browser/keymap.c | 57 + .../keebio/bdn9/keymaps/vosechu-ksp/keymap.c | 172 + keyboards/{ => keebio}/bdn9/readme.md | 2 +- keyboards/{ => keebio}/bdn9/rules.mk | 0 keyboards/{ => keebio}/bfo9000/bfo9000.c | 0 keyboards/{ => keebio}/bfo9000/bfo9000.h | 13 +- keyboards/{ => keebio}/bfo9000/config.h | 11 +- .../bfo9000/keymaps/abstractkb/config.h | 37 + .../bfo9000/keymaps/abstractkb/keymap.c | 92 + .../bfo9000/keymaps/abstractkb/readme.md | 5 + .../bfo9000/keymaps/abstractkb/rules.mk | 1 + .../keymaps/andylikescandy6x18/config.h | 0 .../keymaps/andylikescandy6x18/keymap.c | 5 - .../keebio/bfo9000/keymaps/default/config.h | 27 + .../bfo9000/keymaps/default/keymap.c | 4 - .../keymaps/insertsnideremarks/config.h | 42 + .../keymaps/insertsnideremarks/keymap.c | 381 +++ .../keymaps/insertsnideremarks/readme.md | 1 + .../keymaps/insertsnideremarks/rules.mk | 2 +- .../bfo9000/keymaps/tuesdayjohn/config.h | 42 + .../bfo9000/keymaps/tuesdayjohn/keymap.c | 341 ++ .../bfo9000/keymaps/tuesdayjohn/rules.mk | 19 + keyboards/{ => keebio}/bfo9000/readme.md | 4 +- keyboards/{ => keebio}/bfo9000/rules.mk | 11 +- keyboards/{ => keebio}/chocopad/README.md | 2 +- keyboards/{ => keebio}/chocopad/chocopad.c | 0 keyboards/{ => keebio}/chocopad/chocopad.h | 5 +- keyboards/{ => keebio}/chocopad/config.h | 3 +- keyboards/{ => keebio}/chocopad/info.json | 0 .../keebio/chocopad/keymaps/default/config.h | 3 + .../chocopad/keymaps/default/keymap.c | 2 - .../chocopad/keymaps/default/rules.mk | 0 .../chocopad/keymaps/khord}/config.h | 0 .../chocopad/keymaps/khord/keymap.c | 6 +- .../chocopad/keymaps/khord/rules.mk | 0 keyboards/{ => keebio}/chocopad/rules.mk | 0 keyboards/{ => keebio}/dilly/README.md | 2 +- keyboards/{ => keebio}/dilly/config.h | 0 keyboards/{ => keebio}/dilly/dilly.c | 0 keyboards/{ => keebio}/dilly/dilly.h | 0 keyboards/{ => keebio}/dilly/info.json | 0 .../keebio/dilly/keymaps/bakingpy/config.h | 3 + .../keebio/dilly/keymaps/bakingpy/keymap.c | 106 + .../dilly/keymaps/bakingpy}/rules.mk | 0 .../dilly/keymaps/default}/config.h | 0 .../dilly/keymaps/default/keymap.c | 2 - .../dilly/keymaps/default}/rules.mk | 0 .../{ => keebio}/dilly/keymaps/delmo/config.h | 0 .../{ => keebio}/dilly/keymaps/delmo/keymap.c | 3 +- .../dilly/keymaps/delmo}/rules.mk | 0 .../dilly/keymaps/pletcher/config.h | 0 .../dilly/keymaps/pletcher/keymap.c | 1 - .../dilly/keymaps/pletcher/rules.mk | 0 keyboards/{ => keebio}/dilly/rules.mk | 0 .../{fourier/rev1 => keebio/fourier}/config.h | 2 + keyboards/{ => keebio}/fourier/fourier.c | 0 keyboards/{ => keebio}/fourier/fourier.h | 17 + keyboards/{ => keebio}/fourier/info.json | 0 .../fourier/keymaps/default/config.h | 1 - .../fourier/keymaps/default/keymap.c | 6 +- .../fourier/keymaps/default}/rules.mk | 0 .../fourier/keymaps/jennetters/config.h | 0 .../fourier/keymaps/jennetters/keymap.c | 14 +- .../fourier/keymaps/jennetters/rules.mk | 0 .../fourier/keymaps/maxim/config.h | 0 .../fourier/keymaps/maxim/keymap.c | 0 .../fourier/keymaps/valgrahf/config.h | 0 .../fourier/keymaps/valgrahf/keymap.c | 2 - .../fourier/keymaps/valgrahf}/rules.mk | 0 .../fourier/keymaps/xyverz/config.h | 0 .../fourier/keymaps/xyverz/keymap.c | 8 +- keyboards/{ => keebio}/fourier/readme.md | 4 +- keyboards/keebio/fourier/rules.mk | 65 + keyboards/{ => keebio}/iris/config.h | 0 keyboards/{ => keebio}/iris/info.json | 4 +- keyboards/{ => keebio}/iris/iris.c | 0 keyboards/{ => keebio}/iris/iris.h | 6 +- .../{ => keebio}/iris/keymaps/ave-63/config.h | 0 .../{ => keebio}/iris/keymaps/ave-63/keymap.c | 0 .../iris/keymaps/bmoorey/config.h | 0 .../iris/keymaps/bmoorey/keymap.c | 0 .../iris/keymaps/bmoorey/readme.md | 0 .../iris/keymaps/bmoorey/rules.mk | 0 .../iris/keymaps/broswen/config.h | 0 .../iris/keymaps/broswen/keymap.c | 3 +- .../iris/keymaps/broswen/rules.mk | 0 .../iris/keymaps/davidrambo/config.h | 8 +- .../iris/keymaps/davidrambo/keymap.c | 10 +- .../keebio/iris/keymaps/davidrambo/readme.md | 5 + .../iris/keymaps/davidrambo/rules.mk | 0 .../iris/keymaps/dbroqua/config.h | 0 .../iris/keymaps/dbroqua/keymap.c | 1 - .../iris/keymaps/dbroqua/rules.mk | 0 .../keebio/iris/keymaps/default/config.h | 28 + .../iris/keymaps/default/keymap.c | 18 +- .../iris/keymaps/default/rules.mk | 0 .../iris/keymaps/drashna/config.h | 37 +- .../iris/keymaps/drashna/keymap.c | 43 +- .../iris/keymaps/drashna/rules.mk | 6 +- .../keebio/iris/keymaps/drashna_lp/config.h | 48 + .../iris/keymaps/drashna_lp}/keymap.c | 0 .../keebio/iris/keymaps/drashna_lp/rules.mk | 7 + .../iris/keymaps/drashna_old/config.h | 10 +- .../keebio/iris/keymaps/drashna_old/keymap.c | 1 + .../iris/keymaps/drashna_old/rules.mk | 0 .../iris/keymaps/dvp-zjpxshade/config.h | 0 .../iris/keymaps/dvp-zjpxshade/keymap.c | 1 - .../iris/keymaps/dvp-zjpxshade/rules.mk | 0 .../iris/keymaps/edvorakjp/config.h | 19 +- .../keebio/iris/keymaps/edvorakjp/keymap.c | 85 + .../iris/keymaps/edvorakjp/readme.md | 0 .../keebio/iris/keymaps/edvorakjp/rules.mk | 18 + .../{ => keebio}/iris/keymaps/fabian/config.h | 0 .../{ => keebio}/iris/keymaps/fabian/keymap.c | 1 - .../{ => keebio}/iris/keymaps/fate/config.h | 0 .../{ => keebio}/iris/keymaps/fate/keymap.c | 1 - .../{ => keebio}/iris/keymaps/fate/readme.md | 0 .../{ => keebio}/iris/keymaps/fate/rules.mk | 0 .../iris/keymaps/gsigler/config.h | 0 .../iris/keymaps/gsigler/keymap.c | 0 .../iris/keymaps/gsigler/rules.mk | 0 .../{ => keebio}/iris/keymaps/hag/config.h | 0 .../{ => keebio}/iris/keymaps/hag/keymap.c | 2 - .../{ => keebio}/iris/keymaps/hag/rules.mk | 0 .../iris/keymaps/hexwire/config.h | 0 .../iris/keymaps/hexwire/keymap.c | 1 - .../iris/keymaps/hexwire/rules.mk | 0 .../iris/keymaps/impstyle/README.md | 0 .../iris/keymaps/impstyle/config.h | 0 .../iris/keymaps/impstyle/keymap.c | 7 +- .../iris/keymaps/impstyle/rules.mk | 0 .../iris/keymaps/isolike}/config.h | 0 .../keebio/iris/keymaps/isolike/keymap.c | 42 + .../keebio/iris/keymaps/isolike/readme.md | 5 + .../iris/keymaps/isolike}/rules.mk | 0 .../iris/keymaps/jennetters/config.h | 0 .../iris/keymaps/jennetters/keymap.c | 19 +- .../iris/keymaps/jennetters/readme.md | 0 .../iris/keymaps/jennetters/rules.mk | 0 .../{ => keebio}/iris/keymaps/khord/config.h | 0 .../{ => keebio}/iris/keymaps/khord/keymap.c | 0 .../{ => keebio}/iris/keymaps/khord/rules.mk | 0 .../iris/keymaps/krusli/README.md | 0 .../{ => keebio}/iris/keymaps/krusli/config.h | 0 .../{ => keebio}/iris/keymaps/krusli/keymap.c | 2 - .../{ => keebio}/iris/keymaps/krusli/rules.mk | 0 .../iris/keymaps/lewisridden/config.h | 0 .../iris/keymaps/lewisridden/keymap.c | 1 - .../iris/keymaps/lewisridden/rules.mk | 0 .../iris/keymaps/moonfall}/config.h | 11 +- .../keebio/iris/keymaps/moonfall/keymap.c | 114 + .../keebio/iris/keymaps/moonfall/rules.mk | 2 + .../{ => keebio}/iris/keymaps/mtdjr/config.h | 0 .../{ => keebio}/iris/keymaps/mtdjr/keymap.c | 0 .../{ => keebio}/iris/keymaps/mtdjr/rules.mk | 0 .../keebio/iris/keymaps/nstickney/README.md | 46 + .../keebio/iris/keymaps/nstickney/config.h | 40 + .../keebio/iris/keymaps/nstickney/keymap.c | 165 + .../iris/keymaps/nstickney}/rules.mk | 4 +- .../iris/keymaps/olligranlund_nordic/config.h | 0 .../iris/keymaps/olligranlund_nordic/keymap.c | 0 .../keymaps/olligranlund_nordic/readme.md | 0 .../iris/keymaps/olligranlund_nordic/rules.mk | 0 .../{ => keebio}/iris/keymaps/omgvee/config.h | 0 .../{ => keebio}/iris/keymaps/omgvee/keymap.c | 0 .../iris/keymaps/omgvee/readme.md | 0 .../{ => keebio}/iris/keymaps/omgvee/rules.mk | 0 keyboards/keebio/iris/keymaps/pvinis/config.h | 24 + keyboards/keebio/iris/keymaps/pvinis/keymap.c | 120 + keyboards/keebio/iris/keymaps/pvinis/rules.mk | 2 + .../iris/keymaps/rdhaene/config.h | 0 .../iris/keymaps/rdhaene/keymap.c | 1 - .../iris/keymaps/rdhaene/rules.mk | 0 .../{ => keebio}/iris/keymaps/rs/config.h | 2 +- .../{ => keebio}/iris/keymaps/rs/keymap.c | 51 +- keyboards/keebio/iris/keymaps/rs/readme.md | 1 + .../rev1 => keebio/iris/keymaps/rs}/rules.mk | 1 + .../iris/keymaps/s1carii/config.h | 0 .../iris/keymaps/s1carii/keymap.c | 5 +- .../iris/keymaps/s1carii/readme.md | 0 .../iris/keymaps/s1carii/rules.mk | 0 .../{ => keebio}/iris/keymaps/saviof/config.h | 0 .../{ => keebio}/iris/keymaps/saviof/keymap.c | 0 .../{ => keebio}/iris/keymaps/saviof/rules.mk | 0 .../iris/keymaps/swedish/config.h | 0 .../iris/keymaps/swedish/keymap.c | 1 - .../iris/keymaps/swedish/rules.mk | 0 .../iris/keymaps/transmogrified/Readme.md | 0 .../iris/keymaps/transmogrified/config.h | 0 .../iris/keymaps/transmogrified/keymap.c | 0 .../iris/keymaps/transmogrified/rules.mk | 0 .../{ => keebio}/iris/keymaps/via/config.h | 0 .../{ => keebio}/iris/keymaps/via/keymap.c | 0 .../{ => keebio}/iris/keymaps/via/rules.mk | 0 .../{ => keebio}/iris/keymaps/vyolle/config.h | 0 .../{ => keebio}/iris/keymaps/vyolle/keymap.c | 4 +- .../{ => keebio}/iris/keymaps/vyolle/rules.mk | 0 .../{ => keebio}/iris/keymaps/wanleg/config.h | 0 .../{ => keebio}/iris/keymaps/wanleg/keymap.c | 0 .../{ => keebio}/iris/keymaps/wanleg/rules.mk | 0 .../{ => keebio}/iris/keymaps/xyverz/config.h | 0 .../{ => keebio}/iris/keymaps/xyverz/keymap.c | 0 .../{ => keebio}/iris/keymaps/xyverz/rules.mk | 0 .../iris/keymaps/yanfali/config.h | 0 .../iris/keymaps/yanfali/keymap.c | 1 - .../iris/keymaps/yanfali/readme.md | 0 .../iris/keymaps/yanfali/rules.mk | 0 keyboards/{ => keebio}/iris/readme.md | 4 +- keyboards/{ => keebio}/iris/rev1/config.h | 0 keyboards/{ => keebio}/iris/rev1/rev1.c | 0 keyboards/{ => keebio}/iris/rev1/rev1.h | 0 keyboards/{ => keebio}/iris/rev1/rules.mk | 0 keyboards/{ => keebio}/iris/rev1_led/config.h | 0 .../{ => keebio}/iris/rev1_led/rev1_led.c | 0 .../{ => keebio}/iris/rev1_led/rev1_led.h | 0 keyboards/{ => keebio}/iris/rev1_led/rules.mk | 0 keyboards/{ => keebio}/iris/rev2/config.h | 0 keyboards/{ => keebio}/iris/rev2/rev2.c | 0 keyboards/{ => keebio}/iris/rev2/rev2.h | 0 keyboards/{ => keebio}/iris/rev2/rules.mk | 0 keyboards/{ => keebio}/iris/rev3/config.h | 1 + keyboards/{ => keebio}/iris/rev3/rev3.c | 0 keyboards/{ => keebio}/iris/rev3/rev3.h | 0 keyboards/{ => keebio}/iris/rev3/rules.mk | 0 keyboards/{ => keebio}/iris/rules.mk | 2 +- keyboards/{ => keebio}/laplace/config.h | 5 +- keyboards/{ => keebio}/laplace/info.json | 0 .../laplace/keymaps/bakingpy/keymap.c | 8 +- .../laplace/keymaps/bakingpy}/rules.mk | 0 .../laplace/keymaps/default/keymap.c | 3 - .../laplace}/keymaps/default/rules.mk | 0 keyboards/{ => keebio}/laplace/laplace.c | 0 keyboards/{ => keebio}/laplace/laplace.h | 4 +- keyboards/{ => keebio}/laplace/readme.md | 4 +- keyboards/{ => keebio}/laplace/rules.mk | 0 keyboards/{ => keebio}/levinson/config.h | 0 keyboards/{ => keebio}/levinson/info.json | 0 .../levinson/keymaps/atreus/config.h | 0 .../levinson/keymaps/atreus/keymap.c | 0 .../levinson/keymaps/atreus/readme.md | 0 .../levinson/keymaps/bakingpy2u/config.h | 0 .../levinson/keymaps/bakingpy2u/keymap.c | 1 - .../levinson/keymaps/bakingpy2u/rules.mk | 0 .../keebio/levinson/keymaps/dcompact/config.h | 28 + .../keebio/levinson/keymaps/dcompact/keymap.c | 238 ++ .../levinson/keymaps/dcompact/readme.md} | 8 +- .../keebio/levinson/keymaps/dcompact/rules.mk | 13 + .../keebio/levinson/keymaps/default/config.h | 28 + .../levinson}/keymaps/default/keymap.c | 4 - .../levinson/keymaps/default/rules.mk | 0 .../levinson/keymaps/drogglbecher/config.h | 0 .../levinson/keymaps/drogglbecher/keymap.c | 0 .../levinson/keymaps/drogglbecher/rules.mk | 0 .../levinson/keymaps/jyh/config.h | 0 .../levinson/keymaps/jyh/keymap.c | 0 .../levinson/keymaps/jyh/readme.md | 0 .../levinson/keymaps/jyh/rules.mk | 0 .../levinson/keymaps/jyh2/config.h | 0 .../levinson/keymaps/jyh2/keymap.c | 0 .../levinson/keymaps/jyh2/readme.md | 0 .../levinson/keymaps/jyh2/rules.mk | 0 .../keymaps/losinggeneration/README.md | 0 .../keymaps/losinggeneration/config.h | 0 .../keymaps/losinggeneration/keymap.c | 0 .../keymaps/losinggeneration/rules.mk | 0 .../levinson/keymaps/mmacdougall/README.md | 0 .../levinson/keymaps/mmacdougall/config.h | 0 .../levinson/keymaps/mmacdougall/keymap.c | 4 - .../levinson/keymaps/mmacdougall/rules.mk | 0 .../keebio/levinson/keymaps/omgvee/config.h | 26 + .../keebio/levinson/keymaps/omgvee/keymap.c | 185 + .../keebio/levinson/keymaps/omgvee/readme.md | 21 + .../keebio/levinson/keymaps/omgvee/rules.mk | 11 + .../levinson/keymaps/steno/config.h | 0 .../levinson/keymaps/steno/keymap.c | 0 .../levinson/keymaps/steno/rules.mk | 0 .../levinson/keymaps/treadwell/config.h | 0 .../levinson/keymaps/treadwell/keymap.c | 1 - .../levinson/keymaps/treadwell/rules.mk | 2 + .../levinson/keymaps/valgrahf/config.h | 0 .../levinson/keymaps/valgrahf/keymap.c | 2 - .../levinson/keymaps/valgrahf/rules.mk | 0 .../levinson/keymaps/xtonhasvim/config.h | 0 .../levinson/keymaps/xtonhasvim/keymap.c | 0 .../levinson/keymaps/xtonhasvim/readme.md | 0 .../levinson/keymaps/xtonhasvim/rules.mk | 0 keyboards/{ => keebio}/levinson/levinson.c | 0 keyboards/{ => keebio}/levinson/levinson.h | 2 +- keyboards/{ => keebio}/levinson/readme.md | 0 keyboards/{ => keebio}/levinson/rev1/config.h | 6 +- keyboards/{ => keebio}/levinson/rev1/rev1.c | 0 keyboards/{ => keebio}/levinson/rev1/rev1.h | 0 .../rs => keebio/levinson/rev1}/rules.mk | 0 keyboards/{ => keebio}/levinson/rev2/config.h | 2 +- keyboards/{ => keebio}/levinson/rev2/rev2.c | 0 keyboards/{ => keebio}/levinson/rev2/rev2.h | 0 .../rev1 => keebio/levinson/rev2}/rules.mk | 0 keyboards/{ => keebio}/levinson/rules.mk | 4 +- keyboards/{ => keebio}/nyquist/config.h | 5 +- keyboards/{ => keebio}/nyquist/info.json | 0 .../nyquist/keymaps/DivergeJM/README.md | 0 .../nyquist/keymaps/DivergeJM/config.h | 0 .../nyquist/keymaps/DivergeJM/keymap.c | 6 +- .../nyquist/keymaps/DivergeJM/rules.mk | 0 .../nyquist/keymaps/bakingpy}/README.md | 0 .../keymaps/bakingpy}/Underglow Pinouts.md | 0 .../nyquist/keymaps/bakingpy}/config.h | 4 - .../nyquist/keymaps/bakingpy}/keymap.c | 1 - .../keymaps/bakingpy}/keymap_converter.py | 0 .../keymaps/bakingpy}/keymap_to_readme.rb | 0 .../nyquist/keymaps/bakingpy}/rules.mk | 0 .../nyquist/keymaps/bramver/README.md | 0 .../nyquist/keymaps/bramver/config.h | 0 .../nyquist/keymaps/bramver/keymap.c | 4 - .../nyquist/keymaps/bramver/rules.mk | 0 .../nyquist/keymaps/danielhklein/config.h | 0 .../nyquist/keymaps/danielhklein/keymap.c | 6 +- .../nyquist/keymaps/danielhklein/rules.mk | 0 .../keebio/nyquist/keymaps/default/config.h | 31 + .../nyquist/keymaps/default/keymap.c | 4 - .../nyquist}/keymaps/default/rules.mk | 0 .../nyquist/keymaps/jojiichan/config.h | 0 .../nyquist/keymaps/jojiichan/keymap.c | 5 - .../nyquist/keymaps/jojiichan/rules.mk | 0 .../nyquist/keymaps/kim-kim/config.h | 0 .../nyquist/keymaps/kim-kim/keymap.c | 4 - .../nyquist/keymaps/kim-kim/rules.mk | 0 .../keymaps/losinggeneration/README.md | 0 .../nyquist/keymaps/losinggeneration/config.h | 0 .../nyquist/keymaps/losinggeneration/keymap.c | 0 .../nyquist/keymaps/losinggeneration/rules.mk | 0 .../nyquist/keymaps/mtdjr}/config.h | 0 .../nyquist/keymaps/mtdjr/keymap.c | 0 .../nyquist/keymaps/mtdjr/rules.mk | 0 .../nyquist/keymaps/pitty/README.md | 0 .../nyquist/keymaps/pitty/config.h | 0 .../nyquist/keymaps/pitty/keymap.c | 5 - .../nyquist/keymaps/pitty/rules.mk | 0 .../nyquist/keymaps/shovelpaw/config.h | 0 .../nyquist/keymaps/shovelpaw/keymap.c | 0 .../nyquist/keymaps/shovelpaw/rules.mk | 0 .../nyquist/keymaps/skug/config.h | 0 .../nyquist/keymaps/skug/keymap.c | 12 +- .../nyquist/keymaps/skug/rules.mk | 0 .../keebio/nyquist/keymaps/tester/config.h | 20 + .../keebio/nyquist/keymaps/tester/keymap.c | 226 ++ .../nyquist/keymaps/tester}/rules.mk | 0 .../nyquist/keymaps/yshrsmz/config.h | 0 .../nyquist/keymaps/yshrsmz/keymap.c | 4 - .../nyquist/keymaps/yshrsmz/rules.mk | 0 keyboards/{ => keebio}/nyquist/nyquist.c | 0 keyboards/{ => keebio}/nyquist/nyquist.h | 6 +- keyboards/{ => keebio}/nyquist/readme.md | 4 +- keyboards/{ => keebio}/nyquist/rev1/config.h | 0 keyboards/{ => keebio}/nyquist/rev1/rev1.c | 0 keyboards/{ => keebio}/nyquist/rev1/rev1.h | 0 keyboards/{ => keebio}/nyquist/rev1/rules.mk | 0 keyboards/{ => keebio}/nyquist/rev2/config.h | 0 keyboards/{ => keebio}/nyquist/rev2/rev2.c | 0 keyboards/{ => keebio}/nyquist/rev2/rev2.h | 0 .../nyquist}/rev2/rules.mk | 0 keyboards/{ => keebio}/nyquist/rev3/config.h | 1 + keyboards/{ => keebio}/nyquist/rev3/rev3.c | 0 keyboards/{ => keebio}/nyquist/rev3/rev3.h | 0 keyboards/{ => keebio}/nyquist/rev3/rules.mk | 0 keyboards/{ => keebio}/nyquist/rules.mk | 2 +- .../{fourier => keebio/quefrency}/config.h | 0 keyboards/keebio/quefrency/info.json | 369 ++ .../keebio/quefrency/keymaps/bcat/config.h | 22 + .../keebio/quefrency/keymaps/bcat/keymap.c | 42 + .../keebio/quefrency/keymaps/bcat/readme.md | 17 + .../keebio/quefrency/keymaps/bcat/rules.mk | 1 + .../quefrency/keymaps/bjohnson/config.h | 0 .../quefrency/keymaps/bjohnson/keymap.c | 0 .../quefrency/keymaps/bjohnson/rules.mk | 0 .../quefrency/keymaps/bramver/README.md | 0 .../quefrency/keymaps/bramver/config.h | 0 .../quefrency/keymaps/bramver/keymap.c | 11 +- .../quefrency/keymaps/bramver/rules.mk | 0 .../quefrency/keymaps/default/config.h | 0 .../quefrency/keymaps/default/keymap.c | 3 - .../quefrency/keymaps/default}/rules.mk | 0 .../quefrency/keymaps/default65/config.h | 0 .../quefrency/keymaps/default65/keymap.c | 3 - .../quefrency/keymaps/default65}/rules.mk | 0 .../quefrency/keymaps/default65macro/config.h | 0 .../quefrency/keymaps/default65macro/keymap.c | 3 - .../quefrency/keymaps/georgepetri/config.h | 24 + .../quefrency/keymaps/georgepetri/keymap.c | 44 + .../quefrency/keymaps/georgepetri/readme.md | 48 + .../quefrency/keymaps/georgepetri/rules.mk | 0 .../quefrency/keymaps/kingwangwong/config.h | 31 + .../quefrency/keymaps/kingwangwong/keymap.c | 40 + .../keymaps/unausgeschlafen/config.h | 27 + .../keymaps/unausgeschlafen/keymap.c | 62 + .../keymaps/unausgeschlafen/readme.md | 26 + .../keymaps/unausgeschlafen/rules.mk | 1 + keyboards/{ => keebio}/quefrency/quefrency.c | 0 keyboards/{ => keebio}/quefrency/quefrency.h | 6 +- keyboards/{ => keebio}/quefrency/readme.md | 4 +- .../{ => keebio}/quefrency/rev1/config.h | 6 +- keyboards/{ => keebio}/quefrency/rev1/rev1.c | 0 keyboards/{ => keebio}/quefrency/rev1/rev1.h | 0 keyboards/keebio/quefrency/rev1/rules.mk | 0 keyboards/{ => keebio}/quefrency/rules.mk | 6 +- keyboards/{ => keebio}/rorschach/config.h | 5 +- keyboards/{ => keebio}/rorschach/info.json | 0 .../rorschach/keymaps/default/config.h | 3 - .../rorschach/keymaps/default/keymap.c | 0 .../keymaps/insertsnideremarks/config.h | 2 +- .../keymaps/insertsnideremarks/keymap.c | 64 +- .../keymaps/insertsnideremarks/rules.mk | 19 + keyboards/{ => keebio}/rorschach/readme.md | 4 +- .../{ => keebio}/rorschach/rev1/config.h | 2 +- keyboards/{ => keebio}/rorschach/rev1/rev1.c | 0 keyboards/{ => keebio}/rorschach/rev1/rev1.h | 0 .../rev2 => keebio/rorschach/rev1}/rules.mk | 0 keyboards/{ => keebio}/rorschach/rorschach.c | 0 keyboards/{ => keebio}/rorschach/rorschach.h | 2 +- keyboards/{ => keebio}/rorschach/rules.mk | 4 +- .../{ => keebio}/tragicforce68/README.md | 4 +- keyboards/{ => keebio}/tragicforce68/config.h | 7 +- .../{ => keebio}/tragicforce68/info.json | 0 .../tragicforce68/keymaps/buswerks/keymap.c | 0 .../tragicforce68/keymaps/default/keymap.c | 0 keyboards/{ => keebio}/tragicforce68/rules.mk | 0 .../tragicforce68/tragicforce68.c | 0 .../tragicforce68/tragicforce68.h | 0 keyboards/{ => keebio}/viterbi/config.h | 5 +- .../viterbi/keymaps/bakingpy}/README.md | 0 .../keebio/viterbi/keymaps/bakingpy/config.h | 33 + .../viterbi/keymaps/bakingpy}/keymap.c | 5 +- .../viterbi/keymaps/bakingpy}/rules.mk | 0 .../viterbi/keymaps/default/config.h | 0 .../viterbi/keymaps/default/keymap.c | 86 +- .../viterbi/keymaps/default}/rules.mk | 0 .../viterbi/keymaps/drashna/config.h | 51 +- .../viterbi/keymaps/drashna/keymap.c | 3 - .../viterbi/keymaps/drashna/rules.mk | 3 +- .../viterbi/keymaps/drashna_old/config.h | 25 + .../viterbi/keymaps/drashna_old/keymap.c | 0 .../viterbi/keymaps/drashna_old/rules.mk | 4 + .../viterbi/keymaps/dwallace/config.h | 0 .../viterbi/keymaps/dwallace/keymap.c | 1 - .../viterbi/keymaps/dwallace}/rules.mk | 0 .../viterbi/keymaps/fido/config.h | 0 .../viterbi/keymaps/fido/keymap.c | 1 - .../keebio/viterbi/keymaps/fido/rules.mk | 1 + .../viterbi/keymaps/mike808/config.h | 0 .../viterbi/keymaps/mike808/keymap.c | 5 +- .../keebio/viterbi/keymaps/mike808/rules.mk | 1 + keyboards/{ => keebio}/viterbi/readme.md | 4 +- keyboards/{ => keebio}/viterbi/rev1/config.h | 5 +- .../rev2.c => keebio/viterbi/rev1/rev1.c} | 0 keyboards/{ => keebio}/viterbi/rev1/rev1.h | 9 +- keyboards/{ => keebio}/viterbi/rev1/rules.mk | 0 keyboards/{ => keebio}/viterbi/rev2/config.h | 1 - .../viterbi.c => keebio/viterbi/rev2/rev2.c} | 0 keyboards/{ => keebio}/viterbi/rev2/rev2.h | 0 keyboards/{ => keebio}/viterbi/rev2/rules.mk | 0 keyboards/{ => keebio}/viterbi/rules.mk | 2 +- keyboards/keebio/viterbi/viterbi.c | 1 + keyboards/{ => keebio}/viterbi/viterbi.h | 4 +- keyboards/{ => keebio}/wavelet/config.h | 6 +- keyboards/{ => keebio}/wavelet/info.json | 0 .../wavelet}/keymaps/default/keymap.c | 4 - .../wavelet/keymaps/default/rules.mk | 0 keyboards/{ => keebio}/wavelet/readme.md | 4 +- keyboards/{ => keebio}/wavelet/rules.mk | 0 keyboards/{ => keebio}/wavelet/wavelet.c | 0 keyboards/{ => keebio}/wavelet/wavelet.h | 0 keyboards/keycapsss/o4l_5x12/config.h | 43 + keyboards/keycapsss/o4l_5x12/info.json | 202 ++ .../keycapsss/o4l_5x12/keymaps/2x2u/config.h | 3 + .../keycapsss/o4l_5x12/keymaps/2x2u/keymap.c | 83 + .../o4l_5x12/keymaps/default/config.h | 3 + .../o4l_5x12/keymaps/default/keymap.c | 140 + keyboards/keycapsss/o4l_5x12/o4l_5x12.c | 1 + keyboards/keycapsss/o4l_5x12/o4l_5x12.h | 50 + keyboards/keycapsss/o4l_5x12/readme.md | 31 + keyboards/keycapsss/o4l_5x12/rules.mk | 73 + keyboards/kinesis/keymaps/carpalx/keymap.c | 4 - keyboards/kinesis/keymaps/default/config.h | 7 +- .../keymaps/insertsnideremarks/config.h | 2 +- .../keymaps/insertsnideremarks/keymap.c | 50 +- .../keymaps/insertsnideremarks/readme.md | 68 +- keyboards/kinesis/keymaps/milestogo/keymap.c | 20 +- .../kinesis/keymaps/tuesdayjohn/config.h | 6 + .../kinesis/keymaps/tuesdayjohn/keymap.c | 427 +++ .../kinesis/keymaps/tuesdayjohn/readme.md | 219 ++ .../kinesis/keymaps/tuesdayjohn/rules.mk | 19 + keyboards/kinesis/keymaps/tw1t611/config.h | 3 + keyboards/kinesis/keymaps/tw1t611/keymap.c | 64 + keyboards/kinesis/keymaps/tw1t611/readme.md | 1 + keyboards/kinesis/keymaps/tw1t611/rules.mk | 18 + keyboards/kinesis/keymaps/xyverz/keymap.c | 4 - keyboards/kira75/config.h | 2 +- keyboards/kira75/keymaps/default/config.h | 7 +- keyboards/kmac/config.h | 4 +- keyboards/kmac/keymaps/default/config.h | 7 +- keyboards/kmac/keymaps/default/keymap.c | 3 - keyboards/kmac/keymaps/winkeyless/keymap.c | 3 - keyboards/kmac/readme.md | 2 +- keyboards/kmini/config.h | 4 +- keyboards/knops/mini/config.h | 2 +- keyboards/knops/mini/keymaps/default/config.h | 7 +- keyboards/knops/readme.md | 2 +- keyboards/kona_classic/keymaps/ansi/keymap.c | 40 +- .../kona_classic/keymaps/ansi_arrows/keymap.c | 40 +- .../keymaps/ansi_arrows_lcap/keymap.c | 40 +- .../kona_classic/keymaps/ansi_split/keymap.c | 42 +- .../keymaps/ansi_split_arrows/keymap.c | 42 +- .../kona_classic/keymaps/default/config.h | 7 +- .../kona_classic/keymaps/default/keymap.c | 40 +- keyboards/kona_classic/keymaps/iso/keymap.c | 42 +- .../kona_classic/keymaps/iso_arrows/keymap.c | 42 +- .../kona_classic/keymaps/iso_split/keymap.c | 42 +- .../keymaps/iso_split_arrows/keymap.c | 42 +- keyboards/launchpad/keymaps/default/keymap.c | 18 +- .../launchpad/keymaps/default_rgb/config.h | 9 + .../launchpad/keymaps/default_rgb/keymap.c | 76 + .../launchpad/keymaps/default_rgb/readme.md | 41 + .../launchpad/keymaps/default_rgb/rules.mk | 1 + keyboards/lazydesigners/dimple/config.h | 66 + keyboards/lazydesigners/dimple/dimple.c | 24 + keyboards/lazydesigners/dimple/dimple.h | 46 + keyboards/lazydesigners/dimple/info.json | 56 + .../dimple/keymaps/default/keymap.c | 136 + .../dimple/keymaps/default/readme.md | 60 + keyboards/lazydesigners/dimple/readme.md | 17 + keyboards/lazydesigners/dimple/rules.mk | 58 + .../the50/keymaps/mikethetiger/keymap.c | 79 + keyboards/lazydesigners/the60/config.h | 38 + keyboards/lazydesigners/the60/info.json | 79 + .../the60/keymaps/default/keymap.c | 54 + .../the60/keymaps/default/readme.md | 32 + keyboards/lazydesigners/the60/readme.md | 18 + keyboards/lazydesigners/the60/rules.mk | 51 + keyboards/lazydesigners/the60/the60.c | 2 + keyboards/lazydesigners/the60/the60.h | 32 + .../lets_split/keymaps/DE_simple/keymap.c | 4 - .../lets_split/keymaps/DE_simple/readme.md | 10 +- .../lets_split/keymaps/OLED_sample/keymap.c | 4 - keyboards/lets_split/keymaps/adam/keymap.c | 4 - .../lets_split/keymaps/cpeters1982/keymap.c | 6 - keyboards/lets_split/keymaps/dlaroe/keymap.c | 4 - keyboards/lets_split/keymaps/fabian/keymap.c | 3 - keyboards/lets_split/keymaps/henxing/keymap.c | 4 - keyboards/lets_split/keymaps/khord/keymap.c | 4 - keyboards/lets_split/keymaps/kris/keymap.c | 4 - keyboards/lets_split/keymaps/krusli/keymap.c | 4 - .../lets_split/keymaps/mbsurfer/keymap.c | 4 - keyboards/lets_split/keymaps/mjt/keymap.c | 4 - .../lets_split/keymaps/normacos/keymap.c | 4 - keyboards/lets_split/keymaps/piemod/README.md | 3 - keyboards/lets_split/keymaps/pitty/keymap.c | 5 - keyboards/lets_split/keymaps/poker/keymap.c | 4 - keyboards/lets_split/keymaps/pyrol/keymap.c | 4 - keyboards/lets_split/keymaps/smt/keymap.c | 4 - .../lets_split/keymaps/that_canadian/keymap.c | 6 +- .../lets_split/keymaps/vim-mode/config.h | 39 + .../lets_split/keymaps/vim-mode/keymap.c | 196 ++ .../lets_split/keymaps/vim-mode/readme.md | 22 + .../lets_split/keymaps/vim-mode/rules.mk | 0 keyboards/lets_split/keymaps/waples/keymap.c | 2 - keyboards/lets_split/keymaps/xk/keymap.c | 3 - keyboards/lets_split/keymaps/yshrsmz/keymap.c | 4 - keyboards/lets_split_eh/keymaps/msiu/config.h | 21 + keyboards/lets_split_eh/keymaps/msiu/keymap.c | 195 ++ .../keymaps/that_canadian/keymap.c | 6 +- .../lfk78/keymaps/ca178858/keymap.c | 4 - .../lfk78/keymaps/default/keymap.c | 4 - .../lfkeyboards/lfk78/keymaps/iso/keymap.c | 4 - .../lfk78/keymaps/split_bs_osx/keymap.c | 4 - .../lfk87/keymaps/ca178858/keymap.c | 4 - .../lfk87/keymaps/default/config.h | 7 +- .../lfk87/keymaps/default/keymap.c | 4 - .../lfkeyboards/lfk87/keymaps/gbchk/keymap.c | 4 - .../lfkeyboards/lfk87/keymaps/iso/keymap.c | 4 - .../lfkpad/keymaps/default/config.h | 7 +- .../lfkpad/keymaps/default/keymap.c | 4 - .../mini1800/keymaps/ca178858/keymap.c | 4 - .../mini1800/keymaps/default/config.h | 7 +- .../smk65/keymaps/default/config.h | 7 +- .../smk65/keymaps/default/keymap.c | 4 - .../lfkeyboards/smk65/keymaps/iso/keymap.c | 4 - keyboards/lily58/config.h | 10 +- keyboards/lily58/keymaps/default/keymap.c | 6 +- keyboards/lily58/rev1/info.json | 18 + keyboards/lily58/rules.mk | 4 +- keyboards/lily58/ssd1306.c | 2 +- keyboards/m0lly/README.md | 17 + .../mf68_ble => m0lly}/config.h | 80 +- keyboards/{bfo9000 => m0lly}/i2c.c | 6 +- keyboards/{ergodash => m0lly}/i2c.h | 2 +- keyboards/m0lly/info.json | 97 + keyboards/m0lly/keymaps/default/config.h | 24 + keyboards/m0lly/keymaps/default/keymap.c | 149 + keyboards/m0lly/m0lly.c | 69 + keyboards/m0lly/m0lly.h | 32 + keyboards/m0lly/rules.mk | 72 + keyboards/m10a/keymaps/default/keymap.c | 9 +- keyboards/massdrop/alt/config.h | 6 + keyboards/massdrop/alt/config_led.c | 59 + keyboards/massdrop/alt/config_led.h | 25 +- .../massdrop/alt/keymaps/abishalom/keymap.c | 148 +- .../massdrop/alt/keymaps/default/keymap.c | 148 +- .../massdrop/alt/keymaps/default_md/keymap.c | 223 ++ .../massdrop/alt/keymaps/default_md/rules.mk | 2 + keyboards/massdrop/alt/keymaps/mac/keymap.c | 148 +- .../massdrop/alt/keymaps/mac_md/keymap.c | 193 ++ .../massdrop/alt/keymaps/mac_md/rules.mk | 2 + .../massdrop/alt/keymaps/reywood/README.md | 5 + .../massdrop/alt/keymaps/reywood/rules.mk | 5 +- keyboards/massdrop/alt/rules.mk | 7 +- keyboards/massdrop/ctrl/config.h | 6 + keyboards/massdrop/ctrl/config_led.c | 82 + keyboards/massdrop/ctrl/config_led.h | 25 +- .../massdrop/ctrl/keymaps/default/keymap.c | 152 +- .../massdrop/ctrl/keymaps/default_md/keymap.c | 226 ++ .../massdrop/ctrl/keymaps/default_md/rules.mk | 2 + keyboards/massdrop/ctrl/keymaps/mac/keymap.c | 152 +- .../massdrop/ctrl/keymaps/mac_md/keymap.c | 196 ++ .../massdrop/ctrl/keymaps/mac_md/rules.mk | 2 + .../ctrl/keymaps/matthewrobo/config.h | 52 + .../ctrl/keymaps/matthewrobo/keymap.c | 403 +++ .../ctrl/keymaps/matthewrobo/rules.mk | 2 + .../ctrl/keymaps/responsive_pattern/README.md | 5 + .../ctrl/keymaps/responsive_pattern/keymap.c | 5 +- .../ctrl/keymaps/responsive_pattern/rules.mk | 2 + .../massdrop/ctrl/keymaps/xulkal/keymap.c | 105 + .../massdrop/ctrl/keymaps/xulkal/rules.mk | 1 + keyboards/massdrop/ctrl/led_programs.c | 120 - keyboards/massdrop/ctrl/rules.mk | 7 +- keyboards/maxipad/config.h | 69 +- keyboards/maxipad/info.json | 7 +- keyboards/maxipad/keymaps/default/config.h | 19 + keyboards/maxipad/keymaps/default/keymap.c | 50 +- keyboards/maxipad/keymaps/default/readme.md | 1 + keyboards/maxipad/maxipad.c | 15 + keyboards/maxipad/maxipad.h | 58 +- keyboards/maxipad/promicro/config.h | 39 + keyboards/maxipad/promicro/promicro.c | 16 + keyboards/maxipad/promicro/promicro.h | 20 + keyboards/maxipad/promicro/rules.mk | 58 + keyboards/maxipad/readme.md | 28 +- keyboards/maxipad/rules.mk | 80 +- keyboards/maxipad/teensy2/config.h | 39 + keyboards/maxipad/teensy2/rules.mk | 58 + keyboards/maxipad/teensy2/teensy2.c | 16 + keyboards/maxipad/teensy2/teensy2.h | 19 + keyboards/mechkeys/mk60/config.h | 245 ++ keyboards/mechkeys/mk60/info.json | 83 + .../mechkeys/mk60/keymaps/default/config.h | 19 + .../mechkeys/mk60/keymaps/default/keymap.c | 74 + .../mechkeys/mk60/keymaps/default/readme.md | 1 + keyboards/mechkeys/mk60/mk60.c | 50 + keyboards/mechkeys/mk60/mk60.h | 41 + keyboards/mechkeys/mk60/readme.md | 13 + keyboards/mechkeys/mk60/rules.mk | 81 + keyboards/mechmini/v1/README.md | 2 +- .../mechmini/v1/keymaps/default/keymap.c | 3 +- keyboards/mechmini/v2/keymaps/arkag/keymap.c | 44 +- keyboards/mechmini/v2/keymaps/arkag/rules.mk | 4 +- .../mechmini/v2/keymaps/default/keymap.c | 38 +- .../v2/keymaps/spacebarracecar/config.h | 3 + .../v2}/keymaps/spacebarracecar/keymap.c | 25 +- .../v2}/keymaps/spacebarracecar/readme.md | 2 +- .../v2}/keymaps/spacebarracecar/rules.mk | 2 +- keyboards/mehkee96/program | 105 - keyboards/mehkee96/rules.mk | 2 +- keyboards/meira/config.h | 4 +- keyboards/meira/keymaps/default/config.h | 7 +- keyboards/meira/keymaps/default/keymap.c | 2 +- keyboards/meishi/config.h | 2 +- keyboards/meishi/keymaps/default/keymap.c | 2 +- keyboards/melody96/keymaps/crilith/keymap.c | 11 +- .../melody96/keymaps/konstantin/config.h | 3 + .../melody96/keymaps/konstantin/keymap.c | 78 + .../melody96/keymaps/konstantin/rules.mk | 10 + keyboards/melody96/readme.md | 4 +- keyboards/meme/config.h | 2 +- keyboards/meme/keymaps/default/config.h | 7 +- keyboards/miniaxe/config.h | 4 +- keyboards/miniaxe/keymaps/wanleg/config.h | 11 + keyboards/miniaxe/keymaps/wanleg/keymap.c | 49 + keyboards/miniaxe/keymaps/wanleg/rules.mk | 18 + keyboards/minidox/keymaps/alairock/keymap.c | 4 - keyboards/minidox/keymaps/default/keymap.c | 4 - .../minidox/keymaps/dustypomerleau/README.md | 28 + .../minidox/keymaps/dustypomerleau/config.h | 25 + .../minidox/keymaps/dustypomerleau/keymap.c | 434 +++ .../minidox/keymaps/dustypomerleau/rules.mk | 5 + keyboards/minidox/keymaps/haegin/keymap.c | 4 - keyboards/minidox/keymaps/khitsule/keymap.c | 4 - keyboards/minidox/keymaps/norman/config.h | 5 + keyboards/minidox/keymaps/norman/keymap.c | 69 + keyboards/minidox/keymaps/norman/readme.md | 56 + .../minidox/keymaps/that_canadian/keymap.c | 4 - keyboards/minidox/keymaps/xyverz/keymap.c | 4 - keyboards/mint60/config.h | 4 +- keyboards/mint60/keymaps/default/config.h | 2 +- keyboards/mint60/keymaps/default/keymap.c | 4 - keyboards/mint60/keymaps/eucalyn/config.h | 2 +- keyboards/mint60/keymaps/eucalyn/keymap.c | 4 - keyboards/mitosis/keymaps/carvac_dv/keymap.c | 4 - keyboards/mitosis/keymaps/datagrok/keymap.c | 3 - keyboards/mitosis/keymaps/default/keymap.c | 4 - keyboards/mitosis/keymaps/mjt/keymap.c | 2 - keyboards/mitosis/keymaps/nzen/keymap.c | 1 - keyboards/miuni32/keymaps/adam-lee/keymap.c | 3 - keyboards/miuni32/keymaps/default/config.h | 7 +- keyboards/miuni32/keymaps/default/keymap.c | 3 - keyboards/miuni32/keymaps/ht_156/keymap.c | 3 - keyboards/miuni32/keymaps/ki/keymap.c | 3 - keyboards/model01/leds.c | 95 +- keyboards/mt40/config.h | 2 +- keyboards/mt40/keymaps/default/config.h | 7 +- keyboards/mt40/keymaps/default/keymap.c | 2 - keyboards/mt980/config.h | 52 + keyboards/mt980/info.json | 117 + keyboards/mt980/keymaps/default/keymap.c | 21 + keyboards/mt980/keymaps/walker/config.h | 5 + keyboards/mt980/keymaps/walker/keymap.c | 168 + keyboards/mt980/keymaps/walker/rules.mk | 1 + keyboards/mt980/mt980.c | 65 + keyboards/mt980/mt980.h | 25 + keyboards/mt980/readme.md | 14 + keyboards/mt980/rules.mk | 55 + keyboards/mxss/config.h | 2 +- keyboards/mxss/keymaps/default/config.h | 7 +- keyboards/mxss/rgblight.h | 166 + keyboards/mxss/templates/keymap.c | 5 +- keyboards/namecard2x4/{ => rev1}/config.h | 2 +- keyboards/namecard2x4/{ => rev1}/rules.mk | 0 keyboards/namecard2x4/rev2/config.h | 216 ++ keyboards/namecard2x4/rev2/rules.mk | 81 + keyboards/nek_type_a/config.h | 55 + keyboards/nek_type_a/info.json | 0 keyboards/nek_type_a/keymaps/default/config.h | 19 + keyboards/nek_type_a/keymaps/default/keymap.c | 39 + .../nek_type_a/keymaps/default/readme.md | 3 + keyboards/{zen => nek_type_a}/matrix.c | 271 +- keyboards/nek_type_a/mcp23017.c | 107 + keyboards/nek_type_a/mcp23017.h | 71 + keyboards/nek_type_a/nek_type_a.c | 43 + keyboards/nek_type_a/nek_type_a.h | 58 + keyboards/nek_type_a/readme.md | 30 + keyboards/nek_type_a/rules.mk | 33 + keyboards/newgame40/keymaps/default/keymap.c | 1 - keyboards/niu_mini/keymaps/default/keymap.c | 4 - keyboards/niu_mini/keymaps/planck/rules.mk | 1 + keyboards/niu_mini/keymaps/yttyx/README.md | 92 + keyboards/niu_mini/keymaps/yttyx/config.h | 4 + keyboards/niu_mini/keymaps/yttyx/keymap.c | 141 + keyboards/niu_mini/keymaps/yttyx/rules.mk | 10 + keyboards/niu_mini/rules.mk | 2 +- .../boards/GENERIC_STM32_F303XC/board.c | 0 .../boards/GENERIC_STM32_F303XC/board.h | 4 +- .../boards/GENERIC_STM32_F303XC/board.mk | 0 .../dz60rgb => nk65}/bootloader_defs.h | 0 keyboards/nk65/chconf.h | 520 +++ keyboards/nk65/config.h | 154 + keyboards/nk65/halconf.h | 388 +++ keyboards/nk65/info.json | 12 + keyboards/nk65/keymaps/default/keymap.c | 58 + keyboards/nk65/keymaps/default/readme.md | 6 + keyboards/nk65/keymaps/default_via/keymap.c | 58 + keyboards/nk65/keymaps/default_via/readme.md | 6 + keyboards/nk65/keymaps/default_via/rules.mk | 67 + keyboards/nk65/mcuconf.h | 257 ++ keyboards/nk65/nk65.c | 18 + keyboards/nk65/nk65.h | 38 + keyboards/nk65/readme.md | 37 + keyboards/nk65/rules.mk | 69 + keyboards/nomu30/config.h | 49 + keyboards/nomu30/info.json | 172 + .../nomu30/keymaps/center_sprit/config.h | 66 + .../nomu30/keymaps/center_sprit/keymap.c | 159 + .../nomu30/keymaps/center_sprit/readme.md | 68 + .../nomu30/keymaps/center_sprit/rules.mk | 26 + keyboards/nomu30/keymaps/default/config.h | 22 + keyboards/nomu30/keymaps/default/keymap.c | 44 + keyboards/nomu30/keymaps/default/readme.md | 1 + keyboards/nomu30/keymaps/like_jis/config.h | 66 + keyboards/nomu30/keymaps/like_jis/keymap.c | 159 + keyboards/nomu30/keymaps/like_jis/readme.md | 64 + keyboards/nomu30/keymaps/like_jis/rules.mk | 26 + keyboards/nomu30/nomu30.c | 16 + keyboards/nomu30/nomu30.h | 48 + keyboards/nomu30/readme.md | 15 + keyboards/nomu30/rules.mk | 81 + keyboards/novelpad/keymaps/default/keymap.c | 2 - keyboards/noxary/220/220.c | 62 + keyboards/noxary/220/220.h | 42 + keyboards/noxary/220/config.h | 251 ++ keyboards/noxary/220/info.json | 12 + keyboards/noxary/220/keymaps/default/config.h | 19 + keyboards/noxary/220/keymaps/default/keymap.c | 76 + .../noxary/220/keymaps/default/readme.md | 1 + keyboards/noxary/220/readme.md | 13 + keyboards/noxary/220/rules.mk | 83 + keyboards/noxary/260/260.c | 61 + keyboards/noxary/260/260.h | 40 + keyboards/noxary/260/config.h | 251 ++ keyboards/noxary/260/info.json | 12 + keyboards/noxary/260/keymaps/default/config.h | 19 + keyboards/noxary/260/keymaps/default/keymap.c | 87 + .../noxary/260/keymaps/default/readme.md | 1 + keyboards/noxary/260/readme.md | 15 + keyboards/noxary/260/rules.mk | 81 + keyboards/noxary/268/keymaps/ansi/keymap.c | 3 - keyboards/noxary/268/keymaps/default/keymap.c | 3 - keyboards/noxary/268/keymaps/iso/keymap.c | 3 - .../noxary/268/keymaps/sixtyeight/keymap.c | 3 - keyboards/noxary/268_2/config.h | 2 +- keyboards/noxary/280/280.c | 70 + keyboards/noxary/280/280.h | 49 + keyboards/noxary/280/config.h | 251 ++ keyboards/noxary/280/info.json | 12 + keyboards/noxary/280/keymaps/default/config.h | 19 + keyboards/noxary/280/keymaps/default/keymap.c | 102 + .../noxary/280/keymaps/default/readme.md | 1 + keyboards/noxary/280/readme.md | 13 + keyboards/noxary/280/rules.mk | 81 + keyboards/noxary/x268/config.h | 2 +- keyboards/ok60/keymaps/default/keymap.c | 4 +- keyboards/ok60/keymaps/ebrowncross/keymap.c | 2 - keyboards/org60/keymaps/default/keymap.c | 12 +- keyboards/org60/keymaps/jarred/keymap.c | 25 + keyboards/orthodox/keymaps/default/config.h | 8 +- keyboards/orthodox/keymaps/default/keymap.c | 4 - keyboards/orthodox/keymaps/drashna/config.h | 39 +- keyboards/orthodox/keymaps/drashna/keymap.c | 128 +- keyboards/orthodox/keymaps/drashna/rules.mk | 7 +- keyboards/orthodox/keymaps/oscillope/keymap.c | 4 - keyboards/orthodox/keymaps/rfvizarra/keymap.c | 4 - keyboards/orthodox/keymaps/xyverz/keymap.c | 4 - keyboards/orthodox/orthodox.h | 9 +- keyboards/orthodox/rev1/config.h | 7 +- keyboards/orthodox/rev1/info.json | 4 +- keyboards/orthodox/rev1/rev1.h | 7 +- keyboards/orthodox/rev3/config.h | 7 +- keyboards/orthodox/rev3/info.json | 4 +- keyboards/orthodox/rev3/rev3.h | 6 +- keyboards/orthodox/rev3_teensy/config.h | 7 +- keyboards/orthodox/rev3_teensy/info.json | 4 +- keyboards/orthodox/rev3_teensy/rev3_teensy.h | 6 +- keyboards/orthodox/rules.mk | 13 +- keyboards/orthodox/serial.c | 230 -- keyboards/orthodox/serial.h | 27 - keyboards/orthodox/split_util.h | 21 - keyboards/panc60/config.h | 2 - keyboards/panc60/i2c.c | 106 - keyboards/panc60/i2c.h | 27 - keyboards/panc60/matrix.c | 145 - keyboards/panc60/panc60.c | 4 +- keyboards/panc60/panc60.h | 5 +- keyboards/panc60/readme.md | 8 +- keyboards/panc60/rules.mk | 5 +- keyboards/panc60/usbconfig.h | 5 +- keyboards/pearl/README.md | 85 - keyboards/pearl/config.h | 4 +- keyboards/pearl/i2c.c | 106 - keyboards/pearl/i2c.h | 27 - keyboards/pearl/matrix.c | 106 - keyboards/pearl/pearl.c | 67 +- keyboards/pearl/pearl.h | 6 +- keyboards/pearl/readme.md | 47 + keyboards/pearl/rules.mk | 5 +- keyboards/pearl/usbconfig.h | 5 +- .../ixora/boards/GENERIC_STM32_F042X6/board.c | 101 + .../ixora/boards/GENERIC_STM32_F042X6/board.h | 896 +++++ .../boards/GENERIC_STM32_F042X6/board.mk | 5 + .../peiorisboards/ixora/bootloader_defs.h | 7 + keyboards/peiorisboards/ixora/chconf.h | 521 +++ keyboards/peiorisboards/ixora/config.h | 24 + keyboards/peiorisboards/ixora/halconf.h | 350 ++ keyboards/peiorisboards/ixora/info.json | 21 + keyboards/peiorisboards/ixora/ixora.c | 43 + keyboards/peiorisboards/ixora/ixora.h | 40 + .../ixora/keymaps/default/keymap.c | 42 + .../ixora/keymaps/wntrmln/keymap.c | 26 + keyboards/peiorisboards/ixora/mcuconf.h | 168 + keyboards/peiorisboards/ixora/readme.md | 22 + keyboards/peiorisboards/ixora/rules.mk | 47 + keyboards/phantom/keymaps/default/config.h | 7 +- keyboards/phantom/keymaps/default/keymap.c | 3 - keyboards/phantom/keymaps/iso_uk/keymap.c | 3 - keyboards/phantom/keymaps/rgbmod/keymap.c | 3 - keyboards/phantom/keymaps/xyverz/keymap.c | 4 - keyboards/pinky/3/config.h | 2 +- keyboards/pinky/4/config.h | 2 +- keyboards/plaid/config.h | 248 ++ keyboards/plaid/info.json | 113 + keyboards/plaid/keymaps/default/config.h | 19 + keyboards/plaid/keymaps/default/keymap.c | 222 ++ keyboards/plaid/keymaps/default/readme.md | 2 + keyboards/plaid/plaid.c | 43 + keyboards/plaid/plaid.h | 65 + keyboards/plaid/readme.md | 23 + keyboards/plaid/rules.mk | 101 + keyboards/plaid/usbconfig.h | 397 +++ keyboards/plain60/config.h | 2 +- keyboards/plain60/info.json | 335 ++ keyboards/plain60/keymaps/RGB/config.h | 26 + keyboards/plain60/keymaps/RGB/keymap.c | 57 + keyboards/plain60/keymaps/RGB/rules.mk | 23 + keyboards/plain60/plain60.h | 75 + keyboards/plain60/rules.mk | 2 + keyboards/planck/ez/config.h | 141 + keyboards/planck/ez/ez.c | 139 + keyboards/planck/ez/ez.h | 107 + keyboards/planck/{ => ez}/rules.mk | 38 +- keyboards/planck/keymaps/altgr/keymap.c | 4 +- keyboards/planck/keymaps/aviator/keymap.c | 1 - keyboards/planck/keymaps/basic/keymap.c | 4 - keyboards/planck/keymaps/bone2planck/keymap.c | 4 - keyboards/planck/keymaps/brandon/keymap.c | 1 - keyboards/planck/keymaps/buhearns/config.h | 15 + keyboards/planck/keymaps/buhearns/keymap.c | 99 + keyboards/planck/keymaps/buhearns/readme.md | 20 + keyboards/planck/keymaps/buhearns/rules.mk | 13 + keyboards/planck/keymaps/callum/config.h | 7 + keyboards/planck/keymaps/callum/keymap.c | 249 +- keyboards/planck/keymaps/callum/readme.md | 67 +- keyboards/planck/keymaps/callum/rules.mk | 3 +- keyboards/planck/keymaps/cbbrowne/config.h | 1 - .../cbbrowne/{readme.md => readme.org} | 63 +- keyboards/planck/keymaps/chance/keymap.c | 4 - keyboards/planck/keymaps/circuit/keymap.c | 2 - .../planck/keymaps/danielhklein/keymap.c | 4 - keyboards/planck/keymaps/davidrambo/config.h | 6 +- keyboards/planck/keymaps/davidrambo/keymap.c | 48 +- keyboards/planck/keymaps/davidrambo/rules.mk | 2 +- keyboards/planck/keymaps/dbroqua/keymap.c | 4 - keyboards/planck/keymaps/dcompact/keymap.c | 2 +- keyboards/planck/keymaps/dcompact/readme.md | 45 + keyboards/planck/keymaps/dlaroe/keymap.c | 4 - .../planck/keymaps/dr_notsokind/keymap.c | 2 - .../planck/keymaps/dsanchezseco/config.h | 39 + .../planck/keymaps/dsanchezseco/keymap.c | 114 + .../planck/keymaps/dsanchezseco/readme.md | 2 + .../planck/keymaps/dsanchezseco/rules.mk | 1 + keyboards/planck/keymaps/emilyh/keymap.c | 4 - .../planck/keymaps/experimental/keymap.c | 3 - keyboards/planck/keymaps/fabian/keymap.c | 3 - keyboards/planck/keymaps/fsck/config.h | 28 + keyboards/planck/keymaps/fsck/keymap.c | 154 + keyboards/planck/keymaps/fsck/readme.md | 5 + keyboards/planck/keymaps/fsck/rules.mk | 3 + .../keymaps/handwired_binaryplease/keymap.c | 4 - keyboards/planck/keymaps/hiea/keymap.c | 4 +- keyboards/planck/keymaps/hieax/keymap.c | 4 +- keyboards/planck/keymaps/impossible/keymap.c | 4 - keyboards/planck/keymaps/jarred/keymap.c | 3 +- keyboards/planck/keymaps/jeebak/keymap.c | 4 - keyboards/planck/keymaps/jhenahan/keymap.c | 4 - keyboards/planck/keymaps/jirgn/keymap.c | 1 - keyboards/planck/keymaps/johannes/keymap.c | 3 - keyboards/planck/keymaps/juno/config.h | 41 + keyboards/planck/keymaps/juno/keymap.c | 444 +++ keyboards/planck/keymaps/juno/readme.md | 8 + keyboards/planck/keymaps/juno/rules.mk | 10 + keyboards/planck/keymaps/lae3/keymap.c | 4 - keyboards/planck/keymaps/luke/keymap.c | 4 - keyboards/planck/keymaps/mitch/keymap.c | 3 - keyboards/planck/keymaps/mjt/keymap.c | 4 - keyboards/planck/keymaps/mjtnumsym/keymap.c | 4 - keyboards/planck/keymaps/motform/config.h | 39 + keyboards/planck/keymaps/motform/keymap.c | 211 ++ keyboards/planck/keymaps/motform/readme.md | 11 + keyboards/planck/keymaps/motform/rules.mk | 1 + keyboards/planck/keymaps/msiu/config.h | 40 + keyboards/planck/keymaps/msiu/keymap.c | 208 ++ keyboards/planck/keymaps/msiu/readme.md | 2 + keyboards/planck/keymaps/msiu/rules.mk | 1 + keyboards/planck/keymaps/narze/keymap.c | 4 - keyboards/planck/keymaps/neo2planck/keymap.c | 4 - keyboards/planck/keymaps/oeywil/.gitignore | 1 + keyboards/planck/keymaps/oeywil/config.h | 37 + keyboards/planck/keymaps/oeywil/keymap.c | 392 +++ keyboards/planck/keymaps/oeywil/no_keycodes.h | 28 + keyboards/planck/keymaps/oeywil/readme.md | 4 + keyboards/planck/keymaps/oeywil/rules.mk | 11 + keyboards/planck/keymaps/originerd/keymap.c | 4 - keyboards/planck/keymaps/palleiko/keymap.c | 2 - keyboards/planck/keymaps/pete/keymap.c | 4 - keyboards/planck/keymaps/piemod/README.md | 4 - keyboards/planck/keymaps/premek/keymap.c | 4 - keyboards/planck/keymaps/priyadi/config.h | 22 +- keyboards/planck/keymaps/priyadi/rules.mk | 11 +- keyboards/planck/keymaps/pvc/keymap.c | 2 - keyboards/planck/keymaps/rai-suta/keymap.c | 3 - keyboards/planck/keymaps/rjhilgefort/config.h | 35 + keyboards/planck/keymaps/rjhilgefort/keymap.c | 153 + .../planck/keymaps/rjhilgefort/readme.md | 63 + keyboards/planck/keymaps/rjhilgefort/rules.mk | 0 .../planck/keymaps/roguepullrequest/config.h | 8 + .../planck/keymaps/roguepullrequest/keymap.c | 254 ++ .../planck/keymaps/roguepullrequest/readme.md | 20 + .../planck/keymaps/roguepullrequest/rules.mk | 4 + keyboards/planck/keymaps/samuel/README.org | 622 ++++ keyboards/planck/keymaps/samuel/config.h | 1 + keyboards/planck/keymaps/samuel/keymap.c | 359 ++ keyboards/planck/keymaps/sdothum/keymap.c | 4 +- keyboards/planck/keymaps/sean/mymappings.h | 4 - keyboards/planck/keymaps/sgoodwin/keymap.c | 4 - keyboards/planck/keymaps/smt/keymap.c | 4 - .../planck/keymaps/spacebarracecar/keymap.c | 2 +- .../planck/keymaps/that_canadian/keymap.c | 4 - .../planck/keymaps/thermal_printer/keymap.c | 4 - keyboards/planck/keymaps/tom/config.h | 39 + keyboards/planck/keymaps/tom/keymap.c | 261 ++ keyboards/planck/keymaps/tom/readme.md | 35 + keyboards/planck/keymaps/tom/rules.mk | 1 + keyboards/planck/keymaps/tong92/keymap.c | 3 - keyboards/planck/keymaps/unicode/keymap.c | 5 - keyboards/planck/keymaps/vxid/config.h | 1 + keyboards/planck/keymaps/vxid/keymap.c | 49 + keyboards/planck/keymaps/vxid/readme.md | 13 + keyboards/planck/keymaps/yale/keymap.c | 4 - .../keymaps/zach/zach_common_functions.c | 3 - keyboards/planck/keymaps/zrichard/keymap.c | 2 - keyboards/planck/light/config.h | 2 +- keyboards/planck/light/light.c | 87 +- keyboards/planck/light/rules.mk | 35 +- keyboards/planck/planck.h | 6 +- keyboards/planck/readme.md | 7 +- keyboards/planck/rev1/rules.mk | 30 +- keyboards/planck/rev2/rules.mk | 30 +- keyboards/planck/rev3/rules.mk | 36 +- keyboards/planck/rev4/rules.mk | 34 + keyboards/planck/rev5/rules.mk | 34 + keyboards/planck/rev6/rules.mk | 35 +- .../playkbtw/ca66/keymaps/kelorean/keymap.c | 3 - .../playkbtw/pk60/keymaps/default/keymap.c | 4 +- .../playkbtw/pk60/keymaps/rfvizarra/keymap.c | 29 + .../playkbtw/pk60/keymaps/rfvizarra/readme.md | 11 + keyboards/preonic/keymaps/0xdec/keymap.c | 4 - .../preonic/keymaps/CMD-Preonic/keymap.c | 4 - keyboards/preonic/keymaps/bucktooth/keymap.c | 26 +- keyboards/preonic/keymaps/bucktooth/readme.md | 22 +- keyboards/preonic/keymaps/default/config.h | 7 +- keyboards/preonic/keymaps/dlaroe/keymap.c | 4 - keyboards/preonic/keymaps/fsck/config.h | 26 + keyboards/preonic/keymaps/fsck/keymap.c | 249 ++ keyboards/preonic/keymaps/fsck/readme.md | 5 + keyboards/preonic/keymaps/fsck/rules.mk | 1 + keyboards/preonic/keymaps/jacwib/keymap.c | 4 - keyboards/preonic/keymaps/juno/config.h | 37 + keyboards/preonic/keymaps/juno/keymap.c | 313 ++ keyboards/preonic/keymaps/juno/readme.md | 1 + keyboards/preonic/keymaps/juno/rules.mk | 0 keyboards/preonic/keymaps/kinesis/keymap.c | 3 - keyboards/preonic/keymaps/kuatsure/config.h | 3 - keyboards/preonic/keymaps/kuatsure/keymap.c | 106 +- keyboards/preonic/keymaps/kuatsure/rules.mk | 1 - .../preonic/keymaps/mikethetiger/config.h | 38 + .../preonic/keymaps/mikethetiger/keymap.c | 289 ++ .../preonic/keymaps/mikethetiger/readme.md | 1 + .../preonic/keymaps/mikethetiger/rules.mk | 1 + keyboards/preonic/keymaps/nikchi/keymap.c | 4 - keyboards/preonic/keymaps/seph/keymap.c | 3 - keyboards/preonic/keymaps/smt/keymap.c | 4 - .../preonic/keymaps/spacebarracecar/config.h | 5 + .../preonic/keymaps/spacebarracecar/keymap.c | 176 + .../keymaps/spacebarracecar/readme.md | 4 +- .../preonic/keymaps/spacebarracecar/rules.mk | 22 + .../preonic/keymaps/that_canadian/keymap.c | 4 - keyboards/preonic/keymaps/xulkal/keymap.c | 148 + keyboards/preonic/keymaps/xulkal/rules.mk | 6 + .../keymaps/zach/zach_common_functions.c | 3 - keyboards/preonic/readme.md | 11 +- keyboards/preonic/rev1/rules.mk | 67 + keyboards/preonic/rev2/rules.mk | 67 + keyboards/preonic/rev3/rules.mk | 34 +- keyboards/primekb/prime_e/config.h | 72 + keyboards/primekb/prime_e/info.json | 16 + .../primekb/prime_e/keymaps/default/keymap.c | 94 + .../primekb/prime_e/keymaps/default/readme.md | 2 + .../primekb/prime_e/keymaps/via/keymap.c | 94 + .../primekb/prime_e/keymaps/via/readme.md | 2 + .../primekb/prime_e/keymaps/via/rules.mk | 85 + keyboards/primekb/prime_e/prime_e.c | 22 + keyboards/primekb/prime_e/prime_e.h | 34 + keyboards/primekb/prime_e/readme.md | 16 + keyboards/primekb/prime_e/rules.mk | 80 + keyboards/primekb/prime_l/config.h | 2 +- keyboards/primekb/prime_m/config.h | 2 +- keyboards/primekb/prime_m/info.json | 40 +- .../primekb/prime_m/keymaps/default/keymap.c | 38 +- .../primekb/prime_m/keymaps/numpad/config.h | 19 + .../primekb/prime_m/keymaps/numpad/keymap.c | 33 + .../primekb/prime_m/keymaps/numpad/readme.md | 1 + keyboards/primekb/prime_m/prime_m.h | 20 +- keyboards/primekb/prime_m/rules.mk | 2 + keyboards/primekb/prime_o/config.h | 2 +- .../prime_o/keymaps/spacebarracecar/keymap.c | 6 +- .../primekb/prime_r/keymaps/default/config.h | 7 +- .../primekb/prime_r/keymaps/default/keymap.c | 4 - .../primekb/prime_r/keymaps/rooski/keymap.c | 4 - keyboards/projectkb/alice/alice.c | 27 + keyboards/projectkb/alice/alice.h | 19 + .../boards/ST_STM32F072B_DISCOVERY/board.c | 109 + .../boards/ST_STM32F072B_DISCOVERY/board.h | 922 +++++ .../boards/ST_STM32F072B_DISCOVERY/board.mk | 5 + .../ST_STM32F072B_DISCOVERY/cfg/board.chcfg | 703 ++++ keyboards/projectkb/alice/bootloader_defs.h | 7 + keyboards/projectkb/alice/chconf.h | 524 +++ keyboards/projectkb/alice/config.h | 92 + keyboards/projectkb/alice/halconf.h | 351 ++ .../projectkb/alice/keymaps/default/keymap.c | 45 + keyboards/projectkb/alice/mcuconf.h | 176 + keyboards/projectkb/alice/readme.md | 12 + keyboards/projectkb/alice/rules.mk | 56 + keyboards/ps2avrGB/README.md | 78 - keyboards/ps2avrGB/bmini.h | 60 - keyboards/ps2avrGB/i2c.c | 106 - keyboards/ps2avrGB/i2c.h | 27 - keyboards/ps2avrGB/keymaps/default/keymap.c | 37 - keyboards/ps2avrGB/matrix.c | 112 - keyboards/ps2avrGB/program | 105 - keyboards/ps2avrGB/ps2avrGB.c | 78 - keyboards/ps2avrGB/ps2avrGB.h | 31 - keyboards/quantrik/kyuu/config.h | 245 ++ keyboards/quantrik/kyuu/info.json | 82 + .../quantrik/kyuu/keymaps/default/config.h | 19 + .../quantrik/kyuu/keymaps/default/keymap.c | 74 + .../quantrik/kyuu/keymaps/default/readme.md | 1 + keyboards/quantrik/kyuu/kyuu.c | 43 + keyboards/quantrik/kyuu/kyuu.h | 41 + keyboards/quantrik/kyuu/readme.md | 13 + keyboards/quantrik/kyuu/rules.mk | 81 + keyboards/quefrency/info.json | 174 - keyboards/qwertyydox/info.json | 4 +- keyboards/rama/koyu/config.h | 142 + keyboards/rama/koyu/info.json | 13 + keyboards/rama/koyu/keymaps/default/keymap.c | 36 + keyboards/rama/koyu/koyu.c | 18 + keyboards/rama/koyu/koyu.h | 42 + keyboards/rama/koyu/readme.md | 23 + keyboards/rama/koyu/rules.mk | 80 + keyboards/rama/m10_b/config.h | 2 +- keyboards/rama/m10_b/keymaps/default/config.h | 7 +- keyboards/rama/m60_a/config.h | 15 + keyboards/rama/m6_a/config.h | 2 +- keyboards/rama/m6_a/keymaps/krusli/keymap.c | 3 - keyboards/rama/m6_b/config.h | 17 +- keyboards/rama/u80_a/config.h | 2 +- keyboards/readme.md | 19 +- keyboards/redox/keymaps/fculpo/config.h | 34 + keyboards/redox/keymaps/fculpo/keymap.c | 92 + keyboards/redox/keymaps/fculpo/keymap.json | 399 +++ keyboards/redox/keymaps/fculpo/readme.md | 18 + .../keymaps/fculpo}/rules.mk | 1 - keyboards/redox/keymaps/finex/config.h | 4 + keyboards/redox/keymaps/finex/keymap.c | 398 ++- keyboards/redox/keymaps/finex/readme.md | 57 +- keyboards/redox/keymaps/finex/rules.mk | 3 +- .../keymaps/nrichers}/config.h | 13 +- keyboards/redox/keymaps/nrichers/keymap.c | 92 + keyboards/redox/keymaps/nrichers/keymap.png | Bin 0 -> 146904 bytes keyboards/redox/keymaps/nrichers/readme.md | 28 + .../keymaps/nrichers}/rules.mk | 1 - keyboards/rgbkb/sol/common/glcdfont.c | 240 ++ keyboards/rgbkb/sol/config.h | 92 + .../sol/keymaps/brianweyer}/config.h | 0 .../sol/keymaps/brianweyer/keymap.c | 178 +- .../sol/keymaps/brianweyer}/rules.mk | 20 +- .../sol/keymaps/danielhklein}/config.h | 0 .../sol/keymaps/danielhklein/keymap.c | 171 +- .../sol/keymaps/danielhklein}/rules.mk | 16 +- .../sol/keymaps/default}/config.h | 2 - keyboards/rgbkb/sol/keymaps/default/keymap.c | 316 ++ keyboards/rgbkb/sol/keymaps/default/readme.md | 115 + .../sol/keymaps/default}/rules.mk | 14 +- .../sol/keymaps/kageurufu/keymap.c | 26 +- .../sol/keymaps/kageurufu}/rules.mk | 24 +- keyboards/rgbkb/sol/keymaps/xulkal/keymap.c | 168 + keyboards/rgbkb/sol/keymaps/xulkal/rules.mk | 37 + keyboards/{ => rgbkb}/sol/readme.md | 2 +- keyboards/rgbkb/sol/rev1/config.h | 36 + keyboards/{ => rgbkb}/sol/rev1/info.json | 6 +- keyboards/rgbkb/sol/rev1/rev1.c | 46 + keyboards/rgbkb/sol/rev1/rev1.h | 1 + keyboards/rgbkb/sol/rev1/rules.mk | 0 keyboards/{ => rgbkb}/sol/rules.mk | 14 +- keyboards/{ => rgbkb}/sol/sol.c | 0 .../{sol/rev1/rev1.h => rgbkb/sol/sol.h} | 35 +- keyboards/rgbkb/zen/common/glcdfont.c | 239 ++ keyboards/{ => rgbkb}/zen/config.h | 13 +- keyboards/rgbkb/zen/readme.md | 27 + keyboards/{ => rgbkb}/zen/rev1/config.h | 21 +- keyboards/{zen => rgbkb/zen/rev1}/info.json | 0 .../zen/rev1}/keymaps/333fred/config.h | 0 .../zen/rev1}/keymaps/333fred/keymap.c | 0 .../zen/rev1}/keymaps/333fred/rules.mk | 1 - .../zen/rev1/keymaps/default}/config.h | 5 +- .../zen/rev1}/keymaps/default/keymap.c | 12 +- .../rgbkb/zen/rev1/keymaps/default/rules.mk | 1 + .../zen/rev1/keymaps/jwlawrence}/config.h | 4 +- .../zen/rev1}/keymaps/jwlawrence/keymap.c | 6 +- .../zen/rev1/keymaps/jwlawrence/rules.mk | 1 + .../zen/rev1}/keymaps/kageurufu/keymap.c | 4 +- .../zen/rev1}/keymaps/xyverz/config.h | 5 +- .../zen/rev1}/keymaps/xyverz/keymap.c | 4 - .../rgbkb/zen/rev1/keymaps/xyverz/rules.mk | 1 + keyboards/{ => rgbkb}/zen/rev1/rev1.c | 0 keyboards/{ => rgbkb}/zen/rev1/rev1.h | 5 +- keyboards/rgbkb/zen/rev1/rules.mk | 1 + keyboards/rgbkb/zen/rev2/config.h | 86 + keyboards/rgbkb/zen/rev2/info.json | 361 ++ .../rgbkb/zen/rev2/keymaps/debug/keymap.c | 19 + .../rgbkb/zen/rev2/keymaps/default/keymap.c | 117 + keyboards/rgbkb/zen/rev2/rev2.c | 66 + keyboards/rgbkb/zen/rev2/rev2.h | 56 + keyboards/rgbkb/zen/rev2/rules.mk | 9 + keyboards/rgbkb/zen/rules.mk | 42 + keyboards/{ => rgbkb}/zen/zen.c | 0 keyboards/rgbkb/zen/zen.h | 8 + .../zygomorph}/common/glcdfont.c | 0 .../{quefrency => rgbkb/zygomorph}/config.h | 8 +- .../rgbkb/zygomorph/keymaps/5x6pad/keymap.c | 282 ++ .../rgbkb/zygomorph/keymaps/5x6pad/rules.mk | 42 + .../rgbkb/zygomorph/keymaps/default/config.h | 25 + .../rgbkb/zygomorph/keymaps/default/keymap.c | 167 + .../rgbkb/zygomorph/keymaps/default/readme.md | 121 + .../rgbkb/zygomorph/keymaps/default/rules.mk | 42 + .../zygomorph/keymaps/default_oled/config.h | 25 + .../zygomorph/keymaps/default_oled/keymap.c | 233 ++ .../zygomorph/keymaps/default_oled/rules.mk | 42 + .../zygomorph/keymaps/kageurufu/config.h | 24 + .../zygomorph/keymaps/kageurufu/keymap.c | 84 + .../zygomorph/keymaps/kageurufu}/readme.md | 7 +- .../zygomorph/keymaps/kageurufu/rules.mk | 44 + .../rgbkb/zygomorph/keymaps/xulkal/config.h | 25 + .../rgbkb/zygomorph/keymaps/xulkal/keymap.c | 87 + .../rgbkb/zygomorph/keymaps/xulkal/rules.mk | 42 + keyboards/rgbkb/zygomorph/readme.md | 15 + keyboards/rgbkb/zygomorph/rev1/config.h | 101 + keyboards/rgbkb/zygomorph/rev1/info.json | 21 + keyboards/rgbkb/zygomorph/rev1/rev1.c | 73 + keyboards/rgbkb/zygomorph/rev1/rev1.h | 87 + keyboards/rgbkb/zygomorph/rev1/rules.mk | 0 keyboards/rgbkb/zygomorph/rules.mk | 69 + keyboards/rgbkb/zygomorph/zygomorph.c | 1 + .../zen.h => rgbkb/zygomorph/zygomorph.h} | 5 +- keyboards/romac/config.h | 40 + keyboards/romac/info.json | 13 + keyboards/romac/keymaps/default/keymap.c | 37 + keyboards/romac/keymaps/stanrc85/config.h | 11 + keyboards/romac/keymaps/stanrc85/keymap.c | 78 + keyboards/romac/keymaps/stanrc85/rules.mk | 1 + keyboards/romac/readme.md | 16 + keyboards/romac/romac.c | 1 + keyboards/romac/romac.h | 16 + keyboards/romac/rules.mk | 57 + keyboards/satan/config.h | 12 +- keyboards/satan/keymaps/ben_iso/keymap.c | 1 - keyboards/satan/keymaps/bri/keymap.c | 1 - keyboards/satan/keymaps/chaser/keymap.c | 2 - keyboards/satan/keymaps/colemak/keymap.c | 36 +- keyboards/satan/keymaps/default/keymap.c | 99 +- keyboards/satan/keymaps/dende_iso/keymap.c | 3 - keyboards/satan/keymaps/fakb/keymap.c | 3 - keyboards/satan/keymaps/isoHHKB/keymap.c | 3 - .../satan/keymaps/iso_split_rshift/keymap.c | 79 +- keyboards/satan/keymaps/midi/keymap.c | 4 - keyboards/satan/keymaps/no_caps_lock/keymap.c | 55 + .../satan/keymaps/no_caps_lock/readme.md | 1 + .../satan/keymaps/olligranlund_iso/keymap.c | 1 - .../satan/keymaps/olligranlund_iso/rules.mk | 2 +- keyboards/satan/keymaps/poker/keymap.c | 36 +- keyboards/satan/keymaps/sethbc/keymap.c | 3 - keyboards/satan/keymaps/smt/keymap.c | 3 - .../satan/keymaps/spacemanspiff/keymap.c | 2 - keyboards/satan/keymaps/stanleylai/keymap.c | 4 - keyboards/satan/keymaps/unxmaal/keymap.c | 2 - keyboards/satan/pinout.txt | 1 - keyboards/satan/readme.md | 30 +- keyboards/satan/rules.mk | 23 +- keyboards/satan/satan.c | 28 +- keyboards/satan/satan.h | 213 +- keyboards/scarletbandana/config.h | 2 +- .../scarletbandana/keymaps/default/config.h | 7 +- keyboards/scythe/config.h | 240 ++ keyboards/scythe/info.json | 13 + keyboards/scythe/keymaps/default/config.h | 19 + keyboards/scythe/keymaps/default/keymap.c | 75 + keyboards/scythe/keymaps/default/readme.md | 2 + keyboards/scythe/keymaps/forties/config.h | 19 + keyboards/scythe/keymaps/forties/keymap.c | 205 ++ keyboards/scythe/keymaps/forties/readme.md | 2 + keyboards/scythe/readme.md | 15 + keyboards/scythe/rules.mk | 85 + keyboards/scythe/scythe.c | 43 + keyboards/scythe/scythe.h | 51 + keyboards/sentraq/number_pad/config.h | 2 +- keyboards/sentraq/s60_x/default/config.h | 35 +- keyboards/sentraq/s60_x/default/default.h | 23 +- keyboards/sentraq/s60_x/default/rules.mk | 73 +- .../sentraq/s60_x/{default => }/info.json | 3 + .../s60_x/keymaps/ansi_qwertz/config.h | 6 +- .../s60_x/keymaps/ansi_qwertz/keymap.c | 4 - .../sentraq/s60_x/keymaps/default/keymap.c | 12 +- .../s60_x/keymaps/default_rgb/keymap.c | 12 +- keyboards/sentraq/s60_x/keymaps/iso/keymap.c | 8 +- .../sentraq/s60_x/keymaps/iso_rgb/keymap.c | 8 +- keyboards/sentraq/s60_x/readme.md | 8 +- keyboards/sentraq/s60_x/rgb/config.h | 28 +- keyboards/sentraq/s60_x/rgb/info.json | 21 - keyboards/sentraq/s60_x/rgb/rgb.h | 18 +- keyboards/sentraq/s60_x/rgb/rules.mk | 70 +- keyboards/sentraq/s60_x/s60_x.c | 1 - keyboards/sentraq/s60_x/s60_x.h | 13 - keyboards/signum/3_0/elitec/config.h | 26 + keyboards/signum/3_0/elitec/elitec.c | 1 + keyboards/signum/3_0/elitec/elitec.h | 15 + keyboards/signum/3_0/elitec/info.json | 67 + .../3_0/elitec/keymaps/default/generate_km.py | 194 ++ .../3_0/elitec/keymaps/default/keymap.c | 761 +++++ .../elitec/keymaps/default/km_template.txt | 20 + .../3_0/elitec/keymaps/default/layout.py | 494 +++ .../3_0/elitec/keymaps/default/readme.md | 24 + .../3_0/elitec/keymaps/default/rules.mk | 1 + keyboards/signum/3_0/elitec/readme.md | 14 + keyboards/signum/3_0/elitec/rules.mk | 64 + keyboards/singa/config.h | 9 +- keyboards/singa/i2c.c | 106 - keyboards/singa/i2c.h | 27 - keyboards/singa/keymaps/amnesia0287/config.h | 2 +- keyboards/singa/keymaps/amnesia0287/keymap.c | 2 +- keyboards/singa/keymaps/default/config.h | 9 +- keyboards/singa/keymaps/default/keymap.c | 2 +- keyboards/singa/keymaps/test/config.h | 2 +- keyboards/singa/keymaps/test/keymap.c | 2 +- keyboards/singa/matrix.c | 112 - keyboards/singa/readme.md | 8 +- keyboards/singa/rules.mk | 10 +- keyboards/singa/singa.c | 78 +- keyboards/singa/singa.h | 7 +- keyboards/singa/usbconfig.h | 5 +- keyboards/sirius/unigo66/README.md | 17 - keyboards/sirius/unigo66/config.h | 9 +- keyboards/sirius/unigo66/info.json | 80 +- keyboards/sirius/unigo66/main.c | 9 +- keyboards/sirius/unigo66/readme.md | 2 +- keyboards/sirius/unigo66/rules.mk | 5 +- keyboards/sirius/unigo66/unigo66.h | 20 +- keyboards/sixkeyboard/matrix.c | 5 - keyboards/sol/common/knob_v2.c | 71 - keyboards/sol/common/knob_v2.h | 28 - keyboards/sol/keymaps/default/keymap.c | 362 -- keyboards/sol/rev1/rules.mk | 2 - keyboards/sol/rev1/split_util.c | 54 - keyboards/sol/serial.c | 288 -- keyboards/sol/serial.h | 26 - keyboards/sol/sol.h | 7 - keyboards/speedo/config.h | 2 +- keyboards/speedo/info.json | 2 +- keyboards/speedo/keymaps/default/config.h | 7 +- keyboards/speedo/keymaps/default/keymap.c | 1 - keyboards/standaside/config.h | 204 ++ keyboards/standaside/keymaps/default/config.h | 5 + keyboards/standaside/keymaps/default/keymap.c | 77 + keyboards/standaside/readme.md | 15 + keyboards/standaside/rules.mk | 73 + keyboards/standaside/standaside.c | 14 + keyboards/standaside/standaside.h | 29 + keyboards/staryu/backlight_staryu.c | 52 - keyboards/staryu/backlight_staryu.h | 32 +- keyboards/staryu/config.h | 71 +- keyboards/staryu/keymaps/default/keymap.c | 120 +- keyboards/staryu/keymaps/krusli/keymap.c | 3 - keyboards/staryu/rules.mk | 50 +- keyboards/staryu/staryu.c | 9 - keyboards/staryu/staryu.h | 14 +- keyboards/subatomic/keymaps/default/config.h | 7 +- keyboards/subatomic/keymaps/default/keymap.c | 11 +- keyboards/sx60/keymaps/default/config.h | 4 +- keyboards/tada68/keymaps/amnesia0287/keymap.c | 2 - keyboards/tada68/keymaps/ardakilic/keymap.c | 2 - keyboards/tada68/keymaps/bazooka/keymap.c | 1 - keyboards/tada68/keymaps/default/keymap.c | 2 - keyboards/tada68/keymaps/fakb/keymap.c | 2 - keyboards/tada68/keymaps/fezzant/keymap.c | 3 - keyboards/tada68/keymaps/iso-nor/keymap.c | 4 +- keyboards/tada68/keymaps/iso-uk/keymap.c | 2 - keyboards/tada68/keymaps/isoish/keymap.c | 4 +- keyboards/tada68/keymaps/kbp-v60/keymap.c | 53 + keyboards/tada68/keymaps/kbp-v60/readme.md | 3 + keyboards/tada68/keymaps/kbp-v60/rules.mk | 18 + keyboards/tada68/keymaps/laas/keymap.c | 1 - keyboards/tada68/keymaps/mattdicarlo/keymap.c | 2 - keyboards/tada68/keymaps/mattgemmell/config.h | 3 + keyboards/tada68/keymaps/mattgemmell/keymap.c | 48 + .../tada68/keymaps/mattgemmell/readme.md | 14 + keyboards/tada68/keymaps/mattgemmell/rules.mk | 16 + keyboards/tada68/keymaps/mlechner/keymap.c | 2 - keyboards/tada68/keymaps/pascamel/keymap.c | 2 - keyboards/tada68/keymaps/raylas/keymap.c | 2 - keyboards/tada68/keymaps/rbong/keymap.c | 1 - keyboards/tada68/keymaps/rgb/keymap.c | 2 - keyboards/tada68/keymaps/rys/keymap.c | 2 - .../tada68/keymaps/stephengrier/keymap.c | 2 - keyboards/tada68/keymaps/trashcat/keymap.c | 2 - keyboards/tada68/keymaps/tshack/keymap.c | 2 - keyboards/tada68/keymaps/unix/keymap.c | 2 - keyboards/tada68/keymaps/wamsm_tada/keymap.c | 4 +- keyboards/tanuki/keymaps/default/keymap.c | 1 - keyboards/telophase/keymaps/default/keymap.c | 9 +- keyboards/tetris/config.h | 22 +- keyboards/tetris/info.json | 6 +- keyboards/tetris/keymaps/default/keymap.c | 955 +----- keyboards/tetris/readme.md | 4 +- keyboards/tetris/rules.mk | 11 +- keyboards/tetris/tetris.c | 2 +- keyboards/tetris/tetris.h | 8 +- keyboards/the_ruler/keymaps/default/config.h | 7 +- keyboards/the_ruler/keymaps/default/keymap.c | 6 - .../bananasplit/keymaps/default/config.h | 7 +- .../minivan/keymaps/belak/keymap.c | 3 - .../minivan/keymaps/budi/keymap.c | 4 - .../minivan/keymaps/core/keymap.c | 3 - .../minivan/keymaps/default/config.h | 7 +- .../minivan/keymaps/default/keymap.c | 4 - .../minivan/keymaps/jeebak/keymap.c | 4 - .../minivan/keymaps/king/keymap.c | 114 + .../minivan/keymaps/king/readme.md | 4 + .../minivan/keymaps/king/rules.mk | 6 + .../minivan/keymaps/like_jis/config.h | 43 + .../minivan/keymaps/like_jis/keymap.c | 173 + .../minivan/keymaps/like_jis/readme.md | 63 + .../minivan/keymaps/like_jis/rules.mk | 25 + .../minivan/keymaps/mjt/keymap.c | 6 +- .../minivan/keymaps/smt/keymap.c | 4 - .../minivan/keymaps/tong92/keymap.c | 3 - .../minivan/keymaps/xyverz/keymap.c | 4 - .../roadkit/keymaps/default/config.h | 7 +- .../roadkit/keymaps/default/keymap.c | 5 - .../roadkit/keymaps/flipphone/keymap.c | 4 - .../roadkit/keymaps/khord/keymap.c | 4 - .../roadkit/keymaps/mjt/keymap.c | 5 - .../roadkit/keymaps/singles/keymap.c | 5 - .../roadkit/keymaps/singlesBrent/keymap.c | 4 - keyboards/tmo50/config.h | 2 +- keyboards/tmo50/keymaps/olivia/keymap.c | 53 + keyboards/tmo50/keymaps/pyrol/keymap.c | 68 + keyboards/touchpad/info.json | 19 + keyboards/touchpad/keymaps/default/keymap.c | 16 +- keyboards/touchpad/touchpad.h | 17 + keyboards/treadstone32/config.h | 103 + keyboards/treadstone32/info.json | 175 + .../treadstone32/keymaps/default/config.h | 58 + .../treadstone32/keymaps/default/keymap.c | 170 + .../treadstone32/keymaps/default/readme.md | 5 + .../treadstone32/keymaps/default/readme_jp.md | 55 + .../treadstone32/keymaps/default/rules.mk | 25 + .../treadstone32/keymaps/like_jis/config.h | 58 + .../treadstone32/keymaps/like_jis/keymap.c | 170 + .../treadstone32/keymaps/like_jis/readme.md | 5 + .../keymaps/like_jis/readme_jp.md | 55 + .../treadstone32/keymaps/like_jis/rules.mk | 25 + keyboards/treadstone32/readme.md | 18 + keyboards/treadstone32/rules.mk | 64 + keyboards/treadstone32/treadstone32.c | 43 + keyboards/treadstone32/treadstone32.h | 45 + keyboards/treadstone48/common/glcdfont.c | 244 ++ keyboards/treadstone48/common/oled_helper.c | 83 + keyboards/treadstone48/common/oled_helper.h | 35 + keyboards/treadstone48/config.h | 43 + keyboards/{ergodash => treadstone48}/i2c.c | 2 +- keyboards/{bfo9000 => treadstone48}/i2c.h | 7 +- .../treadstone48/keymaps/default/config.h | 60 + .../treadstone48/keymaps/default/keymap.c | 278 ++ .../treadstone48/keymaps/default/readme.md | 5 + .../treadstone48/keymaps/default/readme_jp.md | 80 + .../treadstone48/keymaps/default/rules.mk | 67 + .../treadstone48/keymaps/like_jis/config.h | 60 + .../treadstone48/keymaps/like_jis/keymap.c | 278 ++ .../treadstone48/keymaps/like_jis/readme.md | 5 + .../keymaps/like_jis/readme_jp.md | 80 + .../treadstone48/keymaps/like_jis/rules.mk | 67 + .../treadstone48/keymaps/like_jis_rs/config.h | 60 + .../treadstone48/keymaps/like_jis_rs/keymap.c | 342 ++ .../keymaps/like_jis_rs/readme.md | 5 + .../keymaps/like_jis_rs/readme_jp.md | 84 + .../treadstone48/keymaps/like_jis_rs/rules.mk | 67 + keyboards/treadstone48/pro_micro.h | 362 ++ keyboards/treadstone48/readme.md | 18 + keyboards/{sol => treadstone48}/rev1/config.h | 69 +- keyboards/treadstone48/rev1/info.json | 261 ++ .../{orthodox => treadstone48/rev1}/matrix.c | 133 +- keyboards/{sol => treadstone48}/rev1/rev1.c | 2 +- keyboards/treadstone48/rev1/rev1.h | 202 ++ keyboards/treadstone48/rev1/rules.mk | 3 + keyboards/treadstone48/rev1/serial_config.h | 8 + .../rev1/serial_config_simpleapi.h | 8 + keyboards/treadstone48/rev1/split_scomm.c | 92 + keyboards/treadstone48/rev1/split_scomm.h | 21 + .../rev1}/split_util.c | 28 +- .../{sol => treadstone48}/rev1/split_util.h | 7 +- keyboards/treadstone48/rules.mk | 73 + keyboards/treadstone48/serial.c | 590 ++++ keyboards/treadstone48/serial.h | 86 + .../{sol/common => treadstone48}/ssd1306.c | 17 +- .../{sol/common => treadstone48}/ssd1306.h | 8 +- keyboards/treadstone48/treadstone48.c | 1 + keyboards/treadstone48/treadstone48.h | 15 + keyboards/treasure/type9/config.h | 2 +- keyboards/ut472/config.h | 60 + keyboards/ut472/info.json | 13 + keyboards/ut472/keymaps/default/config.h | 21 + keyboards/ut472/keymaps/default/keymap.c | 100 + keyboards/ut472/keymaps/default/readme.md | 5 + keyboards/ut472/readme.md | 20 + keyboards/ut472/rules.mk | 69 + keyboards/ut472/ut472.c | 13 + keyboards/ut472/ut472.h | 34 + keyboards/v60_type_r/config.h | 9 +- keyboards/v60_type_r/keymaps/default/config.h | 9 +- keyboards/v60_type_r/keymaps/default/keymap.c | 2 +- .../v60_type_r/keymaps/default/readme.md | 5 +- .../keymaps/default}/rules.mk | 0 keyboards/v60_type_r/keymaps/vimouse/config.h | 9 +- keyboards/v60_type_r/keymaps/vimouse/keymap.c | 2 +- .../v60_type_r/keymaps/xtonhasvim/keymap.c | 1 - keyboards/v60_type_r/readme.md | 16 +- keyboards/v60_type_r/rules.mk | 28 +- keyboards/v60_type_r/v60_type_r.c | 2 +- keyboards/v60_type_r/v60_type_r.h | 6 +- keyboards/vinta/config.h | 2 +- keyboards/vinta/rules.mk | 1 + .../vision_division/keymaps/default/config.h | 8 +- .../vision_division/keymaps/default/keymap.c | 22 +- .../keymaps/default/keymap.c | 4 - .../vitamins_included/keymaps/juno/keymap.c | 293 ++ .../vitamins_included/keymaps/juno/rules.mk | 16 + .../vitamins_included/keymaps/numpad/config.h | 39 + .../vitamins_included/keymaps/numpad/keymap.c | 75 + .../viterbi/keymaps/drashna_old/config.h | 86 - .../viterbi/keymaps/drashna_old/rules.mk | 28 - keyboards/waldo/config.h | 77 + keyboards/waldo/info.json | 24 + keyboards/waldo/keymaps/default/keymap.c | 44 + keyboards/waldo/keymaps/default/readme.md | 2 + keyboards/waldo/keymaps/default/rules.mk | 0 .../keymaps/default_split_shft_bck}/config.h | 1 - .../keymaps/default_split_shft_bck/keymap.c | 97 + .../keymaps/default_split_shft_bck/readme.md | 2 + .../keymaps/default_split_shft_bck/rules.mk | 0 keyboards/waldo/readme.md | 12 + keyboards/waldo/rules.mk | 65 + keyboards/waldo/waldo.c | 1 + keyboards/waldo/waldo.h | 63 + keyboards/wasdat/config.h | 256 ++ keyboards/wasdat/info.json | 459 +++ keyboards/wasdat/keymaps/default/keymap.c | 44 + keyboards/wasdat/keymaps/default/readme.md | 1 + keyboards/wasdat/keymaps/default_iso/keymap.c | 44 + .../wasdat/keymaps/default_iso/readme.md | 1 + keyboards/wasdat/matrix.c | 484 +++ keyboards/wasdat/readme.md | 21 + keyboards/wasdat/rules.mk | 84 + keyboards/wasdat/wasdat.c | 58 + keyboards/wasdat/wasdat.h | 104 + keyboards/westfoxtrot/aanzee/aanzee.h | 16 +- keyboards/westfoxtrot/aanzee/info.json | 3 +- .../aanzee/keymaps/default/keymap.c | 4 +- .../aanzee/keymaps/iso-default/keymap.c | 4 +- .../westfoxtrot/aanzee/keymaps/via/keymap.c | 4 +- keyboards/westfoxtrot/cyclops/config.h | 2 +- keyboards/westfoxtrot/cyclops/cyclops.h | 4 +- keyboards/westfoxtrot/cypher/config.h | 66 + keyboards/westfoxtrot/cypher/cypher.c | 56 + keyboards/westfoxtrot/cypher/cypher.h | 68 + keyboards/westfoxtrot/cypher/info.json | 207 ++ .../cypher/keymaps/default-iso/config.h | 19 + .../cypher/keymaps/default-iso/keymap.c | 49 + .../cypher/keymaps/default-iso/readme.md | 1 + .../cypher/keymaps/default/config.h | 19 + .../cypher/keymaps/default/keymap.c | 49 + .../cypher/keymaps/default/readme.md | 1 + .../westfoxtrot/cypher/keymaps/kwer/config.h | 33 + .../westfoxtrot/cypher/keymaps/kwer/keymap.c | 79 + .../westfoxtrot/cypher/keymaps/kwer/readme.md | 39 + .../westfoxtrot/cypher/keymaps/kwer/rules.mk | 2 + keyboards/westfoxtrot/cypher/readme.md | 15 + keyboards/westfoxtrot/cypher/rules.mk | 81 + .../whitefox/keymaps/billypython/config.h | 16 +- .../whitefox/keymaps/billypython/keymap.c | 133 +- .../whitefox/keymaps/billypython/rules.mk | 9 - keyboards/whitefox/keymaps/default/keymap.c | 6 +- keyboards/whitefox/keymaps/kim-kim/keymap.c | 2 - .../whitefox/keymaps/konstantin/keymap.c | 120 +- .../whitefox/keymaps/konstantin/rules.mk | 9 + keyboards/whitefox/rules.mk | 1 + keyboards/wilba_tech/wt60_a/config.h | 2 +- .../wilba_tech/wt60_a/keymaps/via/keymap.c | 38 + .../wilba_tech/wt60_a/keymaps/via/rules.mk | 71 + keyboards/wilba_tech/wt60_a/readme.md | 2 +- keyboards/wilba_tech/wt60_a/rules.mk | 3 - keyboards/wilba_tech/wt65_a/config.h | 2 +- .../wilba_tech/wt65_a/keymaps/via/keymap.c | 37 + .../wilba_tech/wt65_a/keymaps/via/rules.mk | 71 + keyboards/wilba_tech/wt65_a/readme.md | 4 +- keyboards/wilba_tech/wt65_a/rules.mk | 3 - keyboards/wilba_tech/wt69_a/config.h | 203 ++ keyboards/wilba_tech/wt69_a/info.json | 13 + .../wt69_a/keymaps/default/keymap.c | 36 + .../wilba_tech/wt69_a/keymaps/via/keymap.c | 36 + .../wilba_tech/wt69_a/keymaps/via/rules.mk | 68 + keyboards/wilba_tech/wt69_a/readme.md | 15 + keyboards/wilba_tech/wt69_a/rules.mk | 65 + keyboards/wilba_tech/wt69_a/wt69_a.c | 17 + keyboards/wilba_tech/wt69_a/wt69_a.h | 36 + keyboards/wilba_tech/wt75_a/config.h | 202 ++ keyboards/wilba_tech/wt75_a/info.json | 13 + .../wt75_a/keymaps/default/keymap.c | 41 + .../wilba_tech/wt75_a/keymaps/via/keymap.c | 41 + .../wilba_tech/wt75_a/keymaps/via/rules.mk | 71 + keyboards/wilba_tech/wt75_a/readme.md | 15 + keyboards/wilba_tech/wt75_a/rules.mk | 68 + keyboards/wilba_tech/wt75_a/wt75_a.c | 17 + keyboards/wilba_tech/wt75_a/wt75_a.h | 43 + keyboards/wilba_tech/wt80_a/config.h | 2 +- .../wilba_tech/wt80_a/keymaps/via/keymap.c | 38 + .../wilba_tech/wt80_a/keymaps/via/rules.mk | 71 + keyboards/wilba_tech/wt80_a/rules.mk | 3 - keyboards/wilba_tech/wt8_a/config.h | 2 +- .../wilba_tech/wt8_a/keymaps/rys/keymap.c | 84 + .../wilba_tech/wt8_a/keymaps/rys/rules.mk | 9 + .../wilba_tech/wt8_a/keymaps/via/keymap.c | 16 + .../wilba_tech/wt8_a/keymaps/via/rules.mk | 68 + keyboards/wilba_tech/wt8_a/rules.mk | 3 - keyboards/{ => winkeyless}/bface/README.md | 4 +- .../bface/backlight_ps2avrGB.c | 0 .../bface/backlight_ps2avrGB.h | 0 keyboards/{ => winkeyless}/bface/bface.c | 0 keyboards/{ => winkeyless}/bface/bface.h | 0 keyboards/{ => winkeyless}/bface/config.h | 0 keyboards/{ => winkeyless}/bface/i2c.c | 0 keyboards/{ => winkeyless}/bface/i2c.h | 0 keyboards/{ => winkeyless}/bface/info.json | 0 .../bface/keymaps/default/keymap.c | 0 .../bface/keymaps/kpeatt/keymap.c | 0 .../bface/keymaps/kpeatt/readme.md | 0 keyboards/{ => winkeyless}/bface/matrix.c | 0 keyboards/{ => winkeyless}/bface/rules.mk | 3 +- keyboards/{ => winkeyless}/bface/usbconfig.h | 0 keyboards/{ => winkeyless}/bmini/bmini.c | 0 keyboards/{ => winkeyless}/bmini/bmini.h | 0 keyboards/{ => winkeyless}/bmini/config.h | 0 keyboards/{ => winkeyless}/bmini/i2c.c | 0 keyboards/{ => winkeyless}/bmini/i2c.h | 0 keyboards/{ => winkeyless}/bmini/info.json | 0 .../bmini/keymaps/default/keymap.c | 0 keyboards/{ => winkeyless}/bmini/matrix.c | 0 keyboards/winkeyless/bmini/readme.md | 43 + keyboards/{ => winkeyless}/bmini/rules.mk | 0 keyboards/{ => winkeyless}/bmini/usbconfig.h | 0 .../{ => winkeyless}/bminiex/backlight.c | 0 .../bminiex/backlight_custom.h | 0 keyboards/{ => winkeyless}/bminiex/bminiex.c | 0 keyboards/{ => winkeyless}/bminiex/bminiex.h | 0 .../bminiex/breathing_custom.h | 0 keyboards/{ => winkeyless}/bminiex/config.h | 0 keyboards/{ => winkeyless}/bminiex/i2c.c | 0 keyboards/{ => winkeyless}/bminiex/i2c.h | 0 keyboards/{ => winkeyless}/bminiex/info.json | 0 .../bminiex/keymaps/ansi/keymap.c | 0 .../bminiex/keymaps/ansi/readme.md | 0 .../bminiex/keymaps/default/keymap.c | 0 .../bminiex/keymaps/iso/keymap.c | 0 .../bminiex/keymaps/iso/readme.md | 0 keyboards/{ => winkeyless}/bminiex/matrix.c | 0 keyboards/{ => winkeyless}/bminiex/readme.md | 7 +- keyboards/{ => winkeyless}/bminiex/rules.mk | 0 .../{ => winkeyless}/bminiex/usbconfig.h | 0 keyboards/winkeyless/readme.md | 7 + keyboards/xd60/keymaps/default/keymap.c | 10 +- keyboards/xd60/keymaps/iso/keymap.c | 9 +- keyboards/xd60/keymaps/krusli/keymap.c | 2 - keyboards/xd60/keymaps/rooski/keymap.c | 5 +- keyboards/xd60/keymaps/styr/keymap.c | 56 + keyboards/xd60/keymaps/styr/readme.md | 7 + keyboards/xd60/readme.md | 13 +- keyboards/xd60/{ => rev2}/config.h | 0 keyboards/xd60/{ => rev2}/rules.mk | 0 keyboards/xd60/rev3/config.h | 71 + keyboards/xd60/rev3/rules.mk | 67 + keyboards/xd75/config.h | 2 +- keyboards/xd75/keymaps/adi/config.h | 7 +- keyboards/xd75/keymaps/adi/keymap.c | 4 +- keyboards/xd75/keymaps/adi/rules.mk | 1 + keyboards/xd75/keymaps/atomic_style/config.h | 7 +- keyboards/xd75/keymaps/atomic_style/keymap.c | 4 +- keyboards/xd75/keymaps/bbaserdem/config.h | 7 +- keyboards/xd75/keymaps/bbaserdem/keymap.c | 2 +- keyboards/xd75/keymaps/billypython/config.h | 3 - keyboards/xd75/keymaps/bramver/keymap.c | 4 - .../keymaps/bramver/{README.md => readme.md} | 0 .../xd75/keymaps/c4software_bepo/config.h | 2 +- .../c4software_bepo/{README.md => readme.md} | 0 keyboards/xd75/keymaps/cbbrowne/config.h | 14 +- keyboards/xd75/keymaps/cbbrowne/keymap.c | 145 +- keyboards/xd75/keymaps/cbbrowne/rules.mk | 20 + keyboards/xd75/keymaps/colinta/config.h | 7 +- keyboards/xd75/keymaps/colinta/keymap.c | 10 +- keyboards/xd75/keymaps/davidrambo/config.h | 7 +- keyboards/xd75/keymaps/davidrambo/keymap.c | 118 +- keyboards/xd75/keymaps/davidrambo/readme.md | 11 +- keyboards/xd75/keymaps/default/config.h | 7 +- keyboards/xd75/keymaps/default/keymap.c | 86 +- .../xd75/keymaps/developper_bepo/config.h | 2 +- .../developper_bepo/{README.md => readme.md} | 0 .../xd75/keymaps/dyn_macro_tap_dance/config.h | 7 +- .../xd75/keymaps/dyn_macro_tap_dance/keymap.c | 2 +- keyboards/xd75/keymaps/emilyh/config.h | 7 +- keyboards/xd75/keymaps/emilyh/keymap.c | 4 +- keyboards/xd75/keymaps/fabian/config.h | 7 +- keyboards/xd75/keymaps/fabian/keymap.c | 3 - keyboards/xd75/keymaps/french/config.h | 7 +- keyboards/xd75/keymaps/french/keymap.c | 2 +- .../keymaps/french/{README.md => readme.md} | 0 keyboards/xd75/keymaps/germanized/config.h | 6 +- keyboards/xd75/keymaps/germanized/keymap.c | 2 +- keyboards/xd75/keymaps/kim-kim-xd73/config.h | 7 +- keyboards/xd75/keymaps/kim-kim-xd73/keymap.c | 2 - keyboards/xd75/keymaps/kim-kim/config.h | 7 +- keyboards/xd75/keymaps/kim-kim/keymap.c | 2 - keyboards/xd75/keymaps/kloki/config.h | 7 +- keyboards/xd75/keymaps/kloki/keymap.c | 2 +- keyboards/xd75/keymaps/markus/config.h | 46 +- keyboards/xd75/keymaps/markus/keymap.c | 129 +- keyboards/xd75/keymaps/markus/readme.md | 8 +- keyboards/xd75/keymaps/markus/rules.mk | 36 +- keyboards/xd75/keymaps/msiu/config.h | 18 + keyboards/xd75/keymaps/msiu/keymap.c | 120 + keyboards/xd75/keymaps/msiu/readme.md | 1 + keyboards/xd75/keymaps/mtdjr/config.h | 7 +- keyboards/xd75/keymaps/mtdjr/keymap.c | 6 +- keyboards/xd75/keymaps/tdl-jturner/config.h | 7 +- keyboards/xd75/keymaps/tdl-jturner/keymap.c | 2 +- keyboards/xd75/readme.md | 51 +- keyboards/xd75/xd75.h | 11 +- keyboards/xd84/config.h | 243 ++ keyboards/xd84/custom_matrix_helper.c | 112 + keyboards/xd84/dev.md | 136 + keyboards/xd84/info.json | 18 + keyboards/xd84/keymaps/default/keymap.c | 38 + keyboards/xd84/keymaps/default_iso/keymap.c | 38 + keyboards/xd84/matrix.c | 94 + keyboards/xd84/pca9555.c | 63 + keyboards/xd84/pca9555.h | 55 + keyboards/xd84/readme.md | 23 + keyboards/xd84/rules.mk | 88 + keyboards/xd84/xd84.c | 32 + keyboards/xd84/xd84.h | 59 + keyboards/xd87/config.h | 2 +- keyboards/xd87/info.json | 2 +- keyboards/xd96/config.h | 244 ++ keyboards/xd96/custom_matrix_helper.c | 127 + keyboards/xd96/info.json | 17 + keyboards/xd96/keymaps/default/keymap.c | 38 + keyboards/xd96/keymaps/default_iso/keymap.c | 38 + keyboards/xd96/matrix.c | 96 + keyboards/xd96/pca9555.c | 78 + keyboards/xd96/pca9555.h | 55 + keyboards/xd96/readme.md | 22 + keyboards/xd96/rules.mk | 86 + keyboards/xd96/xd96.c | 34 + keyboards/xd96/xd96.h | 59 + keyboards/yd60mq/config.h | 47 + keyboards/yd60mq/keymaps/default/keymap.c | 25 + keyboards/yd60mq/keymaps/krusli/keymap.c | 19 + keyboards/yd60mq/readme.md | 20 + keyboards/yd60mq/rules.mk | 61 + keyboards/yd60mq/yd60mq.c | 13 + keyboards/yd60mq/yd60mq.h | 18 + keyboards/yd68/config.h | 2 +- keyboards/ymd75/README.md | 2 +- keyboards/ymd75/program | 74 - keyboards/ymd75/rules.mk | 2 +- keyboards/ymd96/info.json | 19 + keyboards/ymd96/keymaps/default/keymap.c | 14 +- keyboards/ymd96/keymaps/epx/keymap.c | 2 +- keyboards/ymd96/keymaps/hgoel89/keymap.c | 6 +- keyboards/ymd96/program | 74 - keyboards/ymd96/tools/README.md | 16 - keyboards/ymd96/tools/usb_detach.c | 33 - keyboards/ymd96/ymd96.h | 10 +- keyboards/yosino58/config.h | 34 + keyboards/{orthodox => yosino58}/i2c.c | 2 +- keyboards/{orthodox => yosino58}/i2c.h | 10 +- keyboards/yosino58/info.json | 20 + keyboards/yosino58/keymaps/default/config.h | 43 + keyboards/yosino58/keymaps/default/keymap.c | 337 ++ keyboards/yosino58/keymaps/default/rules.mk | 30 + keyboards/yosino58/keymaps/sakura/config.h | 50 + keyboards/yosino58/keymaps/sakura/keymap.c | 337 ++ keyboards/yosino58/keymaps/sakura/rules.mk | 30 + keyboards/yosino58/lib/glcdfont.c | 275 ++ keyboards/yosino58/lib/glcdfont_.c | 243 ++ .../yosino58/lib/host_led_state_reader.c | 15 + keyboards/yosino58/lib/keylogger.c | 45 + keyboards/yosino58/lib/layer_state_reader.c | 35 + keyboards/yosino58/lib/logo_reader.c | 11 + keyboards/yosino58/lib/mode_icon_reader.c | 15 + keyboards/yosino58/lib/rgb_state_reader.c | 15 + keyboards/yosino58/lib/timelogger.c | 16 + keyboards/yosino58/pro_micro.h | 358 ++ keyboards/yosino58/readme.md | 16 + keyboards/yosino58/rev1/config.h | 72 + keyboards/{sol => yosino58}/rev1/matrix.c | 125 +- keyboards/yosino58/rev1/rev1.c | 8 + keyboards/yosino58/rev1/rev1.h | 40 + keyboards/yosino58/rev1/rules.mk | 3 + keyboards/yosino58/rev1/serial_config.h | 4 + .../yosino58/rev1/serial_config_simpleapi.h | 5 + keyboards/yosino58/rev1/split_scomm.c | 91 + keyboards/yosino58/rev1/split_scomm.h | 24 + keyboards/{zen => yosino58/rev1}/split_util.c | 28 +- keyboards/{zen => yosino58/rev1}/split_util.h | 1 - keyboards/yosino58/rules.mk | 76 + keyboards/yosino58/serial.c | 590 ++++ keyboards/yosino58/serial.h | 84 + keyboards/yosino58/ssd1306.c | 348 ++ keyboards/yosino58/ssd1306.h | 96 + keyboards/yosino58/yosino58.c | 10 + keyboards/yosino58/yosino58.h | 5 + keyboards/z150_blackheart/info.json | 191 ++ .../z150_blackheart/keymaps/default/keymap.c | 83 +- .../keymaps/default_tkl/keymap.c | 48 + keyboards/z150_blackheart/readme.md | 2 +- keyboards/z150_blackheart/z150_blackheart.c | 31 + keyboards/z150_blackheart/z150_blackheart.h | 45 +- keyboards/zeal60/config.h | 15 + keyboards/zeal60/keymaps/tusing/keymap.c | 1 - keyboards/zeal60/rgb_backlight.c | 2968 +++++++++-------- keyboards/zeal60/zeal60_api.h | 3 +- keyboards/zeal60/zeal60_keycodes.h | 19 + keyboards/zeal65/config.h | 15 + keyboards/zen/readme.md | 20 - keyboards/zen/serial.c | 228 -- keyboards/zen/serial.h | 26 - keyboards/zen/split_rgb.c | 41 - keyboards/zen/split_rgb.h | 6 - .../60_ansi/mechmerlin-ansi/keymap.c | 10 +- .../community/60_ansi/stanrc85-ansi/config.h | 4 - .../community/60_ansi/stanrc85-ansi/keymap.c | 83 +- .../community/60_ansi/stanrc85-ansi/readme.md | 50 +- .../community/60_ansi/stanrc85-ansi/rules.mk | 11 +- .../mechmerlin-split/keymap.c | 10 +- layouts/community/66_ansi/mechmerlin/config.h | 11 - layouts/community/66_ansi/mechmerlin/keymap.c | 14 +- .../75_ansi/mechmerlin-75_ansi/keymap.c | 16 +- .../75_ansi/mechmerlin-75_ansi/readme.md | 3 +- layouts/community/ergodox/333fred/keymap.c | 4 - layouts/community/ergodox/absenth/keymap.c | 6 +- layouts/community/ergodox/adam/keymap.c | 3 - layouts/community/ergodox/adnw_k_o_y/keymap.c | 6 +- layouts/community/ergodox/alexjj/keymap.c | 13 +- layouts/community/ergodox/andrew_osx/keymap.c | 8 +- layouts/community/ergodox/belak/keymap.c | 1 - layouts/community/ergodox/bepo_alt/keymap.c | 127 + layouts/community/ergodox/bepo_alt/readme.md | 66 + .../{erez_experimental => bepo_alt}/rules.mk | 1 - layouts/community/ergodox/bryan/keymap.c | 6 +- .../community/ergodox/coderkun_neo2/keymap.c | 2 - layouts/community/ergodox/colemak/keymap.c | 6 +- .../ergodox/common_nighthawk/keymap.c | 4 - layouts/community/ergodox/csharp_dev/keymap.c | 4 - layouts/community/ergodox/dragon788/keymap.c | 8 +- layouts/community/ergodox/drashna/config.h | 13 +- layouts/community/ergodox/drashna/keymap.c | 320 +- layouts/community/ergodox/drashna/rules.mk | 26 +- .../community/ergodox/drashna_glow/README.md | 1 - .../community/ergodox/drashna_glow/config.h | 23 +- .../community/ergodox/drashna_glow/keymap.c | 65 - .../community/ergodox/drashna_glow/rules.mk | 10 +- layouts/community/ergodox/dvorak/keymap.c | 6 +- .../community/ergodox/dvorak_emacs/keymap.c | 5 - .../ergodox/dvorak_emacs_software/keymap.c | 5 - .../ergodox/dvorak_intl_squisher/keymap.c | 6 +- .../community/ergodox/dvorak_plover/keymap.c | 4 - .../ergodox/dvorak_programmer_swe/keymap.c | 35 +- .../ergodox/dvorak_programmer_swe/readme.md | 31 +- .../community/ergodox/dvorak_spanish/keymap.c | 6 +- .../ergodox/dvorak_spanish/readme.md | 1 - .../ergodox/dvorak_svorak_a5/keymap.c | 5 - .../community/ergodox/emacs_osx_dk/keymap.c | 4 - .../ergodox/erez_experimental/config.h | 13 - .../ergodox/erez_experimental/keymap.c | 217 -- .../ergodox/erez_experimental/readme.md | 55 - layouts/community/ergodox/familiar/README.md | 69 - layouts/community/ergodox/familiar/keymap.c | 285 -- .../community/ergodox/french_hacker/keymap.c | 4 - layouts/community/ergodox/galson/keymap.c | 4 - .../community/ergodox/german-kinergo/keymap.c | 6 +- .../community/ergodox/german-lukas/keymap.c | 4 - layouts/community/ergodox/german/keymap.c | 6 +- layouts/community/ergodox/haegin/keymap.c | 6 - layouts/community/ergodox/italian/keymap.c | 4 - layouts/community/ergodox/j3rn/keymap.c | 5 - .../community/ergodox/jackhumbert/keymap.c | 4 - layouts/community/ergodox/jacobono/keymap.c | 6 +- layouts/community/ergodox/jafo/keymap.c | 6 +- layouts/community/ergodox/jgarr/keymap.c | 6 +- layouts/community/ergodox/josh/keymap.c | 4 - layouts/community/ergodox/kines-ish/keymap.c | 4 - layouts/community/ergodox/kristian/keymap.c | 4 - layouts/community/ergodox/maz/keymap.c | 4 - .../community/ergodox/mclennon_osx/keymap.c | 4 - .../community/ergodox/meagerfindings/keymap.c | 1 - layouts/community/ergodox/msc/keymap.c | 4 - layouts/community/ergodox/naps62/keymap.c | 4 - layouts/community/ergodox/nstickney/keymap.c | 213 ++ .../ergodox/{familiar => nstickney}/rules.mk | 0 layouts/community/ergodox/osx_de/readme.md | 3 +- .../ergodox/osx_de_experimental/readme.md | 1 - layouts/community/ergodox/osx_fr/keymap.c | 6 +- .../ergodox/osx_kinesis_pnut/keymap.c | 6 +- layouts/community/ergodox/osx_neo2/keymap.c | 694 ++++ layouts/community/ergodox/osx_neo2/layers.h | 9 + layouts/community/ergodox/osx_neo2/readme.md | 219 ++ .../community/ergodox/osx_neo2/visualizer.c | 47 + layouts/community/ergodox/phoenix/keymap.c | 6 +- layouts/community/ergodox/plover/keymap.c | 6 +- layouts/community/ergodox/pvinis/Changelog.md | 7 - layouts/community/ergodox/pvinis/keymap.c | 475 --- layouts/community/ergodox/pvinis/rules.mk | 7 - .../ergodox/qwerty_code_friendly/keymap.c | 12 +- .../ergodox/qwerty_code_friendly/readme.md | 3 +- .../keymap.c | 10 +- .../romanzolotarev-norman-plover-osx/keymap.c | 10 +- layouts/community/ergodox/siroken3/keymap.c | 6 +- layouts/community/ergodox/sneako/keymap.c | 6 +- .../community/ergodox/swedish-lindhe/keymap.c | 4 - layouts/community/ergodox/swedish/keymap.c | 6 +- .../community/ergodox/swissgerman/keymap.c | 6 +- layouts/community/ergodox/techtomas/keymap.c | 8 +- .../community/ergodox/teckinesis/readme.md | 2 +- .../community/ergodox/tkuichooseyou/keymap.c | 6 +- layouts/community/ergodox/tm2030/readme.md | 2 +- .../community/ergodox/tonyabra_osx/keymap.c | 4 - .../twentylives_dvorak_with_hebrew/keymap.c | 4 - layouts/community/ergodox/twey/keymap.c | 4 - .../ergodox/workman_osx_mdw/keymap.c | 1 - layouts/community/ergodox/xyverz/keymap.c | 5 - .../ergodox/zweihander-macos/keymap.c | 4 - .../community/numpad_5x6/bjohnson/config.h | 25 + .../community/numpad_5x6/bjohnson/keymap.c | 51 + .../community/numpad_5x6/bjohnson/rules.mk | 5 + layouts/community/numpad_5x6/drashna/config.h | 19 + layouts/community/numpad_5x6/drashna/keymap.c | 22 + layouts/community/numpad_5x6/drashna/rules.mk | 10 + layouts/community/numpad_5x6/layout.json | 6 + layouts/community/numpad_5x6/readme.md | 3 + layouts/community/ortho_3x10/wanleg/config.h | 19 +- layouts/community/ortho_3x10/wanleg/keymap.c | 5 + layouts/community/ortho_3x10/wanleg/readme.md | 8 +- layouts/community/ortho_3x10/wanleg/rules.mk | 2 - .../community/ortho_4x12/bakingpy/config.h | 1 + .../community/ortho_4x12/bakingpy/keymap.c | 1 - .../community/ortho_4x12/bakingpy/rules.mk | 7 +- .../community/ortho_4x12/buswerks/keymap.c | 4 +- .../ortho_4x12/colemak_mod_dh_wide/keymap.c | 4 - layouts/community/ortho_4x12/crs/keymap.c | 4 - layouts/community/ortho_4x12/drashna/config.h | 55 +- layouts/community/ortho_4x12/drashna/keymap.c | 415 ++- layouts/community/ortho_4x12/drashna/rules.mk | 23 +- .../community/ortho_4x12/ergodoxish/keymap.c | 6 +- .../ortho_4x12/grahampheath/keymap.c | 4 - layouts/community/ortho_4x12/jotix/config.h | 1 + layouts/community/ortho_4x12/jotix/keymap.c | 204 ++ layouts/community/ortho_4x12/jotix/readme.md | 8 + layouts/community/ortho_4x12/jotix/rules.mk | 1 + .../community/ortho_4x12/mindsound/config.h | 5 +- .../community/ortho_4x12/mindsound/keymap.c | 4 - layouts/community/ortho_4x12/rs/config.h | 1 + layouts/community/ortho_4x12/rs/keymap.c | 52 + layouts/community/ortho_4x12/rs/readme.md | 1 + .../community/ortho_4x12/symbolic/README.md | 23 +- .../community/ortho_4x12/symbolic/config.h | 3 +- .../community/ortho_4x12/symbolic/keymap.c | 142 +- layouts/community/ortho_4x12/wanleg/config.h | 7 + layouts/community/ortho_4x12/wanleg/keymap.c | 17 +- layouts/community/ortho_4x12/wanleg/rules.mk | 5 + layouts/community/ortho_4x12/xyverz/config.h | 2 +- layouts/community/ortho_4x12/xyverz/keymap.c | 4 - layouts/community/ortho_4x4/jotix/keymap.c | 41 + layouts/community/ortho_4x4/jotix/readme.md | 6 + layouts/community/ortho_5x12/drashna/config.h | 25 +- layouts/community/ortho_5x12/rs/config.h | 34 - .../community/ortho_5x12/rs/karabiner.json | 154 - layouts/community/ortho_5x12/rs/keymap.c | 50 +- layouts/community/ortho_5x12/rs/readme.md | 18 +- layouts/community/ortho_5x12/xyverz/config.h | 2 + layouts/community/ortho_5x12/xyverz/keymap.c | 4 - layouts/community/ortho_5x15/wanleg/keymap.c | 40 +- .../default/75_iso/default_75_iso/keymap.c | 13 + layouts/default/75_iso/layout.json | 6 + layouts/default/75_iso/readme.md | 3 + .../numpad_5x4/default_numpad_5x4/keymap.c | 3 - .../numpad_5x6/default_numpad_5x6/keymap.c | 18 + layouts/default/numpad_5x6/layout.json | 6 + layouts/default/numpad_5x6/readme.md | 3 + .../ortho_5x4/default_ortho_5x4/keymap.c | 3 - lib/lib8tion/LICENSE | 20 + lib/lib8tion/lib8tion.c | 242 ++ lib/lib8tion/lib8tion.h | 934 ++++++ lib/lib8tion/math8.h | 552 +++ lib/lib8tion/random8.h | 94 + lib/lib8tion/scale8.h | 542 +++ lib/lib8tion/trig8.h | 284 ++ message.mk | 5 + quantum/api.c | 2 +- quantum/audio/audio.c | 2 +- quantum/audio/audio_arm.c | 618 ++-- quantum/audio/audio_pwm.c | 2 +- quantum/audio/musical_notes.h | 4 + quantum/audio/song_list.h | 293 +- quantum/color.c | 15 +- quantum/config_common.h | 5 + quantum/debounce.c | 52 - quantum/debounce.h | 2 +- quantum/debounce/eager_pk.c | 108 + quantum/debounce/eager_pr.c | 95 + quantum/debounce/readme.md | 28 + quantum/debounce/sym_g.c | 57 + quantum/dynamic_keymap.c | 18 +- quantum/encoder.c | 33 +- quantum/encoder.h | 8 +- quantum/keymap_common.c | 22 - quantum/keymap_extras/keymap_norman.h | 54 + quantum/keymap_extras/sendstring_norman.h | 39 + quantum/keymap_extras/sendstring_uk.h | 62 + quantum/led_matrix.c | 391 +++ quantum/led_matrix_drivers.c | 149 + quantum/led_tables.c | 48 +- quantum/ledmatrix.h | 129 + quantum/matrix.c | 220 +- quantum/mcu_selection.mk | 1 + quantum/process_keycode/process_clicky.c | 37 +- quantum/process_keycode/process_combo.c | 239 +- quantum/process_keycode/process_combo.h | 33 +- quantum/process_keycode/process_space_cadet.c | 153 + quantum/process_keycode/process_space_cadet.h | 21 + quantum/process_keycode/process_steno.c | 46 +- quantum/process_keycode/process_unicode.c | 6 +- quantum/process_keycode/process_unicode.h | 2 +- .../process_keycode/process_unicode_common.c | 41 +- .../process_keycode/process_unicode_common.h | 13 +- quantum/process_keycode/process_unicodemap.c | 39 +- quantum/process_keycode/process_unicodemap.h | 6 +- quantum/quantum.c | 576 ++-- quantum/quantum.h | 37 +- quantum/quantum_keycodes.h | 34 +- quantum/rgb_matrix.c | 1140 ++----- quantum/rgb_matrix.h | 150 +- .../rgb_matrix_animations/alpha_mods_anim.h | 26 + .../rgb_matrix_animations/breathing_anim.h | 20 + .../colorband_pinwheel_sat_anim.h | 14 + .../colorband_pinwheel_val_anim.h | 14 + .../colorband_sat_anim.h | 15 + .../colorband_spiral_sat_anim.h | 14 + .../colorband_spiral_val_anim.h | 14 + .../colorband_val_anim.h | 15 + .../rgb_matrix_animations/cycle_all_anim.h | 15 + .../cycle_left_right_anim.h | 14 + .../rgb_matrix_animations/cycle_out_in_anim.h | 14 + .../cycle_out_in_dual_anim.h | 16 + .../cycle_pinwheel_anim.h | 14 + .../rgb_matrix_animations/cycle_spiral_anim.h | 14 + .../cycle_up_down_anim.h | 14 + .../rgb_matrix_animations/digital_rain_anim.h | 77 + .../rgb_matrix_animations/dual_beacon_anim.h | 14 + .../gradient_up_down_anim.h | 22 + .../jellybean_raindrops_anim.h | 29 + .../rainbow_beacon_anim.h | 14 + .../rainbow_moving_chevron_anim.h | 14 + .../rainbow_pinwheels_anim.h | 14 + .../rgb_matrix_animations/raindrops_anim.h | 39 + .../rgb_matrix_effects.inc | 33 + .../rgb_matrix_animations/solid_color_anim.h | 16 + .../solid_reactive_anim.h | 16 + .../solid_reactive_cross.h | 40 + .../solid_reactive_nexus.h | 40 + .../solid_reactive_simple_anim.h | 16 + .../solid_reactive_wide.h | 35 + .../rgb_matrix_animations/solid_splash_anim.h | 35 + quantum/rgb_matrix_animations/splash_anim.h | 36 + .../typing_heatmap_anim.h | 74 + quantum/rgb_matrix_drivers.c | 53 +- .../rgb_matrix_runners/effect_runner_dx_dy.h | 19 + .../effect_runner_dx_dy_dist.h | 20 + quantum/rgb_matrix_runners/effect_runner_i.h | 17 + .../effect_runner_reactive.h | 31 + .../effect_runner_reactive_splash.h | 30 + .../effect_runner_sin_cos_i.h | 19 + quantum/rgb_matrix_types.h | 93 + quantum/rgblight.c | 750 +++-- quantum/rgblight.h | 240 +- quantum/rgblight_breathe_table.h | 116 + quantum/rgblight_list.h | 240 +- quantum/rgblight_modes.h | 67 + quantum/rgblight_post_config.h | 5 + quantum/split_common/i2c.c | 184 - quantum/split_common/i2c.h | 59 - quantum/split_common/matrix.c | 14 +- quantum/split_common/post_config.h | 15 + quantum/split_common/split_util.c | 37 +- quantum/split_common/transport.c | 319 +- quantum/stm32/halconf.h | 2 +- quantum/stm32/mcuconf.h | 2 +- quantum/stm32/proton_c.mk | 1 + quantum/template/avr/config.h | 25 +- quantum/template/avr/readme.md | 2 +- quantum/template/avr/template.c | 32 +- .../template/base/keymaps/default/config.h | 2 +- .../template/base/keymaps/default/keymap.c | 2 +- quantum/template/base/template.h | 2 +- quantum/template/ps2avrgb/config.h | 15 +- quantum/template/ps2avrgb/i2c.c | 106 - quantum/template/ps2avrgb/i2c.h | 27 - quantum/template/ps2avrgb/matrix.c | 112 - quantum/template/ps2avrgb/readme.md | 12 +- quantum/template/ps2avrgb/rules.mk | 8 +- quantum/template/ps2avrgb/template.c | 79 +- quantum/template/ps2avrgb/usbconfig.h | 5 +- quantum/velocikey.c | 46 + quantum/velocikey.h | 13 + quantum/visualizer/readme.md | 2 +- readme.md | 8 +- show_options.mk | 137 + tmk_core/arm_atsam.mk | 2 +- tmk_core/avr.mk | 34 +- tmk_core/chibios.mk | 13 +- tmk_core/common.mk | 12 + tmk_core/common/action.c | 20 +- tmk_core/common/action_layer.c | 36 +- tmk_core/common/action_layer.h | 38 +- tmk_core/common/action_tapping.c | 20 +- tmk_core/common/action_tapping.h | 2 + tmk_core/common/arm_atsam/suspend.c | 9 +- tmk_core/common/avr/bootloader.c | 2 +- tmk_core/common/avr/suspend.c | 37 +- tmk_core/common/bootmagic.c | 4 +- tmk_core/common/chibios/eeprom_stm32.h | 6 +- tmk_core/common/chibios/flash_stm32.c | 5 +- tmk_core/common/chibios/suspend.c | 2 +- tmk_core/common/command.c | 31 +- tmk_core/common/command.h | 34 +- tmk_core/common/eeconfig.c | 11 + tmk_core/common/eeconfig.h | 8 + tmk_core/common/keyboard.c | 79 +- tmk_core/common/keyboard.h | 5 + tmk_core/common/magic.c | 2 +- tmk_core/common/mousekey.c | 379 ++- tmk_core/common/mousekey.h | 68 +- tmk_core/make_dfu_header.sh | 16 + tmk_core/protocol/arm_atsam.mk | 5 +- .../protocol/arm_atsam/arm_atsam_protocol.h | 3 + tmk_core/protocol/arm_atsam/i2c_master.c | 8 +- tmk_core/protocol/arm_atsam/led_matrix.c | 552 ++- tmk_core/protocol/arm_atsam/led_matrix.h | 84 +- .../protocol/arm_atsam/led_matrix_programs.c | 5 +- tmk_core/protocol/arm_atsam/main_arm_atsam.c | 16 +- tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c | 4 +- tmk_core/protocol/arm_atsam/usb/usb2422.c | 6 +- tmk_core/protocol/bluefruit/main.c | 15 +- tmk_core/protocol/chibios/main.c | 2 + tmk_core/protocol/lufa/adafruit_ble.cpp | 3 +- tmk_core/protocol/vusb/main.c | 1 + tmk_core/protocol/vusb/usbdrv/usbdrv.c | 2 +- tmk_core/rules.mk | 27 +- users/333fred/333fred.c | 37 +- users/333fred/333fred.h | 7 +- users/arkag/arkag.c | 286 +- users/arkag/arkag.h | 35 +- users/arkag/config.h | 2 +- users/bbaserdem/bbaserdem.h | 2 - users/bcat/config.h | 31 + users/bcat/rules.mk | 11 + users/billypython/billypython.c | 32 + users/billypython/billypython.h | 34 + users/billypython/config.h | 17 + users/billypython/rules.mk | 6 + users/billypython/tap_dance.c | 33 + users/billypython/tap_dance.h | 9 + users/bocaj/process_records.h | 2 - users/cbbrowne/cbbrowne.c | 0 users/cbbrowne/cbbrowne.h | 39 + users/cbbrowne/rules.mk | 1 + users/drashna/.gitignore | 3 + users/drashna/.gitlab-ci.yml | 61 +- users/drashna/config.h | 69 +- users/drashna/drashna.c | 220 +- users/drashna/drashna.h | 80 +- users/drashna/process_records.c | 259 +- users/drashna/process_records.h | 74 +- users/drashna/rgb_stuff.c | 452 ++- users/drashna/rgb_stuff.h | 8 +- users/drashna/rgblight_breathe_table.h | 116 + users/drashna/rules.mk | 46 +- users/drashna/send_unicode.h | 104 +- users/drashna/tap_dances.c | 77 +- users/drashna/tap_dances.h | 15 +- users/drashna/template.c | 4 +- users/drashna/wrappers.h | 7 +- users/edvorakjp/edvorakjp.c | 6 - users/edvorakjp/edvorakjp.h | 26 +- users/edvorakjp/edvorakjp_process_record.c | 129 +- users/edvorakjp/edvorakjp_status.c | 13 +- users/edvorakjp/edvorakjp_tap_dance.c | 36 +- users/edvorakjp/readme.md | 54 +- users/gordon/gordon.h | 2 - users/ishtob/ishtob.h | 5 +- users/jarred/config.h | 1 + users/jarred/jarred.c | 69 +- users/jarred/jarred.h | 87 +- users/kageurufu/rules.mk | 2 +- users/konstantin/config.h | 5 +- users/konstantin/konstantin.c | 126 +- users/konstantin/konstantin.h | 73 +- users/konstantin/rgb.c | 24 + users/konstantin/rgb.h | 18 + users/konstantin/rules.mk | 21 +- users/konstantin/tap_dance.c | 170 +- users/konstantin/tap_dance.h | 20 +- users/konstantin/unicode.c | 7 + users/konstantin/unicode.h | 37 +- users/kuatsure/kuatsure.c | 140 +- users/kuatsure/kuatsure.h | 32 +- users/kuatsure/rules.mk | 1 + .../losinggeneration-common.h | 3 - users/mechmerlin/changelog.md | 12 + users/mechmerlin/config.h | 28 +- users/mechmerlin/readme.md | 10 +- users/mechmerlin/rules.mk | 2 +- users/mtdjr/mtdjr.h | 2 - users/not-quite-neo/nqn-common.h | 5 - users/pvinis/config.h | 10 + users/pvinis/pvinis.c | 89 + users/pvinis/pvinis.h | 152 + users/pvinis/rules.mk | 15 + users/replicaJunction/replicaJunction.h | 1 - users/romus/romus.h | 2 - .../iris/keymaps => users}/rs/karabiner.json | 0 users/rs/readme.md | 30 + users/rs/rs.c | 74 + users/rs/rs.h | 50 + users/rs/rules.mk | 1 + users/spacebarracecar/spacebarracecar.h | 2 + users/stanrc85/config.h | 9 + users/stanrc85/layer_rgb.c | 29 + users/stanrc85/readme.md | 52 + users/stanrc85/rules.mk | 16 + users/stanrc85/stanrc85.c | 93 + users/stanrc85/stanrc85.h | 54 + users/talljoe/talljoe.h | 3 - users/wanleg/config.h | 19 +- users/wanleg/readme.md | 133 +- users/wanleg/rules.mk | 6 + users/wanleg/wanleg.c | 41 +- users/wanleg/wanleg.h | 45 +- users/xulkal/config.h | 30 + users/xulkal/layouts.h | 119 + users/xulkal/process_records.c | 56 + users/xulkal/process_records.h | 59 + users/xulkal/rules.mk | 13 + users/xulkal/xulkal.c | 1 + users/xulkal/xulkal.h | 4 + users/zer09/zer09.h | 1 - util/atmega32a_program.py | 39 +- util/bootloader_atmega32a_1_0_0.hex | 154 + util/docker_build.sh | 5 +- util/freebsd_install.sh | 3 +- util/linux_install.sh | 14 +- util/macos_install.sh | 2 +- util/msys2_install.sh | 2 +- util/new_keyboard.sh | 159 + util/new_project.sh | 66 - util/rgblight_breathing_table_calc.c | 49 + util/travis_build.sh | 22 +- util/travis_compiled_push.sh | 23 +- util/travis_push.sh | 18 +- util/travis_test.sh | 22 + util/usb_detach/Makefile | 18 + .../README.md => util/usb_detach/readme.md | 12 +- .../tools => util/usb_detach}/usb_detach.c | 1 + 3827 files changed, 143541 insertions(+), 31553 deletions(-) create mode 100644 .clang-format create mode 100644 docs/feature_debounce_type.md create mode 100644 docs/feature_haptic_feedback.md create mode 100644 docs/feature_led_matrix.md create mode 100644 docs/feature_oled_driver.md create mode 100644 docs/feature_space_cadet.md delete mode 100644 docs/feature_space_cadet_shift.md delete mode 100644 docs/feature_space_cadet_shift_enter.md create mode 100644 docs/feature_velocikey.md rename docs/{eclipse.md => other_eclipse.md} (100%) create mode 100644 docs/other_vscode.md create mode 100644 docs/zh-cn/README.md create mode 100644 docs/zh-cn/_summary.md create mode 100644 docs/zh-cn/contributing.md create mode 100644 docs/zh-cn/faq.md create mode 100644 docs/zh-cn/faq_build.md create mode 100644 docs/zh-cn/faq_debug.md create mode 100644 docs/zh-cn/faq_keymap.md create mode 100644 docs/zh-cn/getting_started_getting_help.md create mode 100644 docs/zh-cn/getting_started_github.md create mode 100644 docs/zh-cn/getting_started_introduction.md create mode 100644 docs/zh-cn/newbs.md create mode 100644 docs/zh-cn/newbs_best_practices.md create mode 100644 docs/zh-cn/newbs_building_firmware.md create mode 100644 docs/zh-cn/newbs_flashing.md create mode 100644 docs/zh-cn/newbs_getting_started.md create mode 100644 docs/zh-cn/newbs_learn_more_resources.md create mode 100644 docs/zh-cn/newbs_testing_debugging.md create mode 100755 drivers/avr/apa102.c create mode 100755 drivers/avr/apa102.h create mode 100644 drivers/haptic/haptic.c create mode 100644 drivers/haptic/haptic.h create mode 100644 drivers/haptic/solenoid.c create mode 100644 drivers/haptic/solenoid.h create mode 100644 drivers/issi/is31fl3731-simple.c create mode 100644 drivers/issi/is31fl3731-simple.h create mode 100644 drivers/issi/is31fl3737.c create mode 100644 drivers/issi/is31fl3737.h create mode 100644 drivers/oled/glcdfont.c create mode 100644 drivers/oled/licenses.txt create mode 100644 drivers/oled/oled_driver.c create mode 100644 drivers/oled/oled_driver.h create mode 100644 keyboards/1upkeyboards/1up60hte/info.json create mode 100644 keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c create mode 100644 keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h create mode 100644 keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c create mode 100644 keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md create mode 100644 keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk create mode 100644 keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h rename keyboards/40percentclub/{mf68_ble/keymaps/default => mf68/keymaps/mf68_ble}/keymap.c (100%) rename keyboards/40percentclub/{ => mf68/keymaps}/mf68_ble/readme.md (86%) create mode 100644 keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk delete mode 100644 keyboards/40percentclub/mf68_ble/info.json delete mode 100644 keyboards/40percentclub/mf68_ble/mf68_ble.c delete mode 100644 keyboards/40percentclub/mf68_ble/mf68_ble.h delete mode 100644 keyboards/40percentclub/nano/matrix.c create mode 100644 keyboards/40percentclub/nein/config.h create mode 100644 keyboards/40percentclub/nein/info.json create mode 100644 keyboards/40percentclub/nein/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/nein/nein.c create mode 100644 keyboards/40percentclub/nein/nein.h create mode 100644 keyboards/40percentclub/nein/readme.md create mode 100644 keyboards/40percentclub/nein/rules.mk create mode 100644 keyboards/9key/keymaps/tap_dance/keymap.c rename keyboards/{tetris/keymaps/default => 9key/keymaps/tap_dance}/rules.mk (100%) create mode 100644 keyboards/abstract/ellipse/info.json create mode 100644 keyboards/abstract/ellipse/keymaps/abstractkb/config.h create mode 100644 keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c create mode 100644 keyboards/abstract/ellipse/keymaps/abstractkb/readme.md create mode 100644 keyboards/abstract/ellipse/keymaps/abstractkb/rules.mk create mode 100644 keyboards/abstract/ellipse/keymaps/default/config.h create mode 100644 keyboards/abstract/ellipse/keymaps/default/keymap.c create mode 100644 keyboards/abstract/ellipse/keymaps/default/readme.md rename keyboards/{9key => abstract/ellipse}/keymaps/default/rules.mk (100%) create mode 100644 keyboards/abstract/ellipse/readme.md create mode 100644 keyboards/abstract/ellipse/rev1/config.h create mode 100644 keyboards/abstract/ellipse/rev1/rev1.c create mode 100644 keyboards/abstract/ellipse/rev1/rev1.h create mode 100644 keyboards/abstract/ellipse/rev1/rules.mk create mode 100644 keyboards/adkb96/adkb96.c create mode 100644 keyboards/adkb96/adkb96.h rename keyboards/{sol => adkb96}/config.h (100%) create mode 100644 keyboards/adkb96/info.json rename keyboards/{bfo9000 => adkb96}/keymaps/default/config.h (90%) create mode 100644 keyboards/adkb96/keymaps/default/keymap.c create mode 100644 keyboards/adkb96/readme.md create mode 100644 keyboards/adkb96/rev1/config.h create mode 100644 keyboards/adkb96/rev1/rev1.c create mode 100644 keyboards/adkb96/rev1/rev1.h create mode 100644 keyboards/adkb96/rules.mk create mode 100644 keyboards/aeboards/aegis/aegis.c create mode 100644 keyboards/aeboards/aegis/aegis.h create mode 100644 keyboards/aeboards/aegis/config.h create mode 100644 keyboards/aeboards/aegis/keymaps/default/keymap.c create mode 100644 keyboards/aeboards/aegis/keymaps/default/readme.md create mode 100644 keyboards/aeboards/aegis/keymaps/via/keymap.c create mode 100644 keyboards/aeboards/aegis/keymaps/via/readme.md create mode 100644 keyboards/aeboards/aegis/keymaps/via/rules.mk create mode 100644 keyboards/aeboards/aegis/readme.md create mode 100644 keyboards/aeboards/aegis/rules.mk create mode 100644 keyboards/ai03/orbit/config.h create mode 100644 keyboards/ai03/orbit/info.json create mode 100644 keyboards/ai03/orbit/keymaps/default/keymap.c create mode 100644 keyboards/ai03/orbit/keymaps/default/readme.md create mode 100644 keyboards/ai03/orbit/matrix.c create mode 100644 keyboards/ai03/orbit/matrix.h create mode 100644 keyboards/ai03/orbit/orbit.c create mode 100644 keyboards/ai03/orbit/orbit.h create mode 100644 keyboards/ai03/orbit/readme.md create mode 100644 keyboards/ai03/orbit/rules.mk create mode 100644 keyboards/ai03/orbit/serial.c create mode 100644 keyboards/ai03/orbit/serial.h rename {quantum/split_common => keyboards/ai03/orbit}/split_flags.c (100%) rename {quantum/split_common => keyboards/ai03/orbit}/split_flags.h (100%) create mode 100644 keyboards/ai03/orbit/split_util.c create mode 100644 keyboards/ai03/orbit/split_util.h create mode 100644 keyboards/ai03/orbit/transport.c create mode 100644 keyboards/ai03/orbit/transport.h create mode 100644 keyboards/alf/x11/config.h create mode 100644 keyboards/alf/x11/info.json create mode 100644 keyboards/alf/x11/keymaps/default/config.h create mode 100644 keyboards/alf/x11/keymaps/default/keymap.c create mode 100644 keyboards/alf/x11/keymaps/default/readme.md create mode 100644 keyboards/alf/x11/readme.md create mode 100644 keyboards/alf/x11/rules.mk create mode 100644 keyboards/alf/x11/x11.c create mode 100644 keyboards/alf/x11/x11.h delete mode 100755 keyboards/alice/program create mode 100644 keyboards/ares/ares.c create mode 100644 keyboards/ares/ares.h create mode 100644 keyboards/ares/config.h create mode 100644 keyboards/ares/info.json create mode 100644 keyboards/ares/keymaps/default/keymap.c rename keyboards/{bmini => ares}/readme.md (81%) create mode 100644 keyboards/ares/rules.mk rename keyboards/{ps2avrGB => ares}/usbconfig.h (98%) create mode 100644 keyboards/atreus62/keymaps/jarred/config.h create mode 100644 keyboards/atreus62/keymaps/jarred/keymap.c delete mode 100755 keyboards/bface/program delete mode 100644 keyboards/bfo9000/serial.c delete mode 100644 keyboards/bfo9000/serial.h create mode 100644 keyboards/bm16a/bm16a.c create mode 100644 keyboards/bm16a/bm16a.h create mode 100644 keyboards/bm16a/config.h create mode 100644 keyboards/bm16a/info.json create mode 100644 keyboards/bm16a/keymaps/default/config.h create mode 100644 keyboards/bm16a/keymaps/default/keymap.c create mode 100644 keyboards/bm16a/keymaps/default/readme.md create mode 100644 keyboards/bm16a/readme.md create mode 100644 keyboards/bm16a/rules.mk create mode 100755 keyboards/bm16s/bm16s.h create mode 100755 keyboards/bm16s/config.h create mode 100644 keyboards/bm16s/info.json create mode 100755 keyboards/bm16s/keymaps/default/keymap.c create mode 100755 keyboards/bm16s/keymaps/media/keymap.c create mode 100644 keyboards/bm16s/readme.md create mode 100755 keyboards/bm16s/rules.mk create mode 100644 keyboards/boardwalk/boardwalk.h create mode 100644 keyboards/boardwalk/config.h create mode 100644 keyboards/boardwalk/info.json create mode 100644 keyboards/boardwalk/keymaps/brendanwr/config.h create mode 100644 keyboards/boardwalk/keymaps/brendanwr/keymap.c create mode 100644 keyboards/boardwalk/keymaps/default/config.h create mode 100644 keyboards/boardwalk/keymaps/default/keymap.c create mode 100644 keyboards/boardwalk/keymaps/default/readme.md create mode 100644 keyboards/boardwalk/keymaps/mcallaster/keymap.c create mode 100644 keyboards/boardwalk/keymaps/nchristus/config.h create mode 100644 keyboards/boardwalk/keymaps/nchristus/keymap.c create mode 100644 keyboards/boardwalk/keymaps/nchristus/readme.md create mode 100644 keyboards/boardwalk/keymaps/nchristus/rules.mk create mode 100644 keyboards/boardwalk/readme.md create mode 100644 keyboards/boardwalk/rules.mk create mode 100644 keyboards/boston_meetup/2019/2019.c create mode 100644 keyboards/boston_meetup/2019/2019.h create mode 100644 keyboards/boston_meetup/2019/config.h create mode 100644 keyboards/boston_meetup/2019/info.json create mode 100644 keyboards/boston_meetup/2019/keymaps/default/keymap.c create mode 100644 keyboards/boston_meetup/2019/keymaps/default/readme.md create mode 100644 keyboards/boston_meetup/2019/keymaps/readme.md create mode 100644 keyboards/boston_meetup/2019/readme.md create mode 100644 keyboards/boston_meetup/2019/rules.mk create mode 100644 keyboards/boston_meetup/boston_meetup.c create mode 100644 keyboards/boston_meetup/boston_meetup.h create mode 100644 keyboards/boston_meetup/config.h create mode 100644 keyboards/boston_meetup/readme.md create mode 100644 keyboards/boston_meetup/rules.mk rename keyboards/{ => bpiphany}/sixshooter/config.h (98%) rename keyboards/{ => bpiphany}/sixshooter/info.json (100%) rename keyboards/{ => bpiphany}/sixshooter/keymaps/default/keymap.c (100%) rename keyboards/{ => bpiphany}/sixshooter/keymaps/default/readme.md (100%) rename keyboards/{ => bpiphany}/sixshooter/readme.md (51%) rename keyboards/{ => bpiphany}/sixshooter/rules.mk (100%) rename keyboards/{ => bpiphany}/sixshooter/sixshooter.c (100%) rename keyboards/{ => bpiphany}/sixshooter/sixshooter.h (100%) create mode 100644 keyboards/butterstick/butterstick.c create mode 100644 keyboards/butterstick/butterstick.h create mode 100644 keyboards/butterstick/config.h create mode 100644 keyboards/butterstick/keymaps/default/keymap.c rename keyboards/{ergodash/rev2 => butterstick}/keymaps/default/rules.mk (100%) create mode 100644 keyboards/butterstick/readme.md create mode 100644 keyboards/butterstick/rules.mk create mode 100644 keyboards/butterstick/sten.c create mode 100644 keyboards/butterstick/sten.h create mode 100755 keyboards/c39/c39.c create mode 100755 keyboards/c39/c39.h create mode 100755 keyboards/c39/config.h create mode 100755 keyboards/c39/info.json create mode 100755 keyboards/c39/keymaps/default/config.h create mode 100755 keyboards/c39/keymaps/default/keymap.c create mode 100755 keyboards/c39/keymaps/default/readme.md create mode 100755 keyboards/c39/readme.md rename keyboards/{sentraq/s60_x => c39}/rules.mk (86%) mode change 100644 => 100755 create mode 100644 keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c create mode 100644 keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h create mode 100644 keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk create mode 100644 keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg create mode 100644 keyboards/cannonkeys/instant60/bootloader_defs.h create mode 100644 keyboards/cannonkeys/instant60/chconf.h create mode 100644 keyboards/cannonkeys/instant60/config.h create mode 100644 keyboards/cannonkeys/instant60/halconf.h create mode 100644 keyboards/cannonkeys/instant60/info.json create mode 100644 keyboards/cannonkeys/instant60/instant60.c create mode 100644 keyboards/cannonkeys/instant60/instant60.h create mode 100644 keyboards/cannonkeys/instant60/keymaps/default/keymap.c create mode 100644 keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c create mode 100644 keyboards/cannonkeys/instant60/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/instant60/keymaps/via/rules.mk create mode 100644 keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c create mode 100644 keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk create mode 100644 keyboards/cannonkeys/instant60/mcuconf.h create mode 100644 keyboards/cannonkeys/instant60/readme.md create mode 100644 keyboards/cannonkeys/instant60/rules.mk create mode 100644 keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.c create mode 100644 keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.h create mode 100644 keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.mk create mode 100644 keyboards/cannonkeys/practice65/bootloader_defs.h create mode 100644 keyboards/cannonkeys/practice65/chconf.h create mode 100644 keyboards/cannonkeys/practice65/config.h create mode 100644 keyboards/cannonkeys/practice65/halconf.h create mode 100644 keyboards/cannonkeys/practice65/info.json create mode 100644 keyboards/cannonkeys/practice65/keymaps/default/keymap.c create mode 100644 keyboards/cannonkeys/practice65/ld/MKL26Z64.ld create mode 100644 keyboards/cannonkeys/practice65/ld/STM32F103x8_stm32duino_bootloader.ld create mode 100644 keyboards/cannonkeys/practice65/mcuconf.h create mode 100644 keyboards/cannonkeys/practice65/practice65.c create mode 100644 keyboards/cannonkeys/practice65/practice65.h create mode 100644 keyboards/cannonkeys/practice65/readme.md create mode 100644 keyboards/cannonkeys/practice65/rules.mk create mode 100644 keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c create mode 100644 keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h create mode 100644 keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.mk create mode 100644 keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg create mode 100644 keyboards/cannonkeys/satisfaction75/bootloader_defs.h create mode 100644 keyboards/cannonkeys/satisfaction75/chconf.h create mode 100644 keyboards/cannonkeys/satisfaction75/config.h create mode 100644 keyboards/cannonkeys/satisfaction75/halconf.h create mode 100644 keyboards/cannonkeys/satisfaction75/i2c_master.c create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/jae/keymap.c create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/tester/rules.mk create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c create mode 100644 keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk create mode 100644 keyboards/cannonkeys/satisfaction75/led.c create mode 100644 keyboards/cannonkeys/satisfaction75/led_custom.h create mode 100644 keyboards/cannonkeys/satisfaction75/mcuconf.h create mode 100644 keyboards/cannonkeys/satisfaction75/prototype/prototype.h rename keyboards/{fourier/keymaps/default => cannonkeys/satisfaction75/prototype}/rules.mk (100%) create mode 100644 keyboards/cannonkeys/satisfaction75/readme.md create mode 100644 keyboards/cannonkeys/satisfaction75/rev1/rev1.h rename keyboards/{fourier/keymaps/valgrahf => cannonkeys/satisfaction75/rev1}/rules.mk (100%) create mode 100644 keyboards/cannonkeys/satisfaction75/rules.mk create mode 100644 keyboards/cannonkeys/satisfaction75/satisfaction75.c create mode 100644 keyboards/cannonkeys/satisfaction75/satisfaction75.h create mode 100644 keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c create mode 100644 keyboards/cannonkeys/satisfaction75/satisfaction_oled.c create mode 100644 keyboards/cannonkeys/stm32f072/keyboard.c create mode 100644 keyboards/cannonkeys/stm32f072/keyboard.h create mode 100644 keyboards/cannonkeys/stm32f072/led.c create mode 100644 keyboards/cannonkeys/stm32f072/led_custom.h create mode 100644 keyboards/cannonkeys/stm32f072/ws2812.c create mode 100644 keyboards/cannonkeys/stm32f072/ws2812.h rename keyboards/chimera_ortho/keymaps/dcompact/{README.md => readme.md} (84%) create mode 100644 keyboards/claw44/claw44.c create mode 100644 keyboards/claw44/claw44.h rename keyboards/{orthodox => claw44}/config.h (81%) rename keyboards/{sol => claw44}/i2c.c (100%) rename keyboards/{sol => claw44}/i2c.h (96%) create mode 100644 keyboards/claw44/keymaps/default/config.h create mode 100644 keyboards/claw44/keymaps/default/keymap.c create mode 100644 keyboards/claw44/keymaps/yfuku/config.h create mode 100644 keyboards/claw44/keymaps/yfuku/keymap.c create mode 100644 keyboards/claw44/lib/glcdfont.c create mode 100644 keyboards/claw44/lib/host_led_state_reader.c create mode 100644 keyboards/claw44/lib/keylogger.c create mode 100644 keyboards/claw44/lib/layer_state_reader.c create mode 100644 keyboards/claw44/lib/logo_reader.c create mode 100644 keyboards/claw44/lib/mode_icon_reader.c create mode 100644 keyboards/claw44/lib/rgb_state_reader.c create mode 100644 keyboards/claw44/lib/timelogger.c create mode 100644 keyboards/claw44/readme.md rename keyboards/{ergodash/rev2 => claw44/rev1}/config.h (73%) rename keyboards/{bfo9000 => claw44/rev1}/matrix.c (72%) create mode 100644 keyboards/claw44/rev1/rev1.c create mode 100644 keyboards/claw44/rev1/rev1.h create mode 100644 keyboards/claw44/rev1/rules.mk create mode 100644 keyboards/claw44/rev1/serial_config.h create mode 100644 keyboards/claw44/rev1/split_scomm.c create mode 100644 keyboards/claw44/rev1/split_scomm.h rename keyboards/{orthodox => claw44/rev1}/split_util.c (81%) rename keyboards/{bfo9000 => claw44/rev1}/split_util.h (91%) create mode 100644 keyboards/claw44/rules.mk create mode 100644 keyboards/claw44/serial.c create mode 100644 keyboards/claw44/serial.h create mode 100644 keyboards/claw44/ssd1306.c create mode 100644 keyboards/claw44/ssd1306.h rename keyboards/{dztech/dz60rgb => clueboard/66_hotswap/gen1}/chconf.h (100%) rename keyboards/{dztech/dz60rgb => clueboard/66_hotswap/gen1}/halconf.h (100%) create mode 100644 keyboards/clueboard/66_hotswap/gen1/info.json create mode 100644 keyboards/clueboard/66_hotswap/gen1/led.c create mode 100644 keyboards/clueboard/66_hotswap/gen1/matrix.c rename keyboards/{dztech/dz60rgb => clueboard/66_hotswap/gen1}/mcuconf.h (100%) create mode 100644 keyboards/clueboard/66_hotswap/prototype/config.h create mode 100644 keyboards/clueboard/66_hotswap/prototype/prototype.c create mode 100644 keyboards/clueboard/66_hotswap/prototype/prototype.h create mode 100644 keyboards/clueboard/66_hotswap/prototype/rules.mk create mode 100644 keyboards/contra/keymaps/msiu/config.h create mode 100644 keyboards/contra/keymaps/msiu/keymap.c create mode 100644 keyboards/contra/keymaps/msiu/readme.md create mode 100644 keyboards/converter/modelm101/config.h create mode 100644 keyboards/converter/modelm101/info.json create mode 100644 keyboards/converter/modelm101/keymaps/default/config.h create mode 100644 keyboards/converter/modelm101/keymaps/default/keymap.c create mode 100644 keyboards/converter/modelm101/keymaps/default/readme.md create mode 100644 keyboards/converter/modelm101/keymaps/iw0rm3r/config.h create mode 100644 keyboards/converter/modelm101/keymaps/iw0rm3r/keymap.c create mode 100644 keyboards/converter/modelm101/keymaps/iw0rm3r/readme.md create mode 100644 keyboards/converter/modelm101/modelm101.c create mode 100644 keyboards/converter/modelm101/modelm101.h create mode 100644 keyboards/converter/modelm101/readme.md create mode 100644 keyboards/converter/modelm101/rules.mk create mode 100644 keyboards/converter/numeric_keypad_IIe/config.h create mode 100644 keyboards/converter/numeric_keypad_IIe/info.json create mode 100644 keyboards/converter/numeric_keypad_IIe/keymaps/default/config.h create mode 100644 keyboards/converter/numeric_keypad_IIe/keymaps/default/keymap.c create mode 100644 keyboards/converter/numeric_keypad_IIe/keymaps/default/readme.md create mode 100644 keyboards/converter/numeric_keypad_IIe/keymaps/newbold/config.h create mode 100644 keyboards/converter/numeric_keypad_IIe/keymaps/newbold/keymap.c create mode 100644 keyboards/converter/numeric_keypad_IIe/keymaps/newbold/readme.md create mode 100644 keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.c create mode 100644 keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.h create mode 100644 keyboards/converter/numeric_keypad_IIe/readme.md rename keyboards/{40percentclub/mf68_ble => converter/numeric_keypad_IIe}/rules.mk (89%) create mode 100644 keyboards/coseyfannitutti/mullet/config.h create mode 100644 keyboards/coseyfannitutti/mullet/info.json create mode 100644 keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c create mode 100644 keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c create mode 100644 keyboards/coseyfannitutti/mullet/mullet.c create mode 100644 keyboards/coseyfannitutti/mullet/mullet.h create mode 100644 keyboards/coseyfannitutti/mullet/readme.md create mode 100644 keyboards/coseyfannitutti/mullet/rules.mk create mode 100644 keyboards/coseyfannitutti/mulletpad/config.h create mode 100644 keyboards/coseyfannitutti/mulletpad/info.json create mode 100644 keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c create mode 100644 keyboards/coseyfannitutti/mulletpad/mulletpad.c create mode 100644 keyboards/coseyfannitutti/mulletpad/mulletpad.h create mode 100644 keyboards/coseyfannitutti/mulletpad/readme.md create mode 100644 keyboards/coseyfannitutti/mulletpad/rules.mk create mode 100644 keyboards/crkbd/keymaps/drashna/glcdfont.c create mode 100644 keyboards/crkbd/keymaps/jarred/config.h create mode 100644 keyboards/crkbd/keymaps/jarred/keymap.c create mode 100644 keyboards/crkbd/keymaps/jarred/readme.md create mode 100644 keyboards/crkbd/keymaps/jarred/rules.mk rename keyboards/{ergodash/rev2/keymaps/default => crkbd/keymaps/rs}/config.h (84%) create mode 100644 keyboards/crkbd/keymaps/rs/keymap.c create mode 100644 keyboards/crkbd/keymaps/rs/oled.c create mode 100644 keyboards/crkbd/keymaps/rs/readme.md create mode 100644 keyboards/crkbd/keymaps/rs/rules.mk create mode 100644 keyboards/crkbd/keymaps/thefrey/README.md create mode 100644 keyboards/crkbd/keymaps/thefrey/config.h create mode 100644 keyboards/crkbd/keymaps/thefrey/keymap.c create mode 100644 keyboards/crkbd/keymaps/thefrey/rules.mk delete mode 100644 keyboards/dilly/keymaps/default/config.h create mode 100644 keyboards/divergetm2/info.json create mode 100644 keyboards/donutcables/budget96/budget96.c create mode 100644 keyboards/donutcables/budget96/budget96.h create mode 100644 keyboards/donutcables/budget96/config.h create mode 100644 keyboards/donutcables/budget96/info.json rename keyboards/{scrabblepad => donutcables/budget96}/keymaps/default/config.h (89%) create mode 100644 keyboards/donutcables/budget96/keymaps/default/keymap.c create mode 100644 keyboards/donutcables/budget96/keymaps/default/readme.md create mode 100644 keyboards/donutcables/budget96/readme.md rename keyboards/{ps2avrGB => donutcables/budget96}/rules.mk (87%) create mode 100644 keyboards/donutcables/budget96/usbconfig.h create mode 100644 keyboards/donutcables/readme.md rename keyboards/{ => donutcables}/scrabblepad/config.h (98%) rename keyboards/{ => donutcables}/scrabblepad/info.json (100%) create mode 100644 keyboards/donutcables/scrabblepad/keymaps/default/config.h rename keyboards/{ => donutcables}/scrabblepad/keymaps/default/keymap.c (99%) rename keyboards/{ => donutcables}/scrabblepad/keymaps/default/readme.md (100%) rename keyboards/{ => donutcables}/scrabblepad/keymaps/random/keymap.c (100%) rename keyboards/{ => donutcables}/scrabblepad/keymaps/random/readme.md (100%) rename keyboards/{ => donutcables}/scrabblepad/readme.md (67%) rename keyboards/{ => donutcables}/scrabblepad/rules.mk (100%) rename keyboards/{ => donutcables}/scrabblepad/scrabblepad.c (100%) rename keyboards/{ => donutcables}/scrabblepad/scrabblepad.h (98%) create mode 100644 keyboards/doro67/multi/config.h create mode 100644 keyboards/doro67/multi/info.json create mode 100644 keyboards/doro67/multi/keymaps/default/keymap.c create mode 100644 keyboards/doro67/multi/keymaps/default/readme.md create mode 100644 keyboards/doro67/multi/keymaps/default_iso/keymap.c create mode 100644 keyboards/doro67/multi/keymaps/default_iso/readme.md create mode 100644 keyboards/doro67/multi/keymaps/default_multi/keymap.c create mode 100644 keyboards/doro67/multi/keymaps/default_multi/readme.md create mode 100644 keyboards/doro67/multi/multi.c create mode 100644 keyboards/doro67/multi/multi.h create mode 100644 keyboards/doro67/multi/readme.md create mode 100644 keyboards/doro67/multi/rules.mk create mode 100644 keyboards/doro67/readme.md create mode 100644 keyboards/doro67/regular/config.h create mode 100644 keyboards/doro67/regular/info.json create mode 100644 keyboards/doro67/regular/keymaps/default/config.h create mode 100644 keyboards/doro67/regular/keymaps/default/keymap.c create mode 100644 keyboards/doro67/regular/keymaps/default/readme.md create mode 100644 keyboards/doro67/regular/readme.md create mode 100644 keyboards/doro67/regular/regular.c create mode 100644 keyboards/doro67/regular/regular.h create mode 100644 keyboards/doro67/regular/rules.mk create mode 100644 keyboards/doro67/rgb/config.h create mode 100644 keyboards/doro67/rgb/info.json create mode 100644 keyboards/doro67/rgb/keymaps/default/config.h create mode 100644 keyboards/doro67/rgb/keymaps/default/keymap.c create mode 100644 keyboards/doro67/rgb/keymaps/default/readme.md create mode 100644 keyboards/doro67/rgb/readme.md create mode 100644 keyboards/doro67/rgb/rgb.c create mode 100644 keyboards/doro67/rgb/rgb.h create mode 100644 keyboards/doro67/rgb/rules.mk create mode 100644 keyboards/dozen0/config.h create mode 100644 keyboards/dozen0/dozen0.c create mode 100644 keyboards/dozen0/dozen0.h create mode 100644 keyboards/dozen0/info.json create mode 100644 keyboards/dozen0/keymaps/default/config.h create mode 100644 keyboards/dozen0/keymaps/default/keymap.c create mode 100644 keyboards/dozen0/keymaps/default/readme.md create mode 100644 keyboards/dozen0/keymaps/f12/config.h create mode 100644 keyboards/dozen0/keymaps/f12/keymap.c create mode 100644 keyboards/dozen0/readme.md create mode 100644 keyboards/dozen0/rules.mk create mode 100644 keyboards/duck/duck_led/duck_led.c create mode 100644 keyboards/duck/duck_led/duck_led.h rename keyboards/duck/jetfire/{backlight_led.c => indicator_leds.c} (76%) rename keyboards/duck/jetfire/{backlight_led.h => indicator_leds.h} (70%) create mode 100644 keyboards/dz60/keymaps/billiams/build_flash.sh create mode 100644 keyboards/dz60/keymaps/billiams/config.h create mode 100644 keyboards/dz60/keymaps/billiams/keymap.c create mode 100644 keyboards/dz60/keymaps/billiams/readme.md create mode 100644 keyboards/dz60/keymaps/billypython/config.h create mode 100644 keyboards/dz60/keymaps/billypython/keymap.c create mode 100644 keyboards/dz60/keymaps/billypython/rules.mk create mode 100644 keyboards/dz60/keymaps/bingocaller/config.h create mode 100644 keyboards/dz60/keymaps/bingocaller/keymap.c create mode 100644 keyboards/dz60/keymaps/bingocaller/readme.md create mode 100644 keyboards/dz60/keymaps/edulpn/README.md create mode 100644 keyboards/dz60/keymaps/edulpn/keymap.c create mode 100644 keyboards/dz60/keymaps/macos_64/config.h create mode 100644 keyboards/dz60/keymaps/macos_64/keymap.c create mode 100644 keyboards/dz60/keymaps/macos_64/readme.md create mode 100644 keyboards/dz60/keymaps/macos_64/rules.mk create mode 100644 keyboards/dz60/keymaps/olligranlund_iso/keymap.c create mode 100644 keyboards/dz60/keymaps/olligranlund_iso/readme.md create mode 100644 keyboards/dz60/keymaps/zepol_layout/keymap.c create mode 100644 keyboards/dztech/dz40rgb/config.h create mode 100644 keyboards/dztech/dz40rgb/dz40rgb.c create mode 100644 keyboards/dztech/dz40rgb/dz40rgb.h create mode 100644 keyboards/dztech/dz40rgb/keymaps/default/config.h create mode 100644 keyboards/dztech/dz40rgb/keymaps/default/keymap.c create mode 100644 keyboards/dztech/dz40rgb/keymaps/split_space/config.h create mode 100644 keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c create mode 100644 keyboards/dztech/dz40rgb/rules.mk create mode 100644 keyboards/dztech/dz60rgb/keymaps/ansi/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c create mode 100644 keyboards/dztech/dz60rgb/keymaps/hhkb/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c create mode 100644 keyboards/dztech/dz60rgb/keymaps/hhkb_iso/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c create mode 100644 keyboards/dztech/dz60rgb/keymaps/iso/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/iso/keymap.c create mode 100644 keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h create mode 100644 keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c create mode 100644 keyboards/dztech/dz60rgb/keymaps/matthewrobo/rules.mk create mode 100644 keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c create mode 100644 keyboards/dztech/dz60rgb/keymaps/mekanist/readme.md create mode 100644 keyboards/dztech/dz65rgb/config.h create mode 100644 keyboards/dztech/dz65rgb/dz65rgb.c create mode 100644 keyboards/dztech/dz65rgb/dz65rgb.h create mode 100644 keyboards/dztech/dz65rgb/info.json create mode 100644 keyboards/dztech/dz65rgb/keymaps/default/keymap.c create mode 100644 keyboards/dztech/dz65rgb/readme.md create mode 100644 keyboards/dztech/dz65rgb/rules.mk create mode 100644 keyboards/eco/keymaps/fsck/config.h create mode 100644 keyboards/eco/keymaps/fsck/keymap.c create mode 100644 keyboards/eco/keymaps/fsck/readme.md create mode 100644 keyboards/eco/keymaps/fsck/rules.mk create mode 100644 keyboards/emptystring/NQG/NQG.c create mode 100644 keyboards/emptystring/NQG/NQG.h create mode 100644 keyboards/emptystring/NQG/config.h create mode 100644 keyboards/emptystring/NQG/info.json create mode 100644 keyboards/emptystring/NQG/keymaps/default/keymap.c create mode 100644 keyboards/emptystring/NQG/keymaps/default/rules.mk create mode 100644 keyboards/emptystring/NQG/readme.md create mode 100644 keyboards/emptystring/NQG/rules.mk delete mode 100644 keyboards/ergodash/matrix.c rename keyboards/{levinson/keymaps/default => ergodash/rev1/keymaps/greenshadowmaker}/config.h (95%) create mode 100644 keyboards/ergodash/rev1/keymaps/greenshadowmaker/keyboard-layout-editor.json create mode 100644 keyboards/ergodash/rev1/keymaps/greenshadowmaker/keymap.c rename keyboards/{zen/keymaps/default => ergodash/rev1/keymaps/greenshadowmaker}/rules.mk (71%) delete mode 100644 keyboards/ergodash/rev2/info.json delete mode 100644 keyboards/ergodash/rev2/keymaps/default/keymap.c delete mode 100644 keyboards/ergodash/rev2/rev2.c delete mode 100644 keyboards/ergodash/rev2/rev2.h delete mode 100644 keyboards/ergodash/serial.c delete mode 100644 keyboards/ergodash/serial.h delete mode 100644 keyboards/ergodash/split_util.c delete mode 100644 keyboards/ergodash/split_util.h create mode 100644 keyboards/ergodox_ez/keymaps/pvinis/keymap.c rename layouts/community/ergodox/pvinis/Readme.md => keyboards/ergodox_ez/keymaps/pvinis/readme.md (100%) create mode 100644 keyboards/ergodox_ez/keymaps/pvinis/rules.mk create mode 100644 keyboards/ergotaco/config.h create mode 100644 keyboards/ergotaco/ergotaco.c create mode 100644 keyboards/ergotaco/ergotaco.h create mode 100644 keyboards/ergotaco/info.json create mode 100644 keyboards/ergotaco/keymaps/default/keymap.c create mode 100644 keyboards/ergotaco/keymaps/default/readme.md create mode 100644 keyboards/ergotaco/keymaps/default/rules.mk create mode 100644 keyboards/ergotaco/matrix.c create mode 100644 keyboards/ergotaco/readme.md create mode 100644 keyboards/ergotaco/rules.mk create mode 100644 keyboards/ergotravel/keymaps/jarred/config.h create mode 100644 keyboards/ergotravel/keymaps/jarred/keymap.c create mode 100644 keyboards/exclusive/e6v2/oe_bmc/config.h create mode 100644 keyboards/exclusive/e6v2/oe_bmc/info.json create mode 100644 keyboards/exclusive/e6v2/oe_bmc/keymaps/default/config.h create mode 100644 keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c create mode 100644 keyboards/exclusive/e6v2/oe_bmc/keymaps/default/readme.md create mode 100644 keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c create mode 100644 keyboards/exclusive/e6v2/oe_bmc/oe_bmc.h create mode 100644 keyboards/exclusive/e6v2/oe_bmc/readme.md create mode 100644 keyboards/exclusive/e6v2/oe_bmc/rules.mk create mode 100644 keyboards/exclusive/e6v2/oe_bmc/usbconfig.h delete mode 100644 keyboards/facew/i2c.c delete mode 100644 keyboards/facew/i2c.h delete mode 100644 keyboards/facew/keymaps/mechmerlin/keymap.c delete mode 100644 keyboards/facew/keymaps/mechmerlin/readme.md delete mode 100644 keyboards/facew/matrix.c delete mode 100644 keyboards/fc660c/keymaps/spacebarracecar/config.h delete mode 100644 keyboards/fc660c/keymaps/spacebarracecar/keymap.c delete mode 100644 keyboards/fc660c/keymaps/spacebarracecar/rules.mk delete mode 100644 keyboards/fourier/rev1/rev1.h create mode 100644 keyboards/foxlab/leaf60/hotswap/config.h create mode 100644 keyboards/foxlab/leaf60/hotswap/hotswap.c create mode 100644 keyboards/foxlab/leaf60/hotswap/hotswap.h create mode 100644 keyboards/foxlab/leaf60/hotswap/info.json create mode 100644 keyboards/foxlab/leaf60/hotswap/keymaps/default/config.h create mode 100644 keyboards/foxlab/leaf60/hotswap/keymaps/default/keymap.c create mode 100644 keyboards/foxlab/leaf60/hotswap/keymaps/default/readme.md create mode 100644 keyboards/foxlab/leaf60/hotswap/readme.md create mode 100644 keyboards/foxlab/leaf60/hotswap/rules.mk create mode 100644 keyboards/foxlab/leaf60/readme.md create mode 100644 keyboards/foxlab/leaf60/universal/config.h create mode 100644 keyboards/foxlab/leaf60/universal/info.json create mode 100644 keyboards/foxlab/leaf60/universal/keymaps/default/config.h create mode 100644 keyboards/foxlab/leaf60/universal/keymaps/default/keymap.c create mode 100644 keyboards/foxlab/leaf60/universal/keymaps/default/readme.md create mode 100644 keyboards/foxlab/leaf60/universal/readme.md create mode 100644 keyboards/foxlab/leaf60/universal/rules.mk create mode 100644 keyboards/foxlab/leaf60/universal/universal.c create mode 100644 keyboards/foxlab/leaf60/universal/universal.h create mode 100644 keyboards/ft/mars80/config.h create mode 100644 keyboards/ft/mars80/info.json create mode 100644 keyboards/ft/mars80/keymaps/default/config.h create mode 100644 keyboards/ft/mars80/keymaps/default/keymap.c create mode 100644 keyboards/ft/mars80/keymaps/default/readme.md create mode 100644 keyboards/ft/mars80/mars80.c create mode 100644 keyboards/ft/mars80/mars80.h create mode 100644 keyboards/ft/mars80/readme.md create mode 100644 keyboards/ft/mars80/rules.mk create mode 100644 keyboards/ft/mars80/usbconfig.h create mode 100644 keyboards/georgi/config.h create mode 100644 keyboards/georgi/georgi.c create mode 100644 keyboards/georgi/georgi.h create mode 100644 keyboards/georgi/info.json create mode 100644 keyboards/georgi/keymaps/colemak-dh/keymap.c create mode 100644 keyboards/georgi/keymaps/colemak-dh/readme.md create mode 100644 keyboards/georgi/keymaps/colemak-dh/rules.mk create mode 100644 keyboards/georgi/keymaps/default/keymap.c create mode 100644 keyboards/georgi/keymaps/default/readme.md create mode 100644 keyboards/georgi/keymaps/default/rules.mk create mode 100644 keyboards/georgi/keymaps/minimal/keymap.c create mode 100644 keyboards/georgi/keymaps/minimal/readme.md create mode 100644 keyboards/georgi/keymaps/minimal/rules.mk create mode 100644 keyboards/georgi/keymaps/norman/keymap.c create mode 100644 keyboards/georgi/keymaps/norman/readme.md create mode 100644 keyboards/georgi/keymaps/norman/rules.mk create mode 100644 keyboards/georgi/matrix.c create mode 100644 keyboards/georgi/readme.md create mode 100644 keyboards/georgi/rules.mk create mode 100644 keyboards/georgi/sten.c create mode 100644 keyboards/georgi/sten.h delete mode 100644 keyboards/gergo/i2cmaster.h create mode 100644 keyboards/gergo/keymaps/colemak/keymap.c create mode 100644 keyboards/gergo/keymaps/colemak/readme.md create mode 100644 keyboards/gergo/keymaps/colemak/rules.mk create mode 100644 keyboards/gergo/keymaps/default/config.h create mode 100644 keyboards/gergo/keymaps/drashna/keymap.c create mode 100644 keyboards/gergo/keymaps/drashna/rules.mk create mode 100644 keyboards/gergo/keymaps/germ/config.h create mode 100644 keyboards/gergo/keymaps/germ/keymap.c create mode 100644 keyboards/gergo/keymaps/germ/readme.md create mode 100644 keyboards/gergo/keymaps/germ/rules.mk rename keyboards/{ps2avrGB => gray_studio/hb85}/config.h (72%) create mode 100644 keyboards/gray_studio/hb85/hb85.c create mode 100644 keyboards/gray_studio/hb85/hb85.h create mode 100644 keyboards/gray_studio/hb85/info.json create mode 100644 keyboards/gray_studio/hb85/keymaps/default/keymap.c create mode 100644 keyboards/gray_studio/hb85/keymaps/stt/keymap.c create mode 100644 keyboards/gray_studio/hb85/readme.md create mode 100644 keyboards/gray_studio/hb85/rules.mk create mode 100644 keyboards/gray_studio/hb85/usbconfig.h delete mode 100644 keyboards/h87a/h87a.h delete mode 100644 keyboards/h87a/info.json delete mode 100644 keyboards/hadron/ver3/matrix.c create mode 100644 keyboards/halberd/config.h create mode 100644 keyboards/halberd/halberd.c create mode 100644 keyboards/halberd/halberd.h create mode 100644 keyboards/halberd/info.json create mode 100644 keyboards/halberd/keymaps/default/config.h create mode 100644 keyboards/halberd/keymaps/default/keymap.c create mode 100644 keyboards/halberd/keymaps/default/readme.md create mode 100644 keyboards/halberd/keymaps/right_modifiers/config.h create mode 100644 keyboards/halberd/keymaps/right_modifiers/keymap.c create mode 100644 keyboards/halberd/keymaps/right_modifiers/readme.md create mode 100644 keyboards/halberd/readme.md create mode 100644 keyboards/halberd/rules.mk rename keyboards/{ => handwired}/412_64/412_64.c (100%) rename keyboards/{ => handwired}/412_64/412_64.h (100%) rename keyboards/{ => handwired}/412_64/config.h (99%) rename keyboards/{ => handwired}/412_64/keymaps/default/config.h (100%) rename keyboards/{ => handwired}/412_64/keymaps/default/keymap.c (100%) rename keyboards/{ => handwired}/412_64/keymaps/default/rules.mk (100%) rename keyboards/{ => handwired}/412_64/readme.md (67%) rename keyboards/{ => handwired}/412_64/rules.mk (100%) create mode 100644 keyboards/handwired/ck4x4/bootloader_defs.h create mode 100644 keyboards/handwired/ck4x4/chconf.h create mode 100644 keyboards/handwired/ck4x4/ck4x4.c create mode 100644 keyboards/handwired/ck4x4/ck4x4.h create mode 100644 keyboards/handwired/ck4x4/config.h create mode 100644 keyboards/handwired/ck4x4/halconf.h rename keyboards/{jj4x4/i2c.h => handwired/ck4x4/keymaps/default/keymap.c} (63%) create mode 100644 keyboards/handwired/ck4x4/mcuconf.h create mode 100644 keyboards/handwired/ck4x4/readme.md create mode 100644 keyboards/handwired/ck4x4/rules.mk create mode 100644 keyboards/handwired/dactyl_promicro/config.h rename keyboards/{viterbi/rev1/rev1.c => handwired/dactyl_promicro/dactyl_promicro.c} (56%) create mode 100644 keyboards/handwired/dactyl_promicro/dactyl_promicro.h create mode 100644 keyboards/handwired/dactyl_promicro/keymaps/default/config.h create mode 100644 keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c create mode 100644 keyboards/handwired/dactyl_promicro/keymaps/impstyle/config.h create mode 100644 keyboards/handwired/dactyl_promicro/keymaps/impstyle/keymap.c create mode 100644 keyboards/handwired/dactyl_promicro/readme.md rename keyboards/{zen => handwired/dactyl_promicro}/rules.mk (91%) create mode 100644 keyboards/handwired/daishi/config.h create mode 100644 keyboards/handwired/daishi/daishi.c create mode 100644 keyboards/handwired/daishi/daishi.h create mode 100644 keyboards/handwired/daishi/keymaps/default/keymap.c create mode 100644 keyboards/handwired/daishi/keymaps/default/readme.md create mode 100644 keyboards/handwired/daishi/readme.md create mode 100644 keyboards/handwired/daishi/rules.mk delete mode 100644 keyboards/handwired/frenchdev/i2cmaster.h delete mode 100644 keyboards/handwired/frenchdev/twimaster.c create mode 100644 keyboards/handwired/hacked_motospeed/config.h create mode 100644 keyboards/handwired/hacked_motospeed/hacked_motospeed.c create mode 100644 keyboards/handwired/hacked_motospeed/hacked_motospeed.h create mode 100644 keyboards/handwired/hacked_motospeed/info.json create mode 100644 keyboards/handwired/hacked_motospeed/keymaps/default/config.h create mode 100644 keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c create mode 100644 keyboards/handwired/hacked_motospeed/keymaps/default/readme.md create mode 100644 keyboards/handwired/hacked_motospeed/readme.md create mode 100644 keyboards/handwired/hacked_motospeed/rules.mk create mode 100644 keyboards/handwired/jot50/config.h rename keyboards/{fourier/rev1/rev1.c => handwired/jot50/jot50.c} (67%) create mode 100644 keyboards/handwired/jot50/jot50.h create mode 100644 keyboards/handwired/jot50/keymaps/default/keymap.c create mode 100644 keyboards/handwired/jot50/readme.md rename keyboards/{preonic => handwired/jot50}/rules.mk (85%) create mode 100644 keyboards/handwired/jotanck/config.h create mode 100644 keyboards/handwired/jotanck/jotanck.c create mode 100644 keyboards/handwired/jotanck/jotanck.h create mode 100644 keyboards/handwired/jotanck/keymaps/default/keymap.c create mode 100644 keyboards/handwired/jotanck/readme.md create mode 100644 keyboards/handwired/jotanck/rules.mk create mode 100644 keyboards/handwired/jotpad16/config.h create mode 100644 keyboards/handwired/jotpad16/jotpad16.c create mode 100644 keyboards/handwired/jotpad16/jotpad16.h create mode 100644 keyboards/handwired/jotpad16/keymaps/default/keymap.c create mode 100644 keyboards/handwired/jotpad16/readme.md create mode 100644 keyboards/handwired/jotpad16/rules.mk create mode 100644 keyboards/handwired/lovelive9/config.h create mode 100644 keyboards/handwired/lovelive9/info.json create mode 100644 keyboards/handwired/lovelive9/keymaps/default/keymap.c create mode 100644 keyboards/handwired/lovelive9/lovelive9.c create mode 100644 keyboards/handwired/lovelive9/lovelive9.h create mode 100644 keyboards/handwired/lovelive9/readme.md create mode 100644 keyboards/handwired/lovelive9/rules.mk delete mode 100644 keyboards/handwired/magicforce61/README.md create mode 100644 keyboards/handwired/magicforce61/info.json create mode 100644 keyboards/handwired/magicforce61/readme.md delete mode 100644 keyboards/handwired/magicforce68/README.md create mode 100644 keyboards/handwired/magicforce68/info.json create mode 100644 keyboards/handwired/magicforce68/readme.md create mode 100644 keyboards/handwired/mechboards_micropad/config.h create mode 100644 keyboards/handwired/mechboards_micropad/info.json create mode 100644 keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c create mode 100644 keyboards/handwired/mechboards_micropad/keymaps/default/readme.md create mode 100644 keyboards/handwired/mechboards_micropad/mechboards_micropad.c create mode 100644 keyboards/handwired/mechboards_micropad/mechboards_micropad.h create mode 100644 keyboards/handwired/mechboards_micropad/readme.md create mode 100644 keyboards/handwired/mechboards_micropad/rules.mk create mode 100644 keyboards/handwired/prime_exl/keymaps/via/keymap.c create mode 100644 keyboards/handwired/prime_exl/keymaps/via/readme.md create mode 100644 keyboards/handwired/prime_exl/keymaps/via/rules.mk create mode 100644 keyboards/handwired/splittest/config.h create mode 100644 keyboards/handwired/splittest/keymaps/default/config.h create mode 100644 keyboards/handwired/splittest/keymaps/default/keymap.c create mode 100644 keyboards/handwired/splittest/readme.md rename keyboards/{fourier => handwired/splittest}/rules.mk (98%) create mode 100644 keyboards/handwired/splittest/splittest.c create mode 100644 keyboards/handwired/splittest/splittest.h create mode 100644 keyboards/handwired/tennie/config.h create mode 100644 keyboards/handwired/tennie/info.json create mode 100644 keyboards/handwired/tennie/keymaps/default/config.h create mode 100644 keyboards/handwired/tennie/keymaps/default/keymap.c create mode 100644 keyboards/handwired/tennie/keymaps/default/readme.md create mode 100644 keyboards/handwired/tennie/keymaps/simple-numbpad/config.h create mode 100644 keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c create mode 100644 keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md create mode 100644 keyboards/handwired/tennie/keymaps/soundboard/config.h create mode 100644 keyboards/handwired/tennie/keymaps/soundboard/keymap.c create mode 100644 keyboards/handwired/tennie/keymaps/soundboard/readme.md create mode 100644 keyboards/handwired/tennie/readme.md create mode 100644 keyboards/handwired/tennie/rules.mk create mode 100644 keyboards/handwired/tennie/tennie.c create mode 100644 keyboards/handwired/tennie/tennie.h create mode 100644 keyboards/handwired/terminus_mini/info.json delete mode 100644 keyboards/handwired/trackpoint/README.md create mode 100644 keyboards/handwired/trackpoint/readme.md delete mode 100644 keyboards/handwired/woodpad/keymaps/drashna/README.md delete mode 100644 keyboards/handwired/woodpad/keymaps/drashna/keymap.c delete mode 100644 keyboards/handwired/woodpad/keymaps/drashna/rules.mk delete mode 100644 keyboards/handwired/xealous/debounce.c create mode 100644 keyboards/hecomi/alpha/config.h create mode 100644 keyboards/hecomi/alpha/info.json create mode 100644 keyboards/hecomi/alpha/readme.md create mode 100644 keyboards/hecomi/alpha/rules.mk create mode 100644 keyboards/hecomi/hecomi.c create mode 100644 keyboards/hecomi/hecomi.h create mode 100644 keyboards/hecomi/keymaps/default/config.h create mode 100644 keyboards/hecomi/keymaps/default/keymap.c create mode 100644 keyboards/hecomi/keymaps/default/readme.md create mode 100644 keyboards/hecomi/readme.md create mode 100644 keyboards/hecomi/rules.mk create mode 100644 keyboards/hifumi/config.h create mode 100644 keyboards/hifumi/hifumi.h create mode 100644 keyboards/hifumi/info.json create mode 100644 keyboards/hifumi/keymaps/default/keymap.c rename keyboards/{handwired/woodpad/keymaps/drashna/config.h => hifumi/keymaps/test/keymap.c} (52%) create mode 100644 keyboards/hifumi/readme.md create mode 100644 keyboards/hifumi/rules.mk rename keyboards/{ => hineybush}/h87a/config.h (96%) rename keyboards/{ => hineybush}/h87a/h87a.c (100%) create mode 100644 keyboards/hineybush/h87a/h87a.h create mode 100644 keyboards/hineybush/h87a/info.json create mode 100644 keyboards/hineybush/h87a/keymaps/default/config.h rename keyboards/{ => hineybush}/h87a/keymaps/default/keymap.c (98%) create mode 100644 keyboards/hineybush/h87a/keymaps/default/readme.md rename keyboards/{ => hineybush}/h87a/keymaps/gam3cat/config.h (100%) rename keyboards/{ => hineybush}/h87a/keymaps/gam3cat/keymap.c (100%) rename keyboards/{ => hineybush}/h87a/keymaps/gam3cat/readme.md (100%) rename keyboards/{ => hineybush}/h87a/keymaps/gam3cat/rules.mk (100%) create mode 100644 keyboards/hineybush/h87a/keymaps/wkl/config.h create mode 100644 keyboards/hineybush/h87a/keymaps/wkl/keymap.c create mode 100644 keyboards/hineybush/h87a/keymaps/wkl/readme.md rename keyboards/{ => hineybush}/h87a/readme.md (67%) rename keyboards/{ => hineybush}/h87a/rules.mk (100%) create mode 100644 keyboards/hineybush/hineyg80/config.h create mode 100644 keyboards/hineybush/hineyg80/hineyg80.c create mode 100644 keyboards/hineybush/hineyg80/hineyg80.h create mode 100644 keyboards/hineybush/hineyg80/info.json create mode 100644 keyboards/hineybush/hineyg80/keymaps/default/config.h create mode 100644 keyboards/hineybush/hineyg80/keymaps/default/keymap.c create mode 100644 keyboards/hineybush/hineyg80/keymaps/default/readme.md create mode 100644 keyboards/hineybush/hineyg80/keymaps/wkl/config.h create mode 100644 keyboards/hineybush/hineyg80/keymaps/wkl/keymap.c create mode 100644 keyboards/hineybush/hineyg80/keymaps/wkl/readme.md create mode 100644 keyboards/hineybush/hineyg80/readme.md create mode 100644 keyboards/hineybush/hineyg80/rules.mk create mode 100644 keyboards/hotdox/config.h create mode 100644 keyboards/hotdox/hotdox.c create mode 100644 keyboards/hotdox/hotdox.h create mode 100644 keyboards/hotdox/info.json create mode 100644 keyboards/hotdox/keymaps/default/keymap.c create mode 100644 keyboards/hotdox/keymaps/eozaki/keymap.c create mode 100644 keyboards/hotdox/keymaps/kloki/keymap.c create mode 100644 keyboards/hotdox/left.c create mode 100644 keyboards/hotdox/left.h create mode 100644 keyboards/hotdox/matrix.c create mode 100644 keyboards/hotdox/readme.md create mode 100644 keyboards/hotdox/rules.mk create mode 100644 keyboards/hs60/v2/keymaps/ansi_via/config.h create mode 100644 keyboards/hs60/v2/keymaps/ansi_via/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/ansi_via/readme.md create mode 100644 keyboards/hs60/v2/keymaps/ansi_via/rules.mk create mode 100644 keyboards/hs60/v2/keymaps/default_via/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/default_via/readme.md create mode 100644 keyboards/hs60/v2/keymaps/default_via/rules.mk create mode 100644 keyboards/hs60/v2/keymaps/goatmaster/config.h create mode 100644 keyboards/hs60/v2/keymaps/goatmaster/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/goatmaster/readme.md create mode 100644 keyboards/hs60/v2/keymaps/goatmaster/rules.mk create mode 100644 keyboards/hs60/v2/keymaps/hhkb_via/config.h create mode 100644 keyboards/hs60/v2/keymaps/hhkb_via/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/hhkb_via/readme.md create mode 100644 keyboards/hs60/v2/keymaps/hhkb_via/rules.mk create mode 100644 keyboards/hs60/v2/keymaps/iso_andys8/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/iso_andys8/readme.md create mode 100644 keyboards/hs60/v2/keymaps/iso_andys8/rules.mk create mode 100644 keyboards/hs60/v2/keymaps/stanrc85/config.h create mode 100644 keyboards/hs60/v2/keymaps/stanrc85/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/stanrc85/readme.md create mode 100644 keyboards/hs60/v2/keymaps/stanrc85/rules.mk create mode 100644 keyboards/hs60/v2/keymaps/win_osx_dual/keymap.c create mode 100644 keyboards/hs60/v2/keymaps/win_osx_dual/readme.md create mode 100644 keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk create mode 100644 keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json create mode 100644 keyboards/idobo/keymaps/greenshadowmaker/keymap.c create mode 100644 keyboards/idobo/keymaps/greenshadowmaker/readme.md create mode 100644 keyboards/idobo/keymaps/greenshadowmaker/rules.mk delete mode 100644 keyboards/iris/keymaps/davidrambo/readme.md delete mode 100644 keyboards/iris/keymaps/edvorakjp/keymap.c delete mode 100644 keyboards/iris/keymaps/edvorakjp/rules.mk delete mode 100644 keyboards/iris/keymaps/rs/readme.md delete mode 100644 keyboards/jj40/backlight.c delete mode 100644 keyboards/jj40/backlight_custom.h delete mode 100644 keyboards/jj40/breathing_custom.h delete mode 100644 keyboards/jj40/i2c.c delete mode 100644 keyboards/jj40/i2c.h delete mode 100644 keyboards/jj40/matrix.c delete mode 100644 keyboards/jj40/tools/usb_detach.c delete mode 100644 keyboards/jj4x4/backlight.c delete mode 100644 keyboards/jj4x4/backlight_custom.h delete mode 100644 keyboards/jj4x4/breathing_custom.h delete mode 100644 keyboards/jj4x4/i2c.c delete mode 100644 keyboards/jj4x4/tools/README.md create mode 100644 keyboards/jj50/keymaps/abstractkb/keymap.c create mode 100644 keyboards/jj50/keymaps/abstractkb/readme.md create mode 100644 keyboards/jj50/keymaps/archetype/README.md create mode 100644 keyboards/jj50/keymaps/archetype/config.h create mode 100644 keyboards/jj50/keymaps/archetype/keymap.c create mode 100644 keyboards/jj50/keymaps/archetype/rules.mk delete mode 100644 keyboards/jj50/program create mode 100644 keyboards/kagamidget/config.h create mode 100644 keyboards/kagamidget/info.json create mode 100644 keyboards/kagamidget/kagamidget.c create mode 100644 keyboards/kagamidget/kagamidget.h create mode 100644 keyboards/kagamidget/keymaps/default/config.h create mode 100644 keyboards/kagamidget/keymaps/default/keymap.c create mode 100644 keyboards/kagamidget/keymaps/default/readme.md create mode 100644 keyboards/kagamidget/readme.md create mode 100644 keyboards/kagamidget/rules.mk create mode 100644 keyboards/katana60/keymaps/msiu/config.h create mode 100644 keyboards/katana60/keymaps/msiu/keymap.c create mode 100644 keyboards/katana60/keymaps/msiu/readme.md mode change 100755 => 100644 keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h create mode 100644 keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c create mode 100644 keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md create mode 100644 keyboards/kbdfans/kbd67/rev1/keymaps/koba/config.h create mode 100644 keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c create mode 100644 keyboards/kbdfans/kbd67/rev1/keymaps/koba/readme.md create mode 100644 keyboards/kbdfans/kbd67/rev1/keymaps/martinffx/config.h create mode 100644 keyboards/kbdfans/kbd67/rev1/keymaps/martinffx/keymap.c create mode 100644 keyboards/kbdfans/kbd67/rev1/keymaps/martinffx/readme.md rename keyboards/{sentraq/s60_x => kbdfans/kbd67/rev2}/config.h (56%) create mode 100644 keyboards/kbdfans/kbd67/rev2/info.json create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/default/config.h create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/default/keymap.c create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/default/readme.md create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/koba/config.h create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c create mode 100644 keyboards/kbdfans/kbd67/rev2/keymaps/koba/readme.md create mode 100644 keyboards/kbdfans/kbd67/rev2/readme.md create mode 100644 keyboards/kbdfans/kbd67/rev2/rev2.c create mode 100644 keyboards/kbdfans/kbd67/rev2/rev2.h create mode 100644 keyboards/kbdfans/kbd67/rev2/rules.mk create mode 100644 keyboards/kbdfans/kbd6x/keymaps/wanleg/keymap.c create mode 100644 keyboards/kbdfans/kbd6x/keymaps/wanleg/rules.mk create mode 100644 keyboards/kbdfans/kbd75/keymaps/digital/keymap.c create mode 100644 keyboards/kbdfans/kbd75/keymaps/digital/readme.md create mode 100644 keyboards/kbdfans/kbd75/keymaps/kingwangwong/keymap.c rename keyboards/{ => keebio}/bdn9/bdn9.c (100%) rename keyboards/{ => keebio}/bdn9/bdn9.h (93%) rename keyboards/{ => keebio}/bdn9/config.h (88%) rename keyboards/{ => keebio}/bdn9/info.json (100%) create mode 100644 keyboards/keebio/bdn9/keymaps/bcat/keymap.c create mode 100644 keyboards/keebio/bdn9/keymaps/bcat/readme.md rename keyboards/{ => keebio}/bdn9/keymaps/default/keymap.c (66%) create mode 100644 keyboards/keebio/bdn9/keymaps/mousepad/config.h create mode 100644 keyboards/keebio/bdn9/keymaps/mousepad/keymap.c create mode 100644 keyboards/keebio/bdn9/keymaps/mousepad/readme.md create mode 100644 keyboards/keebio/bdn9/keymaps/mousepad/rule.mk create mode 100644 keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c create mode 100644 keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c rename keyboards/{ => keebio}/bdn9/readme.md (96%) rename keyboards/{ => keebio}/bdn9/rules.mk (100%) rename keyboards/{ => keebio}/bfo9000/bfo9000.c (100%) rename keyboards/{ => keebio}/bfo9000/bfo9000.h (89%) rename keyboards/{ => keebio}/bfo9000/config.h (93%) create mode 100644 keyboards/keebio/bfo9000/keymaps/abstractkb/config.h create mode 100644 keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c create mode 100644 keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md create mode 100644 keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk rename keyboards/{ => keebio}/bfo9000/keymaps/andylikescandy6x18/config.h (100%) rename keyboards/{ => keebio}/bfo9000/keymaps/andylikescandy6x18/keymap.c (98%) create mode 100644 keyboards/keebio/bfo9000/keymaps/default/config.h rename keyboards/{ => keebio}/bfo9000/keymaps/default/keymap.c (93%) create mode 100644 keyboards/keebio/bfo9000/keymaps/insertsnideremarks/config.h create mode 100644 keyboards/keebio/bfo9000/keymaps/insertsnideremarks/keymap.c create mode 100644 keyboards/keebio/bfo9000/keymaps/insertsnideremarks/readme.md rename keyboards/{rorschach => keebio/bfo9000}/keymaps/insertsnideremarks/rules.mk (95%) create mode 100644 keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h create mode 100644 keyboards/keebio/bfo9000/keymaps/tuesdayjohn/keymap.c create mode 100644 keyboards/keebio/bfo9000/keymaps/tuesdayjohn/rules.mk rename keyboards/{ => keebio}/bfo9000/readme.md (91%) rename keyboards/{ => keebio}/bfo9000/rules.mk (94%) rename keyboards/{ => keebio}/chocopad/README.md (93%) rename keyboards/{ => keebio}/chocopad/chocopad.c (100%) rename keyboards/{ => keebio}/chocopad/chocopad.h (93%) rename keyboards/{ => keebio}/chocopad/config.h (97%) rename keyboards/{ => keebio}/chocopad/info.json (100%) create mode 100644 keyboards/keebio/chocopad/keymaps/default/config.h rename keyboards/{ => keebio}/chocopad/keymaps/default/keymap.c (96%) rename keyboards/{ => keebio}/chocopad/keymaps/default/rules.mk (100%) rename keyboards/{chocopad/keymaps/default => keebio/chocopad/keymaps/khord}/config.h (100%) rename keyboards/{ => keebio}/chocopad/keymaps/khord/keymap.c (96%) rename keyboards/{ => keebio}/chocopad/keymaps/khord/rules.mk (100%) rename keyboards/{ => keebio}/chocopad/rules.mk (100%) rename keyboards/{ => keebio}/dilly/README.md (94%) rename keyboards/{ => keebio}/dilly/config.h (100%) rename keyboards/{ => keebio}/dilly/dilly.c (100%) rename keyboards/{ => keebio}/dilly/dilly.h (100%) rename keyboards/{ => keebio}/dilly/info.json (100%) create mode 100644 keyboards/keebio/dilly/keymaps/bakingpy/config.h create mode 100644 keyboards/keebio/dilly/keymaps/bakingpy/keymap.c rename keyboards/{dilly/keymaps/default => keebio/dilly/keymaps/bakingpy}/rules.mk (100%) rename keyboards/{niu_mini/keymaps/spacebarracecar => keebio/dilly/keymaps/default}/config.h (100%) rename keyboards/{ => keebio}/dilly/keymaps/default/keymap.c (99%) rename keyboards/{dilly/keymaps/delmo => keebio/dilly/keymaps/default}/rules.mk (100%) rename keyboards/{ => keebio}/dilly/keymaps/delmo/config.h (100%) rename keyboards/{ => keebio}/dilly/keymaps/delmo/keymap.c (99%) rename keyboards/{nyquist/keymaps/default => keebio/dilly/keymaps/delmo}/rules.mk (100%) rename keyboards/{ => keebio}/dilly/keymaps/pletcher/config.h (100%) rename keyboards/{ => keebio}/dilly/keymaps/pletcher/keymap.c (99%) rename keyboards/{ => keebio}/dilly/keymaps/pletcher/rules.mk (100%) rename keyboards/{ => keebio}/dilly/rules.mk (100%) rename keyboards/{fourier/rev1 => keebio/fourier}/config.h (98%) rename keyboards/{ => keebio}/fourier/fourier.c (100%) rename keyboards/{ => keebio}/fourier/fourier.h (58%) rename keyboards/{ => keebio}/fourier/info.json (100%) rename keyboards/{ => keebio}/fourier/keymaps/default/config.h (97%) rename keyboards/{ => keebio}/fourier/keymaps/default/keymap.c (91%) rename keyboards/{fourier/rev1 => keebio/fourier/keymaps/default}/rules.mk (100%) rename keyboards/{ => keebio}/fourier/keymaps/jennetters/config.h (100%) rename keyboards/{ => keebio}/fourier/keymaps/jennetters/keymap.c (97%) rename keyboards/{ => keebio}/fourier/keymaps/jennetters/rules.mk (100%) rename keyboards/{ => keebio}/fourier/keymaps/maxim/config.h (100%) rename keyboards/{ => keebio}/fourier/keymaps/maxim/keymap.c (100%) rename keyboards/{ => keebio}/fourier/keymaps/valgrahf/config.h (100%) rename keyboards/{ => keebio}/fourier/keymaps/valgrahf/keymap.c (98%) rename keyboards/{laplace/keymaps/bakingpy => keebio/fourier/keymaps/valgrahf}/rules.mk (100%) rename keyboards/{ => keebio}/fourier/keymaps/xyverz/config.h (100%) rename keyboards/{ => keebio}/fourier/keymaps/xyverz/keymap.c (96%) rename keyboards/{ => keebio}/fourier/readme.md (90%) create mode 100644 keyboards/keebio/fourier/rules.mk rename keyboards/{ => keebio}/iris/config.h (100%) rename keyboards/{ => keebio}/iris/info.json (97%) rename keyboards/{ => keebio}/iris/iris.c (100%) rename keyboards/{ => keebio}/iris/iris.h (93%) rename keyboards/{ => keebio}/iris/keymaps/ave-63/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/ave-63/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/bmoorey/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/bmoorey/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/bmoorey/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/bmoorey/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/broswen/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/broswen/keymap.c (98%) rename keyboards/{ => keebio}/iris/keymaps/broswen/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/davidrambo/config.h (90%) rename keyboards/{ => keebio}/iris/keymaps/davidrambo/keymap.c (95%) create mode 100644 keyboards/keebio/iris/keymaps/davidrambo/readme.md rename keyboards/{ => keebio}/iris/keymaps/davidrambo/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/dbroqua/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/dbroqua/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/dbroqua/rules.mk (100%) create mode 100644 keyboards/keebio/iris/keymaps/default/config.h rename keyboards/{ => keebio}/iris/keymaps/default/keymap.c (97%) rename keyboards/{ => keebio}/iris/keymaps/default/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/drashna/config.h (69%) rename keyboards/{ => keebio}/iris/keymaps/drashna/keymap.c (76%) rename keyboards/{ => keebio}/iris/keymaps/drashna/rules.mk (83%) create mode 100644 keyboards/keebio/iris/keymaps/drashna_lp/config.h rename keyboards/{iris/keymaps/drashna_old => keebio/iris/keymaps/drashna_lp}/keymap.c (100%) create mode 100644 keyboards/keebio/iris/keymaps/drashna_lp/rules.mk rename keyboards/{ => keebio}/iris/keymaps/drashna_old/config.h (82%) create mode 100644 keyboards/keebio/iris/keymaps/drashna_old/keymap.c rename keyboards/{ => keebio}/iris/keymaps/drashna_old/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/dvp-zjpxshade/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/dvp-zjpxshade/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/dvp-zjpxshade/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/edvorakjp/config.h (70%) create mode 100644 keyboards/keebio/iris/keymaps/edvorakjp/keymap.c rename keyboards/{ => keebio}/iris/keymaps/edvorakjp/readme.md (100%) create mode 100644 keyboards/keebio/iris/keymaps/edvorakjp/rules.mk rename keyboards/{ => keebio}/iris/keymaps/fabian/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/fabian/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/fate/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/fate/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/fate/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/fate/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/gsigler/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/gsigler/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/gsigler/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/hag/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/hag/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/hag/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/hexwire/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/hexwire/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/hexwire/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/impstyle/README.md (100%) rename keyboards/{ => keebio}/iris/keymaps/impstyle/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/impstyle/keymap.c (98%) rename keyboards/{ => keebio}/iris/keymaps/impstyle/rules.mk (100%) rename keyboards/{iris/keymaps/default => keebio/iris/keymaps/isolike}/config.h (100%) create mode 100644 keyboards/keebio/iris/keymaps/isolike/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/isolike/readme.md rename keyboards/{levinson/keymaps/treadwell => keebio/iris/keymaps/isolike}/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/jennetters/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/jennetters/keymap.c (98%) rename keyboards/{ => keebio}/iris/keymaps/jennetters/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/jennetters/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/khord/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/khord/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/khord/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/krusli/README.md (100%) rename keyboards/{ => keebio}/iris/keymaps/krusli/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/krusli/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/krusli/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/lewisridden/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/lewisridden/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/lewisridden/rules.mk (100%) rename keyboards/{viterbi/keymaps/hexwire => keebio/iris/keymaps/moonfall}/config.h (86%) create mode 100644 keyboards/keebio/iris/keymaps/moonfall/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/moonfall/rules.mk rename keyboards/{ => keebio}/iris/keymaps/mtdjr/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/mtdjr/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/mtdjr/rules.mk (100%) create mode 100644 keyboards/keebio/iris/keymaps/nstickney/README.md create mode 100644 keyboards/keebio/iris/keymaps/nstickney/config.h create mode 100644 keyboards/keebio/iris/keymaps/nstickney/keymap.c rename keyboards/{zen/rev1 => keebio/iris/keymaps/nstickney}/rules.mk (51%) rename keyboards/{ => keebio}/iris/keymaps/olligranlund_nordic/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/olligranlund_nordic/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/olligranlund_nordic/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/olligranlund_nordic/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/omgvee/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/omgvee/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/omgvee/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/omgvee/rules.mk (100%) create mode 100644 keyboards/keebio/iris/keymaps/pvinis/config.h create mode 100644 keyboards/keebio/iris/keymaps/pvinis/keymap.c create mode 100644 keyboards/keebio/iris/keymaps/pvinis/rules.mk rename keyboards/{ => keebio}/iris/keymaps/rdhaene/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/rdhaene/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/rdhaene/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/rs/config.h (97%) rename keyboards/{ => keebio}/iris/keymaps/rs/keymap.c (50%) create mode 100644 keyboards/keebio/iris/keymaps/rs/readme.md rename keyboards/{rorschach/rev1 => keebio/iris/keymaps/rs}/rules.mk (50%) rename keyboards/{ => keebio}/iris/keymaps/s1carii/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/s1carii/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/s1carii/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/s1carii/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/saviof/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/saviof/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/saviof/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/swedish/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/swedish/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/swedish/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/transmogrified/Readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/transmogrified/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/transmogrified/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/transmogrified/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/via/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/via/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/via/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/vyolle/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/vyolle/keymap.c (98%) rename keyboards/{ => keebio}/iris/keymaps/vyolle/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/wanleg/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/wanleg/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/wanleg/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/xyverz/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/xyverz/keymap.c (100%) rename keyboards/{ => keebio}/iris/keymaps/xyverz/rules.mk (100%) rename keyboards/{ => keebio}/iris/keymaps/yanfali/config.h (100%) rename keyboards/{ => keebio}/iris/keymaps/yanfali/keymap.c (99%) rename keyboards/{ => keebio}/iris/keymaps/yanfali/readme.md (100%) rename keyboards/{ => keebio}/iris/keymaps/yanfali/rules.mk (100%) rename keyboards/{ => keebio}/iris/readme.md (89%) rename keyboards/{ => keebio}/iris/rev1/config.h (100%) rename keyboards/{ => keebio}/iris/rev1/rev1.c (100%) rename keyboards/{ => keebio}/iris/rev1/rev1.h (100%) rename keyboards/{ => keebio}/iris/rev1/rules.mk (100%) rename keyboards/{ => keebio}/iris/rev1_led/config.h (100%) rename keyboards/{ => keebio}/iris/rev1_led/rev1_led.c (100%) rename keyboards/{ => keebio}/iris/rev1_led/rev1_led.h (100%) rename keyboards/{ => keebio}/iris/rev1_led/rules.mk (100%) rename keyboards/{ => keebio}/iris/rev2/config.h (100%) rename keyboards/{ => keebio}/iris/rev2/rev2.c (100%) rename keyboards/{ => keebio}/iris/rev2/rev2.h (100%) rename keyboards/{ => keebio}/iris/rev2/rules.mk (100%) rename keyboards/{ => keebio}/iris/rev3/config.h (98%) rename keyboards/{ => keebio}/iris/rev3/rev3.c (100%) rename keyboards/{ => keebio}/iris/rev3/rev3.h (100%) rename keyboards/{ => keebio}/iris/rev3/rules.mk (100%) rename keyboards/{ => keebio}/iris/rules.mk (97%) rename keyboards/{ => keebio}/laplace/config.h (96%) rename keyboards/{ => keebio}/laplace/info.json (100%) rename keyboards/{ => keebio}/laplace/keymaps/bakingpy/keymap.c (95%) rename keyboards/{laplace/keymaps/default => keebio/laplace/keymaps/bakingpy}/rules.mk (100%) rename keyboards/{ => keebio}/laplace/keymaps/default/keymap.c (97%) rename keyboards/{quefrency => keebio/laplace}/keymaps/default/rules.mk (100%) rename keyboards/{ => keebio}/laplace/laplace.c (100%) rename keyboards/{ => keebio}/laplace/laplace.h (97%) rename keyboards/{ => keebio}/laplace/readme.md (90%) rename keyboards/{ => keebio}/laplace/rules.mk (100%) rename keyboards/{ => keebio}/levinson/config.h (100%) rename keyboards/{ => keebio}/levinson/info.json (100%) rename keyboards/{ => keebio}/levinson/keymaps/atreus/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/atreus/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/atreus/readme.md (100%) rename keyboards/{ => keebio}/levinson/keymaps/bakingpy2u/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/bakingpy2u/keymap.c (99%) rename keyboards/{ => keebio}/levinson/keymaps/bakingpy2u/rules.mk (100%) create mode 100644 keyboards/keebio/levinson/keymaps/dcompact/config.h create mode 100644 keyboards/keebio/levinson/keymaps/dcompact/keymap.c rename keyboards/{planck/keymaps/dcompact/README.md => keebio/levinson/keymaps/dcompact/readme.md} (84%) create mode 100644 keyboards/keebio/levinson/keymaps/dcompact/rules.mk create mode 100644 keyboards/keebio/levinson/keymaps/default/config.h rename keyboards/{wavelet => keebio/levinson}/keymaps/default/keymap.c (99%) rename keyboards/{ => keebio}/levinson/keymaps/default/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/drogglbecher/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/drogglbecher/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/drogglbecher/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh/readme.md (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh2/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh2/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh2/readme.md (100%) rename keyboards/{ => keebio}/levinson/keymaps/jyh2/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/losinggeneration/README.md (100%) rename keyboards/{ => keebio}/levinson/keymaps/losinggeneration/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/losinggeneration/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/losinggeneration/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/mmacdougall/README.md (100%) rename keyboards/{ => keebio}/levinson/keymaps/mmacdougall/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/mmacdougall/keymap.c (99%) rename keyboards/{ => keebio}/levinson/keymaps/mmacdougall/rules.mk (100%) create mode 100644 keyboards/keebio/levinson/keymaps/omgvee/config.h create mode 100644 keyboards/keebio/levinson/keymaps/omgvee/keymap.c create mode 100644 keyboards/keebio/levinson/keymaps/omgvee/readme.md create mode 100644 keyboards/keebio/levinson/keymaps/omgvee/rules.mk rename keyboards/{ => keebio}/levinson/keymaps/steno/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/steno/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/steno/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/treadwell/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/treadwell/keymap.c (99%) create mode 100644 keyboards/keebio/levinson/keymaps/treadwell/rules.mk rename keyboards/{ => keebio}/levinson/keymaps/valgrahf/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/valgrahf/keymap.c (98%) rename keyboards/{ => keebio}/levinson/keymaps/valgrahf/rules.mk (100%) rename keyboards/{ => keebio}/levinson/keymaps/xtonhasvim/config.h (100%) rename keyboards/{ => keebio}/levinson/keymaps/xtonhasvim/keymap.c (100%) rename keyboards/{ => keebio}/levinson/keymaps/xtonhasvim/readme.md (100%) rename keyboards/{ => keebio}/levinson/keymaps/xtonhasvim/rules.mk (100%) rename keyboards/{ => keebio}/levinson/levinson.c (100%) rename keyboards/{ => keebio}/levinson/levinson.h (96%) rename keyboards/{ => keebio}/levinson/readme.md (100%) rename keyboards/{ => keebio}/levinson/rev1/config.h (93%) rename keyboards/{ => keebio}/levinson/rev1/rev1.c (100%) rename keyboards/{ => keebio}/levinson/rev1/rev1.h (100%) rename keyboards/{iris/keymaps/rs => keebio/levinson/rev1}/rules.mk (100%) rename keyboards/{ => keebio}/levinson/rev2/config.h (98%) rename keyboards/{ => keebio}/levinson/rev2/rev2.c (100%) rename keyboards/{ => keebio}/levinson/rev2/rev2.h (100%) rename keyboards/{levinson/rev1 => keebio/levinson/rev2}/rules.mk (100%) rename keyboards/{ => keebio}/levinson/rules.mk (92%) rename keyboards/{ => keebio}/nyquist/config.h (92%) rename keyboards/{ => keebio}/nyquist/info.json (100%) rename keyboards/{ => keebio}/nyquist/keymaps/DivergeJM/README.md (100%) rename keyboards/{ => keebio}/nyquist/keymaps/DivergeJM/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/DivergeJM/keymap.c (98%) rename keyboards/{ => keebio}/nyquist/keymaps/DivergeJM/rules.mk (100%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/README.md (100%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/Underglow Pinouts.md (100%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/config.h (96%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/keymap.c (99%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/keymap_converter.py (100%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/keymap_to_readme.rb (100%) rename keyboards/{nyquist/keymaps/hexwire => keebio/nyquist/keymaps/bakingpy}/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/bramver/README.md (100%) rename keyboards/{ => keebio}/nyquist/keymaps/bramver/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/bramver/keymap.c (99%) rename keyboards/{ => keebio}/nyquist/keymaps/bramver/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/danielhklein/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/danielhklein/keymap.c (97%) rename keyboards/{ => keebio}/nyquist/keymaps/danielhklein/rules.mk (100%) create mode 100644 keyboards/keebio/nyquist/keymaps/default/config.h rename keyboards/{ => keebio}/nyquist/keymaps/default/keymap.c (99%) rename keyboards/{viterbi => keebio/nyquist}/keymaps/default/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/jojiichan/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/jojiichan/keymap.c (97%) rename keyboards/{ => keebio}/nyquist/keymaps/jojiichan/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/kim-kim/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/kim-kim/keymap.c (98%) rename keyboards/{ => keebio}/nyquist/keymaps/kim-kim/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/losinggeneration/README.md (100%) rename keyboards/{ => keebio}/nyquist/keymaps/losinggeneration/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/losinggeneration/keymap.c (100%) rename keyboards/{ => keebio}/nyquist/keymaps/losinggeneration/rules.mk (100%) rename keyboards/{nyquist/keymaps/default => keebio/nyquist/keymaps/mtdjr}/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/mtdjr/keymap.c (100%) rename keyboards/{ => keebio}/nyquist/keymaps/mtdjr/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/pitty/README.md (100%) rename keyboards/{ => keebio}/nyquist/keymaps/pitty/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/pitty/keymap.c (99%) rename keyboards/{ => keebio}/nyquist/keymaps/pitty/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/shovelpaw/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/shovelpaw/keymap.c (100%) rename keyboards/{ => keebio}/nyquist/keymaps/shovelpaw/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/skug/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/skug/keymap.c (95%) rename keyboards/{ => keebio}/nyquist/keymaps/skug/rules.mk (100%) create mode 100644 keyboards/keebio/nyquist/keymaps/tester/config.h create mode 100644 keyboards/keebio/nyquist/keymaps/tester/keymap.c rename keyboards/{viterbi/keymaps/dwallace => keebio/nyquist/keymaps/tester}/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/keymaps/yshrsmz/config.h (100%) rename keyboards/{ => keebio}/nyquist/keymaps/yshrsmz/keymap.c (99%) rename keyboards/{ => keebio}/nyquist/keymaps/yshrsmz/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/nyquist.c (100%) rename keyboards/{ => keebio}/nyquist/nyquist.h (92%) rename keyboards/{ => keebio}/nyquist/readme.md (89%) rename keyboards/{ => keebio}/nyquist/rev1/config.h (100%) rename keyboards/{ => keebio}/nyquist/rev1/rev1.c (100%) rename keyboards/{ => keebio}/nyquist/rev1/rev1.h (100%) rename keyboards/{ => keebio}/nyquist/rev1/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/rev2/config.h (100%) rename keyboards/{ => keebio}/nyquist/rev2/rev2.c (100%) rename keyboards/{ => keebio}/nyquist/rev2/rev2.h (100%) rename keyboards/{levinson => keebio/nyquist}/rev2/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/rev3/config.h (98%) rename keyboards/{ => keebio}/nyquist/rev3/rev3.c (100%) rename keyboards/{ => keebio}/nyquist/rev3/rev3.h (100%) rename keyboards/{ => keebio}/nyquist/rev3/rules.mk (100%) rename keyboards/{ => keebio}/nyquist/rules.mk (98%) rename keyboards/{fourier => keebio/quefrency}/config.h (100%) create mode 100644 keyboards/keebio/quefrency/info.json create mode 100644 keyboards/keebio/quefrency/keymaps/bcat/config.h create mode 100644 keyboards/keebio/quefrency/keymaps/bcat/keymap.c create mode 100644 keyboards/keebio/quefrency/keymaps/bcat/readme.md create mode 100644 keyboards/keebio/quefrency/keymaps/bcat/rules.mk rename keyboards/{ => keebio}/quefrency/keymaps/bjohnson/config.h (100%) rename keyboards/{ => keebio}/quefrency/keymaps/bjohnson/keymap.c (100%) rename keyboards/{ => keebio}/quefrency/keymaps/bjohnson/rules.mk (100%) rename keyboards/{ => keebio}/quefrency/keymaps/bramver/README.md (100%) rename keyboards/{ => keebio}/quefrency/keymaps/bramver/config.h (100%) rename keyboards/{ => keebio}/quefrency/keymaps/bramver/keymap.c (98%) rename keyboards/{ => keebio}/quefrency/keymaps/bramver/rules.mk (100%) rename keyboards/{ => keebio}/quefrency/keymaps/default/config.h (100%) rename keyboards/{ => keebio}/quefrency/keymaps/default/keymap.c (97%) rename keyboards/{quefrency/keymaps/default65 => keebio/quefrency/keymaps/default}/rules.mk (100%) rename keyboards/{ => keebio}/quefrency/keymaps/default65/config.h (100%) rename keyboards/{ => keebio}/quefrency/keymaps/default65/keymap.c (97%) rename keyboards/{quefrency/rev1 => keebio/quefrency/keymaps/default65}/rules.mk (100%) rename keyboards/{ => keebio}/quefrency/keymaps/default65macro/config.h (100%) rename keyboards/{ => keebio}/quefrency/keymaps/default65macro/keymap.c (97%) create mode 100644 keyboards/keebio/quefrency/keymaps/georgepetri/config.h create mode 100644 keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c create mode 100644 keyboards/keebio/quefrency/keymaps/georgepetri/readme.md create mode 100644 keyboards/keebio/quefrency/keymaps/georgepetri/rules.mk create mode 100644 keyboards/keebio/quefrency/keymaps/kingwangwong/config.h create mode 100644 keyboards/keebio/quefrency/keymaps/kingwangwong/keymap.c create mode 100644 keyboards/keebio/quefrency/keymaps/unausgeschlafen/config.h create mode 100644 keyboards/keebio/quefrency/keymaps/unausgeschlafen/keymap.c create mode 100644 keyboards/keebio/quefrency/keymaps/unausgeschlafen/readme.md create mode 100644 keyboards/keebio/quefrency/keymaps/unausgeschlafen/rules.mk rename keyboards/{ => keebio}/quefrency/quefrency.c (100%) rename keyboards/{ => keebio}/quefrency/quefrency.h (92%) rename keyboards/{ => keebio}/quefrency/readme.md (90%) rename keyboards/{ => keebio}/quefrency/rev1/config.h (87%) rename keyboards/{ => keebio}/quefrency/rev1/rev1.c (100%) rename keyboards/{ => keebio}/quefrency/rev1/rev1.h (100%) create mode 100644 keyboards/keebio/quefrency/rev1/rules.mk rename keyboards/{ => keebio}/quefrency/rules.mk (90%) rename keyboards/{ => keebio}/rorschach/config.h (92%) rename keyboards/{ => keebio}/rorschach/info.json (100%) rename keyboards/{ => keebio}/rorschach/keymaps/default/config.h (91%) rename keyboards/{ => keebio}/rorschach/keymaps/default/keymap.c (100%) rename keyboards/{ => keebio}/rorschach/keymaps/insertsnideremarks/config.h (94%) rename keyboards/{ => keebio}/rorschach/keymaps/insertsnideremarks/keymap.c (96%) create mode 100644 keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk rename keyboards/{ => keebio}/rorschach/readme.md (89%) rename keyboards/{ => keebio}/rorschach/rev1/config.h (98%) rename keyboards/{ => keebio}/rorschach/rev1/rev1.c (100%) rename keyboards/{ => keebio}/rorschach/rev1/rev1.h (100%) rename keyboards/{nyquist/rev2 => keebio/rorschach/rev1}/rules.mk (100%) rename keyboards/{ => keebio}/rorschach/rorschach.c (100%) rename keyboards/{ => keebio}/rorschach/rorschach.h (96%) rename keyboards/{ => keebio}/rorschach/rules.mk (91%) rename keyboards/{ => keebio}/tragicforce68/README.md (87%) rename keyboards/{ => keebio}/tragicforce68/config.h (96%) rename keyboards/{ => keebio}/tragicforce68/info.json (100%) rename keyboards/{ => keebio}/tragicforce68/keymaps/buswerks/keymap.c (100%) rename keyboards/{ => keebio}/tragicforce68/keymaps/default/keymap.c (100%) rename keyboards/{ => keebio}/tragicforce68/rules.mk (100%) rename keyboards/{ => keebio}/tragicforce68/tragicforce68.c (100%) rename keyboards/{ => keebio}/tragicforce68/tragicforce68.h (100%) rename keyboards/{ => keebio}/viterbi/config.h (92%) rename keyboards/{viterbi/keymaps/hexwire => keebio/viterbi/keymaps/bakingpy}/README.md (100%) create mode 100644 keyboards/keebio/viterbi/keymaps/bakingpy/config.h rename keyboards/{viterbi/keymaps/hexwire => keebio/viterbi/keymaps/bakingpy}/keymap.c (99%) rename keyboards/{viterbi/keymaps/fido => keebio/viterbi/keymaps/bakingpy}/rules.mk (100%) rename keyboards/{ => keebio}/viterbi/keymaps/default/config.h (100%) rename keyboards/{ => keebio}/viterbi/keymaps/default/keymap.c (60%) rename keyboards/{viterbi/keymaps/hexwire => keebio/viterbi/keymaps/default}/rules.mk (100%) rename keyboards/{ => keebio}/viterbi/keymaps/drashna/config.h (53%) rename keyboards/{ => keebio}/viterbi/keymaps/drashna/keymap.c (98%) rename keyboards/{ => keebio}/viterbi/keymaps/drashna/rules.mk (94%) create mode 100644 keyboards/keebio/viterbi/keymaps/drashna_old/config.h rename keyboards/{ => keebio}/viterbi/keymaps/drashna_old/keymap.c (100%) create mode 100644 keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk rename keyboards/{ => keebio}/viterbi/keymaps/dwallace/config.h (100%) rename keyboards/{ => keebio}/viterbi/keymaps/dwallace/keymap.c (99%) rename keyboards/{viterbi/keymaps/mike808 => keebio/viterbi/keymaps/dwallace}/rules.mk (100%) rename keyboards/{ => keebio}/viterbi/keymaps/fido/config.h (100%) rename keyboards/{ => keebio}/viterbi/keymaps/fido/keymap.c (99%) create mode 100644 keyboards/keebio/viterbi/keymaps/fido/rules.mk rename keyboards/{ => keebio}/viterbi/keymaps/mike808/config.h (100%) rename keyboards/{ => keebio}/viterbi/keymaps/mike808/keymap.c (99%) create mode 100644 keyboards/keebio/viterbi/keymaps/mike808/rules.mk rename keyboards/{ => keebio}/viterbi/readme.md (88%) rename keyboards/{ => keebio}/viterbi/rev1/config.h (96%) rename keyboards/{viterbi/rev2/rev2.c => keebio/viterbi/rev1/rev1.c} (100%) rename keyboards/{ => keebio}/viterbi/rev1/rev1.h (95%) rename keyboards/{ => keebio}/viterbi/rev1/rules.mk (100%) rename keyboards/{ => keebio}/viterbi/rev2/config.h (99%) rename keyboards/{viterbi/viterbi.c => keebio/viterbi/rev2/rev2.c} (100%) rename keyboards/{ => keebio}/viterbi/rev2/rev2.h (100%) rename keyboards/{ => keebio}/viterbi/rev2/rules.mk (100%) rename keyboards/{ => keebio}/viterbi/rules.mk (97%) create mode 100644 keyboards/keebio/viterbi/viterbi.c rename keyboards/{ => keebio}/viterbi/viterbi.h (95%) rename keyboards/{ => keebio}/wavelet/config.h (97%) rename keyboards/{ => keebio}/wavelet/info.json (100%) rename keyboards/{levinson => keebio/wavelet}/keymaps/default/keymap.c (99%) rename keyboards/{ => keebio}/wavelet/keymaps/default/rules.mk (100%) rename keyboards/{ => keebio}/wavelet/readme.md (90%) rename keyboards/{ => keebio}/wavelet/rules.mk (100%) rename keyboards/{ => keebio}/wavelet/wavelet.c (100%) rename keyboards/{ => keebio}/wavelet/wavelet.h (100%) create mode 100644 keyboards/keycapsss/o4l_5x12/config.h create mode 100644 keyboards/keycapsss/o4l_5x12/info.json create mode 100644 keyboards/keycapsss/o4l_5x12/keymaps/2x2u/config.h create mode 100644 keyboards/keycapsss/o4l_5x12/keymaps/2x2u/keymap.c create mode 100644 keyboards/keycapsss/o4l_5x12/keymaps/default/config.h create mode 100644 keyboards/keycapsss/o4l_5x12/keymaps/default/keymap.c create mode 100644 keyboards/keycapsss/o4l_5x12/o4l_5x12.c create mode 100644 keyboards/keycapsss/o4l_5x12/o4l_5x12.h create mode 100644 keyboards/keycapsss/o4l_5x12/readme.md create mode 100644 keyboards/keycapsss/o4l_5x12/rules.mk create mode 100644 keyboards/kinesis/keymaps/tuesdayjohn/config.h create mode 100644 keyboards/kinesis/keymaps/tuesdayjohn/keymap.c create mode 100644 keyboards/kinesis/keymaps/tuesdayjohn/readme.md create mode 100644 keyboards/kinesis/keymaps/tuesdayjohn/rules.mk create mode 100644 keyboards/kinesis/keymaps/tw1t611/config.h create mode 100644 keyboards/kinesis/keymaps/tw1t611/keymap.c create mode 100644 keyboards/kinesis/keymaps/tw1t611/readme.md create mode 100644 keyboards/kinesis/keymaps/tw1t611/rules.mk create mode 100644 keyboards/launchpad/keymaps/default_rgb/config.h create mode 100644 keyboards/launchpad/keymaps/default_rgb/keymap.c create mode 100644 keyboards/launchpad/keymaps/default_rgb/readme.md create mode 100644 keyboards/launchpad/keymaps/default_rgb/rules.mk create mode 100644 keyboards/lazydesigners/dimple/config.h create mode 100644 keyboards/lazydesigners/dimple/dimple.c create mode 100644 keyboards/lazydesigners/dimple/dimple.h create mode 100644 keyboards/lazydesigners/dimple/info.json create mode 100644 keyboards/lazydesigners/dimple/keymaps/default/keymap.c create mode 100644 keyboards/lazydesigners/dimple/keymaps/default/readme.md create mode 100644 keyboards/lazydesigners/dimple/readme.md create mode 100644 keyboards/lazydesigners/dimple/rules.mk create mode 100644 keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c create mode 100644 keyboards/lazydesigners/the60/config.h create mode 100644 keyboards/lazydesigners/the60/info.json create mode 100644 keyboards/lazydesigners/the60/keymaps/default/keymap.c create mode 100644 keyboards/lazydesigners/the60/keymaps/default/readme.md create mode 100644 keyboards/lazydesigners/the60/readme.md create mode 100644 keyboards/lazydesigners/the60/rules.mk create mode 100644 keyboards/lazydesigners/the60/the60.c create mode 100644 keyboards/lazydesigners/the60/the60.h create mode 100644 keyboards/lets_split/keymaps/vim-mode/config.h create mode 100644 keyboards/lets_split/keymaps/vim-mode/keymap.c create mode 100644 keyboards/lets_split/keymaps/vim-mode/readme.md create mode 100644 keyboards/lets_split/keymaps/vim-mode/rules.mk create mode 100644 keyboards/lets_split_eh/keymaps/msiu/config.h create mode 100644 keyboards/lets_split_eh/keymaps/msiu/keymap.c create mode 100644 keyboards/lily58/rev1/info.json create mode 100644 keyboards/m0lly/README.md rename keyboards/{40percentclub/mf68_ble => m0lly}/config.h (73%) rename keyboards/{bfo9000 => m0lly}/i2c.c (98%) rename keyboards/{ergodash => m0lly}/i2c.h (97%) create mode 100644 keyboards/m0lly/info.json create mode 100644 keyboards/m0lly/keymaps/default/config.h create mode 100644 keyboards/m0lly/keymaps/default/keymap.c create mode 100644 keyboards/m0lly/m0lly.c create mode 100644 keyboards/m0lly/m0lly.h create mode 100644 keyboards/m0lly/rules.mk create mode 100644 keyboards/massdrop/alt/config_led.c create mode 100644 keyboards/massdrop/alt/keymaps/default_md/keymap.c create mode 100644 keyboards/massdrop/alt/keymaps/default_md/rules.mk create mode 100644 keyboards/massdrop/alt/keymaps/mac_md/keymap.c create mode 100644 keyboards/massdrop/alt/keymaps/mac_md/rules.mk create mode 100644 keyboards/massdrop/alt/keymaps/reywood/README.md create mode 100644 keyboards/massdrop/ctrl/config_led.c create mode 100644 keyboards/massdrop/ctrl/keymaps/default_md/keymap.c create mode 100644 keyboards/massdrop/ctrl/keymaps/default_md/rules.mk create mode 100644 keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c create mode 100644 keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk create mode 100644 keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h create mode 100644 keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c create mode 100644 keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk create mode 100644 keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md create mode 100644 keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk create mode 100644 keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c create mode 100644 keyboards/massdrop/ctrl/keymaps/xulkal/rules.mk delete mode 100644 keyboards/massdrop/ctrl/led_programs.c create mode 100644 keyboards/maxipad/keymaps/default/config.h create mode 100644 keyboards/maxipad/keymaps/default/readme.md create mode 100644 keyboards/maxipad/promicro/config.h create mode 100644 keyboards/maxipad/promicro/promicro.c create mode 100644 keyboards/maxipad/promicro/promicro.h create mode 100644 keyboards/maxipad/promicro/rules.mk create mode 100644 keyboards/maxipad/teensy2/config.h create mode 100644 keyboards/maxipad/teensy2/rules.mk create mode 100644 keyboards/maxipad/teensy2/teensy2.c create mode 100644 keyboards/maxipad/teensy2/teensy2.h create mode 100644 keyboards/mechkeys/mk60/config.h create mode 100644 keyboards/mechkeys/mk60/info.json create mode 100644 keyboards/mechkeys/mk60/keymaps/default/config.h create mode 100644 keyboards/mechkeys/mk60/keymaps/default/keymap.c create mode 100644 keyboards/mechkeys/mk60/keymaps/default/readme.md create mode 100644 keyboards/mechkeys/mk60/mk60.c create mode 100644 keyboards/mechkeys/mk60/mk60.h create mode 100644 keyboards/mechkeys/mk60/readme.md create mode 100644 keyboards/mechkeys/mk60/rules.mk create mode 100644 keyboards/mechmini/v2/keymaps/spacebarracecar/config.h rename keyboards/{niu_mini => mechmini/v2}/keymaps/spacebarracecar/keymap.c (92%) rename keyboards/{niu_mini => mechmini/v2}/keymaps/spacebarracecar/readme.md (83%) rename keyboards/{niu_mini => mechmini/v2}/keymaps/spacebarracecar/rules.mk (94%) delete mode 100644 keyboards/mehkee96/program create mode 100644 keyboards/melody96/keymaps/konstantin/config.h create mode 100644 keyboards/melody96/keymaps/konstantin/keymap.c create mode 100644 keyboards/melody96/keymaps/konstantin/rules.mk create mode 100644 keyboards/miniaxe/keymaps/wanleg/config.h create mode 100644 keyboards/miniaxe/keymaps/wanleg/keymap.c create mode 100644 keyboards/miniaxe/keymaps/wanleg/rules.mk create mode 100644 keyboards/minidox/keymaps/dustypomerleau/README.md create mode 100644 keyboards/minidox/keymaps/dustypomerleau/config.h create mode 100644 keyboards/minidox/keymaps/dustypomerleau/keymap.c create mode 100644 keyboards/minidox/keymaps/dustypomerleau/rules.mk create mode 100644 keyboards/minidox/keymaps/norman/config.h create mode 100644 keyboards/minidox/keymaps/norman/keymap.c create mode 100644 keyboards/minidox/keymaps/norman/readme.md create mode 100644 keyboards/mt980/config.h create mode 100644 keyboards/mt980/info.json create mode 100644 keyboards/mt980/keymaps/default/keymap.c create mode 100644 keyboards/mt980/keymaps/walker/config.h create mode 100644 keyboards/mt980/keymaps/walker/keymap.c create mode 100644 keyboards/mt980/keymaps/walker/rules.mk create mode 100644 keyboards/mt980/mt980.c create mode 100644 keyboards/mt980/mt980.h create mode 100644 keyboards/mt980/readme.md create mode 100644 keyboards/mt980/rules.mk create mode 100644 keyboards/mxss/rgblight.h rename keyboards/namecard2x4/{ => rev1}/config.h (99%) rename keyboards/namecard2x4/{ => rev1}/rules.mk (100%) create mode 100644 keyboards/namecard2x4/rev2/config.h create mode 100644 keyboards/namecard2x4/rev2/rules.mk create mode 100644 keyboards/nek_type_a/config.h create mode 100644 keyboards/nek_type_a/info.json create mode 100644 keyboards/nek_type_a/keymaps/default/config.h create mode 100644 keyboards/nek_type_a/keymaps/default/keymap.c create mode 100644 keyboards/nek_type_a/keymaps/default/readme.md rename keyboards/{zen => nek_type_a}/matrix.c (64%) create mode 100644 keyboards/nek_type_a/mcp23017.c create mode 100644 keyboards/nek_type_a/mcp23017.h create mode 100644 keyboards/nek_type_a/nek_type_a.c create mode 100644 keyboards/nek_type_a/nek_type_a.h create mode 100644 keyboards/nek_type_a/readme.md create mode 100644 keyboards/nek_type_a/rules.mk create mode 100644 keyboards/niu_mini/keymaps/yttyx/README.md create mode 100644 keyboards/niu_mini/keymaps/yttyx/config.h create mode 100644 keyboards/niu_mini/keymaps/yttyx/keymap.c create mode 100644 keyboards/niu_mini/keymaps/yttyx/rules.mk rename keyboards/{dztech => nk65}/boards/GENERIC_STM32_F303XC/board.c (100%) mode change 100644 => 100755 rename keyboards/{dztech => nk65}/boards/GENERIC_STM32_F303XC/board.h (99%) mode change 100644 => 100755 rename keyboards/{dztech => nk65}/boards/GENERIC_STM32_F303XC/board.mk (100%) mode change 100644 => 100755 rename keyboards/{dztech/dz60rgb => nk65}/bootloader_defs.h (100%) mode change 100644 => 100755 create mode 100755 keyboards/nk65/chconf.h create mode 100755 keyboards/nk65/config.h create mode 100755 keyboards/nk65/halconf.h create mode 100755 keyboards/nk65/info.json create mode 100755 keyboards/nk65/keymaps/default/keymap.c create mode 100755 keyboards/nk65/keymaps/default/readme.md create mode 100755 keyboards/nk65/keymaps/default_via/keymap.c create mode 100755 keyboards/nk65/keymaps/default_via/readme.md create mode 100755 keyboards/nk65/keymaps/default_via/rules.mk create mode 100755 keyboards/nk65/mcuconf.h create mode 100755 keyboards/nk65/nk65.c create mode 100755 keyboards/nk65/nk65.h create mode 100755 keyboards/nk65/readme.md create mode 100755 keyboards/nk65/rules.mk create mode 100644 keyboards/nomu30/config.h create mode 100644 keyboards/nomu30/info.json create mode 100644 keyboards/nomu30/keymaps/center_sprit/config.h create mode 100644 keyboards/nomu30/keymaps/center_sprit/keymap.c create mode 100644 keyboards/nomu30/keymaps/center_sprit/readme.md create mode 100644 keyboards/nomu30/keymaps/center_sprit/rules.mk create mode 100644 keyboards/nomu30/keymaps/default/config.h create mode 100644 keyboards/nomu30/keymaps/default/keymap.c create mode 100644 keyboards/nomu30/keymaps/default/readme.md create mode 100644 keyboards/nomu30/keymaps/like_jis/config.h create mode 100644 keyboards/nomu30/keymaps/like_jis/keymap.c create mode 100644 keyboards/nomu30/keymaps/like_jis/readme.md create mode 100644 keyboards/nomu30/keymaps/like_jis/rules.mk create mode 100644 keyboards/nomu30/nomu30.c create mode 100644 keyboards/nomu30/nomu30.h create mode 100644 keyboards/nomu30/readme.md create mode 100644 keyboards/nomu30/rules.mk create mode 100644 keyboards/noxary/220/220.c create mode 100644 keyboards/noxary/220/220.h create mode 100644 keyboards/noxary/220/config.h create mode 100644 keyboards/noxary/220/info.json create mode 100644 keyboards/noxary/220/keymaps/default/config.h create mode 100644 keyboards/noxary/220/keymaps/default/keymap.c create mode 100644 keyboards/noxary/220/keymaps/default/readme.md create mode 100644 keyboards/noxary/220/readme.md create mode 100644 keyboards/noxary/220/rules.mk create mode 100644 keyboards/noxary/260/260.c create mode 100644 keyboards/noxary/260/260.h create mode 100644 keyboards/noxary/260/config.h create mode 100644 keyboards/noxary/260/info.json create mode 100644 keyboards/noxary/260/keymaps/default/config.h create mode 100644 keyboards/noxary/260/keymaps/default/keymap.c create mode 100644 keyboards/noxary/260/keymaps/default/readme.md create mode 100644 keyboards/noxary/260/readme.md create mode 100644 keyboards/noxary/260/rules.mk create mode 100644 keyboards/noxary/280/280.c create mode 100644 keyboards/noxary/280/280.h create mode 100644 keyboards/noxary/280/config.h create mode 100644 keyboards/noxary/280/info.json create mode 100644 keyboards/noxary/280/keymaps/default/config.h create mode 100644 keyboards/noxary/280/keymaps/default/keymap.c create mode 100644 keyboards/noxary/280/keymaps/default/readme.md create mode 100644 keyboards/noxary/280/readme.md create mode 100644 keyboards/noxary/280/rules.mk create mode 100644 keyboards/org60/keymaps/jarred/keymap.c delete mode 100644 keyboards/orthodox/serial.c delete mode 100644 keyboards/orthodox/serial.h delete mode 100644 keyboards/orthodox/split_util.h delete mode 100644 keyboards/panc60/i2c.c delete mode 100644 keyboards/panc60/i2c.h delete mode 100644 keyboards/panc60/matrix.c delete mode 100644 keyboards/pearl/README.md delete mode 100644 keyboards/pearl/i2c.c delete mode 100644 keyboards/pearl/i2c.h delete mode 100644 keyboards/pearl/matrix.c create mode 100644 keyboards/pearl/readme.md create mode 100644 keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c create mode 100644 keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.h create mode 100644 keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk create mode 100644 keyboards/peiorisboards/ixora/bootloader_defs.h create mode 100644 keyboards/peiorisboards/ixora/chconf.h create mode 100644 keyboards/peiorisboards/ixora/config.h create mode 100644 keyboards/peiorisboards/ixora/halconf.h create mode 100644 keyboards/peiorisboards/ixora/info.json create mode 100644 keyboards/peiorisboards/ixora/ixora.c create mode 100644 keyboards/peiorisboards/ixora/ixora.h create mode 100644 keyboards/peiorisboards/ixora/keymaps/default/keymap.c create mode 100644 keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c create mode 100644 keyboards/peiorisboards/ixora/mcuconf.h create mode 100644 keyboards/peiorisboards/ixora/readme.md create mode 100644 keyboards/peiorisboards/ixora/rules.mk create mode 100644 keyboards/plaid/config.h create mode 100644 keyboards/plaid/info.json create mode 100644 keyboards/plaid/keymaps/default/config.h create mode 100644 keyboards/plaid/keymaps/default/keymap.c create mode 100644 keyboards/plaid/keymaps/default/readme.md create mode 100644 keyboards/plaid/plaid.c create mode 100644 keyboards/plaid/plaid.h create mode 100644 keyboards/plaid/readme.md create mode 100644 keyboards/plaid/rules.mk create mode 100644 keyboards/plaid/usbconfig.h create mode 100644 keyboards/plain60/keymaps/RGB/config.h create mode 100644 keyboards/plain60/keymaps/RGB/keymap.c create mode 100644 keyboards/plain60/keymaps/RGB/rules.mk create mode 100644 keyboards/planck/ez/config.h create mode 100644 keyboards/planck/ez/ez.c create mode 100644 keyboards/planck/ez/ez.h rename keyboards/planck/{ => ez}/rules.mk (56%) create mode 100644 keyboards/planck/keymaps/buhearns/config.h create mode 100644 keyboards/planck/keymaps/buhearns/keymap.c create mode 100644 keyboards/planck/keymaps/buhearns/readme.md create mode 100644 keyboards/planck/keymaps/buhearns/rules.mk create mode 100644 keyboards/planck/keymaps/callum/config.h rename keyboards/planck/keymaps/cbbrowne/{readme.md => readme.org} (70%) create mode 100644 keyboards/planck/keymaps/dcompact/readme.md create mode 100644 keyboards/planck/keymaps/dsanchezseco/config.h create mode 100644 keyboards/planck/keymaps/dsanchezseco/keymap.c create mode 100644 keyboards/planck/keymaps/dsanchezseco/readme.md create mode 100644 keyboards/planck/keymaps/dsanchezseco/rules.mk create mode 100644 keyboards/planck/keymaps/fsck/config.h create mode 100644 keyboards/planck/keymaps/fsck/keymap.c create mode 100644 keyboards/planck/keymaps/fsck/readme.md create mode 100644 keyboards/planck/keymaps/fsck/rules.mk create mode 100644 keyboards/planck/keymaps/juno/config.h create mode 100644 keyboards/planck/keymaps/juno/keymap.c create mode 100644 keyboards/planck/keymaps/juno/readme.md create mode 100644 keyboards/planck/keymaps/juno/rules.mk create mode 100644 keyboards/planck/keymaps/motform/config.h create mode 100644 keyboards/planck/keymaps/motform/keymap.c create mode 100644 keyboards/planck/keymaps/motform/readme.md create mode 100644 keyboards/planck/keymaps/motform/rules.mk create mode 100644 keyboards/planck/keymaps/msiu/config.h create mode 100644 keyboards/planck/keymaps/msiu/keymap.c create mode 100644 keyboards/planck/keymaps/msiu/readme.md create mode 100644 keyboards/planck/keymaps/msiu/rules.mk create mode 100644 keyboards/planck/keymaps/oeywil/.gitignore create mode 100644 keyboards/planck/keymaps/oeywil/config.h create mode 100644 keyboards/planck/keymaps/oeywil/keymap.c create mode 100644 keyboards/planck/keymaps/oeywil/no_keycodes.h create mode 100644 keyboards/planck/keymaps/oeywil/readme.md create mode 100644 keyboards/planck/keymaps/oeywil/rules.mk create mode 100644 keyboards/planck/keymaps/rjhilgefort/config.h create mode 100644 keyboards/planck/keymaps/rjhilgefort/keymap.c create mode 100644 keyboards/planck/keymaps/rjhilgefort/readme.md create mode 100644 keyboards/planck/keymaps/rjhilgefort/rules.mk create mode 100644 keyboards/planck/keymaps/roguepullrequest/config.h create mode 100644 keyboards/planck/keymaps/roguepullrequest/keymap.c create mode 100644 keyboards/planck/keymaps/roguepullrequest/readme.md create mode 100644 keyboards/planck/keymaps/roguepullrequest/rules.mk create mode 100644 keyboards/planck/keymaps/samuel/README.org create mode 100644 keyboards/planck/keymaps/samuel/config.h create mode 100644 keyboards/planck/keymaps/samuel/keymap.c create mode 100644 keyboards/planck/keymaps/tom/config.h create mode 100644 keyboards/planck/keymaps/tom/keymap.c create mode 100644 keyboards/planck/keymaps/tom/readme.md create mode 100644 keyboards/planck/keymaps/tom/rules.mk create mode 100644 keyboards/planck/keymaps/vxid/config.h create mode 100644 keyboards/planck/keymaps/vxid/keymap.c create mode 100644 keyboards/planck/keymaps/vxid/readme.md create mode 100644 keyboards/playkbtw/pk60/keymaps/rfvizarra/keymap.c create mode 100644 keyboards/playkbtw/pk60/keymaps/rfvizarra/readme.md create mode 100644 keyboards/preonic/keymaps/fsck/config.h create mode 100644 keyboards/preonic/keymaps/fsck/keymap.c create mode 100644 keyboards/preonic/keymaps/fsck/readme.md create mode 100644 keyboards/preonic/keymaps/fsck/rules.mk create mode 100644 keyboards/preonic/keymaps/juno/config.h create mode 100644 keyboards/preonic/keymaps/juno/keymap.c create mode 100644 keyboards/preonic/keymaps/juno/readme.md create mode 100644 keyboards/preonic/keymaps/juno/rules.mk create mode 100644 keyboards/preonic/keymaps/mikethetiger/config.h create mode 100644 keyboards/preonic/keymaps/mikethetiger/keymap.c create mode 100644 keyboards/preonic/keymaps/mikethetiger/readme.md create mode 100644 keyboards/preonic/keymaps/mikethetiger/rules.mk create mode 100644 keyboards/preonic/keymaps/spacebarracecar/config.h create mode 100644 keyboards/preonic/keymaps/spacebarracecar/keymap.c rename keyboards/{fc660c => preonic}/keymaps/spacebarracecar/readme.md (51%) create mode 100644 keyboards/preonic/keymaps/spacebarracecar/rules.mk create mode 100644 keyboards/preonic/keymaps/xulkal/keymap.c create mode 100644 keyboards/preonic/keymaps/xulkal/rules.mk create mode 100644 keyboards/primekb/prime_e/config.h create mode 100644 keyboards/primekb/prime_e/info.json create mode 100644 keyboards/primekb/prime_e/keymaps/default/keymap.c create mode 100644 keyboards/primekb/prime_e/keymaps/default/readme.md create mode 100644 keyboards/primekb/prime_e/keymaps/via/keymap.c create mode 100644 keyboards/primekb/prime_e/keymaps/via/readme.md create mode 100644 keyboards/primekb/prime_e/keymaps/via/rules.mk create mode 100644 keyboards/primekb/prime_e/prime_e.c create mode 100644 keyboards/primekb/prime_e/prime_e.h create mode 100644 keyboards/primekb/prime_e/readme.md create mode 100644 keyboards/primekb/prime_e/rules.mk create mode 100644 keyboards/primekb/prime_m/keymaps/numpad/config.h create mode 100644 keyboards/primekb/prime_m/keymaps/numpad/keymap.c create mode 100644 keyboards/primekb/prime_m/keymaps/numpad/readme.md create mode 100644 keyboards/projectkb/alice/alice.c create mode 100644 keyboards/projectkb/alice/alice.h create mode 100644 keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c create mode 100644 keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h create mode 100644 keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.mk create mode 100644 keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg create mode 100644 keyboards/projectkb/alice/bootloader_defs.h create mode 100644 keyboards/projectkb/alice/chconf.h create mode 100644 keyboards/projectkb/alice/config.h create mode 100644 keyboards/projectkb/alice/halconf.h create mode 100644 keyboards/projectkb/alice/keymaps/default/keymap.c create mode 100644 keyboards/projectkb/alice/mcuconf.h create mode 100644 keyboards/projectkb/alice/readme.md create mode 100644 keyboards/projectkb/alice/rules.mk delete mode 100644 keyboards/ps2avrGB/README.md delete mode 100644 keyboards/ps2avrGB/bmini.h delete mode 100644 keyboards/ps2avrGB/i2c.c delete mode 100644 keyboards/ps2avrGB/i2c.h delete mode 100644 keyboards/ps2avrGB/keymaps/default/keymap.c delete mode 100644 keyboards/ps2avrGB/matrix.c delete mode 100755 keyboards/ps2avrGB/program delete mode 100644 keyboards/ps2avrGB/ps2avrGB.c delete mode 100644 keyboards/ps2avrGB/ps2avrGB.h create mode 100644 keyboards/quantrik/kyuu/config.h create mode 100644 keyboards/quantrik/kyuu/info.json create mode 100644 keyboards/quantrik/kyuu/keymaps/default/config.h create mode 100644 keyboards/quantrik/kyuu/keymaps/default/keymap.c create mode 100644 keyboards/quantrik/kyuu/keymaps/default/readme.md create mode 100644 keyboards/quantrik/kyuu/kyuu.c create mode 100644 keyboards/quantrik/kyuu/kyuu.h create mode 100644 keyboards/quantrik/kyuu/readme.md create mode 100644 keyboards/quantrik/kyuu/rules.mk delete mode 100644 keyboards/quefrency/info.json create mode 100644 keyboards/rama/koyu/config.h create mode 100644 keyboards/rama/koyu/info.json create mode 100644 keyboards/rama/koyu/keymaps/default/keymap.c create mode 100644 keyboards/rama/koyu/koyu.c create mode 100644 keyboards/rama/koyu/koyu.h create mode 100644 keyboards/rama/koyu/readme.md create mode 100644 keyboards/rama/koyu/rules.mk create mode 100644 keyboards/redox/keymaps/fculpo/config.h create mode 100644 keyboards/redox/keymaps/fculpo/keymap.c create mode 100644 keyboards/redox/keymaps/fculpo/keymap.json create mode 100644 keyboards/redox/keymaps/fculpo/readme.md rename keyboards/{zen/keymaps/jwlawrence => redox/keymaps/fculpo}/rules.mk (50%) rename keyboards/{zen/keymaps/default => redox/keymaps/nrichers}/config.h (85%) mode change 100644 => 100755 create mode 100755 keyboards/redox/keymaps/nrichers/keymap.c create mode 100644 keyboards/redox/keymaps/nrichers/keymap.png create mode 100755 keyboards/redox/keymaps/nrichers/readme.md rename keyboards/{zen/keymaps/xyverz => redox/keymaps/nrichers}/rules.mk (50%) mode change 100644 => 100755 create mode 100644 keyboards/rgbkb/sol/common/glcdfont.c create mode 100644 keyboards/rgbkb/sol/config.h rename keyboards/{sol/keymaps/danielhklein => rgbkb/sol/keymaps/brianweyer}/config.h (100%) rename keyboards/{ => rgbkb}/sol/keymaps/brianweyer/keymap.c (76%) mode change 100755 => 100644 rename keyboards/{sol/keymaps/kageurufu => rgbkb/sol/keymaps/brianweyer}/rules.mk (77%) rename keyboards/{sol/keymaps/default => rgbkb/sol/keymaps/danielhklein}/config.h (100%) rename keyboards/{ => rgbkb}/sol/keymaps/danielhklein/keymap.c (81%) rename keyboards/{sol/keymaps/default => rgbkb/sol/keymaps/danielhklein}/rules.mk (85%) rename keyboards/{sol/keymaps/brianweyer => rgbkb/sol/keymaps/default}/config.h (97%) mode change 100755 => 100644 create mode 100644 keyboards/rgbkb/sol/keymaps/default/keymap.c create mode 100644 keyboards/rgbkb/sol/keymaps/default/readme.md rename keyboards/{sol/keymaps/danielhklein => rgbkb/sol/keymaps/default}/rules.mk (85%) rename keyboards/{ => rgbkb}/sol/keymaps/kageurufu/keymap.c (88%) rename keyboards/{sol/keymaps/brianweyer => rgbkb/sol/keymaps/kageurufu}/rules.mk (70%) mode change 100755 => 100644 create mode 100644 keyboards/rgbkb/sol/keymaps/xulkal/keymap.c create mode 100644 keyboards/rgbkb/sol/keymaps/xulkal/rules.mk rename keyboards/{ => rgbkb}/sol/readme.md (97%) create mode 100644 keyboards/rgbkb/sol/rev1/config.h rename keyboards/{ => rgbkb}/sol/rev1/info.json (91%) create mode 100644 keyboards/rgbkb/sol/rev1/rev1.c create mode 100644 keyboards/rgbkb/sol/rev1/rev1.h create mode 100644 keyboards/rgbkb/sol/rev1/rules.mk rename keyboards/{ => rgbkb}/sol/rules.mk (94%) rename keyboards/{ => rgbkb}/sol/sol.c (100%) rename keyboards/{sol/rev1/rev1.h => rgbkb/sol/sol.h} (73%) create mode 100644 keyboards/rgbkb/zen/common/glcdfont.c rename keyboards/{ => rgbkb}/zen/config.h (79%) create mode 100644 keyboards/rgbkb/zen/readme.md rename keyboards/{ => rgbkb}/zen/rev1/config.h (86%) rename keyboards/{zen => rgbkb/zen/rev1}/info.json (100%) rename keyboards/{zen => rgbkb/zen/rev1}/keymaps/333fred/config.h (100%) rename keyboards/{zen => rgbkb/zen/rev1}/keymaps/333fred/keymap.c (100%) rename keyboards/{zen => rgbkb/zen/rev1}/keymaps/333fred/rules.mk (85%) rename keyboards/{zen/keymaps/jwlawrence => rgbkb/zen/rev1/keymaps/default}/config.h (95%) rename keyboards/{zen => rgbkb/zen/rev1}/keymaps/default/keymap.c (97%) create mode 100644 keyboards/rgbkb/zen/rev1/keymaps/default/rules.mk rename keyboards/{nyquist/keymaps/mtdjr => rgbkb/zen/rev1/keymaps/jwlawrence}/config.h (95%) rename keyboards/{zen => rgbkb/zen/rev1}/keymaps/jwlawrence/keymap.c (98%) create mode 100644 keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/rules.mk rename keyboards/{zen => rgbkb/zen/rev1}/keymaps/kageurufu/keymap.c (98%) rename keyboards/{zen => rgbkb/zen/rev1}/keymaps/xyverz/config.h (94%) rename keyboards/{zen => rgbkb/zen/rev1}/keymaps/xyverz/keymap.c (98%) create mode 100644 keyboards/rgbkb/zen/rev1/keymaps/xyverz/rules.mk rename keyboards/{ => rgbkb}/zen/rev1/rev1.c (100%) rename keyboards/{ => rgbkb}/zen/rev1/rev1.h (96%) create mode 100644 keyboards/rgbkb/zen/rev1/rules.mk create mode 100644 keyboards/rgbkb/zen/rev2/config.h create mode 100644 keyboards/rgbkb/zen/rev2/info.json create mode 100644 keyboards/rgbkb/zen/rev2/keymaps/debug/keymap.c create mode 100644 keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c create mode 100644 keyboards/rgbkb/zen/rev2/rev2.c create mode 100644 keyboards/rgbkb/zen/rev2/rev2.h create mode 100644 keyboards/rgbkb/zen/rev2/rules.mk create mode 100644 keyboards/rgbkb/zen/rules.mk rename keyboards/{ => rgbkb}/zen/zen.c (100%) create mode 100644 keyboards/rgbkb/zen/zen.h rename keyboards/{sol => rgbkb/zygomorph}/common/glcdfont.c (100%) rename keyboards/{quefrency => rgbkb/zygomorph}/config.h (87%) create mode 100644 keyboards/rgbkb/zygomorph/keymaps/5x6pad/keymap.c create mode 100644 keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk create mode 100644 keyboards/rgbkb/zygomorph/keymaps/default/config.h create mode 100644 keyboards/rgbkb/zygomorph/keymaps/default/keymap.c create mode 100644 keyboards/rgbkb/zygomorph/keymaps/default/readme.md create mode 100644 keyboards/rgbkb/zygomorph/keymaps/default/rules.mk create mode 100644 keyboards/rgbkb/zygomorph/keymaps/default_oled/config.h create mode 100644 keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c create mode 100644 keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk create mode 100644 keyboards/rgbkb/zygomorph/keymaps/kageurufu/config.h create mode 100644 keyboards/rgbkb/zygomorph/keymaps/kageurufu/keymap.c rename keyboards/{sol/keymaps/default => rgbkb/zygomorph/keymaps/kageurufu}/readme.md (97%) create mode 100644 keyboards/rgbkb/zygomorph/keymaps/kageurufu/rules.mk create mode 100644 keyboards/rgbkb/zygomorph/keymaps/xulkal/config.h create mode 100644 keyboards/rgbkb/zygomorph/keymaps/xulkal/keymap.c create mode 100644 keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk create mode 100644 keyboards/rgbkb/zygomorph/readme.md create mode 100644 keyboards/rgbkb/zygomorph/rev1/config.h create mode 100644 keyboards/rgbkb/zygomorph/rev1/info.json create mode 100644 keyboards/rgbkb/zygomorph/rev1/rev1.c create mode 100644 keyboards/rgbkb/zygomorph/rev1/rev1.h create mode 100644 keyboards/rgbkb/zygomorph/rev1/rules.mk create mode 100644 keyboards/rgbkb/zygomorph/rules.mk create mode 100644 keyboards/rgbkb/zygomorph/zygomorph.c rename keyboards/{zen/zen.h => rgbkb/zygomorph/zygomorph.h} (52%) create mode 100644 keyboards/romac/config.h create mode 100644 keyboards/romac/info.json create mode 100644 keyboards/romac/keymaps/default/keymap.c create mode 100644 keyboards/romac/keymaps/stanrc85/config.h create mode 100644 keyboards/romac/keymaps/stanrc85/keymap.c create mode 100644 keyboards/romac/keymaps/stanrc85/rules.mk create mode 100644 keyboards/romac/readme.md create mode 100644 keyboards/romac/romac.c create mode 100644 keyboards/romac/romac.h create mode 100644 keyboards/romac/rules.mk create mode 100644 keyboards/satan/keymaps/no_caps_lock/keymap.c create mode 100644 keyboards/satan/keymaps/no_caps_lock/readme.md delete mode 100644 keyboards/satan/pinout.txt create mode 100644 keyboards/scythe/config.h create mode 100644 keyboards/scythe/info.json create mode 100644 keyboards/scythe/keymaps/default/config.h create mode 100644 keyboards/scythe/keymaps/default/keymap.c create mode 100644 keyboards/scythe/keymaps/default/readme.md create mode 100644 keyboards/scythe/keymaps/forties/config.h create mode 100644 keyboards/scythe/keymaps/forties/keymap.c create mode 100644 keyboards/scythe/keymaps/forties/readme.md create mode 100644 keyboards/scythe/readme.md create mode 100644 keyboards/scythe/rules.mk create mode 100644 keyboards/scythe/scythe.c create mode 100644 keyboards/scythe/scythe.h rename keyboards/sentraq/s60_x/{default => }/info.json (87%) delete mode 100644 keyboards/sentraq/s60_x/rgb/info.json delete mode 100644 keyboards/sentraq/s60_x/s60_x.c delete mode 100644 keyboards/sentraq/s60_x/s60_x.h create mode 100644 keyboards/signum/3_0/elitec/config.h create mode 100644 keyboards/signum/3_0/elitec/elitec.c create mode 100644 keyboards/signum/3_0/elitec/elitec.h create mode 100644 keyboards/signum/3_0/elitec/info.json create mode 100755 keyboards/signum/3_0/elitec/keymaps/default/generate_km.py create mode 100644 keyboards/signum/3_0/elitec/keymaps/default/keymap.c create mode 100644 keyboards/signum/3_0/elitec/keymaps/default/km_template.txt create mode 100644 keyboards/signum/3_0/elitec/keymaps/default/layout.py create mode 100644 keyboards/signum/3_0/elitec/keymaps/default/readme.md create mode 100644 keyboards/signum/3_0/elitec/keymaps/default/rules.mk create mode 100644 keyboards/signum/3_0/elitec/readme.md create mode 100644 keyboards/signum/3_0/elitec/rules.mk delete mode 100644 keyboards/singa/i2c.c delete mode 100644 keyboards/singa/i2c.h delete mode 100644 keyboards/singa/matrix.c delete mode 100644 keyboards/sirius/unigo66/README.md delete mode 100644 keyboards/sol/common/knob_v2.c delete mode 100644 keyboards/sol/common/knob_v2.h delete mode 100644 keyboards/sol/keymaps/default/keymap.c delete mode 100644 keyboards/sol/rev1/rules.mk delete mode 100644 keyboards/sol/rev1/split_util.c delete mode 100644 keyboards/sol/serial.c delete mode 100644 keyboards/sol/serial.h delete mode 100644 keyboards/sol/sol.h create mode 100644 keyboards/standaside/config.h create mode 100644 keyboards/standaside/keymaps/default/config.h create mode 100644 keyboards/standaside/keymaps/default/keymap.c create mode 100644 keyboards/standaside/readme.md create mode 100644 keyboards/standaside/rules.mk create mode 100644 keyboards/standaside/standaside.c create mode 100644 keyboards/standaside/standaside.h delete mode 100644 keyboards/staryu/backlight_staryu.c create mode 100755 keyboards/tada68/keymaps/kbp-v60/keymap.c create mode 100755 keyboards/tada68/keymaps/kbp-v60/readme.md create mode 100644 keyboards/tada68/keymaps/kbp-v60/rules.mk create mode 100644 keyboards/tada68/keymaps/mattgemmell/config.h create mode 100644 keyboards/tada68/keymaps/mattgemmell/keymap.c create mode 100644 keyboards/tada68/keymaps/mattgemmell/readme.md create mode 100644 keyboards/tada68/keymaps/mattgemmell/rules.mk mode change 100644 => 100755 keyboards/tetris/config.h mode change 100644 => 100755 keyboards/tetris/keymaps/default/keymap.c mode change 100644 => 100755 keyboards/tetris/rules.mk mode change 100644 => 100755 keyboards/tetris/tetris.c mode change 100644 => 100755 keyboards/tetris/tetris.h create mode 100644 keyboards/thevankeyboards/minivan/keymaps/king/keymap.c create mode 100644 keyboards/thevankeyboards/minivan/keymaps/king/readme.md create mode 100644 keyboards/thevankeyboards/minivan/keymaps/king/rules.mk create mode 100644 keyboards/thevankeyboards/minivan/keymaps/like_jis/config.h create mode 100644 keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c create mode 100644 keyboards/thevankeyboards/minivan/keymaps/like_jis/readme.md create mode 100644 keyboards/thevankeyboards/minivan/keymaps/like_jis/rules.mk create mode 100644 keyboards/tmo50/keymaps/olivia/keymap.c create mode 100644 keyboards/tmo50/keymaps/pyrol/keymap.c create mode 100644 keyboards/touchpad/info.json create mode 100644 keyboards/treadstone32/config.h create mode 100644 keyboards/treadstone32/info.json create mode 100644 keyboards/treadstone32/keymaps/default/config.h create mode 100644 keyboards/treadstone32/keymaps/default/keymap.c create mode 100644 keyboards/treadstone32/keymaps/default/readme.md create mode 100644 keyboards/treadstone32/keymaps/default/readme_jp.md create mode 100644 keyboards/treadstone32/keymaps/default/rules.mk create mode 100644 keyboards/treadstone32/keymaps/like_jis/config.h create mode 100644 keyboards/treadstone32/keymaps/like_jis/keymap.c create mode 100644 keyboards/treadstone32/keymaps/like_jis/readme.md create mode 100644 keyboards/treadstone32/keymaps/like_jis/readme_jp.md create mode 100644 keyboards/treadstone32/keymaps/like_jis/rules.mk create mode 100644 keyboards/treadstone32/readme.md create mode 100644 keyboards/treadstone32/rules.mk create mode 100644 keyboards/treadstone32/treadstone32.c create mode 100644 keyboards/treadstone32/treadstone32.h create mode 100644 keyboards/treadstone48/common/glcdfont.c create mode 100644 keyboards/treadstone48/common/oled_helper.c create mode 100644 keyboards/treadstone48/common/oled_helper.h create mode 100644 keyboards/treadstone48/config.h rename keyboards/{ergodash => treadstone48}/i2c.c (98%) rename keyboards/{bfo9000 => treadstone48}/i2c.h (94%) create mode 100644 keyboards/treadstone48/keymaps/default/config.h create mode 100644 keyboards/treadstone48/keymaps/default/keymap.c create mode 100644 keyboards/treadstone48/keymaps/default/readme.md create mode 100644 keyboards/treadstone48/keymaps/default/readme_jp.md create mode 100644 keyboards/treadstone48/keymaps/default/rules.mk create mode 100644 keyboards/treadstone48/keymaps/like_jis/config.h create mode 100644 keyboards/treadstone48/keymaps/like_jis/keymap.c create mode 100644 keyboards/treadstone48/keymaps/like_jis/readme.md create mode 100644 keyboards/treadstone48/keymaps/like_jis/readme_jp.md create mode 100644 keyboards/treadstone48/keymaps/like_jis/rules.mk create mode 100644 keyboards/treadstone48/keymaps/like_jis_rs/config.h create mode 100644 keyboards/treadstone48/keymaps/like_jis_rs/keymap.c create mode 100644 keyboards/treadstone48/keymaps/like_jis_rs/readme.md create mode 100644 keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md create mode 100644 keyboards/treadstone48/keymaps/like_jis_rs/rules.mk create mode 100644 keyboards/treadstone48/pro_micro.h create mode 100644 keyboards/treadstone48/readme.md rename keyboards/{sol => treadstone48}/rev1/config.h (64%) create mode 100644 keyboards/treadstone48/rev1/info.json rename keyboards/{orthodox => treadstone48/rev1}/matrix.c (72%) rename keyboards/{sol => treadstone48}/rev1/rev1.c (89%) create mode 100644 keyboards/treadstone48/rev1/rev1.h create mode 100644 keyboards/treadstone48/rev1/rules.mk create mode 100644 keyboards/treadstone48/rev1/serial_config.h create mode 100644 keyboards/treadstone48/rev1/serial_config_simpleapi.h create mode 100644 keyboards/treadstone48/rev1/split_scomm.c create mode 100644 keyboards/treadstone48/rev1/split_scomm.h rename keyboards/{bfo9000 => treadstone48/rev1}/split_util.c (79%) rename keyboards/{sol => treadstone48}/rev1/split_util.h (79%) create mode 100644 keyboards/treadstone48/rules.mk create mode 100644 keyboards/treadstone48/serial.c create mode 100644 keyboards/treadstone48/serial.h rename keyboards/{sol/common => treadstone48}/ssd1306.c (95%) rename keyboards/{sol/common => treadstone48}/ssd1306.h (95%) create mode 100644 keyboards/treadstone48/treadstone48.c create mode 100644 keyboards/treadstone48/treadstone48.h create mode 100644 keyboards/ut472/config.h create mode 100644 keyboards/ut472/info.json create mode 100644 keyboards/ut472/keymaps/default/config.h create mode 100644 keyboards/ut472/keymaps/default/keymap.c create mode 100644 keyboards/ut472/keymaps/default/readme.md create mode 100644 keyboards/ut472/readme.md create mode 100644 keyboards/ut472/rules.mk create mode 100644 keyboards/ut472/ut472.c create mode 100644 keyboards/ut472/ut472.h rename keyboards/{ergodash/rev2 => v60_type_r/keymaps/default}/rules.mk (100%) create mode 100644 keyboards/vitamins_included/keymaps/juno/keymap.c create mode 100644 keyboards/vitamins_included/keymaps/juno/rules.mk create mode 100644 keyboards/vitamins_included/keymaps/numpad/config.h create mode 100644 keyboards/vitamins_included/keymaps/numpad/keymap.c delete mode 100644 keyboards/viterbi/keymaps/drashna_old/config.h delete mode 100644 keyboards/viterbi/keymaps/drashna_old/rules.mk create mode 100644 keyboards/waldo/config.h create mode 100644 keyboards/waldo/info.json create mode 100644 keyboards/waldo/keymaps/default/keymap.c create mode 100644 keyboards/waldo/keymaps/default/readme.md create mode 100644 keyboards/waldo/keymaps/default/rules.mk rename keyboards/{chocopad/keymaps/khord => waldo/keymaps/default_split_shft_bck}/config.h (67%) create mode 100644 keyboards/waldo/keymaps/default_split_shft_bck/keymap.c create mode 100644 keyboards/waldo/keymaps/default_split_shft_bck/readme.md create mode 100644 keyboards/waldo/keymaps/default_split_shft_bck/rules.mk create mode 100644 keyboards/waldo/readme.md create mode 100644 keyboards/waldo/rules.mk create mode 100644 keyboards/waldo/waldo.c create mode 100644 keyboards/waldo/waldo.h create mode 100644 keyboards/wasdat/config.h create mode 100644 keyboards/wasdat/info.json create mode 100644 keyboards/wasdat/keymaps/default/keymap.c create mode 100644 keyboards/wasdat/keymaps/default/readme.md create mode 100644 keyboards/wasdat/keymaps/default_iso/keymap.c create mode 100644 keyboards/wasdat/keymaps/default_iso/readme.md create mode 100644 keyboards/wasdat/matrix.c create mode 100644 keyboards/wasdat/readme.md create mode 100644 keyboards/wasdat/rules.mk create mode 100644 keyboards/wasdat/wasdat.c create mode 100644 keyboards/wasdat/wasdat.h create mode 100644 keyboards/westfoxtrot/cypher/config.h create mode 100644 keyboards/westfoxtrot/cypher/cypher.c create mode 100644 keyboards/westfoxtrot/cypher/cypher.h create mode 100644 keyboards/westfoxtrot/cypher/info.json create mode 100644 keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h create mode 100644 keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c create mode 100644 keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md create mode 100644 keyboards/westfoxtrot/cypher/keymaps/default/config.h create mode 100644 keyboards/westfoxtrot/cypher/keymaps/default/keymap.c create mode 100644 keyboards/westfoxtrot/cypher/keymaps/default/readme.md create mode 100644 keyboards/westfoxtrot/cypher/keymaps/kwer/config.h create mode 100644 keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c create mode 100644 keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md create mode 100644 keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk create mode 100644 keyboards/westfoxtrot/cypher/readme.md create mode 100644 keyboards/westfoxtrot/cypher/rules.mk create mode 100644 keyboards/wilba_tech/wt60_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt65_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt69_a/config.h create mode 100644 keyboards/wilba_tech/wt69_a/info.json create mode 100644 keyboards/wilba_tech/wt69_a/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt69_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt69_a/readme.md create mode 100644 keyboards/wilba_tech/wt69_a/rules.mk create mode 100644 keyboards/wilba_tech/wt69_a/wt69_a.c create mode 100644 keyboards/wilba_tech/wt69_a/wt69_a.h create mode 100644 keyboards/wilba_tech/wt75_a/config.h create mode 100644 keyboards/wilba_tech/wt75_a/info.json create mode 100644 keyboards/wilba_tech/wt75_a/keymaps/default/keymap.c create mode 100644 keyboards/wilba_tech/wt75_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt75_a/readme.md create mode 100644 keyboards/wilba_tech/wt75_a/rules.mk create mode 100644 keyboards/wilba_tech/wt75_a/wt75_a.c create mode 100644 keyboards/wilba_tech/wt75_a/wt75_a.h create mode 100644 keyboards/wilba_tech/wt80_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk create mode 100644 keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c create mode 100644 keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk create mode 100644 keyboards/wilba_tech/wt8_a/keymaps/via/keymap.c create mode 100644 keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk rename keyboards/{ => winkeyless}/bface/README.md (82%) rename keyboards/{ => winkeyless}/bface/backlight_ps2avrGB.c (100%) rename keyboards/{ => winkeyless}/bface/backlight_ps2avrGB.h (100%) rename keyboards/{ => winkeyless}/bface/bface.c (100%) rename keyboards/{ => winkeyless}/bface/bface.h (100%) rename keyboards/{ => winkeyless}/bface/config.h (100%) rename keyboards/{ => winkeyless}/bface/i2c.c (100%) rename keyboards/{ => winkeyless}/bface/i2c.h (100%) rename keyboards/{ => winkeyless}/bface/info.json (100%) rename keyboards/{ => winkeyless}/bface/keymaps/default/keymap.c (100%) rename keyboards/{ => winkeyless}/bface/keymaps/kpeatt/keymap.c (100%) rename keyboards/{ => winkeyless}/bface/keymaps/kpeatt/readme.md (100%) rename keyboards/{ => winkeyless}/bface/matrix.c (100%) rename keyboards/{ => winkeyless}/bface/rules.mk (94%) rename keyboards/{ => winkeyless}/bface/usbconfig.h (100%) rename keyboards/{ => winkeyless}/bmini/bmini.c (100%) rename keyboards/{ => winkeyless}/bmini/bmini.h (100%) rename keyboards/{ => winkeyless}/bmini/config.h (100%) rename keyboards/{ => winkeyless}/bmini/i2c.c (100%) rename keyboards/{ => winkeyless}/bmini/i2c.h (100%) rename keyboards/{ => winkeyless}/bmini/info.json (100%) rename keyboards/{ => winkeyless}/bmini/keymaps/default/keymap.c (100%) rename keyboards/{ => winkeyless}/bmini/matrix.c (100%) create mode 100644 keyboards/winkeyless/bmini/readme.md rename keyboards/{ => winkeyless}/bmini/rules.mk (100%) rename keyboards/{ => winkeyless}/bmini/usbconfig.h (100%) rename keyboards/{ => winkeyless}/bminiex/backlight.c (100%) rename keyboards/{ => winkeyless}/bminiex/backlight_custom.h (100%) rename keyboards/{ => winkeyless}/bminiex/bminiex.c (100%) rename keyboards/{ => winkeyless}/bminiex/bminiex.h (100%) rename keyboards/{ => winkeyless}/bminiex/breathing_custom.h (100%) rename keyboards/{ => winkeyless}/bminiex/config.h (100%) rename keyboards/{ => winkeyless}/bminiex/i2c.c (100%) rename keyboards/{ => winkeyless}/bminiex/i2c.h (100%) rename keyboards/{ => winkeyless}/bminiex/info.json (100%) rename keyboards/{ => winkeyless}/bminiex/keymaps/ansi/keymap.c (100%) rename keyboards/{ => winkeyless}/bminiex/keymaps/ansi/readme.md (100%) rename keyboards/{ => winkeyless}/bminiex/keymaps/default/keymap.c (100%) rename keyboards/{ => winkeyless}/bminiex/keymaps/iso/keymap.c (100%) rename keyboards/{ => winkeyless}/bminiex/keymaps/iso/readme.md (100%) rename keyboards/{ => winkeyless}/bminiex/matrix.c (100%) rename keyboards/{ => winkeyless}/bminiex/readme.md (89%) rename keyboards/{ => winkeyless}/bminiex/rules.mk (100%) rename keyboards/{ => winkeyless}/bminiex/usbconfig.h (100%) create mode 100644 keyboards/winkeyless/readme.md create mode 100644 keyboards/xd60/keymaps/styr/keymap.c create mode 100644 keyboards/xd60/keymaps/styr/readme.md rename keyboards/xd60/{ => rev2}/config.h (100%) rename keyboards/xd60/{ => rev2}/rules.mk (100%) create mode 100644 keyboards/xd60/rev3/config.h create mode 100644 keyboards/xd60/rev3/rules.mk rename keyboards/xd75/keymaps/bramver/{README.md => readme.md} (100%) rename keyboards/xd75/keymaps/c4software_bepo/{README.md => readme.md} (100%) create mode 100644 keyboards/xd75/keymaps/cbbrowne/rules.mk rename keyboards/xd75/keymaps/developper_bepo/{README.md => readme.md} (100%) rename keyboards/xd75/keymaps/french/{README.md => readme.md} (100%) create mode 100644 keyboards/xd75/keymaps/msiu/config.h create mode 100644 keyboards/xd75/keymaps/msiu/keymap.c create mode 100644 keyboards/xd75/keymaps/msiu/readme.md create mode 100644 keyboards/xd84/config.h create mode 100644 keyboards/xd84/custom_matrix_helper.c create mode 100644 keyboards/xd84/dev.md create mode 100644 keyboards/xd84/info.json create mode 100644 keyboards/xd84/keymaps/default/keymap.c create mode 100644 keyboards/xd84/keymaps/default_iso/keymap.c create mode 100644 keyboards/xd84/matrix.c create mode 100644 keyboards/xd84/pca9555.c create mode 100644 keyboards/xd84/pca9555.h create mode 100644 keyboards/xd84/readme.md create mode 100644 keyboards/xd84/rules.mk create mode 100644 keyboards/xd84/xd84.c create mode 100644 keyboards/xd84/xd84.h create mode 100644 keyboards/xd96/config.h create mode 100644 keyboards/xd96/custom_matrix_helper.c create mode 100644 keyboards/xd96/info.json create mode 100644 keyboards/xd96/keymaps/default/keymap.c create mode 100644 keyboards/xd96/keymaps/default_iso/keymap.c create mode 100644 keyboards/xd96/matrix.c create mode 100644 keyboards/xd96/pca9555.c create mode 100644 keyboards/xd96/pca9555.h create mode 100644 keyboards/xd96/readme.md create mode 100644 keyboards/xd96/rules.mk create mode 100644 keyboards/xd96/xd96.c create mode 100644 keyboards/xd96/xd96.h create mode 100644 keyboards/yd60mq/config.h create mode 100644 keyboards/yd60mq/keymaps/default/keymap.c create mode 100644 keyboards/yd60mq/keymaps/krusli/keymap.c create mode 100644 keyboards/yd60mq/readme.md create mode 100644 keyboards/yd60mq/rules.mk create mode 100644 keyboards/yd60mq/yd60mq.c create mode 100644 keyboards/yd60mq/yd60mq.h delete mode 100644 keyboards/ymd75/program create mode 100644 keyboards/ymd96/info.json delete mode 100644 keyboards/ymd96/program delete mode 100644 keyboards/ymd96/tools/README.md delete mode 100644 keyboards/ymd96/tools/usb_detach.c create mode 100644 keyboards/yosino58/config.h rename keyboards/{orthodox => yosino58}/i2c.c (98%) rename keyboards/{orthodox => yosino58}/i2c.h (90%) create mode 100644 keyboards/yosino58/info.json create mode 100644 keyboards/yosino58/keymaps/default/config.h create mode 100644 keyboards/yosino58/keymaps/default/keymap.c create mode 100644 keyboards/yosino58/keymaps/default/rules.mk create mode 100644 keyboards/yosino58/keymaps/sakura/config.h create mode 100644 keyboards/yosino58/keymaps/sakura/keymap.c create mode 100644 keyboards/yosino58/keymaps/sakura/rules.mk create mode 100644 keyboards/yosino58/lib/glcdfont.c create mode 100644 keyboards/yosino58/lib/glcdfont_.c create mode 100644 keyboards/yosino58/lib/host_led_state_reader.c create mode 100644 keyboards/yosino58/lib/keylogger.c create mode 100644 keyboards/yosino58/lib/layer_state_reader.c create mode 100644 keyboards/yosino58/lib/logo_reader.c create mode 100644 keyboards/yosino58/lib/mode_icon_reader.c create mode 100644 keyboards/yosino58/lib/rgb_state_reader.c create mode 100644 keyboards/yosino58/lib/timelogger.c create mode 100644 keyboards/yosino58/pro_micro.h create mode 100644 keyboards/yosino58/readme.md create mode 100644 keyboards/yosino58/rev1/config.h rename keyboards/{sol => yosino58}/rev1/matrix.c (71%) create mode 100644 keyboards/yosino58/rev1/rev1.c create mode 100644 keyboards/yosino58/rev1/rev1.h create mode 100644 keyboards/yosino58/rev1/rules.mk create mode 100644 keyboards/yosino58/rev1/serial_config.h create mode 100644 keyboards/yosino58/rev1/serial_config_simpleapi.h create mode 100644 keyboards/yosino58/rev1/split_scomm.c create mode 100644 keyboards/yosino58/rev1/split_scomm.h rename keyboards/{zen => yosino58/rev1}/split_util.c (79%) rename keyboards/{zen => yosino58/rev1}/split_util.h (91%) create mode 100644 keyboards/yosino58/rules.mk create mode 100644 keyboards/yosino58/serial.c create mode 100644 keyboards/yosino58/serial.h create mode 100644 keyboards/yosino58/ssd1306.c create mode 100644 keyboards/yosino58/ssd1306.h create mode 100644 keyboards/yosino58/yosino58.c create mode 100644 keyboards/yosino58/yosino58.h create mode 100644 keyboards/z150_blackheart/info.json create mode 100644 keyboards/z150_blackheart/keymaps/default_tkl/keymap.c delete mode 100644 keyboards/zen/readme.md delete mode 100644 keyboards/zen/serial.c delete mode 100644 keyboards/zen/serial.h delete mode 100644 keyboards/zen/split_rgb.c delete mode 100644 keyboards/zen/split_rgb.h delete mode 100644 layouts/community/60_ansi/stanrc85-ansi/config.h create mode 100644 layouts/community/ergodox/bepo_alt/keymap.c create mode 100644 layouts/community/ergodox/bepo_alt/readme.md rename layouts/community/ergodox/{erez_experimental => bepo_alt}/rules.mk (92%) delete mode 100644 layouts/community/ergodox/drashna_glow/README.md delete mode 100644 layouts/community/ergodox/erez_experimental/config.h delete mode 100644 layouts/community/ergodox/erez_experimental/keymap.c delete mode 100644 layouts/community/ergodox/erez_experimental/readme.md delete mode 100644 layouts/community/ergodox/familiar/README.md delete mode 100644 layouts/community/ergodox/familiar/keymap.c create mode 100644 layouts/community/ergodox/nstickney/keymap.c rename layouts/community/ergodox/{familiar => nstickney}/rules.mk (100%) create mode 100644 layouts/community/ergodox/osx_neo2/keymap.c create mode 100644 layouts/community/ergodox/osx_neo2/layers.h create mode 100644 layouts/community/ergodox/osx_neo2/readme.md create mode 100644 layouts/community/ergodox/osx_neo2/visualizer.c delete mode 100644 layouts/community/ergodox/pvinis/Changelog.md delete mode 100644 layouts/community/ergodox/pvinis/keymap.c delete mode 100644 layouts/community/ergodox/pvinis/rules.mk create mode 100644 layouts/community/numpad_5x6/bjohnson/config.h create mode 100644 layouts/community/numpad_5x6/bjohnson/keymap.c create mode 100644 layouts/community/numpad_5x6/bjohnson/rules.mk create mode 100644 layouts/community/numpad_5x6/drashna/config.h create mode 100644 layouts/community/numpad_5x6/drashna/keymap.c create mode 100644 layouts/community/numpad_5x6/drashna/rules.mk create mode 100644 layouts/community/numpad_5x6/layout.json create mode 100644 layouts/community/numpad_5x6/readme.md create mode 100644 layouts/community/ortho_4x12/jotix/config.h create mode 100644 layouts/community/ortho_4x12/jotix/keymap.c create mode 100644 layouts/community/ortho_4x12/jotix/readme.md create mode 100644 layouts/community/ortho_4x12/jotix/rules.mk create mode 100644 layouts/community/ortho_4x12/rs/config.h create mode 100644 layouts/community/ortho_4x12/rs/keymap.c create mode 100644 layouts/community/ortho_4x12/rs/readme.md create mode 100644 layouts/community/ortho_4x4/jotix/keymap.c create mode 100644 layouts/community/ortho_4x4/jotix/readme.md delete mode 100644 layouts/community/ortho_5x12/rs/karabiner.json create mode 100644 layouts/default/75_iso/default_75_iso/keymap.c create mode 100644 layouts/default/75_iso/layout.json create mode 100644 layouts/default/75_iso/readme.md create mode 100644 layouts/default/numpad_5x6/default_numpad_5x6/keymap.c create mode 100644 layouts/default/numpad_5x6/layout.json create mode 100644 layouts/default/numpad_5x6/readme.md create mode 100644 lib/lib8tion/LICENSE create mode 100644 lib/lib8tion/lib8tion.c create mode 100644 lib/lib8tion/lib8tion.h create mode 100644 lib/lib8tion/math8.h create mode 100644 lib/lib8tion/random8.h create mode 100644 lib/lib8tion/scale8.h create mode 100644 lib/lib8tion/trig8.h delete mode 100644 quantum/debounce.c create mode 100644 quantum/debounce/eager_pk.c create mode 100644 quantum/debounce/eager_pr.c create mode 100644 quantum/debounce/readme.md create mode 100644 quantum/debounce/sym_g.c create mode 100644 quantum/keymap_extras/keymap_norman.h create mode 100644 quantum/keymap_extras/sendstring_norman.h create mode 100644 quantum/keymap_extras/sendstring_uk.h create mode 100644 quantum/led_matrix.c create mode 100644 quantum/led_matrix_drivers.c create mode 100644 quantum/ledmatrix.h create mode 100644 quantum/process_keycode/process_space_cadet.c create mode 100644 quantum/process_keycode/process_space_cadet.h create mode 100644 quantum/rgb_matrix_animations/alpha_mods_anim.h create mode 100644 quantum/rgb_matrix_animations/breathing_anim.h create mode 100644 quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h create mode 100644 quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h create mode 100644 quantum/rgb_matrix_animations/colorband_sat_anim.h create mode 100644 quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h create mode 100644 quantum/rgb_matrix_animations/colorband_spiral_val_anim.h create mode 100644 quantum/rgb_matrix_animations/colorband_val_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_all_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_left_right_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_out_in_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_pinwheel_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_spiral_anim.h create mode 100644 quantum/rgb_matrix_animations/cycle_up_down_anim.h create mode 100644 quantum/rgb_matrix_animations/digital_rain_anim.h create mode 100644 quantum/rgb_matrix_animations/dual_beacon_anim.h create mode 100644 quantum/rgb_matrix_animations/gradient_up_down_anim.h create mode 100644 quantum/rgb_matrix_animations/jellybean_raindrops_anim.h create mode 100644 quantum/rgb_matrix_animations/rainbow_beacon_anim.h create mode 100644 quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h create mode 100644 quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h create mode 100644 quantum/rgb_matrix_animations/raindrops_anim.h create mode 100644 quantum/rgb_matrix_animations/rgb_matrix_effects.inc create mode 100644 quantum/rgb_matrix_animations/solid_color_anim.h create mode 100644 quantum/rgb_matrix_animations/solid_reactive_anim.h create mode 100644 quantum/rgb_matrix_animations/solid_reactive_cross.h create mode 100644 quantum/rgb_matrix_animations/solid_reactive_nexus.h create mode 100644 quantum/rgb_matrix_animations/solid_reactive_simple_anim.h create mode 100644 quantum/rgb_matrix_animations/solid_reactive_wide.h create mode 100644 quantum/rgb_matrix_animations/solid_splash_anim.h create mode 100644 quantum/rgb_matrix_animations/splash_anim.h create mode 100644 quantum/rgb_matrix_animations/typing_heatmap_anim.h create mode 100644 quantum/rgb_matrix_runners/effect_runner_dx_dy.h create mode 100644 quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h create mode 100644 quantum/rgb_matrix_runners/effect_runner_i.h create mode 100644 quantum/rgb_matrix_runners/effect_runner_reactive.h create mode 100644 quantum/rgb_matrix_runners/effect_runner_reactive_splash.h create mode 100644 quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h create mode 100644 quantum/rgb_matrix_types.h create mode 100644 quantum/rgblight_breathe_table.h create mode 100644 quantum/rgblight_modes.h create mode 100644 quantum/rgblight_post_config.h delete mode 100644 quantum/split_common/i2c.c delete mode 100644 quantum/split_common/i2c.h create mode 100644 quantum/split_common/post_config.h delete mode 100644 quantum/template/ps2avrgb/i2c.c delete mode 100644 quantum/template/ps2avrgb/i2c.h delete mode 100644 quantum/template/ps2avrgb/matrix.c create mode 100644 quantum/velocikey.c create mode 100644 quantum/velocikey.h create mode 100644 show_options.mk create mode 100755 tmk_core/make_dfu_header.sh rename keyboards/massdrop/alt/led_programs.c => tmk_core/protocol/arm_atsam/led_matrix_programs.c (99%) create mode 100644 users/bcat/config.h create mode 100644 users/bcat/rules.mk create mode 100644 users/billypython/billypython.c create mode 100644 users/billypython/billypython.h create mode 100644 users/billypython/config.h create mode 100644 users/billypython/rules.mk create mode 100644 users/billypython/tap_dance.c create mode 100644 users/billypython/tap_dance.h create mode 100644 users/cbbrowne/cbbrowne.c create mode 100644 users/cbbrowne/cbbrowne.h create mode 100644 users/cbbrowne/rules.mk create mode 100644 users/drashna/.gitignore create mode 100644 users/drashna/rgblight_breathe_table.h create mode 100644 users/konstantin/rgb.c create mode 100644 users/konstantin/rgb.h create mode 100644 users/konstantin/unicode.c create mode 100644 users/pvinis/config.h create mode 100644 users/pvinis/pvinis.c create mode 100644 users/pvinis/pvinis.h create mode 100644 users/pvinis/rules.mk rename {keyboards/iris/keymaps => users}/rs/karabiner.json (100%) create mode 100644 users/rs/readme.md create mode 100644 users/rs/rs.c create mode 100644 users/rs/rs.h create mode 100644 users/rs/rules.mk create mode 100644 users/stanrc85/config.h create mode 100644 users/stanrc85/layer_rgb.c create mode 100644 users/stanrc85/readme.md create mode 100644 users/stanrc85/rules.mk create mode 100644 users/stanrc85/stanrc85.c create mode 100644 users/stanrc85/stanrc85.h create mode 100644 users/xulkal/config.h create mode 100644 users/xulkal/layouts.h create mode 100644 users/xulkal/process_records.c create mode 100644 users/xulkal/process_records.h create mode 100644 users/xulkal/rules.mk create mode 100644 users/xulkal/xulkal.c create mode 100644 users/xulkal/xulkal.h create mode 100644 util/bootloader_atmega32a_1_0_0.hex create mode 100755 util/new_keyboard.sh delete mode 100755 util/new_project.sh create mode 100644 util/rgblight_breathing_table_calc.c create mode 100644 util/travis_test.sh create mode 100644 util/usb_detach/Makefile rename keyboards/jj40/tools/README.md => util/usb_detach/readme.md (84%) rename {keyboards/jj4x4/tools => util/usb_detach}/usb_detach.c (98%) diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000000..96c48625900a --- /dev/null +++ b/.clang-format @@ -0,0 +1,26 @@ +--- +BasedOnStyle: Google +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: 'true' +AlignConsecutiveDeclarations: 'true' +AlignOperands: 'true' +AllowAllParametersOfDeclarationOnNextLine: 'false' +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: 'false' +BinPackArguments: 'true' +BinPackParameters: 'true' +ColumnLimit: '1000' +IndentCaseLabels: 'true' +IndentPPDirectives: AfterHash +IndentWidth: '2' +MaxEmptyLinesToKeep: '1' +PointerAlignment: Right +SortIncludes: 'false' +SpaceBeforeAssignmentOperators: 'true' +SpaceBeforeParens: ControlStatements +SpaceInEmptyParentheses: 'false' +TabWidth: '4' +UseTab: Never + +... diff --git a/.editorconfig b/.editorconfig index 4cd051ce9522..c8cb35b861f4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,7 +5,7 @@ root = true [*] indent_style = space -indent_size = 2 +indent_size = 4 # We recommend you to keep these unchanged charset = utf-8 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index a4f90389b0f0..3c35416e043f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,30 +2,31 @@ name: Bug report about: Create a report to help us improve the QMK Firmware --- - + - - + + -**Describe the bug** +## Describe the Bug -**System Information** +## System Information + - Keyboard: - Revision (if applicable): - - Operating System: - - avr-gcc version: - - - arm gcc version: - + - Operating system: + - AVR GCC version: + + - ARM GCC version: + - QMK Firmware version: - + - Any keyboard related software installed? - - [ ] Auto Hot Key + - [ ] AutoHotKey - [ ] Karabiner - - [ ] Other + - [ ] Other: -**Additional context** +## Additional Context - + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index c9198adff2fc..01aeb26cec30 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,18 +2,18 @@ name: Feature request about: Suggest a new feature or changes to existing features --- - + - - + + ## Feature Request Type -- [ ] Core Functionality -- [ ] Add-on hardware support (e.g. audio, RGB, OLED screen, etc.) -- [ ] Alteration (enhancement/optimization) of existing Feature(s) +- [ ] Core functionality +- [ ] Add-on hardware support (eg. audio, RGB, OLED screen, etc.) +- [ ] Alteration (enhancement/optimization) of existing feature(s) - [ ] New behavior -## Description +## Description - + diff --git a/.github/ISSUE_TEMPLATE/other_issues.md b/.github/ISSUE_TEMPLATE/other_issues.md index 5f3e986cc413..7c4891ac31d7 100644 --- a/.github/ISSUE_TEMPLATE/other_issues.md +++ b/.github/ISSUE_TEMPLATE/other_issues.md @@ -2,8 +2,8 @@ name: Other issues about: Anything else that doesn't fall into the above categories. --- - + - + - + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 05223aa4f6b3..cbc018ea057f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,32 +1,34 @@ - + - - + + ## Description - -## Types of changes - + + +## Types of Changes + + - [ ] Core - [ ] Bugfix -- [ ] New Feature -- [ ] Enhancement/Optimization +- [ ] New feature +- [ ] Enhancement/optimization - [ ] Keyboard (addition or update) -- [ ] Keymap/Layout/Userspace (addition or update) +- [ ] Keymap/layout/userspace (addition or update) - [ ] Documentation - -## Issues Fixed or Closed by this PR +## Issues Fixed or Closed by This PR * -## Checklist: +## Checklist + - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. -- [ ] I have read the **CONTRIBUTING** document. (https://docs.qmk.fm/#/contributing) +- [ ] I have read the [**CONTRIBUTING** document](https://docs.qmk.fm/#/contributing). - [ ] I have added tests to cover my changes. - [ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage). diff --git a/.gitignore b/.gitignore index 799fb54def9b..7cd7fa8015e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.history/ .dep *.o *.bin @@ -53,6 +54,7 @@ util/Win_Check_Output.txt .vscode/tasks.json .vscode/last.sql .vscode/temp.sql +.vscode/ipch/ .stfolder .tags diff --git a/.travis.yml b/.travis.yml index 6cfc9e067ec8..796be6c045bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,17 +10,22 @@ branches: env: global: - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= + - MAKEFLAGS="-j3 --output-sync" before_install: - wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz + # Need DFU > .5 for dfu-suffix + - sudo add-apt-repository --yes ppa:tormodvolden/ppa + - sudo apt-get update -qq install: - tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz - export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin" - npm install -g moxygen + - sudo apt-get -y --force-yes install dfu-util before_script: - avr-gcc --version script: - git rev-parse --short HEAD -- make test:all AUTOGEN=false +- bash util/travis_test.sh - bash util/travis_build.sh - bash util/travis_docs.sh addons: diff --git a/Dockerfile b/Dockerfile index 8f78dc2bfe8a..6bd5acb33573 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian +FROM debian:9 RUN apt-get update && apt-get install --no-install-recommends -y \ avr-libc \ diff --git a/Makefile b/Makefile index 610f53b4d42d..a6c3ee35b7a7 100644 --- a/Makefile +++ b/Makefile @@ -534,11 +534,13 @@ endef %: # Check if we have the CMP tool installed cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi; + # Ensure that python3 is installed. This check can be removed after python is used in more places. + if ! python3 --version 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi # Check if the submodules are dirty, and display a warning if they are ifndef SKIP_GIT - if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --init lib/chibios; fi - if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --init lib/chibios-contrib; fi - if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --init lib/ugfx; fi + if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi + if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 1 --init lib/chibios-contrib; fi + if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 1 --init lib/ugfx; fi git submodule status --recursive 2>/dev/null | \ while IFS= read -r x; do \ case "$$x" in \ diff --git a/Vagrantfile b/Vagrantfile index 5aa56bf2a723..552711d632f1 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,7 +6,9 @@ Vagrant.configure(2) do |config| config.vm.define "qmk_firmware" # VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit - config.vm.box = "bento/ubuntu-16.04" + config.vm.box = "generic/debian9" + + config.vm.synced_folder '.', '/vagrant' # This section allows you to customize the Virtualbox VM # settings, ie showing the GUI or upping the memory @@ -55,7 +57,7 @@ Vagrant.configure(2) do |config| # image, you'll need to: chmod -R a+rw . config.vm.provider "docker" do |docker, override| override.vm.box = nil - docker.image = "jesselang/debian-vagrant:jessie" + docker.image = "jesselang/debian-vagrant:stretch" docker.has_ssh = true end @@ -64,7 +66,7 @@ Vagrant.configure(2) do |config| # If this causes issues you can run a 'vagrant destroy' and then # add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working # non-updated box and then attempt to troubleshoot or open a Github issue - config.vm.provision "shell", inline: "/bin/sh -c 'yes | /vagrant/util/qmk_install.sh'", run: "always" + config.vm.provision "shell", inline: "/vagrant/util/qmk_install.sh", run: "always" config.vm.post_up_message = <<-EOT diff --git a/build_keyboard.mk b/build_keyboard.mk index 0239a58b79b4..213cb44456e0 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -135,6 +135,10 @@ ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) OPT_DEFS += -DCONVERT_TO_PROTON_C endif +ifneq ($(FORCE_LAYOUT),) + TARGET := $(TARGET)_$(FORCE_LAYOUT) +endif + include quantum/mcu_selection.mk ifdef MCU_FAMILY @@ -276,6 +280,23 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_1)/config.h)","") CONFIG_H += $(KEYBOARD_PATH_1)/config.h endif +POST_CONFIG_H := +ifneq ("$(wildcard $(KEYBOARD_PATH_1)/post_config.h)","") + POST_CONFIG_H += $(KEYBOARD_PATH_1)/post_config.h +endif +ifneq ("$(wildcard $(KEYBOARD_PATH_2)/post_config.h)","") + POST_CONFIG_H += $(KEYBOARD_PATH_2)/post_config.h +endif +ifneq ("$(wildcard $(KEYBOARD_PATH_3)/post_config.h)","") + POST_CONFIG_H += $(KEYBOARD_PATH_3)/post_config.h +endif +ifneq ("$(wildcard $(KEYBOARD_PATH_4)/post_config.h)","") + POST_CONFIG_H += $(KEYBOARD_PATH_4)/post_config.h +endif +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_config.h)","") + POST_CONFIG_H += $(KEYBOARD_PATH_5)/post_config.h +endif + # Save the defines and includes here, so we don't include any keymap specific ones PROJECT_DEFS := $(OPT_DEFS) PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS) @@ -303,7 +324,6 @@ ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","") endif # # project specific files -SRC += $(patsubst %.c,%.clib,$(LIB_SRC)) SRC += $(KEYBOARD_SRC) \ $(KEYMAP_C) \ $(QUANTUM_SRC) @@ -313,15 +333,16 @@ SRC += $(KEYBOARD_SRC) \ # Search Path VPATH += $(KEYMAP_PATH) +VPATH += $(USER_PATH) VPATH += $(KEYBOARD_PATHS) VPATH += $(COMMON_VPATH) -VPATH += $(USER_PATH) include common_features.mk include $(TMK_PATH)/protocol.mk include $(TMK_PATH)/common.mk include bootloader.mk +SRC += $(patsubst %.c,%.clib,$(LIB_SRC)) SRC += $(patsubst %.c,%.clib,$(QUANTUM_LIB_SRC)) SRC += $(TMK_COMMON_SRC) OPT_DEFS += $(TMK_COMMON_DEFS) @@ -351,6 +372,7 @@ ifeq ($(strip $(VISUALIZER_ENABLE)), yes) include $(VISUALIZER_PATH)/visualizer.mk endif +CONFIG_H += $(POST_CONFIG_H) ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H) OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) @@ -371,4 +393,5 @@ all: build check-size build: elf cpfirmware check-size: build +include show_options.mk include $(TMK_PATH)/rules.mk diff --git a/build_layout.mk b/build_layout.mk index beb1cb66278a..6e9f97dae211 100644 --- a/build_layout.mk +++ b/build_layout.mk @@ -15,4 +15,13 @@ define SEARCH_LAYOUTS $$(foreach LAYOUTS_REPO,$$(LAYOUTS_REPOS),$$(eval $$(call SEARCH_LAYOUTS_REPO))) endef +ifneq ($(FORCE_LAYOUT),) + ifneq (,$(findstring $(FORCE_LAYOUT),$(LAYOUTS))) + $(info Forcing layout: $(FORCE_LAYOUT)) + LAYOUTS := $(FORCE_LAYOUT) + else + $(error Forced layout does not exist) + endif +endif + $(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS))) \ No newline at end of file diff --git a/common_features.mk b/common_features.mk index 8c3361732cd0..7c35f07d52c9 100644 --- a/common_features.mk +++ b/common_features.mk @@ -103,7 +103,9 @@ ifeq ($(strip $(UNICODE_COMMON)), yes) endif ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) + POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h OPT_DEFS += -DRGBLIGHT_ENABLE + SRC += $(QUANTUM_DIR)/color.c SRC += $(QUANTUM_DIR)/rgblight.c CIE1931_CURVE = yes LED_BREATHING_TABLE = yes @@ -114,8 +116,28 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) endif endif +VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 WS2812 custom + +LED_MATRIX_ENABLE ?= no +ifneq ($(strip $(LED_MATRIX_ENABLE)), no) + ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) + $(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type) + else + OPT_DEFS += -DLED_MATRIX_ENABLE -DBACKLIGHT_ENABLE -DBACKLIGHT_CUSTOM_DRIVER + SRC += $(QUANTUM_DIR)/led_matrix.c + SRC += $(QUANTUM_DIR)/led_matrix_drivers.c + endif +endif + +ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731) + OPT_DEFS += -DIS31FL3731 + COMMON_VPATH += $(DRIVER_PATH)/issi + SRC += is31fl3731-simple.c + SRC += i2c_master.c +endif + RGB_MATRIX_ENABLE ?= no -VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 custom + ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) $(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type) @@ -132,19 +154,39 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) endif ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731) - OPT_DEFS += -DIS31FL3731 + OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE COMMON_VPATH += $(DRIVER_PATH)/issi SRC += is31fl3731.c SRC += i2c_master.c endif ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3733) - OPT_DEFS += -DIS31FL3733 + OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE COMMON_VPATH += $(DRIVER_PATH)/issi SRC += is31fl3733.c SRC += i2c_master.c endif +ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737) + OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE + COMMON_VPATH += $(DRIVER_PATH)/issi + SRC += is31fl3737.c + SRC += i2c_master.c +endif + +ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812) + OPT_DEFS += -DWS2812 + SRC += ws2812.c +endif + +ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes) + OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB +endif + +ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes) + OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER +endif + ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) OPT_DEFS += -DTAP_DANCE_ENABLE SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c @@ -191,7 +233,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) ifeq ($(strip $(VISUALIZER_ENABLE)), yes) CIE1931_CURVE = yes endif - ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) + ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER endif endif @@ -227,16 +269,31 @@ endif ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L) COMMON_VPATH += $(DRIVER_PATH)/haptic + SRC += haptic.c SRC += DRV2605L.c SRC += i2c_master.c + OPT_DEFS += -DHAPTIC_ENABLE OPT_DEFS += -DDRV2605L endif +ifeq ($(strip $(HAPTIC_ENABLE)), SOLENOID) + COMMON_VPATH += $(DRIVER_PATH)/haptic + SRC += haptic.c + SRC += solenoid.c + OPT_DEFS += -DHAPTIC_ENABLE + OPT_DEFS += -DSOLENOID_ENABLE +endif + ifeq ($(strip $(HD44780_ENABLE)), yes) SRC += drivers/avr/hd44780.c OPT_DEFS += -DHD44780_ENABLE endif +ifeq ($(strip $(VELOCIKEY_ENABLE)), yes) + OPT_DEFS += -DVELOCIKEY_ENABLE + SRC += $(QUANTUM_DIR)/velocikey.c +endif + ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes) OPT_DEFS += -DDYNAMIC_KEYMAP_ENABLE SRC += $(QUANTUM_DIR)/dynamic_keymap.c @@ -263,25 +320,41 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes) endif endif -# Include the standard debounce code if needed -ifneq ($(strip $(CUSTOM_DEBOUNCE)), yes) - QUANTUM_SRC += $(QUANTUM_DIR)/debounce.c +DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce +# Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually. +DEBOUNCE_TYPE?= sym_g +ifneq ($(strip $(DEBOUNCE_TYPE)), custom) + QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c endif ifeq ($(strip $(SPLIT_KEYBOARD)), yes) + POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h OPT_DEFS += -DSPLIT_KEYBOARD # Include files used by all split keyboards - QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \ - $(QUANTUM_DIR)/split_common/split_util.c + QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_util.c # Determine which (if any) transport files are required ifneq ($(strip $(SPLIT_TRANSPORT)), custom) QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called. - # Unused functions are pruned away, which is why we can add both drivers here without bloat. - QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c \ - $(QUANTUM_DIR)/split_common/serial.c + # Unused functions are pruned away, which is why we can add multiple drivers here without bloat. + QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c \ + i2c_master.c \ + i2c_slave.c endif COMMON_VPATH += $(QUANTUM_PATH)/split_common endif + +ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) + OPT_DEFS += -DOLED_DRIVER_ENABLE + COMMON_VPATH += $(DRIVER_PATH)/oled + QUANTUM_LIB_SRC += i2c_master.c + SRC += oled_driver.c +endif + +SPACE_CADET_ENABLE ?= yes +ifeq ($(strip $(SPACE_CADET_ENABLE)), yes) + SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c + OPT_DEFS += -DSPACE_CADET_ENABLE +endif diff --git a/docs/_summary.md b/docs/_summary.md index 6bc747189663..043943f1d832 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -3,7 +3,7 @@ * [Building Your First Firmware](newbs_building_firmware.md) * [Flashing Firmware](newbs_flashing.md) * [Testing and Debugging](newbs_testing_debugging.md) - * [Best Practices](newbs_best_practices.md) + * [Git Best Practices](newbs_best_practices.md) * [Learning Resources](newbs_learn_more_resources.md) * [QMK Basics](README.md) @@ -60,15 +60,16 @@ * [Key Lock](feature_key_lock.md) * [Layouts](feature_layouts.md) * [Leader Key](feature_leader_key.md) + * [LED Matrix](feature_led_matrix.md) * [Macros](feature_macros.md) * [Mouse Keys](feature_mouse_keys.md) + * [OLED Driver](feature_oled_driver) * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) * [Pointing Device](feature_pointing_device.md) * [PS/2 Mouse](feature_ps2_mouse.md) * [RGB Lighting](feature_rgblight.md) * [RGB Matrix](feature_rgb_matrix.md) - * [Space Cadet Shift](feature_space_cadet_shift.md) - * [Space Cadet Shift Enter](feature_space_cadet_shift_enter.md) + * [Space Cadet](feature_space_cadet.md) * [Stenography](feature_stenography.md) * [Swap Hands](feature_swap_hands.md) * [Tap Dance](feature_tap_dance.md) @@ -76,6 +77,7 @@ * [Thermal Printer](feature_thermal_printer.md) * [Unicode](feature_unicode.md) * [Userspace](feature_userspace.md) + * [Velocikey](feature_velocikey.md) * For Makers and Modders * [Hand Wiring Guide](hand_wire.md) @@ -90,7 +92,8 @@ * [Understanding QMK](understanding_qmk.md) * Other Topics - * [Using Eclipse with QMK](eclipse.md) + * [Using Eclipse with QMK](other_eclipse.md) + * [Using VSCode with QMK](other_vscode.md) * [Support](support.md) * QMK Internals (In Progress) diff --git a/docs/config_options.md b/docs/config_options.md index 5e2de6d04861..cab3c0747a5b 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -59,6 +59,8 @@ This is a C header file that is one of the first things included, and will persi * define is matrix has ghost (unlikely) * `#define DIODE_DIRECTION COL2ROW` * COL2ROW or ROW2COL - how your matrix is configured. COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows. +* `#define DIRECT_PINS { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }` + * pins mapped to rows and columns, from left to right. Defines a matrix where each switch is connected to a separate pin and ground. * `#define AUDIO_VOICES` * turns on the alternate audio voices (to cycle through) * `#define C4_AUDIO` @@ -68,11 +70,11 @@ This is a C header file that is one of the first things included, and will persi * `#define C6_AUDIO` * enables audio on pin C6 * `#define B5_AUDIO` - * enables audio on pin B5 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO) + * enables audio on pin B5 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO) * `#define B6_AUDIO` - * enables audio on pin B6 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO) + * enables audio on pin B6 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO) * `#define B7_AUDIO` - * enables audio on pin B7 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO) + * enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO) * `#define BACKLIGHT_PIN B7` * pin of the backlight - B5, B6, B7 use PWM, others use softPWM * `#define BACKLIGHT_LEVELS 3` @@ -126,6 +128,8 @@ If you define these options you will enable the associated feature, which may in * `#define TAPPING_TERM 200` * how long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too +* `#define TAPPING_TERM_PER_KEY` + * enables handling for per key `TAPPING_TERM` settings * `#define RETRO_TAPPING` * tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release * See [Retro Tapping](feature_advanced_keycodes.md#retro-tapping) for details @@ -167,15 +171,23 @@ If you define these options you will enable the associated feature, which may in * how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined. * `#define TAP_CODE_DELAY 100` * Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. +* `#define TAP_HOLD_CAPS_DELAY 200` + * Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 200ms if not defined. ## RGB Light Configuration * `#define RGB_DI_PIN D7` - * pin the DI on the ws2812 is hooked-up to + * pin the DI on the WS2812 is hooked-up to * `#define RGBLIGHT_ANIMATIONS` * run RGB animations -* `#define RGBLED_NUM 15` +* `#define RGBLED_NUM 12` * number of LEDs +* `#define RGBLIGHT_SPLIT` + * Needed if both halves of the board have RGB LEDs wired directly to the RGB output pin on the controllers instead of passing the output of the left half to the input of the right half +* `#define RGBLED_SPLIT { 6, 6 }` + * number of LEDs connected that are directly wired to `RGB_DI_PIN` on each half of a split keyboard + * First value indicates number of LEDs for left half, second value is for the right half + * When RGBLED_SPLIT is defined, RGBLIGHT_SPLIT is implicitly defined. * `#define RGBLIGHT_HUE_STEP 12` * units to step when in/decreasing hue * `#define RGBLIGHT_SAT_STEP 25` @@ -208,9 +220,13 @@ There are a few different ways to set handedness for split keyboards (listed in 1. Set `SPLIT_HAND_PIN`: Reads a pin to determine handedness. If pin is high, it's the left side, if low, the half is determined to be the right side 2. Set `EE_HANDS` and flash `eeprom-lefthand.eep`/`eeprom-righthand.eep` to each half + * For boards with DFU bootloader you can use `:dfu-split-left`/`:dfu-split-right` to flash these EEPROM files + * For boards with Caterina bootloader (like stock Pro Micros), use `:avrdude-split-left`/`:avrdude-split-right` 3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default) 4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half +#### Defines for handedness + * `#define SPLIT_HAND_PIN B7` * For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses. @@ -232,6 +248,9 @@ There are a few different ways to set handedness for split keyboards (listed in * `#define MATRIX_COL_PINS_RIGHT { }` * If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns. +* `#define RGBLED_SPLIT { 6, 6 }` + * See [RGB Light Configuration](#rgb-light-configuration) + * `#define SELECT_SOFT_SERIAL_SPEED ` (default speed is 1) * Sets the protocol speed when using serial communication * Speeds: @@ -307,12 +326,14 @@ Use these to enable or disable building certain features. The more you have enab * Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common * `CUSTOM_MATRIX` * Allows replacing the standard matrix scanning routine with a custom one. -* `CUSTOM_DEBOUNCE` - * Allows replacing the standard key debouncing routine with a custom one. +* `DEBOUNCE_TYPE` + * Allows replacing the standard key debouncing routine with an alternative or custom one. * `WAIT_FOR_USB` * Forces the keyboard to wait for a USB connection to be established before it starts up * `NO_USB_STARTUP_CHECK` * Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master. +* `LINK_TIME_OPTIMIZATION_ENABLE` + = Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION` ## USB Endpoint Limitations diff --git a/docs/contributing.md b/docs/contributing.md index bcedcaf974e5..7d1a9691cf5c 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -56,7 +56,7 @@ Never made an open source contribution before? Wondering how contributions work Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines: -* We indent using two spaces (soft tabs) +* We indent using four (4) spaces (soft tabs) * We use a modified One True Brace Style * Opening Brace: At the end of the same line as the statement that opens the block * Closing Brace: Lined up with the first character of the statement that opens the block @@ -71,6 +71,14 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely * If you not sure if a comment is obvious, go ahead and include it. * In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns. * We use `#pragma once` at the start of header files rather than old-style include guards (`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`) +* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)` + * If you are not sure which to prefer use the `#if defined(DEFINED)` form. + * Do not change existing code from one style to the other, except when moving to a multiple condition `#if`. + * Do not put whitespace between `#` and `if`. + * When deciding how (or if) to indent directives keep these points in mind: + * Readability is more important than consistency. + * Follow the file's existing style. If the file is mixed follow the style that makes sense for the section you are modifying. + * When choosing to indent you can follow the indention level of the surrounding C code, or preprocessor directives can have their own indent level. Choose the style that best communicates the intent of your code. Here is an example for easy reference: @@ -91,6 +99,18 @@ int foo(void) { } ``` +# Auto-formatting with clang-format + +[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) is part of LLVM and can automatically format your code for you, because ain't nobody got time to do it manually. We supply a configuration file for it that applies most of the coding conventions listed above. It will only change whitespace and newlines, so you will still have to remember to include optional braces yourself. + +Use the [full LLVM installer](http://llvm.org/builds/) to get clang-format on Windows, or use `sudo apt install clang-format` on Ubuntu. + +If you run it from the command-line, pass `-style=file` as an option and it will automatically find the .clang-format configuration file in the QMK root directory. + +If you use VSCode, the standard C/C++ plugin supports clang-format, alternatively there is a [separate extension](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat) for it. + +Some things (like LAYOUT macros) are destroyed by clang-format, so either don't run it on those files, or wrap the sensitive code in `// clang-format off` and `// clang-format on`. + # General Guidelines We have a few different types of changes in QMK, each requiring a different level of rigor. We'd like you to keep the following guidelines in mind no matter what type of change you're making. @@ -117,6 +137,20 @@ Documentation is one of the easiest ways to get started contributing to QMK. Fin You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click "Suggest An Edit" at the top of each page on http://docs.qmk.fm/. +When providing code examples in your documentation, try to observe naming conventions used elsewhere in the docs. For example, standardizing enums as `my_layers` or `my_keycodes` for consistency: + +```c +enum my_layers { + _FIRST_LAYER, + _SECOND_LAYER +}; + +enum my_keycodes { + FIRST_LAYER = SAFE_RANGE, + SECOND_LAYER +}; +``` + ## Keymaps Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap. @@ -125,7 +159,7 @@ Most first-time QMK contributors start with their personal keymaps. We try to ke * All Keymap PR's are squashed, so if you care about how your commits are squashed you should do it yourself * Do not lump features in with keymap PR's. Submit the feature first and then a second PR for the keymap. * Do not include `Makefile`s in your keymap folder (they're no longer used) -* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `) +* Update copyrights in file headers (look for `%YOUR_NAME%`) ## Keyboards @@ -138,7 +172,7 @@ We also ask that you follow these guidelines: * Do not lump core features in with new keyboards. Submit the feature first and then submit a separate PR for the keyboard. * Name `.c`/`.h` file after the immediate parent folder, eg `/keyboards///.[ch]` * Do not include `Makefile`s in your keyboard folder (they're no longer used) -* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `) +* Update copyrights in file headers (look for `%YOUR_NAME%`) ## Quantum/TMK Core diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index d44786e2d512..6287b9530909 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -116,29 +116,29 @@ Use the `IS_LED_ON(usb_led, led_name)` and `IS_LED_OFF(usb_led, led_name)` macro ```c void led_set_user(uint8_t usb_led) { if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - PORTB |= (1<<0); + writePinLow(B0); } else { - PORTB &= ~(1<<0); + writePinHigh(B0); } if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - PORTB |= (1<<1); + writePinLow(B1); } else { - PORTB &= ~(1<<1); + writePinHigh(B1); } if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - PORTB |= (1<<2); + writePinLow(B2); } else { - PORTB &= ~(1<<2); + writePinHigh(B2); } if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) { - PORTB |= (1<<3); + writePinLow(B3); } else { - PORTB &= ~(1<<3); + writePinHigh(B3); } if (IS_LED_ON(usb_led, USB_LED_KANA)) { - PORTB |= (1<<4); + writePinLow(B4); } else { - PORTB &= ~(1<<4); + writePinHigh(B4); } } ``` @@ -165,31 +165,86 @@ In addition, it is possible to specify the brightness level of all LEDs with `er Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default). -# Matrix Initialization Code +# Keyboard Initialization Code -Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LEDs or i²c controllers you will need to set up that hardware before it can be used. +There are several steps in the keyboard initialization process. Depending on what you want to do, it will influence which function you should use. +These are the three main initialization functions, listed in the order that they're called. -### Example `matrix_init_user()` Implementation +* `keyboard_pre_init_*` - Happens before most anything is started. Good for hardware setup that you want running very early. +* `matrix_init_*` - Happens midway through the firmware's startup process. Hardware is initialized, but features may not be yet. +* `keyboard_post_init_*` - Happens at the end of the firmware's startup process. This is where you'd want to put "customization" code, for the most part. -This example, at the keyboard level, sets up B1, B2, and B3 as LED pins. +!> For most people, the `keyboard_post_init_user` function is what you want to call. For instance, this is where you want to set up things for RGB Underglow. + +## Keyboard Pre Initialization code + +This runs very early during startup, even before the USB has been started. + +Shortly after this, the matrix is initialized. + +For most users, this shouldn't be used, as it's primarily for hardware oriented initialization. + +However, if you have hardware stuff that you need initialized, this is the best place for it (such as initializing LED pins). + +### Example `keyboard_pre_init_user()` Implementation + +This example, at the keyboard level, sets up B0, B1, B2, B3, and B4 as LED pins. ```c -void matrix_init_user(void) { - // Call the keymap level matrix init. +void keyboard_pre_init_user(void) { + // Call the keyboard pre init code. // Set our LED pins as output - DDRB |= (1<<1); - DDRB |= (1<<2); - DDRB |= (1<<3); + setPinOutput(B0); + setPinOutput(B1); + setPinOutput(B2); + setPinOutput(B3); + setPinOutput(B4); } ``` +### `keyboard_pre_init_*` Function Documentation + +* Keyboard/Revision: `void keyboard_pre_init_kb(void)` +* Keymap: `void keyboard_pre_init_user(void)` + +## Matrix Initialization Code + +This is called when the matrix is initialized, and after some of the hardware has been set up, but before many of the features have been initialized. + +This is useful for setting up stuff that you may need elsewhere, but isn't hardware related nor is dependant on where it's started. + + ### `matrix_init_*` Function Documentation * Keyboard/Revision: `void matrix_init_kb(void)` * Keymap: `void matrix_init_user(void)` + +## Keyboard Post Initialization code + +This is ran as the very last task in the keyboard initialization process. This is useful if you want to make changes to certain features, as they should be initialized by this point. + + +### Example `keyboard_post_init_user()` Implementation + +This example, running after everything else has initialized, sets up the rgb underglow configuration. + +```c +void keyboard_post_init_user(void) { + // Call the post init code. + rgblight_enable_noeeprom(); // enables Rgb, without saving settings + rgblight_sethsv_noeeprom(180, 255, 255); // sets the color to teal/cyan without saving + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // sets mode to Fast breathing without saving +} +``` + +### `keyboard_post_init_*` Function Documentation + +* Keyboard/Revision: `void keyboard_post_init_kb(void)` +* Keymap: `void keyboard_post_init_user(void)` + # Matrix Scanning Code Whenever possible you should customize your keyboard by using `process_record_*()` and hooking into events that way, to ensure that your code does not have a negative performance impact on your keyboard. However, in rare cases it is necessary to hook into the matrix scanning. Be extremely careful with the performance of code in these functions, as it will be called at least 10 times per second. @@ -217,22 +272,18 @@ This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_ ### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation -This example, at the keyboard level, sets up B1, B2, and B3 as LED pins. ```c -void suspend_power_down_user(void) -{ +void suspend_power_down_user(void) { rgb_matrix_set_suspend_state(true); } -void suspend_wakeup_init_user(void) -{ +void suspend_wakeup_init_user(void) { rgb_matrix_set_suspend_state(false); } - ``` -### `keyboard_init_*` Function Documentation +### Keyboard suspend/wake Function Documentation * Keyboard/Revision: `void suspend_power_down_kb(void)` and `void suspend_wakeup_init_user(void)` * Keymap: `void suspend_power_down_kb(void)` and `void suspend_wakeup_init_user(void)` @@ -269,9 +320,10 @@ uint32_t layer_state_set_user(uint32_t state) { ``` ### `layer_state_set_*` Function Documentation -* Keyboard/Revision: `void uint32_t layer_state_set_kb(uint32_t state)` +* Keyboard/Revision: `uint32_t layer_state_set_kb(uint32_t state)` * Keymap: `uint32_t layer_state_set_user(uint32_t state)` + The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status) @@ -285,13 +337,13 @@ Keep in mind that EEPROM has a limited number of writes. While this is very high * If you don't understand the example, then you may want to avoid using this feature, as it is rather complicated. -### Example Implementation +### Example Implementation This is an example of how to add settings, and read and write it. We're using the user keymap for the example here. This is a complex function, and has a lot going on. In fact, it uses a lot of the above functions to work! In your keymap.c file, add this to the top: -``` +```c typedef union { uint32_t raw; struct { @@ -304,11 +356,11 @@ user_config_t user_config; This sets up a 32 bit structure that we can store settings with in memory, and write to the EEPROM. Using this removes the need to define variables, since they're defined in this structure. Remember that `bool` (boolean) values use 1 bit, `uint8_t` uses 8 bits, `uint16_t` uses up 16 bits. You can mix and match, but changing the order can cause issues, as it will change the values that are read and written. -We're using `rgb_layer_change`, for the `layer_state_set_*` function, and use `matrix_init_user` and `process_record_user` to configure everything. +We're using `rgb_layer_change`, for the `layer_state_set_*` function, and use `keyboard_post_init_user` and `process_record_user` to configure everything. -Now, using the `matrix_init_user` code above, you want to add `eeconfig_read_user()` to it, to populate the structure you've just created. And you can then immediately use this structure to control functionality in your keymap. And It should look like: -``` -void matrix_init_user(void) { +Now, using the `keyboard_post_init_user` code above, you want to add `eeconfig_read_user()` to it, to populate the structure you've just created. And you can then immediately use this structure to control functionality in your keymap. And It should look like: +```c +void keyboard_post_init_user(void) { // Call the keymap level matrix init. // Read the user config from EEPROM @@ -324,7 +376,7 @@ void matrix_init_user(void) { ``` The above function will use the EEPROM config immediately after reading it, to set the default layer's RGB color. The "raw" value of it is converted in a usable structure based on the "union" that you created above. -``` +```c uint32_t layer_state_set_user(uint32_t state) { switch (biton32(state)) { case _RAISE: @@ -346,8 +398,8 @@ uint32_t layer_state_set_user(uint32_t state) { return state; } ``` -This will cause the RGB underglow to be changed ONLY if the value was enabled. Now to configure this value, create a new keycode for `process_record_user` called `RGB_LYR` and `EPRM`. Additionally, we want to make sure that if you use the normal RGB codes, that it turns off Using the example above, make it look this: -``` +This will cause the RGB underglow to be changed ONLY if the value was enabled. Now to configure this value, create a new keycode for `process_record_user` called `RGB_LYR`. Additionally, we want to make sure that if you use the normal RGB codes, that it turns off Using the example above, make it look this: +```c bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { @@ -364,11 +416,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { PLAY_NOTE_ARRAY(tone_qwerty); } return true; // Let QMK send the enter press/release events - case EPRM: - if (record->event.pressed) { - eeconfig_init(); // resets the EEPROM to default - } - return false; case RGB_LYR: // This allows me to use underglow as layer indication, or as normal if (record->event.pressed) { user_config.rgb_layer_change ^= 1; // Toggles the status @@ -391,10 +438,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } ``` -And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. For example, if you want to set rgb layer indication by default, and save the default valued. +And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EEP_RST` keycode or [Bootmagic](feature_bootmagic.md) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued. -``` +```c void eeconfig_init_user(void) { // EEPROM is getting reset! + user_config.raw = 0; user_config.rgb_layer_change = true; // We want this enabled by default eeconfig_update_user(user_config.raw); // Write default value to EEPROM now @@ -413,3 +461,31 @@ And you're done. The RGB layer indication will only work if you want it to. And * Keymap: `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)` and `void eeconfig_update_user(uint32_t val)` The `val` is the value of the data that you want to write to EEPROM. And the `eeconfig_read_*` function return a 32 bit (DWORD) value from the EEPROM. + +# Custom Tapping Term + +By default, the tapping term is defined globally, and is not configurable by key. For most users, this is perfectly fine. But in come cases, dual function keys would be greatly improved by different timeouts than `LT` keys, or because some keys may be easier to hold than others. Instead of using custom key codes for each, this allows for per key configurable `TAPPING_TERM`. + +To enable this functionality, you need to add `#define TAPPING_TERM_PER_KEY` to your `config.h`, first. + + +## Example `get_tapping_term` Implementation + +To change the `TAPPING TERM` based on the keycode, you'd want to add something like the following to your `keymap.c` file: + +```c +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case SFT_T(KC_SPC): + return TAPPING_TERM + 1250; + case LT(1, KC_GRV): + return 130; + default: + return TAPPING_TERM; + } +} +``` + +### `get_tapping_term` Function Documentation + +Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum or keyboard level function. Only a user level function is useful here, so no need to mark it as such. diff --git a/docs/faq_build.md b/docs/faq_build.md index d920d27e2a45..0c1bedd7155a 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -15,7 +15,7 @@ or just: $ sudo make ::dfu -Note that running `make` with `sudo` is generally *not* a good idea, and you should use one of the former methods, if possible. +Note that running `make` with `sudo` is generally ***not*** a good idea, and you should use one of the former methods, if possible. ### Linux `udev` Rules On Linux, you'll need proper privileges to access the MCU. You can either use @@ -36,18 +36,29 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="066 # tmk keyboard products https://github.com/tmk/tmk_keyboard SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" ``` +**/etc/udev/rules.d/54-input-club-keyboard.rules:** + +``` +# Input Club keyboard bootloader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666" +``` ### Serial device is not detected in bootloader mode on Linux -Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as +Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options. ## Unknown Device for DFU Bootloader -If you're using Windows to flash your keyboard, and you are running into issues, check the Device Manager. If you see an "Unknown Device" when the keyboard is in "bootloader mode", then you may have a driver issue. +If you're using Windows to flash your keyboard, and you are running into issues, check the Device Manager. If you see an "Unknown Device" when the keyboard is in "bootloader mode", then you may have a driver issue. + +Re-running the installation script for MSYS2 may help (eg run `./util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue. + +If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUSB` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again. If that doesn't work, try all of the options, until one works. -Re-running the installation script for MSYS2 may help (eg run `./util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue. +?> There isn't a best option for which driver should be used here. Some options work better on some systems than others. libUSB and WinUSB seem to be the best options here. + +If the bootloader doesn't show up in the list for devices, you may need to enable the "List all devices" option in the `Options` menu, and then find the bootloader in question. -If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUS(libusb-1.0)` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again. ## WINAVR is Obsolete It is no longer recommended and may cause some problem. @@ -102,9 +113,9 @@ OPT_DEFS += -DBOOTLOADER_SIZE=2048 ``` ## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS -This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled. +This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled. -The solution is to remove and reinstall all affected modules. +The solution is to remove and reinstall all affected modules. ``` brew rm avr-gcc @@ -132,3 +143,11 @@ brew uninstall --force avr-gcc brew install avr-gcc@7 brew link --force avr-gcc@7 ``` + +### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019) +Due to how EEPROM works on ARM based chips, saved settings may no longer be valid. This affects the default layers, and *may*, under certain circumstances we are still figuring out, make the keyboard unusable. Resetting the EEPROM will correct this. + +[Planck rev6 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) can be used to force an eeprom reset. After flashing this image, flash your normal firmware again which should restore your keyboard to _normal_ working order. +[Preonic rev3 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin) + +If bootmagic is enabled in any form, you should be able to do this too (see [Bootmagic docs](feature_bootmagic.md) and keyboard info for specifics on how to do this). diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index ae01e938780a..0a627469e75d 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -151,13 +151,13 @@ This turns right modifier keys into arrow keys when the keys are tapped while st */ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty */ - [0] = KEYMAP( \ + [0] = LAYOUT( \ ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \ TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \ FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3), - [1] = KEYMAP( \ + [1] = LAYOUT( \ GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index 95c47355ceb6..a6ddf458cc9f 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -11,11 +11,11 @@ People often define custom names using `#define`. For example: #define ALT_TAB LALT(KC_TAB) ``` -This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable. +This will allow you to use `FN_CAPS` and `ALT_TAB` in your keymap, keeping it more readable. ## Caveats -Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. +Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. If you need to apply modifiers to your tapped keycode, [Tap Dance](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this. Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two. @@ -146,7 +146,7 @@ Additionally, hitting keys five times in a short period will lock that key. This You can control the behavior of one shot keys by defining these in `config.h`: ```c -#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */ +#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped once again. */ #define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */ ``` diff --git a/docs/feature_audio.md b/docs/feature_audio.md index 38861e8c14df..7511598bcfb3 100644 --- a/docs/feature_audio.md +++ b/docs/feature_audio.md @@ -100,6 +100,16 @@ In music mode, the following keycodes work differently, and don't pass through: * `KC_UP` - speed-up playback * `KC_DOWN` - slow-down playback +The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`: + + #define PITCH_STANDARD_A 432.0f + +You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`: + + #define NO_MUSIC_MODE + +### Music Mask + By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this: #define MUSIC_MASK keycode != KC_NO @@ -120,13 +130,26 @@ For a more advanced way to control which keycodes should still be processed, you Things that return false are not part of the mask, and are always processed. -The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`: +### Music Map - #define PITCH_STANDARD_A 432.0f +By default, the Music Mode uses the columns and row to determine the scale for the keys. For a board that uses a rectangular matrix that matches the keyboard layout, this is just fine. However, for boards that use a more complicated matrix (such as the Planck Rev6, or many split keyboards) this would result in a very skewed experience. -You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`: +However, the Music Map option allows you to remap the scaling for the music mode, so it fits the layout, and is more natural. - #define NO_MUSIC_MODE +To enable this feature, add `#define MUSIC_MAP` to your `config.h` file, and then you will want to add a `uint8_t music_map` to your keyboard's `c` file, or your `keymap.c`. + +```c +const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ortho_4x12( + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 +); +``` + +You will want to use whichever `LAYOUT` macro that your keyboard uses here. This maps it to the correct key location. Start in the bottom left of the keyboard layout, and move to the right, and then upwards. Fill in all the entries until you have a complete matrix. + +You can look at the [Planck Keyboard](https://github.com/qmk/qmk_firmware/blob/e9ace1487887c1f8b4a7e8e6d87c322988bec9ce/keyboards/planck/planck.c#L24-L29) as an example of how to implement this. ## Audio Click @@ -152,8 +175,9 @@ You can configure the default, min and max frequencies, the stepping and built i | `AUDIO_CLICKY_FREQ_DEFAULT` | 440.0f | Sets the default/starting audio frequency for the clicky sounds. | | `AUDIO_CLICKY_FREQ_MIN` | 65.0f | Sets the lowest frequency (under 60f are a bit buggy). | | `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | Sets the the highest frequency. Too high may result in coworkers attacking you. | -| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. | +| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. This is a multiplicative factor. The default steps the frequency up/down by a musical minor third. | | `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical, and `1.0f` will make this sound much like the 90's computer screen scrolling/typing effect. | +| `AUDIO_CLICKY_DELAY_DURATION` | 1 | An integer note duration where 1 is 1/16th of the tempo, or a sixty-fourth note (see `quantum/audio/musical_notes.h` for implementation details). The main clicky effect will be delayed by this duration. Adjusting this to values around 6-12 will help compensate for loud switches. | diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index c7a1f131ed71..048d75390df6 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -30,7 +30,31 @@ You should then be able to use the keycodes below to change the backlight level. This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard. -Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software implementation will be used, and backlight breathing will not be available. Currently the supported pins are `B5`, `B6`, `B7`, and `C6`. +Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software PWM implementation triggered by hardware timer interrupts will be used. + +Hardware PWM is supported according to the following table: + +| Backlight Pin | Hardware timer | +|---------------|----------------| +|`B5` | Timer 1 | +|`B6` | Timer 1 | +|`B7` | Timer 1 | +|`C6` | Timer 3 | +| other | Software PWM | + +The [audio feature](feature_audio.md) also uses hardware timers. Please refer to the following table to know what hardware timer the software PWM will use depending on the audio configuration: + +| Audio Pin(s) | Audio Timer | Software PWM Timer | +|--------------|-------------|--------------------| +| `C4` | Timer 3 | Timer 1 | +| `C5` | Timer 3 | Timer 1 | +| `C6` | Timer 3 | Timer 1 | +| `B5` | Timer 1 | Timer 3 | +| `B6` | Timer 1 | Timer 3 | +| `B7` | Timer 1 | Timer 3 | +| `Bx` & `Cx` | Timer 1 & 3 | None | + +When all timers are in use for [audio](feature_audio.md), the backlight software PWM will not use a hardware timer, but instead will be triggered during the matrix scan. In this case the backlight doesn't support breathing and might show lighting artifacts (for instance flickering), because the PWM computation might not be called with enough timing precision. ## Configuration @@ -39,11 +63,26 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`: |Define |Default |Description | |---------------------|-------------|-------------------------------------------------------------------------------------------------------------| |`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| +|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information| |`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) | |`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | -|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if hardware PWM is used | +|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported | |`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | +## Multiple backlight pins + +Most keyboards have only one backlight pin which control all backlight LEDs (especially if the backlight is connected to an hardware PWM pin). +In software PWM, it is possible to define multiple backlight pins. All those pins will be turned on and off at the same time during the PWM duty cycle. +This feature allows to set for instance the Caps Lock LED (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped LCTRL in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on. + +To activate multiple backlight pins, you need to add something like this to your user `config.h`: + +~~~c +#define BACKLIGHT_LED_COUNT 2 +#undef BACKLIGHT_PIN +#define BACKLIGHT_PINS { F5, B2 } +~~~ + ## Hardware PWM Implementation When using the supported pins for backlighting, QMK will use a hardware timer configured to output a PWM signal. This timer will count up to `ICRx` (by default `0xFFFF`) before resetting to 0. @@ -53,6 +92,15 @@ In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus th The breathing effect is achieved by registering an interrupt handler for `TIMER1_OVF_vect` that is called whenever the counter resets, roughly 244 times per second. In this handler, the value of an incrementing counter is mapped onto a precomputed brightness curve. To turn off breathing, the interrupt handler is simply disabled, and the brightness reset to the level stored in EEPROM. +## Software PWM Implementation + +When `BACKLIGHT_PIN` is not set to a hardware backlight pin, QMK will use a hardware timer configured to trigger software interrupts. This time will count up to `ICRx` (by default `0xFFFF`) before resetting to 0. +When resetting to 0, the CPU will fire an OVF (overflow) interrupt that will turn the LEDs on, starting the duty cycle. +The desired brightness is calculated and stored in the `OCRxx` register. When the counter reaches this value, the CPU will fire a Compare Output match interrupt, which will turn the LEDs off. +In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus the brightness, where `0x0000` is completely off and `0xFFFF` is completely on. + +The breathing effect is the same as in the hardware PWM implementation. + ## Backlight Functions |Function |Description | diff --git a/docs/feature_combo.md b/docs/feature_combo.md index 05ffc0d72577..680adce2dc27 100644 --- a/docs/feature_combo.md +++ b/docs/feature_combo.md @@ -19,7 +19,6 @@ combo_t key_combos[COMBO_COUNT] = {COMBO(test_combo, KC_ESC)}; This will send "Escape" if you hit the A and B keys. !> This method only supports [basic keycodes](keycodes_basic.md). See the examples for more control. -!> You cannot reuse (share) keys in combos. Each key should only belong to a single combo. ## Examples @@ -29,7 +28,7 @@ If you want to add a list, then you'd use something like this: enum combos { AB_ESC, JK_TAB -} +}; const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END}; const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; diff --git a/docs/feature_command.md b/docs/feature_command.md index 53a140a11682..deabedc1c3f6 100644 --- a/docs/feature_command.md +++ b/docs/feature_command.md @@ -29,9 +29,10 @@ If you would like to change the key assignments for Command, `#define` these in |`MAGIC_KEY_CONSOLE` |`C` |Enable the Command console | |`MAGIC_KEY_VERSION` |`V` |Print the running QMK version to the console | |`MAGIC_KEY_STATUS` |`S` |Print the current keyboard status to the console| -|`MAGIC_KEY_HELP1` |`H` |Print Command help to the console | -|`MAGIC_KEY_HELP2` |`SLASH` |Print Command help to the console (alternate) | +|`MAGIC_KEY_HELP` |`H` |Print Command help to the console | +|`MAGIC_KEY_HELP_ALT` |`SLASH` |Print Command help to the console (alternate) | |`MAGIC_KEY_LAYER0` |`0` |Make layer 0 the default layer | +|`MAGIC_KEY_LAYER0_ALT` |`GRAVE` |Make layer 0 the default layer (alternate) | |`MAGIC_KEY_LAYER1` |`1` |Make layer 1 the default layer | |`MAGIC_KEY_LAYER2` |`2` |Make layer 2 the default layer | |`MAGIC_KEY_LAYER3` |`3` |Make layer 3 the default layer | @@ -41,10 +42,10 @@ If you would like to change the key assignments for Command, `#define` these in |`MAGIC_KEY_LAYER7` |`7` |Make layer 7 the default layer | |`MAGIC_KEY_LAYER8` |`8` |Make layer 8 the default layer | |`MAGIC_KEY_LAYER9` |`9` |Make layer 9 the default layer | -|`MAGIC_KEY_LAYER0_ALT1` |`ESC` |Make layer 0 the default layer (alternate) | -|`MAGIC_KEY_LAYER0_ALT2` |`GRAVE` |Make layer 0 the default layer (alternate) | -|`MAGIC_KEY_BOOTLOADER` |`PAUSE` |Enter the bootloader | +|`MAGIC_KEY_BOOTLOADER` |`B` |Jump to bootloader | +|`MAGIC_KEY_BOOTLOADER_ALT` |`ESC` |Jump to bootloader (alternate) | |`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed | -|`MAGIC_KEY_EEPROM` |`E` |Clear the EEPROM | +|`MAGIC_KEY_EEPROM` |`E` |Print stored EEPROM config to the console | +|`MAGIC_KEY_EEPROM_CLEAR` |`BSPACE` |Clear the EEPROM | |`MAGIC_KEY_NKRO` |`N` |Toggle N-Key Rollover (NKRO) | |`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping | diff --git a/docs/feature_debounce_type.md b/docs/feature_debounce_type.md new file mode 100644 index 000000000000..38eca3f37c8c --- /dev/null +++ b/docs/feature_debounce_type.md @@ -0,0 +1,42 @@ +# Debounce algorithm + +QMK supports multiple debounce algorithms through its debounce API. + +The logic for which debounce method called is below. It checks various defines that you have set in rules.mk + +``` +DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce +DEBOUNCE_TYPE?= sym_g +ifneq ($(strip $(DEBOUNCE_TYPE)), custom) + QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c +endif +``` + +# Debounce selection + +| DEBOUNCE_TYPE | Description | What else is needed | +| ------------- | --------------------------------------------------- | ----------------------------- | +| Not defined | Use the default algorithm, currently sym_g | Nothing | +| custom | Use your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions | +| anything_else | Use another algorithm from quantum/debounce/* | Nothing | + +**Regarding split keyboards**: +The debounce code is compatible with split keyboards. + +# Use your own debouncing code +* Set ```DEBOUNCE_TYPE = custom ```. +* Add ```SRC += debounce.c``` +* Add your own ```debounce.c```. Look at current implementations in ```quantum/debounce``` for examples. +* Debouncing occurs after every raw matrix scan. +* Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly. + +# Changing between included debouncing methods +You can either use your own code, by including your own debounce.c, or switch to another included one. +Included debounce methods are: +* eager_pr - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE_DELAY``` milliseconds of no further input for that row. +For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be +appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use. +* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` milliseconds of no further input for that key +* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE_DELAY``` milliseconds of no changes has occured, all input changes are pushed. + + diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index 6eab402ef94f..dd12c91ce34e 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md @@ -38,7 +38,7 @@ or `keymap.c`: } else { tap_code(KC_PGUP); } - } else if (index == 2) { + } else if (index == 1) { /* Second encoder if (clockwise) { tap_code(KC_UP); } else { diff --git a/docs/feature_grave_esc.md b/docs/feature_grave_esc.md index c6fa1602210c..f57c6042ca5a 100644 --- a/docs/feature_grave_esc.md +++ b/docs/feature_grave_esc.md @@ -4,7 +4,11 @@ If you're using a 60% keyboard, or any other layout with no F-row, you will have ## Usage -Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. When pressed it will behave like `KC_ESC`, but with Shift or GUI held it will send `KC_GRAVE`. +Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. Most of the time this key will output `KC_ESC` when pressed. However, when Shift or GUI are held down it will output `KC_GRV` instead. + +## What Your OS Sees + +If Mary presses GESC on her keyboard, the OS will see an KC_ESC character. Now if Mary holds Shift down and presses GESC it will output `~`, or a shifted backtick. Now if she holds GUI/CMD/WIN, it will output a simple ` character. ## Keycodes @@ -12,6 +16,10 @@ Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) w |---------|-----------|------------------------------------------------------------------| |`KC_GESC`|`GRAVE_ESC`|Escape when pressed, ` when Shift or GUI are held| +### Caveats + +On macOS, Command+` is by default mapped to "Move focus to next window" so it will not output a backtick. Additionally, Terminal always recognises this shortcut to cycle between windows, even if the shortcut is changed in the Keyboard preferences. + ## Configuration There are several possible key combinations this will break, among them Control+Shift+Escape on Windows and Command+Option+Escape on macOS. To work around this, you can `#define` these options in your `config.h`: diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md new file mode 100644 index 000000000000..85fd4396402a --- /dev/null +++ b/docs/feature_haptic_feedback.md @@ -0,0 +1,147 @@ +# Haptic Feedback + +## Haptic feedback rules.mk options + +The following options are currently available for haptic feedback in `rule.mk`: + +`HAPTIC_ENABLE += DRV2605L` + +`HAPTIC_ENABLE += SOLENOID` + +## Known Supported Hardware + +| Name | Description | +|--------------------|-------------------------------------------------| +| [LV061228B-L65-A](https://www.digikey.com/product-detail/en/jinlong-machinery-electronics-inc/LV061228B-L65-A/1670-1050-ND/7732325) | z-axis 2v LRA | +| [Mini Motor Disc](https://www.adafruit.com/product/1201) | small 2-5v ERM | + +## Haptic Keycodes + +Not all keycodes below will work depending on which haptic mechanism you have chosen. + +| Name | Description | +|-----------|-------------------------------------------------------| +|`HPT_ON` | Turn haptic feedback on | +|`HPT_OFF` | Turn haptic feedback on | +|`HPT_TOG` | Toggle haptic feedback on/off | +|`HPT_RST` | Reset haptic feedback config to default | +|`HPT_FBK` | Toggle feedback to occur on keypress, release or both | +|`HPT_BUZ` | Toggle solenoid buzz on/off | +|`HPT_MODI` | Go to next DRV2605L waveform | +|`HPT_MODD` | Go to previous DRV2605L waveform | +|`HPT_DWLI` | Increase Solenoid dwell time | +|`HPT_DWLD` | Decrease Solenoid dwell time | + +### Solenoids + +First you will need a build a circuit to drive the solenoid through a mosfet as most MCU will not be able to provide the current needed to drive the coil in the solenoid. + +[Wiring diagram provided by Adafruit](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf) + +Select a pin that has PWM for the signal pin + +``` +#define SOLENOID_PIN *pin* +``` + +Beware that some pins may be powered during bootloader (ie. A13 on the STM32F303 chip) and will result in the solenoid kept in the on state through the whole flashing process. This may overheat and damage the solenoid. If you find that the pin the solenoid is connected to is triggering the solenoid during bootloader/DFU, select another pin. + +### DRV2605L + +DRV2605L is controlled over i2c protocol, and has to be connected to the SDA and SCL pins, these varies depending on the MCU in use. + +#### Feedback motor setup + +This driver supports 2 different feedback motors. Set the following in your `config.h` based on which motor you have selected. + +##### ERM + +Eccentric Rotating Mass vibration motors (ERM) is motor with a off-set weight attached so when drive signal is attached, the off-set weight spins and causes a sinusoidal wave that translate into vibrations. + +``` +#define FB_ERM_LRA 0 +#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ +#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ + +/* Please refer to your datasheet for the optimal setting for your specific motor. */ +#define RATED_VOLTAGE 3 +#define V_PEAK 5 +``` +##### LRA + +Linear resonant actuators (LRA, also know as a linear vibrator) works different from a ERM. A LRA has a weight and magnet suspended by springs and a voice coil. When the drive signal is applied, the weight would be vibrate on a single axis (side to side or up and down). Since the weight is attached to a spring, there is a resonance effect at a specific frequency. This frequency is where the LRA will operate the most efficiently. Refer to the motor's datasheet for the recommanded range for this frequency. + +``` +#define FB_ERM_LRA 1 +#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ +#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ + +/* Please refer to your datasheet for the optimal setting for your specific motor. */ +#define RATED_VOLTAGE 2 +#define V_PEAK 2.8 +#define V_RMS 2.0 +#define V_PEAK 2.1 +#define F_LRA 205 /* resonance freq */ +``` + +#### DRV2605L waveform library + +DRV2605L comes with preloaded library of various waveform sequences that can be called and played. If writing a macro, these waveforms can be played using `DRV_pulse(*sequence name or number*)` + +List of waveform sequences from the datasheet: + +|seq# | Sequence name |seq# | Sequence name |seq# |Sequence name | +|-----|---------------------|-----|-----------------------------------|-----|--------------------------------------| +| 1 | strong_click | 43 | lg_dblclick_med_60 | 85 | transition_rampup_med_smooth2 | +| 2 | strong_click_60 | 44 | lg_dblsharp_tick | 86 | transition_rampup_short_smooth1 | +| 3 | strong_click_30 | 45 | lg_dblsharp_tick_80 | 87 | transition_rampup_short_smooth2 | +| 4 | sharp_click | 46 | lg_dblsharp_tick_60 | 88 | transition_rampup_long_sharp1 | +| 5 | sharp_click_60 | 47 | buzz | 89 | transition_rampup_long_sharp2 | +| 6 | sharp_click_30 | 48 | buzz_80 | 90 | transition_rampup_med_sharp1 | +| 7 | soft_bump | 49 | buzz_60 | 91 | transition_rampup_med_sharp2 | +| 8 | soft_bump_60 | 50 | buzz_40 | 92 | transition_rampup_short_sharp1 | +| 9 | soft_bump_30 | 51 | buzz_20 | 93 | transition_rampup_short_sharp2 | +| 10 | dbl_click | 52 | pulsing_strong | 94 | transition_rampdown_long_smooth1_50 | +| 11 | dbl_click_60 | 53 | pulsing_strong_80 | 95 | transition_rampdown_long_smooth2_50 | +| 12 | trp_click | 54 | pulsing_medium | 96 | transition_rampdown_med_smooth1_50 | +| 13 | soft_fuzz | 55 | pulsing_medium_80 | 97 | transition_rampdown_med_smooth2_50 | +| 14 | strong_buzz | 56 | pulsing_sharp | 98 | transition_rampdown_short_smooth1_50 | +| 15 | alert_750ms | 57 | pulsing_sharp_80 | 99 | transition_rampdown_short_smooth2_50 | +| 16 | alert_1000ms | 58 | transition_click | 100 | transition_rampdown_long_sharp1_50 | +| 17 | strong_click1 | 59 | transition_click_80 | 101 | transition_rampdown_long_sharp2_50 | +| 18 | strong_click2_80 | 60 | transition_click_60 | 102 | transition_rampdown_med_sharp1_50 | +| 19 | strong_click3_60 | 61 | transition_click_40 | 103 | transition_rampdown_med_sharp2_50 | +| 20 | strong_click4_30 | 62 | transition_click_20 | 104 | transition_rampdown_short_sharp1_50 | +| 21 | medium_click1 | 63 | transition_click_10 | 105 | transition_rampdown_short_sharp2_50 | +| 22 | medium_click2_80 | 64 | transition_hum | 106 | transition_rampup_long_smooth1_50 | +| 23 | medium_click3_60 | 65 | transition_hum_80 | 107 | transition_rampup_long_smooth2_50 | +| 24 | sharp_tick1 | 66 | transition_hum_60 | 108 | transition_rampup_med_smooth1_50 | +| 25 | sharp_tick2_80 | 67 | transition_hum_40 | 109 | transition_rampup_med_smooth2_50 | +| 26 | sharp_tick3_60 | 68 | transition_hum_20 | 110 | transition_rampup_short_smooth1_50 | +| 27 | sh_dblclick_str | 69 | transition_hum_10 | 111 | transition_rampup_short_smooth2_50 | +| 28 | sh_dblclick_str_80 | 70 | transition_rampdown_long_smooth1 | 112 | transition_rampup_long_sharp1_50 | +| 29 | sh_dblclick_str_60 | 71 | transition_rampdown_long_smooth2 | 113 | transition_rampup_long_sharp2_50 | +| 30 | sh_dblclick_str_30 | 72 | transition_rampdown_med_smooth1 | 114 | transition_rampup_med_sharp1_50 | +| 31 | sh_dblclick_med | 73 | transition_rampdown_med_smooth2 | 115 | transition_rampup_med_sharp2_50 | +| 32 | sh_dblclick_med_80 | 74 | transition_rampdown_short_smooth1 | 116 | transition_rampup_short_sharp1_50 | +| 33 | sh_dblclick_med_60 | 75 | transition_rampdown_short_smooth2 | 117 | transition_rampup_short_sharp2_50 | +| 34 | sh_dblsharp_tick | 76 | transition_rampdown_long_sharp1 | 118 | long_buzz_for_programmatic_stopping | +| 35 | sh_dblsharp_tick_80 | 77 | transition_rampdown_long_sharp2 | 119 | smooth_hum1_50 | +| 36 | sh_dblsharp_tick_60 | 78 | transition_rampdown_med_sharp1 | 120 | smooth_hum2_40 | +| 37 | lg_dblclick_str | 79 | transition_rampdown_med_sharp2 | 121 | smooth_hum3_30 | +| 38 | lg_dblclick_str_80 | 80 | transition_rampdown_short_sharp1 | 122 | smooth_hum4_20 | +| 39 | lg_dblclick_str_60 | 81 | transition_rampdown_short_sharp2 | 123 | smooth_hum5_10 | +| 40 | lg_dblclick_str_30 | 82 | transition_rampup_long_smooth1 | | | +| 41 | lg_dblclick_med | 83 | transition_rampup_long_smooth2 | | | +| 42 | lg_dblclick_med_80 | 84 | transition_rampup_med_smooth1 | | | +### Optional DRV2605L defines + +``` +#define DRV_GREETING *sequence name or number* +``` +If haptic feedback is enabled, the keyboard will vibrate to a specific sqeuence during startup. That can be selected using the following define: + +``` +#define DRV_MODE_DEFAULT *sequence name or number* +``` +This will set what sequence HPT_RST will set as the active mode. If not defined, mode will be set to 1 when HPT_RST is pressed. diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md index 1ee8b5e35c6e..b34fd442d5c2 100644 --- a/docs/feature_layouts.md +++ b/docs/feature_layouts.md @@ -51,6 +51,35 @@ The folder name must be added to the keyboard's `rules.mk`: but the `LAYOUT_` variable must be defined in `.h` as well. +## Building a Keymap + +You should be able to build the keyboard keymap with a command in this format: + + make : + +### Conflicting layouts +When a keyboard supports multiple layout options, + + LAYOUTS = ortho_4x4 ortho_4x12 + +And a layout exists for both options, +``` +layouts/ ++ community/ +| + ortho_4x4/ +| | + / +| | | + ... +| + ortho_4x12/ +| | + / +| | | + ... +| + ... +``` + +The FORCE_LAYOUT argument can be used to specify which layout to build + + make : FORCE_LAYOUT=ortho_4x4 + make : FORCE_LAYOUT=ortho_4x12 + ## Tips for Making Layouts Keyboard-Agnostic ### Includes diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md new file mode 100644 index 000000000000..372407b90c2a --- /dev/null +++ b/docs/feature_led_matrix.md @@ -0,0 +1,90 @@ +# LED Matrix Lighting + +This feature allows you to use LED matrices driven by external drivers. It hooks into the backlight system so you can use the same keycodes as backlighting to control it. + +If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_rgb_matrix.md) instead. + +## Driver configuration + +### IS31FL3731 + +There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: + + LED_MATRIX_ENABLE = IS31FL3731 + +You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`: + +| Variable | Description | Default | +|----------|-------------|---------| +| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages | 100 | +| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | +| `LED_DRIVER_COUNT` | (Required) How many LED driver IC's are present | | +| `LED_DRIVER_LED_COUNT` | (Required) How many LED lights are present across all drivers | | +| `LED_DRIVER_ADDR_1` | (Required) Address for the first LED driver | | +| `LED_DRIVER_ADDR_2` | (Optional) Address for the second LED driver | | +| `LED_DRIVER_ADDR_3` | (Optional) Address for the third LED driver | | +| `LED_DRIVER_ADDR_4` | (Optional) Address for the fourth LED driver | | + +Here is an example using 2 drivers. + + // This is a 7-bit address, that gets left-shifted and bit 0 + // set to 0 for write, 1 for read (as per I2C protocol) + // The address will vary depending on your wiring: + // 0b1110100 AD <-> GND + // 0b1110111 AD <-> VCC + // 0b1110101 AD <-> SCL + // 0b1110110 AD <-> SDA + #define LED_DRIVER_ADDR_1 0b1110100 + #define LED_DRIVER_ADDR_2 0b1110110 + + #define LED_DRIVER_COUNT 2 + #define LED_DRIVER_1_LED_COUNT 25 + #define LED_DRIVER_2_LED_COUNT 24 + #define LED_DRIVER_LED_COUNT LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL + +Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. + +Define these arrays listing all the LEDs in your `.c`: + + const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + /* Refer to IS31 manual for these locations + * driver + * | LED address + * | | */ + {0, C3_3}, + .... + } + +Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ). + +## Keycodes + +All LED matrix keycodes are currently shared with the [backlight system](feature_backlight.md). + +## LED Matrix Effects + +Currently no LED matrix effects have been created. + +## Custom layer effects + +Custom layer effects can be done by defining this in your `.c`: + + void led_matrix_indicators_kb(void) { + led_matrix_set_index_value(index, value); + } + +A similar function works in the keymap as `led_matrix_indicators_user`. + +## Suspended state + +To use the suspend feature, add this to your `.c`: + + void suspend_power_down_kb(void) + { + led_matrix_set_suspend_state(true); + } + + void suspend_wakeup_init_kb(void) + { + led_matrix_set_suspend_state(false); + } diff --git a/docs/feature_macros.md b/docs/feature_macros.md index aa13fb97f4f8..d81c3c655978 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -146,9 +146,102 @@ send_string(my_str); SEND_STRING(".."SS_TAP(X_END)); ``` -## The Old Way: `MACRO()` & `action_get_macro` -?> This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead. +## Advanced Macro Functions + +There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro, if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple. + +### `record->event.pressed` + +This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is + +```c + if (record->event.pressed) { + // on keydown + } else { + // on keyup + } +``` + +### `register_code();` + +This sends the `` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`. + +### `unregister_code();` + +Parallel to `register_code` function, this sends the `` keyup event to the computer. If you don't use this, the key will be held down until it's sent. + +### `tap_code();` + +This will send `register_code()` and then `unregister_code()`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it). + +If you're having issues with taps (un)registering, you can add a delay between the register and unregister events by setting `#define TAP_CODE_DELAY 100` in your `config.h` file. The value is in milliseconds. + +### `register_code16();`, `unregister_code16();` and `tap_code16();` + +These functions work similar to their regular counterparts, but allow you to use modded keycodes (with Shift, Alt, Control, and/or GUI applied to them). + +Eg, you could use `register_code16(S(KC_5));` instead of registering the mod, then registering the keycode. + +### `clear_keyboard();` + +This will clear all mods and keys currently pressed. + +### `clear_mods();` + +This will clear all mods currently pressed. + +### `clear_keyboard_but_mods();` + +This will clear all keys besides the mods currently pressed. + +## Advanced Example: + +### Super ALT↯TAB + +This macro will register `KC_LALT` and tap `KC_TAB`, then wait for 1000ms. If the key is tapped again, it will send another `KC_TAB`; if there is no tap, `KC_LALT` will be unregistered, thus allowing you to cycle through windows. + +```c +bool is_alt_tab_active = false; # ADD this near the begining of keymap.c +uint16_t alt_tab_timer = 0; # we will be using them soon. + +enum custom_keycodes { # Make sure have the awesome keycode ready + ALT_TAB = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { # This will do most of the grunt work with the keycodes. + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + return true; +} + +void matrix_scan_user(void) { # The very important timer. + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } + } +} +``` + +--- + +## **(DEPRECATED)** The Old Way: `MACRO()` & `action_get_macro` + +!> This is inherited from TMK, and hasn't been updated - it's recommended that you use `SEND_STRING` and `process_record_user` instead. By default QMK assumes you don't have any macros. To define your macros you create an `action_get_macro()` function. For example: @@ -183,11 +276,11 @@ A macro can include the following commands: ### Mapping a Macro to a Key -Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard: +Use the `M()` function within your keymap to call a macro. For example, here is the keymap for a 2-key keyboard: ```c const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = LAYOUT( M(0), M(1) ), }; @@ -216,55 +309,16 @@ If you have a bunch of macros you want to refer to from your keymap while keepin #define M_BYE M(1) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = LAYOUT( M_HI, M_BYE ), }; ``` -## Advanced Macro Functions - -There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple. - -### `record->event.pressed` - -This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is - -```c - if (record->event.pressed) { - // on keydown - } else { - // on keyup - } -``` - -### `register_code();` - -This sends the `` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`. - -### `unregister_code();` - -Parallel to `register_code` function, this sends the `` keyup event to the computer. If you don't use this, the key will be held down until it's sent. - -### `tap_code();` - -This will send `register_code()` and then `unregister_code()`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it). - -If you're having issues with taps (un)registering, you can add a delay between the register and unregister events by setting `#define TAP_CODE_DELAY 100` in your `config.h` file. The value is in milliseconds. - -### `clear_keyboard();` -This will clear all mods and keys currently pressed. - -### `clear_mods();` - -This will clear all mods currently pressed. - -### `clear_keyboard_but_mods();` - -This will clear all keys besides the mods currently pressed. +## Advanced Example: -## Advanced Example: Single-Key Copy/Paste +### Single-Key Copy/Paste This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released. diff --git a/docs/feature_mouse_keys.md b/docs/feature_mouse_keys.md index 673eafaef5e0..363662f633b7 100644 --- a/docs/feature_mouse_keys.md +++ b/docs/feature_mouse_keys.md @@ -1,81 +1,119 @@ -# Mousekeys +# Mouse keys +Mouse keys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer at different speeds, press 5 buttons and scroll in 8 directions. -Mousekeys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer around, click up to 5 buttons, and even scroll in all 4 directions. QMK uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys). +## Adding mouse keys to your keyboard -## Adding Mousekeys to a Keymap +To use mouse keys, you must at least enable mouse keys support and map mouse actions to keys on your keyboard. -There are two steps to adding Mousekeys support to your keyboard. You must enable support in the `rules.mk` file and you must map mouse actions to keys on your keyboard. +### Enabling mouse keys -### Adding Mousekeys Support in the `rules.mk` +To enable mouse keys, add the following line to your keymap’s `rules.mk`: -To add support for Mousekeys you simply need to add a single line to your keymap's `rules.mk`: - -``` +```c MOUSEKEY_ENABLE = yes ``` -You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/rules.mk +### Mapping mouse actions -### Mapping Mouse Actions to Keyboard Keys +In your keymap you can use the following keycodes to map key presses to mouse actions: -You can use these keycodes within your keymap to map button presses to mouse actions: +|Key |Aliases |Description | +|----------------|---------|-----------------| +|`KC_MS_UP` |`KC_MS_U`|Move cursor up | +|`KC_MS_DOWN` |`KC_MS_D`|Move cursor down | +|`KC_MS_LEFT` |`KC_MS_L`|Move cursor left | +|`KC_MS_RIGHT` |`KC_MS_R`|Move cursor right| +|`KC_MS_BTN1` |`KC_BTN1`|Press button 1 | +|`KC_MS_BTN2` |`KC_BTN2`|Press button 2 | +|`KC_MS_BTN3` |`KC_BTN3`|Press button 3 | +|`KC_MS_BTN4` |`KC_BTN4`|Press button 4 | +|`KC_MS_BTN5` |`KC_BTN5`|Press button 5 | +|`KC_MS_WH_UP` |`KC_WH_U`|Move wheel up | +|`KC_MS_WH_DOWN` |`KC_WH_D`|Move wheel down | +|`KC_MS_WH_LEFT` |`KC_WH_L`|Move wheel left | +|`KC_MS_WH_RIGHT`|`KC_WH_R`|Move wheel right | +|`KC_MS_ACCEL0` |`KC_ACL0`|Set speed to 0 | +|`KC_MS_ACCEL1` |`KC_ACL1`|Set speed to 1 | +|`KC_MS_ACCEL2` |`KC_ACL2`|Set speed to 2 | -|Key |Aliases |Description | -|----------------|---------|---------------------------| -|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up | -|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down | -|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left | -|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right | -|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 | -|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 | -|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 | -|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 | -|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 | -|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up | -|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down | -|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left | -|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right | -|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0| -|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1| -|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2| +## Configuring mouse keys -You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c#L46 +Mouse keys supports two different modes to move the cursor: -## Configuring the Behavior of Mousekeys +* **Accelerated (default):** Holding movement keys accelerates the cursor until it reaches its maximum speed. +* **Constant:** Holding movement keys moves the cursor at constant speeds. -The default speed for controlling the mouse with the keyboard is intentionally slow. You can adjust these parameters by adding these settings to your keymap's `config.h` file. All times are specified in milliseconds (ms). +The same principle applies to scrolling. -``` -#define MOUSEKEY_DELAY 300 -#define MOUSEKEY_INTERVAL 50 -#define MOUSEKEY_MAX_SPEED 10 -#define MOUSEKEY_TIME_TO_MAX 20 -#define MOUSEKEY_WHEEL_MAX_SPEED 8 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 -``` +Configuration options that are times, intervals or delays are given in milliseconds. Scroll speed is given as multiples of the default scroll step. For example, a scroll speed of 8 means that each scroll action covers 8 times the length of the default scroll step as defined by your operating system or application. + +### Accelerated mode +This is the default mode. You can adjust the cursor and scrolling acceleration using the following settings in your keymap’s `config.h` file: -### `MOUSEKEY_DELAY` +|Define |Default|Description | +|----------------------------|-------|---------------------------------------------------------| +|`MOUSEKEY_DELAY` |300 |Delay between pressing a movement key and cursor movement| +|`MOUSEKEY_INTERVAL` |50 |Time between cursor movements | +|`MOUSEKEY_MAX_SPEED` |10 |Maximum cursor speed at which acceleration stops | +|`MOUSEKEY_TIME_TO_MAX` |20 |Time until maximum cursor speed is reached | +|`MOUSEKEY_WHEEL_MAX_SPEED` |8 |Maximum number of scroll steps per scroll action | +|`MOUSEKEY_WHEEL_TIME_TO_MAX`|40 |Time until maximum scroll speed is reached | -When one of the mouse movement buttons is pressed this setting is used to define the delay between that button press and the mouse cursor moving. Some people find that small movements are impossible if this setting is too low, while settings that are too high feel sluggish. +Tips: -### `MOUSEKEY_INTERVAL` +* Setting `MOUSEKEY_DELAY` too low makes the cursor unresponsive. Setting it too high makes small movements difficult. +* For smoother cursor movements, lower the value of `MOUSEKEY_INTERVAL`. If the refresh rate of your display is 60Hz, you could set it to `16` (1/60). As this raises the cursor speed significantly, you may want to lower `MOUSEKEY_MAX_SPEED`. +* Setting `MOUSEKEY_TIME_TO_MAX` or `MOUSEKEY_WHEEL_TIME_TO_MAX` to `0` will disable acceleration for the cursor or scrolling respectively. This way you can make one of them constant while keeping the other accelerated, which is not possible in constant speed mode. -When a movement key is held down this specifies how long to wait between each movement report. Lower settings will translate into an effectively higher mouse speed. +Cursor acceleration uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys). -### `MOUSEKEY_MAX_SPEED` +### Constant mode -As a movement key is held down the speed of the mouse cursor will increase until it reaches `MOUSEKEY_MAX_SPEED`. +In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `KC_ACL0`, `KC_ACL1` and `KC_ACL2` change the cursor and scroll speed to their respective setting. -### `MOUSEKEY_TIME_TO_MAX` +You can choose whether speed selection is momentary or tap-to-select: -How long you want to hold down a movement key for until `MOUSEKEY_MAX_SPEED` is reached. This controls how quickly your cursor will accelerate. +* **Momentary:** The chosen speed is only active while you hold the respective key. When the key is raised, mouse keys returns to the unmodified speed. +* **Tap-to-select:** The chosen speed is activated when you press the respective key and remains active even after the key has been raised. The default speed is that of `KC_ACL1`. There is no unmodified speed. -### `MOUSEKEY_WHEEL_MAX_SPEED` +The default speeds from slowest to fastest are as follows: -The top speed for scrolling movements. +* **Momentary:** `KC_ACL0` < `KC_ACL1` < *unmodified* < `KC_ACL2` +* **Tap-to-select:** `KC_ACL0` < `KC_ACL1` < `KC_ACL2` -### `MOUSEKEY_WHEEL_TIME_TO_MAX` +To use constant speed mode, you must at least define `MK_3_SPEED` in your keymap’s `config.h` file: + +```c +#define MK_3_SPEED +``` + +To enable momentary mode, also define `MK_MOMENTARY_ACCEL`: + +```c +#define MK_MOMENTARY_ACCEL +``` -How long you want to hold down a scroll key for until `MOUSEKEY_WHEEL_MAX_SPEED` is reached. This controls how quickly your scrolling will accelerate. +Use the following settings if you want to adjust cursor movement or scrolling: + +|Define |Default |Description | +|---------------------|-------------|-------------------------------------------| +|`MK_3_SPEED` |*Not defined*|Enable constant cursor speeds | +|`MK_MOMENTARY_ACCEL` |*Not defined*|Enable momentary speed selection | +|`MK_C_OFFSET_UNMOD` |16 |Cursor offset per movement (unmodified) | +|`MK_C_INTERVAL_UNMOD`|16 |Time between cursor movements (unmodified) | +|`MK_C_OFFSET_0` |1 |Cursor offset per movement (`KC_ACL0`) | +|`MK_C_INTERVAL_0` |32 |Time between cursor movements (`KC_ACL0`) | +|`MK_C_OFFSET_1` |4 |Cursor offset per movement (`KC_ACL1`) | +|`MK_C_INTERVAL_1` |16 |Time between cursor movements (`KC_ACL1`) | +|`MK_C_OFFSET_2` |32 |Cursor offset per movement (`KC_ACL2`) | +|`MK_C_INTERVAL_2` |16 |Time between cursor movements (`KC_ACL2`) | +|`MK_W_OFFSET_UNMOD` |1 |Scroll steps per scroll action (unmodified)| +|`MK_W_INTERVAL_UNMOD`|40 |Time between scroll steps (unmodified) | +|`MK_W_OFFSET_0` |1 |Scroll steps per scroll action (`KC_ACL0`) | +|`MK_W_INTERVAL_0` |360 |Time between scroll steps (`KC_ACL0`) | +|`MK_W_OFFSET_1` |1 |Scroll steps per scroll action (`KC_ACL1`) | +|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`KC_ACL1`) | +|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`KC_ACL2`) | +|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`KC_ACL2`) | diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md new file mode 100644 index 000000000000..fcc19515a945 --- /dev/null +++ b/docs/feature_oled_driver.md @@ -0,0 +1,274 @@ +# OLED Driver + +## OLED Supported Hardware + +128x32 OLED modules using SSD1306 driver IC over I2C. Supported on AVR based keyboards. Possible but untested hardware includes ARM based keyboards and other sized OLED modules using SSD1306 over I2C, such as 128x64. + +!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses i2c to communication between sides this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this. + +## Usage + +To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to set `OLED_DRIVER_ENABLE=yes` in `rules.mk`, e.g.: + +``` +OLED_DRIVER_ENABLE = yes +``` + +This enables the feature and the `OLED_DRIVER_ENABLE` define. Then in your `keymap.c` file, you will need to implement the user task call, e.g: + +```C++ +#ifdef OLED_DRIVER_ENABLE +void oled_task_user(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _FN: + oled_write_P(PSTR("FN\n"), false); + break; + case _ADJ: + oled_write_P(PSTR("ADJ\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(led_usb_state & (1<Requires user to implement the below defines. | +|`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. | +|`OLED_DISPLAY_HEIGHT` |`32` |The height of the OLED display. | +|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.
`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`| +|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering.| +|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.
`(sizeof(OLED_BLOCK_TYPE) * 8)`| +|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering
`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`| +|`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. | +|`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. | + + +### 90 Degree Rotation - Technical Mumbo Jumbo + +```C +// OLED Rotation enum values are flags +typedef enum { + OLED_ROTATION_0 = 0, + OLED_ROTATION_90 = 1, + OLED_ROTATION_180 = 2, + OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 +} oled_rotation_t; +``` + + OLED displays driven by SSD1306 drivers only natively support in hard ware 0 degree and 180 degree rendering. This feature is done in software and not free. Using this feature will increase the time to calculate what data to send over i2c to the OLED. If you are strapped for cycles, this can cause keycodes to not register. In testing however, the rendering time on an `atmega32u4` board only went from 2ms to 5ms and keycodes not registering was only noticed once we hit 15ms. + + 90 Degree Rotated Rendering is achieved by using bitwise operations to rotate each 8 block of memory and uses two precalculated arrays to remap buffer memory to OLED memory. The memory map defines are precalculated for remap performance and are calculated based on the OLED Height, Width, and Block Size. For example, in the 128x32 implementation with a `uint8_t` block type, we have a 64 byte block size. This gives us eight 8 byte blocks that need to be rotated and rendered. The OLED renders horizontally two 8 byte blocks before moving down a page, e.g: + +| | | | | | | +|---|---|---|---|---|---| +| 0 | 1 | | | | | +| 2 | 3 | | | | | +| 4 | 5 | | | | | +| 6 | 7 | | | | | + +However the local buffer is stored as if it was Height x Width display instead of Width x Height, e.g: + +| | | | | | | +|---|---|---|---|---|---| +| 3 | 7 | | | | | +| 2 | 6 | | | | | +| 1 | 5 | | | | | +| 0 | 4 | | | | | + +So those precalculated arrays just index the memory offsets in the order in which each one iterates its data. + +## OLED API + +```C++ +// OLED Rotation enum values are flags +typedef enum { + OLED_ROTATION_0 = 0, + OLED_ROTATION_90 = 1, + OLED_ROTATION_180 = 2, + OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 +} oled_rotation_t; + +// Initialize the OLED display, rotating the rendered output based on the define passed in. +// Returns true if the OLED was initialized successfully +bool oled_init(oled_rotation_t rotation); + +// Called at the start of oled_init, weak function overridable by the user +// rotation - the value passed into oled_init +// Return new oled_rotation_t if you want to override default rotation +oled_rotation_t oled_init_user(oled_rotation_t rotation); + +// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering +void oled_clear(void); + +// Renders the dirty chunks of the buffer to OLED display +void oled_render(void); + +// Moves cursor to character position indicated by column and line, wraps if out of bounds +// Max column denoted by 'oled_max_chars()' and max lines by 'oled_max_lines()' functions +void oled_set_cursor(uint8_t col, uint8_t line); + +// Advances the cursor to the next page, writing ' ' if true +// Wraps to the begining when out of bounds +void oled_advance_page(bool clearPageRemainder); + +// Moves the cursor forward 1 character length +// Advance page if there is not enough room for the next character +// Wraps to the begining when out of bounds +void oled_advance_char(void); + +// Writes a single character to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Main handler that writes character data to the display buffer +void oled_write_char(const char data, bool invert); + +// Writes a string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +void oled_write(const char *data, bool invert); + +// Writes a string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Advances the cursor to the next page, wiring ' ' to the remainder of the current page +void oled_write_ln(const char *data, bool invert); + +// Writes a PROGMEM string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Remapped to call 'void oled_write(const char *data, bool invert);' on ARM +void oled_write_P(const char *data, bool invert); + +// Writes a PROGMEM string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Advances the cursor to the next page, wiring ' ' to the remainder of the current page +// Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM +void oled_write_ln_P(const char *data, bool invert); + +// Can be used to manually turn on the screen if it is off +// Returns true if the screen was on or turns on +bool oled_on(void); + +// Can be used to manually turn off the screen if it is on +// Returns true if the screen was off or turns off +bool oled_off(void); + +// Basically it's oled_render, but with timeout management and oled_task_user calling! +void oled_task(void); + +// Called at the start of oled_task, weak function overridable by the user +void oled_task_user(void); + +// Scrolls the entire display right +// Returns true if the screen was scrolling or starts scrolling +// NOTE: display contents cannot be changed while scrolling +bool oled_scroll_right(void); + +// Scrolls the entire display left +// Returns true if the screen was scrolling or starts scrolling +// NOTE: display contents cannot be changed while scrolling +bool oled_scroll_left(void); + +// Turns off display scrolling +// Returns true if the screen was not scrolling or stops scrolling +bool oled_scroll_off(void); + +// Returns the maximum number of characters that will fit on a line +uint8_t oled_max_chars(void); + +// Returns the maximum number of lines that will fit on the OLED +uint8_t oled_max_lines(void); +``` + +## SSD1306.h driver conversion guide + +|Old API |Recommended New API | +|---------------------------|-----------------------------------| +|`struct CharacterMatrix` |*removed - delete all references* | +|`iota_gfx_init` |`oled_init` | +|`iota_gfx_on` |`oled_on` | +|`iota_gfx_off` |`oled_off` | +|`iota_gfx_flush` |`oled_render` | +|`iota_gfx_write_char` |`oled_write_char` | +|`iota_gfx_write` |`oled_write` | +|`iota_gfx_write_P` |`oled_write_P` | +|`iota_gfx_clear_screen` |`oled_clear` | +|`matrix_clear` |*removed - delete all references* | +|`matrix_write_char_inner` |`oled_write_char` | +|`matrix_write_char` |`oled_write_char` | +|`matrix_write` |`oled_write` | +|`matrix_write_ln` |`oled_write_ln` | +|`matrix_write_P` |`oled_write_P` | +|`matrix_write_ln_P` |`oled_write_ln_P` | +|`matrix_render` |`oled_render` | +|`iota_gfx_task` |`oled_task` | +|`iota_gfx_task_user` |`oled_task_user` | diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 0af1e4947960..8f0cd12b3caa 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -1,217 +1,403 @@ # RGB Matrix Lighting -## Driver configuration +This feature allows you to use RGB LED matrices driven by external drivers. It hooks into the RGBLIGHT system so you can use the same keycodes as RGBLIGHT to control it. + +If you want to use single color LED's you should use the [LED Matrix Subsystem](feature_led_matrix.md) instead. +## Driver configuration +--- ### IS31FL3731 There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: - RGB_MATRIX_ENABLE = IS31FL3731 +```C +RGB_MATRIX_ENABLE = IS31FL3731 +``` Configure the hardware via your `config.h`: - // This is a 7-bit address, that gets left-shifted and bit 0 - // set to 0 for write, 1 for read (as per I2C protocol) - // The address will vary depending on your wiring: - // 0b1110100 AD <-> GND - // 0b1110111 AD <-> VCC - // 0b1110101 AD <-> SCL - // 0b1110110 AD <-> SDA - #define DRIVER_ADDR_1 0b1110100 - #define DRIVER_ADDR_2 0b1110110 - - #define DRIVER_COUNT 2 - #define DRIVER_1_LED_TOTAL 25 - #define DRIVER_2_LED_TOTAL 24 - #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL +```C +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110110 + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 25 +#define DRIVER_2_LED_TOTAL 24 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +``` + +!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`. Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. Define these arrays listing all the LEDs in your `.c`: - const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - /* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, C1_3, C2_3, C3_3}, - .... - } +```C +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C1_3, C2_3, C3_3}, + .... +} +``` Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now). -### IS31FL3733 +--- +### IS31FL3733/IS31FL3737 + +!> For the IS31FL3737, replace all instances of `IS31FL3733` below with `IS31FL3737`. There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: - RGB_MATRIX_ENABLE = IS31FL3733 +```C +RGB_MATRIX_ENABLE = IS31FL3733 +``` Configure the hardware via your `config.h`: - // This is a 7-bit address, that gets left-shifted and bit 0 - // set to 0 for write, 1 for read (as per I2C protocol) - // The address will vary depending on your wiring: - // 00 <-> GND - // 01 <-> SCL - // 10 <-> SDA - // 11 <-> VCC - // ADDR1 represents A1:A0 of the 7-bit address. - // ADDR2 represents A3:A2 of the 7-bit address. - // The result is: 0b101(ADDR2)(ADDR1) - #define DRIVER_ADDR_1 0b1010000 - #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. - - #define DRIVER_COUNT 1 - #define DRIVER_1_LED_TOTAL 64 - #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +```C +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 00 <-> GND +// 01 <-> SCL +// 10 <-> SDA +// 11 <-> VCC +// ADDR1 represents A1:A0 of the 7-bit address. +// ADDR2 represents A3:A2 of the 7-bit address. +// The result is: 0b101(ADDR2)(ADDR1) +#define DRIVER_ADDR_1 0b1010000 +#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 64 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +``` Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1` Define these arrays listing all the LEDs in your `.c`: - const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - /* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, B_1, A_1, C_1}, - .... - } +```C +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, B_1, A_1, C_1}, + .... +} +``` Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now). -From this point forward the configuration is the same for all the drivers. +--- - const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - /* {row | col << 4} - * | {x=0..224, y=0..64} - * | | modifier - * | | | */ - {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, - {{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, - .... - } +### WS2812 (AVR only) -The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is: +There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`: - x = 224 / ( NUMBER_OF_ROWS - 1 ) * ROW_POSITION - y = 64 / (NUMBER_OF_COLS - 1 ) * COL_POSITION +```C +RGB_MATRIX_ENABLE = WS2812 +``` -Where all variables are decimels/floats. +Configure the hardware via your `config.h`: -`modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects). +```C +// The pin connected to the data pin of the LEDs +#define RGB_DI_PIN D7 +// The number of LEDs connected +#define DRIVER_LED_TOTAL 70 +``` + +--- + +From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example: + +```C +const led_config_t g_led_config = { { + // Key Matrix to LED Index + { 5, NO_LED, NO_LED, 0 }, + { NO_LED, NO_LED, NO_LED, NO_LED }, + { 4, NO_LED, NO_LED, 1 }, + { 3, NO_LED, NO_LED, 2 } +}, { + // LED Index to Physical Position + { 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 } +}, { + // LED Index to Flag + 1, 4, 4, 4, 4, 1 +} }; +``` + +The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical `{ x, y }` position on the keyboard. The default expected range of values for `{ x, y }` is the inclusive range `{ 0..224, 0..64 }`. This default expected range is due to effects that calculate the center of the keyboard for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents `{ x, y }` coordinate `{ 0, 0 }` and the bottom right of your keyboard represents `{ 224, 64 }`. Using this as a basis, you can use the following formula to calculate the physical position: + +```C +x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION +y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION +``` + +Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. + +As mentioned earlier, the center of the keyboard by default is expected to be `{ 112, 32 }`, but this can be changed if you want to more accurately calculate the LED's physical `{ x, y }` positions. Keyboard designers can implement `#define RGB_MATRIX_CENTER { 112, 32 }` in their config.h file with the new center point of the keyboard, or where they want it to be allowing more possibilities for the `{ x, y }` values. Do note that the maximum value for x or y is 255, and the recommended maximum is 224 as this gives animations runoff room before they reset. + +`// LED Index to Flag` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type. + +## Flags + +|Define |Description | +|------------------------------------|-------------------------------------------| +|`#define HAS_FLAGS(bits, flags)` |Returns true if `bits` has all `flags` set.| +|`#define HAS_ANY_FLAGS(bits, flags)`|Returns true if `bits` has any `flags` set.| +|`#define LED_FLAG_NONE 0x00` |If this LED has no flags. | +|`#define LED_FLAG_ALL 0xFF` |If this LED has all flags. | +|`#define LED_FLAG_MODIFIER 0x01` |If the Key for this LED is a modifier. | +|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. | +|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. | ## Keycodes All RGB keycodes are currently shared with the RGBLIGHT system: - * `RGB_TOG` - toggle - * `RGB_MOD` - cycle through modes - * `RGB_HUI` - increase hue - * `RGB_HUD` - decrease hue - * `RGB_SAI` - increase saturation - * `RGB_SAD` - decrease saturation - * `RGB_VAI` - increase value - * `RGB_VAD` - decrease value - * `RGB_SPI` - increase speed effect (no EEPROM support) - * `RGB_SPD` - decrease speed effect (no EEPROM support) - - - * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system +* `RGB_TOG` - toggle +* `RGB_MOD` - cycle through modes +* `RGB_HUI` - increase hue +* `RGB_HUD` - decrease hue +* `RGB_SAI` - increase saturation +* `RGB_SAD` - decrease saturation +* `RGB_VAI` - increase value +* `RGB_VAD` - decrease value +* `RGB_SPI` - increase speed effect (no EEPROM support) +* `RGB_SPD` - decrease speed effect (no EEPROM support) +* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system ## RGB Matrix Effects -These are the effects that are currently available: - - enum rgb_matrix_effects { - RGB_MATRIX_SOLID_COLOR = 1, - RGB_MATRIX_ALPHAS_MODS, - RGB_MATRIX_DUAL_BEACON, - RGB_MATRIX_GRADIENT_UP_DOWN, - RGB_MATRIX_RAINDROPS, - RGB_MATRIX_CYCLE_ALL, - RGB_MATRIX_CYCLE_LEFT_RIGHT, - RGB_MATRIX_CYCLE_UP_DOWN, - RGB_MATRIX_RAINBOW_BEACON, - RGB_MATRIX_RAINBOW_PINWHEELS, - RGB_MATRIX_RAINBOW_MOVING_CHEVRON, - RGB_MATRIX_JELLYBEAN_RAINDROPS, - RGB_MATRIX_DIGITAL_RAIN, - #ifdef RGB_MATRIX_KEYPRESSES - RGB_MATRIX_SOLID_REACTIVE, - RGB_MATRIX_SPLASH, - RGB_MATRIX_MULTISPLASH, - RGB_MATRIX_SOLID_SPLASH, - RGB_MATRIX_SOLID_MULTISPLASH, - #endif - RGB_MATRIX_EFFECT_MAX - }; - -You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`: - - -|Define |Description | -|---------------------------------------------------|--------------------------------------------| -|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` | -|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | -|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` | -|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | -|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | -|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | -|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON`| -|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | -|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` | -|`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` | -|`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` | -|`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` | -|`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` | +All effects have been configured to support current configuration values (Hue, Saturation, Value, & Speed) unless otherwise noted below. These are the effects that are currently available: + +```C +enum rgb_matrix_effects { + RGB_MATRIX_NONE = 0, + RGB_MATRIX_SOLID_COLOR = 1, // Static single hue, no speed support + RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue + RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes + RGB_MATRIX_BREATHING, // Single hue brightness cycling animation + RGB_MATRIX_BAND_SAT, // Single hue band fading saturation scrolling left to right + RGB_MATRIX_BAND_VAL, // Single hue band fading brightness scrolling left to right + RGB_MATRIX_BAND_PINWHEEL_SAT, // Single hue 3 blade spinning pinwheel fades saturation + RGB_MATRIX_BAND_PINWHEEL_VAL, // Single hue 3 blade spinning pinwheel fades brightness + RGB_MATRIX_BAND_SPIRAL_SAT, // Single hue spinning spiral fades saturation + RGB_MATRIX_BAND_SPIRAL_VAL, // Single hue spinning spiral fades brightness + RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient + RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right + RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom + RGB_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in + RGB_MATRIX_CYCLE_OUT_IN_DUAL, // Full dual gradients scrolling out to in + RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right + RGB_MATRIX_CYCLE_PINWHEEL, // Full gradient spinning pinwheel around center of keyboard + RGB_MATRIX_CYCLE_SPIRAL, // Full gradient spinning spiral around center of keyboard + RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard + RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard + RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard + RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue + RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation +#if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS) + RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM! + RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation +#endif +#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) + RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out + RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue + RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out + RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out + RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out + RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out + RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out + RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out + RGB_MATRIX_SPLASH, // Full gradient & value pulse away from a single key hit then fades value out + RGB_MATRIX_MULTISPLASH, // Full gradient & value pulse away from multiple key hits then fades value out + RGB_MATRIX_SOLID_SPLASH, // Hue & value pulse away from a single key hit then fades value out + RGB_MATRIX_SOLID_MULTISPLASH, // Hue & value pulse away from multiple key hits then fades value out +#endif + RGB_MATRIX_EFFECT_MAX +}; +``` +You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`: -## Custom layer effects - -Custom layer effects can be done by defining this in your `.c`: - void rgb_matrix_indicators_kb(void) { - rgb_matrix_set_color(index, red, green, blue); - } +|Define |Description | +|-------------------------------------------------------|-----------------------------------------------| +|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` | +|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` | +|`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` | +|`#define DISABLE_RGB_MATRIX_BAND_SAT` |Disables `RGB_MATRIX_BAND_SAT` | +|`#define DISABLE_RGB_MATRIX_BAND_VAL` |Disables `RGB_MATRIX_BAND_VAL` | +|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT` |Disables `RGB_MATRIX_BAND_PINWHEEL_SAT` | +|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL` |Disables `RGB_MATRIX_BAND_PINWHEEL_VAL` | +|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT` |Disables `RGB_MATRIX_BAND_SPIRAL_SAT` | +|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL` |Disables `RGB_MATRIX_BAND_SPIRAL_VAL` | +|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | +|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | +|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | +|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN` |Disables `RGB_MATRIX_CYCLE_OUT_IN` | +|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Disables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` | +|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` | +|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | +|`#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL` |Disables `RGB_MATRIX_CYCLE_PINWHEEL` | +|`#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL` |Disables `RGB_MATRIX_CYCLE_SPIRAL` | +|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | +|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` | +|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | +|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | +|`#define DISABLE_RGB_MATRIX_TYPING_HEATMAP` |Disables `RGB_MATRIX_TYPING_HEATMAP` | +|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` | +|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` | +|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` | +|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_WIDE` | +|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` | +|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_CROSS` | +|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTICROSS`| +|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` |Disables `RGB_MATRIX_SOLID_REACTIVE_NEXUS` | +|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS`| +|`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` | +|`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` | +|`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` | +|`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` | + + +## Custom RGB Matrix Effects + +By setting `RGB_MATRIX_CUSTOM_USER` (and/or `RGB_MATRIX_CUSTOM_KB`) in `rule.mk`, new effects can be defined directly from userspace, without having to edit any QMK core files. + +To declare new effects, create a new `rgb_matrix_user/kb.inc` that looks something like this: + +`rgb_matrix_user.inc` should go in the root of the keymap directory. +`rgb_matrix_kb.inc` should go in the root of the keyboard directory. + +```C +// !!! DO NOT ADD #pragma once !!! // + +// Step 1. +// Declare custom effects using the RGB_MATRIX_EFFECT macro +// (note the lack of semicolon after the macro!) +RGB_MATRIX_EFFECT(my_cool_effect) +RGB_MATRIX_EFFECT(my_cool_effect2) + +// Step 2. +// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +// e.g: A simple effect, self-contained within a single method +static bool my_cool_effect(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (uint8_t i = led_min; i < led_max; i++) { + rgb_matrix_set_color(i, 0xff, 0xff, 0x00); + } + return led_max < DRIVER_LED_TOTAL; +} + +// e.g: A more complex effect, relying on external methods and state, with +// dedicated init and run methods +static uint8_t some_global_state; +static void my_cool_effect2_complex_init(effect_params_t* params) { + some_global_state = 1; +} +static bool my_cool_effect2_complex_run(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (uint8_t i = led_min; i < led_max; i++) { + rgb_matrix_set_color(i, 0xff, some_global_state++, 0xff); + } + + return led_max < DRIVER_LED_TOTAL; +} +static bool my_cool_effect2(effect_params_t* params) { + if (params->init) my_cool_effect2_complex_init(params); + return my_cool_effect2_complex_run(params); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +``` + +For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix_animation/` + + +## Colors + +These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions. + +|RGB |HSV | +|-------------------|-------------------| +|`RGB_WHITE` |`HSV_WHITE` | +|`RGB_RED` |`HSV_RED` | +|`RGB_CORAL` |`HSV_CORAL` | +|`RGB_ORANGE` |`HSV_ORANGE` | +|`RGB_GOLDENROD` |`HSV_GOLDENROD` | +|`RGB_GOLD` |`HSV_GOLD` | +|`RGB_YELLOW` |`HSV_YELLOW` | +|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` | +|`RGB_GREEN` |`HSV_GREEN` | +|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` | +|`RGB_TURQUOISE` |`HSV_TURQUOISE` | +|`RGB_TEAL` |`HSV_TEAL` | +|`RGB_CYAN` |`HSV_CYAN` | +|`RGB_AZURE` |`HSV_AZURE` | +|`RGB_BLUE` |`HSV_BLUE` | +|`RGB_PURPLE` |`HSV_PURPLE` | +|`RGB_MAGENTA` |`HSV_MAGENTA` | +|`RGB_PINK` |`HSV_PINK` | + +These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list! -A similar function works in the keymap as `rgb_matrix_indicators_user`. ## Additional `config.h` Options - #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) - #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) - #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects - #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended - #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +```C +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +``` ## EEPROM storage The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with: - #define EECONFIG_RGB_MATRIX (uint32_t *)16 +```C +#define EECONFIG_RGB_MATRIX (uint32_t *)28 +``` -Where `16` is an unused index from `eeconfig.h`. +Where `28` is an unused index from `eeconfig.h`. ## Suspended state To use the suspend feature, add this to your `.c`: - void suspend_power_down_kb(void) - { - rgb_matrix_set_suspend_state(true); - } - - void suspend_wakeup_init_kb(void) - { - rgb_matrix_set_suspend_state(false); - } +```C +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); +} +``` diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 52d5c5fe8a20..be4ddfa72956 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -23,10 +23,11 @@ RGBLIGHT_ENABLE = yes At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your `config.h`. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these. -|Define |Description | -|------------|---------------------------------------------| -|`RGB_DI_PIN`|The pin connected to the data pin of the LEDs| -|`RGBLED_NUM`|The number of LEDs connected | +|Define |Description | +|---------------|---------------------------------------------------------------------------------------------------------| +|`RGB_DI_PIN` |The pin connected to the data pin of the LEDs | +|`RGBLED_NUM` |The number of LEDs connected | +|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half directly wired to `RGB_DI_PIN` | Then you should be able to use the keycodes below to change the RGB lighting to your liking. @@ -36,9 +37,9 @@ QMK uses [Hue, Saturation, and Value](https://en.wikipedia.org/wiki/HSL_and_HSV) HSV Color Wheel -Changing the **Hue** cycles around the circle. -Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color. -Changing the **Value** sets the overall brightness. +Changing the **Hue** cycles around the circle.
+Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.
+Changing the **Value** sets the overall brightness.
## Keycodes @@ -74,9 +75,9 @@ Your RGB lighting can be configured by placing these `#define`s in your `config. |`RGBLIGHT_VAL_STEP` |`17` |The number of steps to increment the brightness by | |`RGBLIGHT_LIMIT_VAL` |`255` |The maximum brightness level | |`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep| +|`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added| -## Animations - +## Effects and Animations Not only can this lighting be whatever color you want, if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a number of animation modes at your disposal: @@ -98,32 +99,59 @@ Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstrat Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol. -The following options can be used to tweak the various animations: +### Effect and Animation Toggles + +Use these defines to add or remove animations from the firmware. When you are running low on flash space, it can be helpful to disable animations you are not using. + +|Define |Default |Description | +|------------------------------------|-------------|-------------------------------------------------------------------------------------| +|`RGBLIGHT_ANIMATIONS` |*Not defined*|Enable all additional animation modes. | +|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|Enable alternating animation mode. | +|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|Enable breathing animation mode. | +|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|Enable christmas animation mode. | +|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|Enable knight animation mode. | +|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|Enable rainbow mood animation mode. | +|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|Enable rainbow swirl animation mode. | +|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|Enable RGB test animation mode. | +|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|Enable snake animation mode. | +|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|Enable static gradient mode. | + +### Effect and Animation Settings + +The following options are used to tweak the various animations: |Define |Default |Description | |------------------------------------|-------------|-------------------------------------------------------------------------------------| -|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|If defined, enable breathing animation mode. | -|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|If defined, enable rainbow mood animation mode. | -|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|If defined, enable rainbow swirl animation mode. | -|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|If defined, enable snake animation mode. | -|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|If defined, enable knight animation mode. | -|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|If defined, enable christmas animation mode. | -|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|If defined, enable static gradient mode. | -|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|If defined, enable RGB test animation mode. | -|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|If defined, enable alternating animation mode. | -|`RGBLIGHT_ANIMATIONS` |*Not defined*|If defined, enables all additional animation modes | -|`RGBLIGHT_EFFECT_BREATHE_CENTER` |`1.85` |Used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 | +|`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 | |`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 | -|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation | -|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation | -|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by | -|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel | |`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds| |`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation | -|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls | +|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel | +|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation | +|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by | +|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls | +|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation | + +### Example Usage to Reduce Memory Footprint + 1. Remove `RGBLIGHT_ANIMATIONS` from `config.h`. + 1. Selectively add the animations you want to enable. The following would enable two animations and save about 4KiB: + +```diff + #undef RGBLED_NUM +-#define RGBLIGHT_ANIMATIONS ++#define RGBLIGHT_EFFECT_STATIC_GRADIENT ++#define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLED_NUM 12 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 +``` + +### Animation Speed You can also modify the speeds that the different modes animate at: +Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY). + ```c // How long (in milliseconds) to wait between animation steps for each of the "Solid color breathing" animations const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; @@ -141,46 +169,216 @@ const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31}; // These control which hues are selected for each of the "Static gradient" modes -const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; +const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64}; ``` ## Functions If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include: -|Function |Description | -|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------| -|`rgblight_enable()` |Turn LEDs on, based on their previous state | -|`rgblight_enable_noeeprom()` |Turn LEDs on, based on their previous state (not written to EEPROM) | -|`rgblight_disable()` |Turn LEDs off | -|`rgblight_disable_noeeprom()` |Turn LEDs off (not written to EEPROM) | -|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled | -|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) | -|`rgblight_setrgb(r, g, b)` |Set all LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | -|`rgblight_setrgb_at(r, g, b, led)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM) | -|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 | -|`rgblight_sethsv_noeeprom(h, s, v)`|Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) | -|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)| -|`rgblight_toggle()` |Toggle all LEDs between on and off | -|`rgblight_toggle_noeeprom()` |Toggle all LEDs between on and off (not written to EEPROM) | -|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations | -|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) | -|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations | -|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) | -|`rgblight_increase_hue()` |Increase the hue for all LEDs. This wraps around at maximum hue | -|`rgblight_increase_hue_noeeprom()` |Increase the hue for all LEDs. This wraps around at maximum hue (not written to EEPROM) | -|`rgblight_decrease_hue()` |Decrease the hue for all LEDs. This wraps around at minimum hue | -|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for all LEDs. This wraps around at minimum hue (not written to EEPROM) | -|`rgblight_increase_sat()` |Increase the saturation for all LEDs. This wraps around at maximum saturation | -|`rgblight_increase_sat_noeeprom()` |Increase the saturation for all LEDs. This wraps around at maximum saturation (not written to EEPROM) | -|`rgblight_decrease_sat()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation | -|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation (not written to EEPROM) | -|`rgblight_increase_val()` |Increase the value for all LEDs. This wraps around at maximum value | -|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) | -|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value | -|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) | - -Additionally, [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h) defines several predefined shortcuts for various colors. Feel free to add to this list! +### Utility Functions +|Function |Description | +|--------------------------------------------|-------------------------------------------------------------------| +|`sethsv(hue, sat, val, ledbuf)` |Set ledbuf to the given HSV value | +|`sethsv_raw(hue, sat, val, ledbuf)` |Set ledbuf to the given HSV value without RGBLIGHT_LIMIT_VAL check | +|`setrgb(r, g, b, ledbuf)` |Set ledbuf to the given RGB value where `r`/`g`/`b` | + +### Low level Functions +|Function |Description | +|--------------------------------------------|-------------------------------------------| +|`rgblight_set()` |Flash out led buffers to LEDs | +|`rgblight_set_clipping_range(pos, num)` |Set clipping Range. see [Clipping Range](#clipping-range) | + +Example: +```c +sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); // led 0 +sethsv(HSV_RED, (LED_TYPE *)&led[1]); // led 1 +sethsv(HSV_GREEN, (LED_TYPE *)&led[2]); // led 2 +rgblight_set(); // Utility functions do not call rgblight_set() automatically, so they need to be called explicitly. +``` + +### Effects and Animations Functions +#### effect range setting +|Function |Description | +|--------------------------------------------|------------------| +|`rgblight_set_effect_range(pos, num)` |Set Effects Range | + +#### direct operation +|Function |Description | +|--------------------------------------------|-------------| +|`rgblight_setrgb_at(r, g, b, index)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) | +|`rgblight_sethsv_at(h, s, v, index)` |Set a single LED to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) | +|`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)| +|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)| +|`rgblight_setrgb(r, g, b)` |Set effect range LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | +|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | +|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) | +|`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | +|`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | + +Example: +```c +rgblight_sethsv(HSV_WHITE, 0); // led 0 +rgblight_sethsv(HSV_RED, 1); // led 1 +rgblight_sethsv(HSV_GREEN, 2); // led 2 +// The above functions automatically calls rgblight_set(), so there is no need to call it explicitly. +// Note that it is inefficient to call repeatedly. +``` + +#### effect mode change +|Function |Description | +|--------------------------------------------|-------------| +|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled | +|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) | +|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations | +|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) | +|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations | +|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) | + +#### effects mode disable/enable +|Function |Description | +|--------------------------------------------|-------------| +|`rgblight_toggle()` |Toggle effect range LEDs between on and off | +|`rgblight_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) | +|`rgblight_enable()` |Turn effect range LEDs on, based on their previous state | +|`rgblight_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) | +|`rgblight_disable()` |Turn effect range LEDs off | +|`rgblight_disable_noeeprom()` |Turn effect range LEDs off (not written to EEPROM) | + +#### hue, sat, val change +|Function |Description | +|--------------------------------------------|-------------| +|`rgblight_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue | +|`rgblight_increase_hue_noeeprom()` |Increase the hue for effect range LEDs. This wraps around at maximum hue (not written to EEPROM) | +|`rgblight_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue | +|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue (not written to EEPROM) | +|`rgblight_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation | +|`rgblight_increase_sat_noeeprom()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation (not written to EEPROM) | +|`rgblight_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation | +|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation (not written to EEPROM) | +|`rgblight_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value | +|`rgblight_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) | +|`rgblight_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value | +|`rgblight_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) | +|`rgblight_sethsv(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 | +|`rgblight_sethsv_noeeprom(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) | + +#### query +|Function |Description | +|-----------------------|-----------------| +|`rgblight_get_mode()` |Get current mode | +|`rgblight_get_hue()` |Get current hue | +|`rgblight_get_sat()` |Get current sat | +|`rgblight_get_val()` |Get current val | + +## Colors + +These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions. + +|RGB |HSV | +|-------------------|-------------------| +|`RGB_WHITE` |`HSV_WHITE` | +|`RGB_RED` |`HSV_RED` | +|`RGB_CORAL` |`HSV_CORAL` | +|`RGB_ORANGE` |`HSV_ORANGE` | +|`RGB_GOLDENROD` |`HSV_GOLDENROD` | +|`RGB_GOLD` |`HSV_GOLD` | +|`RGB_YELLOW` |`HSV_YELLOW` | +|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` | +|`RGB_GREEN` |`HSV_GREEN` | +|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` | +|`RGB_TURQUOISE` |`HSV_TURQUOISE` | +|`RGB_TEAL` |`HSV_TEAL` | +|`RGB_CYAN` |`HSV_CYAN` | +|`RGB_AZURE` |`HSV_AZURE` | +|`RGB_BLUE` |`HSV_BLUE` | +|`RGB_PURPLE` |`HSV_PURPLE` | +|`RGB_MAGENTA` |`HSV_MAGENTA` | +|`RGB_PINK` |`HSV_PINK` | + +```c +rgblight_setrgb(RGB_ORANGE); +rgblight_sethsv_noeeprom(HSV_GREEN); +rgblight_setrgb_at(RGB_GOLD, 3); +rgblight_sethsv_range(HSV_WHITE, 0, 6); +``` + +These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list! + + +## Changing the order of the LEDs + +If you want to make the logical order of LEDs different from the electrical connection order, you can do this by defining the `RGBLIGHT_LED_MAP` macro in your `config.h`. + +Normally, the contents of the LED buffer are output to the LEDs in the same order. +simple dicrect + +By defining `RGBLIGHT_LED_MAP` as in the example below, you can specify the LED with addressing in reverse order of the electrical connection order. + +```c +// config.h + +#define RGBLED_NUM 4 +#define RGBLIGHT_LED_MAP { 3, 2, 1, 0 } + +``` +simple mapped + +For keyboards that use the RGB LEDs as a backlight for each key, you can also define it as in the example below. + +```c +// config.h + +#define RGBLED_NUM 30 + +/* RGB LED Conversion macro from physical array to electric array */ +#define LED_LAYOUT( \ + L00, L01, L02, L03, L04, L05, \ + L10, L11, L12, L13, L14, L15, \ + L20, L21, L22, L23, L24, L25, \ + L30, L31, L32, L33, L34, L35, \ + L40, L41, L42, L43, L44, L45 ) \ + { \ + L05, L04, L03, L02, L01, L00, \ + L10, L11, L12, L13, L14, L15, \ + L25, L24, L23, L22, L21, L20, \ + L30, L31, L32, L33, L34, L35, \ + L46, L45, L44, L43, L42, L41 \ + } + +/* RGB LED logical order map */ +/* Top->Bottom, Right->Left */ +#define RGBLIGHT_LED_MAP LED_LAYOUT( \ + 25, 20, 15, 10, 5, 0, \ + 26, 21, 16, 11, 6, 1, \ + 27, 22, 17, 12, 7, 2, \ + 28, 23, 18, 13, 8, 3, \ + 29, 24, 19, 14, 9, 4 ) + +``` +## Clipping Range + +Using the `rgblight_set_clipping_range()` function, you can prepare more buffers than the actual number of LEDs, and output some of the buffers to the LEDs. This is useful if you want the split keyboard to treat left and right LEDs as logically contiguous. + +You can set the Clipping Range by executing the following code. + +```c +// some soruce + rgblight_set_clipping_range(3, 4); +``` +clip direct + +In addition to setting the Clipping Range, you can use `RGBLIGHT_LED_MAP` together. + +```c +// config.h +#define RGBLED_NUM 8 +#define RGBLIGHT_LED_MAP { 7, 6, 5, 4, 3, 2, 1, 0 } + +// some soruce + rgblight_set_clipping_range(3, 4); +``` +clip mapped ## Hardware Modification diff --git a/docs/feature_space_cadet.md b/docs/feature_space_cadet.md new file mode 100644 index 000000000000..075578522e6e --- /dev/null +++ b/docs/feature_space_cadet.md @@ -0,0 +1,59 @@ +# Space Cadet: The Future, Built In + +Steve Losh described the [Space Cadet Shift](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) quite well. Essentially, when you tap Left Shift on its own, you get an opening parenthesis; tap Right Shift on its own and you get the closing one. When held, the Shift keys function as normal. Yes, it's as cool as it sounds, and now even cooler supporting Control and Alt as well! + +## Usage + +Firstly, in your keymap, do one of the following: +- Replace the Left Shift key with `KC_LSPO` (Left Shift, Parenthesis Open), and Right Shift with `KC_RSPC` (Right Shift, Parenthesis Close). +- Replace the Left Control key with `KC_LCPO` (Left Control, Parenthesis Open), and Right Control with `KC_RCPC` (Right Control, Parenthesis Close). +- Replace the Left Alt key with `KC_LAPO` (Left Alt, Parenthesis Open), and Right Alt with `KC_RAPC` (Right Alt, Parenthesis Close). +- Replace any Shift key in your keymap with `KC_SFTENT` (Right Shift, Enter). + +## Keycodes + +|Keycode |Description | +|-----------|-------------------------------------------| +|`KC_LSPO` |Left Shift when held, `(` when tapped | +|`KC_RSPC` |Right Shift when held, `)` when tapped | +|`KC_LCPO` |Left Control when held, `(` when tapped | +|`KC_RCPC` |Right Control when held, `)` when tapped | +|`KC_LAPO` |Left Alt when held, `(` when tapped | +|`KC_RAPC` |Right Alt when held, `)` when tapped | +|`KC_SFTENT`|Right Shift when held, Enter when tapped | + +## Caveats + +Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. See the [Command feature](feature_command.md) for info on how to change it, or make sure that Command is disabled in your `rules.mk` with: + +```make +COMMAND_ENABLE = no +``` + +## Configuration + +By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`. In addition, you can redefine the modifier to send on tap, or even send no modifier at all. The new configuration defines bundle all options up into a single define of 3 key codes in this order: the `Modifier` when held or when used with other keys, the `Tap Modifer` sent when tapped (no modifier if `KC_TRNS`), finally the `Keycode` sent when tapped. Now keep in mind, mods from other keys will still apply to the `Keycode` if say `KC_RSFT` is held while tapping `KC_LSPO` key with `KC_TRNS` as the `Tap Modifer`. + +|Define |Default |Description | +|----------------|-------------------------------|---------------------------------------------------------------------------------| +|`LSPO_KEYS` |`KC_LSFT, LSPO_MOD, LSPO_KEY` |Send `KC_LSFT` when held, the mod and key defined by `LSPO_MOD` and `LSPO_KEY`. | +|`RSPC_KEYS` |`KC_RSFT, RSPC_MOD, RSPC_KEY` |Send `KC_RSFT` when held, the mod and key defined by `RSPC_MOD` and `RSPC_KEY`. | +|`LCPO_KEYS` |`KC_LCTL, KC_LSFT, KC_9` |Send `KC_LCTL` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. | +|`RCPC_KEYS` |`KC_RCTL, KC_RSFT, KC_0` |Send `KC_RCTL` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. | +|`LAPO_KEYS` |`KC_LALT, KC_LSFT, KC_9` |Send `KC_LALT` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. | +|`RAPC_KEYS` |`KC_RALT, KC_RSFT, KC_0` |Send `KC_RALT` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. | +|`SFTENT_KEYS` |`KC_RSFT, KC_TRNS, SFTENT_KEY` |Send `KC_RSFT` when held, no mod with the key `SFTENT_KEY` when tapped. | + + +## Obsolete Configuration + +These defines are used in the above defines internally to support backwards compatibility, so you may continue to use them, however the above defines open up a larger range of flexibility than before. As an example, say you want to not send any modifier when you tap just `KC_LSPO`, with the old defines you had an all or nothing choice of using the `DISABLE_SPACE_CADET_MODIFIER` define. Now you can define that key as: `#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_9`. This tells the system to set Left Shift if held or used with other keys, then on tap send no modifier (transparent) with the `KC_9`. + +|Define |Default |Description | +|------------------------------|-------------|------------------------------------------------------------------| +|`LSPO_KEY` |`KC_9` |The keycode to send when Left Shift is tapped | +|`RSPC_KEY` |`KC_0` |The keycode to send when Right Shift is tapped | +|`LSPO_MOD` |`KC_LSFT` |The modifier to apply to `LSPO_KEY` | +|`RSPC_MOD` |`KC_RSFT` |The modifier to apply to `RSPC_KEY` | +|`SFTENT_KEY` |`KC_ENT` |The keycode to send when the Shift key is tapped | +|`DISABLE_SPACE_CADET_MODIFIER`|*Not defined*|If defined, prevent the Space Cadet from applying a modifier | diff --git a/docs/feature_space_cadet_shift.md b/docs/feature_space_cadet_shift.md deleted file mode 100644 index 427d2a58127c..000000000000 --- a/docs/feature_space_cadet_shift.md +++ /dev/null @@ -1,37 +0,0 @@ -# Space Cadet Shift: The Future, Built In - -Steve Losh described the [Space Cadet Shift](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) quite well. Essentially, when you tap Left Shift on its own, you get an opening parenthesis; tap Right Shift on its own and you get the closing one. When held, the Shift keys function as normal. Yes, it's as cool as it sounds. - -## Usage - -Replace the Left Shift key in your keymap with `KC_LSPO` (Left Shift, Parenthesis Open), and Right Shift with `KC_RSPC` (Right Shift, Parenthesis Close). - -## Keycodes - -|Keycode |Description | -|---------|--------------------------------------| -|`KC_LSPO`|Left Shift when held, `(` when tapped | -|`KC_RSPC`|Right Shift when held, `)` when tapped| - -## Caveats - -Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. Make sure that Command is disabled in your `rules.mk` with: - -```make -COMMAND_ENABLE = no -``` - -## Configuration - -By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`. -You can also disable the rollover, allowing you to use the opposite Shift key to cancel the Space Cadet state in the event of an erroneous press, instead of emitting a pair of parentheses when the keys are released. -Also, by default, the Space Cadet applies modifiers LSPO_MOD and RSPC_MOD to keys defined by LSPO_KEY and RSPC_KEY. You can override this behavior by redefining those variables in your `config.h`. You can also prevent the Space Cadet to apply a modifier by defining DISABLE_SPACE_CADET_MODIFIER in your `config.h`. - -|Define |Default |Description | -|------------------------------|-------------|--------------------------------------------------------------------------------| -|`LSPO_KEY` |`KC_9` |The keycode to send when Left Shift is tapped | -|`RSPC_KEY` |`KC_0` |The keycode to send when Right Shift is tapped | -|`LSPO_MOD` |`KC_LSFT` |The keycode to send when Left Shift is tapped | -|`RSPC_MOD` |`KC_RSFT` |The keycode to send when Right Shift is tapped | -|`DISABLE_SPACE_CADET_ROLLOVER`|*Not defined*|If defined, use the opposite Shift key to cancel Space Cadet | -|`DISABLE_SPACE_CADET_MODIFIER`|*Not defined*|If defined, prevent the Space Cadet to apply a modifier to LSPO_KEY and RSPC_KEY| diff --git a/docs/feature_space_cadet_shift_enter.md b/docs/feature_space_cadet_shift_enter.md deleted file mode 100644 index 56a569b13924..000000000000 --- a/docs/feature_space_cadet_shift_enter.md +++ /dev/null @@ -1,31 +0,0 @@ -# Space Cadet Shift Enter - -Based on the [Space Cadet Shift](feature_space_cadet_shift.md) feature. Tap the Shift key on its own, and it behaves like Enter. When held, the Shift functions as normal. - -## Usage - -Replace any Shift key in your keymap with `KC_SFTENT` (Shift, Enter), and you're done. - -## Keycodes - -|Keycode |Description | -|-----------|----------------------------------------| -|`KC_SFTENT`|Right Shift when held, Enter when tapped| - -## Caveats - -As with Space Cadet Shift, this feature may conflict with Command, so it should be disabled in your `rules.mk` with: - -```make -COMMAND_ENABLE = no -``` - -This feature also uses the same timers as Space Cadet Shift, so using them in tandem may produce strange results. - -## Configuration - -By default Space Cadet assumes a US ANSI layout, but if you'd like to use a different key for Enter, you can redefine it in your `config.h`: - -|Define |Default |Description | -|------------|--------|------------------------------------------------| -|`SFTENT_KEY`|`KC_ENT`|The keycode to send when the Shift key is tapped| diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index f2f2749440a2..b5e5218b093d 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -314,3 +314,86 @@ qk_tap_dance_action_t tap_dance_actions[] = { And then simply use `TD(X_CTL)` anywhere in your keymap. If you want to implement this in your userspace, then you may want to check out how [DanielGGordon](https://github.com/qmk/qmk_firmware/tree/master/users/gordon) has implemented this in their userspace. + +### Example 5: Using tap dance for advanced mod-tap and layer-tap keys + +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: + +```c +// tapdance keycodes +enum td_keycodes { + 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 +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_SINGLE_TAP +} td_state_t; + +// create a global instance of the tapdance state type +static td_state_t td_state; + +// declare your tapdance functions: + +// function to determine the current tapdance state +int cur_dance (qk_tap_dance_state_t *state); + +// `finished` and `reset` functions for each tapdance keycode +void altlp_finished (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: + +```c +// determine the tapdance state to return +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { return SINGLE_TAP; } + 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) { + td_state = cur_dance(state); + 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) { + 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[] = { + [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)`. diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md index 7dd85c5c2e78..778cdc69cb0c 100644 --- a/docs/feature_unicode.md +++ b/docs/feature_unicode.md @@ -4,11 +4,11 @@ There are three Unicode keymap definition methods available in QMK: ## `UNICODE_ENABLE` -Supports Unicode up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. The keycode function is `UC(c)` in the keymap file, where _c_ is the code point's number (preferably hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`. +Supports Unicode up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. The keycode function is `UC(c)` in the keymap, where _c_ is the code point's number (preferably hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`. ## `UNICODEMAP_ENABLE` -Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(i)`, where _i_ is an array index into the mapping table. The table may contain at most 1024 entries. +Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(i)`, where _i_ is an array index into the mapping table. The table may contain at most 16384 entries. You may want to have an enum to make referencing easier. So, you could add something like this to your keymap file: @@ -26,13 +26,21 @@ const uint32_t PROGMEM unicode_map[] = { }; ``` -Then you can use `X(BANG)` etc. in your keymap. +Then you can use `X(BANG)`, `X(SNEK)` etc. in your keymap. + +### Lower and Upper Case + +Characters often come in lower and upper case pairs, for example: å, Å. To make inputting these characters easier, you can use `XP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear. + +This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `XP`. This blends Unicode keys in with regular alphas. + +Due to keycode size constraints, _i_ and _j_ can each only refer to one of the first 128 characters in your `unicode_map`. In other words, 0 ≤ _i_ ≤ 127 and 0 ≤ _j_ ≤ 127. This is enough for most use cases, but if you'd like to customize the index calculation, you can override the [`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L40) function. This also allows you to, say, check Ctrl instead of Shift/Caps. ## `UCIS_ENABLE` -Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you will have to add a keycode or function that calls `qk_ucis_start()`. Once this function's been called, you can type the corresponding mnemonic for your character, then hit Space or Enter to complete it, or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode character inserted. +Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you have to add a keycode or function that calls `qk_ucis_start()`. Once this function has been called, you can type the corresponding mnemonic for your character, then hit Space or Enter to complete it, or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode character inserted. -For instance, you would define a table like this in your keymap file: +For instance, you could define a table like this in your keymap file: ```c const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE( @@ -42,7 +50,7 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE( ); ``` -You call `qk_ucis_start()`, then type "rofl" and hit Enter. QMK should erase the "rofl" text and input the laughing emoji. +To use it, call `qk_ucis_start()`, then type "rofl" and hit Enter. QMK should erase the "rofl" text and insert the laughing emoji. ### Customization @@ -60,26 +68,29 @@ Unicode input in QMK works by inputting a sequence of characters to the OS, sort The following input modes are available: -* **`UC_OSX`**: Mac OS X built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with `UNICODEMAP`). +* **`UC_OSX`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with `UNICODEMAP`). 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`), but this can be changed by defining [`UNICODE_OSX_KEY`](#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_OSX`](#input-key-configuration) with another keycode. + + !> Using the _Unicode Hex Input_ input source may disable some Option based shortcuts, such as Option + Left Arrow and Option + Right Arrow. * **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points). Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else. + By default, this mode uses Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) to start Unicode input, but this can be changed by defining [`UNICODE_KEY_LNX`](#input-key-configuration) with another keycode. This might be required for IBus versions ≥1.5.15, where Ctrl+Shift+U behavior is consolidated into Ctrl+Shift+E. * **`UC_WIN`**: _(not recommended)_ Windows built-in hex numpad Unicode input. Supports code points up to `0xFFFF`. - To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Afterwards, reboot. + To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Reboot afterwards. This mode is not recommended because of reliability and compatibility issues; use the `UC_WINC` mode instead. * **`UC_BSD`**: _(non implemented)_ Unicode input under BSD. Not implemented at this time. If you're a BSD user and want to help add support for it, please [open an issue on GitHub](https://github.com/qmk/qmk_firmware/issues). -* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.8.2, supports code points up to `0xFFFFF` (all currently assigned code points). +* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.9.0, supports code points up to `0x10FFFF` (all possible code points). To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. Works reliably under all version of Windows supported by the app. - By default, this mode uses the right Alt key (`KC_RALT`), but this can be changed in the WinCompose settings and by defining [`UNICODE_WINC_KEY`](#input-key-configuration) with another keycode. + By default, this mode uses right Alt (`KC_RALT`) as the Compose key, but this can be changed in the WinCompose settings and by defining [`UNICODE_KEY_WINC`](#input-key-configuration) with another keycode. ### Switching Input Modes @@ -87,17 +98,17 @@ There are two ways to set the input mode for Unicode: by keycode or by function. You can switch the input mode at any time by using one of the following keycodes. The easiest way is to add the ones you use to your keymap. -|Keycode |Alias |Input mode |Description | -|-----------------------|---------|-------------|-----------------------------------------| -|`UNICODE_MODE_FORWARD` |`UC_MOD` | |Cycles forwards through the available modes. [(Disabled by default)](#input-method-cycling)| -|`UNICODE_MODE_REVERSE` |`UC_RMOD`| |Cycles forwards through the available modes. [(Disabled by default)](#input-method-cycling)| -|`UNICODE_MODE_OSX` |`UC_M_OS`|`UC_OSX` |Switch to Mac OS X input. | -|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input. | -|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input. | -|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented). | -|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose.| +|Keycode |Alias |Input Mode |Description | +|----------------------|---------|------------|--------------------------------------------------------------| +|`UNICODE_MODE_FORWARD`|`UC_MOD` |Next in list|[Cycle](#input-mode-cycling) through selected modes | +|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Prev in list|[Cycle](#input-mode-cycling) through selected modes in reverse| +|`UNICODE_MODE_OSX` |`UC_M_OS`|`UC_OSX` |Switch to macOS input | +|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input | +|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input | +|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented) | +|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose | -You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`). Since the function only needs to be called once, it's recommended that you do it in `eeconfig_init_user` (or a similar function). For example: +You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`). Since the function only needs to be called once, it's recommended that you do it in `eeconfig_init_user()` (or a similar function). For example: ```c void eeconfig_init_user(void) { @@ -121,35 +132,45 @@ For instance, you can add these definitions to your `config.h` file: ### Additional Customization -Because Unicode is such a large and variable feature, there are a number of options that you can customize to work better on your system. +Because Unicode is a large and versatile feature, there are a number of options you can customize to make it work better on your system. -#### Start and Finish input functions +#### Start and Finish Input Functions The functions for starting and finishing Unicode input on your platform can be overridden locally. Possible uses include customizing input mode behavior if you don't use the default keys, or adding extra visual/audio feedback to Unicode input. -* `void unicode_input_start(void)` – This sends the initial sequence that tells your platform to enter Unicode input mode. For example, it presses Ctrl+Shift+U on Linux and holds the Option key on Mac. +* `void unicode_input_start(void)` – This sends the initial sequence that tells your platform to enter Unicode input mode. For example, it presses Ctrl+Shift+U on Linux and holds the Option key on macOS. * `void unicode_input_finish(void)` – This is called to exit Unicode input mode, for example by pressing Space or releasing the Option key. You can find the default implementations of these functions in [`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c). - #### Input Key Configuration -Additionally, you can customize the keys used to trigger the unicode input for macOS and WinCompose by adding defines to your `config.h` +You can customize the keys used to trigger Unicode input for macOS, Linux and WinCompose by adding corresponding defines to your `config.h`. The default values match the platforms' default settings, so you shouldn't need to change this unless Unicode input isn't working, or you want to use a different key (e.g. in order to free up left or right Alt). + +|Define |Type |Default |Example | +|------------------|----------|------------------|-------------------------------------------| +|`UNICODE_KEY_OSX` |`uint8_t` |`KC_LALT` |`#define UNICODE_KEY_OSX KC_RALT` | +|`UNICODE_KEY_LNX` |`uint16_t`|`LCTL(LSFT(KC_U))`|`#define UNICODE_KEY_LNX LCTL(LSFT(KC_E))`| +|`UNICODE_KEY_WINC`|`uint8_t` |`KC_RALT` |`#define UNICODE_KEY_WINC KC_RGUI` | + +#### Input Mode Cycling + +You can choose which input modes are available for cycling through. By default, this is disabled. If you want to enable it, limiting it to just the modes you use makes sense. Note that the values in the list are comma-delimited. ```c -#define UNICODE_OSX_KEY KC_LALT -#define UNICODE_WINC_KEY KC_RALT +#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WIN, UC_WINC ``` -#### Input Method Cycling +You can cycle through the selected modes by using the `UC_MOD`/`UC_RMOD` keycodes, or by calling `cycle_unicode_input_mode(offset)` in your code (`offset` is how many modes to move forward by, so +1 corresponds to `UC_MOD`). -Also, you can choose which input methods are availble for cycling through. By default, this is disabled. But if you want to enabled it, then limiting it to just those modes makes sense. Note that `UNICODE_SELECTED_MODES` define is comma delimited. +By default, when the keyboard boots, it will initialize the input mode to the last one you used. You can disable this and make it start with the first mode in the list every time by adding the following to your `config.h`: ```c -#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WIN, UC_BSD, UC_WINC +#define UNICODE_CYCLE_PERSIST false ``` +!> Using `UNICODE_SELECTED_MODES` means you don't have to initially set the input mode in `matrix_init_user()` (or a similar function); the Unicode system will do that for you on startup. This has the added benefit of avoiding unnecessary writes to EEPROM. + ## `send_unicode_hex_string` To type multiple characters for things like (ノಠ痊ಠ)ノ彡┻━┻, you can use `send_unicode_hex_string()` much like `SEND_STRING()` except you would use hex values separate by spaces. @@ -183,7 +204,7 @@ AutoHotkey inserts the Text right of `Send, ` when this combination is pressed. ### US International -If you enable the US International layout on the system, it will use punctuation to accent the characters. +If you enable the US International layout on the system, it will use punctuation to accent the characters. For instance, typing "`a" will result in à. diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 5a9fc287b3e1..2f119c8bde5d 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -110,7 +110,7 @@ QMK has a bunch of [functions](custom_quantum_functions.md) that have [`_quantum However, you can actually add support for keymap version, so that you can use it in both your userspace and your keymap! -For instance, lets looks at the `layer_state_set_user` function. Lets enable the [Tri Layer State](ref_functions.md#olkb-tri-layers) functionalitly to all of our boards, and then still have your `keymap.c` still able to use this functionality. +For instance, let's look at the `layer_state_set_user()` function. You can enable the [Tri Layer State](ref_functions.md#olkb-tri-layers) functionality on all of your boards, while also retaining the Tri Layer functionality in your `keymap.c` files. In your `` file, you'd want to add this: ```c @@ -201,27 +201,51 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case KC_MAKE: - if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP -#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - ":dfu " -#elif defined(BOOTLOADER_HALFKAY) - ":teensy " -#elif defined(BOOTLOADER_CATERINA) - ":avrdude " -#endif - SS_TAP(X_ENTER)); - } - return false; - break; + case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader + if (!record->event.pressed) { + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + clear_mods(); clear_oneshot_mods(); + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP); + #ifndef FLASH_BOOTLOADER + if ( (temp_mod | temp_osm) & MOD_MASK_SHIFT ) + #endif + { // + #if defined(__arm__) // only run for ARM boards + SEND_STRING(":dfu-util"); + #elif defined(BOOTLOADER_DFU) // only run for DFU boards + SEND_STRING(":dfu"); + #elif defined(BOOTLOADER_HALFKAY) // only run for teensy boards + SEND_STRING(":teensy"); + #elif defined(BOOTLOADER_CATERINA) // only run for Pro Micros + SEND_STRING(":avrdude"); + #endif // bootloader options + } + if ( (temp_mod | temp_osm) & MOD_MASK_CTRL) { + SEND_STRING(" -j8 --output-sync"); + } + SEND_STRING(SS_TAP(X_ENTER)); + set_mods(temp_mod); + } + break; + } return process_record_keymap(keycode, record); } ``` +For boards that may not have a shift button (such as on a macro pad), we need a way to always include the bootloader option. To do that, add the following to the `rules.mk` in your userspace folder: + +```make +ifeq ($(strip $(FLASH_BOOTLOADER)), yes) + OPT_DEFS += -DFLASH_BOOTLOADER +endif +``` + This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make :`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time. -Additionally, this should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely (and will dump the HEX in the ".build" folder instead). +Also, holding `shift` will add the appropriate flashing command (`:dfu`, `:teensy`, `:avrdude`, `:dfu-util`) for a majority of keyboards. Holding `control` will add some commands that will speed up compiling time by processing multiple files at once. +And for the boards that lack a shift key, or that you want to always attempt the flashing part, you can add `FLASH_BOOTLOADER = yes` to the `rules.mk` of that keymap. +?> This should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely. And this doesn't support BootloadHID or mdloader. diff --git a/docs/feature_velocikey.md b/docs/feature_velocikey.md new file mode 100644 index 000000000000..5d98410735bc --- /dev/null +++ b/docs/feature_velocikey.md @@ -0,0 +1,30 @@ +# Velocikey + +Velocikey is a feature that lets you control the speed of lighting effects (like the Rainbow Swirl effect) with the speed of your typing. The faster you type, the faster the lights will go! + +## Usage +For Velocikey to take effect, there are two steps. First, when compiling your keyboard, you'll need to set `VELOCIKEY_ENABLE=yes` in `rules.mk`, e.g.: + +``` +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +STENO_ENABLE = no +EXTRAKEY_ENABLE = yes +VELOCIKEY_ENABLE = yes +``` + +Then, while using your keyboard, you need to also turn it on with the VLK_TOG keycode, which toggles the feature on and off. + +The following light effects will all be controlled by Velocikey when it is enabled: + - RGB Breathing + - RGB Rainbow Mood + - RGB Rainbow Swirl + - RGB Snake + - RGB Knight + +Support for LED breathing effects is planned but not available yet. + + As long as Velocikey is enabled, it will control the speed regardless of any other speed setting that your RGB lights are currently on. + + ## Configuration + Velocikey doesn't currently support any configuration via keyboard settings. If you want to adjust something like the speed increase or decay rate, you would need to edit `velocikey.c` and adjust the values there to achieve the kinds of speeds that you like. diff --git a/docs/features.md b/docs/features.md index 9030500a2bb1..cb69df35d709 100644 --- a/docs/features.md +++ b/docs/features.md @@ -17,6 +17,7 @@ QMK has a staggering number of features for building your keyboard. It can take * [Key Lock](feature_key_lock.md) - Lock a key in the "down" state. * [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout. * [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior. +* [LED Matrix](feature_led_matrix.md) - LED Matrix single color lights for per key lighting (Single Color, not RGB). * [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key. * [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard. * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets hit a key rather than holding it. @@ -24,7 +25,7 @@ QMK has a staggering number of features for building your keyboard. It can take * [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard. * [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard. * [RGB Matrix](feature_rgb_matrix.md) - RGB Matrix lights for per key lighting. -* [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets. +* [Space Cadet](feature_space_cadet.md) - Use your left/right shift keys to type parenthesis and brackets. * [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use. * [Swap Hands](feature_swap_hands.md) - Mirror your keyboard for one handed usage. * [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want. diff --git a/docs/flashing.md b/docs/flashing.md index bc418c415060..3b4582f0057e 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -49,9 +49,18 @@ To generate this bootloader, use the `bootloader` target, eg `make planck/rev4:d To generate a production-ready .hex file (containing the application and the bootloader), use the `production` target, eg `make planck/rev4:default:production`. +### DFU commands + +There are a number of DFU commands that you can use to flash firmware to a DFU device: + +* `:dfu` - This is the normal option and waits until a DFU device is available, and then flashes the firmware. This will check every 5 seconds, to see if a DFU device has appeared. +* `:dfu-ee` - This flashes an `eep` file instead of the normal hex. This is uncommon. +* `:dfu-split-left` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._ +* `:dfu-split-right` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._ + ## Caterina -Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina. +Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina. To ensure compatibility with the Caterina bootloader, make sure this block is present your `rules.mk`: @@ -84,6 +93,7 @@ or if you want to flash multiple boards, use the following command When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop. + ## Halfkay Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0). @@ -131,3 +141,12 @@ Flashing sequence: * You will receive a warning about the DFU signature; Just ignore it 4. Reset the device into application mode (may be done automatically) * If you are building from command line (e.g. `make planck/rev6:default:dfu-util`), make sure that `:leave` is passed to the `DFU_ARGS` variable inside your `rules.mk` (e.g. `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) so that your device resets after flashing + +### STM32 Commands + +There are a number of DFU commands that you can use to flash firmware to a STM32 device: + +* `:dfu-util` - The default command for flashing to STM32 devices. +* `:dfu-util-wait` - This works like the default command, but it gives you a (configurable) 10 second timeout before it attempts to flash the firmware. You can use `TIME_DELAY=20` from the command line to change the timeout. + * Eg: `make ::dfu-util TIME_DELAY=5` +* `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util. diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index dbed200d1bdf..0e1acca66a8d 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -4,7 +4,9 @@ This page describes setting up the build environment for QMK. These instructions -Note: If it is your first time here, Check out the "Complete Newbs guide" instead +**Note:** If this is your first time here, check out the [Complete Newbs Guide](newbs.md) page. + +Before continuing, double check that your submodules (third-party libraries) are up to date by running `make git-submodule`. ## Linux @@ -44,9 +46,7 @@ Fedora / Red Hat example: Arch / Manjaro example: - pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git - -(the `dfu-programmer` package is availble on AUR only so you should download from there or use an AUR helper) + pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util ## Nix @@ -129,12 +129,12 @@ If you have trouble and want to ask for help, it is useful to generate a *Win_Ch ## Docker -If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker CE](https://docs.docker.com/install/#supported-platforms), run the following command from the `qmk_firmware` directory to build a keyboard/keymap: +If this is a bit complex for you, Docker might be the turnkey solution you need. After installing [Docker CE](https://docs.docker.com/install/#supported-platforms), run the following command from the `qmk_firmware` directory to build a keyboard/keymap: ```bash -util/docker_build.sh keyboard:keymap +util/docker_build.sh keyboard:keymap # For example: util/docker_build.sh ergodox_ez:steno ``` -This will compile the targeted keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, the `default` keymap is used. Note that the parameter format is the same as when building with `make`. +This will compile the desired keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, the `default` keymap is used. Note that the parameter format is the same as when building with `make`. You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use: ```bash @@ -147,7 +147,7 @@ There is also support for building _and_ flashing the keyboard straight from Doc util/docker_build.sh keyboard:keymap:target # For example: util/docker_build.sh planck/rev6:default:dfu-util ``` -If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use QMK Toolbox instead. +If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use [QMK Toolbox](https://github.com/qmk/qmk_toolbox) instead. !> Docker for Windows requires [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) to be enabled. This means that it cannot work on versions of Windows which don't have Hyper-V, such as Windows 7, Windows 8 and **Windows 10 Home**. diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index bb7e1e7e3b6f..75eafd42ccca 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -143,9 +143,9 @@ As there is no standard split communication driver for ARM-based split keyboards Lets you replace the default matrix scanning routine with your own code. You will need to provide your own implementations of matrix_init() and matrix_scan(). -`CUSTOM_DEBOUNCE` +`DEBOUNCE_TYPE` -Lets you replace the default key debouncing routine with your own code. You will need to provide your own implementation of debounce(). +Lets you replace the default key debouncing routine with an alternative one. If `custom` you will need to provide your own implementation. ## Customizing Makefile Options on a Per-Keymap Basis diff --git a/docs/hand_wire.md b/docs/hand_wire.md index 1cbc16dfea82..25db9341b886 100644 --- a/docs/hand_wire.md +++ b/docs/hand_wire.md @@ -185,21 +185,30 @@ When you're done with the columns, start with the rows in the same process, from As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain! +## Additional guides + +If you're more of a visual learner, or want some additional tips and something more to follow along, these two visual step by step guides may be helpful: + +- [BrownFox's step by step guide](https://deskthority.net/viewtopic.php?f=7&t=6050) +- [Cribbit's modern hand wiring guide](https://geekhack.org/index.php?topic=87689.0) + # Getting Some Basic Firmware Set Up From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch. -To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/). +To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free). -The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder: +The first thing we're going to do is create a new keyboard. In your terminal, run this command, which will ask you some questions and generate a basic keyboard project: ``` - util/new_project.sh +./util/new_keyboard.sh ``` You'll want to navigate to the `keyboards//` folder by typing, like the print-out from the script specifies: - cd keyboards/ +``` +cd keyboards/ +``` ### `config.h` @@ -209,7 +218,7 @@ Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitio ### `.h` -The next file you'll want to look at is `.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix. +The next file you'll want to look at is `.h`. You're going to want to rewrite the `LAYOUT` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix. We'll dive into how this will work with the following example. Say we have a keyboard like this: @@ -231,10 +240,10 @@ This can be described by saying the top row is 3 1u keys, and the bottom row is └─────┴─────┘ ``` -The middle column is unused on the bottom row in this example. Our `KEYMAP` definition would look like this: +The middle column is unused on the bottom row in this example. Our `LAYOUT` definition would look like this: ``` - #define KEYMAP( \ + #define LAYOUT( \ k00, k01, k02, \ k10, k11, \ ) \ @@ -256,10 +265,10 @@ Let's say that instead, we wired our keyboard like this (a fair thing to do): └─────┴─────┘ ``` -This would require our `KEYMAP` definition to look like this: +This would require our `LAYOUT` definition to look like this: ``` - #define KEYMAP( \ + #define LAYOUT( \ k00, k01, k02, \ k10, k11, \ ) \ @@ -269,7 +278,7 @@ This would require our `KEYMAP` definition to look like this: } ``` -Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it. +Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `LAYOUT` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it. ### `keymaps//default.c` @@ -291,7 +300,7 @@ This can be accomplished by using the following `keymaps` definition: ``` const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( /* Base */ + [0] = LAYOUT( /* Base */ KC_A, KC_1, KC_H, \ KC_TAB, KC_SPC \ ), @@ -300,7 +309,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [Keycodes](keycodes.md) - there are also a lot of aliases to condense your keymap file. -It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring. +It's also important to use the `LAYOUT` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring. ## Compiling Your Firmware @@ -319,7 +328,7 @@ Carefully flip your keyboard over, open up a new text document, and try typing - 2. Check the solder joints on the diode - if the diode is loose, part of your row may register, while the other may not. 3. Check the solder joints on the columns - if your column wiring is loose, part or all of the column may not work. 4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides. -5. Check the .h file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable. +5. Check the `.h` file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable. 6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly. If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end. @@ -328,4 +337,4 @@ If you've done all of these things, keep in mind that sometimes you might have h Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out. -There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different project (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) +There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different keyboards (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb) diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md index 2c3652a02dbf..7c28ab6dbcc5 100644 --- a/docs/hardware_avr.md +++ b/docs/hardware_avr.md @@ -6,14 +6,26 @@ If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_ ## Adding Your AVR Keyboard to QMK -QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started run the `util/new_project.sh` script: - -```bash -$ util/new_project.sh my_awesome_keyboard -###################################################### -# /keyboards/my_awesome_keyboard project created. To start -# working on things, cd into keyboards/my_awesome_keyboard -###################################################### +QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started, run the `util/new_keyboard.sh` script: + +``` +$ ./util/new_keyboard.sh +Generating a new QMK keyboard directory + +Keyboard Name: mycoolkb +Keyboard Type [avr]: +Your Name [John Smith]: + +Copying base template files... done +Copying avr template files... done +Renaming keyboard files... done +Replacing %KEYBOARD% with mycoolkb... done +Replacing %YOUR_NAME% with John Smith... done + +Created a new keyboard called mycoolkb. + +To start working on things, cd into keyboards/mycoolkb, +or open the directory in your favourite text editor. ``` This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard. @@ -87,12 +99,30 @@ Once you've defined the size of your matrix you need to define which pins on you The number of `MATRIX_ROW_PINS` entries must be the same as the number you assigned to `MATRIX_ROWS`, and likewise for `MATRIX_COL_PINS` and `MATRIX_COLS`. You do not have to specify `UNUSED_PINS`, but you can if you want to document what pins are open. -Finally, you can specify the direction your diodes point. This can be `COL2ROW`, `ROW2COL`, or `CUSTOM_MATRIX`. +Finally, you can specify the direction your diodes point. This can be `COL2ROW` or `ROW2COL`. ```c #define DIODE_DIRECTION COL2ROW ``` +#### Direct Pin Matrix +To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. + +```c +// #define MATRIX_ROW_PINS { D0, D5 } +// #define MATRIX_COL_PINS { F1, F0, B0 } +#define DIRECT_PINS { \ + { F1, E6, B0, B2, B3 }, \ + { F5, F0, B1, B7, D2 }, \ + { F6, F7, C7, D5, D3 }, \ + { B5, C6, B6, NO_PIN, NO_PIN } \ +} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +//#define DIODE_DIRECTION +``` + ### Backlight Configuration By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md). diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md index 4c1266f2241e..023e92982cbd 100644 --- a/docs/hardware_drivers.md +++ b/docs/hardware_drivers.md @@ -14,9 +14,9 @@ QMK is used on a lot of different hardware. While support for the most common MC Support for addressing pins on the ProMicro by their Arduino name rather than their AVR name. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process. -## SSD1306 (AVR Only) +## SSD1306 OLED Driver -Support for SSD1306 based OLED displays. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process. +Support for SSD1306 based OLED displays. For more information see the [OLED Driver Feature](feature_oled_driver.md) page. ## uGFX @@ -32,4 +32,4 @@ Support for up to 2 drivers. Each driver impliments 2 charlieplex matrices to in ## IS31FL3733 -Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page. \ No newline at end of file +Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page. diff --git a/docs/how_keyboards_work.md b/docs/how_keyboards_work.md index cc54e566a1f1..0772f055d685 100644 --- a/docs/how_keyboards_work.md +++ b/docs/how_keyboards_work.md @@ -12,7 +12,7 @@ place: ``` text +------+ +-----+ +----------+ +----------+ +----+ | User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS | -+------+ +-----+ +----------+ +----------+ |----+ ++------+ +-----+ +----------+ +----------+ +----+ ``` This scheme is a very simple view of what's going on, and more details follow diff --git a/docs/i2c_driver.md b/docs/i2c_driver.md index ea24dc64f392..bb1a2d74ffd2 100644 --- a/docs/i2c_driver.md +++ b/docs/i2c_driver.md @@ -12,7 +12,7 @@ The I2C Master drivers used in QMK have a set of common functions to allow porta |`uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. | |`uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. | |`uint8_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_receive` function but `regaddr` sets from where in the slave the data will be read. | -|`uint8_t i2c_stop(uint16_t timeout);` |Stops the I2C driver. | +|`uint8_t i2c_stop(void);` |Ends an I2C transaction. | ### Function Return @@ -33,8 +33,8 @@ The following defines can be used to configure the I2C master driver. |Variable |Description |Default| |------------------|---------------------------------------------------|-------| -|`#F_SCL` |Clock frequency in Hz |400KHz | -|`#Prescaler` |Divides master clock to aid in I2C clock selection |1 | +|`F_SCL` |Clock frequency in Hz |400KHz | +|`Prescaler` |Divides master clock to aid in I2C clock selection |1 | AVRs usually have set GPIO which turn into I2C pins, therefore no further configuration is required. @@ -63,20 +63,24 @@ Lastly, we need to assign the correct GPIO pins depending on the I2C hardware dr By default the I2C1 hardware driver is assumed to be used. If another hardware driver is used, `#define I2C_DRIVER I2CDX` should be added to the `config.h` file with X being the number of hardware driver used. For example is I2C3 is enabled, the `config.h` file should contain `#define I2C_DRIVER I2CD3`. This aligns the QMK I2C driver with the Chibios I2C driver. -STM32 MCUs allows a variety of pins to be configured as I2C pins depending on the hardware driver used. By default B6 and B7 are set to I2C. +STM32 MCUs allows a variety of pins to be configured as I2C pins depending on the hardware driver used. By default B6 and B7 are set to I2C. You can use these defines to set your i2c pins: -This can be changed by declaring the `i2c_init` function which intentionally has a weak attribute. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function: +| Variable | Description | Default | +|-------------|----------------------------------------------|---------| +| `I2C1_BANK` | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` | +| `I2C1_SCL` | The pin number for the SCL pin (0-9) | `6` | +| `I2C1_SDA` | The pin number for the SDA pin (0-9) | `7` | + +You can also overload the `void i2c_init(void)` function, which has a weak attribute. If you do this the configuration variables above will not be used. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function: ```C void i2c_init(void) { setPinInput(B6); // Try releasing special pins for a short time setPinInput(B7); - chThdSleepMilliseconds(10); // Wait for the release to happen + wait_ms(10); // Wait for the release to happen palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); // Set B6 to I2C function palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); // Set B7 to I2C function } ``` - - diff --git a/docs/isp_flashing_guide.md b/docs/isp_flashing_guide.md index 18f2147846b9..0f786c5141bf 100644 --- a/docs/isp_flashing_guide.md +++ b/docs/isp_flashing_guide.md @@ -63,6 +63,7 @@ If you just want to get things back to normal, you can flash only a bootloader f * [`atmega32u4`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1_0_0.hex) - Most keyboards, Planck Rev 1-5, Preonic Rev 1-2 * [`at90usb1286`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb128x_1_0_1.hex) - Planck Light Rev 1 +* [`atmega32a`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32a_1_0_0.hex) - jj40 If you're not sure what your board uses, look in the `rules.mk` file for the keyboard in QMK. The `MCU =` line will have the value you need. It may differ between different versions of the board. @@ -113,6 +114,10 @@ Since our keyboard uses an `atmega32u4` (common), that is the chip we'll specify avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i +If your board uses an `atmega32a` (e.g. on a jj40), the command is this (the extra code at the end sets the fuses correctly): + + avrdude -c avrisp -P COM3 -p atmega32 -U flash:w:main.hex:i -U hfuse:w:0xD0:m -U lfuse:w:0x0F:m + You should see a couple of progress bars, then you should see: avrdude: verifying ... diff --git a/docs/keycodes.md b/docs/keycodes.md index 91578414d199..e9cfd3425201 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -216,6 +216,11 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_GESC` |`GRAVE_ESC`|Escape when tapped, ` when pressed with Shift or GUI| |`KC_LSPO` | |Left Shift when held, `(` when tapped | |`KC_RSPC` | |Right Shift when held, `)` when tapped | +|`KC_LCPO` | |Left Control when held, `(` when tapped | +|`KC_RCPC` | |Right Control when held, `)` when tapped | +|`KC_LAPO` | |Left Alt when held, `(` when tapped | +|`KC_RAPC` | |Right Alt when held, `)` when tapped | +|`KC_SFTENT` | |Right Shift when held, Enter when tapped | |`KC_LEAD` | |The [Leader key](feature_leader_key.md) | |`KC_LOCK` | |The [Lock key](feature_key_lock.md) | |`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) | @@ -450,7 +455,15 @@ This is a reference only. Each group of keys links to the page documenting their ## [Unicode Support](feature_unicode.md) -|Key |Description | -|-------|---------------------------------------------------------------------------| -|`UC(c)`|Send Unicode code point `c` (`UNICODE_ENABLE`) | -|`X(i)` |Send Unicode code point at index `i` in `unicode_map` (`UNICODEMAP_ENABLE`)| +|Key |Aliases |Description | +|----------------------|---------|----------------------------------------------------------------| +|`UC(c)` | |Send Unicode code point `c` | +|`X(i)` | |Send Unicode code point at index `i` in `unicode_map` | +|`XP(i, j)` | |Send Unicode code point at index `i`, or `j` if Shift/Caps is on| +|`UNICODE_MODE_FORWARD`|`UC_MOD` |Cycle through selected input modes | +|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Cycle through selected input modes in reverse | +|`UNICODE_MODE_OSX` |`UC_M_OS`|Switch to macOS input | +|`UNICODE_MODE_LNX` |`UC_M_LN`|Switch to Linux input | +|`UNICODE_MODE_WIN` |`UC_M_WI`|Switch to Windows input | +|`UNICODE_MODE_BSD` |`UC_M_BS`|Switch to BSD input (not implemented) | +|`UNICODE_MODE_WINC` |`UC_M_WC`|Switch to Windows input using WinCompose | diff --git a/docs/keymap.md b/docs/keymap.md index 382a0e911bae..457dbf67e1cd 100644 --- a/docs/keymap.md +++ b/docs/keymap.md @@ -1,6 +1,6 @@ # Keymap Overview -QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `KEYMAP()` macro to help you create this array of arrays. +QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `LAYOUT()` macro to help you create this array of arrays. ## Keymap and Layers @@ -119,7 +119,7 @@ The main part of this file is the `keymaps[]` definition. This is where you list const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -After this you'll find a list of KEYMAP() macros. A KEYMAP() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer. +After this you'll find a list of LAYOUT() macros. A LAYOUT() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer. `keymaps[][MATRIX_ROWS][MATRIX_COLS]` in QMK holds the 16 bit action code (sometimes referred as the quantum keycode) in it. For the keycode representing typical keys, its high byte is 0 and its low byte is the USB HID usage ID for keyboard. @@ -131,7 +131,7 @@ Here is an example of the Clueboard's base layer: /* Keymap _BL: Base Layer (Default Layer) */ - [_BL] = KEYMAP( + [_BL] = LAYOUT( F(0), 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_BSPC, 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_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_NUHS, KC_ENT, \ @@ -149,7 +149,7 @@ Some interesting things to note about this: Our function layer is, from a code point of view, no different from the base layer. Conceptually, however, you will build that layer as an overlay, not a replacement. For many people this distinction does not matter, but as you build more complicated layering setups it matters more and more. - [_FL] = KEYMAP( + [_FL] = LAYOUT( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ @@ -161,62 +161,6 @@ Some interesting things to note: * We have used our `_______` definition to turn `KC_TRNS` into `_______`. This makes it easier to spot the keys that have changed on this layer. * While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer. -### Custom Functions - -At the bottom of the file we've defined a single custom function. This function defines a key that sends `KC_ESC` when pressed without modifiers and `KC_GRAVE` when modifiers are held. There are a couple pieces that need to be in place for this to work, and we will go over both of them. - -#### `fn_actions[]` - -We define the `fn_actions[]` array to point to custom functions. `F(N)` in a keymap will call element N of that array. For the Clueboard's that looks like this: - - const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() - }; - -In this case we've instructed QMK to call the `ACTION_FUNCTION` callback, which we will define in the next section. - -> This `fn_actions[]` interface is mostly for backward compatibility. In QMK, you don't need to use `fn_actions[]`. You can directly use `ACTION_FUNCTION(N)` or any other action code value itself normally generated by the macro in `keymaps[][MATRIX_ROWS][MATRIX_COLS]`. N in `F(N)` can only be 0 to 31. Use of the action code directly in `keymaps` unlocks this limitation. - -You can get a full list of Action Functions in [action_code.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_code.h). - -#### `action_function()` - -To actually handle the keypress event we define an `action_function()`. This function will be called when the key is pressed, and then again when the key is released. We have to handle both situations within our code, as well as determining whether to send/release `KC_ESC` or `KC_GRAVE`. - - void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - - switch (id) { - case 0: - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mods_pressed) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } - } - # Nitty Gritty Details This should have given you a basic overview for creating your own keymap. For more details see the following resources: diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md index 0b0ede37c4e0..a985e5d2b2f3 100644 --- a/docs/newbs_flashing.md +++ b/docs/newbs_flashing.md @@ -86,7 +86,7 @@ If you know what bootloader that you're using, then when compiling the firmware, ### DFU -For the DFU bootloader, when you're ready to compile and flash your firmware, open up your terminal window and run the built command: +For the DFU bootloader, when you're ready to compile and flash your firmware, open up your terminal window and run the build command: make ::dfu @@ -131,9 +131,19 @@ If you have any issues with this, you may need to this: sudo make ::dfu +#### DFU commands + +There are a number of DFU commands that you can use to flash firmware to a DFU device: + +* `:dfu` - This is the normal option and waits until a DFU device is available, and then flashes the firmware. This will check every 5 seconds, to see if a DFU device has appeared. +* `:dfu-ee` - This flashes an `eep` file instead of the normal hex. This is uncommon. +* `:dfu-split-left` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._ +* `:dfu-split-right` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._ + + ### Caterina -For Arduino boards and their close (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the built command: +For Arduino boards and their clones (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: make ::avrdude @@ -199,9 +209,17 @@ If you have any issues with this, you may need to this: sudo make ::avrdude + +Additionally, if you want to flash multiple boards, use the following command: + + make ::avrdude-loop + +When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop. + + ## HalfKay -For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the built command: +For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: make ::teensy @@ -226,12 +244,61 @@ Waiting for Teensy device... ``` Found HalfKay Bootloader -Read "./.build/ergodox_ez_drashna.hex": 28532 bytes, 88.5% usage +Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage Programming............................................................................................................................................................................ ................................................... Booting ``` +## STM32 (ARM) + +For a majority of ARM boards (including the Proton C, Planck Rev 6, and Preonic Rev 3), when you're ready to compile and flash your firmware, open up your terminal window and run the build command: + + make ::dfu-util + +For example, if your keymap is named "xyverz" and you're building a keymap for the Planck Revision 6 keyboard, you'll use this command and then reboot the keyboard to the bootloader (before it finishes compiling): + + make planck/rev6:xyverz:dfu-util + +Once the firmware finishes compiling, it will output something like this: + +``` +Linking: .build/planck_rev6_xyverz.elf [OK] +Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK] +Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK] + +Size after: + text data bss dec hex filename + 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex + +Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK] +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Invalid DFU suffix signature +A valid DFU suffix will be required in a future dfu-util release!!! +Opening DFU capable USB device... +ID 0483:df11 +Run-time device DFU version 011a +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuERROR, status = 10 +dfuERROR, clearing status +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 011a +Device returned transfer size 2048 +DfuSe interface name: "Internal Flash " +Downloading to address = 0x08000000, size = 41824 +Download [=========================] 100% 41824 bytes +Download done. +File downloaded successfully +Transitioning to dfuMANIFEST state +``` ## Test It Out! diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index aefa1b73850c..ae4b799a9c53 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -66,8 +66,10 @@ You will need to install Git. It's very likely that you already have it, but if Once you have set up your Linux/Unix environment, you are ready to download QMK. We will do this by using Git to "clone" the QMK repository. Open a Terminal or MSYS2 MinGW window and leave it open for the remainder of this guide. Inside that window run these two commands: - git clone https://github.com/qmk/qmk_firmware.git - cd qmk_firmware +```shell +git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` ?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create and clone your own fork instead. If you don't know what that means, you can safely ignore this message. diff --git a/docs/newbs_testing_debugging.md b/docs/newbs_testing_debugging.md index 45509110a557..771846b40991 100644 --- a/docs/newbs_testing_debugging.md +++ b/docs/newbs_testing_debugging.md @@ -13,9 +13,27 @@ Note: These programs are not provided by or endorsed by QMK. * [Keyboard Tester](http://www.keyboardtester.com) (Web Based) * [Keyboard Checker](http://keyboardchecker.com) (Web Based) -## Debugging With QMK Toolbox +## Debugging -[QMK Toolbox](https://github.com/qmk/qmk_toolbox) will show messages from your keyboard if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, or use the [Command](feature_command.md) feature to enable debug mode. +Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, use the [Command](feature_command.md) feature to enable debug mode, or add the following code to your keymap. + +```c +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} +``` + +### Debugging With QMK Toolbox + +For compatible platforms, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) can be used to display debug messages from your keyboard. + +### Debugging With hid_listen + +Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), provided by PJRC, can also be used to display debug messages. Prebuilt binaries for Windows,Linux,and MacOS are available. @@ -31,3 +49,51 @@ After that you can use a few different print functions: * `uprintf("%s string", var)`: Print a formatted string * `dprint("string")` Print a simple string, but only when debug mode is enabled * `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled + +## Debug Examples + +Below is a collection of real world debugging examples. For additional information, refer to [Debugging/Troubleshooting QMK](faq_debug.md). + +### Which matrix position is this keypress? + +When porting, or when attempting to diagnose pcb issues, it can be useful to know if a keypress is scanned correctly. To enable logging for this scenario, add the following code to your keymaps `keymap.c` + +```c +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed +#ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +#endif + return true; +} +``` + +Example output +```text +Waiting for device:....... +Listening: +KL: kc: 169, col: 0, row: 0, pressed: 1 +KL: kc: 169, col: 0, row: 0, pressed: 0 +KL: kc: 174, col: 1, row: 0, pressed: 1 +KL: kc: 174, col: 1, row: 0, pressed: 0 +KL: kc: 172, col: 2, row: 0, pressed: 1 +KL: kc: 172, col: 2, row: 0, pressed: 0 +``` + +### How long did it take to scan for a keypress? + +When testing performance issues, it can be useful to know the frequency at which the switch matrix is being scanned. To enable logging for this scenario, add the following code to your keymaps `config.h` + +```c +#define DEBUG_MATRIX_SCAN_RATE +``` + +Example output +```text + > matrix scan frequency: 315 + > matrix scan frequency: 313 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 + > matrix scan frequency: 316 +``` diff --git a/docs/eclipse.md b/docs/other_eclipse.md similarity index 100% rename from docs/eclipse.md rename to docs/other_eclipse.md diff --git a/docs/other_vscode.md b/docs/other_vscode.md new file mode 100644 index 000000000000..7427f758e5be --- /dev/null +++ b/docs/other_vscode.md @@ -0,0 +1,117 @@ +# Setting up Visual Studio Code for QMK Development + +[Visual Studio Code](https://code.visualstudio.com/) (VS Code) is an open-source code editor that supports many different programming languages. + +Using a full-featured editor such as VS Code provides many advantages over a plain text editor, such as: +* intelligent code completion +* convenient navigation in the code +* refactoring tools +* build automation (no need for the command-line) +* a graphical front end for GIT +* many other tools such as debugging, code formatting, showing call hierarchies etc. + +The purpose of this page is to document how to set up VS Code for developing QMK Firmware. + +This guide covers how to configure everything needed on Windows and Ubuntu 18.04 + +# Set up VS Code +Before starting, you will want to make sure that you have all of the build tools set up, and QMK Firmware cloned. Head to the the [Newbs Getting Started Guide](newbs_getting_started.md) to get things set up, if you haven't already. + +## Windows + +### Prerequisites + +* [Git for Windows](https://git-scm.com/download/win) (This link will prompt to save/run the installer) + + 1. Disable all of the options but `Git LFS (Large File Support)` and `Check daily for Git for Windows updates`. + 2. Set the default editor to `Use Visual Studio Code as Git's default editor` + 3. Select the `Use Git from Git Bash only` option, since that's the option that you should use here. + 4. For the `Choosing HTTPS transport backend`, either option should be fine. + 5. Select the `Checkout as-is, commit Unix-style line endings` option. QMK Firmware uses Unix style commits. + 6. For the extra options, leave the default options as is. + + This software is needed for Git support in VS Code. It may be possible to not include this, but it is much simpler to just use this. + +* [Git Credential Manager for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases) (Optional) + + This software provides better support for Git by providing secure storage for git credentials, MFA and personal access token generation. + + This isn't strictly needed, but we would recommend it. + + +### Installing VS Code + +1. Head to [VS Code](https://code.visualstudio.com/) and download the installer +2. Run the installer + +This part is super simple. However, there is some configuration that we need to do to ensure things are configured correctly. + +### Configuring VS Code + +First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properies.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already. + +Grab [this file](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) and save it. You may need to edit this file, if you didn't install MSYS2 to the default location, or are using WSL/LxSS. + +Once you have saved this file, you will need to reload VS Code, if it was already running. + +?> You should see an `extensions.json` and `settings.json` file in the `.vscode` folder, as well. + + +Now, we will set up the MSYS2 window to show up in VSCode as the integrated terminal. This has a number of advantages. Mostly, you can control+click on errors and jump to those files. This makes debugging much easier. It's also nice, in that you don't have to jump to another window. + +1. Click File > Preferences > > Settings +2. Click on the {} button, in the top right to open the `settings.json` file. +3. Set the file's content to: + + ```json + { + "terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe", + "terminal.integrated.env.windows": { + "MSYSTEM": "MINGW64", + "CHERE_INVOKING": "1" + }, + "terminal.integrated.shellArgs.windows": [ + "--login" + ], + "terminal.integrated.cursorStyle": "line" + } + ``` + + If there are settings here already, then just add everything between the first and last curly brackets. + +?> If you installed MSYS2 to a different folder, then you'll need to change the path for `terminal.integrated.shell.windows` to the correct path for your system. + +4. Hit Ctrl-` (grave) to bring up the terminal. + + This should start the terminal in the workspace's folder (so the `qmk_firmware` folder), and then you can compile your keyboard. + + +## Every other Operating System + +1. Head to [VS Code](https://code.visualstudio.com/) and download the installer +2. Run the installer +3. That's it + +No, really, that's it. The paths needed are already included when installing the packages, and it is much better about detecting the current workspace files and parsing them for IntelliSense. + +## Plugins + +There are a number of extensions that you may want to install: + +* [Git Extension Pack](https://marketplace.visualstudio.com/items?itemName=donjayamanne.git-extension-pack) - +This installs a bunch of Git related tools that may make using Git with QMK Firmware easier. +* [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - _[Optional]_ - Helps to keep the code to the QMK Coding Conventions. +* [Bracket Pair Colorizer 2](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2) - _[Optional]_ - This color codes the brackets in your code, to make it easier to reference nested code. +* [Github Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[Optional]_ - Makes the markdown preview in VS Code more like GitHub's. +* [VS Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) - _[Optional]_ - This extension allows somebody else to access your workspace (or you to access somebody else's workspace) and help out. This is great if you're having issues and need some help from somebody. +* [VIM Keymap](https://marketplace.visualstudio.com/items?itemName=GiuseppeCesarano.vim-keymap) - _[Optional]_ - For those that prefer VIM style keybindings. There are other options for this, too. +* [Travis CI Status](https://marketplace.visualstudio.com/items?itemName=felixrieseberg.vsc-travis-ci-status) - _[Optional]_ - This shows the current Travis CI status, if you have it set up. + +Restart once you've installed any extensions + +# Configure VS Code for QMK +1. Click File > Open Folder +2. Open the QMK Firmware folder that you cloned from GitHub. +3. Click File > Save Workspace As... + +And now you're ready to code QMK Firmware in VS Code diff --git a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md index 50d291a2300f..979eafbc80f7 100644 --- a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md +++ b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md @@ -1,14 +1,24 @@ -Setting up your ARM based PCB is a little more involved than an Atmel MCU, but is easy enough. Start by using `util/new_project.sh ` to create a new project: +Setting up your ARM based PCB is a little more involved than an Atmel MCU, but is easy enough. Start by running `util/new_keyboard.sh`: ``` -$ util/new_project.sh simontester -###################################################### -# /keyboards/simontester project created. To start -# working on things, cd into keyboards/simontester -###################################################### -``` +$ ./util/new_keyboard.sh +Generating a new QMK keyboard directory + +Keyboard Name: mycoolkb +Keyboard Type [avr]: +Your Name [John Smith]: +Copying base template files... done +Copying avr template files... done +Renaming keyboard files... done +Replacing %KEYBOARD% with mycoolkb... done +Replacing %YOUR_NAME% with John Smith... done +Created a new keyboard called mycoolkb. + +To start working on things, cd into keyboards/mycoolkb, +or open the directory in your favourite text editor. +``` # END OF NEW ARM DOC, OLD ATMEL DOC FOLLOWS @@ -22,6 +32,8 @@ The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each r For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect. +To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. + `BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported. `BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap. @@ -54,10 +66,10 @@ This is where all of the custom logic for your keyboard goes - you may not need ## `/keyboards//.h` -Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accommodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design: +Here is where you can (optionally) define your `LAYOUT` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accommodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design: ``` -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, \ k10, k11 \ ) \ diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md index 90192e632410..a2ba34c32dd0 100644 --- a/docs/quantum_keycodes.md +++ b/docs/quantum_keycodes.md @@ -1,6 +1,6 @@ # Quantum Keycodes -Quantum keycodes allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions. +Quantum keycodes allow for easier customization of your keymap than the basic ones provide, without having to define custom actions. All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification. @@ -16,6 +16,11 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are |`KC_GESC` |`GRAVE_ESC`|Escape when tapped, ` when pressed with Shift or GUI| |`KC_LSPO` | |Left Shift when held, `(` when tapped | |`KC_RSPC` | |Right Shift when held, `)` when tapped | +|`KC_LCPO` | |Left Control when held, `(` when tapped | +|`KC_RCPC` | |Right Control when held, `)` when tapped | +|`KC_LAPO` | |Left Alt when held, `(` when tapped | +|`KC_RAPC` | |Right Alt when held, `)` when tapped | +|`KC_SFTENT` | |Right Shift when held, Enter when tapped | |`KC_LEAD` | |The [Leader key](feature_leader_key.md) | |`KC_LOCK` | |The [Lock key](feature_key_lock.md) | |`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) | diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index 20ead2b3f54f..a94c9c3191e7 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -57,10 +57,10 @@ Matrix Scanning runs many times per second. The exact rate varies but typically Once we know the state of every switch on our keyboard we have to map that to a keycode. In QMK this is done by making use of C macros to allow us to separate the definition of the physical layout from the definition of keycodes. -At the keyboard level we define a C macro (typically named `KEYMAP()`) which maps our keyboard's matrix to physical keys. Sometimes the matrix does not have a switch in every location, and we can use this macro to pre-populate those with KC_NO, making the keymap definition easier to work with. Here's an example `KEYMAP()` macro for a numpad: +At the keyboard level we define a C macro (typically named `LAYOUT()`) which maps our keyboard's matrix to physical keys. Sometimes the matrix does not have a switch in every location, and we can use this macro to pre-populate those with KC_NO, making the keymap definition easier to work with. Here's an example `LAYOUT()` macro for a numpad: ```c -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, \ k10, k11, k12, k13, \ k20, k21, k22, \ @@ -75,17 +75,17 @@ At the keyboard level we define a C macro (typically named `KEYMAP()`) which map } ``` -Notice how the second block of our `KEYMAP()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to. +Notice how the second block of our `LAYOUT()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to. You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document. ##### Keycode Assignment -At the keymap level we make use of our `KEYMAP()` macro above to map keycodes to physical locations to matrix locations. It looks like this: +At the keymap level we make use of our `LAYOUT()` macro above to map keycodes to physical locations to matrix locations. It looks like this: ``` const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( +[0] = LAYOUT( KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ KC_P7, KC_P8, KC_P9, KC_PPLS, \ KC_P4, KC_P5, KC_P6, \ @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } ``` -Notice how all of these arguments match up with the first half of the `KEYMAP()` macro from the last section? This is how we take a keycode and map it to our Matrix Scan from earlier. +Notice how all of these arguments match up with the first half of the `LAYOUT()` macro from the last section? This is how we take a keycode and map it to our Matrix Scan from earlier. ##### State Change Detection @@ -135,9 +135,11 @@ The `process_record()` function itself is deceptively simple, but hidden within * [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/action.c#L172) * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L206) * [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L226) + * [`void velocikey_accelerate(void)`](https://github.com/qmk/qmk_firmware/blob/c1c5922aae7b60b7c7d13d3769350eed9dda17ab/quantum/velocikey.c#L27) * [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L119) * [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_key_lock.c#L62) * [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_clicky.c#L79) + * [`bool process_haptic(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/2cee371bf125a6ec541dd7c5a809573facc7c456/drivers/haptic/haptic.c#L216) * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20) * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58) * [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139) diff --git a/docs/zh-cn/README.md b/docs/zh-cn/README.md new file mode 100644 index 000000000000..9eb4ea777ae3 --- /dev/null +++ b/docs/zh-cn/README.md @@ -0,0 +1,32 @@ +# QMK机械键盘固件 + +[![当前版本](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) +[![开发状态](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware) +[![异议](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh) +[![文档状态](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm) +[![GitHub贡献者](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) +[![GitHub分支](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) + +## 什么是 QMK 固件? + +QMK (*Quantum Mechanical Keyboard*) 是一个社区维护的开源软件,包括 QMK 固件, QMK 工具箱, qmk.fm网站, 和这些文档。QMK 固件是一个基于[tmk\_keyboard](http://github.com/tmk/tmk_keyboard)的键盘固件,它在爱特梅尔AVR微控制器实现一些有用的功能,确切地说, 是在 [OLKB product line](http://olkb.com), 在 [ErgoDox EZ](http://www.ergodox-ez.com) 键盘, 和 [Clueboard product line](http://clueboard.co/). 上。它被移植到使用ChibiOS的ARM芯片上. 它可以在飞线键盘或定制PCB键盘中发挥功能. + +## 如何得到它 + +如果你打算贡献布局, 键盘, 或者其他QMK特性, 一下是最简单的方法:[从Github获得repo分支](https://github.com/qmk/qmk_firmware#fork-destination-box), 并克隆你的repo到本地进行编辑,推送,然后从你的分支打开 [Pull Request](https://github.com/qmk/qmk_firmware/pulls). + +此外, 你也可以直接下载 ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), 或者从git克隆 (`git@github.com:qmk/qmk_firmware.git`), 或 https (`https://github.com/qmk/qmk_firmware.git`). + +## 如何编译 + +在你能编译之前, 你需要[部署环境](getting_started_build_tools.md) 用于 AVR or/and ARM 开发。完成后, 你可以使用 `make` 命令来编译一个键盘和布局使用以下命令: + + make planck/rev4:default + +这将建立 `planck`的`rev4` 修订版本并使用 `default`布局。并非所有键盘都有修订版本 (也叫做子项目或文件夹),在此情况下,修订版本可以省略,如下: + + make preonic:default + +## 如何定制 + +QMK 有许多 [特性](features.md)来探索,也有很多 [参考文档](http://docs.qmk.fm) 供您发掘。你可以通过修改 [布局](keymap.md)和[键码](keycodes.md)来利用许多特性。 diff --git a/docs/zh-cn/_summary.md b/docs/zh-cn/_summary.md new file mode 100644 index 000000000000..df25a3ccd14e --- /dev/null +++ b/docs/zh-cn/_summary.md @@ -0,0 +1,106 @@ +* [完全菜鸟指南](newbs.md) + * [入门](newbs_getting_started.md) + * [构建你的第一个固件](newbs_building_firmware.md) + * [刷新固件](newbs_flashing.md) + * [测试和调试](newbs_testing_debugging.md) + * [Git最佳实践](newbs_best_practices.md) + * [学习资源](newbs_learn_more_resources.md) + +* [QMK基础](README.md) + * [QMK 简介](getting_started_introduction.md) + * [贡献 QMK](contributing.md) + * [如何使用Github](getting_started_github.md) + * [获得帮助](getting_started_getting_help.md) + +* [问题解答](faq.md) + * [一般问题](faq_general.md) + * [构建/编译QMK](faq_build.md) + * [调试/故障排除 QMK](faq_debug.md) + * [键盘布局](faq_keymap.md) + +* 详细指南 + * [安装构建工具](getting_started_build_tools.md) + * [流浪者指南](getting_started_vagrant.md) + * [构建/编译指令](getting_started_make_guide.md) + * [刷新固件](flashing.md) + * [定制功能](custom_quantum_functions.md) + * [布局概述](keymap.md) + +* [硬件](hardware.md) + * [AVR 处理器](hardware_avr.md) + * [驱动](hardware_drivers.md) + +* 参考 + * [键盘指南](hardware_keyboard_guidelines.md) + * [配置选项](config_options.md) + * [键码](keycodes.md) + * [记录最佳实践](documentation_best_practices.md) + * [文档指南](documentation_templates.md) + * [词汇表](reference_glossary.md) + * [单元测试](unit_testing.md) + * [有用的功能](ref_functions.md) + * [配置器支持](reference_configurator_support.md) + * [info.json 格式](reference_info_json.md) + +* [特性](features.md) + * [基本键码](keycodes_basic.md) + * [US ANSI 控制键](keycodes_us_ansi_shifted.md) + * [量子键码](quantum_keycodes.md) + * [高级键码](feature_advanced_keycodes.md) + * [音频](feature_audio.md) + * [自动控制](feature_auto_shift.md) + * [背光](feature_backlight.md) + * [蓝牙](feature_bluetooth.md) + * [Bootmagic](feature_bootmagic.md) + * [组合](feature_combo) + * [命令](feature_command.md) + * [动态宏指令](feature_dynamic_macros.md) + * [编码器](feature_encoders.md) + * [Grave Escape](feature_grave_esc.md) + * [键锁](feature_key_lock.md) + * [层](feature_layouts.md) + * [引导键](feature_leader_key.md) + * [LED 阵列](feature_led_matrix.md) + * [宏指令](feature_macros.md) + * [鼠标键](feature_mouse_keys.md) + * [一键功能](feature_advanced_keycodes.md#one-shot-keys) + * [指针设备](feature_pointing_device.md) + * [PS/2 鼠标](feature_ps2_mouse.md) + * [RGB 光](feature_rgblight.md) + * [RGB 矩阵](feature_rgb_matrix.md) + * [空格候补换挡](feature_space_cadet_shift.md) + * [空格候补换挡回车](feature_space_cadet_shift_enter.md) + * [速录机](feature_stenography.md) + * [换手](feature_swap_hands.md) + * [踢踏舞](feature_tap_dance.md) + * [终端](feature_terminal.md) + * [热敏打印机](feature_thermal_printer.md) + * [Unicode](feature_unicode.md) + * [用户空间](feature_userspace.md) + * [速度键](feature_velocikey.md) + +* 针对制造者和定制者 + * [飞线指南](hand_wire.md) + * [ISP 刷新指南](isp_flashing_guide.md) + * [ARM 调试指南](arm_debugging.md) + * [I2C 驱动](i2c_driver.md) + * [GPIO 控制器](internals_gpio_control.md) + * [Proton C 转换](proton_c_conversion.md) + +* 深入了解 + * [键盘如何工作](how_keyboards_work.md) + * [理解 QMK](understanding_qmk.md) + +* 其他话题 + * [使用Eclipse开发QMK](other_eclipse.md) + * [使用VSCode开发QMK](other_vscode.md) + * [支持](support.md) + +* QMK 内构 (正在编写) + * [定义](internals_defines.md) + * [输入回调寄存器](internals_input_callback_reg.md) + * [Midi 设备](internals_midi_device.md) + * [Midi 设备设置过程](internals_midi_device_setup_process.md) + * [Midi 工具库](internals_midi_util.md) + * [发送函数](internals_send_functions.md) + * [Sysex 工具](internals_sysex_tools.md) diff --git a/docs/zh-cn/contributing.md b/docs/zh-cn/contributing.md new file mode 100644 index 000000000000..62b956b619f7 --- /dev/null +++ b/docs/zh-cn/contributing.md @@ -0,0 +1,205 @@ +# 如何做贡献 + +👍🎉 首先感谢各位百忙之中抽空阅读本文档,并为我们无私奉献。给您点赞啦! 🎉👍 + +第三方的帮助让Q酱成长了许多呢,Q酱也从你们那学到了不少新东西。Q酱希望每一个想帮助我的人都能很方便的做出有用的贡献。在这里我给摩拳擦掌的你们写了一点引导,让你们的代码在不对我做重大改动的情况下都能成功的被采纳哦。 + +* [项目概况](#项目概况) +* [代码规范](#代码规范) +* [一般教程](#一般教程) +* [行为守则对于我来说有何意义?](#行为守则对于我来说有何意义?) + +## 这文章巨长无比不想读啊! 我就想问个问题而已! + +您要是想问关于Q酱的问题的话可以在[OLKB Subreddit](https://reddit.com/r/olkb)或者是[Discord](https://discord.gg/Uq7gcHh)随意问。 + +请记住: + +* 维护Q酱的小可爱有的时候可能会有点忙,不能及时回答您的问题,耐心等等,他们都是很nice的人呀。 +* 维护Q酱的人都是很无私的善良的人。无论是贡献代码还是回答问题,都是义务的。有时见到他们努力回答各种问题,解决各种BUG,Q酱也是很心疼的。 +* 您可以看看下面的教程,可以让您的问题浅显易懂,更容易回答: + * https://opensource.com/life/16/10/how-ask-technical-questions + * http://www.catb.org/esr/faqs/smart-questions.html + +# 项目概况 + +Q酱很大一部分是用C语言组成的,不过有一小部分特性是C++的。怎么说呢,都是我的一部分,两个我都爱。Q酱一般是在键盘上的嵌入式处理器那里工作的,尤其与AVR([LUFA](http://www.fourwalledcubicle.com/LUFA.php))和ARM ([ChibiOS](http://www.chibios.com))两小哥哥搭配,干活不累,嘻嘻。如果您精通Arduino的话您会发现很多熟悉的概念,但也有点不爽,因为您以前的经验可能没法用来帮助Q酱。 + + + +# Q酱,我在哪能帮助你嘞? + +您要是有问题的话可以 [提出一个issue](https://github.com/qmk/qmk_firmware/issues) 或 [在Discord上交流一下](https://discord.gg/Uq7gcHh). + +# Q酱,我如何帮助你? + +您以前是否没为开源贡献过代码,而又想知道帮助Q酱是怎么一回事? 稍安勿躁,咱给您总结一下! + +0. 先注册一个 [GitHub](https://github.com) 账户。 +1. 做好一个你要贡献的布局,那就要 [找一个你想解决的问题](https://github.com/qmk/qmk_firmware/issues),或者 [找一个你想添加的特性](https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature)。 +2. 把关联着问题的仓库分叉(fork)到你的仓库。这样你在`你的GitHub用户名/qmk_firmware`就有一个仓库备份啦。 +3. 使用 `git clone https://github.com/此处添GitHub用户名/此处添仓库名.git`这个命令把仓库同步到你的电脑中。 +4. 您要是想开发一个新特性的话可以先创建一个issue和Q酱的维护者讨论一下您要做什么。 +5. 使用`git checkout -b 此处写分支名字(别用汉字)`命令来创建一个分支(branch)用于开发。 +6. 对要解决的问题或要添加的特性进行适当的更改。 +7. 使用 `git add 把改变的文件的目录写这里` 可以添加改变的文件内容到git用于管理工程状态的索引(快照)里。 +8. 使用 `git commit -m "这里写修改的相关信息"` 来描述你做出了什么修改。 +9. 使用 `git push origin 此处写分支名字`来把你的更改同步到GitHub库里(反正不是打篮球那个库里)。 +10. 提交一个[QMK 固件的pull request](https://github.com/qmk/qmk_firmware/pull/new/master)。 +11. 给你的pull request拟一个标题,包括简短的描述和问题或错误代码。比如, 你可以起一个这样的"Added more log outputting to resolve #4352"(最好用英语,毕竟Q酱的中文也不是那么的溜,有可能会看不懂中文)。 +12. 在描述(description)里面写你做了哪些更改,你的代码里还存在什么问题, 或者你想问维护的小可爱们的问题。你的your pull request有点小问题无伤大雅(本来也没有完美的代码嘛), 维护的小可爱们会竭尽全力帮您改进的! +13. 维护人员审查代码可能需要一些时间。 +14. 维护人员会通知您要更改什么地方,然后您就按照建议改一改。 +15. 预祝您合并成功! + +# 代码规范 + +其实也没有什么特别严格的规范啦,但是俗话说的好:没有规矩,不成方圆。您可以看一下您的要改动的代码周围的画风,然后保持队形。如果你感觉周围都不知道是什么牛鬼蛇神的话就看看下面的建议: + +* 我们用肆(4)个空格来缩进(软件中也可以设置到Tab键) +* 我们使用改良的1TBS(允许单行样式) + * 左大括号: 在开放性语句块那行的末尾 + * 右大括号: 和开放性语句块第一个字母对齐 + * Else If: 将右大括号放在行的开头,下一个左大括号放在同一行的结尾 + * 可选大括号: 可选大括号是必选的 + * 应该这样: if (condition) { return false; } + * 不应该这样: if (condition) return false; +* 建议使用C语言风格的注释: `/* */` + * 把注释想象成一个描述特征的故事 + * 充分使用注释来描述你为何这样修改 + * 有些公认的东西就不要写到注释里面了 + * 如果你不知道注释是否多余,看下面 +* 一般不要主动换行,主动换行的话每行不要超过76列 +* 要把 `#pragma once` 放到头文件的开始哦,抛弃老土的(`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)吧 +* 下面两种预处理命令都可以用: `#ifdef DEFINED` 还有 `#if defined(DEFINED)` + * 以上那句对处女座不是很友好哈,处女座的朋友们就别纠结了,直接 `#if defined(DEFINED)` 。 + * 还有就是选好一种风格就一直用,一直用一直爽,不要朝三暮四, 除非你要变化到多重条件的 `#if`。 + * `#` 和 `if`要挨在一起哦,再让本空格在中间冒充电灯泡本空格会生气的。 + * 以下是缩进规则: + * 首先考虑可读性,强迫症的朋友们总想要保持代码的高一致性,这样可不好。 + * 保证文件已有风格不变。如果代码本来就是杂糅风格,那就见机行事,让你的修改更有意义些。 + * 其实你也可以在缩进的时候看看周围其他代码,然后范水模山,预处理命令可以有自己的缩进风格。 + +可以参照下面: + +```c +/* foo 的 Enums*/ +enum foo_state { + FOO_BAR, + FOO_BAZ, +}; + +/* 有返回值的情况 */ +int foo(void) { + if (some_condition) { + return FOO_BAR; + } else { + return -1; + } +} +``` + +# Clang-format的自动格式化 +[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) 是LLVM的一部分,可以帮你自动格式化代码。我们给你准备好了一个适用于以上规范的配置文件,会帮你调整缩进和换行,你只需要写好括号就好。有了它,你再也不用担心调整代码格式太耗时,没有时间陪伴自己(虚构)的另一半了。 + +使用[LLVM 完整安装](http://llvm.org/builds/)可以在Windows上安装clang-format, Ubuntu用户要用`sudo apt install clang-format`。 + +命令行的朋友们, 加上 `-style=file`选项就会自动在QMK的根目录寻找.clang-format配置文件了。 + +VSCode用户, 标准的 C/C++ 插件就支持clang-format, 或者可以用[独立扩展](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat)也行。 + +有些东西(比如LAYOUT宏) 会被clang-format打乱,所以那些文件就别用clang-format了,这里就教您一个小窍门,在`// clang-format off` 和 `//clang-format on`之间装上会被搞乱的代码就好了。 + +# 一般教程 + +你可以给Q酱的不同部分添砖加瓦,但也要用不同的方法严谨检查。不论你修改哪里最好还是看看下边。 + +* 将PR(pull request)分成一个个的逻辑单元。 比如,不要一次将两个新特性PR出去。要添加的特性排好队,一个一个来。 +* 提交之前看一眼,`git diff --check`的空格一定要写对了 +* 确定你的代码能通过编译 + * 布局: 确定`make keyboard:your_new_keymap` 不返回错误 + * 键盘: 确定 `make keyboard:all` 不返回错误 + * 核心代码: 确定 `make all` 不返回错误 +* 提交的信息尽量明确。第一行写点简短介绍(每行不多于70个英文字母), 第二行空着,第三行和后面就要写些必要的细节了。最好用英文写,比如: + +``` +Adjust the fronzlebop for the kerpleplork + +The kerpleplork was intermittently failing with error code 23. The root cause was the fronzlebop setting, which causes the kerpleplork to activate every N iterations. + +Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure. +``` + +## 文档 + +想帮助Q酱当然是先看文档最简单了。找到这个文档哪里错了然后改正它对于你来说超级简单! 我们也对有写文档能力的人求贤若渴,如果你是对的人[点这个](#Q酱,我在哪能帮助你嘞?)! + +文档呢,都静静的放在`qmk_firmware/docs` 目录里, 也或者您想为网页做贡献的话也是可以的哦。 + +在文档中附代码案例时, 先观察文档其他地方的命名规范。比如, 把enums的名字都改成像`my_layers`或者`my_keycodes`来防止名字不一致的enums被当作特务枪毙: + +```c +enum my_layers { + _FIRST_LAYER, + _SECOND_LAYER +}; + +enum my_keycodes { + FIRST_LAYER = SAFE_RANGE, + SECOND_LAYER +}; +``` + +## 布局 + +大多数QMK新手都从创建一个自己的布局开始。我们尽力保证布局规范宽松 (毕竟布局是个性的体现) 不过建议遵守以下准则,这样可以让别人更好理解你的代码 + +* 用 [模板](documentation_templates.md)写个`readme.md`。 +* 所有的布局PR都会被squash, 如果你想知道你的提交是怎么被squash的那你就自己来吧 +* 不要把新特性和布局一起PR。可以分别PR他们 +* 布局文件夹就不要放`Makefile`了,这个操作都过时啦 +* 更新文件头部的copyrights(看`%YOUR_NAME%`那) + +## 键盘 + +QMK的最终归宿是键盘。有些键盘是社区维护的,有一些是制作这些键盘的人维护的。`readme.md`会告诉你是谁维护了这个键盘,如果你对某个键盘有疑问,可以 [创建一个Issue](https://github.com/qmk/qmk_firmware/issues) 来问一问维护者。 + +我们建议你按下面的来操作: + +* 用[模板](documentation_templates.md)写`readme.md`。 +* 提交数量尽量合理,不然我们可就要把你的PR给squash了。 +* 不要把新特性和新键盘一起PR。可以分别PR他们 +* 用父文件夹的名字命名 `.c`/`.h`文件, 比如`/keyboards///.[ch]` +* 键盘文件夹就不要放`Makefile`了,这个操作都过时啦 +* 更新文件头部的copyrights(看`%YOUR_NAME%`那) + +## Quantum/TMK 核心 + +在您废寝忘食地开发Q酱新特性或者帮Q酱驱虫之前,一定要确保你的工作是有意义的。看看[了解QMK](understanding_qmk.md)你会对Q酱有更深的了解,这个文档将带你领略QMK的程序流程。现在你应该和维护团对谈谈来了解实现你想法的最佳方法了。一下渠道都可以: + +* [在Discord交流](https://discord.gg/Uq7gcHh) +* [建立一个Issue](https://github.com/qmk/qmk_firmware/issues/new) + +新特性和BUG的修复影响所有键盘。开发组也在翻修QMK。所以,在实施重大返修之前一定要讨论一下。如果你在没有事先与维护团队沟通的情况下提交了一个PR,而且你的选择与维护团队的计划方向不符,那你可能要面临大改了。 + +修复BUG或者开发新特性之前看看这个: + +* **默认不启用** - QMK运行的芯片多数内存有限,所以首要考虑的还应该是布局不要被破坏,于是特性默认是不启用的。你喜欢什么特性的话就打开它,如果你觉得有些特性应该默认开启或者你能帮助缩减代码,那就联系维护组吧。 +* **提交之前在本地编译** - 这个简直就是家喻户晓了,但是也确实需要编译啊! 我们的Travis系统会发现一切问题,但是自己编译一下可要比在线等快多了。 +* **注意版本和芯片平台** - 有那么几个键盘有支持不同配置甚至是不同芯片的版本。试着写一个能AVR和ARM两个平台运行的特性,或者在不支持的平台自动禁用。 +* **解释你的新特性** - 在`docs/`写个文档, 你可以创建新文档或者写到现有文档中。如果你不把它记录下来,其他人就无法从你的努力中获益。 + +也可以看看以下建议: + +* 提交数量尽量合理,不然我们可就要把你的PR给squash了。 +* 不要把新特性、布局和键盘一起PR。可以分别PR他们。 +* 给你的特性写[单元测试](unit_testing.md)。 +* 你编辑的文件风格要一致,如果风格不明确或者是混搭风的,你就要先看看[代码规范](#代码规范)确认情况。 + +## 重构 + +为了保持QMK脉络清晰,Q酱打算深入规划重构一下自己,然后让合作者进行修改。如果你有重构的思路或建议[创建一个issue](https://github.com/qmk/qmk_firmware/issues), Q酱很乐意讨论一下怎么改进一下。 + +# 行为守则对于我来说有何意义? + +我们的[行为守则](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) 是说明您有责任尊重和礼貌地对待项目中的每个人,无论他们的身份如何。 如果你是我们行为准则所描述的不当行为的受害者,我们将站在你这边,并按照行为准则对施暴者进行适当谴责。 diff --git a/docs/zh-cn/faq.md b/docs/zh-cn/faq.md new file mode 100644 index 000000000000..3d0b65c6fd21 --- /dev/null +++ b/docs/zh-cn/faq.md @@ -0,0 +1,6 @@ +# 常见问题 + +* [一般问题](faq_general.md) +* [构建和编译QMK](faq_build.md) +* [QMK调试和故障排除](faq_debug.md) +* [布局问题](faq_keymap.md) diff --git a/docs/zh-cn/faq_build.md b/docs/zh-cn/faq_build.md new file mode 100644 index 000000000000..60d902007ca6 --- /dev/null +++ b/docs/zh-cn/faq_build.md @@ -0,0 +1,150 @@ +# 关于构建的常见问题 + +本页所写是QMK构建的常见问题.如果你还没有进行过编译,就看一下[构建环境搭建](getting_started_build_tools.md) 和 [make的说明](getting_started_make_guide.md). + +## 如果您不能在Linux上编程 +您需要适当的权限才能操作设备。对于Linux用户, 请参阅下方有关`udev`规则的说明。如果您对`udev`有问题,解决方法是用`sudo`命令。如果您不熟悉此命令,使用`man sudo`查看其手册或[看这个网页](https://linux.die.net/man/8/sudo). + +在你的主控是ATMega32u4时,以下是使用`sudo`命令的样例: + + $ sudo dfu-programmer atmega32u4 erase --force + $ sudo dfu-programmer atmega32u4 flash your.hex + $ sudo dfu-programmer atmega32u4 reset + +或只用; + + $ sudo make ::dfu + +使用`sudo`运行`make`一般来说**不**推荐,如果可能,尽量使用前一种方法之一。 + +### Linux `udev` 规则 +在Linux上,您需要适当的权限才能访问MCU。你也可以在刷新固件时使用 `sudo`,或把这些文件放到`/etc/udev/rules.d/`。 + +**/etc/udev/rules.d/50-atmel-dfu.rules:** +``` +# Atmel ATMega32U4 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666" +# Atmel USBKEY AT90USB1287 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666" +# Atmel ATMega32U2 +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666" +``` + +**/etc/udev/rules.d/52-tmk-keyboard.rules:** +``` +# tmk键盘产品 https://github.com/tmk/tmk_keyboard +SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" +``` +**/etc/udev/rules.d/54-input-club-keyboard.rules:** + +``` +# Input Club keyboard bootloader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666" +``` + +### 串行设备在Linux上检测不到bootloader模式 +确保您的内核对您的设备有相应的支持。 如果你的设备是 USB ACM, 比如Pro Micro (Atmega32u4),就要加上`CONFIG_USB_ACM=y`. 其他设备可能需要`USB_SERIAL` 及其任何子选项。 + +## DFU Bootloader的未知设备 + +如果您在使用Windows来刷新键盘的时候碰到了问题,检查设备管理器。如果在键盘处于 "bootloader模式"时你看到 "未知设备",说明你可能面临设备问题。 + +重新运行MSYS2上的安装脚本或许会凑效(比如在MSYS2/WSL运行 `./util/qmk_install.sh`) 或者重新安装QMK工具箱也可能会解决你的问题。 + +如果以上方法还是短针攻疽,那您可能需要使用[Zadig Utility](https://zadig.akeo.ie/)。下载此程序, 找到设备问题, 然后选择 `WinUSB`选项, 然后点击"Reinstall driver"。完成后再试试刷新你的键盘。倘若依然徒劳无功,那就尝试所有选项直到好用为止。 + +?> 事实上没有一个驱动的最佳选择,有些选项就是和某些系统相辅相成。但libUSB和WinUSB似乎也算是这里的最佳选择了。 +如果bootloader在设备列表中没有显示,你可能要使能 "List all devices"选项在选项菜单中`Options`,然后找到有问题的bootloader设备。(译者注:在win10中可能为 查看-显示隐藏的设备) + + +## WINAVR已淘汰 +不再推荐使用WINAVR,使用可能会导致问题 +详情请见[TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99). + +## USB VID 和 PID +你可以在编辑`config.h`时使用任何你想用的ID值。实际上,使用任何可能未使用的ID都没有问题,除了有极低的与其他产品发生冲突的可能性。 + +大多数QMK主板使用`0xFEED`作为vendor ID。您应该查看其他键盘,以确保选择了唯一的Product ID。 + +也要看看这个。 +https://github.com/tmk/tmk_keyboard/issues/150 + +一也可以在下方链接购买一个唯一的VID:PID。不过个人使用似乎用不着这个。 +- http://www.obdev.at/products/vusb/license.html +- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 + +## Cortex: `cstddef: No such file or directory` +在Ubuntu 14.04上的GCC 4.8 会出现这种问题需要用这个PPA升级到4.9。 +https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded + +https://github.com/tmk/tmk_keyboard/issues/212 +https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef +https://developer.mbed.org/forum/mbed/topic/5205/ + +## `clock_prescale_set` and `clock_div_1` Not Available +你的工具链太旧了不支持MCU。比如WinAVR 20100110就不支持ATMega32u2. + +``` +Compiling C: ../../tmk_core/protocol/lufa/lufa.c +avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_alps64/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_alps64_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_alps64/protocol/lufa/lufa.o +../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu': +../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set' +../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function) +../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once +../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.) +make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1 +``` + + +## AVR的BOOTLOADER_SIZE +注意Teensy2.0++ bootloader的大小是2048字节。有些Makefile注释错了。 + +``` +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 2048 +# Atmel DFU loader 4096 (TMK Alt Controller) +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=2048 +``` + +## 在MacOS上 `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` +这是brew更新的问题,导致AVR GCC依赖的符号链接被损坏。 + +解决方案是移除并重新安装所有受影响的模块。 + +``` +brew rm avr-gcc +brew rm dfu-programmer +brew rm dfu-util +brew rm gcc-arm-none-eabi +brew rm avrdude +brew install avr-gcc +brew install dfu-programmer +brew install dfu-util +brew install gcc-arm-none-eabi +brew install avrdude +``` + +### avr-gcc 8.1 和 LUFA + +如果你把avr-gcc升级到7以上你可能会遇到关于LUFA的问题。比如: + +`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'` + +那你就需要在brew中把avr-gcc回退到7。 + +``` +brew uninstall --force avr-gcc +brew install avr-gcc@7 +brew link --force avr-gcc@7 +``` + +### 我刷新了我的键盘但是键盘不工作/按键没有注册 - 而且还是ARM的 (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019) +由于EEPROM在基于ARM的芯片上的工作原理,保存的设置可能不再有效。这会影响默认层,而且*或许*在某些情况下,会使键盘不好用,我们仍在调查这些情况。重置EEPROM将解决此问题。 + +[Planck rev6键盘重置EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) 是用于强制重置EEPROM的。刷入这个文件后,再次刷入正常固件,这会将键盘恢复到_正常_工作状态。 +[Preonic rev3键盘重置EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin) + +如果以任何形式启用了bootmagic, 那么您还需要(看[Bootmagic文档](feature_bootmagic.md) 以及键盘信息,以了解如何执行此操作的详细信息). diff --git a/docs/zh-cn/faq_debug.md b/docs/zh-cn/faq_debug.md new file mode 100644 index 000000000000..ca8b3fd25dc2 --- /dev/null +++ b/docs/zh-cn/faq_debug.md @@ -0,0 +1,233 @@ +# 调试的常见问题 + +本篇详细介绍了人们在键盘故障排除时的各种常见问题。 + +# 调试控制台 + +## `hid_listen` 无法识别设备 +当设备的调试控制台未就绪时,您将看到如下内容: + +``` +Waiting for device:......... +``` + +插入设备后,*hid_listen*找到该设备,您将收到以下消息: + +``` +Waiting for new device:......................... +Listening: +``` + +如果您无法获得这条“Listening:”消息,请尝试在[Makefile]中使用 `CONSOLE_ENABLE=yes` + +在Linux这样的操作系统上,你可能需要一些权限。 +- 使用`sudo hid_listen` + +## 控制台没有返回消息 +检查: +- *hid_listen* 找到了你的设备。看前面。 +- 输入**Magic**+d打开调试。详见[Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands)。 +- 设置`debug_enable=true` ,一般存在于**matrix.c**的`matrix_init()`中。 +- 尝试使用'print'函数而不要用调试输出。详见**common/print.h**。 +- 断开其他有控制台功能的设备。 详见[Issue #97](https://github.com/tmk/tmk_keyboard/issues/97)。 + +## Linux或UNIX这样的系统如何请求超级用户权限 +用'sudo'来执行*hid_listen*就有权限了。 +``` +$ sudo hid_listen +``` + +或者把一个文件放到规则文件夹来为TMK设备添加*udev规则*,不同系统的目录可能有所不同。 + +文件: /etc/udev/rules.d/52-tmk-keyboard.rules(在Ubuntu系统的情况下) +``` +# tmk keyboard products https://github.com/tmk/tmk_keyboard +SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666" +``` + +*** + +# 其他 +## 安全注意事项 + +你应该不想要把你的键盘变成"砖头"吧,就是变成没法重写固件的那种。 +下面讲解一些参数来告诉你什么风险很大(其实也不是很大)。 + +- 假如你键盘表面没有设计重置键"RESET", 那你要进入bootloader的话就要按PCB上的RESET了。 + 按PCB上的RESET要拧开键盘底部。 +- 如果 tmk_core / common 里面的文件丢失键盘可能失灵。 +- .hex太大可能不太好; `make dfu` 会删除块,检验大小(咦?好像反了...)。 + 一但出错,刷新键盘失败的话就困在DFU出不去了。 + - 所以, 要知道大小限制。 Planck键盘上.hex文件最大大小是 is 7000h (十进制是28672) + +``` +Linking: .build/planck_rev4_cbbrowne.elf [OK] +Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK] + +Size after: + text data bss dec hex filename + 0 22396 0 22396 577c planck_rev4_cbbrowne.hex +``` + + - 上面那个文件大小是 22396/577ch,比28672/7000h小 + - 当你有一个合适的.hex文件时,你就要重试加载那个了 + - 您在键盘Makefile中的某些选项可能消耗额外内存;注意以下这几个 + BOOTMAGIC_ENABLE, MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE +- DFU 工具/不/可以写入bootloader (unless you throw in extra fruit salad of options), + 所以还是有点危险的 +- EEPROM大概有100000次循环寿命。不要总是频繁重写固件;EEPROM会玩坏的。 +## 全键无冲不好用 +首先你要在**Makefile**用如下命令编译固件`NKRO_ENABLE`。 + +全键无冲还不好用的话试着用`Magic` **N** 命令(默认是`LShift+RShift+N`)。这个命令会在**全键无冲**和**六键无冲**之间临时切换。有些情况**全键无冲**不好用你就需要使用**六键无冲**模式,尤其是在BIOS中。 + +如果你的固件使用`BOOTMAGIC_ENABLE`编译的你要用`BootMagic` **N** 命令(默认`Space+N`)打开开关。这个设置保存在EEPROM中并保存在电源循环中。 + + +https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch + + +## 指点杆需要复位电路(PS/2 鼠标支持) +如果没有复位电路,由于硬件初始化不正确,您将得到不一致的结果。查看TPM754复位电路。 + +- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447 +- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf + + +## 矩阵不可读16以上的列 +当列超过16时[matrix.h]的`read_cols()`中,用`1UL<<16`而不要用`1<<16`。 + +在C语言中`1` 是一个[int] 类型的[16 bit]值,在AVR中你不能左移大于15次。如果你使用`1<<16`的话会得到意外的零。你要用 [unsigned long]类型,比如`1UL`。 + +http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279 + + +## Bootloader跳转不好用 +在**Makefile**中正确配置**Makefile**大小。如果分区大小不正确,引导加载程序可能无法从**Magic command**和**Boot Magic**加载。 +``` +# bootloader字节数: +# Atmel DFU loader(ATmega32U4) 4096 +# Atmel DFU loader(AT90USB128) 8192 +# LUFA bootloader(ATmega32U4) 4096 +# Arduino Caterina(ATmega32U4) 4096 +# USBaspLoader(ATmega***) 2048 +# Teensy halfKay(ATmega32U4) 512 +# Teensy++ halfKay(AT90USB128) 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 +``` +AVR引导大小是通过**BOOTSZ**熔丝位来设置的。查阅你单片机的datasheet。 +记住,datasheet用的是**Word**(2字节)表示大小和地址,TMK用的是**Byte**。 + +AVR引导部分位于闪存的末尾,如下所示(Application是应用区,Bootloader是引导区)。 +``` +byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286) +0x0000 +---------------+ 0x00000 +---------------+ + | | | | + | | | | + | Application | | Application | + | | | | + = = = = + | | 32KB-4KB | | 128KB-8KB +0x6000 +---------------+ 0x1E000 +---------------+ + | Bootloader | 4KB | Bootloader | 8KB +0x7FFF +---------------+ 0x1FFFF +---------------+ + + +byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286) +0x0000 +---------------+ 0x00000 +---------------+ + | | | | + | | | | + | Application | | Application | + | | | | + = = = = + | | 32KB-512B | | 128KB-2KB +0x7E00 +---------------+ 0x1FC00 +---------------+ + | Bootloader | 512B | Bootloader | 2KB +0x7FFF +---------------+ 0x1FFFF +---------------+ +``` + +详情请见下方issue。 +https://github.com/tmk/tmk_keyboard/issues/179 + +如果你使用TeensyUSB, 有一个[已知bug](https://github.com/qmk/qmk_firmware/issues/164)硬件重置按钮阻止软件定义重置键工作。重新插拔键盘就好了。 + +## 特殊额外键不起作用(系统,音频控制键) +你要在`rules.mk`定义`EXTRAKEY_ENABLE`在QMK中使用它们。 + +``` +EXTRAKEY_ENABLE = yes # 音频控制和系统控制 +``` + +## 睡眠唤醒不好用 + +在Windows查看设备管理器中该键盘设备属性中电源管理选项卡中的`允许此设备唤醒计算机(O)`是否勾选。同时看一眼BIOS设置。 + +在主机睡眠时按下任何键都可以唤醒了。 + +## 使用Arduino? + +**注意Arduino的针脚名字和主控芯片的不一样。** 比如, Arduino的`D0`并不是`PD0`。自己用原理图捋一下电路。 + +- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf +- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf + +Arduino Leonardo和micro使用**ATMega32U4**,该芯片TMK可用,但Arduino的bootloader会导致问题。 + + +## 在USB AVR使用PF4-7针脚? +你要置位MCUCR寄存器JTD位来将PF4-7设置为GPIO。这些针脚默认是JTAG功能。 像ATMega*U* or AT90USB*这样的MCU会受影响。 + +如果是用Teensy的话就不需要了。Tennsy自带JTAGEN位未编程来失能该功能。 + +代码如下。 +``` + // F接口JTAG失能。在四个周期内写入两次JTD位。 + MCUCR |= (1< +![键盘设计图](https://i.imgur.com/5wsh5wM.png) + +## 我有一些键变成了其他功能或者不工作了 + +QMK有两个功能,Bootmagic和命令行,它允许您在运行中更改键盘的行为。该功能包括但不仅限于, 交换Ctrl/Caps,关闭界面,交换Alt/Gui,交换 Backspace/Backslash,禁用所有键,以及其他的行为改变。 + +快速解决方法是插入键盘时按住`Space`+`Backspace`。该操作将重置已保存设置,让这些键回复初始功能。这招不好用的话参阅下方: + +* [Bootmagic](feature_bootmagic.md) +* [命令](feature_command.md) + +## 菜单键不好用 + +现在大多数键盘 `KC_RGUI`和`KC_RCTL`中间的键子叫做`KC_APP`。这是因为在这个键子发明之前相关标准里就已经有键叫做`MENU(菜单)`了,所以微软叫他`APP(应用)`键。 + +## `KC_SYSREQ` 不工作 +使用抓屏的键码(`KC_PSCREEN`或`KC_PSCR`)而不用`KC_SYSREQ`。组合键'Alt + Print Screen'会被当作'System request'。 + +见[issue #168](https://github.com/tmk/tmk_keyboard/issues/168)和 +* http://en.wikipedia.org/wiki/Magic_SysRq_key +* http://en.wikipedia.org/wiki/System_request + +## 电源键不工作 + +这有点让人困惑,QMK有两个"Power(电源)"键码: `KC_POWER` 在键盘/小键盘的HID使用页面中,`KC_SYSTEM_POWER` (或者叫`KC_PWR`)在用户页。 + +前者只能被macOS识别,但是后者,即`KC_SLEP`和`KC_WAKE`三大主要操作系统全都支持,所以推荐使用这两个。Windows下这些键立即生效,macOS要长按直到弹出对话框。 + +## 自动大小写锁定 +可以解决'the'问题(正常应为The)。我经常在输入'The'时不慎输入了'the'或者'THe'。自动大小写锁定可以修正此类问题。详见下方链接。 +https://github.com/tmk/tmk_keyboard/issues/67 + +## 修改 键/层 卡住 +除非正确配置层切换,否则修改键或层可能会卡住。 +对于修改键和图层操作,必须把`KC_TRANS`放到目标层的相同位置,用于注销修改键或在释放事件时返回到上一层。 +* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching +* http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 +* https://github.com/tmk/tmk_keyboard/issues/248 + + +## 机械自锁开关支持Mechanical Lock Switch Support + +本功能用于*机械自锁开关*比如[this Alps one](http://deskthority.net/wiki/Alps_SKCL_Lock)。你可以通过向`config.h`添加以下宏来使能该功能: + +``` +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE +``` + +在使能该功能后,要在键盘中使用`KC_LCAP`, `KC_LNUM` 和 `KC_LSCR`这三个键码。 + +远古机械键盘偶尔会有自锁机械开关,现在几乎没有了。***大多数情况下你不需要使用该功能,且要使用`KC_CAPS`, `KC_NLCK`和`KC_SLCK`这三个键码。*** + +## 输入ASCII之外的特殊字符比如Cédille 'Ç' +没有在所有系统中输入这个的通用方法。你要定义针对你的特定操作系统或布局的**宏**。 + +比如看这个**宏**代码的文章。 + +http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620 + +在**Windows**上,可以用`AltGr`键或**Alt码**。 +* http://en.wikipedia.org/wiki/AltGr_key +* https://zh.wikipedia.org/wiki/Alt%E7%A0%81 + +在**Mac OS**定义`Option`键组合。 +* https://zh.wikipedia.org/wiki/Option%E9%94%AE#%E6%9B%BF%E4%BB%A3%E9%94%AE%E7%9B%98%E8%BE%93%E5%85%A5 + +在**Xorg**可以改用`compose`键。 +* http://en.wikipedia.org/wiki/Compose_key + +下方链接查看**Unicode**输入。 +* http://en.wikipedia.org/wiki/Unicode_input + +## macOS上的`Fn` + +不像大多数FN键,苹果上那个有自己的键码...呃,基本上算吧。 他取缔了基本6键无冲HID报告的第六个键码 -- 所以苹果键盘其实是5键无冲的。 + +技术上说QMK可以发送这个键。但是,这样做需要修改报告格式以添加FN键的状态。这还不是最糟糕的,你的键盘的VID和PID和真的苹果键盘不一样的话还不会被识别。 +QMK官方支持这个会被律师函的,所以就当我没说过。 + +详见[issue#2179](https://github.com/qmk/qmk_firmware/issues/2179)。 + + +## Mac OSX的媒体控制键 +#### KC_MNXT 和 KC_MPRV 在Mac上不好用 +使用 `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) 和 `KC_MRWD`(`KC_MEDIA_REWIND`),不要用 `KC_MNXT` 和 `KC_MPRV`. +详见 https://github.com/tmk/tmk_keyboard/issues/195 + + +## Mac OSX中支持那些键? +你可以从此源码中获知在OSX中支持哪些键码 + +`usb_2_adb_keymap` 阵列映射 键盘/小键盘 页用于ADB扫描码(OSX内部键码). + +https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/Cosmo_USB2ADB.c + +`IOHIDConsumer::dispatchConsumerEvent`会处理用户页面用法。 + +https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/IOHIDConsumer.cpp + + +## Mac OSX中的JIS键 +岛国特别键比如`無変換(Muhenkan)`, `変換(Henkan)`, `ひらがな(hiragana)`OSX是不是别的。You can use **Seil** to enable those keys, try following options. + +* 在电脑键盘上使能NFER键 +* 在电脑键盘上使能XFER键 +* 在电脑键盘上使能KATAKAN键 + +https://pqrs.org/osx/karabiner/seil.html + + +## RN-42蓝牙模块与Karabiner不能有效协同工作 +Karabiner - Mac OSX的改键软件 - 默认RN-42模块是不会被响应的。想要Karabiner和你的键盘协同工作你要使能此选项: +https://github.com/tekezo/Karabiner/issues/403#issuecomment-102559237 + +此问题详见下方链接。 +https://github.com/tmk/tmk_keyboard/issues/213 +https://github.com/tekezo/Karabiner/issues/403 + + +## Esc 和 ` 双功能键 + +请见[Grave Escape](feature_grave_esc.md)功能。 + +## 右侧双角色修改键(诸如Shift、Alt等有修改其他键作用的键)变箭头键 +右侧修改键单击时会变为箭头键,长按就还是修改键。在TMK中双角色键称之为**TAP**. +``` + +#include "keymap_common.h" + + +/* 用TMK双角色键功能实现右侧修改键改箭头键 + * + * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role + * https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys + */ +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwerty */ + [0] = LAYOUT( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ + LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \ + FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3), + [1] = LAYOUT( \ + GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \ + TRNS,TRNS,TRNS, TRNS, TRNS,FN7, FN6, FN8), +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP), + [1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN), + [2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT), + [3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT), + [4] = ACTION_LAYER_MOMENTARY(1), + [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP), + [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN), + [7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME), + [8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END), +}; + +``` + +双角色键说明: https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys + + +## Mac OSX的弹出键 +`KC_EJCT` 键码在OSX可以使用 https://github.com/tmk/tmk_keyboard/issues/250 +似乎Windows10会忽略该键码,Linux/Xorg可以识别该键码但默认不映射。 + +目前尚不清楚如何在真正的苹果键盘按出弹出键。HHKB使用`F20`用于弹出键(`Fn+f`),该功能在MAC模式有效但不保证与苹果弹出键码相符。 + + +## `action_util.c`中的 `weak_mods`和`real_mods`是什么 +___待改善___ + +real_mods 用于保存实际(物理)修改键的实际状态。 +weak_mods 用于保存虚拟或临时修改键,它将不会影响实际修改键。 + +以按下左侧Shift键然后输入ACTION_MODS_KEY(LSHIFT, KC_A)为例, + +在weak_mods时, +* (1) 按下不抬起左Shift: real_mods |= MOD_BIT(LSHIFT) +* (2) 按 ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods |= MOD_BIT(LSHIFT) +* (3) 抬起 ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods &= ~MOD_BIT(LSHIFT) +real_mods 还是保持在修改状态。 + +在没有weak_mods时, +* (1) 按下不抬起左Shift: real_mods |= MOD_BIT(LSHIFT) +* (2) 按 ACTION_MODS_KEY(LSHIFT, KC_A): real_mods |= MOD_BIT(LSHIFT) +* (3) 抬起 ACTION_MODS_KEY(LSHIFT, KC_A): real_mods &= ~MOD_BIT(LSHIFT) +此时real_mods失去‘实际左Shift’的状态。 + +weak_mods和real_mods现已全部加入键盘数据包发送豪华套餐。 +https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57 diff --git a/docs/zh-cn/getting_started_getting_help.md b/docs/zh-cn/getting_started_getting_help.md new file mode 100644 index 000000000000..cf770a77081c --- /dev/null +++ b/docs/zh-cn/getting_started_getting_help.md @@ -0,0 +1,15 @@ +# 获得帮助 + +有很多方法来获得关于QMK的帮助. + +## 实时聊天 + +你可以在我们的主要[Discord服务器](https://discord.gg/Uq7gcHh)找到QMK的开发者和用户。有很多讨论固件的不同频道, 工具箱(Toolbox), 硬件,配置工具(configurator). + +## OLKB Subreddit + +QMK的官方论坛是[/r/olkb](https://reddit.com/r/olkb) 在[reddit.com](https://reddit.com)上. + +## Github的Issue + +你可以在GitHub上 [提出issue](https://github.com/qmk/qmk_firmware/issues).当您的问题需要长期讨论或调试时,这尤其方便。 diff --git a/docs/zh-cn/getting_started_github.md b/docs/zh-cn/getting_started_github.md new file mode 100644 index 000000000000..0400eea6435b --- /dev/null +++ b/docs/zh-cn/getting_started_github.md @@ -0,0 +1,59 @@ +# 如何在QMK中使用Github + +Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK. + +?> 本教程假设您已安装GitHub,并且您喜欢使用命令行工作。 + +首先 [Github上的QMK页面](https://github.com/qmk/qmk_firmware), 您能看到右上方有个按钮写着"Fork": + +![从Github上分叉](http://i.imgur.com/8Toomz4.jpg) + +如果你是某组织成员,你将需要选择分叉到哪个账户。一般情况下, 你是想要分叉到你的私人账户下。当你完成分叉 (有时需要等一会), 点击"Clone or Download" 按钮: + +!从Github下载](http://i.imgur.com/N1NYcSz.jpg) + +你要选择 "HTTPS", 然后选择链接复制: + +![HTTPS链接](http://i.imgur.com/eGO0ohO.jpg) + +然后,在命令行输入`git clone `,然后粘贴你的链接: + +``` +user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git +Cloning into 'qmk_firmware'... +remote: Counting objects: 46625, done. +remote: Compressing objects: 100% (2/2), done. +remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623 +Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done. +Resolving deltas: 100% (29362/29362), done. +Checking out files: 100% (2799/2799), done. +``` + +现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样: + +``` +user@computer:~$ git add . +user@computer:~$ git commit -m "adding my keymap" +[master cccb1608] adding my keymap + 1 file changed, 1 insertion(+) + create mode 100644 keyboards/planck/keymaps/mine/keymap.c +user@computer:~$ git push +Counting objects: 1, done. +Delta compression using up to 4 threads. +Compressing objects: 100% (1/1), done. +Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done. +Total 1 (delta 1), reused 0 (delta 0) +remote: Resolving deltas: 100% (1/1), completed with 1 local objects. +To https://github.com/whoeveryouare/qmk_firmware.git + + 20043e64...7da94ac5 master -> master +``` + +现在你的改动已经在你Github上的分支中了 - 如果你回到这 (`https://github.com/你的GitHub账户名/qmk_firmware`) ,你可以点击下方所示按钮创建 "New Pull Request": + +![新的 Pull Request](http://i.imgur.com/DxMHpJ8.jpg) + +现在你可以看到你所做的一切 - 如果看起来不错, 就可以点击 "Create Pull Request"定稿了: + +![创建Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +提交后,我们会开跟你说你的改动,要求您进行更改, 并最终接受您的更改!感谢您为QMK做的贡献 :) diff --git a/docs/zh-cn/getting_started_introduction.md b/docs/zh-cn/getting_started_introduction.md new file mode 100644 index 000000000000..dcd0b72a5641 --- /dev/null +++ b/docs/zh-cn/getting_started_introduction.md @@ -0,0 +1,54 @@ +# 介绍 + +本页解释了使用QMK项目所需的基本信息。它假定您能熟练使用Unix shell,但您不熟悉C语言也不熟悉使用make编译。 + +## 基本QMK结构 + +QMK是[Jun Wako](https://github.com/tmk)的[tmk_keyboard](https://github.com/tmk/tmk_keyboard)工程的一个分叉。经过更改的TMK原始代码放在`tmk` 文件夹中。 QMK增加的新东西可以在 `quantum` 文件夹中找到。 键盘项目可以在 `handwired`(手动飞线) 和 `keyboard`(PCB键盘)这两个文件夹找到。 + +### 用户空间结构 + +在`users`文件夹里面的目录是每个用户的目录。这个文件夹里面放的是用户们在不同键盘都能用到的代码。详见[用户空间特性](feature_userspace.md) + +### 键盘项目结构 + +在`keyboards`文件夹和他的子文件夹`handwired`中就是各个键盘的项目了,比如`qmk_firmware/keyboards/clueboard`。内部结构与如下: + +* `keymaps/`: 可以构建的不同布局 +* `rules.mk`: 用来设置 "make" 命令默认选项的文件。别直接编辑这个文件,你应该使用具体某个布局的 `rules.mk`. +* `config.h`: 用于设置默认编译选项的文件。别直接编辑这个文件, 你应该使用具体某个布局的 `config.h`. + +### 布局结构 + +在各个布局的文件夹,你能找到以下文件。只有 `keymap.c` 是必要的, 如果其他文件找不到就会直接选择默认选项。 + +* `config.h`: 配置布局的选项 +* `keymap.c`: 布局的全部代码, 必要文件 +* `rules.mk`: 使能的QMK特性 +* `readme.md`:介绍你的布局,告诉别人怎么使用,附上功能说明。请将图片上传到imgur等图床(译者注:imgur可能已被墙,为了方便国人访问,建议使用国内可以直接访问的图床)。 + +# `config.h` 文件 + +有三个重要的`config.h` 位置: + +* 键盘 (`/keyboards//config.h`) +* 用户空间 (`/users//config.h`) +* 布局 (`/keyboards//keymaps//config.h`) + +构建系统按照上述顺序自动获取配置文件。如果要覆盖由上一个 `config.h` 所做的设置,您需要首先为要更改的设置包含一些样板代码。 + +``` +#pragma once +``` + +要覆盖上一个 `config.h` 所做的设置,你要先 `#undef` 然后再 `#define` 这个设置. + +样板代码和设置看起来像这样: + +``` +#pragma once + +// 像下面那样覆盖设置(MY_SETTING指的是你要覆盖的设置项)! +#undef MY_SETTING +#define MY_SETTING 4 +``` diff --git a/docs/zh-cn/newbs.md b/docs/zh-cn/newbs.md new file mode 100644 index 000000000000..8c36b0d24b07 --- /dev/null +++ b/docs/zh-cn/newbs.md @@ -0,0 +1,23 @@ +# QMK菜鸟教程 + +QMK是为你机械硬盘设计的的一个强大的开源固件。使用QMK可以很简单的让你的定制键盘变得强大。看完这篇文章,无论你是菜鸟还是大佬,都可以顺利的使用QMK来定制键盘。 + +你是否为不知道你的键盘能不能运行QMK而苦恼? 如果你的机械键盘是你自己做的,那么这把键盘一般可以运行QMK。我们提供了[一大堆自制键盘](http://qmk.fm/keyboards/), 所以即便你的键盘不能运行QMK你也很容易能找到满足你需求的键盘。 + +## 概览 + +这个教程有7个主要部分: + +* [新手上路](newbs_getting_started.md) +* [用命令行构建你的第一个固件](newbs_building_firmware.md) +* [用在线界面构建你的第一个固件](newbs_building_firmware_configurator.md) +* [刷新固件](newbs_flashing.md) +* [测试和调试](newbs_testing_debugging.md) +* [Git最佳实践](newbs_best_practices.md) +* [其他学习资源](newbs_learn_more_resources.md) + +这份教程旨在帮助没有固件构建经验的人,也是根据该目的做出选择和建议。这些程序有很多替代方法,大部分替代我们都支持。如果你对完成一个任务有疑问,可以[向我们寻求帮助](getting_started_getting_help.md). + +## 其他资源 + +* [Thomas Baart的 QMK基础博客](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – 这是一个用户创建的博客,涵盖了为新手准备的使用QMK的基础知识。 diff --git a/docs/zh-cn/newbs_best_practices.md b/docs/zh-cn/newbs_best_practices.md new file mode 100644 index 000000000000..fa58dc75e870 --- /dev/null +++ b/docs/zh-cn/newbs_best_practices.md @@ -0,0 +1,163 @@ +# 最佳实践 + +## 或者说, "我应如何学会不再担心并开始爱上Git。" + +本文档旨在指导新手以最佳方式获得为QMK做出贡献的丝滑体验。我们将介绍为QMK做出贡献的过程,详细介绍使这项任务更容易的一些方法,然后我们将制造一些问题,来教你如何解决它们。 + +本文假设了一些内容: + +1. 一有个GitHub账户, 并[创建qmk_firmware仓库分叉](getting_started_github.md)到你的帐户. +2. 你已经[建立你的构建环境](newbs_getting_started.md?id=environment-setup). + + +## 你分叉的主分支: 一直在上传,但不要提交 + +十分推荐您在QMK开发过程中无论开发是否完成都要保持你的 `master` 分支更新,但是 ***一定不要*** 提交。相反,你应该在一个开发分叉中做出你所有修改并在开发时提交pull request。 + +减少合并冲突的可能性 — 两个或多个用户同时编辑文件的同一部分的实例 — 保持 `master` 分支最新,并创建一个新的分支来开始新的开发。 + +### 更新你的主分支 + +保持你的 `master` 更新, 推荐你添加QMK Firmware仓库作为Git的远程仓库,想这么做的话, 你可以打开你的Git命令行接口然后输入: + +``` +git remote add upstream https://github.com/qmk/qmk_firmware.git +``` + +运行 `git remote -v`, 来确定这个仓库已经添加,以下是回显: + +``` +$ git remote -v +origin https://github.com//qmk_firmware.git (fetch) +origin https://github.com//qmk_firmware.git (push) +upstream https://github.com/qmk/qmk_firmware.git (fetch) +upstream https://github.com/qmk/qmk_firmware.git (push) +``` + +现在添加已完成,你可以用`git fetch upstream`来检查仓库的更新. 这会检索branches 和 tags — 统称为"refs" — 从QMK仓库, 也就是 `upstream`。我们可以比较我们的分叉和QMK的 `origin` 数据的不同。 + +要更新你的分叉的主分支,请运行以下命令,在每行之后按Enter键: + +``` +git checkout master +git fetch upstream +git pull upstream master +git push origin master +``` + +这回切换到你的`master` 分支, 检索你QMK仓库的refs, 下载当前QMK `master` 分支到你的电脑, 并上传到你的分叉. + +### 做改动 + +你可以输入以下命令来创建一个新的分支来做改动: + +``` +git checkout -b dev_branch +git push --set-upstream origin dev_branch +``` + +这回建立一个叫做 `dev_branch`的新分支, 检查一下, 然后想你的分叉保存分支. 使用 `--set-upstream` 参数来告诉git使用你的分叉并且当每次你对你的分支用`git push` 或 `git pull`时要使用`dev_branch`。 它仅需要在第一次push的时候使用;然后你就可以很安全的用 `git push` 或 `git pull`, 并不需要其他参数了。 + +!> 使用 `git push`, 你可以用 `-u` 来代替 `--set-upstream` — `-u`是`--set-upstream`的简写。 + +您可以将您的分支命名为您想要的任何名称,但建议将其命名为与您要进行的更改相关的内容。 + +默认情况下 `git checkout -b` 在已经检出的分支上建立新的分支。您可以将新的分支建立在未检出的现有分支的基础上,方法是将现有分支的名称添加到命令: + +``` +git checkout -b dev_branch master +``` + +现在您已经有了一个开发分支,那么就打开您的文本编辑器并进行您需要做的任何更改。建议对您的分支进行许多小的提交;这样,任何引起问题的更改都可以在需要时更容易地跟踪和撤消。要进行更改,编辑并保存任何需要更新的文件,请将它们添加到Git的 *staging area* ,然后将它们提交到您的分支: + +``` +git add path/to/updated_file +git commit -m "My commit message." +``` + +` git add`添加已更改到Git的*临时区域*也就是Git的“加载区域”的文件。其中包含使用 `git commit` 命令 *提交* 的并已经保存到仓库的更改。建议您使用描述性的提交消息,这样您就可以一目了然地知道更改了什么。 + +!> 如果你修改了很多文件,但所有的文件都是同一个更改的一部分,你可以用 `git add .` 来添加当前目录中所有已更改的文件而不是单独添加每个文件. + +### 发布更改 + +最后一步是将更改推送到您的分叉。 输入 `git push`来推送. 现在Git将`dev_branch`的当前状态发布到您的分叉。 + + +## 解决合并冲突 + +有时,当您在某个分支中的工作需要很长时间才能完成时,其他人所做的更改与您在打开pull request时对该分支所做的更改相冲突。这称为*rebase* 即合并冲突,当多个人编辑同一文件的同一部分时会发生这种情况。 + +### 重新调整您的更改 + +*rebase*是Git的一种方法,它获取在某一点上应用的更改,撤销它们,然后将相同的更改应用到另一点。在合并冲突的情况下,您可以重新设置您的分支以获取在创建分支时和当前时间之间的那段时间所做的更改。 + +运行以下命令来开始: + +``` +git fetch upstream +git rev-list --left-right --count HEAD...upstream/master +``` + + 这里的`git rev-list` 命令返回当前分支和qmk的主分支之间不同的提交数。我们首先运行`git fetch`,以确保我们有代表upstream仓库的refs。 `git rev-list` 命令的回显有两个数字: + +``` +$ git rev-list --left-right --count HEAD...upstream/master +7 35 +``` + +第一个数字表示自创建以来当前分支的提交数, 第二个数字是自创建当前分支以来对 `upstream/master` 进行的提交数, 因此, 当前分支中未记录变动。 + +既然知道当前分支和upstream仓库的当前状态,我们可以开始一个rebase操作: + +``` +git rebase upstream/master +``` + +这就是让Git撤销当前分支上的提交,然后根据QMK的主分支重新应用它们。 + +``` +$ git rebase upstream/master +First, rewinding head to replay your work on top of it... +Applying: Commit #1 +Using index info to reconstruct a base tree... +M conflicting_file_1.txt +Falling back to patching base and 3-way merge... +Auto-merging conflicting_file_1.txt +CONFLICT (content): Merge conflict in conflicting_file_1.txt +error: Failed to merge in the changes. +hint: Use 'git am --show-current-patch' to see the failed patch +Patch failed at 0001 Commit #1 + +Resolve all conflicts manually, mark them as resolved with +"git add/rm ", then run "git rebase --continue". +You can instead skip this commit: run "git rebase --skip". +To abort and get back to the state before "git rebase", run "git rebase --abort". +``` + +这告诉我们有一个合并冲突,并给出带有冲突的文件的名称。在文本编辑器中打开冲突的文件,在该文件的某个位置,您会发现如下内容: + +``` +<<<<<<< HEAD +

For help with any issues, email us at support@webhost.us.

+======= +

Need help? Email support@webhost.us.

+>>>>>>> Commit #1 +``` + + `<<<<<<< HEAD`行标记合并冲突的开始, `>>>>>>> Commit #1` 行标记结束, 冲突选项被 `=======`分隔。`HEAD`那端的部分来自文件的qmk master版本,标记有commit消息的部分来自当前的分支持和提交。 + +因为Git跟踪 *对文件的更改* 而不是直接跟踪文件的内容,所以如果Git在提交之前找不到文件中的文本,它将不知道如何编辑该文件。重新编辑文件将解决冲突。进行更改,然后保存文件。 + +``` +

Need help? Email support@webhost.us.

+``` + +现在运行: + +``` +git add conflicting_file_1.txt +git rebase --continue +``` + +Git记录对冲突文件的更改,并继续应用来自我们的分支的提交,直到它到达末尾。 diff --git a/docs/zh-cn/newbs_building_firmware.md b/docs/zh-cn/newbs_building_firmware.md new file mode 100644 index 000000000000..31093f2543be --- /dev/null +++ b/docs/zh-cn/newbs_building_firmware.md @@ -0,0 +1,81 @@ +# 构建第一个固件 + +现在您已经建立了构建环境,就可以开始构建自定义固件了。对于本指南的这一部分,我们将在3个程序之间切换——文件管理器、文本编辑器和终端窗口。请保持所有3个程序打开,直到您完成并对键盘固件满意。 + +如果您在按照指南第一部分的操作之后关闭并重新打开了终端窗口,请不要忘记输入“cd qmk_firmware”,来使您的终端位于正确的目录。 + +## 导航到您的keymaps文件夹 + +首先导航到键盘的 `keymaps` 文件夹. + +?> 如果您使用的是MacOS或Windows,可以使用以下命令轻松地打开keymaps文件夹。 + +?> macOS: + + open keyboards//keymaps + +?> Windows: + + start .\\keyboards\\\\keymaps + +## 创建`default` 布局副本 + +打开`keymaps`文件夹后,您将需要创建`default`文件夹的副本。我们强烈建议您将文件夹命名为与Github用户名相同的名称,但您也可以使用任何您想使用的名称,只要它只包含小写字母、数字和下划线字符。 + +要自动执行此过程,您还可以选择运行`new_keymap.sh`脚本。 + +导航到`qmk_firmware/util` 目录然后输入以下命令: + +``` +./new_keymap.sh +``` + +例如,一个名字叫ymzcdg的用户要创建1up60hse的布局,他需要输入 + +``` +./new_keymap.sh 1upkeyboards/1up60hse ymzcdg +``` + +## 在你最钟爱的文本编辑器中打开`keymap.c` + +打开你的`keymap.c`. 在这个文件中,您可以找到控制键盘行为的结构。 在你的`keymap.c` 的顶部有一些让布局更易读的define和enum。在靠下的位置你会找到一行和下面这句很像的: + + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +从这一行开始便是层列表。这行下面你会看到包括 `LAYOUT` 或 `KEYMAP`这两个词的几行, 从这些行开始就是层。在这一行下面是组成该特定层的键的列表。 + +!> 编辑您的keymap文件时,注意不要添加或删除任何逗号。如果这样做,您将阻止您的固件编译,并且您可能不容易找出多余的或缺少的逗号在哪里。 + +## 根据您的喜好自定义布局 + +如何完成这一步骤完全取决于您。改变一直困扰着你的问题,或者完全重做所有的事情。如果您不需要全部图层,可以删除图层,或者将图层总数增加到32个。查看以下文档,了解可以在此处定义的内容: + +* [键码](keycodes.md) +* [特性](features.md) +* [问题与解答](faq.md) + +?> 当你明白布局是怎么工作时,您也要让每次改变尽可能小。一次改变很大在调试时找出问题会十分困难。 + +## 构建你的固件 + +完成对布局的更改后,您就要构建固件了。为此,请返回终端窗口并运行build命令: + + make : + +例如,如果您的keymap名为“xyverz”,并且您正在为rev5 planck构建一个keymap,那么您将使用此命令: + + make planck/rev5:xyverz + +在编译过程中,你将看到屏幕上有很多输出,通知您正在编译哪些文件他应该以与下文类似的输出结束: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex [OK] + * File size is fine - 18392/28672 +``` + +## 刷新你的固件 + +请移步 [Flashing Firmware](newbs_flashing.md) 来继续。 diff --git a/docs/zh-cn/newbs_flashing.md b/docs/zh-cn/newbs_flashing.md new file mode 100644 index 000000000000..05a9eb55eef7 --- /dev/null +++ b/docs/zh-cn/newbs_flashing.md @@ -0,0 +1,307 @@ +# 刷新你的键盘 + +现在您已经构建了一个自定义固件文件,那么您就需要刷新键盘了。 + +## 用QMK工具箱刷新键盘 + +刷新键盘的最简单方法是使用[QMK 工具箱](https://github.com/qmk/qmk_toolbox/releases). + +但是,QMK工具箱目前仅适用于Windows和MacOS。如果您使用的是Linux(或者只是希望从命令行刷新固件),则必须使用 [方法概述](newbs_flashing.md#flash-your-keyboard-from-the-command-line). + +### 将文件加载到QMK工具箱中 + +首先打开QMK工具箱应用程序。您将要在访达或资源管理器中找到固件文件。您的键盘固件可能是两种格式之一`.hex`或`.bin`。qmk会尝试将键盘的相应文件复制到“qmk_firmware”根目录中。 + +?> 如果您在Windows或MacOS上,可以使用以下命令轻松地在资源管理器或访达中打开当前固件文件夹。 + +?> Windows: + + start . + +?> macOS: + + open . + +固件文件始终遵循此命名格式: + + _.{bin,hex} + +例如,使用 `default` 布局的 `plank/rev5` 将使用以下名字: + + planck_rev5_default.hex + +找到固件文件后,将其拖到QMK工具箱中的“Local file”框中,或单击“Open”并导航到固件文件的存储位置。 + +### 将键盘置于DFU(Bootloader)模式 + +要刷新自定义固件,您必须将键盘置于特殊的刷新模式。在此模式下,您将无法键入或使用键盘。在写入固件时,不要拔下键盘插头或以其他方式中断刷新过程,这一点非常重要。 + +不同的键盘有不同的方式进入这种特殊模式。如果您的键盘当前运行的是QMK或TMK,而您没有得到特定的指示,请按顺序尝试以下操作: + +* 按住两个shift键并按 `Pause` +* 按住两个shift键并按 `B` +* 拔下键盘插头, 同时按住空格键和 `B` , 插上键盘然后等一会再放开按键 +* 按下PCB底部的 `RESET` 物理键 +* 找到PCB上标记有 `BOOT0` 或 `RESET`的金属点, 在插入PCB的同时短接它们 + +成功后,您将在QMK工具箱中看到类似以下内容的消息: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +``` + +### 刷新你的键盘 + +单击QMK工具箱中的 `Flash` 按钮。您将看到类似以下内容的输出: + +``` +*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390 +*** DFU device connected +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset + +*** DFU device disconnected +*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390 +``` + +## 使用命令行刷新键盘 + +首先,您需要知道您的键盘使用的是哪个bootloader。通常是以下四个常见的bootloader。Pro-Micro 和 clones 使用 CATERINA, Teensy 使用 Halfkay, OLKB 键盘使用 QMK-DFU, 其他的atmega32u4芯片使用DFU。 + +您可以在以下文章中了解更多关于bootloader[刷新指令和Bootloader信息](flashing.md)。 + +如果您知道正在使用的bootloader是哪种,那么在编译固件时,可以向“make”命令里添加一些额外参数,以自动执行刷新过程。 + +### DFU + +对于DFU引导加载程序,当您准备好编译和刷新固件时,打开终端窗口并运行构建命令: + + make ::dfu + +例如,如果您的布局名为“xyverz”,并且您正在为rev5 planck构建一个布局,那么您可以使用此命令: + + make planck/rev5:xyverz:dfu + +编译完成后,应输出以下内容: + +``` +Linking: .build/planck_rev5_xyverz.elf [OK] +Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK] +Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK] +Checking file size of planck_rev5_xyverz.hex + * File size is fine - 18574/28672 + ``` + +到了这个时候, 构建脚本将每隔5秒查找一次DFU。它将重复以下操作,直到找到设备或将其取消。 + + dfu-programmer: no device present. + Error: Bootloader not found. Trying again in 5s. + +一旦出现以上回显,您将需要重置控制器。然后,它应该显示与以下类似的输出: + +``` +*** Attempting to flash, please don't remove device +>>> dfu-programmer atmega32u4 erase --force + Erasing flash... Success + Checking memory from 0x0 to 0x6FFF... Empty. +>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex + Checking memory from 0x0 to 0x55FF... Empty. + 0% 100% Programming 0x5600 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + 0% 100% Reading 0x7000 bytes... + [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success + Validating... Success + 0x5600 bytes written into 0x7000 bytes memory (76.79%). +>>> dfu-programmer atmega32u4 reset +``` + +如果您对此有任何问题,您可能需要这样做: + + sudo make ::dfu + +#### DFU命令 + +有许多DFU命令可用于将固件下载到DFU设备: + +* `:dfu` - 这是正常选项,等待DFU设备可用,然后刷新固件。这将每隔5秒检查一次,以查看是否出现了DFU设备。 +* `:dfu-ee` - 这将刷新一个`eep`文件,而不是普通的十六进制文件。这很不常见。 +* `:dfu-split-left` - 这将刷新正常固件,就像默认选项 (`:dfu`)一样. 但是,这也会刷新“左侧”EEPROM文件,用于分割键盘。 _这是基于Elite C的键盘的推荐选择。_ +* `:dfu-split-right` - 这将刷新正常固件,就像默认选项(`:dfu`). 但是,这也会刷新“右侧”EEPROM文件,用于分割键盘。 _这是基于Elite C的键盘的推荐选择。_ + + +### Caterina + +对于Arduino板以及其克隆版来说(比如SparkFun和ProMicro), 准备好编译和刷新固件后,打开终端窗口并运行构建命令: + + make ::avrdude + +比如, 你的布局叫"xyverz"你要创建一个rev2 Lets Split的布局,你要用以下命令: + + make lets_split/rev2:xyverz:avrdude + +固件完成编译后,它将输出类似以下的内容: + +``` +Linking: .build/lets_split_rev2_xyverz.elf [OK] +Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK] +Checking file size of lets_split_rev2_xyverz.hex [OK] + * File size is fine - 27938/28672 +Detecting USB port, reset your controller now.............. +``` + +此时,复位,然后脚本将检测bootloader,然后刷新固件。输出应该像这样: + +``` +Detected controller on USB port at /dev/ttyS15 + +Connecting to programmer: . +Found programmer: Id = "CATERIN"; type = S + Software Version = 1.0; No Hardware Version given. +Programmer supports auto addr increment. +Programmer supports buffered memory access with buffersize=128 bytes. + +Programmer supports the following devices: + Device code: 0x44 + +avrdude.exe: AVR device initialized and ready to accept instructions + +Reading | ################################################## | 100% 0.00s + +avrdude.exe: Device signature = 0x1e9587 (probably m32u4) +avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed + To disable this feature, specify the -D option. +avrdude.exe: erasing chip +avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex" +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: writing flash (27938 bytes): + +Writing | ################################################## | 100% 2.40s + +avrdude.exe: 27938 bytes of flash written +avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex: +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex +avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes +avrdude.exe: reading on-chip flash data: + +Reading | ################################################## | 100% 0.43s + +avrdude.exe: verifying ... +avrdude.exe: 27938 bytes of flash verified + +avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF) + +avrdude.exe done. Thank you. +``` +如果您对此有任何问题,您可能需要这样做: + + sudo make ::avrdude + + +此外,如果要刷新多个板,请使用以下命令: + + make ::avrdude-loop + +当你完成了刷新后,你需要按下ctrl+c或者其他正确的按键来让你的操作系统终止循环。 + + +## HalfKay + +对于PJRC设备(Teensy),当您准备好编译和刷新固件时,打开终端窗口并运行构建命令: + + make ::teensy + +比如, 如果你的布局叫做"xyverz"你想创建Ergodox or Ergodox EZ的布局,你要使用以下命令: + + make erdogox_ez:xyverz:teensy + +固件完成编译后,它将输出如下内容: + +``` +Linking: .build/ergodox_ez_xyverz.elf [OK] +Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK] +Checking file size of ergodox_ez_xyverz.hex [OK] + * File size is fine - 25584/32256 + Teensy Loader, Command Line, Version 2.1 +Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage +Waiting for Teensy device... + (hint: press the reset button) + ``` + +此时,复位键盘。完成后,您将看到如下输出: + + ``` + Found HalfKay Bootloader +Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage +Programming............................................................................................................................................................................ +................................................... +Booting +``` + +## STM32 (ARM) + +对于大多数ARM板(包括Proton C、Planck Rev 6和Preonic Rev 3),当您准备好编译和刷新固件时,打开终端窗口并运行构建命令: + + make ::dfu-util + +例如,如果您的keymap被命名为“xyverz”,并且您正在为Planck Revision 6键盘构建一个布局,那么您需要使用以下命令,然后将键盘重新启动到bootloader(在完成编译之前): + + make planck/rev6:xyverz:dfu-util + +固件完成编译后,它将输出如下内容: + +``` +Linking: .build/planck_rev6_xyverz.elf [OK] +Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK] +Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK] + +Size after: + text data bss dec hex filename + 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex + +Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK] +dfu-util 0.9 + +Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. +Copyright 2010-2016 Tormod Volden and Stefan Schmidt +This program is Free Software and has ABSOLUTELY NO WARRANTY +Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + +Invalid DFU suffix signature +A valid DFU suffix will be required in a future dfu-util release!!! +Opening DFU capable USB device... +ID 0483:df11 +Run-time device DFU version 011a +Claiming USB DFU Interface... +Setting Alternate Setting #0 ... +Determining device status: state = dfuERROR, status = 10 +dfuERROR, clearing status +Determining device status: state = dfuIDLE, status = 0 +dfuIDLE, continuing +DFU mode device DFU version 011a +Device returned transfer size 2048 +DfuSe interface name: "Internal Flash " +Downloading to address = 0x08000000, size = 41824 +Download [=========================] 100% 41824 bytes +Download done. +File downloaded successfully +Transitioning to dfuMANIFEST state +``` + +## 试一试吧! + +恭喜您! 您的自定义固件已经刷写到您的键盘 + +试一试,确保一切按你想的方式进行。我们写了[测试和调试](newbs_testing_debugging.md)来完善新手引导。 因此,请前往那里了解如何排除自定义功能的故障。 diff --git a/docs/zh-cn/newbs_getting_started.md b/docs/zh-cn/newbs_getting_started.md new file mode 100644 index 000000000000..4e7850201d1f --- /dev/null +++ b/docs/zh-cn/newbs_getting_started.md @@ -0,0 +1,102 @@ +# 介绍 + +你的电脑键盘里面包含一个处理器, 这个处理器和你电脑里面的不太一样。这个处理器负责运行一些特殊的软件,这些软件可以监测按钮按下并将按钮处于按下还是释放状态的数据发送出去。QMK就是这样一种软件,即监测按钮被按下并发送这样的信息到作为主机的计算机上。当你创建了你的布局, 你也就创建了你的键盘运行的的可执行程序。 + +QMK试图通过使简单的事情变得更简单,使使不可能成为可能来把大量的权力交给你。你不需要懂如何通过程序创建强大的布局——你只需要遵循简单的语法规则。 + +# 新手上路 + +在你能创建布局前,你要安装一些软件来建立你的开发环境。无论你想编译多少固件,这个操作都只需要进行一次。 + +如果您更喜欢图形化界面, 请考虑使用在线工具[QMK配置器](https://config.qmk.fm)。 请参考 [使用在线GUI构建您的第一个固件](newbs_building_firmware_configurator.md)。 + + +## 下载软件 + +### 文本编辑器 + +你需要一个可以编辑 **纯文本** 文件的程序。在Windows上你可以用Notepad, 在Linux上使用gedit,这两个都是简单又实用的文本编辑工具。 在macOS上, 请小心使用 “文本编辑” 这个默认软件: 如果你不明确的选择_格式_菜单中的 _制作纯文本_ 的话文本将不会被保存为纯文本。 + +你也可以下载并安装一个专用编辑器 [Sublime Text](https://www.sublimetext.com/) 或 [VS Code](https://code.visualstudio.com/)。 这大概是跨平台的最好方法了, 这些编辑器是专门为了编辑代码设计的。 + +?>搞不清用哪种编辑器? Laurence Bradford 写了篇关于编辑器选择的文章 [a great introduction](https://learntocodewith.me/programming/basics/text-editors/)。 + +### QMK 工具箱 + +QMK 工具箱 是一种可选的Windows和macOS下的图形化工具,它可以对你的定制键盘进行编程和调试。你可能会发现它就是你能简单的刷新你的键盘固件并查看调试信息的稀世珍宝。 + +[在这里下载最新发布版本](https://github.com/qmk/qmk_toolbox/releases/latest) + +* Windows用户: `qmk_toolbox.exe` (绿色版) 或 `qmk_toolbox_install.exe` (安装版) +* macOS用户: `QMK.Toolbox.app.zip` (绿色版) or `QMK.Toolbox.pkg` (安装版) + +## 建立你的环境 + +我们为了使QMK环境变得更容易建立已竭尽所能。你只需要准备Linux 或 Unix 环境, 然后让QMK安装剩余部分。 + +?> 如果你从未使用过Linux/Unix的命令行,有一些你需要学习的基础概念和命令,以下资料将教会您使用QMK环境的必要能力:
+[必会Linux命令](https://www.guru99.com/must-know-linux-commands.html)
+[一些基本的Unix命令](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) + +### Windows + +你需要安装MSYS2和Git. + +* 按照以下安装说明进行操作[MSYS2 主页](http://www.msys2.org)。 +* 关闭所有打开的MSYS2终端并打开新的MSYS2 MinGW 64-bit终端。 +* 使用以下命令安装Git: `pacman -S git`。 + +### macOS + +你需要安装Homebrew。按照以下说明进行操作 [Homebrew 主页](https://brew.sh)。 + +在Homebrew安装完成后, 继续 _同步QMK工程_. 这一步你将会通过运行一个脚本安装其他包。 + +### Linux + +你将需要安装Git.你很有可能已经安装,但若你尚未安装,可以使用以下命令进行安装: + +* Debian / Ubuntu / Devuan: `apt-get install git` +* Fedora / Red Hat / CentOS: `yum install git` +* Arch: `pacman -S git` + +?> 无论你使用哪种平台,Docker都可以是你的选择[点这里进一步了解](getting_started_build_tools.md#docker) + +## 同步QMK工程 + +当你建立Linux/Unix环境后,你就已经可以下载QMK了.下载时我们可以用Git来 "clone" QMK仓库. 打开一个终端或MSYS2 MinGW 窗口,在阅读剩余的指南时请保持窗口打开。在窗口里面运行以下两句命令: + +```shell +git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git +cd qmk_firmware +``` + +?> 如果您已经知道[如何使用GitHub](getting_started_github.md), 我们推荐您创建您自己的分支并克隆。 如果您不知道这是什么, 您完全可以忽略这句无关紧要的话。 + +QMK附带一个脚本,可帮助您设置剩余的所需内容.您可以通过输入此命令来运行它: + + util/qmk_install.sh + +## 测试你的开发环境 + +现在你的QMK环境已经建立完毕, 你可以为你的键盘创建固件了。开始试着创建键盘的默认固件吧。 你需要使用以下格式的命令创建固件: + + make :default + +比如, 制作一个Clueboard 66%的固件,需要用: + + make clueboard/66/rev3:default + +当完成后你要看到一些回显,尾部如下: + +``` +Linking: .build/clueboard_66_rev3_default.elf [OK] +Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] +Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] +Checking file size of clueboard_66_rev3_default.hex [OK] + * The firmware size is fine - 26356/28672 (2316 bytes free) +``` + +# 创建你的布局 + +现在你可以创建属于你自己的布局了! 请移步 [构建你的第一个固件](newbs_building_firmware.md)来继续。 diff --git a/docs/zh-cn/newbs_learn_more_resources.md b/docs/zh-cn/newbs_learn_more_resources.md new file mode 100644 index 000000000000..ccb4fa326c45 --- /dev/null +++ b/docs/zh-cn/newbs_learn_more_resources.md @@ -0,0 +1,15 @@ +# 学习资源 + +这些资源旨在让QMK社区的新成员更了解新成员文档中提供的信息。 + +Git 资源: + +* [很好的通用教程](https://www.codecademy.com/learn/learn-git) +* [从例子中学习Git游戏](https://learngitbranching.js.org/) +* [了解有关GitHub的更多信息的Git资源](getting_started_github.md) +* [专门针对QMK的Git资源](contributing.md) + + +命令行资源: + +* [超棒的命令行通用教程](https://www.codecademy.com/learn/learn-the-command-line) diff --git a/docs/zh-cn/newbs_testing_debugging.md b/docs/zh-cn/newbs_testing_debugging.md new file mode 100644 index 000000000000..824f94b906f7 --- /dev/null +++ b/docs/zh-cn/newbs_testing_debugging.md @@ -0,0 +1,43 @@ +# 测试和调试 + +使用自定义固件刷新键盘后,您就可以测试它了。如果您幸运,一切都会完美运行,但如果没有,这份文件将帮助您找出问题所在。 + +## 测试 + +测试键盘通常非常简单。按下每一个键并确保它发送的是您期望的键。甚至有一些程序可以帮助您确保没有任何键失效。 + +注意:这些程序不是由QMK提供或认可的。 + +* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (仅Windows) +* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (仅Mac) +* [Keyboard Tester](http://www.keyboardtester.com) (网页版) +* [Keyboard Checker](http://keyboardchecker.com) (网页版) + +## 使用QMK工具箱进行调试 + +[QMK工具箱](https://github.com/qmk/qmk_toolbox) 将会在你的`rules.mk`中有`CONSOLE_ENABLE = yes`的时候显示你键盘发来的消息。 默认情况下,输出极为有限,不过您可以打开调试模式来增加输出信息量。使用你键盘布局中的`DEBUG`键码,使用 [命令](feature_command.md) 特性来使能调试模式, 或者向你的布局中添加以下代码。 + +```c +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + //debug_keyboard=true; + //debug_mouse=true; +} +``` + + + +## 发送您自己的调试消息 + +有时用[custom code](custom_quantum_functions.md)发送自定义调试信息很有用. 这么做很简单. 首先在你文件头部包含`print.h`: + + #include + +之后,您可以使用一些不同的打印功能: + +* `print("string")`: 打印简单字符串. +* `uprintf("%s string", var)`: 打印格式化字符串 +* `dprint("string")`: 仅在调试模式使能时打印简单字符串 +* `dprintf("%s string", var)`: 仅在调试模式使能时打印格式化字符串 diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c index 385bd97cb889..7369398cc4b9 100644 --- a/drivers/arm/i2c_master.c +++ b/drivers/arm/i2c_master.c @@ -42,44 +42,57 @@ static const I2CConfig i2cconfig = { 0 }; +static i2c_status_t chibios_to_qmk(const msg_t* status) { + switch (*status) { + case I2C_NO_ERROR: + return I2C_STATUS_SUCCESS; + case I2C_TIMEOUT: + return I2C_STATUS_TIMEOUT; + // I2C_BUS_ERROR, I2C_ARBITRATION_LOST, I2C_ACK_FAILURE, I2C_OVERRUN, I2C_PEC_ERROR, I2C_SMB_ALERT + default: + return I2C_STATUS_ERROR; + } +} + __attribute__ ((weak)) void i2c_init(void) { // Try releasing special pins for a short time - palSetPadMode(GPIOB, 6, PAL_MODE_INPUT); - palSetPadMode(GPIOB, 7, PAL_MODE_INPUT); + palSetPadMode(I2C1_BANK, I2C1_SCL, PAL_MODE_INPUT); + palSetPadMode(I2C1_BANK, I2C1_SDA, PAL_MODE_INPUT); chThdSleepMilliseconds(10); - - palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN); - palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN); + + palSetPadMode(I2C1_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN); + palSetPadMode(I2C1_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN); //i2cInit(); //This is invoked by halInit() so no need to redo it. } -// This is usually not needed -uint8_t i2c_start(uint8_t address) +i2c_status_t i2c_start(uint8_t address) { i2c_address = address; i2cStart(&I2C_DRIVER, &i2cconfig); - return 0; + return I2C_STATUS_SUCCESS; } -uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) +i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) { i2c_address = address; i2cStart(&I2C_DRIVER, &i2cconfig); - return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); + return chibios_to_qmk(&status); } -uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) +i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) { i2c_address = address; i2cStart(&I2C_DRIVER, &i2cconfig); - return i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); + msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); + return chibios_to_qmk(&status); } -uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) +i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { i2c_address = devaddr; i2cStart(&I2C_DRIVER, &i2cconfig); @@ -91,19 +104,19 @@ uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t l } complete_packet[0] = regaddr; - return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); + return chibios_to_qmk(&status); } -uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout) +i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { i2c_address = devaddr; i2cStart(&I2C_DRIVER, &i2cconfig); - return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout)); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout)); + return chibios_to_qmk(&status); } -// This is usually not needed. It releases the driver to allow pins to become GPIO again. -uint8_t i2c_stop(uint16_t timeout) +void i2c_stop(void) { i2cStop(&I2C_DRIVER); - return 0; } diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h index 392760328f78..a15f1702dd30 100644 --- a/drivers/arm/i2c_master.h +++ b/drivers/arm/i2c_master.h @@ -26,15 +26,31 @@ #include "ch.h" #include +#ifndef I2C1_BANK + #define I2C1_BANK GPIOB +#endif +#ifndef I2C1_SCL + #define I2C1_SCL 6 +#endif +#ifndef I2C1_SDA + #define I2C1_SDA 7 +#endif + #ifndef I2C_DRIVER #define I2C_DRIVER I2CD1 #endif +typedef int16_t i2c_status_t; + +#define I2C_STATUS_SUCCESS (0) +#define I2C_STATUS_ERROR (-1) +#define I2C_STATUS_TIMEOUT (-2) + void i2c_init(void); -uint8_t i2c_start(uint8_t address); -uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); -uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); -uint8_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length); -uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); -uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout); -uint8_t i2c_stop(uint16_t timeout); +i2c_status_t i2c_start(uint8_t address); +i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout); +i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); +i2c_status_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length); +i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); +i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout); +void i2c_stop(void); diff --git a/drivers/avr/apa102.c b/drivers/avr/apa102.c new file mode 100755 index 000000000000..55a0d5777885 --- /dev/null +++ b/drivers/avr/apa102.c @@ -0,0 +1,101 @@ +/* +* APA102 lib V1.0a +* +* Controls APA102 RGB-LEDs +* Author: Mikkel (Duckle29 on github) +* +* Dec 22th, 2017 v1.0a Initial Version +* +* 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 . +*/ + +#include "apa102.h" +#include +#include +#include +#include "debug.h" + +// Setleds for standard RGB +void inline apa102_setleds(LED_TYPE *ledarray, uint16_t leds){ + apa102_setleds_pin(ledarray,leds, _BV(RGB_DI_PIN & 0xF), _BV(RGB_CLK_PIN & 0xF)); +} + +void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK){ + pinMode(RGB_DI_PIN, PinDirectionOutput); + pinMode(RGB_CLK_PIN, PinDirectionOutput); + + apa102_send_array((uint8_t*)ledarray,leds) +} + +void apa102_send_array(uint8_t *data, uint16_t leds){ // Data is struct of 3 bytes. RGB - leds is number of leds in data + apa102_start_frame(); + while(leds--){ + apa102_send_frame(0xFF000000 | (data->b << 16) | (data->g << 8) | data->r); + data++; + } + apa102_end_frame(leds); +} + +void apa102_send_frame(uint32_t frame){ + for(uint32_t i=0xFF; i>0;){ + apa102_send_byte(frame & i); + i = i << 8; + } +} + +void apa102_start_frame(){ + apa102_send_frame(0); +} + +void apa102_end_frame(uint16_t leds) +{ + // This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h + // and adapted. The code is MIT licensed. I think thats compatible? + + // We need to send some more bytes to ensure that all the LEDs in the + // chain see their new color and start displaying it. + // + // The data stream seen by the last LED in the chain will be delayed by + // (count - 1) clock edges, because each LED before it inverts the clock + // line and delays the data by one clock edge. Therefore, to make sure + // the last LED actually receives the data we wrote, the number of extra + // edges we send at the end of the frame must be at least (count - 1). + // For the APA102C, that is sufficient. + // + // The SK9822 only updates after it sees 32 zero bits followed by one more + // rising edge. To avoid having the update time depend on the color of + // the last LED, we send a dummy 0xFF byte. (Unfortunately, this means + // that partial updates of the beginning of an LED strip are not possible; + // the LED after the last one you are trying to update will be black.) + // After that, to ensure that the last LED in the chain sees 32 zero bits + // and a rising edge, we need to send at least 65 + (count - 1) edges. It + // is sufficent and simpler to just send (5 + count/16) bytes of zeros. + // + // We are ignoring the specification for the end frame in the APA102/SK9822 + // datasheets because it does not actually ensure that all the LEDs will + // start displaying their new colors right away. + + apa102_send_byte(0xFF); + for (uint16_t i = 0; i < 5 + leds / 16; i++){ + apa102_send_byte(0); + } +} + +void apa102_send_byte(uint8_t byte){ + uint8_t i; + for (i = 0; i < 8; i++){ + digitalWrite(RGB_DI_PIN, !!(byte & (1 << (7-i))); + digitalWrite(RGB_CLK_PIN, PinLevelHigh); + } +} diff --git a/drivers/avr/apa102.h b/drivers/avr/apa102.h new file mode 100755 index 000000000000..e7d7c3684f40 --- /dev/null +++ b/drivers/avr/apa102.h @@ -0,0 +1,46 @@ +/* + * 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 + * 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 . + */ + +#pragma once + +#include +#include + +#include "rgblight_types.h" + + +/* User Interface + * + * Input: + * ledarray: An array of GRB data describing the LED colors + * number_of_leds: The number of LEDs to write + * pinmask (optional): Bitmask describing the output bin. e.g. _BV(PB0) + * + * The functions will perform the following actions: + * - Set the data-out pin as output + * - Send out the LED data + * - Wait 50�s to reset the LEDs + */ + +void apa102_setleds (LED_TYPE *ledarray, uint16_t number_of_leds); +void apa102_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask); +void apa102_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c index 19bae33e9f17..a7364bae08f7 100755 --- a/drivers/avr/i2c_master.c +++ b/drivers/avr/i2c_master.c @@ -7,43 +7,56 @@ #include "i2c_master.h" #include "timer.h" +#include "wait.h" #ifndef F_SCL -#define F_SCL 400000UL // SCL frequency +# define F_SCL 400000UL // SCL frequency #endif #define Prescaler 1 -#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16 ) / 2) +#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16) / 2) -void i2c_init(void) -{ - TWSR = 0; /* no prescaler */ +void i2c_init(void) { + TWSR = 0; /* no prescaler */ TWBR = (uint8_t)TWBR_val; + + #ifdef __AVR_ATmega32A__ + // set pull-up resistors on I2C bus pins + PORTC |= 0b11; + + // enable TWI (two-wire interface) + TWCR |= (1 << TWEN); + + // enable TWI interrupt and slave address ACK + TWCR |= (1 << TWIE); + TWCR |= (1 << TWEA); + #endif } -i2c_status_t i2c_start(uint8_t address, uint16_t timeout) -{ +i2c_status_t i2c_start(uint8_t address, uint16_t timeout) { // reset TWI control register TWCR = 0; // transmit START condition - TWCR = (1<= timeout)) { return I2C_STATUS_TIMEOUT; } } // check if the start condition was successfully transmitted - if(((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)){ return I2C_STATUS_ERROR; } + if (((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)) { + return I2C_STATUS_ERROR; + } // load slave address into data register TWDR = address; // start transmission of address - TWCR = (1<= timeout)) { return I2C_STATUS_TIMEOUT; } @@ -51,38 +64,39 @@ i2c_status_t i2c_start(uint8_t address, uint16_t timeout) // check if the device has acknowledged the READ / WRITE mode uint8_t twst = TW_STATUS & 0xF8; - if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return I2C_STATUS_ERROR; + if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) { + return I2C_STATUS_ERROR; + } return I2C_STATUS_SUCCESS; } -i2c_status_t i2c_write(uint8_t data, uint16_t timeout) -{ +i2c_status_t i2c_write(uint8_t data, uint16_t timeout) { // load data into data register TWDR = data; // start transmission of data - TWCR = (1<= timeout)) { return I2C_STATUS_TIMEOUT; } } - if( (TW_STATUS & 0xF8) != TW_MT_DATA_ACK ){ return I2C_STATUS_ERROR; } + if ((TW_STATUS & 0xF8) != TW_MT_DATA_ACK) { + return I2C_STATUS_ERROR; + } return I2C_STATUS_SUCCESS; } -int16_t i2c_read_ack(uint16_t timeout) -{ - +int16_t i2c_read_ack(uint16_t timeout) { // start TWI module and acknowledge data after reception - TWCR = (1<= timeout)) { return I2C_STATUS_TIMEOUT; } @@ -92,14 +106,12 @@ int16_t i2c_read_ack(uint16_t timeout) return TWDR; } -int16_t i2c_read_nack(uint16_t timeout) -{ - +int16_t i2c_read_nack(uint16_t timeout) { // start receiving without acknowledging reception - TWCR = (1<= timeout)) { return I2C_STATUS_TIMEOUT; } @@ -109,115 +121,89 @@ int16_t i2c_read_nack(uint16_t timeout) return TWDR; } -i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) -{ +i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) { i2c_status_t status = i2c_start(address | I2C_WRITE, timeout); - if (status) return status; - for (uint16_t i = 0; i < length; i++) { + for (uint16_t i = 0; i < length && status >= 0; i++) { status = i2c_write(data[i], timeout); - if (status) return status; } - status = i2c_stop(timeout); - if (status) return status; + i2c_stop(); - return I2C_STATUS_SUCCESS; + return status; } -i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) -{ +i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) { i2c_status_t status = i2c_start(address | I2C_READ, timeout); - if (status) return status; - for (uint16_t i = 0; i < (length-1); i++) { + for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { status = i2c_read_ack(timeout); if (status >= 0) { data[i] = status; - } else { - return status; } } - status = i2c_read_nack(timeout); - if (status >= 0 ) { - data[(length-1)] = status; - } else { - return status; + if (status >= 0) { + status = i2c_read_nack(timeout); + if (status >= 0) { + data[(length - 1)] = status; + } } - status = i2c_stop(timeout); - if (status) return status; + i2c_stop(); - return I2C_STATUS_SUCCESS; + return (status < 0) ? status : I2C_STATUS_SUCCESS; } -i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) -{ +i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { i2c_status_t status = i2c_start(devaddr | 0x00, timeout); - if (status) return status; + if (status >= 0) { + status = i2c_write(regaddr, timeout); - status = i2c_write(regaddr, timeout); - if (status) return status; - - for (uint16_t i = 0; i < length; i++) { - status = i2c_write(data[i], timeout); - if (status) return status; + for (uint16_t i = 0; i < length && status >= 0; i++) { + status = i2c_write(data[i], timeout); + } } - status = i2c_stop(timeout); - if (status) return status; + i2c_stop(); - return I2C_STATUS_SUCCESS; + return status; } -i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) -{ +i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { i2c_status_t status = i2c_start(devaddr, timeout); - if (status) return status; + if (status < 0) { + goto error; + } status = i2c_write(regaddr, timeout); - if (status) return status; - - status = i2c_stop(timeout); - if (status) return status; + if (status < 0) { + goto error; + } status = i2c_start(devaddr | 0x01, timeout); - if (status) return status; - for (uint16_t i = 0; i < (length-1); i++) { + for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { status = i2c_read_ack(timeout); if (status >= 0) { data[i] = status; - } else { - return status; } } - status = i2c_read_nack(timeout); - if (status >= 0 ) { - data[(length-1)] = status; - } else { - return status; + if (status >= 0) { + status = i2c_read_nack(timeout); + if (status >= 0) { + data[(length - 1)] = status; + } } - status = i2c_stop(timeout); - if (status) return status; +error: + i2c_stop(); - return I2C_STATUS_SUCCESS; + return (status < 0) ? status : I2C_STATUS_SUCCESS; } -i2c_status_t i2c_stop(uint16_t timeout) -{ +void i2c_stop(void) { // transmit STOP condition - TWCR = (1<= timeout)) { - return I2C_STATUS_TIMEOUT; - } - } - - return I2C_STATUS_SUCCESS; + TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO); } diff --git a/drivers/avr/i2c_master.h b/drivers/avr/i2c_master.h index 89c64599c51a..b4613115d9a1 100755 --- a/drivers/avr/i2c_master.h +++ b/drivers/avr/i2c_master.h @@ -22,10 +22,10 @@ i2c_status_t i2c_start(uint8_t address, uint16_t timeout); i2c_status_t i2c_write(uint8_t data, uint16_t timeout); int16_t i2c_read_ack(uint16_t timeout); int16_t i2c_read_nack(uint16_t timeout); -i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); +i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); -i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); +i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); -i2c_status_t i2c_stop(uint16_t timeout); +void i2c_stop(void); -#endif // I2C_MASTER_H \ No newline at end of file +#endif // I2C_MASTER_H diff --git a/drivers/avr/i2c_slave.c b/drivers/avr/i2c_slave.c index 18a29a45a5a4..dbb9fb0df349 100755 --- a/drivers/avr/i2c_slave.c +++ b/drivers/avr/i2c_slave.c @@ -16,7 +16,7 @@ static volatile bool slave_has_register_set = false; void i2c_slave_init(uint8_t address){ // load address into TWI address register - TWAR = (address << 1); + TWAR = address; // set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt TWCR = (1 << TWIE) | (1 << TWEA) | (1 << TWINT) | (1 << TWEN); } diff --git a/drivers/avr/ws2812.c b/drivers/avr/ws2812.c index 5bd837ec7542..7c3cb5174df0 100644 --- a/drivers/avr/ws2812.c +++ b/drivers/avr/ws2812.c @@ -27,6 +27,12 @@ #include #include "debug.h" +#if !defined(LED_ARRAY) && defined(RGB_MATRIX_ENABLE) +// LED color buffer +LED_TYPE led[DRIVER_LED_TOTAL]; + #define LED_ARRAY led +#endif + #ifdef RGBW_BB_TWI // Port for the I2C @@ -141,6 +147,25 @@ unsigned char I2C_Write(unsigned char c) #endif +#ifdef RGB_MATRIX_ENABLE +// Set an led in the buffer to a color +void inline ws2812_setled(int i, uint8_t r, uint8_t g, uint8_t b) +{ + led[i].r = r; + led[i].g = g; + led[i].b = b; +} + +void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b) +{ + for (int i = 0; i < sizeof(led)/sizeof(led[0]); i++) { + led[i].r = r; + led[i].g = g; + led[i].b = b; + } +} +#endif + // Setleds for standard RGB void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { diff --git a/drivers/avr/ws2812.h b/drivers/avr/ws2812.h index 1f9299ffb539..ecb1dc4d18c8 100644 --- a/drivers/avr/ws2812.h +++ b/drivers/avr/ws2812.h @@ -30,7 +30,6 @@ #include "rgblight_types.h" - /* User Interface * * Input: @@ -43,6 +42,10 @@ * - Send out the LED data * - Wait 50�s to reset the LEDs */ +#ifdef RGB_MATRIX_ENABLE +void ws2812_setled (int index, uint8_t r, uint8_t g, uint8_t b); +void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b); +#endif 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 pinmask); diff --git a/drivers/haptic/DRV2605L.c b/drivers/haptic/DRV2605L.c index 97ca292b9b1a..215e6be3e7cb 100644 --- a/drivers/haptic/DRV2605L.c +++ b/drivers/haptic/DRV2605L.c @@ -21,7 +21,7 @@ #include -uint8_t DRV2605L_transfer_buffer[20]; +uint8_t DRV2605L_transfer_buffer[2]; uint8_t DRV2605L_tx_register[0]; uint8_t DRV2605L_read_buffer[0]; uint8_t DRV2605L_read_register; @@ -34,6 +34,11 @@ void DRV_write(uint8_t drv_register, uint8_t settings) { } uint8_t DRV_read(uint8_t regaddress) { +#ifdef __AVR__ + i2c_readReg(DRV2605L_BASE_ADDRESS << 1, + regaddress, DRV2605L_read_buffer, 1, 100); + DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0]; +#else DRV2605L_tx_register[0] = regaddress; if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1, DRV2605L_tx_register, 1, @@ -42,14 +47,13 @@ uint8_t DRV_read(uint8_t regaddress) { printf("err reading reg \n"); } DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0]; +#endif return DRV2605L_read_register; } void DRV_init(void) { i2c_init(); - i2c_start(DRV2605L_BASE_ADDRESS); - /* 0x07 sets DRV2605 into calibration mode */ DRV_write(DRV_MODE,0x07); @@ -104,21 +108,17 @@ void DRV_init(void) C4_SET.Bits.C4_AUTO_CAL_TIME = AUTO_CAL_TIME; DRV_write(DRV_CTRL_4, (uint8_t) C4_SET.Byte); DRV_write(DRV_LIB_SELECTION,LIB_SELECTION); - //start autocalibration + DRV_write(DRV_GO, 0x01); /* 0x00 sets DRV2605 out of standby and to use internal trigger * 0x01 sets DRV2605 out of standby and to use external trigger */ DRV_write(DRV_MODE,0x00); - - /* 0x06: LRA library */ - DRV_write(DRV_WAVEFORM_SEQ_1, 0x01); - - /* 0xB9: LRA, 4x brake factor, medium gain, 7.5x back EMF - * 0x39: ERM, 4x brake factor, medium gain, 1.365x back EMF */ - - /* TODO: setup auto-calibration as part of initiation */ +//Play greeting sequence + DRV_write(DRV_GO, 0x00); + DRV_write(DRV_WAVEFORM_SEQ_1, DRV_GREETING); + DRV_write(DRV_GO, 0x01); } void DRV_pulse(uint8_t sequence) diff --git a/drivers/haptic/DRV2605L.h b/drivers/haptic/DRV2605L.h index de9d294e9d13..836e9cbcd281 100644 --- a/drivers/haptic/DRV2605L.h +++ b/drivers/haptic/DRV2605L.h @@ -31,13 +31,6 @@ #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ #endif -#ifndef RATED_VOLTAGE -#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ -#ifndef V_PEAK -#define V_PEAK 2.8 -#endif -#endif - /* LRA specific settings */ #if FB_ERM_LRA == 1 #ifndef V_RMS @@ -49,6 +42,16 @@ #ifndef F_LRA #define F_LRA 205 #endif +#ifndef RATED_VOLTAGE +#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ +#endif +#endif + +#ifndef RATED_VOLTAGE +#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ +#endif +#ifndef V_PEAK +#define V_PEAK 2.8 #endif /* Library Selection */ @@ -60,6 +63,13 @@ #endif #endif +#ifndef DRV_GREETING +#define DRV_GREETING alert_750ms +#endif +#ifndef DRV_MODE_DEFAULT +#define DRV_MODE_DEFAULT strong_click1 +#endif + /* Control 1 register settings */ #ifndef DRIVE_TIME #define DRIVE_TIME 25 @@ -162,7 +172,6 @@ void DRV_write(const uint8_t drv_register, const uint8_t settings); uint8_t DRV_read(const uint8_t regaddress); void DRV_pulse(const uint8_t sequence); - typedef enum DRV_EFFECT{ clear_sequence = 0, strong_click = 1, @@ -288,6 +297,7 @@ typedef enum DRV_EFFECT{ smooth_hum3_30 = 121, smooth_hum4_20 = 122, smooth_hum5_10 = 123, + drv_effect_max = 124, } DRV_EFFECT; /* Register bit array unions */ diff --git a/drivers/haptic/haptic.c b/drivers/haptic/haptic.c new file mode 100644 index 000000000000..a94f05565c22 --- /dev/null +++ b/drivers/haptic/haptic.c @@ -0,0 +1,248 @@ +/* Copyright 2019 ishtob + * Driver for haptic feedback written for QMK + * + * 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 . + */ +#include "haptic.h" +#include "eeconfig.h" +#include "progmem.h" +#include "debug.h" +#ifdef DRV2605L +#include "DRV2605L.h" +#endif +#ifdef SOLENOID_ENABLE +#include "solenoid.h" +#endif + +haptic_config_t haptic_config; + +void haptic_init(void) { + debug_enable = 1; //Debug is ON! + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + haptic_config.raw = eeconfig_read_haptic(); + if (haptic_config.mode < 1){ + haptic_config.mode = 1; + } + if (!haptic_config.mode){ + dprintf("No haptic config found in eeprom, setting default configs\n"); + haptic_reset(); + } + #ifdef SOLENOID_ENABLE + solenoid_setup(); + dprintf("Solenoid driver initialized\n"); + #endif + #ifdef DRV2605L + DRV_init(); + dprintf("DRV2605 driver initialized\n"); + #endif + eeconfig_debug_haptic(); +} + +void haptic_task(void) { + #ifdef SOLENOID_ENABLE + solenoid_check(); + #endif +} + +void eeconfig_debug_haptic(void) { + dprintf("haptic_config eprom\n"); + dprintf("haptic_config.enable = %d\n", haptic_config.enable); + dprintf("haptic_config.mode = %d\n", haptic_config.mode); +} + +void haptic_enable(void) { + haptic_config.enable = 1; + xprintf("haptic_config.enable = %u\n", haptic_config.enable); + eeconfig_update_haptic(haptic_config.raw); +} + +void haptic_disable(void) { + haptic_config.enable = 0; + xprintf("haptic_config.enable = %u\n", haptic_config.enable); + eeconfig_update_haptic(haptic_config.raw); +} + +void haptic_toggle(void) { +if (haptic_config.enable) { + haptic_disable(); + } else { + haptic_enable(); + } + eeconfig_update_haptic(haptic_config.raw); +} + +void haptic_feedback_toggle(void){ + haptic_config.feedback++; + if (haptic_config.feedback >= HAPTIC_FEEDBACK_MAX) + haptic_config.feedback = KEY_PRESS; + xprintf("haptic_config.feedback = %u\n", !haptic_config.feedback); + eeconfig_update_haptic(haptic_config.raw); +} + +void haptic_buzz_toggle(void) { + bool buzz_stat = !haptic_config.buzz; + haptic_config.buzz = buzz_stat; + haptic_set_buzz(buzz_stat); +} + +void haptic_mode_increase(void) { + uint8_t mode = haptic_config.mode + 1; + #ifdef DRV2605L + if (haptic_config.mode >= drv_effect_max) { + mode = 1; + } + #endif + haptic_set_mode(mode); +} + +void haptic_mode_decrease(void) { + uint8_t mode = haptic_config.mode -1; + #ifdef DRV2605L + if (haptic_config.mode < 1) { + mode = (drv_effect_max - 1); + } + #endif + haptic_set_mode(mode); +} + +void haptic_dwell_increase(void) { + uint8_t dwell = haptic_config.dwell + 1; + #ifdef SOLENOID_ENABLE + if (haptic_config.dwell >= SOLENOID_MAX_DWELL) { + dwell = 1; + } + solenoid_set_dwell(dwell); + #endif + haptic_set_dwell(dwell); +} + +void haptic_dwell_decrease(void) { + uint8_t dwell = haptic_config.dwell -1; + #ifdef SOLENOID_ENABLE + if (haptic_config.dwell < SOLENOID_MIN_DWELL) { + dwell = SOLENOID_MAX_DWELL; + } + solenoid_set_dwell(dwell); + #endif + haptic_set_dwell(dwell); +} + +void haptic_reset(void){ + haptic_config.enable = true; + uint8_t feedback = HAPTIC_FEEDBACK_DEFAULT; + haptic_config.feedback = feedback; + #ifdef DRV2605L + uint8_t mode = HAPTIC_MODE_DEFAULT; + haptic_config.mode = mode; + #endif + #ifdef SOLENOID_ENABLE + uint8_t dwell = SOLENOID_DEFAULT_DWELL; + haptic_config.dwell = dwell; + #endif + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.feedback = %u\n", haptic_config.feedback); + xprintf("haptic_config.mode = %u\n", haptic_config.mode); +} + +void haptic_set_feedback(uint8_t feedback) { + haptic_config.feedback = feedback; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.feedback = %u\n", haptic_config.feedback); +} + +void haptic_set_mode(uint8_t mode) { + haptic_config.mode = mode; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.mode = %u\n", haptic_config.mode); +} + +void haptic_set_buzz(uint8_t buzz) { + haptic_config.buzz = buzz; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.buzz = %u\n", haptic_config.buzz); +} + +void haptic_set_dwell(uint8_t dwell) { + haptic_config.dwell = dwell; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.dwell = %u\n", haptic_config.dwell); +} + +uint8_t haptic_get_mode(void) { + if (!haptic_config.enable){ + return false; + } + return haptic_config.mode; +} + +uint8_t haptic_get_feedback(void) { + if (!haptic_config.enable){ + return false; + } + return haptic_config.feedback; +} + +uint8_t haptic_get_dwell(void) { + if (!haptic_config.enable){ + return false; + } + return haptic_config.dwell; +} + +void haptic_play(void) { + #ifdef DRV2605L + uint8_t play_eff = 0; + play_eff = haptic_config.mode; + DRV_pulse(play_eff); + #endif + #ifdef SOLENOID_ENABLE + solenoid_fire(); + #endif +} + +bool process_haptic(uint16_t keycode, keyrecord_t *record) { + if (keycode == HPT_ON && record->event.pressed) { haptic_enable(); } + if (keycode == HPT_OFF && record->event.pressed) { haptic_disable(); } + if (keycode == HPT_TOG && record->event.pressed) { haptic_toggle(); } + if (keycode == HPT_RST && record->event.pressed) { haptic_reset(); } + if (keycode == HPT_FBK && record->event.pressed) { haptic_feedback_toggle(); } + if (keycode == HPT_BUZ && record->event.pressed) { haptic_buzz_toggle(); } + if (keycode == HPT_MODI && record->event.pressed) { haptic_mode_increase(); } + if (keycode == HPT_MODD && record->event.pressed) { haptic_mode_decrease(); } + if (keycode == HPT_DWLI && record->event.pressed) { haptic_dwell_increase(); } + if (keycode == HPT_DWLD && record->event.pressed) { haptic_dwell_decrease(); } + if (haptic_config.enable) { + if ( record->event.pressed ) { + // keypress + if (haptic_config.feedback < 2) { + haptic_play(); + } + } else { + //keyrelease + if (haptic_config.feedback > 0) { + haptic_play(); + } + } + } + return true; +} + +void haptic_shutdown(void) { + #ifdef SOLENOID_ENABLE + solenoid_shutdown(); + #endif + +} diff --git a/drivers/haptic/haptic.h b/drivers/haptic/haptic.h new file mode 100644 index 000000000000..d39dc5c3b9d6 --- /dev/null +++ b/drivers/haptic/haptic.h @@ -0,0 +1,82 @@ +/* Copyright 2019 ishtob + * Driver for haptic feedback written for QMK + * + * 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 . + */ + +#pragma once +#include +#include +#include "quantum.h" +#ifdef DRV2605L +#include "DRV2605L.h" +#endif + + +#ifndef HAPTIC_FEEDBACK_DEFAULT +#define HAPTIC_FEEDBACK_DEFAULT 0 +#endif +#ifndef HAPTIC_MODE_DEFAULT +#define HAPTIC_MODE_DEFAULT DRV_MODE_DEFAULT +#endif + +/* EEPROM config settings */ +typedef union { + uint32_t raw; + struct { + bool enable :1; + uint8_t feedback :2; + uint8_t mode :7; + bool buzz :1; + uint8_t dwell :7; + uint16_t reserved :16; + }; +} haptic_config_t; + +typedef enum HAPTIC_FEEDBACK{ + KEY_PRESS, + KEY_PRESS_RELEASE, + KEY_RELEASE, + HAPTIC_FEEDBACK_MAX, +} HAPTIC_FEEDBACK; + +bool process_haptic(uint16_t keycode, keyrecord_t *record); +void haptic_init(void); +void haptic_task(void); +void eeconfig_debug_haptic(void); +void haptic_enable(void); +void haptic_disable(void); +void haptic_toggle(void); +void haptic_feedback_toggle(void); +void haptic_mode_increase(void); +void haptic_mode_decrease(void); +void haptic_mode(uint8_t mode); +void haptic_reset(void); +void haptic_set_feedback(uint8_t feedback); +void haptic_set_mode(uint8_t mode); +void haptic_set_dwell(uint8_t dwell); +void haptic_set_buzz(uint8_t buzz); +void haptic_buzz_toggle(void); +uint8_t haptic_get_mode(void); +uint8_t haptic_get_feedback(void); +void haptic_dwell_increase(void); +void haptic_dwell_decrease(void); + +void haptic_play(void); +void haptic_shutdown(void); + + + + + diff --git a/drivers/haptic/solenoid.c b/drivers/haptic/solenoid.c new file mode 100644 index 000000000000..2d39dbc1794c --- /dev/null +++ b/drivers/haptic/solenoid.c @@ -0,0 +1,109 @@ +/* Copyright 2018 mtdjr - modified by ishtob + * Driver for solenoid written for QMK + * + * 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 . + */ + +#include +#include "solenoid.h" +#include "haptic.h" + +bool solenoid_on = false; +bool solenoid_buzzing = false; +uint16_t solenoid_start = 0; +uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL; + +extern haptic_config_t haptic_config; + + +void solenoid_buzz_on(void) { + haptic_set_buzz(1); +} + +void solenoid_buzz_off(void) { + haptic_set_buzz(0); +} + +void solenoid_set_buzz(int buzz) { + haptic_set_buzz(buzz); +} + + +void solenoid_dwell_minus(uint8_t solenoid_dwell) { + if (solenoid_dwell > 0) solenoid_dwell--; +} + +void solenoid_dwell_plus(uint8_t solenoid_dwell) { + if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++; +} + +void solenoid_set_dwell(uint8_t dwell) { + solenoid_dwell = dwell; +} + +void solenoid_stop(void) { + writePinLow(SOLENOID_PIN); + solenoid_on = false; + solenoid_buzzing = false; +} + +void solenoid_fire(void) { + if (!haptic_config.buzz && solenoid_on) return; + if (haptic_config.buzz && solenoid_buzzing) return; + + solenoid_on = true; + solenoid_buzzing = true; + solenoid_start = timer_read(); + writePinHigh(SOLENOID_PIN); +} + +void solenoid_check(void) { + uint16_t elapsed = 0; + + if (!solenoid_on) return; + + elapsed = timer_elapsed(solenoid_start); + + //Check if it's time to finish this solenoid click cycle + if (elapsed > solenoid_dwell) { + solenoid_stop(); + return; + } + + //Check whether to buzz the solenoid on and off + if (haptic_config.buzz) { + if (elapsed / SOLENOID_MIN_DWELL % 2 == 0){ + if (!solenoid_buzzing) { + solenoid_buzzing = true; + writePinHigh(SOLENOID_PIN); + } + } + else { + if (solenoid_buzzing) { + solenoid_buzzing = false; + writePinLow(SOLENOID_PIN); + } + } + } +} + +void solenoid_setup(void) { + setPinOutput(SOLENOID_PIN); + solenoid_fire(); +} + +void solenoid_shutdown(void) { + writePinLow(SOLENOID_PIN); + +} diff --git a/drivers/haptic/solenoid.h b/drivers/haptic/solenoid.h new file mode 100644 index 000000000000..a08f62a11ee0 --- /dev/null +++ b/drivers/haptic/solenoid.h @@ -0,0 +1,54 @@ +/* Copyright 2018 mtdjr - modified by ishtob + * Driver for solenoid written for QMK + * + * 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 . + */ + +#pragma once + +#ifndef SOLENOID_DEFAULT_DWELL +#define SOLENOID_DEFAULT_DWELL 12 +#endif + +#ifndef SOLENOID_MAX_DWELL +#define SOLENOID_MAX_DWELL 100 +#endif + +#ifndef SOLENOID_MIN_DWELL +#define SOLENOID_MIN_DWELL 4 +#endif + +#ifndef SOLENOID_ACTIVE +#define SOLENOID_ACTIVE false +#endif + +#ifndef SOLENOID_PIN +#define SOLENOID_PIN F6 +#endif + +void solenoid_buzz_on(void); +void solenoid_buzz_off(void); +void solenoid_set_buzz(int buzz); + +void solenoid_dwell_minus(uint8_t solenoid_dwell); +void solenoid_dwell_plus(uint8_t solenoid_dwell); +void solenoid_set_dwell(uint8_t dwell); + +void solenoid_stop(void); +void solenoid_fire(void); + +void solenoid_check(void); + +void solenoid_setup(void); +void solenoid_shutdown(void); diff --git a/drivers/issi/is31fl3731-simple.c b/drivers/issi/is31fl3731-simple.c new file mode 100644 index 000000000000..a7faa9c38c0b --- /dev/null +++ b/drivers/issi/is31fl3731-simple.c @@ -0,0 +1,246 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * Copyright 2019 Clueboard + * + * 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 . + */ + +#ifdef __AVR__ +#include +#include +#include +#else +#include "wait.h" +#endif + +#include +#include +#include +#include "is31fl3731-simple.h" +#include "i2c_master.h" +#include "progmem.h" +#include "print.h" + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define ISSI_ADDR_DEFAULT 0x74 + +#define ISSI_REG_CONFIG 0x00 +#define ISSI_REG_CONFIG_PICTUREMODE 0x00 +#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08 +#define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18 + +#define ISSI_CONF_PICTUREMODE 0x00 +#define ISSI_CONF_AUTOFRAMEMODE 0x04 +#define ISSI_CONF_AUDIOMODE 0x08 + +#define ISSI_REG_PICTUREFRAME 0x01 + +#define ISSI_REG_SHUTDOWN 0x0A +#define ISSI_REG_AUDIOSYNC 0x06 + +#define ISSI_COMMANDREGISTER 0xFD +#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' + +#ifndef ISSI_TIMEOUT + #define ISSI_TIMEOUT 100 +#endif + +#ifndef ISSI_PERSISTENCE + #define ISSI_PERSISTENCE 0 +#endif + +// Transfer buffer for TWITransmitData() +uint8_t g_twi_transfer_buffer[20]; + +// These buffers match the IS31FL3731 PWM registers 0x24-0xB3. +// Storing them like this is optimal for I2C transfers to the registers. +// We could optimize this and take out the unused registers from these +// buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's +// probably not worth the extra complexity. +uint8_t g_pwm_buffer[LED_DRIVER_COUNT][144]; +bool g_pwm_buffer_update_required = false; + +/* There's probably a better way to init this... */ +#if LED_DRIVER_COUNT == 1 + uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}}; +#elif LED_DRIVER_COUNT == 2 + uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}}; +#elif LED_DRIVER_COUNT == 3 + uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}}; +#elif LED_DRIVER_COUNT == 4 + uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}}; +#endif +bool g_led_control_registers_update_required = false; + +// This is the bit pattern in the LED control registers +// (for matrix A, add one to register for matrix B) +// +// reg - b7 b6 b5 b4 b3 b2 b1 b0 +// 0x00 - R08,R07,R06,R05,R04,R03,R02,R01 +// 0x02 - G08,G07,G06,G05,G04,G03,G02,R00 +// 0x04 - B08,B07,B06,B05,B04,B03,G01,G00 +// 0x06 - - , - , - , - , - ,B02,B01,B00 +// 0x08 - - , - , - , - , - , - , - , - +// 0x0A - B17,B16,B15, - , - , - , - , - +// 0x0C - G17,G16,B14,B13,B12,B11,B10,B09 +// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09 +// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09 + + +void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) { + g_twi_transfer_buffer[0] = reg; + g_twi_transfer_buffer[1] = data; + + #if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) { + break; + } + } + #else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); + #endif +} + +void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { + // assumes bank is already selected + + // transmit PWM registers in 9 transfers of 16 bytes + // g_twi_transfer_buffer[] is 20 bytes + + // iterate over the pwm_buffer contents at 16 byte intervals + for (int i = 0; i < 144; i += 16) { + // set the first register, e.g. 0x24, 0x34, 0x44, etc. + g_twi_transfer_buffer[0] = 0x24 + i; + // copy the data from i to i+15 + // device will auto-increment register for data after the first byte + // thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer + for (int j = 0; j < 16; j++) { + g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; + } + + #if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) + break; + } + #else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); + #endif + } +} + +void IS31FL3731_init(uint8_t addr) { + // In order to avoid the LEDs being driven with garbage data + // in the LED driver's PWM registers, first enable software shutdown, + // then set up the mode and other settings, clear the PWM registers, + // then disable software shutdown. + + // select "function register" bank + IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG); + + // enable software shutdown + IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); + // this delay was copied from other drivers, might not be needed + wait_ms(10); + + // picture mode + IS31FL3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE); + // display frame 0 + IS31FL3731_write_register(addr, ISSI_REG_PICTUREFRAME, 0x00); + // audio sync off + IS31FL3731_write_register(addr, ISSI_REG_AUDIOSYNC, 0x00); + + // select bank 0 + IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0); + + // turn off all LEDs in the LED control register + for (int i = 0x00; i <= 0x11; i++) { + IS31FL3731_write_register(addr, i, 0x00); + } + + // turn off all LEDs in the blink control register (not really needed) + for (int i = 0x12; i <= 0x23; i++) { + IS31FL3731_write_register(addr, i, 0x00); + } + + // set PWM on all LEDs to 0 + for (int i = 0x24; i <= 0xB3; i++) { + IS31FL3731_write_register(addr, i, 0x00); + } + + // select "function register" bank + IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG); + + // disable software shutdown + IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x01); + + // select bank 0 and leave it selected. + // most usage after initialization is just writing PWM buffers in bank 0 + // as there's not much point in double-buffering + IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0); + +} + +void IS31FL3731_set_value(int index, uint8_t value) { + if (index >= 0 && index < LED_DRIVER_LED_COUNT) { + is31_led led = g_is31_leds[index]; + + // Subtract 0x24 to get the second index of g_pwm_buffer + g_pwm_buffer[led.driver][led.v - 0x24] = value; + g_pwm_buffer_update_required = true; + } +} + +void IS31FL3731_set_value_all(uint8_t value) { + for (int i = 0; i < LED_DRIVER_LED_COUNT; i++) { + IS31FL3731_set_value(i, value); + } +} + +void IS31FL3731_set_led_control_register(uint8_t index, bool value) { + is31_led led = g_is31_leds[index]; + + uint8_t control_register = (led.v - 0x24) / 8; + uint8_t bit_value = (led.v - 0x24) % 8; + + if (value) { + g_led_control_registers[led.driver][control_register] |= (1 << bit_value); + } else { + g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value); + } + + g_led_control_registers_update_required = true; +} + +void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index) { + if (g_pwm_buffer_update_required) { + IS31FL3731_write_pwm_buffer(addr, g_pwm_buffer[index]); + g_pwm_buffer_update_required = false; + } +} + +void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index) { + if (g_led_control_registers_update_required) { + for (int i=0; i<18; i++) { + IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]); + } + } +} diff --git a/drivers/issi/is31fl3731-simple.h b/drivers/issi/is31fl3731-simple.h new file mode 100644 index 000000000000..dbe498281791 --- /dev/null +++ b/drivers/issi/is31fl3731-simple.h @@ -0,0 +1,210 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * Copyright 2019 Clueboard + * + * 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 . + */ + + +#ifndef IS31FL3731_DRIVER_H +#define IS31FL3731_DRIVER_H + + +typedef struct is31_led { + uint8_t driver:2; + uint8_t v; +} __attribute__((packed)) is31_led; + +extern const is31_led g_is31_leds[LED_DRIVER_LED_COUNT]; + +void IS31FL3731_init(uint8_t addr); +void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data); +void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); + +void IS31FL3731_set_value(int index, uint8_t value); +void IS31FL3731_set_value_all(uint8_t value); + +void IS31FL3731_set_led_control_register(uint8_t index, bool value); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index); +void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); + +#define C1_1 0x24 +#define C1_2 0x25 +#define C1_3 0x26 +#define C1_4 0x27 +#define C1_5 0x28 +#define C1_6 0x29 +#define C1_7 0x2A +#define C1_8 0x2B + +#define C1_9 0x2C +#define C1_10 0x2D +#define C1_11 0x2E +#define C1_12 0x2F +#define C1_13 0x30 +#define C1_14 0x31 +#define C1_15 0x32 +#define C1_16 0x33 + +#define C2_1 0x34 +#define C2_2 0x35 +#define C2_3 0x36 +#define C2_4 0x37 +#define C2_5 0x38 +#define C2_6 0x39 +#define C2_7 0x3A +#define C2_8 0x3B + +#define C2_9 0x3C +#define C2_10 0x3D +#define C2_11 0x3E +#define C2_12 0x3F +#define C2_13 0x40 +#define C2_14 0x41 +#define C2_15 0x42 +#define C2_16 0x43 + +#define C3_1 0x44 +#define C3_2 0x45 +#define C3_3 0x46 +#define C3_4 0x47 +#define C3_5 0x48 +#define C3_6 0x49 +#define C3_7 0x4A +#define C3_8 0x4B + +#define C3_9 0x4C +#define C3_10 0x4D +#define C3_11 0x4E +#define C3_12 0x4F +#define C3_13 0x50 +#define C3_14 0x51 +#define C3_15 0x52 +#define C3_16 0x53 + +#define C4_1 0x54 +#define C4_2 0x55 +#define C4_3 0x56 +#define C4_4 0x57 +#define C4_5 0x58 +#define C4_6 0x59 +#define C4_7 0x5A +#define C4_8 0x5B + +#define C4_9 0x5C +#define C4_10 0x5D +#define C4_11 0x5E +#define C4_12 0x5F +#define C4_13 0x60 +#define C4_14 0x61 +#define C4_15 0x62 +#define C4_16 0x63 + +#define C5_1 0x64 +#define C5_2 0x65 +#define C5_3 0x66 +#define C5_4 0x67 +#define C5_5 0x68 +#define C5_6 0x69 +#define C5_7 0x6A +#define C5_8 0x6B + +#define C5_9 0x6C +#define C5_10 0x6D +#define C5_11 0x6E +#define C5_12 0x6F +#define C5_13 0x70 +#define C5_14 0x71 +#define C5_15 0x72 +#define C5_16 0x73 + +#define C6_1 0x74 +#define C6_2 0x75 +#define C6_3 0x76 +#define C6_4 0x77 +#define C6_5 0x78 +#define C6_6 0x79 +#define C6_7 0x7A +#define C6_8 0x7B + +#define C6_9 0x7C +#define C6_10 0x7D +#define C6_11 0x7E +#define C6_12 0x7F +#define C6_13 0x80 +#define C6_14 0x81 +#define C6_15 0x82 +#define C6_16 0x83 + +#define C7_1 0x84 +#define C7_2 0x85 +#define C7_3 0x86 +#define C7_4 0x87 +#define C7_5 0x88 +#define C7_6 0x89 +#define C7_7 0x8A +#define C7_8 0x8B + +#define C7_9 0x8C +#define C7_10 0x8D +#define C7_11 0x8E +#define C7_12 0x8F +#define C7_13 0x90 +#define C7_14 0x91 +#define C7_15 0x92 +#define C7_16 0x93 + +#define C8_1 0x94 +#define C8_2 0x95 +#define C8_3 0x96 +#define C8_4 0x97 +#define C8_5 0x98 +#define C8_6 0x99 +#define C8_7 0x9A +#define C8_8 0x9B + +#define C8_9 0x9C +#define C8_10 0x9D +#define C8_11 0x9E +#define C8_12 0x9F +#define C8_13 0xA0 +#define C8_14 0xA1 +#define C8_15 0xA2 +#define C8_16 0xA3 + +#define C9_1 0xA4 +#define C9_2 0xA5 +#define C9_3 0xA6 +#define C9_4 0xA7 +#define C9_5 0xA8 +#define C9_6 0xA9 +#define C9_7 0xAA +#define C9_8 0xAB + +#define C9_9 0xAC +#define C9_10 0xAD +#define C9_11 0xAE +#define C9_12 0xAF +#define C9_13 0xB0 +#define C9_14 0xB1 +#define C9_15 0xB2 +#define C9_16 0xB3 + + +#endif // IS31FL3731_DRIVER_H diff --git a/drivers/issi/is31fl3733.c b/drivers/issi/is31fl3733.c index c18ed7ca30b3..aa247f4e8a2a 100644 --- a/drivers/issi/is31fl3733.c +++ b/drivers/issi/is31fl3733.c @@ -75,10 +75,10 @@ uint8_t g_twi_transfer_buffer[20]; // buffers and the transfers in IS31FL3733_write_pwm_buffer() but it's // probably not worth the extra complexity. uint8_t g_pwm_buffer[DRIVER_COUNT][192]; -bool g_pwm_buffer_update_required = false; +bool g_pwm_buffer_update_required[DRIVER_COUNT] = { false }; uint8_t g_led_control_registers[DRIVER_COUNT][24] = { { 0 }, { 0 } }; -bool g_led_control_registers_update_required = false; +bool g_led_control_registers_update_required[DRIVER_COUNT] = { false }; void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data ) { @@ -123,12 +123,13 @@ void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ) } } -void IS31FL3733_init( uint8_t addr ) +void IS31FL3733_init( uint8_t addr, uint8_t sync) { // In order to avoid the LEDs being driven with garbage data // in the LED driver's PWM registers, shutdown is enabled last. // Set up the mode and other settings, clear the PWM registers, // then disable software shutdown. + // Sync is passed so set it according to the datasheet. // Unlock the command register. IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); @@ -161,7 +162,7 @@ void IS31FL3733_init( uint8_t addr ) // Set global current to maximum. IS31FL3733_write_register( addr, ISSI_REG_GLOBALCURRENT, 0xFF ); // Disable software shutdown. - IS31FL3733_write_register( addr, ISSI_REG_CONFIGURATION, 0x01 ); + IS31FL3733_write_register( addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01 ); // Wait 10ms to ensure the device has woken up. #ifdef __AVR__ @@ -179,7 +180,7 @@ void IS31FL3733_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) g_pwm_buffer[led.driver][led.r] = red; g_pwm_buffer[led.driver][led.g] = green; g_pwm_buffer[led.driver][led.b] = blue; - g_pwm_buffer_update_required = true; + g_pwm_buffer_update_required[led.driver] = true; } } @@ -218,35 +219,34 @@ void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, b g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); } - g_led_control_registers_update_required = true; + g_led_control_registers_update_required[led.driver] = true; } -void IS31FL3733_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ) +void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index ) { - if ( g_pwm_buffer_update_required ) + if ( g_pwm_buffer_update_required[index] ) { // Firstly we need to unlock the command register and select PG1 - IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); - IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM ); + IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM ); - IS31FL3733_write_pwm_buffer( addr1, g_pwm_buffer[0] ); - //IS31FL3733_write_pwm_buffer( addr2, g_pwm_buffer[1] ); + IS31FL3733_write_pwm_buffer( addr, g_pwm_buffer[index] ); } - g_pwm_buffer_update_required = false; + g_pwm_buffer_update_required[index] = false; } -void IS31FL3733_update_led_control_registers( uint8_t addr1, uint8_t addr2 ) +void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index ) { - if ( g_led_control_registers_update_required ) + if ( g_led_control_registers_update_required[index] ) { // Firstly we need to unlock the command register and select PG0 - IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); - IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL ); + IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL ); for ( int i=0; i<24; i++ ) { - IS31FL3733_write_register(addr1, i, g_led_control_registers[0][i] ); - //IS31FL3733_write_register(addr2, i, g_led_control_registers[1][i] ); + IS31FL3733_write_register(addr, i, g_led_control_registers[index][i] ); } } + g_led_control_registers_update_required[index] = false; } diff --git a/drivers/issi/is31fl3733.h b/drivers/issi/is31fl3733.h index 3d23b188aac7..e117b2546009 100644 --- a/drivers/issi/is31fl3733.h +++ b/drivers/issi/is31fl3733.h @@ -32,7 +32,7 @@ typedef struct is31_led { extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; -void IS31FL3733_init( uint8_t addr ); +void IS31FL3733_init( uint8_t addr, uint8_t sync ); void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data ); void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ); @@ -45,8 +45,8 @@ void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, b // (eg. from a timer interrupt). // Call this while idle (in between matrix scans). // If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3733_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ); -void IS31FL3733_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); +void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index ); +void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index ); #define A_1 0x00 #define A_2 0x01 diff --git a/drivers/issi/is31fl3737.c b/drivers/issi/is31fl3737.c new file mode 100644 index 000000000000..6491049274b5 --- /dev/null +++ b/drivers/issi/is31fl3737.c @@ -0,0 +1,252 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifdef __AVR__ +#include +#include +#include +#else +#include "wait.h" +#endif + +#include +#include "i2c_master.h" +#include "progmem.h" +#include "rgb_matrix.h" + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 00 <-> GND +// 01 <-> SCL +// 10 <-> SDA +// 11 <-> VCC +// ADDR1 represents A1:A0 of the 7-bit address. +// ADDR2 represents A3:A2 of the 7-bit address. +// The result is: 0b101(ADDR2)(ADDR1) +#define ISSI_ADDR_DEFAULT 0x50 + +#define ISSI_COMMANDREGISTER 0xFD +#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE +#define ISSI_INTERRUPTMASKREGISTER 0xF0 +#define ISSI_INTERRUPTSTATUSREGISTER 0xF1 + +#define ISSI_PAGE_LEDCONTROL 0x00 //PG0 +#define ISSI_PAGE_PWM 0x01 //PG1 +#define ISSI_PAGE_AUTOBREATH 0x02 //PG2 +#define ISSI_PAGE_FUNCTION 0x03 //PG3 + +#define ISSI_REG_CONFIGURATION 0x00 //PG3 +#define ISSI_REG_GLOBALCURRENT 0x01 //PG3 +#define ISSI_REG_RESET 0x11// PG3 +#define ISSI_REG_SWPULLUP 0x0F //PG3 +#define ISSI_REG_CSPULLUP 0x10 //PG3 + +#ifndef ISSI_TIMEOUT + #define ISSI_TIMEOUT 100 +#endif + +#ifndef ISSI_PERSISTENCE + #define ISSI_PERSISTENCE 0 +#endif + +// Transfer buffer for TWITransmitData() +uint8_t g_twi_transfer_buffer[20]; + +// These buffers match the IS31FL3737 PWM registers. +// The control buffers match the PG0 LED On/Off registers. +// Storing them like this is optimal for I2C transfers to the registers. +// We could optimize this and take out the unused registers from these +// buffers and the transfers in IS31FL3737_write_pwm_buffer() but it's +// probably not worth the extra complexity. +uint8_t g_pwm_buffer[DRIVER_COUNT][192]; +bool g_pwm_buffer_update_required = false; + +uint8_t g_led_control_registers[DRIVER_COUNT][24] = { { 0 } }; +bool g_led_control_registers_update_required = false; + +void IS31FL3737_write_register( uint8_t addr, uint8_t reg, uint8_t data ) +{ + g_twi_transfer_buffer[0] = reg; + g_twi_transfer_buffer[1] = data; + + #if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) + break; + } + #else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); + #endif +} + +void IS31FL3737_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ) +{ + // assumes PG1 is already selected + + // transmit PWM registers in 12 transfers of 16 bytes + // g_twi_transfer_buffer[] is 20 bytes + + // iterate over the pwm_buffer contents at 16 byte intervals + for ( int i = 0; i < 192; i += 16 ) { + g_twi_transfer_buffer[0] = i; + // copy the data from i to i+15 + // device will auto-increment register for data after the first byte + // thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer + for ( int j = 0; j < 16; j++ ) { + g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; + } + + #if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) + break; + } + #else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); + #endif + } +} + +void IS31FL3737_init( uint8_t addr ) +{ + // In order to avoid the LEDs being driven with garbage data + // in the LED driver's PWM registers, shutdown is enabled last. + // Set up the mode and other settings, clear the PWM registers, + // then disable software shutdown. + + // Unlock the command register. + IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + + // Select PG0 + IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL ); + // Turn off all LEDs. + for ( int i = 0x00; i <= 0x17; i++ ) + { + IS31FL3737_write_register( addr, i, 0x00 ); + } + + // Unlock the command register. + IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + + // Select PG1 + IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM ); + // Set PWM on all LEDs to 0 + // No need to setup Breath registers to PWM as that is the default. + for ( int i = 0x00; i <= 0xBF; i++ ) + { + IS31FL3737_write_register( addr, i, 0x00 ); + } + + // Unlock the command register. + IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + + // Select PG3 + IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION ); + // Set global current to maximum. + IS31FL3737_write_register( addr, ISSI_REG_GLOBALCURRENT, 0xFF ); + // Disable software shutdown. + IS31FL3737_write_register( addr, ISSI_REG_CONFIGURATION, 0x01 ); + + // Wait 10ms to ensure the device has woken up. + #ifdef __AVR__ + _delay_ms( 10 ); + #else + wait_ms(10); + #endif +} + +void IS31FL3737_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) +{ + if ( index >= 0 && index < DRIVER_LED_TOTAL ) { + is31_led led = g_is31_leds[index]; + + g_pwm_buffer[led.driver][led.r] = red; + g_pwm_buffer[led.driver][led.g] = green; + g_pwm_buffer[led.driver][led.b] = blue; + g_pwm_buffer_update_required = true; + } +} + +void IS31FL3737_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) +{ + for ( int i = 0; i < DRIVER_LED_TOTAL; i++ ) + { + IS31FL3737_set_color( i, red, green, blue ); + } +} + +void IS31FL3737_set_led_control_register( uint8_t index, bool red, bool green, bool blue ) +{ + is31_led led = g_is31_leds[index]; + + uint8_t control_register_r = led.r / 8; + uint8_t control_register_g = led.g / 8; + uint8_t control_register_b = led.b / 8; + uint8_t bit_r = led.r % 8; + uint8_t bit_g = led.g % 8; + uint8_t bit_b = led.b % 8; + + if ( red ) { + g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); + } else { + g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); + } + if ( green ) { + g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); + } else { + g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); + } + if ( blue ) { + g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); + } else { + g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); + } + + g_led_control_registers_update_required = true; + +} + +void IS31FL3737_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ) +{ + if ( g_pwm_buffer_update_required ) + { + // Firstly we need to unlock the command register and select PG1 + IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM ); + + IS31FL3737_write_pwm_buffer( addr1, g_pwm_buffer[0] ); + //IS31FL3737_write_pwm_buffer( addr2, g_pwm_buffer[1] ); + } + g_pwm_buffer_update_required = false; +} + +void IS31FL3737_update_led_control_registers( uint8_t addr1, uint8_t addr2 ) +{ + if ( g_led_control_registers_update_required ) + { + // Firstly we need to unlock the command register and select PG0 + IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 ); + IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL ); + for ( int i=0; i<24; i++ ) + { + IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i] ); + //IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i] ); + } + } +} diff --git a/drivers/issi/is31fl3737.h b/drivers/issi/is31fl3737.h new file mode 100644 index 000000000000..69c4b9b538f8 --- /dev/null +++ b/drivers/issi/is31fl3737.h @@ -0,0 +1,207 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#ifndef IS31FL3737_DRIVER_H +#define IS31FL3737_DRIVER_H + +#include +#include + +typedef struct is31_led { + uint8_t driver:2; + uint8_t r; + uint8_t g; + uint8_t b; +} __attribute__((packed)) is31_led; + +extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; + +void IS31FL3737_init( uint8_t addr ); +void IS31FL3737_write_register( uint8_t addr, uint8_t reg, uint8_t data ); +void IS31FL3737_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ); + +void IS31FL3737_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); +void IS31FL3737_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); + +void IS31FL3737_set_led_control_register( uint8_t index, bool red, bool green, bool blue ); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void IS31FL3737_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ); +void IS31FL3737_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); + +#define A_1 0x00 +#define A_2 0x01 +#define A_3 0x02 +#define A_4 0x03 +#define A_5 0x04 +#define A_6 0x05 +#define A_7 0x08 +#define A_8 0x09 +#define A_9 0x0A +#define A_10 0x0B +#define A_11 0x0C +#define A_12 0x0D + +#define B_1 0x10 +#define B_2 0x11 +#define B_3 0x12 +#define B_4 0x13 +#define B_5 0x14 +#define B_6 0x15 +#define B_7 0x18 +#define B_8 0x19 +#define B_9 0x1A +#define B_10 0x1B +#define B_11 0x1C +#define B_12 0x1D + +#define C_1 0x20 +#define C_2 0x21 +#define C_3 0x22 +#define C_4 0x23 +#define C_5 0x24 +#define C_6 0x25 +#define C_7 0x28 +#define C_8 0x29 +#define C_9 0x2A +#define C_10 0x2B +#define C_11 0x2C +#define C_12 0x2D + +#define D_1 0x30 +#define D_2 0x31 +#define D_3 0x32 +#define D_4 0x33 +#define D_5 0x34 +#define D_6 0x35 +#define D_7 0x38 +#define D_8 0x39 +#define D_9 0x3A +#define D_10 0x3B +#define D_11 0x3C +#define D_12 0x3D + +#define E_1 0x40 +#define E_2 0x41 +#define E_3 0x42 +#define E_4 0x43 +#define E_5 0x44 +#define E_6 0x45 +#define E_7 0x48 +#define E_8 0x49 +#define E_9 0x4A +#define E_10 0x4B +#define E_11 0x4C +#define E_12 0x4D + +#define F_1 0x50 +#define F_2 0x51 +#define F_3 0x52 +#define F_4 0x53 +#define F_5 0x54 +#define F_6 0x55 +#define F_7 0x58 +#define F_8 0x59 +#define F_9 0x5A +#define F_10 0x5B +#define F_11 0x5C +#define F_12 0x5D + +#define G_1 0x60 +#define G_2 0x61 +#define G_3 0x62 +#define G_4 0x63 +#define G_5 0x64 +#define G_6 0x65 +#define G_7 0x68 +#define G_8 0x69 +#define G_9 0x6A +#define G_10 0x6B +#define G_11 0x6C +#define G_12 0x6D + +#define H_1 0x70 +#define H_2 0x71 +#define H_3 0x72 +#define H_4 0x73 +#define H_5 0x74 +#define H_6 0x75 +#define H_7 0x78 +#define H_8 0x79 +#define H_9 0x7A +#define H_10 0x7B +#define H_11 0x7C +#define H_12 0x7D + +#define I_1 0x80 +#define I_2 0x81 +#define I_3 0x82 +#define I_4 0x83 +#define I_5 0x84 +#define I_6 0x85 +#define I_7 0x88 +#define I_8 0x89 +#define I_9 0x8A +#define I_10 0x8B +#define I_11 0x8C +#define I_12 0x8D + +#define J_1 0x90 +#define J_2 0x91 +#define J_3 0x92 +#define J_4 0x93 +#define J_5 0x94 +#define J_6 0x95 +#define J_7 0x98 +#define J_8 0x99 +#define J_9 0x9A +#define J_10 0x9B +#define J_11 0x9C +#define J_12 0x9D + +#define K_1 0xA0 +#define K_2 0xA1 +#define K_3 0xA2 +#define K_4 0xA3 +#define K_5 0xA4 +#define K_6 0xA5 +#define K_7 0xA8 +#define K_8 0xA9 +#define K_9 0xAA +#define K_10 0xAB +#define K_11 0xAC +#define K_12 0xAD + +#define L_1 0xB0 +#define L_2 0xB1 +#define L_3 0xB2 +#define L_4 0xB3 +#define L_5 0xB4 +#define L_6 0xB5 +#define L_7 0xB8 +#define L_8 0xB9 +#define L_9 0xBA +#define L_10 0xBB +#define L_11 0xBC +#define L_12 0xBD + +#endif // IS31FL3737_DRIVER_H diff --git a/drivers/oled/glcdfont.c b/drivers/oled/glcdfont.c new file mode 100644 index 000000000000..8b969057e531 --- /dev/null +++ b/drivers/oled/glcdfont.c @@ -0,0 +1,240 @@ +#pragma once + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Helidox 8x6 font with QMK Firmware Logo +// Online editor: http://teripom.x0.com/ + +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, + 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, 0xA4, 0xA4, 0x9C, 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, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 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, + 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, + 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, + 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, + 0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00, + 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, + 0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, + 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, + 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 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, 0xC0, 0xF0, 0xF8, 0xFC, 0x3E, + 0x1E, 0x06, 0x01, 0x00, 0x00, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF, + 0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00, + 0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF, + 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F, + 0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00, + 0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E, + 0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F, + 0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, + 0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E, + 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00, + 0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E, + 0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F, + 0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70, + 0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49, + 0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E, + 0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69, + 0x69, 0x6F, 0x26, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3C, + 0x78, 0x70, 0x60, 0x00, 0x00, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F, + 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E, + 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F, + 0x0F, 0x07, 0x01, 0x01, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/drivers/oled/licenses.txt b/drivers/oled/licenses.txt new file mode 100644 index 000000000000..111603ebf3c7 --- /dev/null +++ b/drivers/oled/licenses.txt @@ -0,0 +1,45 @@ +The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. + + +This is the Linux-penguin again... + +Originally drewn by Larry Ewing (http://www.isc.tamu.edu/~lewing/) +(with the GIMP) the Linux Logo has been vectorized by me (Simon Budig, +http://www.home.unix-ag.org/simon/). + +This happened quite some time ago with Corel Draw 4. But luckily +meanwhile there are tools available to handle vector graphics with +Linux. Bernhard Herzog (bernhard@users.sourceforge.net) deserves kudos +for creating Sketch (http://sketch.sourceforge.net), a powerful free +tool for creating vector graphics. He converted the Corel Draw file to +the Sketch native format. Since I am unable to maintain the Corel Draw +file any longer, the Sketch version now is the "official" one. + +Anja Gerwinski (anja@gerwinski.de) has created an alternate version of +the penguin (penguin-variant.sk) with a thinner mouth line and slightly +altered gradients. It also features a nifty drop shadow. + +The third bird (penguin-flat.sk) is a version reduced to three colors +(black/white/yellow) for e.g. silk screen printing. I made this version +for a mug, available at the friendly folks at +http://www.kernelconcepts.de/ - they do good stuff, mail Petra +(pinguin@kernelconcepts.de) if you need something special or don't +understand the german :-) + +These drawings are copyrighted by Larry Ewing and Simon Budig +(penguin-variant.sk also by Anja Gerwinski), redistribution is free but +has to include this README/Copyright notice. + +The use of these drawings is free. However I am happy about a sample of +your mug/t-shirt/whatever with this penguin on it... + +Have fun + Simon Budig + + +Simon.Budig@unix-ag.org +http://www.home.unix-ag.org/simon/ + +Simon Budig +Am Hardtkoeppel 2 +D-61279 Graevenwiesbach diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c new file mode 100644 index 000000000000..96ea58ccb2c8 --- /dev/null +++ b/drivers/oled/oled_driver.c @@ -0,0 +1,531 @@ +/* +Copyright 2019 Ryan Caltabiano + +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 . +*/ +#include "i2c_master.h" +#include "oled_driver.h" +#include OLED_FONT_H +#include "timer.h" +#include "print.h" + +#include + +#if defined(__AVR__) + #include + #include +#elif defined(ESP8266) + #include +#else // defined(ESP8266) + #define PROGMEM + #define memcpy_P(des, src, len) memcpy(des, src, len) +#endif // defined(__AVR__) + +// Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf +// Fundamental Commands +#define CONTRAST 0x81 +#define DISPLAY_ALL_ON 0xA5 +#define DISPLAY_ALL_ON_RESUME 0xA4 +#define NORMAL_DISPLAY 0xA6 +#define DISPLAY_ON 0xAF +#define DISPLAY_OFF 0xAE + +// Scrolling Commands +#define ACTIVATE_SCROLL 0x2F +#define DEACTIVATE_SCROLL 0x2E +#define SCROLL_RIGHT 0x26 +#define SCROLL_LEFT 0x27 +#define SCROLL_RIGHT_UP 0x29 +#define SCROLL_LEFT_UP 0x2A + +// Addressing Setting Commands +#define MEMORY_MODE 0x20 +#define COLUMN_ADDR 0x21 +#define PAGE_ADDR 0x22 + +// Hardware Configuration Commands +#define DISPLAY_START_LINE 0x40 +#define SEGMENT_REMAP 0xA0 +#define SEGMENT_REMAP_INV 0xA1 +#define MULTIPLEX_RATIO 0xA8 +#define COM_SCAN_INC 0xC0 +#define COM_SCAN_DEC 0xC8 +#define DISPLAY_OFFSET 0xD3 +#define COM_PINS 0xDA + +// Timing & Driving Commands +#define DISPLAY_CLOCK 0xD5 +#define PRE_CHARGE_PERIOD 0xD9 +#define VCOM_DETECT 0xDB + +// Charge Pump Commands +#define CHARGE_PUMP 0x8D + +// Misc defines +#define OLED_TIMEOUT 60000 +#define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) +#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) + +// i2c defines +#define I2C_CMD 0x00 +#define I2C_DATA 0x40 +#if defined(__AVR__) + // already defined on ARM + #define I2C_TIMEOUT 100 + #define I2C_TRANSMIT_P(data) i2c_transmit_P((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT) +#else // defined(__AVR__) + #define I2C_TRANSMIT_P(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT) +#endif // defined(__AVR__) +#define I2C_TRANSMIT(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT) +#define I2C_WRITE_REG(mode, data, size) i2c_writeReg((OLED_DISPLAY_ADDRESS << 1), mode, data, size, I2C_TIMEOUT) + +#define HAS_FLAGS(bits, flags) ((bits & flags) == flags) + +// Display buffer's is the same as the OLED memory layout +// this is so we don't end up with rounding errors with +// parts of the display unusable or don't get cleared correctly +// and also allows for drawing & inverting +uint8_t oled_buffer[OLED_MATRIX_SIZE]; +uint8_t* oled_cursor; +OLED_BLOCK_TYPE oled_dirty = 0; +bool oled_initialized = false; +bool oled_active = false; +bool oled_scrolling = false; +uint8_t oled_rotation = 0; +uint8_t oled_rotation_width = 0; +#if !defined(OLED_DISABLE_TIMEOUT) + uint16_t oled_last_activity; +#endif + +// Internal variables to reduce math instructions + +#if defined(__AVR__) +// identical to i2c_transmit, but for PROGMEM since all initialization is in PROGMEM arrays currently +// probably should move this into i2c_master... +static i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_status_t status = i2c_start(address | I2C_WRITE, timeout); + + for (uint16_t i = 0; i < length && status >= 0; i++) { + status = i2c_write(pgm_read_byte((const char*)data++), timeout); + if (status) break; + } + + i2c_stop(); + + return status; +} +#endif + +// Flips the rendering bits for a character at the current cursor position +static void InvertCharacter(uint8_t *cursor) +{ + const uint8_t *end = cursor + OLED_FONT_WIDTH; + while (cursor < end) { + *cursor = ~(*cursor); + cursor++; + } +} + +bool oled_init(uint8_t rotation) { + oled_rotation = oled_init_user(rotation); + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + oled_rotation_width = OLED_DISPLAY_WIDTH; + } else { + oled_rotation_width = OLED_DISPLAY_HEIGHT; + } + i2c_init(); + + static const uint8_t PROGMEM display_setup1[] = { + I2C_CMD, + DISPLAY_OFF, + DISPLAY_CLOCK, 0x80, + MULTIPLEX_RATIO, OLED_DISPLAY_HEIGHT - 1, + DISPLAY_OFFSET, 0x00, + DISPLAY_START_LINE | 0x00, + CHARGE_PUMP, 0x14, + MEMORY_MODE, 0x00, }; // Horizontal addressing mode + if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) { + print("oled_init cmd set 1 failed\n"); + return false; + } + + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_180)) { + static const uint8_t PROGMEM display_normal[] = { + I2C_CMD, + SEGMENT_REMAP_INV, + COM_SCAN_DEC }; + if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) { + print("oled_init cmd normal rotation failed\n"); + return false; + } + } else { + static const uint8_t PROGMEM display_flipped[] = { + I2C_CMD, + SEGMENT_REMAP, + COM_SCAN_INC }; + if (I2C_TRANSMIT_P(display_flipped) != I2C_STATUS_SUCCESS) { + print("display_flipped failed\n"); + return false; + } + } + + static const uint8_t PROGMEM display_setup2[] = { + I2C_CMD, + COM_PINS, 0x02, + CONTRAST, 0x8F, + PRE_CHARGE_PERIOD, 0xF1, + VCOM_DETECT, 0x40, + DISPLAY_ALL_ON_RESUME, + NORMAL_DISPLAY, + DEACTIVATE_SCROLL, + DISPLAY_ON }; + if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) { + print("display_setup2 failed\n"); + return false; + } + + oled_clear(); + oled_initialized = true; + oled_active = true; + oled_scrolling = false; + return true; +} + +__attribute__((weak)) +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return rotation; +} + +void oled_clear(void) { + memset(oled_buffer, 0, sizeof(oled_buffer)); + oled_cursor = &oled_buffer[0]; + oled_dirty = -1; // -1 will be max value as long as display_dirty is unsigned type +} + +static void calc_bounds(uint8_t update_start, uint8_t* cmd_array) +{ + cmd_array[1] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH; + cmd_array[4] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH; + cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) % OLED_DISPLAY_WIDTH + cmd_array[1]; + cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) / OLED_DISPLAY_WIDTH - 1; +} + +static void calc_bounds_90(uint8_t update_start, uint8_t* cmd_array) +{ + cmd_array[1] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_HEIGHT * 8; + cmd_array[4] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_HEIGHT; + cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8 - 1 + cmd_array[1];; + cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) % OLED_DISPLAY_HEIGHT / 8; +} + +uint8_t crot(uint8_t a, int8_t n) +{ + const uint8_t mask = 0x7; + n &= mask; + return a << n | a >> (-n & mask); +} + +static void rotate_90(const uint8_t* src, uint8_t* dest) +{ + for (uint8_t i = 0, shift = 7; i < 8; ++i, --shift) { + uint8_t selector = (1 << i); + for (uint8_t j = 0; j < 8; ++j) { + dest[i] |= crot(src[j] & selector, shift - (int8_t)j); + } + } +} + +void oled_render(void) { + // Do we have work to do? + if (!oled_dirty || oled_scrolling) { + return; + } + + // Find first dirty block + uint8_t update_start = 0; + while (!(oled_dirty & (1 << update_start))) { ++update_start; } + + // Set column & page position + static uint8_t display_start[] = { + I2C_CMD, + COLUMN_ADDR, 0, OLED_DISPLAY_WIDTH - 1, + PAGE_ADDR, 0, OLED_DISPLAY_HEIGHT / 8 - 1 }; + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + calc_bounds(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start + } else { + calc_bounds_90(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start + } + + // Send column & page position + if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) { + print("oled_render offset command failed\n"); + return; + } + + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + // Send render data chunk as is + if (I2C_WRITE_REG(I2C_DATA, &oled_buffer[OLED_BLOCK_SIZE * update_start], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) { + print("oled_render data failed\n"); + return; + } + } else { + // Rotate the render chunks + const static uint8_t source_map[] = OLED_SOURCE_MAP; + const static uint8_t target_map[] = OLED_TARGET_MAP; + + static uint8_t temp_buffer[OLED_BLOCK_SIZE]; + memset(temp_buffer, 0, sizeof(temp_buffer)); + for(uint8_t i = 0; i < sizeof(source_map); ++i) { + rotate_90(&oled_buffer[OLED_BLOCK_SIZE * update_start + source_map[i]], &temp_buffer[target_map[i]]); + } + + // Send render data chunk after rotating + if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[0], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) { + print("oled_render data failed\n"); + return; + } + } + + // Turn on display if it is off + oled_on(); + + // Clear dirty flag + oled_dirty &= ~(1 << update_start); +} + +void oled_set_cursor(uint8_t col, uint8_t line) { + uint16_t index = line * oled_rotation_width + col * OLED_FONT_WIDTH; + + // Out of bounds? + if (index >= OLED_MATRIX_SIZE) { + index = 0; + } + + oled_cursor = &oled_buffer[index]; +} + +void oled_advance_page(bool clearPageRemainder) { + uint16_t index = oled_cursor - &oled_buffer[0]; + uint8_t remaining = oled_rotation_width - (index % oled_rotation_width); + + if (clearPageRemainder) { + // Remaining Char count + remaining = remaining / OLED_FONT_WIDTH; + + // Write empty character until next line + while (remaining--) + oled_write_char(' ', false); + } else { + // Next page index out of bounds? + if (index + remaining >= OLED_MATRIX_SIZE) { + index = 0; + remaining = 0; + } + + oled_cursor = &oled_buffer[index + remaining]; + } +} + +void oled_advance_char(void) { + uint16_t nextIndex = oled_cursor - &oled_buffer[0] + OLED_FONT_WIDTH; + uint8_t remainingSpace = oled_rotation_width - (nextIndex % oled_rotation_width); + + // Do we have enough space on the current line for the next character + if (remainingSpace < OLED_FONT_WIDTH) { + nextIndex += remainingSpace; + } + + // Did we go out of bounds + if (nextIndex >= OLED_MATRIX_SIZE) { + nextIndex = 0; + } + + // Update cursor position + oled_cursor = &oled_buffer[nextIndex]; +} + +// Main handler that writes character data to the display buffer +void oled_write_char(const char data, bool invert) { + // Advance to the next line if newline + if (data == '\n') { + // Old source wrote ' ' until end of line... + oled_advance_page(true); + return; + } + + // copy the current render buffer to check for dirty after + static uint8_t oled_temp_buffer[OLED_FONT_WIDTH]; + memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH); + + // set the reder buffer data + uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index + if (cast_data < OLED_FONT_START || cast_data > OLED_FONT_END) { + memset(oled_cursor, 0x00, OLED_FONT_WIDTH); + } else { + const uint8_t *glyph = &font[(cast_data - OLED_FONT_START) * OLED_FONT_WIDTH]; + memcpy_P(oled_cursor, glyph, OLED_FONT_WIDTH); + } + + // Invert if needed + if (invert) { + InvertCharacter(oled_cursor); + } + + // Dirty check + if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) { + uint16_t index = oled_cursor - &oled_buffer[0]; + oled_dirty |= (1 << (index / OLED_BLOCK_SIZE)); + // Edgecase check if the written data spans the 2 chunks + oled_dirty |= (1 << ((index + OLED_FONT_WIDTH) / OLED_BLOCK_SIZE)); + } + + // Finally move to the next char + oled_advance_char(); +} + +void oled_write(const char *data, bool invert) { + const char *end = data + strlen(data); + while (data < end) { + oled_write_char(*data, invert); + data++; + } +} + +void oled_write_ln(const char *data, bool invert) { + oled_write(data, invert); + oled_advance_page(true); +} + +#if defined(__AVR__) +void oled_write_P(const char *data, bool invert) { + uint8_t c = pgm_read_byte(data); + while (c != 0) { + oled_write_char(c, invert); + c = pgm_read_byte(++data); + } +} + +void oled_write_ln_P(const char *data, bool invert) { + oled_write_P(data, invert); + oled_advance_page(true); +} +#endif // defined(__AVR__) + +bool oled_on(void) { +#if !defined(OLED_DISABLE_TIMEOUT) + oled_last_activity = timer_read(); +#endif + + static const uint8_t PROGMEM display_on[] = { I2C_CMD, DISPLAY_ON }; + if (!oled_active) { + if (I2C_TRANSMIT_P(display_on) != I2C_STATUS_SUCCESS) { + print("oled_on cmd failed\n"); + return oled_active; + } + oled_active = true; + } + return oled_active; +} + +bool oled_off(void) { + static const uint8_t PROGMEM display_off[] = { I2C_CMD, DISPLAY_OFF }; + if (oled_active) { + if (I2C_TRANSMIT_P(display_off) != I2C_STATUS_SUCCESS) { + print("oled_off cmd failed\n"); + return oled_active; + } + oled_active = false; + } + return !oled_active; +} + +bool oled_scroll_right(void) { + // Dont enable scrolling if we need to update the display + // This prevents scrolling of bad data from starting the scroll too early after init + if (!oled_dirty && !oled_scrolling) { + static const uint8_t PROGMEM display_scroll_right[] = { + I2C_CMD, SCROLL_RIGHT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL }; + if (I2C_TRANSMIT_P(display_scroll_right) != I2C_STATUS_SUCCESS) { + print("oled_scroll_right cmd failed\n"); + return oled_scrolling; + } + oled_scrolling = true; + } + return oled_scrolling; +} + +bool oled_scroll_left(void) { + // Dont enable scrolling if we need to update the display + // This prevents scrolling of bad data from starting the scroll too early after init + if (!oled_dirty && !oled_scrolling) { + static const uint8_t PROGMEM display_scroll_left[] = { + I2C_CMD, SCROLL_LEFT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL }; + if (I2C_TRANSMIT_P(display_scroll_left) != I2C_STATUS_SUCCESS) { + print("oled_scroll_left cmd failed\n"); + return oled_scrolling; + } + oled_scrolling = true; + } + return oled_scrolling; +} + +bool oled_scroll_off(void) { + if (oled_scrolling) { + static const uint8_t PROGMEM display_scroll_off[] = { I2C_CMD, DEACTIVATE_SCROLL }; + if (I2C_TRANSMIT_P(display_scroll_off) != I2C_STATUS_SUCCESS) { + print("oled_scroll_off cmd failed\n"); + return oled_scrolling; + } + oled_scrolling = false; + } + return !oled_scrolling; +} + +uint8_t oled_max_chars(void) { + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + return OLED_DISPLAY_WIDTH / OLED_FONT_WIDTH; + } + return OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH; +} + +uint8_t oled_max_lines(void) { + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + return OLED_DISPLAY_HEIGHT / OLED_FONT_HEIGHT; + } + return OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT; +} + +void oled_task(void) { + if (!oled_initialized) { + return; + } + + oled_set_cursor(0, 0); + + oled_task_user(); + + // Smart render system, no need to check for dirty + oled_render(); + + // Display timeout check +#if !defined(OLED_DISABLE_TIMEOUT) + if (oled_active && timer_elapsed(oled_last_activity) > OLED_TIMEOUT) { + oled_off(); + } +#endif +} + +__attribute__((weak)) +void oled_task_user(void) { +} diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h new file mode 100644 index 000000000000..ec07f1d9b844 --- /dev/null +++ b/drivers/oled/oled_driver.h @@ -0,0 +1,192 @@ +/* +Copyright 2019 Ryan Caltabiano + +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 . +*/ +#pragma once + +#include +#include + + +#if defined(OLED_DISPLAY_CUSTOM) + // Expected user to implement the necessary defines +#elif defined(OLED_DISPLAY_128X64) + // Double height 128x64 + #define OLED_DISPLAY_WIDTH 128 + #define OLED_DISPLAY_HEIGHT 64 + #define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 1024 (compile time mathed) + #define OLED_BLOCK_TYPE uint32_t + #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 32 (compile time mathed) + #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed) + + // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays + // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode + #define OLED_SOURCE_MAP { 32, 40, 48, 56 } + #define OLED_TARGET_MAP { 24, 16, 8, 0 } + // If OLED_BLOCK_TYPE is uint16_t, these tables would look like: + // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } + // #define OLED_TARGET_MAP { 56, 48, 40, 32, 24, 16, 8, 0 } + // If OLED_BLOCK_TYPE is uint8_t, these tables would look like: + // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 } + // #define OLED_TARGET_MAP { 56, 120, 48, 112, 40, 104, 32, 96, 24, 88, 16, 80, 8, 72, 0, 64 } +#else // defined(OLED_DISPLAY_128X64) + // Default 128x32 + #define OLED_DISPLAY_WIDTH 128 + #define OLED_DISPLAY_HEIGHT 32 + #define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 512 (compile time mathed) + #define OLED_BLOCK_TYPE uint16_t // Type to use for segmenting the oled display for smart rendering, use unsigned types only + #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 16 (compile time mathed) + #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed) + + // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays + // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode + #define OLED_SOURCE_MAP { 0, 8, 16, 24 } + #define OLED_TARGET_MAP { 24, 16, 8, 0 } + // If OLED_BLOCK_TYPE is uint8_t, these tables would look like: + // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 } + // #define OLED_TARGET_MAP { 48, 32, 16, 0, 56, 40, 24, 8 } +#endif // defined(OLED_DISPLAY_CUSTOM) + +// Address to use for tthe i2d oled communication +#if !defined(OLED_DISPLAY_ADDRESS) + #define OLED_DISPLAY_ADDRESS 0x3C +#endif + +// Custom font file to use +#if !defined(OLED_FONT_H) + #define OLED_FONT_H "glcdfont.c" +#endif +// unsigned char value of the first character in the font file +#if !defined(OLED_FONT_START) + #define OLED_FONT_START 0 +#endif +// unsigned char value of the last character in the font file +#if !defined(OLED_FONT_END) + #define OLED_FONT_END 224 +#endif +// Font render width +#if !defined(OLED_FONT_WIDTH) + #define OLED_FONT_WIDTH 6 +#endif +// Font render height +#if !defined(OLED_FONT_HEIGHT) + #define OLED_FONT_HEIGHT 8 +#endif + +// OLED Rotation enum values are flags +typedef enum { + OLED_ROTATION_0 = 0, + OLED_ROTATION_90 = 1, + OLED_ROTATION_180 = 2, + OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180 +} oled_rotation_t; + +// Initialize the oled display, rotating the rendered output based on the define passed in. +// Returns true if the OLED was initialized successfully +bool oled_init(oled_rotation_t rotation); + +// Called at the start of oled_init, weak function overridable by the user +// rotation - the value passed into oled_init +// Return new oled_rotation_t if you want to override default rotation +oled_rotation_t oled_init_user(oled_rotation_t rotation); + +// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering +void oled_clear(void); + +// Renders the dirty chunks of the buffer to oled display +void oled_render(void); + +// Moves cursor to character position indicated by column and line, wraps if out of bounds +// Max column denoted by 'oled_max_chars()' and max lines by 'oled_max_lines()' functions +void oled_set_cursor(uint8_t col, uint8_t line); + +// Advances the cursor to the next page, writing ' ' if true +// Wraps to the begining when out of bounds +void oled_advance_page(bool clearPageRemainder); + +// Moves the cursor forward 1 character length +// Advance page if there is not enough room for the next character +// Wraps to the begining when out of bounds +void oled_advance_char(void); + +// Writes a single character to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Main handler that writes character data to the display buffer +void oled_write_char(const char data, bool invert); + +// Writes a string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +void oled_write(const char *data, bool invert); + +// Writes a string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Advances the cursor to the next page, wiring ' ' to the remainder of the current page +void oled_write_ln(const char *data, bool invert); + +#if defined(__AVR__) +// Writes a PROGMEM string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Remapped to call 'void oled_write(const char *data, bool invert);' on ARM +void oled_write_P(const char *data, bool invert); + +// Writes a PROGMEM string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Advances the cursor to the next page, wiring ' ' to the remainder of the current page +// Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM +void oled_write_ln_P(const char *data, bool invert); +#else + // Writes a string to the buffer at current cursor position + // Advances the cursor while writing, inverts the pixels if true + #define oled_write_P(data, invert) oled_write(data, invert) + + // Writes a string to the buffer at current cursor position + // Advances the cursor while writing, inverts the pixels if true + // Advances the cursor to the next page, wiring ' ' to the remainder of the current page + #define oled_write_ln_P(data, invert) oled_write(data, invert) +#endif // defined(__AVR__) + +// Can be used to manually turn on the screen if it is off +// Returns true if the screen was on or turns on +bool oled_on(void); + +// Can be used to manually turn off the screen if it is on +// Returns true if the screen was off or turns off +bool oled_off(void); + +// Basically it's oled_render, but with timeout management and oled_task_user calling! +void oled_task(void); + +// Called at the start of oled_task, weak function overridable by the user +void oled_task_user(void); + +// Scrolls the entire display right +// Returns true if the screen was scrolling or starts scrolling +// NOTE: display contents cannot be changed while scrolling +bool oled_scroll_right(void); + +// Scrolls the entire display left +// Returns true if the screen was scrolling or starts scrolling +// NOTE: display contents cannot be changed while scrolling +bool oled_scroll_left(void); + +// Turns off display scrolling +// Returns true if the screen was not scrolling or stops scrolling +bool oled_scroll_off(void); + +// Returns the maximum number of characters that will fit on a line +uint8_t oled_max_chars(void); + +// Returns the maximum number of lines that will fit on the oled +uint8_t oled_max_lines(void); diff --git a/drivers/qwiic/micro_oled.c b/drivers/qwiic/micro_oled.c index 35c5d6ee1d93..092dd551e386 100644 --- a/drivers/qwiic/micro_oled.c +++ b/drivers/qwiic/micro_oled.c @@ -28,6 +28,7 @@ * along with this program. If not, see . */ #include "micro_oled.h" +#include #include #include "util/font5x7.h" #include "util/font8x16.h" @@ -309,12 +310,11 @@ static uint8_t micro_oled_screen_buffer[] = { #else //catchall for custom screen szies static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {0}; -#endif +#endif void micro_oled_init(void) { - i2c_init(); i2c_start(I2C_ADDRESS_SA0_1); diff --git a/keyboards/1upkeyboards/1up60hse/1up60hse.h b/keyboards/1upkeyboards/1up60hse/1up60hse.h index d24bbaabf604..f1b4f5e43e96 100644 --- a/keyboards/1upkeyboards/1up60hse/1up60hse.h +++ b/keyboards/1upkeyboards/1up60hse/1up60hse.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" @@ -36,4 +35,3 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D }, \ { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, KC_NO, K4D } \ } -#endif diff --git a/keyboards/1upkeyboards/1up60hse/config.h b/keyboards/1upkeyboards/1up60hse/config.h index 420d0a025897..188603622526 100644 --- a/keyboards/1upkeyboards/1up60hse/config.h +++ b/keyboards/1upkeyboards/1up60hse/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, E6, D1, D0, D2, D3, D5, D6, D7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c index 48350a53e0c7..39473f606732 100644 --- a/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_LCTL + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL ), [1] = LAYOUT_60_ansi( diff --git a/keyboards/1upkeyboards/1up60hse/rules.mk b/keyboards/1upkeyboards/1up60hse/rules.mk index f33e33fd9e47..72e6849e04f1 100644 --- a/keyboards/1upkeyboards/1up60hse/rules.mk +++ b/keyboards/1upkeyboards/1up60hse/rules.mk @@ -68,5 +68,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +EXTRAFLAGS += -flto LAYOUTS = 60_ansi diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.h b/keyboards/1upkeyboards/1up60hte/1up60hte.h index eb4082f1ae75..b6d3c8e0d15d 100644 --- a/keyboards/1upkeyboards/1up60hte/1up60hte.h +++ b/keyboards/1upkeyboards/1up60hte/1up60hte.h @@ -19,12 +19,12 @@ along with this program. If not, see . #include "quantum.h" -#define LAYOUT_all( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ +#define LAYOUT_tsangan( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K413, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ - K400, K401, K402, K406, K410, K411, K412, K413 \ + K400, K401, K402, K406, K410, K411, K412 \ ) { \ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ @@ -35,11 +35,11 @@ along with this program. If not, see . /* HHKB Variant */ #define LAYOUT_60_hhkb( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K413, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ - K401, K402, K406, K410, K411, K413 \ + K401, K402, K406, K410, K411 \ ) { \ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ @@ -47,4 +47,3 @@ along with this program. If not, see . { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO }, \ { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413 } \ } - diff --git a/keyboards/1upkeyboards/1up60hte/config.h b/keyboards/1upkeyboards/1up60hte/config.h index c7e023a5edcb..892a8b9fe82c 100644 --- a/keyboards/1upkeyboards/1up60hte/config.h +++ b/keyboards/1upkeyboards/1up60hte/config.h @@ -62,4 +62,4 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -#endif +#endif \ No newline at end of file diff --git a/keyboards/1upkeyboards/1up60hte/info.json b/keyboards/1upkeyboards/1up60hte/info.json new file mode 100644 index 000000000000..86521d36bd33 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "1up60hte", + "url": "https://www.1upkeyboards.com/shop/controllers/1up-rgb-60-pcb-hte/", + "maintainer": "1upkeyboards", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_tsangan": { + "layout": [{"label":"Esc", "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":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4}, {"label":"Meta", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Meta", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_60_hhkb": { + "layout": [{"label":"Esc", "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":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"label":"Meta", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Meta", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}] + } + } +} diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c index 396b660803a2..359ac7540637 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c @@ -17,21 +17,19 @@ along with this program. If not, see . #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_NO, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_BSPC), - - [1] = LAYOUT_all( - 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) - + [0] = LAYOUT_tsangan( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), + + [1] = LAYOUT_tsangan( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_CLR, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; void matrix_init_user(void) { @@ -46,35 +44,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { writePinLow(B6); } else { writePinHigh(B6); } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } - } diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c index 1b06739b68f4..5312e3b6752a 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c +++ b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c @@ -17,20 +17,19 @@ along with this program. If not, see . #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [0] = LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_BSPC), - - [1] = LAYOUT_all( - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, - KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL) + [0] = LAYOUT_tsangan( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_NO, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_NO), + + [1] = LAYOUT_tsangan( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_CLR, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; void matrix_init_user(void) { @@ -45,35 +44,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { writePinLow(B6); } else { writePinHigh(B6); } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } - } diff --git a/keyboards/1upkeyboards/1up60hte/rules.mk b/keyboards/1upkeyboards/1up60hte/rules.mk index b8b5582991ba..860a754a643d 100644 --- a/keyboards/1upkeyboards/1up60hte/rules.mk +++ b/keyboards/1upkeyboards/1up60hte/rules.mk @@ -54,5 +54,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes +EXTRAFLAGS += -flto LAYOUTS = 60_hhkb diff --git a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h index 6905fd220508..0f6818a6d861 100644 --- a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h +++ b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h @@ -1,5 +1,4 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" @@ -77,5 +76,3 @@ K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ KC_NO,K401, K403, K406, KC_NO,K411, K413, KC_NO \ ) - -#endif diff --git a/keyboards/1upkeyboards/1up60rgb/config.h b/keyboards/1upkeyboards/1up60rgb/config.h index 86696dab8457..fbafe0c44bc1 100644 --- a/keyboards/1upkeyboards/1up60rgb/config.h +++ b/keyboards/1upkeyboards/1up60rgb/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,5 +45,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c index cb372e15d733..8567b780a75d 100644 --- a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "1up60rgb.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c new file mode 100644 index 000000000000..bb0d10405cd2 --- /dev/null +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * Layer 0 + * ,-----------------------------------------------------------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Esc | a | s | d | f | g | h | j | k | l | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | z | x | c | v | b | n | m | , | . | / | Shift | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | L1 | Alt | space | Alt | Sup | L1 | Ctrl | + * \-----------------------------------------------------------------------------------------/ + * + */ + LAYOUT_all( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_ESC, 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_ENT, + KC_LSHIFT, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT, KC_RSHIFT, + KC_LCTL, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + +/* + * Layer 1 + * ,-----------------------------------------------------------------------------------------. + * | | f1 | f2 | f3 | f4 | f5 | f6 | f7 | f8 | f9 | f10 | f11 | f12 | Del | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | Ins | | Paus| | | Prnt | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | L | D | U | R | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | Hom | PDn | PUp | End | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | + * \-----------------------------------------------------------------------------------------/ + * + */ + LAYOUT_all( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, KC_PSCR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c index c166cd0b18c3..f4dd36d6dc5a 100644 --- a/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c @@ -37,11 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RAISE, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, RGB, KC_RCTL ), // raise layer to handle function & nav keys - [_raise] = LAYOUT_all + [_raise] = LAYOUT_all ( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_LSCR, KC_PAUSE, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, KC_TRNS, KC_TRNS, + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_LSCR, KC_PAUSE, KC_TRNS, + KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, 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 ), diff --git a/keyboards/1upkeyboards/1up60rgb/readme.md b/keyboards/1upkeyboards/1up60rgb/readme.md index de3ad98b7388..ad733f6b5e55 100644 --- a/keyboards/1upkeyboards/1up60rgb/readme.md +++ b/keyboards/1upkeyboards/1up60rgb/readme.md @@ -1,4 +1,4 @@ -# 1upkeyboards 60% RGB +# 1up60rgb 60% RGB Firmware for custom keyboard PCB with 60% key layout. diff --git a/keyboards/1upkeyboards/1up60rgb/rules.mk b/keyboards/1upkeyboards/1up60rgb/rules.mk index 540e4ea96c27..8b1cf6667fa1 100644 --- a/keyboards/1upkeyboards/1up60rgb/rules.mk +++ b/keyboards/1upkeyboards/1up60rgb/rules.mk @@ -44,15 +44,15 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= no # Commands for debug and configuration -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 -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= yes +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift 60_hhkb diff --git a/keyboards/1upkeyboards/readme.md b/keyboards/1upkeyboards/readme.md index 4f075d827922..de8ae36acb6c 100644 --- a/keyboards/1upkeyboards/readme.md +++ b/keyboards/1upkeyboards/readme.md @@ -1,5 +1,7 @@ # 1UP Keyboards +1UP Keyboards is an online mechanical keyboard retailer located in New York, USA. + Website: [1UP Keyboards](https://www.1upkeyboards.com/) Discord: [Server Invite](https://discordapp.com/invite/c6SYn8) YouTube: [skiwithpete](https://www.youtube.com/user/skiwithpete) \ No newline at end of file diff --git a/keyboards/1upkeyboards/super16/config.h b/keyboards/1upkeyboards/super16/config.h index 1f97c6fea90b..4af4dda63ae3 100644 --- a/keyboards/1upkeyboards/super16/config.h +++ b/keyboards/1upkeyboards/super16/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define PRODUCT_ID 0x2010 #define DEVICE_VER 0x0001 #define MANUFACTURER 1upkeyboards #define PRODUCT super16 @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D4, C6, F6, F7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* @@ -65,9 +65,9 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -/*== all animations enable ==*/ -// #define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ + /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS + /*== or choose animations ==*/ // #define RGBLIGHT_EFFECT_BREATHING // #define RGBLIGHT_EFFECT_RAINBOW_MOOD // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL @@ -85,10 +85,9 @@ along with this program. If not, see . /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST -/* number of backlight levels */ - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE + /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE @@ -242,3 +241,5 @@ along with this program. If not, see . /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 + +/* prevent stuck modifiers */ diff --git a/keyboards/1upkeyboards/super16/info.json b/keyboards/1upkeyboards/super16/info.json index e8f4faa23d4a..10f81f4d08b5 100644 --- a/keyboards/1upkeyboards/super16/info.json +++ b/keyboards/1upkeyboards/super16/info.json @@ -1,12 +1,15 @@ { - "keyboard_name": "super16", - "url": "", - "maintainer": "qmk", - "width": 4, - "height": 4, - "layouts": { - "LAYOUT_ortho_4x4": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}] - } + "keyboard_name": "super16", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}] + }, + "LAYOUT_numpad_4x4": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0, "h":2}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2, "h":2}, {"x":0, "y":3, "w":2}, {"x":2, "y":3}] } -} \ No newline at end of file + } +} diff --git a/keyboards/1upkeyboards/super16/keymaps/default/config.h b/keyboards/1upkeyboards/super16/keymaps/default/config.h index 16fc8b974680..26c6d6ade101 100644 --- a/keyboards/1upkeyboards/super16/keymaps/default/config.h +++ b/keyboards/1upkeyboards/super16/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2019 'mechmerlin' +/* Copyright 2019 MechMerlin * * 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 diff --git a/keyboards/1upkeyboards/super16/keymaps/default/keymap.c b/keyboards/1upkeyboards/super16/keymaps/default/keymap.c index 36ad3f2839af..47889abae574 100644 --- a/keyboards/1upkeyboards/super16/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/super16/keymaps/default/keymap.c @@ -15,40 +15,16 @@ */ #include QMK_KEYBOARD_H -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_ortho_4x4( /* Base */ - KC_A, KC_1, KC_2, KC_4, \ - KC_A, KC_1, KC_2, KC_4, \ - KC_A, KC_1, KC_2, KC_4, \ - KC_A, KC_1, KC_2, KC_4 \ + RGB_TOG, KC_1, KC_U, KC_P, + RGB_MOD, KC_1, KC_U, KC_P, + RGB_TOG, KC_1, KC_U, KC_P, + RGB_MOD, KC_1, KC_U, KC_P ), }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; - case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } return true; } diff --git a/keyboards/1upkeyboards/super16/rules.mk b/keyboards/1upkeyboards/super16/rules.mk index efcde883428f..31042dfb8119 100644 --- a/keyboards/1upkeyboards/super16/rules.mk +++ b/keyboards/1upkeyboards/super16/rules.mk @@ -1,5 +1,4 @@ # MCU name -#MCU = at90usb1286 MCU = atmega32u4 # Processor frequency. @@ -15,7 +14,6 @@ MCU = atmega32u4 # software delays. F_CPU = 16000000 - # # LUFA specific # @@ -48,7 +46,6 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # atmega32a bootloadHID BOOTLOADER = caterina - # If you don't know the bootloader type, then you can specify the # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line # Teensy halfKay 512 @@ -58,26 +55,27 @@ BOOTLOADER = caterina # USBaspLoader 2048 # OPT_DEFS += -DBOOTLOADER_SIZE=4096 +#EXTRAFLAGS += -flto # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -LAYOUTS = ortho_4x4 \ No newline at end of file +LAYOUTS = ortho_4x4 numpad_4x4 diff --git a/keyboards/1upkeyboards/super16/super16.c b/keyboards/1upkeyboards/super16/super16.c index cf33cab92698..72e47f447b12 100644 --- a/keyboards/1upkeyboards/super16/super16.c +++ b/keyboards/1upkeyboards/super16/super16.c @@ -16,28 +16,28 @@ #include "super16.h" void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up + // put your keyboard start-up code here + // runs once when the firmware starts up - matrix_init_user(); + matrix_init_user(); } void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) + // put your looping keyboard code here + // runs every cycle (a lot) - matrix_scan_user(); + 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 + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware - return process_record_user(keycode, record); + return process_record_user(keycode, record); } void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); + led_set_user(usb_led); } diff --git a/keyboards/1upkeyboards/super16/super16.h b/keyboards/1upkeyboards/super16/super16.h index a95f687b164a..0595af8dcd6e 100644 --- a/keyboards/1upkeyboards/super16/super16.h +++ b/keyboards/1upkeyboards/super16/super16.h @@ -25,15 +25,27 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ + #define LAYOUT_ortho_4x4( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, k23, \ - k30, k31, k32, k33 \ -) \ -{ \ - { k00, k01, k02, k03 }, \ - { k10, k11, k12, k13 }, \ - { k20, k21, k22, k23 }, \ - { k30, k31, k32, k33 }, \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#define LAYOUT_numpad_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K31, K32 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { KC_NO, K31, K32, KC_NO } \ } diff --git a/keyboards/1upkeyboards/sweet16/config.h b/keyboards/1upkeyboards/sweet16/config.h index eedd3708f219..b05b5774006e 100644 --- a/keyboards/1upkeyboards/sweet16/config.h +++ b/keyboards/1upkeyboards/sweet16/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -47,4 +46,3 @@ #define RGBLIGHT_VAL_STEP 8 #endif -#endif diff --git a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c index 899afaba1742..4cc754dc164d 100644 --- a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "sweet16.h" +#include QMK_KEYBOARD_H enum custom_keycodes { UP_URL = SAFE_RANGE diff --git a/keyboards/1upkeyboards/sweet16/readme.md b/keyboards/1upkeyboards/sweet16/readme.md index 3b7b1d6f0b09..f096a5fc992a 100644 --- a/keyboards/1upkeyboards/sweet16/readme.md +++ b/keyboards/1upkeyboards/sweet16/readme.md @@ -1,5 +1,4 @@ -Sweet16 -=== +# Sweet 16 Macropad A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Bishop Keyboards diff --git a/keyboards/1upkeyboards/sweet16/rules.mk b/keyboards/1upkeyboards/sweet16/rules.mk index 212e74059e4b..e3436dc3387f 100644 --- a/keyboards/1upkeyboards/sweet16/rules.mk +++ b/keyboards/1upkeyboards/sweet16/rules.mk @@ -53,4 +53,5 @@ 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 BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes +EXTRAFLAGS += -flto diff --git a/keyboards/1upkeyboards/sweet16/sweet16.h b/keyboards/1upkeyboards/sweet16/sweet16.h index 879f51fae66a..7320ccd9e074 100644 --- a/keyboards/1upkeyboards/sweet16/sweet16.h +++ b/keyboards/1upkeyboards/sweet16/sweet16.h @@ -1,5 +1,4 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" @@ -29,4 +28,3 @@ { KC_NO, K31, K32, KC_NO } \ } -#endif diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h index 338683ee7e7b..7381a76d92e5 100644 --- a/keyboards/40percentclub/25/config.h +++ b/keyboards/40percentclub/25/config.h @@ -54,7 +54,7 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/40percentclub/4x4/config.h b/keyboards/40percentclub/4x4/config.h index 5dc780f0e7b3..3b41e501d473 100644 --- a/keyboards/40percentclub/4x4/config.h +++ b/keyboards/40percentclub/4x4/config.h @@ -30,7 +30,7 @@ #define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B7, D6, F7, F6, F5, F4, F1, F0, B3, B1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN C7 diff --git a/keyboards/40percentclub/5x5/config.h b/keyboards/40percentclub/5x5/config.h index bf521e71e91e..f1c348a48ff5 100644 --- a/keyboards/40percentclub/5x5/config.h +++ b/keyboards/40percentclub/5x5/config.h @@ -30,7 +30,7 @@ #define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B7, D6, F7, F6, F5, F4, F1, F0, B3, B1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h index 6a96c4757dd5..c6beafa41221 100644 --- a/keyboards/40percentclub/6lit/config.h +++ b/keyboards/40percentclub/6lit/config.h @@ -55,7 +55,7 @@ #define MATRIX_COL_PINS { F6, F7, B1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h index aba9f09ae478..1443c1ca1ddf 100644 --- a/keyboards/40percentclub/foobar/config.h +++ b/keyboards/40percentclub/foobar/config.h @@ -55,7 +55,7 @@ #define MATRIX_COL_PINS { F6, F7, B1, B3, B2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/40percentclub/foobar/info.json b/keyboards/40percentclub/foobar/info.json index cb7f29b25613..6d722ae6ee86 100644 --- a/keyboards/40percentclub/foobar/info.json +++ b/keyboards/40percentclub/foobar/info.json @@ -2,10 +2,12 @@ "keyboard_name": "foobar", "url": "", "maintainer": "qmk", - "width": 6, - "height": 2, + "width": 10, + "height": 3, "layouts": { "LAYOUT_macro": { + "width": 5, + "height": 3, "key_count": 15, "layout": [ {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h index 1c4298bc3894..c74fcacbb951 100644 --- a/keyboards/40percentclub/half_n_half/config.h +++ b/keyboards/40percentclub/half_n_half/config.h @@ -45,13 +45,14 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -#define DIODE_DIRECTION ROW2COL +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define USE_SERIAL // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/40percentclub/half_n_half/half_n_half.h b/keyboards/40percentclub/half_n_half/half_n_half.h index 6cec5992908c..bc330c9cb7b8 100644 --- a/keyboards/40percentclub/half_n_half/half_n_half.h +++ b/keyboards/40percentclub/half_n_half/half_n_half.h @@ -16,6 +16,7 @@ #pragma once #include "quantum.h" +#define ___ KC_NO /* This a shortcut to help you visually see your layout. * @@ -26,18 +27,22 @@ * represents the switch matrix. */ #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K50, K51, K52, K53, K54, K55, K56, \ - K10, K11, K12, K13, K14, K15, K16, K60, K61, K62, K63, K64, K65, K66, \ - K20, K21, K22, K23, K24, K25, K26, K70, K71, K72, K73, K74, K75, K76, \ - K34, K82 \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L34, R32 \ ) { \ - { K00, K01, K02, K03, K04, K05, K06 }, \ - { K10, K11, K12, K13, K14, K15, K16 }, \ - { K20, K21, K22, K23, K24, K25, K26 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K34, KC_NO, KC_NO }, \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { ___, ___, ___, ___, L34, ___, ___ }, \ \ - { K56, K55, K54, K53, K52, K51, K50 }, \ - { K66, K65, K64, K63, K62, K61, K60 }, \ - { K76, K75, K74, K73, K72, K71, K70 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K82, KC_NO, KC_NO } \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { ___, ___, ___, ___, R32, ___, ___ } \ } + +#ifdef USE_I2C + #error "I2C not Supported" +#endif diff --git a/keyboards/40percentclub/half_n_half/info.json b/keyboards/40percentclub/half_n_half/info.json index e69de29bb2d1..e791e36c68a8 100644 --- a/keyboards/40percentclub/half_n_half/info.json +++ b/keyboards/40percentclub/half_n_half/info.json @@ -0,0 +1,62 @@ +{ + "keyboard_name": "half_n_half", + "url": "", + "maintainer": "qmk", + "width": 14, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 44, + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"L06", "x":6, "y":0}, + {"label":"R00", "x":7, "y":0}, + {"label":"R01", "x":8, "y":0}, + {"label":"R02", "x":9, "y":0}, + {"label":"R03", "x":10, "y":0}, + {"label":"R04", "x":11, "y":0}, + {"label":"R05", "x":12, "y":0}, + {"label":"R06", "x":13, "y":0}, + + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"L16", "x":6, "y":1}, + {"label":"R10", "x":7, "y":1}, + {"label":"R11", "x":8, "y":1}, + {"label":"R12", "x":9, "y":1}, + {"label":"R13", "x":10, "y":1}, + {"label":"R14", "x":11, "y":1}, + {"label":"R15", "x":12, "y":1}, + {"label":"R16", "x":13, "y":1}, + + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"L26", "x":6, "y":2}, + {"label":"R20", "x":7, "y":2}, + {"label":"R21", "x":8, "y":2}, + {"label":"R22", "x":9, "y":2}, + {"label":"R23", "x":10, "y":2}, + {"label":"R24", "x":11, "y":2}, + {"label":"R25", "x":12, "y":2}, + {"label":"R26", "x":13, "y":2}, + + {"label":"L34", "x":4, "y":3, "w":2}, + {"label":"R32", "x":8, "y":3, "w":2} + ] + } + } +} + \ No newline at end of file diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h new file mode 100644 index 000000000000..f73fd055cc27 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 Boy_314 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD +#define TAPPING_TERM 200 diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c new file mode 100644 index 000000000000..2eef3dc48b86 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c @@ -0,0 +1,173 @@ +/* Copyright 2019 Boy_314 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Tap Dance Declarations +enum { + TD_SWAP_LAYERS = 0 +}; + +enum layers { + _DVORAK, + _QWERTY, + _LOWER, + _RAISE, +}; + +enum halfnhalf_keycodes { + NEWTAB = SAFE_RANGE, + ALTF4, + CLSTAB, + PRVWIN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* DVORAK + * ,-------------------------------------------------------------------------------------------------. + * |Tab |' |, |. |P |Y |Brght+|= |F |G |C |R |L |Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |CtlCps|A |O |E |U |I |Brght-|Ctrl+F|D |H |T |N |S |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |LShift|; |Q |J |K |X |LAlt |- |B |M |W |V |Z |RShift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |TD Swap Layer| |Space | + * `-------------' `-------------' + */ + [_DVORAK] = LAYOUT(/* Base Dvorak */ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BRIU, KC_EQL, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + LCTL_T(KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_BRID, LCTL(KC_F), KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT, + KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_MINS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, + TD(TD_SWAP_LAYERS), KC_SPC + ), + + /* QWERTY + * ,-------------------------------------------------------------------------------------------------. + * |Tab |Q |W |E |R |T |Brght+|' |Y |U |I |O |P |Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |CtlCps|A |S |D |F |G |Brght-|Ctrl+F|H |J |K |L |; |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |LShift|Z |X |C |V |B |LAlt |- |N |M |, |. |/ |RShift| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |TD Swap Layer| |Space | + * `-------------' `-------------' + */ + [_QWERTY] = LAYOUT(/* Base Qwerty */ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BRIU, KC_QUOT, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LCTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BRID, LCTL(KC_F), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_MINS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + TD(TD_SWAP_LAYERS), KC_SPC + ), + + /* LOWER + * ,-------------------------------------------------------------------------------------------------. + * |Esc |1 |2 |3 |4 |5 | | |6 |7 |8 |9 |0 |/ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Caps |F1 |F2 |F3 |F4 |F5 |F6 |Vol Up|Play |_ |+ |{ |} || | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | |F7 |F8 |F9 |F10 |F11 |F12 |Vol Dn|Next |Home |PgDn |PgUp |End | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | + * `-------------' `-------------' + */ + [_LOWER] = LAYOUT(/* Numbers, Function Row, Media Control, Shifted Symbols, Dvorak Slash Key */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_VOLU, KC_MPLY, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_MNXT, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, + KC_TRNS, KC_TRNS + ), + + /* RAISE + * ,-------------------------------------------------------------------------------------------------. + * |Reset | | |Up | | | |PRVWIN|CLSTAB| | | | |Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |` | |Left |Down |Right | | |NEWTAB|ALTF4 |- |= |[ |] |\ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | |! |@ |# |$ |% | | |^ |& |* |( |) | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | + * `-------------' `-------------' + */ + [_RAISE] = LAYOUT(/* Arrows, Shifted Numbers, Symbols, Delete, Macros */ + RESET, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, PRVWIN, CLSTAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + KC_GRV, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, NEWTAB, ALTF4, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS, + KC_TRNS, KC_TRNS + ) +}; + +void tap_dance_choose_layer (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + layer_on(_LOWER); + break; + case 2: + layer_on(_RAISE); + break; + } +} + +void tap_dance_choose_layer_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: + layer_off(_LOWER); + break; + case 2: + layer_off(_RAISE); + break; + case 3: + if (biton32(default_layer_state) == _DVORAK) { + set_single_persistent_default_layer(_QWERTY); + } + else if (biton32(default_layer_state) == _QWERTY) { + set_single_persistent_default_layer(_DVORAK); + } + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SWAP_LAYERS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_choose_layer, tap_dance_choose_layer_reset) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // Control + T + case NEWTAB: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("t")); + } + break; + // Alt + F4 + case ALTF4: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_LALT)SS_TAP(X_F4)SS_UP(X_LALT)); + } + break; + // Control + W + case CLSTAB: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("w")); + } + break; + // Control + Shift + N + case PRVWIN: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL(SS_LSFT("n"))); + } + break; + } + return true; +} diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md new file mode 100644 index 000000000000..9eff08b5ea43 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md @@ -0,0 +1,2 @@ +# Boy_314's keymap for half_n_half +# Currently only supports DVORAK. QWERTY Support is on the TODO list. \ No newline at end of file diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk new file mode 100644 index 000000000000..59c7ccf82752 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk @@ -0,0 +1,5 @@ +TAP_DANCE_ENABLE = yes # Enable Tap Dance +NKRO_ENABLE = yes # USB Nkey Rollover + +# Enable generic behavior for split boards +SPLIT_KEYBOARD = yes \ No newline at end of file diff --git a/keyboards/40percentclub/half_n_half/rules.mk b/keyboards/40percentclub/half_n_half/rules.mk index bd0d8f808cd4..cc5fccee9844 100644 --- a/keyboards/40percentclub/half_n_half/rules.mk +++ b/keyboards/40percentclub/half_n_half/rules.mk @@ -79,3 +79,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +# Enable generic behavior for split boards +SPLIT_KEYBOARD = yes diff --git a/keyboards/40percentclub/i75/promicro/config.h b/keyboards/40percentclub/i75/promicro/config.h index bc9146328ed7..d4cd99773622 100644 --- a/keyboards/40percentclub/i75/promicro/config.h +++ b/keyboards/40percentclub/i75/promicro/config.h @@ -36,5 +36,5 @@ #define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/i75/teensy2/config.h b/keyboards/40percentclub/i75/teensy2/config.h index fdbde8d6437d..bcf9b1b888bd 100644 --- a/keyboards/40percentclub/i75/teensy2/config.h +++ b/keyboards/40percentclub/i75/teensy2/config.h @@ -36,5 +36,5 @@ #define MATRIX_COL_PINS { C6, C7, D6, D7, B5, B6, F7, F6, F5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/mf68/config.h b/keyboards/40percentclub/mf68/config.h index 857205c37d8f..25252d160326 100644 --- a/keyboards/40percentclub/mf68/config.h +++ b/keyboards/40percentclub/mf68/config.h @@ -52,6 +52,28 @@ along with this program. If not, see . #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 diff --git a/keyboards/40percentclub/mf68/keymaps/default/keymap.c b/keyboards/40percentclub/mf68/keymaps/default/keymap.c index ae7e7297cb89..c91b9b908aba 100644 --- a/keyboards/40percentclub/mf68/keymaps/default/keymap.c +++ b/keyboards/40percentclub/mf68/keymaps/default/keymap.c @@ -3,51 +3,29 @@ #define _QWERTY 0 #define _FN1 1 #define _FN2 2 -#define KC_ KC_TRNS -#define KC_X0 LT(_FN2, KC_GRV) -#define KC_X1 MO(_FN1) -#define KC_X2 BL_STEP + +#define FN2_GRV LT(_FN2, KC_GRV) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ - ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, - /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ - TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, - /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */ - X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , - /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */ - LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , - /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */ - LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT - /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ + [_QWERTY] = LAYOUT_68_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, 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_PGDN, + FN2_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - - [_FN1] = LAYOUT_kc( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ - GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, - /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ - , , , UP , , , , , , , , , X2 , , VOLD,END, - /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ - , ,LEFT,DOWN,RGHT, , , , , , , , , - /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ - , , , , , , ,MUTE, , , , , MUTE, - /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ - , , , , , , , MPRV,MPLY,MNXT - /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + [_FN1] = LAYOUT_68_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_VOLU, KC_HOME, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, _______, KC_VOLD, KC_END, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT ), - - [_FN2] = LAYOUT_kc( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ - GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, - /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ - , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END, - /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ - , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , , - /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ - , , , , , , 0 , 1 , 2 , 3 , , , MUTE, - /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ - , , , , , , , MPRV,MPLY,MNXT - /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + [_FN2] = LAYOUT_68_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_VOLU, KC_HOME, + _______, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, KC_VOLD, KC_END, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT ) }; diff --git a/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h b/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h new file mode 100644 index 000000000000..7d96ab9e249c --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h @@ -0,0 +1,43 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* Overrides for Feather 32u4 Bluefruit */ + +/* USB Device descriptor parameter */ +#undef DESCRIPTION +#define DESCRIPTION Magicforce 68 BLE + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS +#undef UNUSED_PINS +#define MATRIX_ROW_PINS { D1, D0, C6, D7, B5, B6, B7, D6 } +#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D2, D3 } +#define UNUSED_PINS {B5} diff --git a/keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c b/keyboards/40percentclub/mf68/keymaps/mf68_ble/keymap.c similarity index 100% rename from keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c rename to keyboards/40percentclub/mf68/keymaps/mf68_ble/keymap.c diff --git a/keyboards/40percentclub/mf68_ble/readme.md b/keyboards/40percentclub/mf68/keymaps/mf68_ble/readme.md similarity index 86% rename from keyboards/40percentclub/mf68_ble/readme.md rename to keyboards/40percentclub/mf68/keymaps/mf68_ble/readme.md index 0e0f4b90d831..e590ae3e6db4 100644 --- a/keyboards/40percentclub/mf68_ble/readme.md +++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/readme.md @@ -1,6 +1,6 @@ # mf68_ble -![mf68_ble](https://3.bp.blogspot.com/-0YCA3Hx2Rq0/WD3U3GWhyvI/AAAAAAAB_Uo/RWTeyCPblGcxDrDwT9WL9ck2ZRuR26DgACLcB/s640/IMG_20161129_063741.jpg) +![mf68_ble](https://i.imgur.com/zuTyy7k.jpg) === Magicforce 68 with [replacement PCB](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68) designed by [di0ib](https://github.com/di0ib). @@ -24,6 +24,6 @@ Below is how you wire the Feather to PCB Make example for this keyboard (after setting up your build environment): - make 40percentclub/mf68_ble:default + make 40percentclub/mf68:mf68_ble 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). diff --git a/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk new file mode 100644 index 000000000000..2509d0bf4eb1 --- /dev/null +++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk @@ -0,0 +1,66 @@ +# Overrides for Feather 32u4 Bluefruit +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 8000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BLUETOOTH = AdafruitBLE +BACKLIGHT_ENABLE = no diff --git a/keyboards/40percentclub/mf68/rules.mk b/keyboards/40percentclub/mf68/rules.mk index 38c9f517b9d4..27642d8604fe 100644 --- a/keyboards/40percentclub/mf68/rules.mk +++ b/keyboards/40percentclub/mf68/rules.mk @@ -63,13 +63,14 @@ BOOTLOADER = caterina BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/40percentclub/mf68_ble/info.json b/keyboards/40percentclub/mf68_ble/info.json deleted file mode 100644 index 4cd9b2c83c83..000000000000 --- a/keyboards/40percentclub/mf68_ble/info.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keyboard_name": "MF68 BLE", - "url": "", - "maintainer": "qmk", - "width": 17.25, - "height": 5, - "layouts": { - "LAYOUT_68_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}, {"x":15.25, "y":0}, {"x":16.25, "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.25, "y":1}, {"x":16.25, "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.75}, {"x":15.25, "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, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}] - } - } -} diff --git a/keyboards/40percentclub/mf68_ble/mf68_ble.c b/keyboards/40percentclub/mf68_ble/mf68_ble.c deleted file mode 100644 index 95f8592f8f15..000000000000 --- a/keyboards/40percentclub/mf68_ble/mf68_ble.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "mf68_ble.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); -} diff --git a/keyboards/40percentclub/mf68_ble/mf68_ble.h b/keyboards/40percentclub/mf68_ble/mf68_ble.h deleted file mode 100644 index a34f9cde8deb..000000000000 --- a/keyboards/40percentclub/mf68_ble/mf68_ble.h +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define LAYOUT_68_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \ - K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \ - K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ - K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \ - K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \ - { K70, K71, K72, K73, K74 } \ -} - -#define LAYOUT_kc( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \ - K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \ - K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \ - K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \ - K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \ -) LAYOUT_68_ansi( \ - KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \ - KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \ - KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \ - KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, \ - KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, \ - KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, \ - KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \ - KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \ -) diff --git a/keyboards/40percentclub/nano/config.h b/keyboards/40percentclub/nano/config.h index 36840d2f6c1f..5eb65c74ad81 100644 --- a/keyboards/40percentclub/nano/config.h +++ b/keyboards/40percentclub/nano/config.h @@ -31,12 +31,29 @@ along with this program. If not, see . #define MATRIX_ROWS 2 #define MATRIX_COLS 4 +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * NO_DIODE = switches are directly connected to AVR pins + * +*/ +// #define MATRIX_ROW_PINS { D0, D5 } +// #define MATRIX_COL_PINS { F1, F0, B0 } +#define DIRECT_PINS { \ + { F4, F5, F6, F7 }, \ + { D1, D0, D4, C6 }, \ +} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +//#define DIODE_DIRECTION CUSTOM_MATRIX + /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 6 // Number of LEDs - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -#define TAPPING_TERM 200 diff --git a/keyboards/40percentclub/nano/matrix.c b/keyboards/40percentclub/nano/matrix.c deleted file mode 100644 index fa2461af5fe0..000000000000 --- a/keyboards/40percentclub/nano/matrix.c +++ /dev/null @@ -1,159 +0,0 @@ -/* - -Note for ErgoDox EZ customizers: Here be dragons! -This is not a file you want to be messing with. -All of the interesting stuff for you is under keymaps/ :) -Love, Erez - -Copyright 2013 Oleg Kostyuk - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include "action_layer.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "nano.h" -#include - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_stage[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static uint16_t debouncing_time; -static bool debouncing = false; - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - - DDRF &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7); - PORTF |= (1<<4 | 1<<5 | 1<<6 | 1<<7); - DDRC &= ~(1<<6); - PORTC |= (1<<6); - DDRD &= ~(1<<0 | 1<<1 | 1<<4); - PORTD |= (1<<0 | 1<<1 | 1<<4); - - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - matrix_stage[i] = 0; - } - - matrix_init_quantum(); - -} - -uint8_t matrix_scan(void) -{ - matrix_stage[0] = - (PINF&(1<<4) ? 0 : (1<<0)) | - (PINF&(1<<5) ? 0 : (1<<1)) | - (PINF&(1<<6) ? 0 : (1<<2)) | - (PINF&(1<<7) ? 0 : (1<<3)); - matrix_stage[1] = - (PIND&(1<<1) ? 0 : (1<<0)) | - (PIND&(1<<0) ? 0 : (1<<1)) | - (PIND&(1<<4) ? 0 : (1<<2)) | - (PINC&(1<<6) ? 0 : (1<<3)); - - if (memcmp(matrix_debouncing, matrix_stage, sizeof(matrix)) != 0) { - debouncing = true; - debouncing_time = timer_read(); - } - - matrix_debouncing[0] = matrix_stage[0]; - matrix_debouncing[1] = matrix_stage[1]; - - if (debouncing && (timer_elapsed(debouncing_time) > 20)) { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - debouncing = false; - } - - matrix_scan_quantum(); - - return 1; -} - -bool matrix_is_modified(void) -{ - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<. + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x9999 +#define MANUFACTURER di0ib +#define PRODUCT The nein Keyboard +#define DESCRIPTION 9 key macropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 + +/* Keyboard Matrix Assignments */ +#define DIRECT_PINS { \ + { F4, F5, F6 }, \ + { F7, B1, B3 }, \ + { B2, B6, B5 } \ +} +#define UNUSED_PINS + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/40percentclub/nein/info.json b/keyboards/40percentclub/nein/info.json new file mode 100644 index 000000000000..aaadc7186160 --- /dev/null +++ b/keyboards/40percentclub/nein/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "nein", + "url": "", + "maintainer": "qmk", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2} + ] + } + } +} diff --git a/keyboards/40percentclub/nein/keymaps/default/keymap.c b/keyboards/40percentclub/nein/keymaps/default/keymap.c new file mode 100644 index 000000000000..674a8bb7fc4c --- /dev/null +++ b/keyboards/40percentclub/nein/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2019 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_3x3( + KC_MUTE, KC_HOME, KC_MPLY, \ + MO(1), KC_UP, KC_END, \ + KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT_ortho_3x3( + RESET, _______, KC_STOP, \ + _______, _______, RGB_MOD, \ + KC_MPRV, _______, KC_MNXT \ + ), +}; diff --git a/keyboards/40percentclub/nein/nein.c b/keyboards/40percentclub/nein/nein.c new file mode 100644 index 000000000000..0b4d05d9412e --- /dev/null +++ b/keyboards/40percentclub/nein/nein.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "nein.h" diff --git a/keyboards/40percentclub/nein/nein.h b/keyboards/40percentclub/nein/nein.h new file mode 100644 index 000000000000..fd0118f75b4a --- /dev/null +++ b/keyboards/40percentclub/nein/nein.h @@ -0,0 +1,37 @@ +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_3x3( \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 } \ +} diff --git a/keyboards/40percentclub/nein/readme.md b/keyboards/40percentclub/nein/readme.md new file mode 100644 index 000000000000..49ce04f13bd2 --- /dev/null +++ b/keyboards/40percentclub/nein/readme.md @@ -0,0 +1,18 @@ +# nein + +![nein](https://2.bp.blogspot.com/-avYV4grcAPQ/XL9a67SxgKI/AAAAAAACVCE/GSGVYRThaEEDd14M3LG34gQTv5ZabRI0QCEwYBhgL/s640/a.jpg) +=== + +A 9 key macropad. + +Powered by a Pro Micro and can fit any of the various different sized variations of Pro Micro. + +Keyboard Maintainer: QMK Community +Hardware Supported: nein PCB +Hardware Availability: [nein project on 40% Keyboards](https://www.40percent.club/2019/04/nein.html) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/nein: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). diff --git a/keyboards/40percentclub/nein/rules.mk b/keyboards/40percentclub/nein/rules.mk new file mode 100644 index 000000000000..1e3748287ce2 --- /dev/null +++ b/keyboards/40percentclub/nein/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/40percentclub/nori/config.h b/keyboards/40percentclub/nori/config.h index f46ca4264457..a3366de6211c 100644 --- a/keyboards/40percentclub/nori/config.h +++ b/keyboards/40percentclub/nori/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D4, C6, D7, E6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B5 diff --git a/keyboards/40percentclub/ut47/config.h b/keyboards/40percentclub/ut47/config.h index 4a221ca52726..87f2bedd7371 100644 --- a/keyboards/40percentclub/ut47/config.h +++ b/keyboards/40percentclub/ut47/config.h @@ -35,7 +35,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/40percentclub/ut47/keymaps/default/config.h b/keyboards/40percentclub/ut47/keymaps/default/config.h index f88ebf7e8037..023c753c27a5 100644 --- a/keyboards/40percentclub/ut47/keymaps/default/config.h +++ b/keyboards/40percentclub/ut47/keymaps/default/config.h @@ -16,6 +16,4 @@ #pragma once -#include "config_common.h" - // place overrides here diff --git a/keyboards/9key/keymaps/default/keymap.c b/keyboards/9key/keymaps/default/keymap.c index 9f639716955d..acc0350739e0 100644 --- a/keyboards/9key/keymaps/default/keymap.c +++ b/keyboards/9key/keymaps/default/keymap.c @@ -1,16 +1,5 @@ #include QMK_KEYBOARD_H -// Tap Dance Declarations -enum { - ENT_5 = 0, - ZERO_7 -}; - -// Macro Declarations -enum { - DBL_0 = 0 -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* LAYER 0 @@ -24,8 +13,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [0] = LAYOUT( \ KC_1, KC_2, KC_3, \ - KC_4, TD(ENT_5), KC_6, \ - TD(ZERO_7), KC_8, LT(1, KC_9) \ + KC_4, KC_5, KC_6, \ + KC_7, KC_8, LT(1, KC_9) \ ), /* LAYER 1 @@ -39,27 +28,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [1] = LAYOUT( \ KC_ESC, KC_PLUS, KC_MINS, \ - KC_BSPC, KC_ASTR, KC_SLSH, \ - M(DBL_0), KC_DOT, KC_TRNS \ + KC_ENTER, KC_ASTR, KC_SLSH, \ + KC_0, KC_DOT, KC_TRNS \ ) }; - -qk_tap_dance_action_t tap_dance_actions[] = { - [ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT), - [ZERO_7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_0) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch(id) { - case DBL_0: - SEND_STRING("00"); - return false; - } - } - return MACRO_NONE; -}; - -void matrix_init_user(void) { -} \ No newline at end of file diff --git a/keyboards/9key/keymaps/tap_dance/keymap.c b/keyboards/9key/keymaps/tap_dance/keymap.c new file mode 100644 index 000000000000..a96880aa529e --- /dev/null +++ b/keyboards/9key/keymaps/tap_dance/keymap.c @@ -0,0 +1,69 @@ +#include QMK_KEYBOARD_H + +// Tap Dance Declarations +enum tap_dances { + ENT_5 = 0, + ZERO_7, +}; + +// Macro Declarations +enum custom_keycodes { + DBL_0 = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* LAYER 0 + * ,-----------------------. + * | 1 | 2 | 3 | + * |-------+-------+-------| + * | 4 | 5/ENT | 6 | Dbl Tap 5 for Enter + * |-------+-------+-------| + * | 7/0 | 8 | 9/FN | 7/0 = Dbl Tap 7 for 0 - 9/FN = Hold 9 for FN + * `-----------------------' + */ +[0] = LAYOUT( \ + KC_1, KC_2, KC_3, \ + KC_4, TD(ENT_5), KC_6, \ + TD(ZERO_7), KC_8, LT(1, KC_9) \ +), + +/* LAYER 1 + * ,-----------------------. + * | ESC | + | - | + * |-------+-------+-------| + * | BSPC | * | / | + * |-------+-------+-------| + * | 00 | . | | + * `-----------------------' + */ +[1] = LAYOUT( \ + KC_ESC, KC_PLUS, KC_MINS, \ + KC_BSPC, KC_ASTR, KC_SLSH, \ + DBL_0, KC_DOT, KC_TRNS \ +) + +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT), + [ZERO_7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_0) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DBL_0: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + tap_code(KC_P0); + tap_code(KC_P0); + } + break; + + } + return true; +}; + + +void matrix_init_user(void) { +} diff --git a/keyboards/tetris/keymaps/default/rules.mk b/keyboards/9key/keymaps/tap_dance/rules.mk similarity index 100% rename from keyboards/tetris/keymaps/default/rules.mk rename to keyboards/9key/keymaps/tap_dance/rules.mk diff --git a/keyboards/9key/rules.mk b/keyboards/9key/rules.mk index e252640f7e6e..9fae54fa910a 100644 --- a/keyboards/9key/rules.mk +++ b/keyboards/9key/rules.mk @@ -47,7 +47,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options -# 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 # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) @@ -63,7 +63,7 @@ UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = yes -TAP_DANCE_ENABLE = yes +TAP_DANCE_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/abstract/ellipse/info.json b/keyboards/abstract/ellipse/info.json new file mode 100644 index 000000000000..8ad50e6cae87 --- /dev/null +++ b/keyboards/abstract/ellipse/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Ellipse", + "url": "https://abstractkb.tk/product/ellipse-rev1", + "maintainer": "AbstractKB", + "width": 3, + "height": 2.25, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/config.h b/keyboards/abstract/ellipse/keymaps/abstractkb/config.h new file mode 100644 index 000000000000..3bc66cd9bdf0 --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/abstractkb/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 AbstractKB + * + * 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 . + */ + +#pragma once + +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 2 +#define RGBLIGHT_ANIMATIONS + +// place overrides here diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c b/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c new file mode 100644 index 000000000000..8d649419d112 --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2019 AbstractKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +/*enum custom_keycodes { + MYKEY = SAFE_RANGE +};*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_MUTE, RGB_TOG, BL_TOGG, + RGB_M_SW, RGB_M_P, BL_BRTG + ) +}; + +/*bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +}*/ + +/*void matrix_init_user(void) { + +}*/ + +/*void matrix_scan_user(void) { + +}*/ + +/*void led_set_user(uint8_t usb_led) { + +}*/ + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + rgblight_increase_hue_noeeprom(); + } else { + rgblight_decrease_hue_noeeprom(); + } + } else if (index == 2) { /* Third encoder */ + if (clockwise) { + backlight_increase(); + } else { + backlight_decrease(); + } + } +} \ No newline at end of file diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/readme.md b/keyboards/abstract/ellipse/keymaps/abstractkb/readme.md new file mode 100644 index 000000000000..5db2eb647f72 --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/abstractkb/readme.md @@ -0,0 +1,3 @@ +# My keymap + +This was used for testing lights but will become my personal keymap \ No newline at end of file diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/rules.mk b/keyboards/abstract/ellipse/keymaps/abstractkb/rules.mk new file mode 100644 index 000000000000..54a2685bf634 --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/abstractkb/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/abstract/ellipse/keymaps/default/config.h b/keyboards/abstract/ellipse/keymaps/default/config.h new file mode 100644 index 000000000000..e406c488b5a5 --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 AbstractKB + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/abstract/ellipse/keymaps/default/keymap.c b/keyboards/abstract/ellipse/keymaps/default/keymap.c new file mode 100644 index 000000000000..ac1ec986b029 --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2019 AbstractKB + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +/*enum custom_keycodes { + MYKEY = SAFE_RANGE +};*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_A, RGB_TOG, KC_C, + KC_X, KC_Y, KC_Z + ) +}; + +/*bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +}*/ + +/*void matrix_init_user(void) { + +}*/ + +/*void matrix_scan_user(void) { + +}*/ + +/*void led_set_user(uint8_t usb_led) { + +}*/ + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_O); + } else { + tap_code(KC_P); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + rgblight_increase_hue_noeeprom(); + } else { + rgblight_decrease_hue_noeeprom(); + } + } else if (index == 2) { + if (clockwise) { + tap_code(KC_M); + } else { + tap_code(KC_R); + } + } +} \ No newline at end of file diff --git a/keyboards/abstract/ellipse/keymaps/default/readme.md b/keyboards/abstract/ellipse/keymaps/default/readme.md new file mode 100644 index 000000000000..e14c0c8bd56b --- /dev/null +++ b/keyboards/abstract/ellipse/keymaps/default/readme.md @@ -0,0 +1,6 @@ +# The default keymap for Ellipse + +This keymap allows for basic testing of the keypad once assembled. +Each knob and key outputs a different standard letter keycode, +except for the middle knob which changes the hue of the RGB LEDs and when +pressed down turns off the RGB LEDs \ No newline at end of file diff --git a/keyboards/9key/keymaps/default/rules.mk b/keyboards/abstract/ellipse/keymaps/default/rules.mk similarity index 100% rename from keyboards/9key/keymaps/default/rules.mk rename to keyboards/abstract/ellipse/keymaps/default/rules.mk diff --git a/keyboards/abstract/ellipse/readme.md b/keyboards/abstract/ellipse/readme.md new file mode 100644 index 000000000000..973d36f44b78 --- /dev/null +++ b/keyboards/abstract/ellipse/readme.md @@ -0,0 +1,19 @@ +# EllipseRev1 + +![EllipseRev1](http://abstractkb.tk/wp-content/uploads/2019/03/ellipsetop.jpg) + +A small keypad with more knobs than ever before! 3 Knobs and 3 MX-style switches on one little board. + +At this time there are 2 small known issues with the Rev 1. One of which is that backlight breathing does not work, +and the other issue that has been encountered is that the post_init_user function does not seem to be called. +Hopefully these issues can be resolved soon; this QMK file is being released as orders have started to ship and they need to be configurable. + +Keyboard Maintainer: [AbstractKB](https://github.com/abstractkb) +Hardware Supported: The Abstract Ellipse Rev1 +Hardware Availability: https://abstractkb.tk + +Make example for this keyboard (after setting up your build environment): + + make abstract/ellipse/rev1:default:dfu + +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). diff --git a/keyboards/abstract/ellipse/rev1/config.h b/keyboards/abstract/ellipse/rev1/config.h new file mode 100644 index 000000000000..4fcf96eb30e3 --- /dev/null +++ b/keyboards/abstract/ellipse/rev1/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 AbstractKB + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AbstractKB +#define PRODUCT EllipseRev1 +#define DESCRIPTION The Ellipse Macropad + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D3, C7 } +#define MATRIX_COL_PINS { F0, B6, B5 } +#define UNUSED_PINS { B0, D0, D1, D2, D4, D6, D7, F1, F4, F5, F6, F7 } + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN C6 +//#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 15 + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 3 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/*#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +)*/ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +#define NUMBER_OF_ENCODERS 3 +#define ENCODERS_PAD_A { B2, B3, D5 } +#define ENCODERS_PAD_B { B1, B7, B4 } +#define ENCODER_RESOLUTION 2 diff --git a/keyboards/abstract/ellipse/rev1/rev1.c b/keyboards/abstract/ellipse/rev1/rev1.c new file mode 100644 index 000000000000..ae7aa640e4ad --- /dev/null +++ b/keyboards/abstract/ellipse/rev1/rev1.c @@ -0,0 +1,43 @@ +/* Copyright 2019 AbstractKB + * + * 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 . + */ +#include "rev1.h" + +/*void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +}*/ \ No newline at end of file diff --git a/keyboards/abstract/ellipse/rev1/rev1.h b/keyboards/abstract/ellipse/rev1/rev1.h new file mode 100644 index 000000000000..de8b9bacb6c5 --- /dev/null +++ b/keyboards/abstract/ellipse/rev1/rev1.h @@ -0,0 +1,36 @@ +/* Copyright 2019 AbstractKB + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, \ + K10, K11, K12 \ +) \ +{ \ + { K00, K01, K02 }, \ + { K10, K11, K12 }, \ +} + diff --git a/keyboards/abstract/ellipse/rev1/rules.mk b/keyboards/abstract/ellipse/rev1/rules.mk new file mode 100644 index 000000000000..880d40e49be1 --- /dev/null +++ b/keyboards/abstract/ellipse/rev1/rules.mk @@ -0,0 +1,81 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +ENCODER_ENABLE = yes # Enable support for rotary encoders diff --git a/keyboards/acr60/keymaps/default/keymap.c b/keyboards/acr60/keymaps/default/keymap.c index a07e0ddc5920..aafc1dfe68fc 100644 --- a/keyboards/acr60/keymaps/default/keymap.c +++ b/keyboards/acr60/keymaps/default/keymap.c @@ -1,6 +1,10 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -13,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * via the function actions code at the bottom. */ LAYOUT( - F(0), 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_NO, KC_BSPC, + SFT_ESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, @@ -34,21 +38,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -56,7 +50,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -64,6 +58,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/adkb96/adkb96.c b/keyboards/adkb96/adkb96.c new file mode 100644 index 000000000000..9a1c85a2ce47 --- /dev/null +++ b/keyboards/adkb96/adkb96.c @@ -0,0 +1,19 @@ +#include "adkb96.h" + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}}, + {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}, {7, 7}}, + {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}, {5, 8}, {6, 8}, {7, 8}}, + {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}, {5, 9}, {6, 9}, {7, 9}}, + {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}, {6,10}, {7,10}}, + {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}, {6,11}, {7,11}}, + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}}, + {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}}, + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}}, + {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}, {7, 5}} +}; +#endif diff --git a/keyboards/adkb96/adkb96.h b/keyboards/adkb96/adkb96.h new file mode 100644 index 000000000000..4b28775006d9 --- /dev/null +++ b/keyboards/adkb96/adkb96.h @@ -0,0 +1,28 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_adkb96_rev1 + #include "rev1.h" +#endif + + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc_ortho_6x16( \ + L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, \ + L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, \ + L30, L31, L32, L33, L34, L35, L36, L37, R30, R31, R32, R33, R34, R35, R36, R37, \ + L40, L41, L42, L43, L44, L45, L46, L47, R40, R41, R42, R43, R44, R45, R46, R47, \ + L50, L51, L52, L53, L54, L55, L56, L57, R50, R51, R52, R53, R54, R55, R56, R57 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##L07, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, KC_##R07, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##L17, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, KC_##R17, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##L27, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, KC_##R27, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##L37, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, KC_##R37, \ + KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##L47, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46, KC_##R47, \ + KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##L56, KC_##L57, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, KC_##R55, KC_##R56 ,KC_##R57 \ + ) + +#define LAYOUT_kc LAYOUT_kc_ortho_6x16 diff --git a/keyboards/sol/config.h b/keyboards/adkb96/config.h similarity index 100% rename from keyboards/sol/config.h rename to keyboards/adkb96/config.h diff --git a/keyboards/adkb96/info.json b/keyboards/adkb96/info.json new file mode 100644 index 000000000000..3b914d56b171 --- /dev/null +++ b/keyboards/adkb96/info.json @@ -0,0 +1,494 @@ +{ + "keyboard_name": "adkb96", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_ortho_6x16": { + "key_count": 96, + "layout": [ + { + "label": "L00", + "x": 0, + "y": 0 + }, + { + "label": "L01", + "x": 1, + "y": 0 + }, + { + "label": "L02", + "x": 2, + "y": 0 + }, + { + "label": "L03", + "x": 3, + "y": 0 + }, + { + "label": "L04", + "x": 4, + "y": 0 + }, + { + "label": "L05", + "x": 5, + "y": 0 + }, + { + "label": "L06", + "x": 6, + "y": 0 + }, + { + "label": "L07", + "x": 7, + "y": 0 + }, + { + "label": "R00", + "x": 8, + "y": 0 + }, + { + "label": "R01", + "x": 9, + "y": 0 + }, + { + "label": "R02", + "x": 10, + "y": 0 + }, + { + "label": "R03", + "x": 11, + "y": 0 + }, + { + "label": "R04", + "x": 12, + "y": 0 + }, + { + "label": "R05", + "x": 13, + "y": 0 + }, + { + "label": "R06", + "x": 14, + "y": 0 + }, + { + "label": "R07", + "x": 15, + "y": 0 + }, + { + "label": "L10", + "x": 0, + "y": 1 + }, + { + "label": "L11", + "x": 1, + "y": 1 + }, + { + "label": "L12", + "x": 2, + "y": 1 + }, + { + "label": "L13", + "x": 3, + "y": 1 + }, + { + "label": "L14", + "x": 4, + "y": 1 + }, + { + "label": "L15", + "x": 5, + "y": 1 + }, + { + "label": "L16", + "x": 6, + "y": 1 + }, + { + "label": "L17", + "x": 7, + "y": 1 + }, + { + "label": "R10", + "x": 8, + "y": 1 + }, + { + "label": "R11", + "x": 9, + "y": 1 + }, + { + "label": "R12", + "x": 10, + "y": 1 + }, + { + "label": "R13", + "x": 11, + "y": 1 + }, + { + "label": "R14", + "x": 12, + "y": 1 + }, + { + "label": "R15", + "x": 13, + "y": 1 + }, + { + "label": "R16", + "x": 14, + "y": 1 + }, + { + "label": "R17", + "x": 15, + "y": 1 + }, + { + "label": "L20", + "x": 0, + "y": 2 + }, + { + "label": "L21", + "x": 1, + "y": 2 + }, + { + "label": "L22", + "x": 2, + "y": 2 + }, + { + "label": "L23", + "x": 3, + "y": 2 + }, + { + "label": "L24", + "x": 4, + "y": 2 + }, + { + "label": "L25", + "x": 5, + "y": 2 + }, + { + "label": "L26", + "x": 6, + "y": 2 + }, + { + "label": "L27", + "x": 7, + "y": 2 + }, + { + "label": "R20", + "x": 8, + "y": 2 + }, + { + "label": "R21", + "x": 9, + "y": 2 + }, + { + "label": "R22", + "x": 10, + "y": 2 + }, + { + "label": "R23", + "x": 11, + "y": 2 + }, + { + "label": "R24", + "x": 12, + "y": 2 + }, + { + "label": "R25", + "x": 13, + "y": 2 + }, + { + "label": "R26", + "x": 14, + "y": 2 + }, + { + "label": "R27", + "x": 15, + "y": 2 + }, + { + "label": "L30", + "x": 0, + "y": 3 + }, + { + "label": "L31", + "x": 1, + "y": 3 + }, + { + "label": "L32", + "x": 2, + "y": 3 + }, + { + "label": "L33", + "x": 3, + "y": 3 + }, + { + "label": "L34", + "x": 4, + "y": 3 + }, + { + "label": "L35", + "x": 5, + "y": 3 + }, + { + "label": "L36", + "x": 6, + "y": 3 + }, + { + "label": "L37", + "x": 7, + "y": 3 + }, + { + "label": "R30", + "x": 8, + "y": 3 + }, + { + "label": "R31", + "x": 9, + "y": 3 + }, + { + "label": "R32", + "x": 10, + "y": 3 + }, + { + "label": "R33", + "x": 11, + "y": 3 + }, + { + "label": "R34", + "x": 12, + "y": 3 + }, + { + "label": "R35", + "x": 13, + "y": 3 + }, + { + "label": "R36", + "x": 14, + "y": 3 + }, + { + "label": "R37", + "x": 15, + "y": 3 + }, + { + "label": "L40", + "x": 0, + "y": 4 + }, + { + "label": "L41", + "x": 1, + "y": 4 + }, + { + "label": "L42", + "x": 2, + "y": 4 + }, + { + "label": "L43", + "x": 3, + "y": 4 + }, + { + "label": "L44", + "x": 4, + "y": 4 + }, + { + "label": "L45", + "x": 5, + "y": 4 + }, + { + "label": "L46", + "x": 6, + "y": 4 + }, + { + "label": "L47", + "x": 7, + "y": 4 + }, + { + "label": "R40", + "x": 8, + "y": 4 + }, + { + "label": "R41", + "x": 9, + "y": 4 + }, + { + "label": "R42", + "x": 10, + "y": 4 + }, + { + "label": "R43", + "x": 11, + "y": 4 + }, + { + "label": "R44", + "x": 12, + "y": 4 + }, + { + "label": "R45", + "x": 13, + "y": 4 + }, + { + "label": "R46", + "x": 14, + "y": 4 + }, + { + "label": "R47", + "x": 15, + "y": 4 + }, + { + "label": "L50", + "x": 0, + "y": 5 + }, + { + "label": "L51", + "x": 1, + "y": 5 + }, + { + "label": "L52", + "x": 2, + "y": 5 + }, + { + "label": "L53", + "x": 3, + "y": 5 + }, + { + "label": "L54", + "x": 4, + "y": 5 + }, + { + "label": "L55", + "x": 5, + "y": 5 + }, + { + "label": "L56", + "x": 6, + "y": 5 + }, + { + "label": "L57", + "x": 7, + "y": 5 + }, + { + "label": "R50", + "x": 8, + "y": 5 + }, + { + "label": "R51", + "x": 9, + "y": 5 + }, + { + "label": "R52", + "x": 10, + "y": 5 + }, + { + "label": "R53", + "x": 11, + "y": 5 + }, + { + "label": "R54", + "x": 12, + "y": 5 + }, + { + "label": "R55", + "x": 13, + "y": 5 + }, + { + "label": "R56", + "x": 14, + "y": 5 + }, + { + "label": "R57", + "x": 15, + "y": 5 + } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/bfo9000/keymaps/default/config.h b/keyboards/adkb96/keymaps/default/config.h similarity index 90% rename from keyboards/bfo9000/keymaps/default/config.h rename to keyboards/adkb96/keymaps/default/config.h index 6b31e8d14ee1..bef279a6d032 100644 --- a/keyboards/bfo9000/keymaps/default/config.h +++ b/keyboards/adkb96/keymaps/default/config.h @@ -18,15 +18,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once /* Use I2C or Serial, not both */ #define USE_SERIAL -// #define USE_I2C +//#define USE_I2C /* Select hand configuration */ @@ -34,4 +31,4 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#endif +#define FORCE_NKRO diff --git a/keyboards/adkb96/keymaps/default/keymap.c b/keyboards/adkb96/keymaps/default/keymap.c new file mode 100644 index 000000000000..c8198ab33594 --- /dev/null +++ b/keyboards/adkb96/keymaps/default/keymap.c @@ -0,0 +1,15 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, XXXXXXX,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DELT, + KC_ZKHK,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_JYEN,KC_BSPC,KC_BSPC, + KC_TAB, 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_ENT, KC_ENT, + KC_CAPS,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_BSLS,KC_ENT, KC_ENT, + 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_RO, KC_UP, KC_RSFT,KC_RSFT, + KC_LCTL,KC_LALT,KC_LGUI,KC_MHEN,KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_HENK,KC_KANA,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT,XXXXXXX + ) +}; diff --git a/keyboards/adkb96/readme.md b/keyboards/adkb96/readme.md new file mode 100644 index 000000000000..fa5187966bb6 --- /dev/null +++ b/keyboards/adkb96/readme.md @@ -0,0 +1,17 @@ +# ADKB96 + +![ADKB96](http://btoshop.jp/wp-content/uploads/sites/3/2019/04/ADKB96_ALL.png) + +A 16x6 ortholinear keyboard kit made and sold by Bit Trade One Ltd. [More info on Web](http://bit-trade-one.co.jp/selfmadekb/adkb96/) + +Keyboard Maintainer: [Bit Trade One Ltd.](http://bit-trade-one.co.jp/) +Hardware Supported: ADKB96 PCB, Pro Micro +Hardware Availability: [PCB & case Data](https://github.com/bit-trade-one/ADKB96-hardware), [BTOS Shop](http://btoshop.jp/2019/04/11/4562469772424/) + +Make example for this keyboard (after setting up your build environment): + +```sh + make adkb96/rev1:default +``` + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/adkb96/rev1/config.h b/keyboards/adkb96/rev1/config.h new file mode 100644 index 000000000000..8bdacb4cb30e --- /dev/null +++ b/keyboards/adkb96/rev1/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x00a5 +#define PRODUCT_ID 0xad96 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Bit Trade One +#define PRODUCT ADKB96 +#define DESCRIPTION + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 8 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } + +#define SOFT_SERIAL_PIN D0 + +/* define tapping term */ +#define TAPPING_TERM 100 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +/* ws2812 RGB LED */ +/* +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 12 // Number of LEDs +*/ +/* + * 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 + diff --git a/keyboards/adkb96/rev1/rev1.c b/keyboards/adkb96/rev1/rev1.c new file mode 100644 index 000000000000..872a7e08ff08 --- /dev/null +++ b/keyboards/adkb96/rev1/rev1.c @@ -0,0 +1,15 @@ +#include "adkb96.h" + +void matrix_init_kb(void) { + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + diff --git a/keyboards/adkb96/rev1/rev1.h b/keyboards/adkb96/rev1/rev1.h new file mode 100644 index 000000000000..0ec70c5d5c9f --- /dev/null +++ b/keyboards/adkb96/rev1/rev1.h @@ -0,0 +1,44 @@ +#pragma once + +#include "adkb96.h" + +//void promicro_bootloader_jmp(bool program); + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + + +// Keymap with right side flipped +// (TRRS jack on both halves are to the right) +#define LAYOUT_ortho_6x16( \ + L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, \ + L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, \ + L30, L31, L32, L33, L34, L35, L36, L37, R30, R31, R32, R33, R34, R35, R36, R37, \ + L40, L41, L42, L43, L44, L45, L46, L47, R40, R41, R42, R43, R44, R45, R46, R47, \ + L50, L51, L52, L53, L54, L55, L56, L57, R50, R51, R52, R53, R54, R55, R56, R57 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06, L07 }, \ + { L10, L11, L12, L13, L14, L15, L16, L17 }, \ + { L20, L21, L22, L23, L24, L25, L26, L27 }, \ + { L30, L31, L32, L33, L34, L35, L36, L37 }, \ + { L40, L41, L42, L43, L44, L45, L46, L47 }, \ + { L50, L51, L52, L53, L54, L55, L56, L57 }, \ + { R00, R01, R02, R03, R04, R05, R06, R07 }, \ + { R10, R11, R12, R13, R14, R15, R16, R17 }, \ + { R20, R21, R22, R23, R24, R25, R26, R27 }, \ + { R30, R31, R32, R33, R34, R35, R36, R37 }, \ + { R40, R41, R42, R43, R44, R45, R46, R47 }, \ + { R50, R51, R52, R53, R54, R55, R56, R57 } \ + } + +#define LAYOUT LAYOUT_ortho_6x16 + diff --git a/keyboards/adkb96/rules.mk b/keyboards/adkb96/rules.mk new file mode 100644 index 000000000000..04986eb6788b --- /dev/null +++ b/keyboards/adkb96/rules.mk @@ -0,0 +1,78 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + # Bootloader selection + # Teensy halfkay + # Pro Micro caterina + # Atmel DFU atmel-dfu + # LUFA DFU lufa-dfu + # QMK DFU qmk-dfu + # atmega32a bootloadHID +BOOTLOADER = caterina + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = adkb96/rev1 diff --git a/keyboards/aeboards/aegis/aegis.c b/keyboards/aeboards/aegis/aegis.c new file mode 100644 index 000000000000..ccff6d62c94b --- /dev/null +++ b/keyboards/aeboards/aegis/aegis.c @@ -0,0 +1,17 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +// Nothing to see here, move along... ;-) diff --git a/keyboards/aeboards/aegis/aegis.h b/keyboards/aeboards/aegis/aegis.h new file mode 100644 index 000000000000..95ffb73dde00 --- /dev/null +++ b/keyboards/aeboards/aegis/aegis.h @@ -0,0 +1,43 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define _____ KC_NO + +#define LAYOUT_aegis( \ + K0000, K0100, K0001, K0101, K0002, K0102, K0003, K0103, K0004, K0104, K0005, K0105, K0006, K0106, K0007, K0107, K0008, \ + K0200, K0300, K0201, K0301, K0202, K0302, K0203, K0303, K0204, K0304, K0205, K0305, K0206, K0306, K0207, K0307, K0208, K0308, K0108, \ + K0400, K0500, K0401, K0501, K0402, K0502, K0403, K0503, K0404, K0504, K0405, K0505, K0406, K0506, K0407, K0507, K0408, K0508, \ + K0600, K0700, K0601, K0701, K0602, K0702, K0603, K0703, K0604, K0704, K0605, K0705, K0606, K0706, K0607, K0707, K0608, \ + K0800, K0900, K0801, K0901, K0802, K0902, K0803, K0903, K0804, K0904, K0805, K0905, K0806, K0906, K0807, K0907, K0808, K0908, \ + K1000, K1100, K1001, K1101, K1002, K1102, K1003, K1103, K1105, K1107, K1008, K1108 \ +) { \ + { K0000, K0001, K0002, K0003, K0004, K0005, K0006, K0007, K0008 }, \ + { K0100, K0101, K0102, K0103, K0104, K0105, K0106, K0107, K0108 }, \ + { K0200, K0201, K0202, K0203, K0204, K0205, K0206, K0207, K0208 }, \ + { K0300, K0301, K0302, K0303, K0304, K0305, K0306, K0307, K0308 }, \ + { K0400, K0401, K0402, K0403, K0404, K0405, K0406, K0407, K0408 }, \ + { K0500, K0501, K0502, K0503, K0504, K0505, K0506, K0507, K0508 }, \ + { K0600, K0601, K0602, K0603, K0604, K0605, K0606, K0607, K0608 }, \ + { K0700, K0701, K0702, K0703, K0704, K0705, K0706, K0707, _____ }, \ + { K0800, K0801, K0802, K0803, K0804, K0805, K0806, K0807, K0808 }, \ + { K0900, K0901, K0902, K0903, K0904, K0905, K0906, K0907, K0908 }, \ + { K1000, K1001, K1002, K1003, _____, _____, _____, _____, K1008 }, \ + { K1100, K1101, K1102, K1103, _____, K1105, _____, K1107, K1108 } \ +} diff --git a/keyboards/aeboards/aegis/config.h b/keyboards/aeboards/aegis/config.h new file mode 100644 index 000000000000..787c0f485063 --- /dev/null +++ b/keyboards/aeboards/aegis/config.h @@ -0,0 +1,71 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4145 // "AE" +#define PRODUCT_ID 0x0807 // 1800 -> 0x0708 -> 0x0807 ;-) +#define DEVICE_VER 0x0001 +#define MANUFACTURER AEboards +#define PRODUCT Aegis +#define DESCRIPTION 1800 Left Handed Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F5, F6, E6, F7, D1, D0, D6, D4, B4, D7, B6, B5 } +#define MATRIX_COL_PINS { C7, C6, B7, D2, D3, B3, B2, B1, B0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +//#define WT_MONO_BACKLIGHT + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*12*9*2)) = (35+864) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 899 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 125 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + diff --git a/keyboards/aeboards/aegis/keymaps/default/keymap.c b/keyboards/aeboards/aegis/keymaps/default/keymap.c new file mode 100644 index 000000000000..8437ffeb4ed5 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------. ,-------------------------------------------------------------. + * |End |Home|PgDn|PgUp| |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| + * `-------------------' `-------------------------------------------------------------' + * + * |-------------------| ,-------------------------------------------------------------. + * |- | * | / |BSPC| | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| del| + * |-------------------| |-------------------------------------------------------------| + * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | + * | + |--------------| |-------------------------------------------------------------| + * | | 6 | 5 | 4 | |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-------------------| |-------------------------------------------------------------| + * | | 3 | 2 | 1 | |Up| |Shift| Z| X| C| V| B| N| M| ,| .| /|Shift | FN | + * | ENT|-------------------------------------------------------------------------------| + * | | 0 | left |Dn| rhgt | FN | Alt | Space |Alt |Gui| ctrl| | + * `------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_aegis( + KC_END , KC_HOME, KC_PGDN, KC_PGUP, 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_PMNS, KC_PAST, KC_PSLS, KC_BSPC, 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_BSLS, KC_DEL, + KC_PPLS, KC_P9 , KC_P8 , KC_P7 , 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_PPLS, KC_P6 , KC_P5 , KC_P4 , KC_LCTL, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , + KC_PENT, KC_P3 , KC_P2 , KC_P1 , KC_UP , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1), + KC_PENT, KC_PDOT, KC_P0 , KC_LEFT, KC_DOWN, KC_RGHT, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_aegis( + 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_PGDN, KC_UP , KC_PGDN, KC_BSPC, 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_LEFT, KC_DOWN, KC_RGHT, KC_ENT , 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_VOLD, KC_VOLU, 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 + ), + + [2] = LAYOUT_aegis( + 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, 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 + ), + + [3] = LAYOUT_aegis( + 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, 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 + ) + +}; diff --git a/keyboards/aeboards/aegis/keymaps/default/readme.md b/keyboards/aeboards/aegis/keymaps/default/readme.md new file mode 100644 index 000000000000..e6b24245634a --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The Default Aegis Layout + diff --git a/keyboards/aeboards/aegis/keymaps/via/keymap.c b/keyboards/aeboards/aegis/keymaps/via/keymap.c new file mode 100644 index 000000000000..8437ffeb4ed5 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/via/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------. ,-------------------------------------------------------------. + * |End |Home|PgDn|PgUp| |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| + * `-------------------' `-------------------------------------------------------------' + * + * |-------------------| ,-------------------------------------------------------------. + * |- | * | / |BSPC| | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| del| + * |-------------------| |-------------------------------------------------------------| + * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | + * | + |--------------| |-------------------------------------------------------------| + * | | 6 | 5 | 4 | |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-------------------| |-------------------------------------------------------------| + * | | 3 | 2 | 1 | |Up| |Shift| Z| X| C| V| B| N| M| ,| .| /|Shift | FN | + * | ENT|-------------------------------------------------------------------------------| + * | | 0 | left |Dn| rhgt | FN | Alt | Space |Alt |Gui| ctrl| | + * `------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_aegis( + KC_END , KC_HOME, KC_PGDN, KC_PGUP, 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_PMNS, KC_PAST, KC_PSLS, KC_BSPC, 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_BSLS, KC_DEL, + KC_PPLS, KC_P9 , KC_P8 , KC_P7 , 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_PPLS, KC_P6 , KC_P5 , KC_P4 , KC_LCTL, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , + KC_PENT, KC_P3 , KC_P2 , KC_P1 , KC_UP , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1), + KC_PENT, KC_PDOT, KC_P0 , KC_LEFT, KC_DOWN, KC_RGHT, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_aegis( + 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_PGDN, KC_UP , KC_PGDN, KC_BSPC, 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_LEFT, KC_DOWN, KC_RGHT, KC_ENT , 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_VOLD, KC_VOLU, 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 + ), + + [2] = LAYOUT_aegis( + 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, 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 + ), + + [3] = LAYOUT_aegis( + 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, 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 + ) + +}; diff --git a/keyboards/aeboards/aegis/keymaps/via/readme.md b/keyboards/aeboards/aegis/keymaps/via/readme.md new file mode 100644 index 000000000000..a80671bd9435 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA Aegis Layout + diff --git a/keyboards/aeboards/aegis/keymaps/via/rules.mk b/keyboards/aeboards/aegis/keymaps/via/rules.mk new file mode 100644 index 000000000000..f072c67198c2 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/via/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/aeboards/aegis/readme.md b/keyboards/aeboards/aegis/readme.md new file mode 100644 index 000000000000..1b8fc124e5b4 --- /dev/null +++ b/keyboards/aeboards/aegis/readme.md @@ -0,0 +1,14 @@ +AEGIS +=== + +A left handed g80-1800-esque keyboard by [aeboards](https://aeboards.com/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: AEGIS +Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make aeboards/aegis: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). \ No newline at end of file diff --git a/keyboards/aeboards/aegis/rules.mk b/keyboards/aeboards/aegis/rules.mk new file mode 100644 index 000000000000..f1c632289cca --- /dev/null +++ b/keyboards/aeboards/aegis/rules.mk @@ -0,0 +1,65 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h index 4b30ca3094fb..2fe66d4bce9d 100644 --- a/keyboards/ai03/lunar/config.h +++ b/keyboards/ai03/lunar/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/ai03/lunar/info.json b/keyboards/ai03/lunar/info.json index c7f6454f0ee3..e18a10bde0ed 100644 --- a/keyboards/ai03/lunar/info.json +++ b/keyboards/ai03/lunar/info.json @@ -7,7 +7,78 @@ "height": 5, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "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":"Insert", "x":15, "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":"Delete", "x":15, "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":"Home", "x":15, "y":2}, {"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":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":2.25}, {"x":6.5, "y":4, "w":1.5}, {"x":8, "y":4, "w":2.75}, {"label":"Alt", "x":10.75, "y":4, "w":1.25}, {"label":"Win", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + "layout": [ + {"label":"Esc", "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":"BackspaceL", "x":13, "y":0}, + {"label":"BackspaceR", "x":14, "y":0}, + {"label":"Insert", "x":15, "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":"Delete", "x":15, "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":"Home", "x":15, "y":2}, + {"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":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, + {"label":"Win", "x":1.5, "y":4, "w":1.25}, + {"label":"Alt", "x":2.75, "y":4, "w":1.5}, + {"x":4.25, "y":4, "w":2.25}, + {"x":6.5, "y":4, "w":1.5}, + {"x":8, "y":4, "w":2.75}, + {"label":"Alt", "x":10.75, "y":4, "w":1.25}, + {"label":"Win", "x":12, "y":4}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} + ] } } } \ No newline at end of file diff --git a/keyboards/ai03/orbit/config.h b/keyboards/ai03/orbit/config.h new file mode 100644 index 000000000000..f4dc4fd636c5 --- /dev/null +++ b/keyboards/ai03/orbit/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2018 Ryota Goto + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0003 +#define DEVICE_VER 0x0003 +#define MANUFACTURER ai03 Keyboard Designs +#define PRODUCT Orbit +#define DESCRIPTION Split ergonomic keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 // Double rows for split keyboards. Orbit has 5, so define 10 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F7, F6, F5, F4, D3 } +#define MATRIX_COL_PINS { C7, B4, D7, D6, D4, F1, F0 } +#define MATRIX_ROW_PINS_RIGHT { B6, B5, B4, D7, E6 } +#define MATRIX_COL_PINS_RIGHT { D4, D6, F1, F0, F4, F5, C6 } + +#define SPLIT_HAND_PIN D5 + +//#define USE_I2C + +#define SELECT_SOFT_SERIAL_SPEED 1 + +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* 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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ai03/orbit/info.json b/keyboards/ai03/orbit/info.json new file mode 100644 index 000000000000..ca838811301e --- /dev/null +++ b/keyboards/ai03/orbit/info.json @@ -0,0 +1,88 @@ +{ + "keyboard_name": "orbit", + "url": "https://github.com/ai03-2725/Orbit", + "maintainer": "ai03", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0.63}, + {"x":1, "y":0.38}, + {"x":2, "y":0.38}, + {"x":3, "y":0.13}, + {"x":4, "y":0}, + {"x":5, "y":0.13}, + {"x":6, "y":0.25}, + {"x":9, "y":0.25}, + {"x":10, "y":0.13}, + {"x":11, "y":0}, + {"x":12, "y":0.13}, + {"x":13, "y":0.38}, + {"x":14, "y":0.38}, + {"x":15, "y":0.63}, + + {"x":0, "y":1.63}, + {"x":1, "y":1.38}, + {"x":2, "y":1.38}, + {"x":3, "y":1.13}, + {"x":4, "y":1}, + {"x":5, "y":1.13}, + {"x":6, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.13}, + {"x":11, "y":1}, + {"x":12, "y":1.13}, + {"x":13, "y":1.38}, + {"x":14, "y":1.38}, + {"x":15, "y":1.63}, + + {"x":0, "y":2.63}, + {"x":1, "y":2.38}, + {"x":2, "y":2.38}, + {"x":3, "y":2.13}, + {"x":4, "y":2}, + {"x":5, "y":2.13}, + {"x":6, "y":2.25}, + {"x":9, "y":2.25}, + {"x":10, "y":2.13}, + {"x":11, "y":2}, + {"x":12, "y":2.13}, + {"x":13, "y":2.38}, + {"x":14, "y":2.38}, + {"x":15, "y":2.63}, + + {"x":0, "y":3.63}, + {"x":1, "y":3.38}, + {"x":2, "y":3.38}, + {"x":3, "y":3.13}, + {"x":4, "y":3}, + {"x":5, "y":3.13}, + {"x":6, "y":3.25}, + {"x":9, "y":3.25}, + {"x":10, "y":3.13}, + {"x":11, "y":3}, + {"x":12, "y":3.13}, + {"x":13, "y":3.38}, + {"x":14, "y":3.38}, + {"x":15, "y":3.63}, + + {"x":1, "y":4.38}, + {"x":2, "y":4.38}, + {"x":3, "y":4.13}, + {"x":4, "y":4}, + + {"x":5.5, "y":4.25}, + {"x":6.5, "y":4.5, "h":1.5}, + + {"x":8.5, "y":4.5, "h":1.5}, + {"x":9.5, "y":4.25}, + + {"x":11, "y":4}, + {"x":12, "y":4.13}, + {"x":13, "y":4.38}, + {"x":14, "y":4.38} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/ai03/orbit/keymaps/default/keymap.c b/keyboards/ai03/orbit/keymaps/default/keymap.c new file mode 100644 index 000000000000..4c8c39fb0f22 --- /dev/null +++ b/keyboards/ai03/orbit/keymaps/default/keymap.c @@ -0,0 +1,91 @@ +/* Copyright 2018 Ryota Goto + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + MANUAL = SAFE_RANGE, + DBLZERO +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + TO(1), KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_BSPC, \ + TO(1), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, KC_BSLS, \ + KC_NO, 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_NO, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_PSCR, KC_DEL, \ + KC_LCTL, KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_GRV, KC_MENU, KC_MINS, KC_EQL + ), + [1] = LAYOUT( /* Fn, Arrowkeys, Media control, Backlight */ + TO(2), _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU, _______, \ + TO(2), _______, _______, KC_PGUP, _______, _______, KC_F11, KC_F12, _______, KC_UP, _______, _______, KC_VOLD, BL_STEP, \ + TO(0), _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MPLY, _______, \ + TO(0), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT( /* Mousekeys and Numpad */ + KC_NO, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, _______, \ + KC_NO, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______, \ + TO(1), _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, _______, \ + TO(1), _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_BTN3, _______, DBLZERO, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, _______, MANUAL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MANUAL: + if (record->event.pressed) + { + // Keypress + SEND_STRING("https://kb.ai03.me/redir/orbit"); + } + else + { + // Key release + } + break; + case DBLZERO: + if (record->event.pressed) + { + // Keypress + SEND_STRING("00"); + } + else + { + // Key release + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} + +uint32_t layer_state_set_user(uint32_t state) { + + return state; +} diff --git a/keyboards/ai03/orbit/keymaps/default/readme.md b/keyboards/ai03/orbit/keymaps/default/readme.md new file mode 100644 index 000000000000..63c528abfa58 --- /dev/null +++ b/keyboards/ai03/orbit/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# The default keymap for Orbit + +[KLE of layout](http://www.keyboard-layout-editor.com/#/gists/53ebf59524de12515cb7e2e6de94f0d6) \ No newline at end of file diff --git a/keyboards/ai03/orbit/matrix.c b/keyboards/ai03/orbit/matrix.c new file mode 100644 index 000000000000..a1509666cd5b --- /dev/null +++ b/keyboards/ai03/orbit/matrix.c @@ -0,0 +1,328 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include "wait.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "config.h" +#include "split_flags.h" +#include "quantum.h" +#include "debounce.h" +#include "transport.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +//#define ROWS_PER_HAND (MATRIX_ROWS / 2) + +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#else +static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t raw_matrix[ROWS_PER_HAND]; + +// row offsets for each hand +uint8_t thisHand, thatHand; + +// user-defined overridable functions + +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } + +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } + +__attribute__((weak)) void matrix_init_user(void) {} + +__attribute__((weak)) void matrix_scan_user(void) {} + +__attribute__((weak)) void matrix_slave_scan_user(void) {} + +// helper functions + +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } + +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } + +bool matrix_is_modified(void) { + if (debounce_active()) return false; + return true; +} + +inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } + +inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } + +void matrix_print(void) { + print_matrix_header(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); + print(": "); + print_matrix_row(row); + print("\n"); + } +} + +uint8_t matrix_key_count(void) { + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += matrix_bitpop(i); + } + return count; +} + +// matrix code + +#ifdef DIRECT_PINS + +static void init_pins(void) { + for (int row = 0; row < MATRIX_ROWS; row++) { + for (int col = 0; col < MATRIX_COLS; col++) { + pin_t pin = direct_pins[row][col]; + if (pin != NO_PIN) { + setPinInputHigh(pin); + } + } + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + matrix_row_t last_row_value = current_matrix[current_row]; + current_matrix[current_row] = 0; + + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + pin_t pin = direct_pins[current_row][col_index]; + if (pin != NO_PIN) { + current_matrix[current_row] |= readPin(pin) ? 0 : (ROW_SHIFTER << col_index); + } + } + + return (last_row_value != current_matrix[current_row]); +} + +#elif (DIODE_DIRECTION == COL2ROW) + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } + +static void unselect_rows(void) { + for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void init_pins(void) { + unselect_rows(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= readPin(col_pins[col_index]) ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +#elif (DIODE_DIRECTION == ROW2COL) + +static void select_col(uint8_t col) { + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + +static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); } + +static void unselect_cols(void) { + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static void init_pins(void) { + unselect_cols(); + for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for (uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if (readPin(row_pins[row_index])) { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + } else { + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +#endif + +void matrix_init(void) { + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + + // Set pinout for right half if pinout for that half is defined + if (!isLeftHand) { +#ifdef MATRIX_ROW_PINS_RIGHT + const uint8_t row_pins_right[MATRIX_ROWS] = MATRIX_ROW_PINS_RIGHT; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + row_pins[i] = row_pins_right[i]; + } +#endif +#ifdef MATRIX_COL_PINS_RIGHT + const uint8_t col_pins_right[MATRIX_COLS] = MATRIX_COL_PINS_RIGHT; + for (uint8_t i = 0; i < MATRIX_COLS; i++) { + col_pins[i] = col_pins_right[i]; + } +#endif + } + + thisHand = isLeftHand ? 0 : (ROWS_PER_HAND); + thatHand = ROWS_PER_HAND - thisHand; + + // initialize key pins + init_pins(); + + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } + + debounce_init(ROWS_PER_HAND); + + matrix_init_quantum(); +} + +uint8_t _matrix_scan(void) { + bool changed = false; + +#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { + changed |= read_cols_on_row(raw_matrix, current_row); + } +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(raw_matrix, current_col); + } +#endif + + debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); + + return 1; +} + +uint8_t matrix_scan(void) { + uint8_t ret = _matrix_scan(); + + if (is_keyboard_master()) { + static uint8_t error_count; + + if (!transport_master(matrix + thatHand)) { + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[thatHand + i] = 0; + } + } + } else { + error_count = 0; + } + + matrix_scan_quantum(); + } else { + transport_slave(matrix + thisHand); + matrix_slave_scan_user(); + } + + return ret; +} diff --git a/keyboards/ai03/orbit/matrix.h b/keyboards/ai03/orbit/matrix.h new file mode 100644 index 000000000000..c2bdd3098c1d --- /dev/null +++ b/keyboards/ai03/orbit/matrix.h @@ -0,0 +1,3 @@ +#pragma once + +#include diff --git a/keyboards/ai03/orbit/orbit.c b/keyboards/ai03/orbit/orbit.c new file mode 100644 index 000000000000..2f149875b1cb --- /dev/null +++ b/keyboards/ai03/orbit/orbit.c @@ -0,0 +1,228 @@ +/* Copyright 2018 Ryota Goto + * + * 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 . + */ +#include "orbit.h" +#include "split_util.h" +#include "transport.h" + + +// Call led_toggle to set LEDs easily +// LED IDs: +// +// (LEFT) 0 1 2 | 3 4 5 (RIGHT) + +void led_toggle(int id, bool on) { + + if (isLeftHand) { + switch(id) { + case 0: + // Left hand C6 + if (on) + //PORTC |= (1<<6); + writePinHigh(C6); + else + //PORTC &= ~(1<<6); + writePinLow(C6); + break; + case 1: + // Left hand B6 + if (on) + //PORTB |= (1<<6); + writePinHigh(B6); + else + //PORTB &= ~(1<<6); + writePinLow(B6); + break; + case 2: + // Left hand B5 + if (on) + //PORTB |= (1<<5); + writePinHigh(B5); + else + //PORTB &= ~(1<<5); + writePinLow(B5); + break; + default: + break; + } + } else { + switch(id) { + case 3: + // Right hand F6 + if (on) + //PORTF |= (1<<6); + writePinHigh(F6); + else + //PORTF &= ~(1<<6); + writePinLow(F6); + break; + case 4: + // Right hand F7 + if (on) + //PORTF |= (1<<7); + writePinHigh(F7); + else + //PORTF &= ~(1<<7); + writePinLow(F7); + break; + case 5: + // Right hand C7 + if (on) + //PORTC |= (1<<7); + writePinHigh(C7); + else + //PORTC &= ~(1<<7); + writePinLow(C7); + break; + default: + break; + } + } +} + +// Set all LEDs at once using an array of 6 booleans +// LED IDs: +// +// (LEFT) 0 1 2 | 3 4 5 (RIGHT) +// +// Ex. set_all_leds({ false, false, false, true, true, true }) would turn off left hand, turn on right hand + +void set_all_leds(bool leds[6]) { + for (int i = 0; i < 6; i++) { + led_toggle(i, leds[i]); + } +} + +void set_layer_indicators(uint8_t layer) { + + switch (layer) + { + case 0: + led_toggle(0, true); + led_toggle(1, false); + led_toggle(2, false); + break; + case 1: + led_toggle(0, true); + led_toggle(1, true); + led_toggle(2, false); + break; + case 2: + led_toggle(0, true); + led_toggle(1, true); + led_toggle(2, true); + break; + case 3: + led_toggle(0, false); + led_toggle(1, true); + led_toggle(2, true); + break; + case 4: + led_toggle(0, false); + led_toggle(1, false); + led_toggle(2, true); + break; + default: + led_toggle(0, true); + led_toggle(1, false); + led_toggle(2, true); + break; + } + +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + // Initialize indicator LEDs to output + if (isLeftHand) + { + setPinOutput(C6); + setPinOutput(B6); + setPinOutput(B5); + //DDRC |= (1<<6); + //DDRB |= (1<<6); + //DDRB |= (1<<5); + } + else + { + setPinOutput(F6); + setPinOutput(F7); + setPinOutput(C7); + //DDRF |= (1<<6); + //DDRF |= (1<<7); + //DDRC |= (1<<7); + } + + set_layer_indicators(0); + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (is_keyboard_master()) { + + serial_m2s_buffer.nlock_led = IS_LED_ON(usb_led, USB_LED_NUM_LOCK); + serial_m2s_buffer.clock_led = IS_LED_ON(usb_led, USB_LED_CAPS_LOCK); + serial_m2s_buffer.slock_led = IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK); + + led_toggle(3, IS_LED_ON(usb_led, USB_LED_NUM_LOCK)); + led_toggle(4, IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)); + led_toggle(5, IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)); + + } + + led_set_user(usb_led); +} + +uint32_t layer_state_set_kb(uint32_t state) { + + if (is_keyboard_master()) + { + + current_layer = biton32(state); + serial_m2s_buffer.current_layer = biton32(state); + + // If left half, do the LED toggle thing + if (isLeftHand) + { + set_layer_indicators(biton32(state)); + } + + } + // NOTE: Do not set slave LEDs here. + // This is not called on slave + + return layer_state_set_user(state); +} + + diff --git a/keyboards/ai03/orbit/orbit.h b/keyboards/ai03/orbit/orbit.h new file mode 100644 index 000000000000..211b9ebca9e2 --- /dev/null +++ b/keyboards/ai03/orbit/orbit.h @@ -0,0 +1,65 @@ +/* Copyright 2018 Ryota Goto + * + * 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 . + */ +#ifndef ORBIT_H +#define ORBIT_H + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { KC_NO, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, KC_NO } \ +} + +uint8_t current_layer; + +extern void led_toggle(int id, bool on); +void set_all_leds(bool leds[6]); +extern void set_layer_indicators(uint8_t layer); + +#endif diff --git a/keyboards/ai03/orbit/readme.md b/keyboards/ai03/orbit/readme.md new file mode 100644 index 000000000000..58ba2079d5de --- /dev/null +++ b/keyboards/ai03/orbit/readme.md @@ -0,0 +1,15 @@ +# Orbit + +![Orbit](https://raw.githubusercontent.com/ai03-2725/Orbit/master/Images/PCB-R2.0.jpg) + +A split ergonomic keyboard project. + +Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +Hardware Supported: The [Orbit PCB](https://github.com/ai03-2725/Orbit) +Hardware Availability: [This repository](https://github.com/ai03-2725/Orbit) has PCB files. Case group buy orders are currently closed. + +Make example for this keyboard (after setting up your build environment): + + make ai03/orbit: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). diff --git a/keyboards/ai03/orbit/rules.mk b/keyboards/ai03/orbit/rules.mk new file mode 100644 index 000000000000..4b40e47cb7e8 --- /dev/null +++ b/keyboards/ai03/orbit/rules.mk @@ -0,0 +1,92 @@ +SRC += split_util.c \ + split_flags.c \ + serial.c \ + transport.c \ + matrix.c + +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +USE_I2C = no # I2C for split communication +CUSTOM_MATRIX = yes # For providing custom matrix.c (in this case, override regular matrix.c with split matrix.c) +# SPLIT_KEYBOARD = yes # Split keyboard flag disabled as manual edits had to be done to the split common files + + diff --git a/keyboards/ai03/orbit/serial.c b/keyboards/ai03/orbit/serial.c new file mode 100644 index 000000000000..1315377a3459 --- /dev/null +++ b/keyboards/ai03/orbit/serial.c @@ -0,0 +1,546 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + * + * 2018-10-28 checked + * avr-gcc 4.9.2 + * avr-gcc 5.4.0 + * avr-gcc 7.3.0 + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include +#include "serial.h" +//#include + +#ifdef SOFT_SERIAL_PIN + +#ifdef __AVR_ATmega32U4__ + // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. + #ifdef USE_AVR_I2C + #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 + #error Using ATmega32U4 I2C, so can not use PD0, PD1 + #endif + #endif + + #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 + #define SERIAL_PIN_DDR DDRD + #define SERIAL_PIN_PORT PORTD + #define SERIAL_PIN_INPUT PIND + #if SOFT_SERIAL_PIN == D0 + #define SERIAL_PIN_MASK _BV(PD0) + #define EIMSK_BIT _BV(INT0) + #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) + #define SERIAL_PIN_INTERRUPT INT0_vect + #elif SOFT_SERIAL_PIN == D1 + #define SERIAL_PIN_MASK _BV(PD1) + #define EIMSK_BIT _BV(INT1) + #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) + #define SERIAL_PIN_INTERRUPT INT1_vect + #elif SOFT_SERIAL_PIN == D2 + #define SERIAL_PIN_MASK _BV(PD2) + #define EIMSK_BIT _BV(INT2) + #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) + #define SERIAL_PIN_INTERRUPT INT2_vect + #elif SOFT_SERIAL_PIN == D3 + #define SERIAL_PIN_MASK _BV(PD3) + #define EIMSK_BIT _BV(INT3) + #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) + #define SERIAL_PIN_INTERRUPT INT3_vect + #endif + #elif SOFT_SERIAL_PIN == E6 + #define SERIAL_PIN_DDR DDRE + #define SERIAL_PIN_PORT PORTE + #define SERIAL_PIN_INPUT PINE + #define SERIAL_PIN_MASK _BV(PE6) + #define EIMSK_BIT _BV(INT6) + #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) + #define SERIAL_PIN_INTERRUPT INT6_vect + #else + #error invalid SOFT_SERIAL_PIN value + #endif + +#else + #error serial.c now support ATmega32U4 only +#endif + +#define ALWAYS_INLINE __attribute__((always_inline)) +#define NO_INLINE __attribute__((noinline)) +#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) + +// parity check +#define ODD_PARITY 1 +#define EVEN_PARITY 0 +#define PARITY EVEN_PARITY + +#ifdef SERIAL_DELAY + // custom setup in config.h + // #define TID_SEND_ADJUST 2 + // #define SERIAL_DELAY 6 // micro sec + // #define READ_WRITE_START_ADJUST 30 // cycles + // #define READ_WRITE_WIDTH_ADJUST 8 // cycles +#else +// ============ Standard setups ============ + +#ifndef SELECT_SOFT_SERIAL_SPEED +#define SELECT_SOFT_SERIAL_SPEED 1 +// 0: about 189kbps (Experimental only) +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +#endif + +#if __GNUC__ < 6 + #define TID_SEND_ADJUST 14 +#else + #define TID_SEND_ADJUST 2 +#endif + +#if SELECT_SOFT_SERIAL_SPEED == 0 + // Very High speed + #define SERIAL_DELAY 4 // micro sec + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 34 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 1 + // High speed + #define SERIAL_DELAY 6 // micro sec + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 30 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 2 + // Middle speed + #define SERIAL_DELAY 12 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 3 + // Low speed + #define SERIAL_DELAY 24 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 4 + // Very Low speed + #define SERIAL_DELAY 36 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 5 + // Ultra Low speed + #define SERIAL_DELAY 48 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#else +#error invalid SELECT_SOFT_SERIAL_SPEED value +#endif /* SELECT_SOFT_SERIAL_SPEED */ +#endif /* SERIAL_DELAY */ + +#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) +#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) + +#define SLAVE_INT_WIDTH_US 1 +#ifndef SERIAL_USE_MULTI_TRANSACTION + #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY +#else + #define SLAVE_INT_ACK_WIDTH_UNIT 2 + #define SLAVE_INT_ACK_WIDTH 4 +#endif + +static SSTD_t *Transaction_table = NULL; +static uint8_t Transaction_table_size = 0; + +inline static void serial_delay(void) ALWAYS_INLINE; +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static void serial_delay_half1(void) ALWAYS_INLINE; +inline static +void serial_delay_half1(void) { + _delay_us(SERIAL_DELAY_HALF1); +} + +inline static void serial_delay_half2(void) ALWAYS_INLINE; +inline static +void serial_delay_half2(void) { + _delay_us(SERIAL_DELAY_HALF2); +} + +inline static void serial_output(void) ALWAYS_INLINE; +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static void serial_input_with_pullup(void) ALWAYS_INLINE; +inline static +void serial_input_with_pullup(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static void serial_low(void) ALWAYS_INLINE; +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static void serial_high(void) ALWAYS_INLINE; +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_output(); + serial_high(); +} + +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_input_with_pullup(); + + // Enable INT0-INT3,INT6 + EIMSK |= EIMSK_BIT; +#if SERIAL_PIN_MASK == _BV(PE6) + // Trigger on falling edge of INT6 + EICRB &= EICRx_BIT; +#else + // Trigger on falling edge of INT0-INT3 + EICRA &= EICRx_BIT; +#endif +} + +// Used by the sender to synchronize timing with the reciver. +static void sync_recv(void) NO_INLINE; +static +void sync_recv(void) { + for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { + } + // This shouldn't hang if the target disconnects because the + // serial line will float to high if the target does disconnect. + while (!serial_read_pin()); +} + +// Used by the reciver to send a synchronization signal to the sender. +static void sync_send(void) NO_INLINE; +static +void sync_send(void) { + serial_low(); + serial_delay(); + serial_high(); +} + +// Reads a byte from the serial line +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { + uint8_t byte, i, p, pb; + + _delay_sub_us(READ_WRITE_START_ADJUST); + for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { + serial_delay_half1(); // read the middle of pulses + if( serial_read_pin() ) { + byte = (byte << 1) | 1; p ^= 1; + } else { + byte = (byte << 1) | 0; p ^= 0; + } + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + } + /* recive parity bit */ + serial_delay_half1(); // read the middle of pulses + pb = serial_read_pin(); + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + + *pterrcount += (p != pb)? 1 : 0; + + return byte; +} + +// Sends a byte with MSB ordering +void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; +void serial_write_chunk(uint8_t data, uint8_t bit) { + uint8_t b, p; + for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { + if(data & b) { + serial_high(); p ^= 1; + } else { + serial_low(); p ^= 0; + } + serial_delay(); + } + /* send parity bit */ + if(p & 1) { serial_high(); } + else { serial_low(); } + serial_delay(); + + serial_low(); // sync_send() / senc_recv() need raise edge +} + +static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +void serial_send_packet(uint8_t *buffer, uint8_t size) { + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + data = buffer[i]; + sync_send(); + serial_write_chunk(data,8); + } +} + +static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { + uint8_t pecount = 0; + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + sync_recv(); + data = serial_read_chunk(&pecount, 8); + buffer[i] = data; + } + return pecount == 0; +} + +inline static +void change_sender2reciver(void) { + sync_send(); //0 + serial_delay_half1(); //1 + serial_low(); //2 + serial_input_with_pullup(); //2 + serial_delay_half1(); //3 +} + +inline static +void change_reciver2sender(void) { + sync_recv(); //0 + serial_delay(); //1 + serial_low(); //3 + serial_output(); //3 + serial_delay_half1(); //4 +} + +static inline uint8_t nibble_bits_count(uint8_t bits) +{ + bits = (bits & 0x5) + (bits >> 1 & 0x5); + bits = (bits & 0x3) + (bits >> 2 & 0x3); + return bits; +} + +// interrupt handle to be used by the target device +ISR(SERIAL_PIN_INTERRUPT) { + +#ifndef SERIAL_USE_MULTI_TRANSACTION + serial_low(); + serial_output(); + SSTD_t *trans = Transaction_table; +#else + // recive transaction table index + uint8_t tid, bits; + uint8_t pecount = 0; + sync_recv(); + bits = serial_read_chunk(&pecount,7); + tid = bits>>3; + bits = (bits&7) != nibble_bits_count(tid); + if( bits || pecount> 0 || tid > Transaction_table_size ) { + return; + } + serial_delay_half1(); + + serial_high(); // response step1 low->high + serial_output(); + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); + SSTD_t *trans = &Transaction_table[tid]; + serial_low(); // response step2 ack high->low +#endif + + // target send phase + if( trans->target2initiator_buffer_size > 0 ) + serial_send_packet((uint8_t *)trans->target2initiator_buffer, + trans->target2initiator_buffer_size); + // target switch to input + change_sender2reciver(); + + // target recive phase + if( trans->initiator2target_buffer_size > 0 ) { + if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size) ) { + *trans->status = TRANSACTION_ACCEPTED; + } else { + *trans->status = TRANSACTION_DATA_ERROR; + } + } else { + *trans->status = TRANSACTION_ACCEPTED; + } + + sync_recv(); //weit initiator output to high +} + +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) +// +// Returns: +// TRANSACTION_END +// TRANSACTION_NO_RESPONSE +// TRANSACTION_DATA_ERROR +// this code is very time dependent, so we need to disable interrupts +#ifndef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_transaction(void) { + SSTD_t *trans = Transaction_table; +#else +int soft_serial_transaction(int sstd_index) { + if( sstd_index > Transaction_table_size ) + return TRANSACTION_TYPE_ERROR; + SSTD_t *trans = &Transaction_table[sstd_index]; +#endif + cli(); + + // signal to the target that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(SLAVE_INT_WIDTH_US); + +#ifndef SERIAL_USE_MULTI_TRANSACTION + // wait for the target response + serial_input_with_pullup(); + _delay_us(SLAVE_INT_RESPONSE_TIME); + + // check if the target is present + if (serial_read_pin()) { + // target failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + +#else + // send transaction table index + int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); + sync_send(); + _delay_sub_us(TID_SEND_ADJUST); + serial_write_chunk(tid, 7); + serial_delay_half1(); + + // wait for the target response (step1 low->high) + serial_input_with_pullup(); + while( !serial_read_pin() ) { + _delay_sub_us(2); + } + + // check if the target is present (step2 high->low) + for( int i = 0; serial_read_pin(); i++ ) { + if (i > SLAVE_INT_ACK_WIDTH + 1) { + // slave failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); + } +#endif + + // initiator recive phase + // if the target is present syncronize with it + if( trans->target2initiator_buffer_size > 0 ) { + if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, + trans->target2initiator_buffer_size) ) { + serial_output(); + serial_high(); + *trans->status = TRANSACTION_DATA_ERROR; + sei(); + return TRANSACTION_DATA_ERROR; + } + } + + // initiator switch to output + change_reciver2sender(); + + // initiator send phase + if( trans->initiator2target_buffer_size > 0 ) { + serial_send_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size); + } + + // always, release the line when not in use + sync_send(); + + *trans->status = TRANSACTION_END; + sei(); + return TRANSACTION_END; +} + +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index) { + SSTD_t *trans = &Transaction_table[sstd_index]; + cli(); + int retval = *trans->status; + *trans->status = 0;; + sei(); + return retval; +} +#endif + +#endif + +// Helix serial.c history +// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) +// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) +// (adjusted with avr-gcc 4.9.2) +// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) +// (adjusted with avr-gcc 4.9.2) +// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) +// (adjusted with avr-gcc 4.9.2) +// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) +// (adjusted with avr-gcc 7.3.0) +// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) +// (adjusted with avr-gcc 5.4.0, 7.3.0) +// 2018-12-17 copy to TOP/quantum/split_common/ and remove backward compatibility code (#4669) diff --git a/keyboards/ai03/orbit/serial.h b/keyboards/ai03/orbit/serial.h new file mode 100644 index 000000000000..1c1e640069c9 --- /dev/null +++ b/keyboards/ai03/orbit/serial.h @@ -0,0 +1,62 @@ +#pragma once + +#include + +// ///////////////////////////////////////////////////////////////// +// Need Soft Serial defines in config.h +// ///////////////////////////////////////////////////////////////// +// ex. +// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 +// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 +// // 1: about 137kbps (default) +// // 2: about 75kbps +// // 3: about 39kbps +// // 4: about 26kbps +// // 5: about 20kbps +// +// //// USE simple API (using signle-type transaction function) +// /* nothing */ +// //// USE flexible API (using multi-type transaction function) +// #define SERIAL_USE_MULTI_TRANSACTION +// +// ///////////////////////////////////////////////////////////////// + +// Soft Serial Transaction Descriptor +typedef struct _SSTD_t { + uint8_t *status; + uint8_t initiator2target_buffer_size; + uint8_t *initiator2target_buffer; + uint8_t target2initiator_buffer_size; + uint8_t *target2initiator_buffer; +} SSTD_t; +#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) + +// initiator is transaction start side +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); +// target is interrupt accept side +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); + +// initiator resullt +#define TRANSACTION_END 0 +#define TRANSACTION_NO_RESPONSE 0x1 +#define TRANSACTION_DATA_ERROR 0x2 +#define TRANSACTION_TYPE_ERROR 0x4 +#ifndef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_transaction(void); +#else +int soft_serial_transaction(int sstd_index); +#endif + +// target status +// *SSTD_t.status has +// initiator: +// TRANSACTION_END +// or TRANSACTION_NO_RESPONSE +// or TRANSACTION_DATA_ERROR +// target: +// TRANSACTION_DATA_ERROR +// or TRANSACTION_ACCEPTED +#define TRANSACTION_ACCEPTED 0x8 +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index); +#endif diff --git a/quantum/split_common/split_flags.c b/keyboards/ai03/orbit/split_flags.c similarity index 100% rename from quantum/split_common/split_flags.c rename to keyboards/ai03/orbit/split_flags.c diff --git a/quantum/split_common/split_flags.h b/keyboards/ai03/orbit/split_flags.h similarity index 100% rename from quantum/split_common/split_flags.h rename to keyboards/ai03/orbit/split_flags.h diff --git a/keyboards/ai03/orbit/split_util.c b/keyboards/ai03/orbit/split_util.c new file mode 100644 index 000000000000..5095cb8fdce1 --- /dev/null +++ b/keyboards/ai03/orbit/split_util.c @@ -0,0 +1,87 @@ +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" +#include "timer.h" +#include "split_flags.h" +#include "transport.h" +#include "quantum.h" + +#ifdef EE_HANDS +# include "tmk_core/common/eeprom.h" +# include "eeconfig.h" +#endif + +volatile bool isLeftHand = true; + +__attribute__((weak)) +bool is_keyboard_left(void) { + #ifdef SPLIT_HAND_PIN + // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand + setPinInput(SPLIT_HAND_PIN); + return readPin(SPLIT_HAND_PIN); + #else + #ifdef EE_HANDS + return eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + #ifdef MASTER_RIGHT + return !is_keyboard_master(); + #else + return is_keyboard_master(); + #endif + #endif + #endif +} + +bool is_keyboard_master(void) +{ +#ifdef __AVR__ + static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN; + + // only check once, as this is called often + if (usbstate == UNKNOWN) + { + USBCON |= (1 << OTGPADE); // enables VBUS pad + wait_us(5); + + usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS + } + + return (usbstate == MASTER); +#else + return true; +#endif +} + +static void keyboard_master_setup(void) { +#if defined(USE_I2C) || defined(EH) + #ifdef SSD1306OLED + matrix_master_OLED_init (); + #endif +#endif + transport_master_init(); + + // For master the Backlight info needs to be sent on startup + // Otherwise the salve won't start with the proper info until an update + BACKLIT_DIRTY = true; +} + +static void keyboard_slave_setup(void) +{ + transport_slave_init(); +} + +// this code runs before the usb and keyboard is initialized +void matrix_setup(void) +{ + isLeftHand = is_keyboard_left(); + + if (is_keyboard_master()) + { + keyboard_master_setup(); + } + else + { + keyboard_slave_setup(); + } +} diff --git a/keyboards/ai03/orbit/split_util.h b/keyboards/ai03/orbit/split_util.h new file mode 100644 index 000000000000..20f7535bf44b --- /dev/null +++ b/keyboards/ai03/orbit/split_util.h @@ -0,0 +1,10 @@ +#pragma once + +#include +#include +#include +#include + +extern volatile bool isLeftHand; + +void matrix_master_OLED_init (void); diff --git a/keyboards/ai03/orbit/transport.c b/keyboards/ai03/orbit/transport.c new file mode 100644 index 000000000000..adedf2432205 --- /dev/null +++ b/keyboards/ai03/orbit/transport.c @@ -0,0 +1,238 @@ + +#include "transport.h" + +#include "config.h" +#include "matrix.h" +#include "quantum.h" + +#include "orbit.h" + +#define ROWS_PER_HAND (MATRIX_ROWS/2) + +#ifdef RGBLIGHT_ENABLE +# include "rgblight.h" +#endif + +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" + extern backlight_config_t backlight_config; +#endif + +#if defined(USE_I2C) || defined(EH) + +#include "i2c.h" + +#ifndef SLAVE_I2C_ADDRESS +# define SLAVE_I2C_ADDRESS 0x32 +#endif + +#if (MATRIX_COLS > 8) +# error "Currently only supports 8 COLS" +#endif + +// Get rows from other half over i2c +bool transport_master(matrix_row_t matrix[]) { + int err = 0; + + // write backlight info +#ifdef BACKLIGHT_ENABLE + if (BACKLIT_DIRTY) { + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) { goto i2c_error; } + + // Backlight location + err = i2c_master_write(I2C_BACKLIT_START); + if (err) { goto i2c_error; } + + // Write backlight + i2c_master_write(get_backlight_level()); + + BACKLIT_DIRTY = false; + } +#endif + + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) { goto i2c_error; } + + // start of matrix stored at I2C_KEYMAP_START + err = i2c_master_write(I2C_KEYMAP_START); + if (err) { goto i2c_error; } + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) { goto i2c_error; } + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[i] = i2c_master_read(I2C_ACK); + } + matrix[i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return false; + } + +#ifdef RGBLIGHT_ENABLE + if (RGB_DIRTY) { + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) { goto i2c_error; } + + // RGB Location + err = i2c_master_write(I2C_RGB_START); + if (err) { goto i2c_error; } + + uint32_t dword = eeconfig_read_rgblight(); + + // Write RGB + err = i2c_master_write_data(&dword, 4); + if (err) { goto i2c_error; } + + RGB_DIRTY = false; + i2c_master_stop(); + } +#endif + + return true; +} + +void transport_slave(matrix_row_t matrix[]) { + + for (int i = 0; i < ROWS_PER_HAND; ++i) + { + i2c_slave_buffer[I2C_KEYMAP_START + i] = matrix[i]; + } + // Read Backlight Info + #ifdef BACKLIGHT_ENABLE + if (BACKLIT_DIRTY) + { + backlight_set(i2c_slave_buffer[I2C_BACKLIT_START]); + BACKLIT_DIRTY = false; + } + #endif + #ifdef RGBLIGHT_ENABLE + if (RGB_DIRTY) + { + // Disable interupts (RGB data is big) + cli(); + // Create new DWORD for RGB data + uint32_t dword; + + // Fill the new DWORD with the data that was sent over + uint8_t * dword_dat = (uint8_t *)(&dword); + for (int i = 0; i < 4; i++) + { + dword_dat[i] = i2c_slave_buffer[I2C_RGB_START + i]; + } + + // Update the RGB now with the new data and set RGB_DIRTY to false + rgblight_update_dword(dword); + RGB_DIRTY = false; + // Re-enable interupts now that RGB is set + sei(); + } + #endif +} + +void transport_master_init(void) { + i2c_master_init(); +} + +void transport_slave_init(void) { + i2c_slave_init(SLAVE_I2C_ADDRESS); +} + +#else // USE_SERIAL + +#include "serial.h" + + + +volatile Serial_s2m_buffer_t serial_s2m_buffer = {}; +volatile Serial_m2s_buffer_t serial_m2s_buffer = {}; +uint8_t volatile status0 = 0; + +SSTD_t transactions[] = { + { (uint8_t *)&status0, + sizeof(serial_m2s_buffer), (uint8_t *)&serial_m2s_buffer, + sizeof(serial_s2m_buffer), (uint8_t *)&serial_s2m_buffer + } +}; + +uint8_t slave_layer_cache; +uint8_t slave_nlock_cache; +uint8_t slave_clock_cache; +uint8_t slave_slock_cache; + +void transport_master_init(void) +{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } + +void transport_slave_init(void) +{ + soft_serial_target_init(transactions, TID_LIMIT(transactions)); + slave_layer_cache = 255; + slave_nlock_cache = 255; + slave_clock_cache = 255; + slave_slock_cache = 255; +} + +bool transport_master(matrix_row_t matrix[]) { + + if (soft_serial_transaction()) { + return false; + } + + // TODO: if MATRIX_COLS > 8 change to unpack() + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[i] = serial_s2m_buffer.smatrix[i]; + } + + #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + // Code to send RGB over serial goes here (not implemented yet) + #endif + + #ifdef BACKLIGHT_ENABLE + // Write backlight level for slave to read + serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0; + #endif + + return true; +} + +void transport_slave(matrix_row_t matrix[]) { + + // TODO: if MATRIX_COLS > 8 change to pack() + for (int i = 0; i < ROWS_PER_HAND; ++i) + { + serial_s2m_buffer.smatrix[i] = matrix[i]; + } + #ifdef BACKLIGHT_ENABLE + backlight_set(serial_m2s_buffer.backlight_level); + #endif + #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + // Add serial implementation for RGB here + #endif + + if (slave_layer_cache != serial_m2s_buffer.current_layer) { + slave_layer_cache = serial_m2s_buffer.current_layer; + set_layer_indicators(slave_layer_cache); + } + + if (slave_nlock_cache != serial_m2s_buffer.nlock_led) { + slave_nlock_cache = serial_m2s_buffer.nlock_led; + led_toggle(3, slave_nlock_cache); + } + if (slave_clock_cache != serial_m2s_buffer.clock_led) { + slave_clock_cache = serial_m2s_buffer.clock_led; + led_toggle(4, slave_clock_cache); + } + if (slave_slock_cache != serial_m2s_buffer.slock_led) { + slave_slock_cache = serial_m2s_buffer.slock_led; + led_toggle(5, slave_slock_cache); + } + +} + +#endif diff --git a/keyboards/ai03/orbit/transport.h b/keyboards/ai03/orbit/transport.h new file mode 100644 index 000000000000..422e2ecb9902 --- /dev/null +++ b/keyboards/ai03/orbit/transport.h @@ -0,0 +1,42 @@ +#pragma once + +#include + +#define ROWS_PER_HAND (MATRIX_ROWS/2) + +typedef struct _Serial_s2m_buffer_t { + // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack + matrix_row_t smatrix[ROWS_PER_HAND]; +} Serial_s2m_buffer_t; + +typedef struct _Serial_m2s_buffer_t { +#ifdef BACKLIGHT_ENABLE + uint8_t backlight_level; +#endif +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + rgblight_config_t rgblight_config; //not yet use + // + // When MCUs on both sides drive their respective RGB LED chains, + // it is necessary to synchronize, so it is necessary to communicate RGB information. + // In that case, define the RGBLIGHT_SPLIT macro. + // + // Otherwise, if the master side MCU drives both sides RGB LED chains, + // there is no need to communicate. +#endif + + uint8_t current_layer; + uint8_t nlock_led; + uint8_t clock_led; + uint8_t slock_led; + +} Serial_m2s_buffer_t; + +extern volatile Serial_s2m_buffer_t serial_s2m_buffer; +extern volatile Serial_m2s_buffer_t serial_m2s_buffer; + +void transport_master_init(void); +void transport_slave_init(void); + +// returns false if valid data not received from slave +bool transport_master(matrix_row_t matrix[]); +void transport_slave(matrix_row_t matrix[]); diff --git a/keyboards/al1/config.h b/keyboards/al1/config.h index 3a3daf8673f0..838d56963868 100644 --- a/keyboards/al1/config.h +++ b/keyboards/al1/config.h @@ -43,7 +43,7 @@ along with this program. If not, see . * */ -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/alf/dc60/config.h b/keyboards/alf/dc60/config.h index c3e2ecb2e032..f551a3e3d163 100644 --- a/keyboards/alf/dc60/config.h +++ b/keyboards/alf/dc60/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/alf/x11/config.h b/keyboards/alf/x11/config.h new file mode 100644 index 000000000000..14c97247b525 --- /dev/null +++ b/keyboards/alf/x11/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Alf +#define PRODUCT x11 +#define DESCRIPTION A TKL custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 7 +#define MATRIX_COLS 13 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7, F0, F1, F4, F5, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN F7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 28 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/alf/x11/info.json b/keyboards/alf/x11/info.json new file mode 100644 index 000000000000..ca794f56ce7a --- /dev/null +++ b/keyboards/alf/x11/info.json @@ -0,0 +1,103 @@ +{ + "keyboard_name": "QMK80", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT": { + "key_count": 88, + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":2, "y":0}, + {"label":"K02", "x":3, "y":0}, + {"label":"K03", "x":4, "y":0}, + {"label":"K04", "x":5, "y":0}, + {"label":"K05", "x":6.5, "y":0}, + {"label":"K06", "x":7.5, "y":0}, + {"label":"K07", "x":8.5, "y":0}, + {"label":"K08", "x":9.5, "y":0}, + {"label":"K09", "x":11, "y":0}, + {"label":"K0A", "x":12, "y":0}, + {"label":"K0B", "x":13, "y":0}, + {"label":"K0C", "x":14, "y":0}, + {"label":"K60", "x":15.25, "y":0}, + {"label":"K61", "x":16.25, "y":0}, + {"label":"K62", "x":17.25, "y":0}, + {"label":"K10", "x":0, "y":1.5}, + {"label":"K11", "x":1, "y":1.5}, + {"label":"K12", "x":2, "y":1.5}, + {"label":"K13", "x":3, "y":1.5}, + {"label":"K14", "x":4, "y":1.5}, + {"label":"K15", "x":5, "y":1.5}, + {"label":"K16", "x":6, "y":1.5}, + {"label":"K17", "x":7, "y":1.5}, + {"label":"K18", "x":8, "y":1.5}, + {"label":"K19", "x":9, "y":1.5}, + {"label":"K1A", "x":10, "y":1.5}, + {"label":"K1B", "x":11, "y":1.5}, + {"label":"K1C", "x":12, "y":1.5}, + {"label":"K5A", "x":13, "y":1.5, "w":2}, + {"label":"K63", "x":15.25, "y":1.5}, + {"label":"K65", "x":16.25, "y":1.5}, + {"label":"K67", "x":17.25, "y":1.5}, + {"label":"K20", "x":0, "y":2.5, "w":1.5}, + {"label":"K21", "x":1.5, "y":2.5}, + {"label":"K22", "x":2.5, "y":2.5}, + {"label":"K23", "x":3.5, "y":2.5}, + {"label":"K24", "x":4.5, "y":2.5}, + {"label":"K25", "x":5.5, "y":2.5}, + {"label":"K26", "x":6.5, "y":2.5}, + {"label":"K27", "x":7.5, "y":2.5}, + {"label":"K28", "x":8.5, "y":2.5}, + {"label":"K29", "x":9.5, "y":2.5}, + {"label":"K2A", "x":10.5, "y":2.5}, + {"label":"K2B", "x":11.5, "y":2.5}, + {"label":"K2C", "x":12.5, "y":2.5}, + {"label":"K4C", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K64", "x":15.25, "y":2.5}, + {"label":"K66", "x":16.25, "y":2.5}, + {"label":"K68", "x":17.25, "y":2.5}, + {"label":"K30", "x":0, "y":3.5, "w":1.75}, + {"label":"K31", "x":1.75, "y":3.5}, + {"label":"K32", "x":2.75, "y":3.5}, + {"label":"K33", "x":3.75, "y":3.5}, + {"label":"K34", "x":4.75, "y":3.5}, + {"label":"K35", "x":5.75, "y":3.5}, + {"label":"K36", "x":6.75, "y":3.5}, + {"label":"K37", "x":7.75, "y":3.5}, + {"label":"K38", "x":8.75, "y":3.5}, + {"label":"K39", "x":9.75, "y":3.5}, + {"label":"K3A", "x":10.75, "y":3.5}, + {"label":"K3B", "x":11.75, "y":3.5}, + {"label":"K3C", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K40", "x":0, "y":4.5, "w":2.25}, + {"label":"K41", "x":2.25, "y":4.5}, + {"label":"K42", "x":3.25, "y":4.5}, + {"label":"K43", "x":4.25, "y":4.5}, + {"label":"K44", "x":5.25, "y":4.5}, + {"label":"K45", "x":6.25, "y":4.5}, + {"label":"K46", "x":7.25, "y":4.5}, + {"label":"K47", "x":8.25, "y":4.5}, + {"label":"K48", "x":9.25, "y":4.5}, + {"label":"K49", "x":10.25, "y":4.5}, + {"label":"K4A", "x":11.25, "y":4.5}, + {"label":"K4B", "x":12.25, "y":4.5, "w":1.75}, + {"label":"K69", "x":14, "y":4.5}, + {"label":"K58", "x":16.25, "y":4.5}, + {"label":"K50", "x":0, "y":5.5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5.5, "w":6.25}, + {"label":"K54", "x":10, "y":5.5, "w":1.25}, + {"label":"K55", "x":11.25, "y":5.5, "w":1.25}, + {"label":"K56", "x":12.5, "y":5.5, "w":1.25}, + {"label":"K57", "x":13.75, "y":5.5, "w":1.25}, + {"label":"K6A", "x":15.25, "y":5.5}, + {"label":"K59", "x":16.25, "y":5.5}, + {"label":"K6B", "x":17.25, "y":5.5} + ] + } + } + } + \ No newline at end of file diff --git a/keyboards/alf/x11/keymaps/default/config.h b/keyboards/alf/x11/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/alf/x11/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/alf/x11/keymaps/default/keymap.c b/keyboards/alf/x11/keymaps/default/keymap.c new file mode 100644 index 000000000000..cd97dd0a2b4d --- /dev/null +++ b/keyboards/alf/x11/keymaps/default/keymap.c @@ -0,0 +1,78 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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_PAUS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, \ + KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_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_Z, \ + KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, KC_LCTL, \ + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( \ + 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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_MPLY, KC_MSTP, RGB_TOG, RGB_MOD, \ + RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_VAD, RGB_SAD \ + ), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/alf/x11/keymaps/default/readme.md b/keyboards/alf/x11/keymaps/default/readme.md new file mode 100644 index 000000000000..a08c59173fe6 --- /dev/null +++ b/keyboards/alf/x11/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for x11 diff --git a/keyboards/alf/x11/readme.md b/keyboards/alf/x11/readme.md new file mode 100644 index 000000000000..b403a0952a47 --- /dev/null +++ b/keyboards/alf/x11/readme.md @@ -0,0 +1,13 @@ +# Alf X1.1 + +TKL Keyboard made by Alf + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Alf X1.1 PCB +Hardware Availability: [Massdrop](https://www.massdrop.com/buy/alf-studio-x1-1-custom-mechanical-keyboard-kit) + +Make example for this keyboard (after setting up your build environment): + + make alf/x11: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). diff --git a/keyboards/alf/x11/rules.mk b/keyboards/alf/x11/rules.mk new file mode 100644 index 000000000000..180c60a4a4ec --- /dev/null +++ b/keyboards/alf/x11/rules.mk @@ -0,0 +1,82 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +EXTRAFLAGS += -flto diff --git a/keyboards/alf/x11/x11.c b/keyboards/alf/x11/x11.c new file mode 100644 index 000000000000..b91de016e281 --- /dev/null +++ b/keyboards/alf/x11/x11.c @@ -0,0 +1,63 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include "x11.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(C6); + setPinOutput(E6); + setPinOutput(C7); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(C6); + } else { + writePinHigh(C6); + } + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(C7); + } else { + writePinHigh(C7); + } + + led_set_user(usb_led); +} diff --git a/keyboards/alf/x11/x11.h b/keyboards/alf/x11/x11.h new file mode 100644 index 000000000000..53f3a3e34d1d --- /dev/null +++ b/keyboards/alf/x11/x11.h @@ -0,0 +1,43 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K60, K61, K62, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K5A, K63, K65, K67, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K4C, K64, K66, K68, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K69, K58, \ + K50, K51, K52, K53, K54, K55, K56, K57, K6A, K59, K6B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, KC_NO, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, KC_NO }, \ +} diff --git a/keyboards/alice/alice.h b/keyboards/alice/alice.h index 16460ed701cf..1486612f9f17 100644 --- a/keyboards/alice/alice.h +++ b/keyboards/alice/alice.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Luiz Ribeiro +Copyright 2019 Felipe Coury 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 @@ -21,30 +21,30 @@ along with this program. If not, see . /* LAYOUT * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┐ - * │63 │ │00 │01 │02 │03 │04 │05 │06 │ │07 │08 │09 │10 │11 │12 │13 │14 │ + * │50 │ │00 │01 │02 │03 │04 │05 │06 │ │07 │08 │09 │0A │0B │0C │0D │0E │ * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │64 │ │15 │16 │17 │18 │19 │20 │ │21 │22 │23 │24 │25 │26 │27 │28 │ + * │51 │ │10 │11 │12 │13 │14 │15 │ │16 │17 │18 │19 │1A │1B │1C │1D │ * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │65 │ │29 │30 │31 │32 │33 │34 │ │35 │36 │37 │38 │39 │40 │41 │ + * │52 │ │20 │21 │22 │23 │24 │25 │ │26 │27 │28 │29 │2A │2B │2C │ * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │42 │43 │44 │45 │46 │47 │ │48 │49 │50 │51 │52 │53 │54 │55 │ + * │30 │31 │32 │33 │34 │35 │ │36 │37 │38 │39 │4A │4B │4C │4D │ * ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐ ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ - * │56 │ │57 │58 │59 │ │60 │61 │ │62 │ + * │40 │ │41 │42 │43 │ │46 │47 │ │48 │ * └─────┘ └─────┴───────┴────┘ └──────────┴─────┘ └─────┘ */ #define LAYOUT( \ - K63, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, \ - K64, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, \ - K65, K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, \ - K42, K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, \ - K56, K57, K58, K59, K60, K61, K62 \ + K50, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K51, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K52, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K4A, K4B, K4C, K4D, \ + K40, K41, K42, K43, K46, K47, K48 \ ) \ { \ - { 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 , KC_NO }, \ - { K29 , K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 , K38 , K39 , K40 , K41 , KC_NO, KC_NO }, \ - { K42 , K43 , K44 , K45 , K46 , K47 , K48 , K49 , K50 , K51 , K52 , K53 , K54 , K55 , KC_NO }, \ - { K56 , K57 , K58 , K59 , KC_NO, KC_NO, K60 , K61 , K62 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K63 , K64 , K65 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + { K00 , K01 , K02 , K03 , K04 , K05 , K06 , K07 , K08 , K09 , K0A , K0B , K0C , K0D , K0E }, \ + { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 , K18 , K19 , K1A , K1B , K1C , K1D , KC_NO }, \ + { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 , K28 , K29 , K2A , K2B , K2C , KC_NO, KC_NO }, \ + { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 , K38 , K39 , K4A , K4B , K4C , K4D , KC_NO }, \ + { K40 , K41 , K42 , K43 , KC_NO, KC_NO, K46 , K47 , K48 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K50 , K51 , K52 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ } diff --git a/keyboards/alice/program b/keyboards/alice/program deleted file mode 100755 index 3779bad040aa..000000000000 --- a/keyboards/alice/program +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Luiz Ribeiro , Sebastian Kaim -# -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - - -def checkForKeyboardInNormalMode(): - """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found.""" - return usb.core.find(idVendor=0x20A0, idProduct=0x422D) - -def checkForKeyboardInBootloaderMode(): - """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise.""" - return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None) - -def flashKeyboard(firmware_file): - """Calls bootloadHID to flash the given file to the device.""" - print('Flashing firmware to device ...') - if os.system('bootloadHID -r "%s"' % firmware_file) == 0: - print('\nDone!') - else: - print('\nbootloadHID returned an error.') - -def printDeviceInfo(dev): - """Prints all infos for a given USB device""" - print('Device Information:') - print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) - print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) - print('Manufacturer: %s' % (dev.iManufacturer)) - print('Serial: %s' % (dev.iSerialNumber)) - print('Product: %s' % (dev.iProduct), end='\n\n') - -def sendDeviceToBootloaderMode(dev): - """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing.""" - try: - dev.set_configuration() - - request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - - USBRQ_HID_SET_REPORT = 0x09 - HID_REPORT_OPTION = 0x0301 - - dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5) - except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -kb = checkForKeyboardInNormalMode() - -if kb is not None: - print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='') - printDeviceInfo(kb) - sendDeviceToBootloaderMode(kb) - print(' done.') - print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.") - print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode") - -attempts = 12 # 60 seconds -found = False -for attempt in range(1, attempts + 1): - print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='') - - if checkForKeyboardInBootloaderMode(): - print('Found', end='\n\n') - flashKeyboard(sys.argv[1]) - found = True - break - else: - print('Nothing.', end='') - - if attempt != attempts: # no need to wait on the last attempt - print(' Sleeping 5 seconds.', end='') - time.sleep(5) - - # print a newline - print() - -if not found: - print("Couldn't find a flashable keyboard. Aborting.") - sys.exit(2) - diff --git a/keyboards/alice/rules.mk b/keyboards/alice/rules.mk index bb57cbeae304..eecd38d7e760 100644 --- a/keyboards/alice/rules.mk +++ b/keyboards/alice/rules.mk @@ -45,4 +45,4 @@ OPT_DEFS = -DDEBUG_LEVEL=0 SRC += i2c_master.c # programming options -PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/alpha/keymaps/default/keymap.c b/keyboards/alpha/keymaps/default/keymap.c index e8d04b8e7ea1..c18790fe4b3b 100755 --- a/keyboards/alpha/keymaps/default/keymap.c +++ b/keyboards/alpha/keymaps/default/keymap.c @@ -6,7 +6,7 @@ #define OTHER 3 enum custom_keycodes { - MACRO1 + MACRO1 = SAFE_RANGE }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/amj40/keymaps/default/keymap.c b/keyboards/amj40/keymaps/default/keymap.c index c81317b84425..884fb761d453 100755 --- a/keyboards/amj40/keymaps/default/keymap.c +++ b/keyboards/amj40/keymaps/default/keymap.c @@ -21,14 +21,6 @@ enum custom_keycodes { ADJUST, }; - - - - -// increase readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Default Layer * ,-----------------------------------------------------------. @@ -45,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,\ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,\ - KC_LCTL, KC_LGUI, KC_LALT, F(0), F(1), F(2), KC_RALT, KC_RCTL \ + KC_LCTL, KC_LGUI, KC_LALT, LT(_LOWER, KC_SPC),LT(_RAISE, KC_SPC),LT(_ADJUST, KC_LGUI), KC_RALT, KC_RCTL \ ), /* Function Layer 1 HHKB style @@ -106,24 +98,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - - - -enum function_id { - LAUNCH, - RGBLED_TOGGLE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), - [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), - [2] = ACTION_LAYER_TAP_KEY(_ADJUST, KC_LGUI), - -}; - - - - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c index 5055771ff86e..360424f300d7 100755 --- a/keyboards/amj40/keymaps/fabian/keymap.c +++ b/keyboards/amj40/keymaps/fabian/keymap.c @@ -50,9 +50,6 @@ enum custom_keycodes { EXT_PLV }; -#define XXXXXXX KC_NO -#define _______ KC_TRNS - #define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) diff --git a/keyboards/amj40/keymaps/myee/keymap.c b/keyboards/amj40/keymaps/myee/keymap.c index baddea72d539..7642ede34da7 100644 --- a/keyboards/amj40/keymaps/myee/keymap.c +++ b/keyboards/amj40/keymaps/myee/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// increase readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( \ diff --git a/keyboards/amj60/keymaps/default/keymap.c b/keyboards/amj60/keymaps/default/keymap.c index fd8e198f59c8..c5dc25018c8c 100644 --- a/keyboards/amj60/keymaps/default/keymap.c +++ b/keyboards/amj60/keymaps/default/keymap.c @@ -11,10 +11,6 @@ // dual-role shortcuts #define SPACEDUAL LT(_SPC, KC_SPACE) - -// increase readability -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c index b5fd731ddd9b..0c5dc6b880a0 100644 --- a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c @@ -30,10 +30,6 @@ #define GER_BRC_L RALT(KC_8) // [ #define GER_BRC_R RALT(KC_9) // ] -// increase readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer * ,-----------------------------------------------------------. @@ -111,21 +107,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SFX] = LAYOUT_iso_splitrshift( RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_BSLS, \ - _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ - _______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), }; -enum function_id { - LAUNCH, - RGBLED_TOGGLE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_FUNCTION(LAUNCH), - [10] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/amj60/keymaps/maximized/keymap.c b/keyboards/amj60/keymaps/maximized/keymap.c index fd8e198f59c8..c5dc25018c8c 100644 --- a/keyboards/amj60/keymaps/maximized/keymap.c +++ b/keyboards/amj60/keymaps/maximized/keymap.c @@ -11,10 +11,6 @@ // dual-role shortcuts #define SPACEDUAL LT(_SPC, KC_SPACE) - -// increase readability -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/amj96/config.h b/keyboards/amj96/config.h index 2e49380ae672..866bcd526605 100644 --- a/keyboards/amj96/config.h +++ b/keyboards/amj96/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . */ #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN D4 diff --git a/keyboards/amj96/keymaps/default/config.h b/keyboards/amj96/keymaps/default/config.h index 5e346088ed1d..0c01a85594d3 100644 --- a/keyboards/amj96/keymaps/default/config.h +++ b/keyboards/amj96/keymaps/default/config.h @@ -14,11 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "config_common.h" // place overrides here - -#endif diff --git a/keyboards/amjpad/keymaps/default/keymap.c b/keyboards/amjpad/keymaps/default/keymap.c index 01621d54f62d..1c9122c9ec72 100644 --- a/keyboards/amjpad/keymaps/default/keymap.c +++ b/keyboards/amjpad/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - // 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 @@ -11,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-------------------. diff --git a/keyboards/amjpad/keymaps/max/keymap.c b/keyboards/amjpad/keymaps/max/keymap.c index 463a265de134..eb50567e987c 100644 --- a/keyboards/amjpad/keymaps/max/keymap.c +++ b/keyboards/amjpad/keymaps/max/keymap.c @@ -14,8 +14,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-------------------. diff --git a/keyboards/amjpad/keymaps/ortho_left/keymap.c b/keyboards/amjpad/keymaps/ortho_left/keymap.c index 5245138bd16a..815ac2a6818f 100644 --- a/keyboards/amjpad/keymaps/ortho_left/keymap.c +++ b/keyboards/amjpad/keymaps/ortho_left/keymap.c @@ -11,8 +11,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-------------------. diff --git a/keyboards/amjpad/keymaps/ortho_right/keymap.c b/keyboards/amjpad/keymaps/ortho_right/keymap.c index 52e93524b554..cbb81a2eabf4 100644 --- a/keyboards/amjpad/keymaps/ortho_right/keymap.c +++ b/keyboards/amjpad/keymaps/ortho_right/keymap.c @@ -11,8 +11,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-------------------. diff --git a/keyboards/ares/ares.c b/keyboards/ares/ares.c new file mode 100644 index 000000000000..85c7435edc3f --- /dev/null +++ b/keyboards/ares/ares.c @@ -0,0 +1,107 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#include "ares.h" + +#ifdef RGBLIGHT_ENABLE + +#include +#include "i2c_master.h" +#include "rgblight.h" + +extern rgblight_config_t rgblight_config; + +void matrix_init_kb(void) { + i2c_init(); + // call user level keymaps, if any + matrix_init_user(); +} + +// custom RGB driver +void rgblight_set(void) { + if (!rgblight_config.enable) { + memset(led, 0, 3 * RGBLED_NUM); + } + + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} + +bool rgb_init = false; + +void matrix_scan_kb(void) { + // if LEDs were previously on before poweroff, turn them back on + if (rgb_init == false && rgblight_config.enable) { + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + rgb_init = true; + } + + rgblight_task(); + matrix_scan_user(); +} + +#endif + +#ifdef BACKLIGHT_ENABLE +void backlight_init_ports(void) { + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // Turn out the lights + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // Turn on the lights + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} +#endif + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); +} +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +} +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + return process_record_user(keycode, record); +} +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} +*/ \ No newline at end of file diff --git a/keyboards/ares/ares.h b/keyboards/ares/ares.h new file mode 100644 index 000000000000..41ecb570c65b --- /dev/null +++ b/keyboards/ares/ares.h @@ -0,0 +1,37 @@ +/* +Copyright 2019 Maarten Dekkers + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT( \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k00, k01, k02, k06, k0a, k0b, k0c, k0d \ +) \ +{ \ + {k00, k01, k02, XXX, XXX, XXX, k06, XXX, XXX, XXX, k0a, k0b, k0c, k0d, XXX}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \ + {k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e} \ +} diff --git a/keyboards/ares/config.h b/keyboards/ares/config.h new file mode 100644 index 000000000000..f278c6fdca57 --- /dev/null +++ b/keyboards/ares/config.h @@ -0,0 +1,51 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define MANUFACTURER LSJ +#define PRODUCT QMK Firmware for Ares + +#define RGBLED_NUM 16 + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define UNUSED_PINS {} + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file diff --git a/keyboards/ares/info.json b/keyboards/ares/info.json new file mode 100644 index 000000000000..00911deb93cf --- /dev/null +++ b/keyboards/ares/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "LSJ Ares", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"Back space", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps 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":"|", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"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":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/ares/keymaps/default/keymap.c b/keyboards/ares/keymaps/default/keymap.c new file mode 100644 index 000000000000..18e3d30b0d6a --- /dev/null +++ b/keyboards/ares/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* +Copyright 2019 Maarten Dekkers + +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 . +*/ + +#include QMK_KEYBOARD_H + +#define _MA 0 +#define _FN 1 + +#define ______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, 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, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL), +[_FN] = LAYOUT( + RGB_MOD, BL_TOGG, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______) + +}; diff --git a/keyboards/bmini/readme.md b/keyboards/ares/readme.md similarity index 81% rename from keyboards/bmini/readme.md rename to keyboards/ares/readme.md index 9c702621295b..338113a13aa7 100644 --- a/keyboards/bmini/readme.md +++ b/keyboards/ares/readme.md @@ -1,15 +1,13 @@ -B.mini +lSJ Ares ======== -A 75% keyboard with RGB - Keyboard Maintainer: QMK Community -Hardware Supported: B.mini PCB -Hardware Availability: http://winkeyless.kr/product/b-mini-x2-pcb/ +Hardware Supported: LSJ Ares PCB +Hardware Availability: https://geekhack.org/index.php?topic=93146.0 Make example for this keyboard (after setting up your build environment): - make bmini:default + make ares:default Flashing @@ -17,7 +15,7 @@ ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. I Windows: 1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). -2. Place your keyboard into reset. +2. Place your keyboard into reset by holding the left control key and plugging the cable in. 3. Press the `Find Device` button and ensure that your keyboard is found. 4. Press the `Open .hex File` button and locate the `.hex` file you created. 5. Press the `Flash Device` button and wait for the process to complete. @@ -35,7 +33,7 @@ macOS: ``` brew install python brew install pyusb - brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb 4. Place your keyboard into reset. 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. diff --git a/keyboards/ares/rules.mk b/keyboards/ares/rules.mk new file mode 100644 index 000000000000..cd8edc611219 --- /dev/null +++ b/keyboards/ares/rules.mk @@ -0,0 +1,48 @@ +# Copyright 2017 Luiz Ribeiro +# +# 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 . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no +RGBLIGHT_CUSTOM_DRIVER = yes +NO_UART = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +SRC += i2c_master.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/ps2avrGB/usbconfig.h b/keyboards/ares/usbconfig.h similarity index 98% rename from keyboards/ps2avrGB/usbconfig.h rename to keyboards/ares/usbconfig.h index d2d848fcdc8f..89b7ffbaab4c 100644 --- a/keyboards/ps2avrGB/usbconfig.h +++ b/keyboards/ares/usbconfig.h @@ -241,8 +241,8 @@ section at the end of this file). #define USB_CFG_DEVICE_VERSION 0x00, 0x02 /* Version number of the device: Minor number first, then major number. */ -#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' -#define USB_CFG_VENDOR_NAME_LEN 13 +#define USB_CFG_VENDOR_NAME 'L', 'S', 'J' +#define USB_CFG_VENDOR_NAME_LEN 3 /* These two values define the vendor name returned by the USB device. The name * must be given as a list of characters under single quotes. The characters * are interpreted as Unicode (UTF-16) entities. @@ -251,8 +251,8 @@ section at the end of this file). * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for * details. */ -#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' -#define USB_CFG_DEVICE_NAME_LEN 8 +#define USB_CFG_DEVICE_NAME 'A', 'r', 'e', 's' +#define USB_CFG_DEVICE_NAME_LEN 4 /* Same as above for the device name. If you don't want a device name, undefine * the macros. See the file USB-IDs-for-free.txt before you assign a name if * you use a shared VID/PID. diff --git a/keyboards/atom47/keymaps/LEdiodes/keymap.c b/keyboards/atom47/keymaps/LEdiodes/keymap.c index 15343ab33541..87e1244214a5 100644 --- a/keyboards/atom47/keymaps/LEdiodes/keymap.c +++ b/keyboards/atom47/keymaps/LEdiodes/keymap.c @@ -6,8 +6,6 @@ #define _L2 2 #define _L3 3 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_L0] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, \ diff --git a/keyboards/atom47/keymaps/default/keymap.c b/keyboards/atom47/keymaps/default/keymap.c index a66961fba92e..dc87b5a52bea 100644 --- a/keyboards/atom47/keymaps/default/keymap.c +++ b/keyboards/atom47/keymaps/default/keymap.c @@ -10,8 +10,6 @@ #define _FN1 2 //Fn1 #define _PN 3 //Pn -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MA] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, \ diff --git a/keyboards/atom47/keymaps/maartenwut/keymap.c b/keyboards/atom47/keymaps/maartenwut/keymap.c index 33ed0936a0a8..c01ace92a96f 100644 --- a/keyboards/atom47/keymaps/maartenwut/keymap.c +++ b/keyboards/atom47/keymaps/maartenwut/keymap.c @@ -9,8 +9,6 @@ #define _LO 1 //FN1 #define _RA 2 //FN -#define _______ KC_TRNS - enum custom_keycodes { CTRLZ = SAFE_RANGE, CTRLX, diff --git a/keyboards/atomic/keymaps/default/keymap.c b/keyboards/atomic/keymaps/default/keymap.c index 6e8cd9f05c75..55de476d1a8f 100644 --- a/keyboards/atomic/keymaps/default/keymap.c +++ b/keyboards/atomic/keymaps/default/keymap.c @@ -1,9 +1,7 @@ #include QMK_KEYBOARD_H // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _QW 0 diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c index 4ccac63f6cb1..33b3a9d824b8 100644 --- a/keyboards/atomic/keymaps/pvc/keymap.c +++ b/keyboards/atomic/keymaps/pvc/keymap.c @@ -104,8 +104,6 @@ enum keyboard_macros { #define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT KC_FN0 -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX @@ -608,4 +606,4 @@ void music_scale_user(void) PLAY_SONG(music_scale); } -#endif /* AUDIO_ENABLE */ \ No newline at end of file +#endif /* AUDIO_ENABLE */ diff --git a/keyboards/atomic/readme.md b/keyboards/atomic/readme.md index ab2fa4a23975..0561c4fea5ec 100644 --- a/keyboards/atomic/readme.md +++ b/keyboards/atomic/readme.md @@ -3,7 +3,7 @@ Atomic ![Atomic](http://i.imgur.com/3gNDJAh.jpg) -A compact 60% (15x5) ortholinear keyboard kit made and sold by OLKB. [More info on qmk.fm](http://qmk.fm/atomic/) +A compact 60% (15x5) ortholinear keyboard kit made and sold by OLKB. Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) Hardware Supported: Atomic PCB rev1, Teensy 2.0 diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c index d353728a97e4..631697384b89 100644 --- a/keyboards/atreus/keymaps/default/keymap.c +++ b/keyboards/atreus/keymaps/default/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LW] = LAYOUT( /* [> LOWER <] */ KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , + KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 , KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 , KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) }; diff --git a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c index a6efd1befa37..0fda245e2ee5 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c @@ -8,6 +8,21 @@ #define COMBINED 3 #define BROWSER_CONTROL 4 +// aliases +// shell +#define SHELL_DEL_WORD RCTL(KC_W) +// android studio + +#define AS_TABLEFT LALT(KC_LEFT) +#define AS_TABRIGHT LALT(KC_RIGHT) +#define AS_SYMBOL LCTL(LALT(KC_N)) +#define AS_CLASS LCTL(KC_N) +#define AS_FINDUSAGE LALT(KC_F7) +#define AS_BACK LCTL(LALT(KC_LEFT)) +#define AS_GO_DECLARATION LCTL(KC_B) +#define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B)) +#define AS_CLOSETAB LCTL(KC_F4) +#define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4)) enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here @@ -37,10 +52,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [KEYNAV] = LAYOUT( - KC_ESC, CLOUD9_GOTO_LINE, RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, - MEH(KC_F11), CLOUD9_GOTO_SYMBOL, RSFT(KC_TAB), KC_TAB, MEH(KC_A), LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), - MEH(KC_B), CLOUD9_NAVIGATE, CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, CLOUD9_TAB_CLOSE, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) + KC_ESC, AS_GO_IMPLEMENTATION, RCTL(KC_Z), RCTL(KC_S), MEH(KC_A), MEH(KC_B), KC_HOME, KC_UP, KC_END, KC_PGUP, + AS_BACK, AS_SYMBOL, RSFT(KC_TAB), KC_TAB, SHELL_DEL_WORD, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), + AS_FINDUSAGE, AS_CLASS, AS_TABLEFT, AS_TABRIGHT, AS_CLOSETAB, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, + AS_CLOSETOOLWINDOW, AS_GO_DECLARATION, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE) ), [KEYSEL] = LAYOUT( diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 232c700e948b..e890e7f52812 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -11,11 +11,6 @@ #define NUMS 1 #define MOUS 2 -// Some quick aliases, just to make it look pretty -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( /* Qwerty */ KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , diff --git a/keyboards/atreus/keymaps/xk/keymap.c b/keyboards/atreus/keymaps/xk/keymap.c index ed1f634cebe8..a03dee9ca9d5 100644 --- a/keyboards/atreus/keymaps/xk/keymap.c +++ b/keyboards/atreus/keymaps/xk/keymap.c @@ -57,9 +57,6 @@ WINSH, OSX, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // action-TAP for key/mod behavior LT(layer, KC) #define XK_TAB LT(_KAMELOC, KC_TAB) #define XK_BSP LT(_KAMELOC, KC_BSPC) diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index dc9c308c3894..fe1ca295d86f 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -38,10 +38,6 @@ enum planck_keycodes { #define ESCTRL CTL_T(KC_ESC) #define TABALT ALT_T(KC_TAB) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak Layer ,----------------------------------. ,----------------------------------. diff --git a/keyboards/atreus/keymaps/yttyx/README.md b/keyboards/atreus/keymaps/yttyx/README.md index 9ed9d6239b78..aac02c6c11f7 100644 --- a/keyboards/atreus/keymaps/yttyx/README.md +++ b/keyboards/atreus/keymaps/yttyx/README.md @@ -1,77 +1,103 @@ # Overview -A Balance 12 layout for the Atreus keyboard. +This layout is based on Balance Twelve (mirror variant) by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/) +for more information. It's designed for left-handers who use their right hand for the mouse. -Balance 12 was created by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/) -for some background on the design of the layout. +## To build -* The variant used here is a mirror of the original for left-handers -* The central column of punctuation keys has been moved elsewhere -* Home positions for the left and right forefingers are *T* and *A* respectively +``` +sudo make atreus:yttyx +``` -## To build/flash +## To flash (example) -> make atreus:yttyx:avrdude +``` +sudo avrdude -p atmega32u4 -c avr109 -U flash:w:atreus_yttyx.hex -P /dev/ttyACM0 +``` ## Layers ### Base: - .----------------------------------. .------------------------------. - | P | L | C | D | W | | U | O | Y | K | Q | - +------+------+------+-----+-------| |------+-----+-----+-----+-----| - | N | R | S | T | M | | A | E | I | H | V | - +------+------+------+-----+-------| |------+-----+-----+-----+-----| - | Z | J | F | G | B | | , | . | ; | X | - | - +------+------+------+-----+-------+---------+------+-----+-----+-----+-----| - | Shft | Ctl | Alt | BS | Space | L1 | R1 | Shft | R2 | Win | Ctl | Alt | - '---------------------------------------------------------------------------' - -### L1: - - .---------------------------------. .--------------------------------. - | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |------+------+------+----+-------| |------+----+-----+------+-------| - | Tab | ? | = | - | _ | | ' | " | + | * | Enter | - |------+------+------+----+-------| |------+----+-----+------+-------| - | Esc | ! | & | | | | , | . | ; | | - | - |------+------+------+----+-------+---------+------+----+-----+------+-------| - | Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt | - '----------------------------------------------------------------------------' - -### R1: - - .---------------------------------. .-------------------------------. - | < | > | { | } | @ | | $ | � | | | R3 | - +------+------+-----+-----|-------| |------+----+-----+------+------| - | [ | ] | ( | ) | # | | ' | " | ~ | ` | Caps | - |------+------+-----+-----+-------| |------+----+-----+------+------| - | / | \ | ^ | | | % | | , | . | ; | | PScn | - |------+------+-----+-----+-------+---------+------+----+-----+------+------| - | Shft | Ctrl | Alt | Del | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt | - '---------------------------------------------------------------------------' - -### R2: - - .-----------------------------------. .--------------------.-----------------. - | F12 | F11 | F10 | F9 | Copy | | Home | Up | End | PgUp | Insert | - |------+------+------+------+-------| |------+------+------+------+----------| - | F8 | F7 | F6 | F5 | Paste | | Left | Down | Right| PgDn | Enter | - |------+------+------+------+-------| |------+------+------+------+----------| - | F4 | F3 | F2 | F1 | Cut | | ^Tab | | Tab | | | - |------+------+------+------+-------+---------+------+------+------+------+----------| - | Shft | Ctrl | Alt | Del | Undo | L1 | R1 | Shft | R2 | Sup | Ctrl | WinRight | - '------------------------------------------------------------------------------------' - -### R3: - - .----------------------------. .------------------------. - | RESET | | | | | | | | | | R3 | - |-------+----+-----+----+----| |----+----+----+----+----| - | | | | | | | | | | | | - |-------+----+-----+----+----| |----+----+----+----+----| - | | | | | | | | | | | | - |-------+----+-----+----+----+---------+----+----+----+----+----| - | | | | | | | | | | | | | - '---------------------------------------------------------------' - + .--------.-------.-------.-------.--------. .-------.-------.-------.-------.------. + | P | L | C | D | W | | U | O | Y | K | Q | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | N | R | S | T | M | | A | E | I | H | V | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup | + '--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------' + | BS P1 | Spc P2 | P3 | | | Sft | | + '-------'--------'-----' '-----'-------'-------' + +### P1: Punctuation (1) + + + .--------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | | | RS | | | | / | ^ | � | ~ | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | | | | & | \ | ` | $ | Ent | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup | + '--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | P1 | | | | | Sft | | + '-------'-------'-----' '-----'------'-------' + +### P2: Punctuation (2) + + .-------.-------.-------.-------.-------. .-------.-------.-------.-------.------. + | Esc | | NC | FV | | | ( | ) | " | ? | | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------' + | BS | P2 | | | | Sft | | + '-------'-------'-----' '-----'-------'-------' + +### P3: Punctuation (3) + + .-------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | Break | Pscr | ScLk | | < | > | + | _ | = | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | Caps | | | [ | ] | * | - | Ent | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | BS | | P3 | | | Sft | | + '-------'-------'-----' '-----'------'-------' + +### Numerals / Cursor control + + .-------.-------.-------.------.-------. .------.-------.-------.------.------. + | 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup | + '-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------' + | BS | BA | | | | Sft | | + '------'-------'-----' '-----'------'-------' + +### FV: Function keys / Cursor control (Vim) + + .-------.------.-------.-----.-------. .------.-------.-----.-------.------. + | F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup | + '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' + | BS | BA | | | | Sft | | + '-----'-------'-----' '-----'------'-------' + +### RS: Reset + + .-------.------.-------.-----.-------. .------.-------.-----.-------.------. + | RESET | | | | | | | | | | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | | | | | | | | | | | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | | | | | | | | | | | | + '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' + | | BA | | | | | | + '-----'-------'-----' '-----'------'-------' diff --git a/keyboards/atreus/keymaps/yttyx/config.h b/keyboards/atreus/keymaps/yttyx/config.h index 68e0225e0087..b9e113ec0bb4 100644 --- a/keyboards/atreus/keymaps/yttyx/config.h +++ b/keyboards/atreus/keymaps/yttyx/config.h @@ -1,12 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H - -#define ONESHOT_TIMEOUT 500 // Time (in ms) before the one shot key is released - -// Disable some options to reduce firmware size -#define NO_PRINT -#define NO_ACTION_TAPPING +#pragma once +#define NO_ACTION_ONESHOT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/atreus/keymaps/yttyx/keymap.c b/keyboards/atreus/keymaps/yttyx/keymap.c index 8773a9734bdb..dad36cad9288 100644 --- a/keyboards/atreus/keymaps/yttyx/keymap.c +++ b/keyboards/atreus/keymaps/yttyx/keymap.c @@ -2,118 +2,158 @@ #include QMK_KEYBOARD_H enum layers { - BASE, // Balance Twelve - L1, // (momentary) - R1, // (momentary) - R2, // (momentary) - R3 // (momentary) + BA, // Base (Balance Twelve mirror variant) + P1, // Punctuation (1) + P2, // Punctuation (2) + P3, // Punctuation (2) + NC, // Numerals / Cursor control + FV, // Function keys / Cursor control (Vim) + RS // Reset }; -#define xxxxxxx KC_NO -#define _______ KC_TRNS +// Abbreviations - base +#define KX_P1_BSPC LT(P1, KC_BSPC) +#define KX_P2_SPC LT(P2, KC_SPC) -// Aliases from replicaJunction's atreus layout -#define KCX_LST LSFT(KC_TAB) -#define KX_COPY LCTL(KC_C) -#define KX_CUT LCTL(KC_X) -#define KX_PAST LCTL(KC_V) -#define KX_UNDO LCTL(KC_Z) +#define KX_SFT_Z MT(MOD_LSFT, KC_Z) +#define KX_CTL_J MT(MOD_LCTL, KC_J) +#define KX_ALT_F MT(MOD_LALT, KC_F) -#define KX_AT LSFT(KC_QUOT) -#define KX_PIPE LSFT(KC_NUBS) -#define KX_WINR LSFT(LGUI(KC_RGHT)) // Move window to next monitor (Windows) +#define KX_ALT_DOT MT(MOD_LALT, KC_DOT) +#define KX_CTL_SCLN MT(MOD_LCTL, KC_SCLN) +#define KX_SFT_X MT(MOD_LSFT, KC_X) +#define KX_AT LSFT(KC_QUOT) +#define KX_DQUOT LSFT(KC_2) +#define KX_PIPE LSFT(KC_NUBS) +#define KX_TILDA LSFT(KC_NUHS) + const uint16_t PROGMEM keymaps[][ MATRIX_ROWS ][ MATRIX_COLS ] = { + /* + .--------.-------.-------.-------.--------. .-------.-------.-------.-------.------. + | P | L | C | D | W | | U | O | Y | K | Q | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | N | R | S | T | M | | A | E | I | H | V | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup | + '--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------' + | BS P1 | Spc P2 | P3 | | | Sft | | + '-------'--------'-----' '-----'-------'-------' + */ + [BA] = LAYOUT( + KC_P, KC_L, KC_C, KC_D, KC_W, KC_U, KC_O, KC_Y, KC_K, KC_Q, + KC_N, KC_R, KC_S, KC_T, KC_M, KC_A, KC_E, KC_I, KC_H, KC_V, + KX_SFT_Z, KX_CTL_J, KX_ALT_F, KC_G, KC_B, KC_COMM, KX_ALT_DOT, KX_CTL_SCLN, KX_SFT_X, KC_LGUI, + XXXXXXX, XXXXXXX, XXXXXXX, KX_P1_BSPC, KX_P2_SPC, MO(P3), XXXXXXX, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* P1: Punctuation (1) + .--------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | | | RS | | | | / | ^ | � | ~ | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | | | | & | \ | ` | $ | Ent | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup | + '--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | P1 | | | | | Sft | | + '-------'-------'-----' '-----'------'-------' + */ + [P1] = LAYOUT( + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, TO(RS), KX_PIPE, KC_SLSH, KC_CIRC, KC_HASH, KX_TILDA, + KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_AMPR, KC_NUBS, KC_GRV, KC_DLR, KC_ENT, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, KC_PERC, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), - /* Balance Twelve mirror variant (left-handed) - .--------------------------------. .------------------------------. - | P | L | C | D | W | | U | O | Y | K | Q | - +------+------+-----+----+-------| |------+----+-----+------+-----| - | N | R | S | T | M | | A | E | I | H | V | - +------+------+-----+----+-------| |------+----+-----+------+-----| - | Z | J | F | G | B | | , | . | ; | X | - | - +------+------+-----+----+-------+---------+------+----+-----+------+-----| - | Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Win | Ctrl | Alt | - '-------------------------------------------------------------------------' + /* P2: Punctuation (2) + .-------.-------.-------.-------.-------. .-------.-------.-------.-------.------. + | Esc | | NC | FV | | | ( | ) | " | ? | | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------' + | BS | P2 | | | | Sft | | + '-------'-------'-----' '-----'-------'-------' */ - [BASE] = LAYOUT( - KC_P, KC_L, KC_C, KC_D, KC_W, KC_U, KC_O, KC_Y, KC_K, KC_Q, - KC_N, KC_R, KC_S, KC_T, KC_M, KC_A, KC_E, KC_I, KC_H, KC_V, - KC_Z, KC_J, KC_F, KC_G, KC_B, KC_COMM, KC_DOT, KC_SCLN, KC_X, KC_MINS, - KC_LSFT, KC_LCTL, KC_LALT, KC_BSPC, KC_SPC, MO(L1), MO(R1), OSM(MOD_LSFT), MO(R2), KC_LWIN, KC_RCTL, KC_RALT + [P2] = LAYOUT( + KC_ESC, XXXXXXX, TO(NC), TO(FV), XXXXXXX, KC_LPRN, KC_RPRN, KX_DQUOT, KC_QUES, XXXXXXX, + KC_TAB, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_Z), KC_LCBR, KC_RCBR, KC_QUOT, KC_EXLM, KC_ENT, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_ENT, KC_NUHS, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), - /* L1 - .---------------------------------. .--------------------------------. - | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |------+------+------+----+-------| |------+----+-----+------+-------| - | Tab | ? | = | - | _ | | ' | " | + | * | Enter | - |------+------+------+----+-------| |------+----+-----+------+-------| - | Esc | ! | & | | | | , | . | ; | | - | - |------+------+------+----+-------+---------+------+----+-----+------+-------| - | Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt | - '----------------------------------------------------------------------------' + /* P3: Punctuation (3) + .-------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | Break | Pscr | ScLk | | < | > | + | _ | = | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | Caps | | | [ | ] | * | - | Ent | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | BS | | P3 | | | Sft | | + '-------'-------'-----' '-----'------'-------' */ - [L1] = LAYOUT( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, - KC_TAB, KC_QUES, KC_EQL, KC_MINS, KC_UNDS, KC_QUOT, LSFT(KC_2), KC_PLUS, KC_ASTR, KC_ENT, - KC_ESC, KC_EXLM, KC_AMPR, xxxxxxx, xxxxxxx, _______, _______, _______, xxxxxxx, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + [P3] = LAYOUT( + KC_ESC, XXXXXXX, KC_BRK, KC_PSCR, KC_SLCK, KC_LABK, KC_RABK, KC_PLUS, KC_UNDS, KC_EQL, + KC_TAB, XXXXXXX, XXXXXXX, KC_CAPS, XXXXXXX, KC_LBRC, KC_RBRC, KC_ASTR, KC_MINS, KC_ENT, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, KX_AT, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), - /* R1 - .---------------------------------. .-------------------------------. - | < | > | { | } | @ | | $ | � | | | R3 | - +------+------+-----+-----|-------| |------+----+-----+------+------| - | [ | ] | ( | ) | # | | ' | " | ~ | ` | Caps | - |------+------+-----+-----+-------| |------+----+-----+------+------| - | / | \ | ^ | | | % | | , | . | ; | | PScn | - |------+------+-----+-----+-------+---------+------+----+-----+------+------| - | Shft | Ctrl | Alt | Del | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt | - '---------------------------------------------------------------------------' + /* NC: Numerals / Cursor control + .-------.-------.-------.------.-------. .------.-------.-------.------.------. + | 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup | + '-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------' + | BS | BA | | | | Sft | | + '------'-------'-----' '-----'------'-------' */ - [R1] = LAYOUT( - KC_LABK, KC_RABK, KC_LCBR, KC_RCBR, KX_AT, KC_DLR, KC_HASH, xxxxxxx, xxxxxxx, MO(R3), - KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_NUHS, KC_QUOT, LSFT(KC_2), LSFT(KC_NUHS), KC_GRV, KC_CAPS, - KC_SLSH, KC_NUBS, KC_CIRC, KX_PIPE, KC_PERC, _______, _______, _______, xxxxxxx, KC_PSCR, - _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______ + [NC] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, + KC_6, KC_7, KC_8, KC_9, KC_0, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_DOT, KC_INS, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), - /* R2 - .-----------------------------------. .--------------------.-----------------. - | F12 | F11 | F10 | F9 | Copy | | Home | Up | End | PgUp | Insert | - |------+------+------+------+-------| |------+------+------+------+----------| - | F8 | F7 | F6 | F5 | Paste | | Left | Down | Right| PgDn | Enter | - |------+------+------+------+-------| |------+------+------+------+----------| - | F4 | F3 | F2 | F1 | Cut | | ^Tab | | Tab | | | - |------+------+------+------+-------+---------+------+------+------+------+----------| - | Shft | Ctrl | Alt | Del | Undo | L1 | R1 | Shft | R2 | Sup | Ctrl | WinRight | - '------------------------------------------------------------------------------------' + /* FV: Function keys / Cursor control (Vim) + .-------.------.-------.-----.-------. .------.-------.-----.-------.------. + | F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup | + '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' + | BS | BA | | | | Sft | | + '-----'-------'-----' '-----'------'-------' */ - [R2] = LAYOUT( - KC_F12, KC_F11, KC_F10, KC_F9, KX_COPY, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_INS, - KC_F8, KC_F7, KC_F6, KC_F5, KX_PAST, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_ENT, - KC_F4, KC_F3, KC_F2, KC_F1, KX_CUT, KCX_LST, xxxxxxx, KC_TAB, xxxxxxx, xxxxxxx, - _______, _______, _______, KC_DEL, KX_UNDO, _______, _______, _______, _______, _______, _______, KX_WINR + [FV] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_0, KC_K, KC_DLR, LCTL(KC_B), XXXXXXX, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_H, KC_J, KC_L, LCTL(KC_F), XXXXXXX, + KC_LSFT, KC_LCTL, KC_LALT, KC_F11, KC_F12, XXXXXXX, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), - /* R3 - .----------------------------. .------------------------. - | RESET | | | | | | | | | | R3 | - |-------+----+-----+----+----| |----+----+----+----+----| - | | | | | | | | | | | | - |-------+----+-----+----+----| |----+----+----+----+----| - | | | | | | | | | | | | - |-------+----+-----+----+----+---------+----+----+----+----+----| - | | | | | | | | | | | | | - '---------------------------------------------------------------' + /* RS: Reset + .-------.------.-------.-----.-------. .------.-------.-----.-------.------. + | RESET | | | | | | | | | | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | | | | | | | | | | | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | | | | | | | | | | | | + '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' + | | BA | | | | | | + '-----'-------'-----' '-----'------'-------' */ - [R3] = LAYOUT( - RESET, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, _______, - xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, - xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, - xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx + [RS] = LAYOUT( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TO(BA), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ) }; diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index 50901ee328a1..5cd797da96ff 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -1,21 +1,24 @@ Atreus -=== +====== A small mechanical keyboard that is based around the shape of the human hand. -These configuration files are specifically for the Atreus keyboards created by Phil Hagelberg (@technomancy). This keyboard is available in two variants: one powered by a Teensy 2, (usually hand-wired) one powered by an A-Star. (usually using a PCB) This repository currently assumes that you have an A-Star powered Atreus. If you are using a Teensy2, specify that by adding `TEENSY2=yes` to your `make` commands. - Keyboard Maintainer: [Phil Hagelberg](https://github.com/technomancy) Hardware Supported: Atreus, PCB-based or hand-wired Hardware Availability: https://atreus.technomancy.us -Make example for this keyboard (after setting up your build environment): +These configuration files are specifically for the Atreus keyboards created by Phil Hagelberg (@technomancy). This keyboard is available in two variants: one powered by a Teensy 2 (usually hand-wired), one powered by an A-Star (usually using a PCB). You will need to use different `make` commands depending on the variant you have; see examples below. + +A-Star:\ +`make atreus:default:avrdude` - make atreus:default:avrdude +Teensy:\ +`make TEENSY2=yes atreus:default:teensy` + +If your keyboard layout is a mirror image of what you expected (i.e. you do not get QWERTY on the left but YTREWQ on the right), then you have an A-Star powered Atreus (older than March 2016) with PCB labels facing *down* instead of up. Specify that by adding `PCBDOWN=yes` to your `make` commands, e.g. -Unlike the TMK firmware, this command should be run from the root of -the repository, not the directory containing this readme. +`make PCBDOWN=yes atreus:default:avrdude` -If your keyboard layout is a mirror image of what you expected (i.e. you do not get QWERTY on the left but YTREWQ on the right), then you have an A-Star powered Atreus (older than March 2016) with PCB labels facing *down* instead of up. Specify that by adding `PCBDOWN=yes` to your `make` commands. +*Unlike the TMK firmware, these commands should be run from the root of the repository, not the directory containing this readme.* -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 [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. diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk index 2488fd5e8742..eda77404a023 100644 --- a/keyboards/atreus/rules.mk +++ b/keyboards/atreus/rules.mk @@ -1,19 +1,4 @@ - - -ifdef TEENSY2 - OPT_DEFS += -DATREUS_TEENSY2 - ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex -else - OPT_DEFS += -DATREUS_ASTAR -ifdef PCBDOWN - OPT_DEFS += -DPCBDOWN -endif - ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) -endif - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. @@ -48,34 +33,56 @@ ARCH = AVR8 # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. F_USB = $(F_CPU) -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID ifdef TEENSY2 BOOTLOADER = halfkay + OPT_DEFS += -DATREUS_TEENSY2 else BOOTLOADER = caterina + OPT_DEFS += -DATREUS_ASTAR + ifdef PCBDOWN + OPT_DEFS += -DPCBDOWN + endif endif -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options -# comment out to disable the options. +# change yes to no to disable # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls -UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID - -USB = /dev/cu.usbmodem1411 +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/atreus62/keymaps/jarred/config.h b/keyboards/atreus62/keymaps/jarred/config.h new file mode 100644 index 000000000000..34ab0baaf0b9 --- /dev/null +++ b/keyboards/atreus62/keymaps/jarred/config.h @@ -0,0 +1,21 @@ +/* Copyright 2018 Jarred Steenvoorden + * + * 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 . + */ + +#pragma once + +// My hand wire diodes are in the opposite direction to the Atreus62 PCB +#undef DIODE_DIRECTION +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus62/keymaps/jarred/keymap.c b/keyboards/atreus62/keymaps/jarred/keymap.c new file mode 100644 index 000000000000..7a49b2890c4a --- /dev/null +++ b/keyboards/atreus62/keymaps/jarred/keymap.c @@ -0,0 +1,26 @@ +/* Copyright 2018 Jarred Steenvoorden + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "jarred.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_atreus62_grid_wrapper(BLANK_12, QWERTY_1_12, QWERTY_2_12, QWERTY_3_12, QWERTY_L4, KC_NO, KC_NO, QWERTY_R4), + [_LW] = LAYOUT_atreus62_grid_wrapper(BLANK_12, LOWER_1_12 , LOWER_2_12 , LOWER_3_12 , LOWER_L4 , KC_NO, KC_NO, LOWER_R4 ), + [_NV] = LAYOUT_atreus62_grid_wrapper(BLANK_12, NAV_1_12 , NAV_2_12 , NAV_3_12 , NAV_L4 , KC_NO, KC_NO, NAV_R4 ), + [_NP] = LAYOUT_atreus62_grid_wrapper(BLANK_12, NUMPAD_1_12, NUMPAD_2_12, NUMPAD_3_12, NUMPAD_L4, KC_NO, KC_NO, NUMPAD_R4), + [_MS] = LAYOUT_atreus62_grid_wrapper(BLANK_12, MOUSE_1_12 , MOUSE_2_12 , MOUSE_3_12 , MOUSE_L4 , KC_NO, KC_NO, MOUSE_R4 ) +}; diff --git a/keyboards/atreus62/keymaps/pcewing/keymap.c b/keyboards/atreus62/keymaps/pcewing/keymap.c index 46ec3d548ea1..eee22271f48b 100644 --- a/keyboards/atreus62/keymaps/pcewing/keymap.c +++ b/keyboards/atreus62/keymaps/pcewing/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS #define FN MO(_FN) #define TODO KC_NO diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index cc45e25fa402..a7c33ce9eabe 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -63,10 +63,6 @@ enum atreus52_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases to make the keymap clearer. #define CTL_ENT CTL_T(KC_ENT) diff --git a/keyboards/baguette/config.h b/keyboards/baguette/config.h index 0b53c653f679..1259d7055936 100644 --- a/keyboards/baguette/config.h +++ b/keyboards/baguette/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B6, C6, C7, F7, F6, F5, F4, F1, F0, B0, D0, D1, D2, D3, D5, D4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/baguette/info.json b/keyboards/baguette/info.json index f3c9b308fb6e..2e845cdda59b 100644 --- a/keyboards/baguette/info.json +++ b/keyboards/baguette/info.json @@ -123,7 +123,7 @@ {"label":";", "x":10.75, "y":2}, {"label":"'", "x":11.75, "y":2}, {"label":"ISO #", "x":12.75, "y":2}, - {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"ISO \\", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, diff --git a/keyboards/baguette/readme.md b/keyboards/baguette/readme.md index d211af16a546..e6188cc99048 100644 --- a/keyboards/baguette/readme.md +++ b/keyboards/baguette/readme.md @@ -6,7 +6,7 @@ Baguette This is a custom keyboard with backlight inspired by France. Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) -Hardware Supported: ATMEGA 32u4 MCU with backlight support. +Hardware Supported: ATMEGA 32u4 MCU with backlight support. Hardware Availability: Closed group-buy please contact the runners (Tesletron and Enjoy) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/bface/program b/keyboards/bface/program deleted file mode 100755 index 298e645477de..000000000000 --- a/keyboards/bface/program +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Luiz Ribeiro , Sebastian Kaim -# -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - - -def checkForKeyboardInNormalMode(): - """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found.""" - return usb.core.find(idVendor=0x20A0, idProduct=0x422D) - -def checkForKeyboardInBootloaderMode(): - """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise.""" - return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None) - -def flashKeyboard(firmware_file): - """Calls bootloadHID to flash the given file to the device.""" - print('Flashing firmware to device ...') - if os.system('bootloadHID -r "%s"' % firmware_file) == 0: - print('\nDone!') - else: - print('\nbootloadHID returned an error.') - -def printDeviceInfo(dev): - """Prints all infos for a given USB device""" - print('Device Information:') - print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) - print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) - print('Manufacturer: %s' % (dev.iManufacturer)) - print('Serial: %s' % (dev.iSerialNumber)) - print('Product: %s' % (dev.iProduct), end='\n\n') - -def sendDeviceToBootloaderMode(dev): - """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing.""" - try: - dev.set_configuration() - - request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - - USBRQ_HID_SET_REPORT = 0x09 - HID_REPORT_OPTION = 0x0301 - - dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5) - except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -kb = checkForKeyboardInNormalMode() - -if kb is not None: - print('Found a keyboad in normal mode. Attempting to send it to bootloader mode ...', end='') - sendDeviceToBootloaderMode(kb) - print(' done.') - print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.") - print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode") - -attempts = 12 # 60 seconds -found = False -for attempt in range(1, attempts + 1): - print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='') - - if checkForKeyboardInBootloaderMode(): - print('Found', end='\n\n') - flashKeyboard(sys.argv[1]) - found = True - break - else: - print('Nothing.', end='') - - if attempt != attempts: # no need to wait on the last attempt - print(' Sleeping 5 seconds.', end='') - time.sleep(5) - - # print a newline - print() - -if not found: - print("Couldn't find a flashable keyboard. Aborting.") - sys.exit(2) - diff --git a/keyboards/bfo9000/serial.c b/keyboards/bfo9000/serial.c deleted file mode 100644 index fea57b651018..000000000000 --- a/keyboards/bfo9000/serial.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include "serial.h" - -#ifndef USE_I2C - -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 - -matrix_row_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -matrix_row_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define ROW_MASK (((matrix_row_t)0-1)>>(8*sizeof(matrix_row_t)-MATRIX_COLS)) - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -matrix_row_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -} - -// Used by the master to synchronize timing with the slave. -static -void sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static -void sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static -matrix_row_t serial_read_byte(void) { - matrix_row_t byte = 0; - serial_input(); - for ( uint8_t i = 0; i < MATRIX_COLS; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - _delay_us(1); - } - - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(matrix_row_t data) { - matrix_row_t b = MATRIX_COLS; - serial_output(); - while( b-- ) { - if(data & (1UL << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); - - matrix_row_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); - sync_send(); - checksum += ROW_MASK & serial_slave_buffer[i]; - } - serial_write_byte(checksum); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); - - matrix_row_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_master_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += ROW_MASK & serial_master_buffer[i]; - } - matrix_row_t checksum_received = serial_read_byte(); - sync_send(); - - serial_input(); // end transaction - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(1); - - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - sei(); - return 1; - } - - // if the slave is present syncronize with it - sync_recv(); - - matrix_row_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_slave_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += ROW_MASK & serial_slave_buffer[i]; - } - matrix_row_t checksum_received = serial_read_byte(); - sync_recv(); - - if (checksum_computed != checksum_received) { - sei(); - return 1; - } - - matrix_row_t checksum = 0; - // send data to the slave - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_master_buffer[i]); - sync_recv(); - checksum += ROW_MASK & serial_master_buffer[i]; - } - serial_write_byte(checksum); - sync_recv(); - - // always, release the line when not in use - serial_output(); - serial_high(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/bfo9000/serial.h b/keyboards/bfo9000/serial.h deleted file mode 100644 index 62761945721b..000000000000 --- a/keyboards/bfo9000/serial.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H - -#include "config.h" -#include "matrix.h" -#include - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD0) -#define SERIAL_PIN_INTERRUPT INT0_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 - -// Buffers for master - slave communication -extern volatile matrix_row_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile matrix_row_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/bigswitch/keymaps/wanleg/config.h b/keyboards/bigswitch/keymaps/wanleg/config.h index 8ac82f40d99f..0c6790618e8e 100644 --- a/keyboards/bigswitch/keymaps/wanleg/config.h +++ b/keyboards/bigswitch/keymaps/wanleg/config.h @@ -22,7 +22,7 @@ #undef MATRIX_COL_PINS #define MATRIX_COL_PINS { B6 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #undef DIODE_DIRECTION #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/blockey/config.h b/keyboards/blockey/config.h index f47849744afd..9bf64ef002ab 100644 --- a/keyboards/blockey/config.h +++ b/keyboards/blockey/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D0, B4, C6, D7, F4, F5, F7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* ws2812 RGB LED */ diff --git a/keyboards/blockey/keymaps/default/keymap.c b/keyboards/blockey/keymaps/default/keymap.c index 5b1145482322..82366501aedf 100644 --- a/keyboards/blockey/keymaps/default/keymap.c +++ b/keyboards/blockey/keymaps/default/keymap.c @@ -20,11 +20,6 @@ extern rgblight_config_t rgblight_config; #endif -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ diff --git a/keyboards/blockey/keymaps/eucalyn/keymap.c b/keyboards/blockey/keymaps/eucalyn/keymap.c index 33d1051a11e6..99564cae165b 100644 --- a/keyboards/blockey/keymaps/eucalyn/keymap.c +++ b/keyboards/blockey/keymaps/eucalyn/keymap.c @@ -20,11 +20,6 @@ extern rgblight_config_t rgblight_config; #endif -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ diff --git a/keyboards/bm16a/bm16a.c b/keyboards/bm16a/bm16a.c new file mode 100644 index 000000000000..3d616f29e9dc --- /dev/null +++ b/keyboards/bm16a/bm16a.c @@ -0,0 +1,43 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "bm16a.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/bm16a/bm16a.h b/keyboards/bm16a/bm16a.h new file mode 100644 index 000000000000..cf8bab4730ad --- /dev/null +++ b/keyboards/bm16a/bm16a.h @@ -0,0 +1,39 @@ +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_4x4( \ + K01, K02, K03, K04, \ + K11, K12, K13, K14, \ + K21, K22, K23, K24, \ + K31, K32, K33, K34 \ +) \ +{ \ + { K01, K02, K03, K04 }, \ + { K11, K12, K13, K14 }, \ + { K21, K22, K23, K24 }, \ + { K31, K32, K33, K34 } \ +} diff --git a/keyboards/bm16a/config.h b/keyboards/bm16a/config.h new file mode 100644 index 000000000000..c6b460a1184d --- /dev/null +++ b/keyboards/bm16a/config.h @@ -0,0 +1,246 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x424D +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPrepublic +#define PRODUCT bm16a +#define DESCRIPTION KPrepublic bm16a + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D3, D5, D1, D2} +#define MATRIX_COL_PINS { D6, D4, D7, B4} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B6 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN E2 +#define RGBLED_NUM 4 +#define RGBLIGHT_ANIMATIONS +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/bm16a/info.json b/keyboards/bm16a/info.json new file mode 100644 index 000000000000..4f87c5ae1d27 --- /dev/null +++ b/keyboards/bm16a/info.json @@ -0,0 +1,30 @@ +{ + "keyboard_name": "bm16a", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "key_count": 16, + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3} + ] + } + } + } \ No newline at end of file diff --git a/keyboards/bm16a/keymaps/default/config.h b/keyboards/bm16a/keymaps/default/config.h new file mode 100644 index 000000000000..08c234aee2b2 --- /dev/null +++ b/keyboards/bm16a/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/bm16a/keymaps/default/keymap.c b/keyboards/bm16a/keymaps/default/keymap.c new file mode 100644 index 000000000000..a0b06ee92a38 --- /dev/null +++ b/keyboards/bm16a/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +/* Copyright 2019 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum layers { + _BASE = 0, + _FN1, + _FN2, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_ortho_4x4( + KC_PGUP, KC_HOME, KC_UP, KC_END , \ + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, \ + MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, \ + MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT \ + ), + [_FN1] = LAYOUT_ortho_4x4( + KC_ESC, KC_P7, KC_P8, KC_P9, \ + KC_TAB, KC_P4, KC_P5, KC_P6, \ + KC_ENT, KC_P1, KC_P2, KC_P3, \ + _______, KC_P0, KC_P0, KC_DOT \ + ), + [_FN2] = LAYOUT_ortho_4x4( + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \ + _______, _______, _______, RESET, \ + BL_STEP, _______, QMKBEST, QMKURL \ + ) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} diff --git a/keyboards/bm16a/keymaps/default/readme.md b/keyboards/bm16a/keymaps/default/readme.md new file mode 100644 index 000000000000..f356f2cca051 --- /dev/null +++ b/keyboards/bm16a/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bm16a \ No newline at end of file diff --git a/keyboards/bm16a/readme.md b/keyboards/bm16a/readme.md new file mode 100644 index 000000000000..8d43b7014d03 --- /dev/null +++ b/keyboards/bm16a/readme.md @@ -0,0 +1,15 @@ +# bm16a + +![bm16a](https://ae01.alicdn.com/kf/HTB1RRRQaZfrK1RjSszcq6xGGFXaY.jpg) + +A 16 key macropad, with USB C, RGB underglow and backlight. + +Keyboard Maintainer: QMK Community +Hardware Supported: The PCBs, controllers supported +Hardware Availability: [KPrepublic](https://kprepublic.com/products/bm16a-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx); [AliExpress](https://www.aliexpress.com/store/product/bm16a-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom/3034003_32970629907.html) + +Make example for this keyboard (after setting up your build environment): + + make bm16a: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). diff --git a/keyboards/bm16a/rules.mk b/keyboards/bm16a/rules.mk new file mode 100644 index 000000000000..013dac3c90a1 --- /dev/null +++ b/keyboards/bm16a/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = ortho_4x4 diff --git a/keyboards/bm16s/bm16s.h b/keyboards/bm16s/bm16s.h new file mode 100755 index 000000000000..9aca8c0e3738 --- /dev/null +++ b/keyboards/bm16s/bm16s.h @@ -0,0 +1,15 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} diff --git a/keyboards/bm16s/config.h b/keyboards/bm16s/config.h new file mode 100755 index 000000000000..568e80b39640 --- /dev/null +++ b/keyboards/bm16s/config.h @@ -0,0 +1,46 @@ +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPrepublic +#define PRODUCT bm16s +#define DESCRIPTION KPrepublic bm16s + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D1, D0, D3, D2 } +#define MATRIX_COL_PINS { F7, F6, D4, D6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN + #define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS + #define RGBLED_NUM 16 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/bm16s/info.json b/keyboards/bm16s/info.json new file mode 100644 index 000000000000..706453561e7d --- /dev/null +++ b/keyboards/bm16s/info.json @@ -0,0 +1,30 @@ +{ + "keyboard_name": "bm16s", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "key_count": 16, + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3} + ] + } + } + } \ No newline at end of file diff --git a/keyboards/bm16s/keymaps/default/keymap.c b/keyboards/bm16s/keymaps/default/keymap.c new file mode 100755 index 000000000000..9dd697a0d978 --- /dev/null +++ b/keyboards/bm16s/keymaps/default/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x4( + KC_KP_7, KC_KP_8, KC_KP_9, MO(1), \ + KC_KP_4, KC_KP_5, KC_KP_6, KC_PMNS, \ + KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, \ + KC_KP_0, KC_PDOT, KC_PCMM, KC_PENT \ + ), + [1] = LAYOUT_ortho_4x4( + RESET, BL_STEP, _______, KC_VOLU, \ + BL_TOGG, BL_DEC, BL_INC, KC_VOLD, \ + RGB_TOG, RGB_MOD, RGB_HUI, KC_MUTE, \ + RGB_SAI, RGB_SAD, RGB_HUD, _______ \ + ), +}; \ No newline at end of file diff --git a/keyboards/bm16s/keymaps/media/keymap.c b/keyboards/bm16s/keymaps/media/keymap.c new file mode 100755 index 000000000000..082879320a2b --- /dev/null +++ b/keyboards/bm16s/keymaps/media/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +#define RGB_BRU RGB_VAI +#define RGB_BRD RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho_4x4( + KC_BRIU, _______, _______, KC_VOLU, \ + KC_BRID, _______, _______, KC_VOLD, \ + _______, _______, _______, KC_MUTE, \ + KC_MPRV, KC_MPLY, KC_MNXT, MO(1) \ + ), + [1] = LAYOUT_ortho_4x4( + RESET, _______, _______, _______, \ + RGB_SPD, RGB_BRU, RGB_SPI, _______, \ + RGB_RMOD, RGB_BRD, RGB_MOD, _______, \ + RGB_TOG, _______, _______, _______ \ + ), +}; \ No newline at end of file diff --git a/keyboards/bm16s/readme.md b/keyboards/bm16s/readme.md new file mode 100644 index 000000000000..097a38008031 --- /dev/null +++ b/keyboards/bm16s/readme.md @@ -0,0 +1,13 @@ +# bm16s + +A 16-key macropad, with USB C and per-key RGB backlighting. This is a variant of the BM16A, but with low profile Choc switches. + +Keyboard Maintainer: QMK Community +Hardware Supported: The PCBs, controllers supported +Hardware Availability: [KPrepublic](https://kprepublic.com/collections/pcb/products/bm16s-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-switch-leds-choc-switch); [AliExpress](https://www.aliexpress.com/item/bm16s-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-switch/32999247908.html); [Massdrop](https://www.massdrop.com/buy/78169) + +Make example for this keyboard (after setting up your build environment): + + make bm16s: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). diff --git a/keyboards/bm16s/rules.mk b/keyboards/bm16s/rules.mk new file mode 100755 index 000000000000..f4f1dfd639b9 --- /dev/null +++ b/keyboards/bm16s/rules.mk @@ -0,0 +1,72 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes + +LAYOUTS = ortho_4x4 \ No newline at end of file diff --git a/keyboards/boardwalk/boardwalk.h b/keyboards/boardwalk/boardwalk.h new file mode 100644 index 000000000000..580a320c1f91 --- /dev/null +++ b/keyboards/boardwalk/boardwalk.h @@ -0,0 +1,78 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x14( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413 } \ +} + +#define LAYOUT_ortho_hhkb( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \ + k41, k42, k43, k44, k45, k47, k49, k410, k411, k412 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, KC_NO, k49, k410, k411, k412, KC_NO } \ +} + +#define LAYOUT_ortho_7u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \ + k41, k42, k46, k411, k412 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \ + { KC_NO, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k411, k412, KC_NO } \ +} + +#define LAYOUT_2u_arrow( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \ + k40, k41, k42, k43, k44, k46, k48, k49, k410, k411, k412, k413 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \ + { k40, k41, k42, k43, k44, KC_NO, k46, KC_NO, k48, k49, k410, k411, k412, k413 } \ +} + +#define LAYOUT_625u_arrow( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \ + k40, k41, k42, k45, k49, k410, k411, k412, k413 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \ + { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, k49, k410, k411, k412, k413 } \ +} diff --git a/keyboards/boardwalk/config.h b/keyboards/boardwalk/config.h new file mode 100644 index 000000000000..67352b80d0b7 --- /dev/null +++ b/keyboards/boardwalk/config.h @@ -0,0 +1,84 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCDCD +#define PRODUCT_ID 0x5337 +#define DEVICE_VER 0x0001 +#define MANUFACTURER shens +#define PRODUCT Boardwalk +#define DESCRIPTION QMK keyboard firmware for Boardwalk + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN F5 +// #define BACKLIGHT_LEVELS 6 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 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 + +/* + * 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 + +// ws2812 options +#define RGB_DI_PIN B7 // pin the DI on the ws2812 is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 14 // number of LEDs +#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue +#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation +#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) diff --git a/keyboards/boardwalk/info.json b/keyboards/boardwalk/info.json new file mode 100644 index 000000000000..a287f31a44e4 --- /dev/null +++ b/keyboards/boardwalk/info.json @@ -0,0 +1,359 @@ +{ + "keyboard_name": "Boardwalk", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x14": { + "layout": [ + {"label":"k00", "x":0, "y":0, "w":1.5}, + {"label":"k01", "x":1.5, "y":0}, + {"label":"k02", "x":2.5, "y":0}, + {"label":"k03", "x":3.5, "y":0}, + {"label":"k04", "x":4.5, "y":0}, + {"label":"k05", "x":5.5, "y":0}, + {"label":"k06", "x":6.5, "y":0}, + {"label":"k07", "x":7.5, "y":0}, + {"label":"k08", "x":8.5, "y":0}, + {"label":"k09", "x":9.5, "y":0}, + {"label":"k010", "x":10.5, "y":0}, + {"label":"k011", "x":11.5, "y":0}, + {"label":"k012", "x":12.5, "y":0}, + {"label":"k013", "x":13.5, "y":0, "w":1.5}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k110", "x":10.5, "y":1}, + {"label":"k111", "x":11.5, "y":1}, + {"label":"k112", "x":12.5, "y":1}, + {"label":"k113", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.5}, + {"label":"k21", "x":1.5, "y":2}, + {"label":"k22", "x":2.5, "y":2}, + {"label":"k23", "x":3.5, "y":2}, + {"label":"k24", "x":4.5, "y":2}, + {"label":"k25", "x":5.5, "y":2}, + {"label":"k26", "x":6.5, "y":2}, + {"label":"k27", "x":7.5, "y":2}, + {"label":"k28", "x":8.5, "y":2}, + {"label":"k29", "x":9.5, "y":2}, + {"label":"k210", "x":10.5, "y":2}, + {"label":"k211", "x":11.5, "y":2}, + {"label":"k212", "x":12.5, "y":2}, + {"label":"k213", "x":13.5, "y":2, "w":1.5}, + {"label":"k30", "x":0, "y":3, "w":1.5}, + {"label":"k31", "x":1.5, "y":3}, + {"label":"k32", "x":2.5, "y":3}, + {"label":"k33", "x":3.5, "y":3}, + {"label":"k34", "x":4.5, "y":3}, + {"label":"k35", "x":5.5, "y":3}, + {"label":"k36", "x":6.5, "y":3}, + {"label":"k37", "x":7.5, "y":3}, + {"label":"k38", "x":8.5, "y":3}, + {"label":"k39", "x":9.5, "y":3}, + {"label":"k310", "x":10.5, "y":3}, + {"label":"k311", "x":11.5, "y":3}, + {"label":"k312", "x":12.5, "y":3}, + {"label":"k313", "x":13.5, "y":3, "w":1.5}, + {"label":"k40", "x":0, "y":4, "w":1.5}, + {"label":"k41", "x":1.5, "y":4}, + {"label":"k42", "x":2.5, "y":4}, + {"label":"k43", "x":3.5, "y":4}, + {"label":"k44", "x":4.5, "y":4}, + {"label":"k45", "x":5.5, "y":4}, + {"label":"k46", "x":6.5, "y":4}, + {"label":"k47", "x":7.5, "y":4}, + {"label":"k48", "x":8.5, "y":4}, + {"label":"k49", "x":9.5, "y":4}, + {"label":"k410", "x":10.5, "y":4}, + {"label":"k411", "x":11.5, "y":4}, + {"label":"k412", "x":12.5, "y":4}, + {"label":"k413", "x":13.5, "y":4, "w":1.5} + ] + }, + "LAYOUT_ortho_hhkb": { + "layout": [ + {"label":"k00", "x":0, "y":0, "w":1.5}, + {"label":"k01", "x":1.5, "y":0}, + {"label":"k02", "x":2.5, "y":0}, + {"label":"k03", "x":3.5, "y":0}, + {"label":"k04", "x":4.5, "y":0}, + {"label":"k05", "x":5.5, "y":0}, + {"label":"k06", "x":6.5, "y":0}, + {"label":"k07", "x":7.5, "y":0}, + {"label":"k08", "x":8.5, "y":0}, + {"label":"k09", "x":9.5, "y":0}, + {"label":"k010", "x":10.5, "y":0}, + {"label":"k011", "x":11.5, "y":0}, + {"label":"k012", "x":12.5, "y":0}, + {"label":"k013", "x":13.5, "y":0, "w":1.5}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k110", "x":10.5, "y":1}, + {"label":"k111", "x":11.5, "y":1}, + {"label":"k112", "x":12.5, "y":1}, + {"label":"k113", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.5}, + {"label":"k21", "x":1.5, "y":2}, + {"label":"k22", "x":2.5, "y":2}, + {"label":"k23", "x":3.5, "y":2}, + {"label":"k24", "x":4.5, "y":2}, + {"label":"k25", "x":5.5, "y":2}, + {"label":"k26", "x":6.5, "y":2}, + {"label":"k27", "x":7.5, "y":2}, + {"label":"k28", "x":8.5, "y":2}, + {"label":"k29", "x":9.5, "y":2}, + {"label":"k210", "x":10.5, "y":2}, + {"label":"k211", "x":11.5, "y":2}, + {"label":"k212", "x":12.5, "y":2}, + {"label":"k213", "x":13.5, "y":2, "w":1.5}, + {"label":"k30", "x":0, "y":3, "w":1.5}, + {"label":"k31", "x":1.5, "y":3}, + {"label":"k32", "x":2.5, "y":3}, + {"label":"k33", "x":3.5, "y":3}, + {"label":"k34", "x":4.5, "y":3}, + {"label":"k35", "x":5.5, "y":3}, + {"label":"k36", "x":6.5, "y":3}, + {"label":"k37", "x":7.5, "y":3}, + {"label":"k38", "x":8.5, "y":3}, + {"label":"k39", "x":9.5, "y":3}, + {"label":"k310", "x":10.5, "y":3}, + {"label":"k311", "x":11.5, "y":3}, + {"label":"k312", "x":12.5, "y":3}, + {"label":"k313", "x":13.5, "y":3, "w":1.5}, + {"label":"k41", "x":1.5, "y":4}, + {"label":"k42", "x":2.5, "y":4}, + {"label":"k43", "x":3.5, "y":4}, + {"label":"k44", "x":4.5, "y":4}, + {"label":"k45", "x":5.5, "y":4, "w":2}, + {"label":"k47", "x":7.5, "y":4, "w":2}, + {"label":"k49", "x":9.5, "y":4}, + {"label":"k410", "x":10.5, "y":4}, + {"label":"k411", "x":11.5, "y":4}, + {"label":"k412", "x":12.5, "y":4} + ] + }, + "LAYOUT_ortho_7u": { + "layout": [ + {"label":"k00", "x":0, "y":0, "w":1.5}, + {"label":"k01", "x":1.5, "y":0}, + {"label":"k02", "x":2.5, "y":0}, + {"label":"k03", "x":3.5, "y":0}, + {"label":"k04", "x":4.5, "y":0}, + {"label":"k05", "x":5.5, "y":0}, + {"label":"k06", "x":6.5, "y":0}, + {"label":"k07", "x":7.5, "y":0}, + {"label":"k08", "x":8.5, "y":0}, + {"label":"k09", "x":9.5, "y":0}, + {"label":"k010", "x":10.5, "y":0}, + {"label":"k011", "x":11.5, "y":0}, + {"label":"k012", "x":12.5, "y":0}, + {"label":"k013", "x":13.5, "y":0, "w":1.5}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k110", "x":10.5, "y":1}, + {"label":"k111", "x":11.5, "y":1}, + {"label":"k112", "x":12.5, "y":1}, + {"label":"k113", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.5}, + {"label":"k21", "x":1.5, "y":2}, + {"label":"k22", "x":2.5, "y":2}, + {"label":"k23", "x":3.5, "y":2}, + {"label":"k24", "x":4.5, "y":2}, + {"label":"k25", "x":5.5, "y":2}, + {"label":"k26", "x":6.5, "y":2}, + {"label":"k27", "x":7.5, "y":2}, + {"label":"k28", "x":8.5, "y":2}, + {"label":"k29", "x":9.5, "y":2}, + {"label":"k210", "x":10.5, "y":2}, + {"label":"k211", "x":11.5, "y":2}, + {"label":"k212", "x":12.5, "y":2}, + {"label":"k213", "x":13.5, "y":2, "w":1.5}, + {"label":"k30", "x":0, "y":3, "w":1.5}, + {"label":"k31", "x":1.5, "y":3}, + {"label":"k32", "x":2.5, "y":3}, + {"label":"k33", "x":3.5, "y":3}, + {"label":"k34", "x":4.5, "y":3}, + {"label":"k35", "x":5.5, "y":3}, + {"label":"k36", "x":6.5, "y":3}, + {"label":"k37", "x":7.5, "y":3}, + {"label":"k38", "x":8.5, "y":3}, + {"label":"k39", "x":9.5, "y":3}, + {"label":"k310", "x":10.5, "y":3}, + {"label":"k311", "x":11.5, "y":3}, + {"label":"k312", "x":12.5, "y":3}, + {"label":"k313", "x":13.5, "y":3, "w":1.5}, + {"label":"k41", "x":1.5, "y":4}, + {"label":"k42", "x":2.5, "y":4, "w":1.5}, + {"label":"k46", "x":4, "y":4, "w":7}, + {"label":"k411", "x":11, "y":4, "w":1.5}, + {"label":"k412", "x":12.5, "y":4} + ] + }, + "LAYOUT_2u_arrow": { + "layout": [ + {"label":"k00", "x":0, "y":0, "w":1.5}, + {"label":"k01", "x":1.5, "y":0}, + {"label":"k02", "x":2.5, "y":0}, + {"label":"k03", "x":3.5, "y":0}, + {"label":"k04", "x":4.5, "y":0}, + {"label":"k05", "x":5.5, "y":0}, + {"label":"k06", "x":6.5, "y":0}, + {"label":"k07", "x":7.5, "y":0}, + {"label":"k08", "x":8.5, "y":0}, + {"label":"k09", "x":9.5, "y":0}, + {"label":"k010", "x":10.5, "y":0}, + {"label":"k011", "x":11.5, "y":0}, + {"label":"k012", "x":12.5, "y":0}, + {"label":"k013", "x":13.5, "y":0, "w":1.5}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k110", "x":10.5, "y":1}, + {"label":"k111", "x":11.5, "y":1}, + {"label":"k112", "x":12.5, "y":1}, + {"label":"k113", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.5}, + {"label":"k21", "x":1.5, "y":2}, + {"label":"k22", "x":2.5, "y":2}, + {"label":"k23", "x":3.5, "y":2}, + {"label":"k24", "x":4.5, "y":2}, + {"label":"k25", "x":5.5, "y":2}, + {"label":"k26", "x":6.5, "y":2}, + {"label":"k27", "x":7.5, "y":2}, + {"label":"k28", "x":8.5, "y":2}, + {"label":"k29", "x":9.5, "y":2}, + {"label":"k210", "x":10.5, "y":2}, + {"label":"k211", "x":11.5, "y":2}, + {"label":"k212", "x":12.5, "y":2, "w":1.5}, + {"label":"k213", "x":14, "y":2}, + {"label":"k30", "x":0, "y":3, "w":1.5}, + {"label":"k31", "x":1.5, "y":3}, + {"label":"k32", "x":2.5, "y":3}, + {"label":"k33", "x":3.5, "y":3}, + {"label":"k34", "x":4.5, "y":3}, + {"label":"k35", "x":5.5, "y":3}, + {"label":"k36", "x":6.5, "y":3}, + {"label":"k37", "x":7.5, "y":3}, + {"label":"k38", "x":8.5, "y":3}, + {"label":"k39", "x":9.5, "y":3}, + {"label":"k310", "x":10.5, "y":3}, + {"label":"k311", "x":11.5, "y":3, "w":1.5}, + {"label":"k312", "x":13, "y":3}, + {"label":"k313", "x":14, "y":3}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4}, + {"label":"k43", "x":3.5, "y":4}, + {"label":"k44", "x":4.5, "y":4, "w":2}, + {"label":"k46", "x":6.5, "y":4, "w":2}, + {"label":"k48", "x":8.5, "y":4}, + {"label":"k49", "x":9.5, "y":4, "w":1.25}, + {"label":"k410", "x":10.75, "y":4, "w":1.25}, + {"label":"k411", "x":12, "y":4}, + {"label":"k412", "x":13, "y":4}, + {"label":"k413", "x":14, "y":4} + ] + }, + "LAYOUT_625u_arrow": { + "layout": [ + {"label":"k00", "x":0, "y":0, "w":1.5}, + {"label":"k01", "x":1.5, "y":0}, + {"label":"k02", "x":2.5, "y":0}, + {"label":"k03", "x":3.5, "y":0}, + {"label":"k04", "x":4.5, "y":0}, + {"label":"k05", "x":5.5, "y":0}, + {"label":"k06", "x":6.5, "y":0}, + {"label":"k07", "x":7.5, "y":0}, + {"label":"k08", "x":8.5, "y":0}, + {"label":"k09", "x":9.5, "y":0}, + {"label":"k010", "x":10.5, "y":0}, + {"label":"k011", "x":11.5, "y":0}, + {"label":"k012", "x":12.5, "y":0}, + {"label":"k013", "x":13.5, "y":0, "w":1.5}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k110", "x":10.5, "y":1}, + {"label":"k111", "x":11.5, "y":1}, + {"label":"k112", "x":12.5, "y":1}, + {"label":"k113", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.5}, + {"label":"k21", "x":1.5, "y":2}, + {"label":"k22", "x":2.5, "y":2}, + {"label":"k23", "x":3.5, "y":2}, + {"label":"k24", "x":4.5, "y":2}, + {"label":"k25", "x":5.5, "y":2}, + {"label":"k26", "x":6.5, "y":2}, + {"label":"k27", "x":7.5, "y":2}, + {"label":"k28", "x":8.5, "y":2}, + {"label":"k29", "x":9.5, "y":2}, + {"label":"k210", "x":10.5, "y":2}, + {"label":"k211", "x":11.5, "y":2}, + {"label":"k212", "x":12.5, "y":2, "w":1.5}, + {"label":"k213", "x":14, "y":2}, + {"label":"k30", "x":0, "y":3, "w":1.5}, + {"label":"k31", "x":1.5, "y":3}, + {"label":"k32", "x":2.5, "y":3}, + {"label":"k33", "x":3.5, "y":3}, + {"label":"k34", "x":4.5, "y":3}, + {"label":"k35", "x":5.5, "y":3}, + {"label":"k36", "x":6.5, "y":3}, + {"label":"k37", "x":7.5, "y":3}, + {"label":"k38", "x":8.5, "y":3}, + {"label":"k39", "x":9.5, "y":3}, + {"label":"k310", "x":10.5, "y":3}, + {"label":"k311", "x":11.5, "y":3, "w":1.5}, + {"label":"k312", "x":13, "y":3}, + {"label":"k313", "x":14, "y":3}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4}, + {"label":"k45", "x":3.5, "y":4, "w":6.25}, + {"label":"k49", "x":9.75, "y":4}, + {"label":"k410", "x":10.75, "y":4, "w":1.25}, + {"label":"k411", "x":12, "y":4}, + {"label":"k412", "x":13, "y":4}, + {"label":"k413", "x":14, "y":4} + ] + } + } + } \ No newline at end of file diff --git a/keyboards/boardwalk/keymaps/brendanwr/config.h b/keyboards/boardwalk/keymaps/brendanwr/config.h new file mode 100644 index 000000000000..a2530241f477 --- /dev/null +++ b/keyboards/boardwalk/keymaps/brendanwr/config.h @@ -0,0 +1,16 @@ +/* + * 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 . + */ + +#pragma once diff --git a/keyboards/boardwalk/keymaps/brendanwr/keymap.c b/keyboards/boardwalk/keymaps/brendanwr/keymap.c new file mode 100644 index 000000000000..b428651e73e3 --- /dev/null +++ b/keyboards/boardwalk/keymaps/brendanwr/keymap.c @@ -0,0 +1,95 @@ +/* + * 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 . + */ + +#include QMK_KEYBOARD_H + +enum layer { + _BASE, + _FN, + _BACKLIT +}; + + +#define FN MO(_FN) +#define BACKLIT MO(_BACKLIT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | LCTRL | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | HOME | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | FN | END | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | LALT | LGUI | SPACE | RGUI | RALT | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_BASE] = LAYOUT_ortho_7u( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_HOME, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN, KC_END, + KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT + ), + +/* FUNCTION + * .-----------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ` | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | | | | | | | | | UP | | | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | VOLD | VOLU | MUTE | | | | | | | LEFT | RIGHT | | PG_UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | | DOWN | | | PG_DN | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_7u( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_GRV, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, KC_DEL, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, KC_PGUP, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, KC_PGDN, + _______, _______, _______, _______, _______ + ), + +/* BACKLIT + * .-----------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | RGBTOG | RGBMOD | RGBHUI | RGBHUD | RGBSAI | RGBSAD | RGBVAI | RGBVAD | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_BACKLIT] = LAYOUT_ortho_7u( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/boardwalk/keymaps/default/config.h b/keyboards/boardwalk/keymaps/default/config.h new file mode 100644 index 000000000000..a2530241f477 --- /dev/null +++ b/keyboards/boardwalk/keymaps/default/config.h @@ -0,0 +1,16 @@ +/* + * 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 . + */ + +#pragma once diff --git a/keyboards/boardwalk/keymaps/default/keymap.c b/keyboards/boardwalk/keymaps/default/keymap.c new file mode 100644 index 000000000000..fddb3da8251f --- /dev/null +++ b/keyboards/boardwalk/keymaps/default/keymap.c @@ -0,0 +1,162 @@ +/* + * 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 . + */ + +#include QMK_KEYBOARD_H + +// Layer shorthand +enum layer { + _1U, + _FN, + _HHKB, + _7U, + _2UARROW, + _625UARROW, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* 1uGrid + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | FN | LALT | SPACE | SPACE | SPACE | SPACE | SPACE | SPACE | RIGHT | DOWN | UP | RIGHT | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_1U] = LAYOUT_ortho_5x14( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, MO(1), KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL \ + ), + + /* HHKB + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | LCTRL | FN | LALT | LGUI | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_HHKB] = LAYOUT_ortho_hhkb( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + 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_RSFT, \ + KC_LCTL, MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* 7u HHKB + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | LCTRL | LALT | SPACE | RALT | FN | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_7U] = LAYOUT_ortho_7u( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + 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_RSFT, \ + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, MO(1) \ + ), + + /* 2x2u Space with Arrows + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | H | J | K | L | ; | " | ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | FN | LALT | SPACE | SPACE | RALT | RGUI | RCTRL | LEFT | DOWN | RIGHT | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_2UARROW] = LAYOUT_2u_arrow( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_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_QUOT, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS, KC_ENT, KC_PGUP, \ + 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_PGDN, \ + KC_LCTL, KC_LGUI, MO(1), KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + /* 6.25u Space with Arrows + * .-----------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | H | J | K | L | ; | " | ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | LALT | SPACE | FN | RCTRL | LEFT | DOWN | RIGHT | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + [_625UARROW] = LAYOUT_625u_arrow( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_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_QUOT, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS, KC_ENT, KC_PGUP, \ + 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_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + +/* FUNCTION + * .-----------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------------------------' + */ + + + [_FN] = LAYOUT_ortho_5x14( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/boardwalk/keymaps/default/readme.md b/keyboards/boardwalk/keymaps/default/readme.md new file mode 100644 index 000000000000..73cf19b06fbd --- /dev/null +++ b/keyboards/boardwalk/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Boardwalk diff --git a/keyboards/boardwalk/keymaps/mcallaster/keymap.c b/keyboards/boardwalk/keymaps/mcallaster/keymap.c new file mode 100644 index 000000000000..9ec6f926711b --- /dev/null +++ b/keyboards/boardwalk/keymaps/mcallaster/keymap.c @@ -0,0 +1,54 @@ +#include QMK_KEYBOARD_H + +// Layer shorthand +enum layer { + _BASE, + _LOWER, + _RAISE, + _FN +}; + +#define LOWER MO(1) +#define RAISE MO(2) +#define FN MO(3) + +// Mac sleep +#define __SLEEP S(LCTL(KC_POWER)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ortho_hhkb( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_SLCK, KC_PSCR, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, KC_PGUP, 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_END, KC_PGDN, 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_DEL, KC_INS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_CAPS, KC_LALT, KC_LGUI, RAISE, KC_SPC, KC_SPC, LOWER, KC_RGUI, KC_RALT, KC_RCTL + ), + + [_LOWER] = LAYOUT_ortho_hhkb( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_PAUS, KC_NLCK, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, \ + _______, 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_LBRC, KC_RBRC, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_ortho_hhkb( + _______, KC_F11, KC_F12, _______, _______, _______, KC_PAUS, KC_NLCK, _______, _______, _______, _______, _______, _______, \ + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TILD, KC_PIPE, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN] = LAYOUT_ortho_hhkb( + __SLEEP, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, \ + _______, RESET, _______, KC_MPRV, KC_MNXT, _______, RGB_SAI, RGB_HUI, _______, _______, _______, _______, _______, _______, \ + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, _______, RGB_SAD, RGB_HUD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, \ + _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _FN); +} diff --git a/keyboards/boardwalk/keymaps/nchristus/config.h b/keyboards/boardwalk/keymaps/nchristus/config.h new file mode 100644 index 000000000000..a2530241f477 --- /dev/null +++ b/keyboards/boardwalk/keymaps/nchristus/config.h @@ -0,0 +1,16 @@ +/* + * 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 . + */ + +#pragma once diff --git a/keyboards/boardwalk/keymaps/nchristus/keymap.c b/keyboards/boardwalk/keymaps/nchristus/keymap.c new file mode 100644 index 000000000000..57b6736cbb57 --- /dev/null +++ b/keyboards/boardwalk/keymaps/nchristus/keymap.c @@ -0,0 +1,62 @@ +/* + * 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 . + */ + +#include QMK_KEYBOARD_H + +// Layer shorthand +#define _QW 0 + +#define LOWER LT(1, KC_SPC) +#define RAISE LT(2, KC_ENT) + +#define CTRLESC CTL_T(KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _QWE: Base Layer (Default Layer) */ + [_QW] = LAYOUT_ortho_hhkb( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTRLESC, KC_A, KC_S, KC_D, KC_F, KC_G, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + MO(3), KC_LCTL, KC_LALT, KC_LGUI, RAISE, LOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Keymap LOWER: Lower Layer */ + [1] = LAYOUT_ortho_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______ + ), + + /* Keymap RAISE: Raise Layer */ + [2] = LAYOUT_ortho_hhkb( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______ + ), + + /* Keymap _FL: Function Layer */ + [3] = LAYOUT_ortho_hhkb( + RESET, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/boardwalk/keymaps/nchristus/readme.md b/keyboards/boardwalk/keymaps/nchristus/readme.md new file mode 100644 index 000000000000..73cf19b06fbd --- /dev/null +++ b/keyboards/boardwalk/keymaps/nchristus/readme.md @@ -0,0 +1 @@ +# The default keymap for Boardwalk diff --git a/keyboards/boardwalk/keymaps/nchristus/rules.mk b/keyboards/boardwalk/keymaps/nchristus/rules.mk new file mode 100644 index 000000000000..b07a6475be53 --- /dev/null +++ b/keyboards/boardwalk/keymaps/nchristus/rules.mk @@ -0,0 +1,14 @@ +# 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 . + +RGBLIGHT_ENABLE = yes diff --git a/keyboards/boardwalk/readme.md b/keyboards/boardwalk/readme.md new file mode 100644 index 000000000000..932e7e9d6c42 --- /dev/null +++ b/keyboards/boardwalk/readme.md @@ -0,0 +1,16 @@ +# Boardwalk + +![Boardwalk](https://i.imgur.com/CQj3b9E.jpg) + +The Boardwalk is a 60% ortholinear keyboard, designed around Ergodox keycap sets and to fit into many standard 60% cases. The project was inspired by OLKB’s Atomic keyboard, which used larger 2u mods, but u/shensmobile +decided to switch to 1.5u keys so that Ergodox sets would provide excellent compatibility. The rest of the board can be covered using standard key sizes from 60% sets. + +Keyboard Maintainer: QMK Community +Hardware Supported: Boardwalk Ortholinear PCB +Hardware Availability: [panc.co](https://www.panc.co/boardwalk-group-buy.html) + +Make example for this keyboard (after setting up your build environment): + + make boardwalk: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). diff --git a/keyboards/boardwalk/rules.mk b/keyboards/boardwalk/rules.mk new file mode 100644 index 000000000000..0a02497bc3bb --- /dev/null +++ b/keyboards/boardwalk/rules.mk @@ -0,0 +1,66 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = atmel-dfu + +# QMK 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_5x14 diff --git a/keyboards/boston_meetup/2019/2019.c b/keyboards/boston_meetup/2019/2019.c new file mode 100644 index 000000000000..933c14dee4f9 --- /dev/null +++ b/keyboards/boston_meetup/2019/2019.c @@ -0,0 +1,215 @@ +/* Copyright 2019 ishtob + * + * 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 . + */ +#include "2019.h" +#include "qwiic.h" +#include "action_layer.h" +#include "haptic.h" + +#ifdef RGB_MATRIX_ENABLE +#include "rgb_matrix.h" + +led_config_t g_led_config = { { + { 5, NO_LED, NO_LED, 0 }, + { NO_LED, NO_LED, NO_LED, NO_LED }, + { 4, NO_LED, NO_LED, 1 }, + { 3, NO_LED, NO_LED, 2 } +}, { + { 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 } +}, { + 4, 4, 4, 4, 4, 4 +} }; +#endif + +uint8_t *o_fb; + +uint16_t counterst = 0; + + + +#ifdef QWIIC_MICRO_OLED_ENABLE + +/* screen off after this many milliseconds */ +#include "timer.h" +#define ScreenOffInterval 60000 /* milliseconds */ +static uint16_t last_flush; + +volatile uint8_t led_numlock = false; +volatile uint8_t led_capslock = false; +volatile uint8_t led_scrolllock = false; + +static uint8_t layer; +static bool queue_for_send = false; +static uint8_t encoder_value = 32; + +__attribute__ ((weak)) +void draw_ui(void) { + clear_buffer(); + last_flush = timer_read(); + send_command(DISPLAYON); + +/* Boston MK title is 55 x 10 pixels */ +#define NAME_X 0 +#define NAME_Y 0 + + draw_string(NAME_X + 1, NAME_Y + 2, "BOSTON MK", PIXEL_ON, NORM, 0); + +/* Layer indicator is 41 x 10 pixels */ +#define LAYER_INDICATOR_X 60 +#define LAYER_INDICATOR_Y 0 + + draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0); + draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM); + draw_char(LAYER_INDICATOR_X + 34, LAYER_INDICATOR_Y + 2, layer + 0x30, PIXEL_ON, XOR, 0); + +/* Matrix display is 12 x 12 pixels */ +#define MATRIX_DISPLAY_X 8 +#define MATRIX_DISPLAY_Y 16 + + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + for (uint8_t y = 0; y < MATRIX_COLS; y++) { + draw_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); + draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); + draw_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM); + draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM); + + } + } + draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 12, 12, PIXEL_ON, NORM); + /* hadron oled location on thumbnail */ + draw_rect_filled_soft(MATRIX_DISPLAY_X + 5, MATRIX_DISPLAY_Y + 2, 6, 2, PIXEL_ON, NORM); +/* + draw_rect_soft(0, 13, 64, 6, PIXEL_ON, NORM); + draw_line_vert(encoder_value, 13, 6, PIXEL_ON, NORM); + +*/ + +/* Mod display is 41 x 16 pixels */ +#define MOD_DISPLAY_X 60 +#define MOD_DISPLAY_Y 20 + + uint8_t mods = get_mods(); + if (mods & MOD_LSFT) { + draw_rect_filled_soft(MOD_DISPLAY_X + 0, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_ON, NORM, 0); + } + if (mods & MOD_LCTL) { + draw_rect_filled_soft(MOD_DISPLAY_X + 10, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_ON, NORM, 0); + } + if (mods & MOD_LALT) { + draw_rect_filled_soft(MOD_DISPLAY_X + 20, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_ON, NORM, 0); + } + if (mods & MOD_LGUI) { + draw_rect_filled_soft(MOD_DISPLAY_X + 30, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_ON, NORM, 0); + } + +/* Lock display is 23 x 32 */ +#define LOCK_DISPLAY_X 104 +#define LOCK_DISPLAY_Y 0 + + if (led_numlock == true) { + draw_rect_filled_soft(LOCK_DISPLAY_X, LOCK_DISPLAY_Y, 5 + (3 * 6), 9, PIXEL_ON, NORM); + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 1, "NUM", PIXEL_OFF, NORM, 0); + } else if (led_numlock == false) { + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 1, "NUM", PIXEL_ON, NORM, 0); + } + if (led_capslock == true) { + draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 11, 5 + (3 * 6), 9, PIXEL_ON, NORM); + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "CAP", PIXEL_OFF, NORM, 0); + } else if (led_capslock == false) { + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "CAP", PIXEL_ON, NORM, 0); + } + + if (led_scrolllock == true) { + draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 22, 5 + (3 * 6), 9, PIXEL_ON, NORM); + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 22 +1, "SCR", PIXEL_OFF, NORM, 0); + } else if (led_scrolllock == false) { + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 22 +1, "SCR", PIXEL_ON, NORM, 0); + } + send_buffer(); +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + if (led_numlock == false){led_numlock = true;} + } else { + if (led_numlock == true){led_numlock = false;} + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + if (led_capslock == false){led_capslock = true;} + } else { + if (led_capslock == true){led_capslock = false;} + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + if (led_scrolllock == false){led_scrolllock = true;} + } else { + if (led_scrolllock == true){led_scrolllock = false;} + } +} + +uint32_t layer_state_set_kb(uint32_t state) { + state = layer_state_set_user(state); + layer = biton32(state); + queue_for_send = true; + return state; +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + queue_for_send = true; + return process_record_user(keycode, record); +} + +void encoder_update_kb(uint8_t index, bool clockwise) { + encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; + queue_for_send = true; +} + +#endif + +void matrix_init_kb(void) { + queue_for_send = true; + matrix_init_user(); +} + +void matrix_scan_kb(void) { +if (queue_for_send) { +#ifdef QWIIC_MICRO_OLED_ENABLE + draw_ui(); +#endif + queue_for_send = false; + } +#ifdef QWIIC_MICRO_OLED_ENABLE + if (timer_elapsed(last_flush) > ScreenOffInterval) { + send_command(DISPLAYOFF); /* 0xAE */ + } +#endif + if (counterst == 0) { + //testPatternFB(o_fb); + } + counterst = (counterst + 1) % 1024; + //rgblight_task(); + matrix_scan_user(); +} diff --git a/keyboards/boston_meetup/2019/2019.h b/keyboards/boston_meetup/2019/2019.h new file mode 100644 index 000000000000..fbba5c3154f2 --- /dev/null +++ b/keyboards/boston_meetup/2019/2019.h @@ -0,0 +1,19 @@ +/* Copyright 2019 ishtob + * + * 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 . + */ +#pragma once + +#include "boston_meetup.h" + diff --git a/keyboards/boston_meetup/2019/config.h b/keyboards/boston_meetup/2019/config.h new file mode 100644 index 000000000000..5652816446cc --- /dev/null +++ b/keyboards/boston_meetup/2019/config.h @@ -0,0 +1,196 @@ +#pragma once + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x07E3 + +#undef MATRIX_ROWS +#undef MATRIX_COLS +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS + +#define MATRIX_ROW_PINS { A3, B8, B9, B1 } +#define MATRIX_COL_PINS { A7, A8, B2, B10 } + +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { B13 } +#define ENCODERS_PAD_B { B14 } + +//Audio +#undef AUDIO_VOICES +#undef C6_AUDIO + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(ONE_UP_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + +#define AUDIO_CLICKY + /* to enable clicky on startup */ + //#define AUDIO_CLICKY_ON +#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f +#endif + +//configure qwiic micro_oled driver for the 128x32 oled +#ifdef QWIIC_MICRO_OLED_ENABLE + +#undef I2C_ADDRESS_SA0_1 +#define I2C_ADDRESS_SA0_1 0b0111100 +#define LCDWIDTH 128 +#define LCDHEIGHT 32 +#define micro_oled_rotate_180 + +#endif +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 6 + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#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 2 + +/* Haptic Driver initialization settings + * Feedback Control Settings */ +#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ +#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ +#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ + +/* default 3V ERM vibration motor voltage and library*/ +#if FB_ERM_LRA == 0 +#define RATED_VOLTAGE 3 +#define V_RMS 2.3 +#define V_PEAK 3.30 +/* Library Selection */ +#define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ + +/* default 2V LRA voltage and library */ +#elif FB_ERM_LRA == 1 +#define RATED_VOLTAGE 2 +#define V_RMS 2.0 +#define V_PEAK 2.85 +#define F_LRA 200 +/* Library Selection */ +#define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ + +#endif + +/* Control 1 register settings */ +#define DRIVE_TIME 25 +#define AC_COUPLE 0 +#define STARTUP_BOOST 1 + +/* Control 2 Settings */ +#define BIDIR_INPUT 1 +#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */ +#define SAMPLE_TIME 3 +#define BLANKING_TIME 1 +#define IDISS_TIME 1 + +/* Control 3 settings */ +#define NG_THRESH 2 +#define ERM_OPEN_LOOP 1 +#define SUPPLY_COMP_DIS 0 +#define DATA_FORMAT_RTO 0 +#define LRA_DRIVE_MODE 0 +#define N_PWM_ANALOG 0 +#define LRA_OPEN_LOOP 0 +/* Control 4 settings */ +#define ZC_DET_TIME 0 +#define AUTO_CAL_TIME 3 + +#define RGBLIGHT_ANIMATIONS + +#define RGBLED_NUM 10 +#define RGB_DI_PIN B5 +#define DRIVER_LED_TOTAL RGBLED_NUM + +#define RGB_MATRIX_KEYPRESSES + +#define SOLENOID_PIN A14 + diff --git a/keyboards/boston_meetup/2019/info.json b/keyboards/boston_meetup/2019/info.json new file mode 100644 index 000000000000..15ab72935c2b --- /dev/null +++ b/keyboards/boston_meetup/2019/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Boston Meetup 2019", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 13, + "layout": [{"label":"K00", "x":0, "y":0}, {"label":"K10", "x":0, "y":1}, {"label":"K11", "x":1, "y":1}, {"label":"K12", "x":2, "y":1}, {"label":"K13", "x":3, "y":1}, {"label":"K20", "x":0, "y":2}, {"label":"K21", "x":1, "y":2}, {"label":"K22", "x":2, "y":2}, {"label":"K23", "x":3, "y":2}, {"label":"K30", "x":0, "y":3}, {"label":"K31", "x":1, "y":3}, {"label":"K32", "x":2, "y":3}, {"label":"K33", "x":3, "y":3}] } + } +} diff --git a/keyboards/boston_meetup/2019/keymaps/default/keymap.c b/keyboards/boston_meetup/2019/keymaps/default/keymap.c new file mode 100644 index 000000000000..52d67273e370 --- /dev/null +++ b/keyboards/boston_meetup/2019/keymaps/default/keymap.c @@ -0,0 +1,166 @@ +#include QMK_KEYBOARD_H + +// 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 custom_layers { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + BASE = SAFE_RANGE, + LOWER, + RAISE, + KC_DEMOMACRO +}; + +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl +#define CTL_ENT CTL_T(KC_ENT) // Tap for Enter, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +// Requires KC_TRNS/_______ for the trigger key in the destination layer +#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor +#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise +#define DEMOMACRO KC_DEMOMACRO // Sample for macros + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base + * ,------. + * | Esc | + * |------+------+-------------. + * | : | 7 | 8 | 9 | + * |------+------+------+------| + * | RAISE| 4 | 5 | 6 | + * |------+------+------+------| + * | LOWER| 1 | 2 | 3 | + * `---------------------------' + */ +[_BASE] = LAYOUT( + KC_ESC, + KC_COLN, KC_P7, KC_P8, KC_P9, + RAISE, KC_P4, KC_P5, KC_P6, + LOWER, KC_P1, KC_P2, KC_P3 +), + +/* Lower + * ,------. + * | Nmlk | + * |------+------+-------------. + * | : | / | * | - | + * |------+------+------+------| + * | | | = | + | + * |------+------+------+------| + * | | 0 | . | ENT | + * `---------------------------' + */ +[_LOWER] = LAYOUT( + KC_NLCK, + KC_COLN, KC_PSLS, KC_PAST, KC_PMNS, + _______, XXXXXXX, KC_EQL, KC_PPLS, + _______, KC_P0, KC_PDOT, KC_PENT +), + +/* Raise + * ,------. + * | Esc | + * |------+------+-------------. + * |RGB TG|RGB M+|RGB M-| | + * |------+------+------+------| + * | |RGB H+|RGB S+|RGB V+| + * |------+------+------+------| + * | ` |RGB H-|RGB S-|RGB V-| + * `---------------------------' + */ +[_RAISE] = LAYOUT( + KC_NLCK, + RGB_TOG, RGB_MOD, RGB_RMOD, XXXXXXX, + _______, RGB_HUI, RGB_SAI, RGB_VAI, + _______, RGB_HUD, RGB_SAD, RGB_VAD + +), + +/* Adjust + * ,------. + * | DFU | + * |------+------+-------------. + * |HPT TG|HPT FB|HPT RS| BKSP | + * |------+------+------+------| + * | |HPT M+| | | + * |------+------+------+------| + * | |HPT M-|Clk TG| Del | + * `---------------------------' + */ +[_ADJUST] = LAYOUT( + RESET, + HPT_TOG, HPT_FBK, HPT_RST, KC_BSPC, + _______, HPT_MODI, XXXXXXX, XXXXXXX, + _______, HPT_MODD, CK_TOGG, KC_DEL +), + + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_DEMOMACRO: + if (record->event.pressed) { + // when keycode KC_DEMOMACRO is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode KC_DEMOMACRO is released + } + break; + case LOWER: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + break; + } + return true; +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} + +void matrix_init_user(void) { +} + + +void matrix_scan_user(void) { +} + diff --git a/keyboards/boston_meetup/2019/keymaps/default/readme.md b/keyboards/boston_meetup/2019/keymaps/default/readme.md new file mode 100644 index 000000000000..75f80b519144 --- /dev/null +++ b/keyboards/boston_meetup/2019/keymaps/default/readme.md @@ -0,0 +1,51 @@ +# The Default Boston Meetup 2019 board Layout + +Keymap: +``` +Base +,------. +| Esc | +|------+------+-------------. +| : | 7 | 8 | 9 | +|------+------+------+------| +| RAISE| 4 | 5 | 6 | +|------+------+------+------| +| LOWER| 1 | 2 | 3 | +`---------------------------' + +Lower +,------. +| Nmlk | +|------+------+-------------. +| : | / | * | - | +|------+------+------+------| +| | | = | + | +|------+------+------+------| +| | 0 | . | ENT | +`---------------------------' + +Raise +,------. +| Esc | +|------+------+-------------. +|RGB TG|RGB M+|RGB M-| | +|------+------+------+------| +| |RGB H+|RGB S+|RGB V+| +|------+------+------+------| +| |RGB H-|RGB S-|RGB V-| +`---------------------------' + +Adjust: +,------. +| DFU | +|------+------+-------------. +|HPT TG|HPT FB|HPT RS| BKSP | +|------+------+------+------| +| |HPT M+| | | +|------+------+------+------| +| |HPT M-|Clk TG| Del | +`---------------------------' + +``` + +RGB still work in progress \ No newline at end of file diff --git a/keyboards/boston_meetup/2019/keymaps/readme.md b/keyboards/boston_meetup/2019/keymaps/readme.md new file mode 100644 index 000000000000..c10a49f7d03e --- /dev/null +++ b/keyboards/boston_meetup/2019/keymaps/readme.md @@ -0,0 +1,22 @@ +# How to add your own keymap + +Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`: + + _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author] + +\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements + +and contain the following files: + +* `keymap.c` +* `readme.md` *recommended* +* `config.h` *optional*, found automatically when compiling +* `Makefile` *optional*, found automatically when compling + +When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format: + + * **folder_name** description + +# List of 2019 keymaps + +* **default** default 2019 macropad layout \ No newline at end of file diff --git a/keyboards/boston_meetup/2019/readme.md b/keyboards/boston_meetup/2019/readme.md new file mode 100644 index 000000000000..2bdac9dcde1b --- /dev/null +++ b/keyboards/boston_meetup/2019/readme.md @@ -0,0 +1,13 @@ +# Boston Meetup 2019 Macropad + +![Boston Meetup 2019](https://i.imgur.com/6LgBc4g.jpg) + +Limited-run board designed for Boston MK community meetup 2019. + +Keyboard Maintainer: [ishtob](https://github.com/ishtob), [QMK](https://github.com/qmk) + +Make example for this keyboard (after setting up your build environment): + + make boston_meetup/2019: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). \ No newline at end of file diff --git a/keyboards/boston_meetup/2019/rules.mk b/keyboards/boston_meetup/2019/rules.mk new file mode 100644 index 000000000000..7c03a025eef5 --- /dev/null +++ b/keyboards/boston_meetup/2019/rules.mk @@ -0,0 +1,24 @@ +# project specific files + +# Cortex version +MCU = STM32F303 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +AUDIO_ENABLE = yes +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = no #WS2812 +HAPTIC_ENABLE += DRV2605L +QWIIC_ENABLE += MICRO_OLED +# SERIAL_LINK_ENABLE = yes diff --git a/keyboards/boston_meetup/boston_meetup.c b/keyboards/boston_meetup/boston_meetup.c new file mode 100644 index 000000000000..a9201ac85209 --- /dev/null +++ b/keyboards/boston_meetup/boston_meetup.c @@ -0,0 +1,2 @@ +#include "boston_meetup.h" + diff --git a/keyboards/boston_meetup/boston_meetup.h b/keyboards/boston_meetup/boston_meetup.h new file mode 100644 index 000000000000..e1d9d9206033 --- /dev/null +++ b/keyboards/boston_meetup/boston_meetup.h @@ -0,0 +1,19 @@ +#pragma once + +#ifdef KEYBOARD_boston_meetup_2019 + #include "2019.h" +#define LAYOUT( \ + K00, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ + ) \ +{ \ + { K00, KC_NO, KC_NO, KC_NO }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} +#endif + +#include "quantum.h" \ No newline at end of file diff --git a/keyboards/boston_meetup/config.h b/keyboards/boston_meetup/config.h new file mode 100644 index 000000000000..b025e18df56a --- /dev/null +++ b/keyboards/boston_meetup/config.h @@ -0,0 +1,60 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFB30 +#define PRODUCT_ID 0x26BE +#define MANUFACTURER ishtob +#define PRODUCT Boston Meetup Board +#define DESCRIPTION A limited-run community meetup board + +//#define AUDIO_VOICES + +//#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* + * 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 diff --git a/keyboards/boston_meetup/readme.md b/keyboards/boston_meetup/readme.md new file mode 100644 index 000000000000..2fa1ec9583f1 --- /dev/null +++ b/keyboards/boston_meetup/readme.md @@ -0,0 +1,14 @@ +# Boston Meetup Macropads + +![Boston Meetup Macropads](https://i.imgur.com/yQcBF8g.jpg) + +Limited-run boards designed for Boston MK community meetups. + +Keyboard Maintainer: [ishtob](https://github.com/ishtob), [QMK](https://github.com/qmk) +Hardware Supported: Boston Meetup PCB 2018, 2019 + +Make example for this keyboard (after setting up your build environment): + + make boston_meetup/YYYY: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). \ No newline at end of file diff --git a/keyboards/boston_meetup/rules.mk b/keyboards/boston_meetup/rules.mk new file mode 100644 index 000000000000..6dd899edc85f --- /dev/null +++ b/keyboards/boston_meetup/rules.mk @@ -0,0 +1,2 @@ + +DEFAULT_FOLDER = boston_meetup/2019 diff --git a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c index 684987e3627a..f76b7e02c812 100644 --- a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c +++ b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c @@ -21,7 +21,7 @@ enum custom_macros { R_POINT }; - const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 + const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, [1] = ACTION_LAYER_MOMENTARY(_MOUSE) //Hold for momentary MOUSE @@ -120,4 +120,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c index c0549c424eae..e2b56132bfbe 100644 --- a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c +++ b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c @@ -1,8 +1,6 @@ #include QMK_KEYBOARD_H #include "mousekey.h" -#define _______ KC_TRNS -#define XXXXXXX KC_NO #undef C #undef S #define C(kc) LCTL(KC_##kc) @@ -43,9 +41,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \ 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_P7, KC_P8, KC_P9,KC_PPLS, \ - F(0), 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_P4, KC_P5, KC_P6, \ + TT(MOUSE1), 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_P4, KC_P5, KC_P6, \ F(8),KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, F(9), KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \ - F(1),KC_LGUI, F(3), LT(MISC, KC_SPC), F(4), F(5), MEDAPP, F(2), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT), + F(1),KC_LGUI, F(3), LT(MISC, KC_SPC), F(4),TT(PROG1), MEDAPP, F(2), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT), /* Layer 1: Programming Layer 1, emulating US l ayout */ [PROG1] = LAYOUT(\ KC_ESC,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \ @@ -99,12 +97,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_TOGGLE(MOUSE1), // tap-toggle mouse layer (4) [1] = ACTION_FUNCTION_TAP(LCTRL_BRACKET), // tap to print [ [2] = ACTION_FUNCTION_TAP(RCTRL_BRACKET), // tap to print ] [3] = ACTION_FUNCTION_TAP(LALT_CURLY), // tap to print { [4] = ACTION_FUNCTION_TAP(RALT_CURLY), // tap to print } - [5] = ACTION_LAYER_TAP_TOGGLE(PROG1), // tap-toggle programming layer 1 [6] = ACTION_LAYER_SET_CLEAR(DEFAULT), [7] = ACTION_FUNCTION_TAP(CTRL_CLICK), [8] = ACTION_FUNCTION_TAP(LSHFT_PAREN), // tap to print ( diff --git a/keyboards/sixshooter/config.h b/keyboards/bpiphany/sixshooter/config.h similarity index 98% rename from keyboards/sixshooter/config.h rename to keyboards/bpiphany/sixshooter/config.h index 3c4fd96998c8..ed890d3c9076 100644 --- a/keyboards/sixshooter/config.h +++ b/keyboards/bpiphany/sixshooter/config.h @@ -28,7 +28,7 @@ #define MATRIX_COL_PINS { F7, F6, F1, F5, F4, F0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/sixshooter/info.json b/keyboards/bpiphany/sixshooter/info.json similarity index 100% rename from keyboards/sixshooter/info.json rename to keyboards/bpiphany/sixshooter/info.json diff --git a/keyboards/sixshooter/keymaps/default/keymap.c b/keyboards/bpiphany/sixshooter/keymaps/default/keymap.c similarity index 100% rename from keyboards/sixshooter/keymaps/default/keymap.c rename to keyboards/bpiphany/sixshooter/keymaps/default/keymap.c diff --git a/keyboards/sixshooter/keymaps/default/readme.md b/keyboards/bpiphany/sixshooter/keymaps/default/readme.md similarity index 100% rename from keyboards/sixshooter/keymaps/default/readme.md rename to keyboards/bpiphany/sixshooter/keymaps/default/readme.md diff --git a/keyboards/sixshooter/readme.md b/keyboards/bpiphany/sixshooter/readme.md similarity index 51% rename from keyboards/sixshooter/readme.md rename to keyboards/bpiphany/sixshooter/readme.md index 1fcf26a51094..f5d92600348b 100644 --- a/keyboards/sixshooter/readme.md +++ b/keyboards/bpiphany/sixshooter/readme.md @@ -2,12 +2,12 @@ A PCB for the CM Storm switch tester utilizing a Teensy 2.0 designed by Bpiphany. Because the PCB was designed with individual pins for each LED, there are custom keycodes (`SS_LON` and `SS_LOFF`) for turning on and off the backlight LEDs. -Keyboard Maintainer: QMK Community\ -Hardware Supported: Six Shooter PCB, Teensy 2.0\ +Keyboard Maintainer: QMK Community +Hardware Supported: Six Shooter PCB, Teensy 2.0 Hardware Availability: [GeekHack.org](https://geekhack.org/index.php?topic=70033.0) Make example for this keyboard (after setting up your build environment): - make sixshooter:default + make bpiphany/sixshooter: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). diff --git a/keyboards/sixshooter/rules.mk b/keyboards/bpiphany/sixshooter/rules.mk similarity index 100% rename from keyboards/sixshooter/rules.mk rename to keyboards/bpiphany/sixshooter/rules.mk diff --git a/keyboards/sixshooter/sixshooter.c b/keyboards/bpiphany/sixshooter/sixshooter.c similarity index 100% rename from keyboards/sixshooter/sixshooter.c rename to keyboards/bpiphany/sixshooter/sixshooter.c diff --git a/keyboards/sixshooter/sixshooter.h b/keyboards/bpiphany/sixshooter/sixshooter.h similarity index 100% rename from keyboards/sixshooter/sixshooter.h rename to keyboards/bpiphany/sixshooter/sixshooter.h diff --git a/keyboards/bpiphany/tiger_lily/keymaps/default/config.h b/keyboards/bpiphany/tiger_lily/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/bpiphany/tiger_lily/keymaps/default/config.h +++ b/keyboards/bpiphany/tiger_lily/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h b/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h index c55f7f9f7d27..ed56340c3914 100644 --- a/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/bthlabs/geekpad/config.h b/keyboards/bthlabs/geekpad/config.h index 6b03ae30a733..017bee184880 100644 --- a/keyboards/bthlabs/geekpad/config.h +++ b/keyboards/bthlabs/geekpad/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D4, D0, D1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/butterstick/butterstick.c b/keyboards/butterstick/butterstick.c new file mode 100644 index 000000000000..6c00bbe5dfda --- /dev/null +++ b/keyboards/butterstick/butterstick.c @@ -0,0 +1,56 @@ +/* Copyright 2019 Jeremy Bernhardt + * + * 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 . + */ +#include "butterstick.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} +*/ + +void matrix_scan_kb(void) { +#ifdef DEBUG_MATRIX + for (uint8_t c = 0; c < MATRIX_COLS; c++) + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); +#endif + + matrix_scan_user(); +} + +/* +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/keyboards/butterstick/butterstick.h b/keyboards/butterstick/butterstick.h new file mode 100644 index 000000000000..f97488c3f589 --- /dev/null +++ b/keyboards/butterstick/butterstick.h @@ -0,0 +1,11 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_butter( \ + k09, k08, k07, k06, k05, k04, k03, k02, k01, k00, \ + k19, k18, k17, k16, k15, k14, k13, k12, k11, k10 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \ +} diff --git a/keyboards/butterstick/config.h b/keyboards/butterstick/config.h new file mode 100644 index 000000000000..4c104deb220d --- /dev/null +++ b/keyboards/butterstick/config.h @@ -0,0 +1,26 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1337 +#define DEVICE_VER 0x0001 +#define MANUFACTURER g Heavy Industries +#define PRODUCT Butter Stick +#define DESCRIPTION Its a stick of butter +#define VERSION "Paula Deen" + +#define DEBOUNCING_DELAY 5 +#define FORCE_NKRO + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 10 +#define MATRIX_ROW_PINS { F4, F5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6, B7, C6, C7} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + diff --git a/keyboards/butterstick/keymaps/default/keymap.c b/keyboards/butterstick/keymaps/default/keymap.c new file mode 100644 index 000000000000..e4d1ea91f3e8 --- /dev/null +++ b/keyboards/butterstick/keymaps/default/keymap.c @@ -0,0 +1,184 @@ +#include QMK_KEYBOARD_H + +#include "sten.h" +/* + * Key names are inherited from steno machines + * .-----------------------------------------------------. + * | LSU | LFT | LP | LH | ST1 | RF | RP | RL | RT | RD | + * |-----------------------------------------------------| + * | LSD | LK | LW | LR | ST2 | RR | RB | RG | RS | RZ | + * '-----------------------------------------------------' + */ + +// Function prefixes +#define MEDIA (LSD | LK | LW | LR) +#define FUNCT (LSD | LK | LP | LH) +#define MOVE (LSU | LFT | LP | LH) +#define SYMB (RD | RZ) +#define NUMA (LW | LR) +#define NUMB (RR | RB) + +// QMK Layer Numbers + #define BASE 0 + #define GAME 1 + +// Do not change QMK Layer 0! This is your main keyboard. +// Make your QMK modifications to the later layers, to add +// keys/customize on the first layer modify processQwerty(): +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_butter( + STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR + ), + // I don't game don't roast me thanks + [GAME] = LAYOUT_butter( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_ENT, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TO(BASE) + ) +}; + +// Note: You can only use basic keycodes here! +// P() is just a wrapper to make your life easier, any C code can be executed. +// Only the longest matched chord is run! +// +// http://docs.gboards.ca +uint32_t processQwerty(bool lookup) { + // SECRET AGENT CHORDS + P( LSU | LK | RS | RD, SEND_STRING(VERSION); SEND_STRING(__DATE__)); + P( LR | ST2| RR | RB, SEND(KC_BSPC)); + P( LSD | RZ, SEND(KC_SPC)); + + // Dual chords + P( LP | LH, CLICK_MOUSE(KC_MS_BTN2)); + P( ST1 | RF, CLICK_MOUSE(KC_MS_BTN1)); + P( LSU | LFT, SEND(KC_ESC)); + P( LSD | LK, SEND(KC_LSFT)); + P( RZ | RS, SEND(KC_LSFT)); + P( ST2 | RR, SEND(KC_SPC)); + P( RP | RL, SEND(KC_LGUI)); + P( RT | RD, SEND(KC_LCTL)); + P( RL | RT, SEND(KC_LALT)); + P( LSU | LSD | LFT | LK, SEND(KC_LCTL)); + P( RS | RT | RD | RZ, SEND(KC_ENT)); + + // Function Layer + P( FUNCT | RF, SEND(KC_F1)); + P( FUNCT | RP, SEND(KC_F2)); + P( FUNCT | RL, SEND(KC_F3)); + P( FUNCT | RT, SEND(KC_F4)); + P( FUNCT | RF | RR, SEND(KC_F5)); + P( FUNCT | RP | RB, SEND(KC_F6)); + P( FUNCT | RL | RG, SEND(KC_F7)); + P( FUNCT | RT | RS, SEND(KC_F8)); + P( FUNCT | RR, SEND(KC_F9)); + P( FUNCT | RB, SEND(KC_F10)); + P( FUNCT | RG, SEND(KC_F11)); + P( FUNCT | RS, SEND(KC_F12)); + + // Movement Layer + P( MOVE | RF, SEND(KC_LEFT)); + P( MOVE | RP, SEND(KC_DOWN)); + P( MOVE | RL, SEND(KC_UP)); + P( MOVE | RT, SEND(KC_RIGHT)); + P( MOVE | ST1, SEND(KC_PGUP)); + P( MOVE | ST2, SEND(KC_PGDN)); + + // Media Layer + P( MEDIA | RF, SEND(KC_MPRV)); + P( MEDIA | RP, SEND(KC_MPLY)); + P( MEDIA | RL, SEND(KC_MPLY)); + P( MEDIA | RT, SEND(KC_MNXT)); + P( MEDIA | RG, SEND(KC_VOLU)); + P( MEDIA | RB, SEND(KC_VOLD)); + P( MEDIA | RS, SEND(KC_MUTE)); + + // Number Row, Right + P( NUMB | LSU, SEND(KC_1)); + P( NUMB | LFT, SEND(KC_2)); + P( NUMB | LP, SEND(KC_3)); + P( NUMB | LH, SEND(KC_4)); + P( NUMB | ST1, SEND(KC_5)); + P( NUMB | RF, SEND(KC_6)); + P( NUMB | RP, SEND(KC_7)); + P( NUMB | RL, SEND(KC_8)); + P( NUMB | RT, SEND(KC_9)); + P( NUMB | RD, SEND(KC_0)); + + // Number Row, Left + P( NUMA | LSU, SEND(KC_1)); + P( NUMA | LFT, SEND(KC_2)); + P( NUMA | LP, SEND(KC_3)); + P( NUMA | LH, SEND(KC_4)); + P( NUMA | ST1, SEND(KC_5)); + P( NUMA | RF, SEND(KC_6)); + P( NUMA | RP, SEND(KC_7)); + P( NUMA | RL, SEND(KC_8)); + P( NUMA | RT, SEND(KC_9)); + P( NUMA | RD, SEND(KC_0)); + + + // Symbols and Numbers + P( SYMB | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // ( + P( SYMB | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // ) + P( SYMB | ST1 | ST2, SEND(KC_GRV)); // ` + P( SYMB | RR | RF, SEND(KC_LSFT); SEND(KC_3)); // # + P( SYMB | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $ + P( SYMB | LSU, SEND(KC_LSFT); SEND(KC_1)); // ! + P( SYMB | LSD, SEND(KC_LSFT); SEND(KC_5)); // % + P( SYMB | LFT, SEND(KC_LSFT); SEND(KC_2)); // @ + P( SYMB | LK, SEND(KC_LSFT); SEND(KC_6)); // ^ + P( SYMB | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // { + P( SYMB | LW, SEND(KC_LBRC)); + P( SYMB | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // } + P( SYMB | LR, SEND(KC_RBRC)); + P( SYMB | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // | + P( SYMB | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~ + P( SYMB | RP | RB, SEND(KC_QUOT)); + P( SYMB | RP | RG, SEND(KC_LSFT); SEND(KC_QUOT)); // " + P( SYMB | RF, SEND(KC_KP_PLUS)); + P( SYMB | RR, SEND(KC_LSFT); SEND(KC_7)); // & + P( SYMB | RP, SEND(KC_MINS)); + P( SYMB | RB, SEND(KC_EQL)); + P( SYMB | RL, SEND(KC_SLSH)); + P( SYMB | RG, SEND(KC_COMM)); + P( SYMB | RT, SEND(KC_PAST)); + P( SYMB | RS, SEND(KC_DOT)); + + // Letters + P( LSU | LSD, SEND(KC_A)); + P( LFT | LK, SEND(KC_S)); + P( LP | LW, SEND(KC_D)); + P( LH | LR, SEND(KC_F)); + P( ST1 | ST2, SEND(KC_G)); + P( RF | RR, SEND(KC_H)); + P( RT | RS, SEND(KC_L)); + P( RD | RZ, SEND(KC_SCLN)); + P( RG | RL, SEND(KC_K)); + P( RP | RB, SEND(KC_J)); + P( LSU, SEND(KC_Q)); + P( LSD, SEND(KC_Z)); + P( LFT, SEND(KC_W)); + P( LK, SEND(KC_X)); + P( LP, SEND(KC_E)); + P( LW, SEND(KC_C)); + P( LH, SEND(KC_R)); + P( LR, SEND(KC_V)); + P( ST1, SEND(KC_T)); + P( ST2, SEND(KC_B)); + P( RF, SEND(KC_Y)); + P( RR, SEND(KC_N)); + P( RP, SEND(KC_U)); + P( RB, SEND(KC_M)); + P( RL, SEND(KC_I)); + P( RG, SEND(KC_COMM)); + P( RT, SEND(KC_O)); + P( RS, SEND(KC_DOT)); + P( RD, SEND(KC_P)); + P( RZ, SEND(KC_SLSH)); + + return 0; +} + + +// Don't fuck with this, thanks. +size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); diff --git a/keyboards/ergodash/rev2/keymaps/default/rules.mk b/keyboards/butterstick/keymaps/default/rules.mk similarity index 100% rename from keyboards/ergodash/rev2/keymaps/default/rules.mk rename to keyboards/butterstick/keymaps/default/rules.mk diff --git a/keyboards/butterstick/readme.md b/keyboards/butterstick/readme.md new file mode 100644 index 000000000000..8bae8ba5a05f --- /dev/null +++ b/keyboards/butterstick/readme.md @@ -0,0 +1,14 @@ +# Butter Stick + +![Butter Stick](https://i.redd.it/mvteaomko7s21.jpg) + +A chorded 20% keyboard packing full sized useage into your pocket. More info on [gboards.ca](http://docs.gboards.ca/Meet-Butter-Stick)! + +Keyboard Maintainer: [Germ](https://github.com/germ) +Hardware Availability: [g Heavy Industries](https://www.gboards.ca/product/butter-stick-limited-edition) + +Make example for this keyboard (after setting up your build environment): + + make butterstick: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). diff --git a/keyboards/butterstick/rules.mk b/keyboards/butterstick/rules.mk new file mode 100644 index 000000000000..68b117bf590a --- /dev/null +++ b/keyboards/butterstick/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) + +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -DONLYQWERTY -DDEBUG_MATRIX +SRC += sten.c +EXTRAFLAGS += -flto + + +BOOTLOADER = atmel-dfu +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +STENO_ENABLE = yes # Needed for chording + diff --git a/keyboards/butterstick/sten.c b/keyboards/butterstick/sten.c new file mode 100644 index 000000000000..a239e3884215 --- /dev/null +++ b/keyboards/butterstick/sten.c @@ -0,0 +1,367 @@ +#include "sten.h" + +// Chord state +uint32_t cChord = 0; // Current Chord +int chordIndex = 0; // Keys in previousachord +int32_t chordState[32]; // Full Chord history +#define QWERBUF 24 // Size of chords to buffer for output + +bool repeatFlag = false; // Should we repeat? +uint32_t pChord = 0; // Previous Chord +int pChordIndex = 0; // Keys in previousachord +uint32_t pChordState[32]; // Previous chord sate +uint32_t stickyBits = 0; // Or'd with every incoming press + +// Mode state +enum MODE { STENO = 0, QWERTY, COMMAND }; +enum MODE pMode; +bool QWERSTENO = false; +#ifdef ONLYQWERTY +enum MODE cMode = QWERTY; +#else +enum MODE cMode = STENO; +#endif + +// Command State +#define MAX_CMD_BUF 20 +uint8_t CMDLEN = 0; +uint8_t CMDBUF[MAX_CMD_BUF]; + +// Key Repeat state +bool inChord = false; +bool repEngaged = false; +uint16_t repTimer = 0; +#define REP_INIT_DELAY 750 +#define REP_DELAY 25 + +// Mousekeys state +bool inMouse = false; +int8_t mousePress; + +// All processing done at chordUp goes through here +// Note, this is a gutted version of the Georgi sten.h +bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) { + // Check for mousekeys, this is release +#ifdef MOUSEKEY_ENABLE + if (inMouse) { + inMouse = false; + mousekey_off(mousePress); + mousekey_send(); + } +#endif + + // handle command mode + if (cChord == (LSU | LSD | RD | RZ)) { + if (cMode != COMMAND) { // Entering Command Mode + CMDLEN = 0; + pMode = cMode; + cMode = COMMAND; + } else { // Exiting Command Mode + cMode = pMode; + + // Press all and release all + for (int i = 0; i < CMDLEN; i++) { + register_code(CMDBUF[i]); + } + clear_keyboard(); + } + + goto out; + } + + // Handle Gaming Toggle, + if (cChord == (LSU | LSD | LFT | LK | RT | RS | RD | RZ) && keymapsCount > 1) { +#ifndef NO_DEBUG + uprintf("Switching to QMK\n"); +#endif + layer_on(1); + goto out; + } + + // Do QWERTY and Momentary QWERTY + if (cMode == QWERTY || (cMode == COMMAND)) { + processChord(false); + goto out; + } + +out: + cChord = 0; + inChord = false; + chordIndex = 0; + clear_keyboard(); + repEngaged = false; + for (int i = 0; i < 32; i++) + chordState[i] = 0xFFFF; + + return false; +} + +// Update Chord State +bool process_steno_user(uint16_t keycode, keyrecord_t *record) { + // Everything happens in here when steno keys come in. + // Bail on keyup + if (!record->event.pressed) return true; + + // Update key repeat timers + repTimer = timer_read(); + inChord = true; + + // Switch on the press adding to chord + bool pr = record->event.pressed; + switch (keycode) { + // Mods and stuff + case STN_ST1: pr ? (cChord |= (ST1)): (cChord &= ~(ST1)); break; + case STN_ST2: pr ? (cChord |= (ST2)): (cChord &= ~(ST2)); break; + case STN_ST3: pr ? (cChord |= (ST3)): (cChord &= ~(ST3)); break; + case STN_ST4: pr ? (cChord |= (ST4)): (cChord &= ~(ST4)); break; + case STN_FN: pr ? (cChord |= (FN)) : (cChord &= ~(FN)); break; + case STN_PWR: pr ? (cChord |= (PWR)): (cChord &= ~(PWR)); break; + case STN_N1...STN_N6: pr ? (cChord |= (LNO)): (cChord &= ~(LNO)); break; + case STN_N7...STN_NC: pr ? (cChord |= (RNO)): (cChord &= ~(RNO)); break; + + // All the letter keys + case STN_S1: pr ? (cChord |= (LSU)) : (cChord &= ~(LSU)); break; + case STN_S2: pr ? (cChord |= (LSD)) : (cChord &= ~(LSD)); break; + case STN_TL: pr ? (cChord |= (LFT)) : (cChord &= ~(LFT)); break; + case STN_KL: pr ? (cChord |= (LK)) : (cChord &= ~(LK)); break; + case STN_PL: pr ? (cChord |= (LP)) : (cChord &= ~(LP)); break; + case STN_WL: pr ? (cChord |= (LW)) : (cChord &= ~(LW)); break; + case STN_HL: pr ? (cChord |= (LH)) : (cChord &= ~(LH)); break; + case STN_RL: pr ? (cChord |= (LR)) : (cChord &= ~(LR)); break; + case STN_A: pr ? (cChord |= (LA)) : (cChord &= ~(LA)); break; + case STN_O: pr ? (cChord |= (LO)) : (cChord &= ~(LO)); break; + case STN_E: pr ? (cChord |= (RE)) : (cChord &= ~(RE)); break; + case STN_U: pr ? (cChord |= (RU)) : (cChord &= ~(RU)); break; + case STN_FR: pr ? (cChord |= (RF)) : (cChord &= ~(RF)); break; + case STN_RR: pr ? (cChord |= (RR)) : (cChord &= ~(RR)); break; + case STN_PR: pr ? (cChord |= (RP)) : (cChord &= ~(RP)); break; + case STN_BR: pr ? (cChord |= (RB)) : (cChord &= ~(RB)); break; + case STN_LR: pr ? (cChord |= (RL)) : (cChord &= ~(RL)); break; + case STN_GR: pr ? (cChord |= (RG)) : (cChord &= ~(RG)); break; + case STN_TR: pr ? (cChord |= (RT)) : (cChord &= ~(RT)); break; + case STN_SR: pr ? (cChord |= (RS)) : (cChord &= ~(RS)); break; + case STN_DR: pr ? (cChord |= (RD)) : (cChord &= ~(RD)); break; + case STN_ZR: pr ? (cChord |= (RZ)) : (cChord &= ~(RZ)); break; + } + + // Store previous state for fastQWER + if (pr) { + chordState[chordIndex] = cChord; + chordIndex++; + } + + return true; +} +void matrix_scan_user(void) { + // We abuse this for early sending of key + // Key repeat only on QWER/SYMB layers + if (cMode != QWERTY || !inChord) return; + + // Check timers +#ifndef NO_REPEAT + if (repEngaged && timer_elapsed(repTimer) > REP_DELAY) { + // Process Key for report + processChord(false); + + // Send report to host + send_keyboard_report(); + clear_keyboard(); + repTimer = timer_read(); + } + + if (!repEngaged && timer_elapsed(repTimer) > REP_INIT_DELAY) { + repEngaged = true; + } +#endif +}; + +// For Plover NKRO +uint32_t processFakeSteno(bool lookup) { + P( LSU, SEND(KC_Q);); + P( LSD, SEND(KC_A);); + P( LFT, SEND(KC_W);); + P( LP, SEND(KC_E);); + P( LH, SEND(KC_R);); + P( LK, SEND(KC_S);); + P( LW, SEND(KC_D);); + P( LR, SEND(KC_F);); + P( ST1, SEND(KC_T);); + P( ST2, SEND(KC_G);); + P( LA, SEND(KC_C);); + P( LO, SEND(KC_V);); + P( RE, SEND(KC_N);); + P( RU, SEND(KC_M);); + P( ST3, SEND(KC_Y);); + P( ST4, SEND(KC_H);); + P( RF, SEND(KC_U);); + P( RP, SEND(KC_I);); + P( RL, SEND(KC_O);); + P( RT, SEND(KC_P);); + P( RD, SEND(KC_LBRC);); + P( RR, SEND(KC_J);); + P( RB, SEND(KC_K);); + P( RG, SEND(KC_L);); + P( RS, SEND(KC_SCLN);); + P( RZ, SEND(KC_COMM);); + P( LNO, SEND(KC_1);); + P( RNO, SEND(KC_1);); + + return 0; +} + +// Traverse the chord history to a given point +// Returns the mask to use +void processChord(bool useFakeSteno) { + // Save the clean chord state + uint32_t savedChord = cChord; + + // Apply Stick Bits if needed + if (stickyBits != 0) { + cChord |= stickyBits; + for (int i = 0; i <= chordIndex; i++) + chordState[i] |= stickyBits; + } + + // Strip FN + if (cChord & FN) cChord ^= FN; + + // First we test if a whole chord was passsed + // If so we just run it handling repeat logic + if (useFakeSteno && processFakeSteno(true) == cChord) { + processFakeSteno(false); + return; + } else if (processQwerty(true) == cChord) { + processQwerty(false); + // Repeat logic + if (repeatFlag) { + restoreState(); + repeatFlag = false; + processChord(false); + } else { + saveState(cChord); + } + return; + } + + // Iterate through chord picking out the individual + // and longest chords + uint32_t bufChords[QWERBUF]; + int bufLen = 0; + uint32_t mask = 0; + + // We iterate over it multiple times to catch the longest + // chord. Then that gets addded to the mask and re run. + while (savedChord != mask) { + uint32_t test = 0; + uint32_t longestChord = 0; + + for (int i = 0; i <= chordIndex; i++) { + cChord = chordState[i] & ~mask; + if (cChord == 0) + continue; + + // Assume mid parse Sym is new chord + if (i != 0 && test != 0 && (cChord ^ test) == PWR) { + longestChord = test; + break; + } + + // Lock SYM layer in once detected + if (mask & PWR) + cChord |= PWR; + + + // Testing for keycodes + if (useFakeSteno) { + test = processFakeSteno(true); + } else { + test = processQwerty(true); + } + + if (test != 0) { + longestChord = test; + } + } + + mask |= longestChord; + bufChords[bufLen] = longestChord; + bufLen++; + + // That's a loop of sorts, halt processing + if (bufLen >= QWERBUF) { + return; + } + } + + // Now that the buffer is populated, we run it + for (int i = 0; i < bufLen ; i++) { + cChord = bufChords[i]; + if (useFakeSteno) { + processFakeSteno(false); + } else { + processQwerty(false); + } + } + + // Save state in case of repeat + if (!repeatFlag) { + saveState(savedChord); + } + + // Restore cChord for held repeat + cChord = savedChord; + + return; +} +void saveState(uint32_t cleanChord) { + pChord = cleanChord; + pChordIndex = chordIndex; + for (int i = 0; i < 32; i++) + pChordState[i] = chordState[i]; +} +void restoreState() { + cChord = pChord; + chordIndex = pChordIndex; + for (int i = 0; i < 32; i++) + chordState[i] = pChordState[i]; +} + +// Macros for calling from keymap.c +void SEND(uint8_t kc) { + // Send Keycode, Does not work for Quantum Codes + if (cMode == COMMAND && CMDLEN < MAX_CMD_BUF) { +#ifndef NO_DEBUG + uprintf("CMD LEN: %d BUF: %d\n", CMDLEN, MAX_CMD_BUF); +#endif + CMDBUF[CMDLEN] = kc; + CMDLEN++; + } + + if (cMode != COMMAND) register_code(kc); + return; +} +void REPEAT(void) { + if (cMode != QWERTY) + return; + + repeatFlag = true; + return; +} +void SET_STICKY(uint32_t stick) { + stickyBits = stick; + return; +} +void SWITCH_LAYER(int layer) { + if (keymapsCount >= layer) + layer_on(layer); +} +void CLICK_MOUSE(uint8_t kc) { +#ifdef MOUSEKEY_ENABLE + mousekey_on(kc); + mousekey_send(); + + // Store state for later use + inMouse = true; + mousePress = kc; +#endif +} diff --git a/keyboards/butterstick/sten.h b/keyboards/butterstick/sten.h new file mode 100644 index 000000000000..5a9771d9a028 --- /dev/null +++ b/keyboards/butterstick/sten.h @@ -0,0 +1,77 @@ +// 2019, g Heavy Industries +// Blessed mother of Christ, please keep this readable +// and protect us from segfaults. For thine is the clock, +// the slave and the master. Until we return from main. +// +// Amen. + +#include QMK_KEYBOARD_H +#include "mousekey.h" +#include "keymap.h" +#include "keymap_steno.h" +#include "wait.h" + +extern size_t keymapsCount; // Total keymaps +extern uint32_t cChord; // Current Chord + +// Function defs +void processChord(bool useFakeSteno); +uint32_t processQwerty(bool lookup); +uint32_t processFakeSteno(bool lookup); +void saveState(uint32_t cChord); +void restoreState(void); + +// Macros for use in keymap.c +void SEND(uint8_t kc); +void REPEAT(void); +void SET_STICKY(uint32_t); +void SWITCH_LAYER(int); +void CLICK_MOUSE(uint8_t); + +// Keymap helper +#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} + +// Shift to internal representation +// i.e) S(teno)R(ight)F +#define STN(n) (1L< + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA17 +#define PRODUCT_ID 0xCA39 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maple Computing +#define PRODUCT C39 +#define DESCRIPTION A compact 39 key keyboard + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 13 + +#define MATRIX_ROW_PINS { D1, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D7, E6, C6, D2, D3 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* + * 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. + * + */ + +/* + * 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 diff --git a/keyboards/c39/info.json b/keyboards/c39/info.json new file mode 100755 index 000000000000..4ed7f018c8d9 --- /dev/null +++ b/keyboards/c39/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "C39", + "url": "", + "maintainer": "Space Cat", + "width": 13.25, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Back", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"M1", "x":11.25, "y":0}, {"label":"M2", "x":12.25, "y":0}, {"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"Enter", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"M3", "x":11.25, "y":1}, {"label":"M4", "x":12.25, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"Fn", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":"<", "x":8, "y":2}, {"label":">", "x":9, "y":2}, {"label":"?", "x":10, "y":2}, {"label":"M5", "x":11.25, "y":2}, {"label":"M6", "x":12.25, "y":2}] + } + } +} \ No newline at end of file diff --git a/keyboards/c39/keymaps/default/config.h b/keyboards/c39/keymaps/default/config.h new file mode 100755 index 000000000000..271f48d0011b --- /dev/null +++ b/keyboards/c39/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/c39/keymaps/default/keymap.c b/keyboards/c39/keymaps/default/keymap.c new file mode 100755 index 000000000000..9de75190d030 --- /dev/null +++ b/keyboards/c39/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +#include QMK_KEYBOARD_H + +// 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. +#define _QWERTY 0 +#define _FN1 1 + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,----------------------------------------------------------------------------. ,-------------. + * | Q | W | E | R | T | Bksp | Y | U | I | O | P | | M1 | M2 | + * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| + * | A | S | D | F | G | Enter| H | J | K | L | ; | | M3 | M4 | + * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| + * | Z | X | C | V | B | FN1 | N | M | , | . | / | | M5 | M6 | + * `----------------------------------------------------------------------------' `-------------' + */ +[_QWERTY] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_1, KC_2, + KC_A, KC_S, KC_D, KC_F, KC_G, MT(MOD_LSFT, KC_ENT), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_3, KC_4, + KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_FN1, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_5, KC_6 +), + +/* FN1 + * ,----------------------------------------------------------------------------. ,-------------. + * | 1 | 2 | 3 | 4 | 5 | Bksp | 6 | 7 | 8 | 9 | 0 | | M1 | M2 | + * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| + * | 4 | 5 | 6 | + | | Enter| | | | | | | M3 | M4 | + * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| + * | 7 | 8 | 9 | 0 | | FN1 | | | | | | | M5 | M6 | + * `----------------------------------------------------------------------------' `-------------' + */ +[_FN1] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_1, KC_2, + KC_4, KC_5, KC_6, KC_PLUS, _______, KC_ENT, _______, _______, _______, _______, _______, KC_3, KC_4, + KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, _______, KC_5, KC_6 +), +}; diff --git a/keyboards/c39/keymaps/default/readme.md b/keyboards/c39/keymaps/default/readme.md new file mode 100755 index 000000000000..f5b1b6ac1145 --- /dev/null +++ b/keyboards/c39/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the C39 diff --git a/keyboards/c39/readme.md b/keyboards/c39/readme.md new file mode 100755 index 000000000000..0454f1c12b02 --- /dev/null +++ b/keyboards/c39/readme.md @@ -0,0 +1,16 @@ +# C39 +======= + +![C39](https://i.imgur.com/KuWIIuW.png) + +A compact 39 key keyboard. + +Keyboard Maintainer: [Maple Computing]() +Hardware Supported: C39 PCB +Hardware Availability: [SpaceCat.design](https://spacecat.design) + +Make example for this keyboard (after setting up your build environment): + + make c39: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). diff --git a/keyboards/sentraq/s60_x/rules.mk b/keyboards/c39/rules.mk old mode 100644 new mode 100755 similarity index 86% rename from keyboards/sentraq/s60_x/rules.mk rename to keyboards/c39/rules.mk index 31de8ba39e34..8fcb089817ce --- a/keyboards/sentraq/s60_x/rules.mk +++ b/keyboards/c39/rules.mk @@ -1,7 +1,4 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. @@ -17,7 +14,6 @@ MCU = atmega32u4 # software delays. F_CPU = 16000000 - # # LUFA specific # @@ -53,17 +49,18 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - -DEFAULT_FOLDER = sentraq/s60_x/default - -LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso +RGBLIGHT_ENABLE = no # RGB Enable / Disable diff --git a/keyboards/candybar/keymaps/default/keymap.c b/keyboards/candybar/keymaps/default/keymap.c index bf589289a3cb..8f4cc08c7467 100644 --- a/keyboards/candybar/keymaps/default/keymap.c +++ b/keyboards/candybar/keymaps/default/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "candybar.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _FL 1 @@ -35,4 +35,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \ KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \ KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT), -}; \ No newline at end of file +}; diff --git a/keyboards/candybar/rules.mk b/keyboards/candybar/rules.mk index d27bbe102a7b..0bc9a5b3e691 100644 --- a/keyboards/candybar/rules.mk +++ b/keyboards/candybar/rules.mk @@ -31,6 +31,7 @@ OPT_DEFS = # Options to pass to dfu-util when flashing DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 # Build Options # comment out to disable the options. @@ -39,11 +40,11 @@ EXTRAFLAGS+=-flto BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -MOUSEKEY_ENABLE = yes # Mouse keys +MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration -SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover AUDIO_ENABLE = no RGBLIGHT_ENABLE = no diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000000..9d10fbd754da --- /dev/null +++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000000..de3a93d1ceb0 --- /dev/null +++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000000..b98dcdd26c6a --- /dev/null +++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 000000000000..9c7cf4fd76a3 --- /dev/null +++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/cannonkeys/instant60/bootloader_defs.h b/keyboards/cannonkeys/instant60/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/cannonkeys/instant60/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/instant60/chconf.h b/keyboards/cannonkeys/instant60/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/cannonkeys/instant60/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h new file mode 100644 index 000000000000..095384fb9ebc --- /dev/null +++ b/keyboards/cannonkeys/instant60/config.h @@ -0,0 +1,98 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x1600 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER CannonKeys +#define PRODUCT Instant60 +#define DESCRIPTION Instant 60 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B2, B10, B11, A9, A15, B3, B4, B5, B6, B7, B8, B9, C13, C14, C15 } +#define MATRIX_ROW_PINS { B1, B0, A7, A5, A4 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't 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 + +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 14 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + + +// EEPROM usage +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x02 +#define EEPROM_VERSION_ADDR 34 + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635 +// start + layer * rows * col * 2 +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +#define EEPROM_CUSTOM_BACKLIGHT 636 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + +/* + * 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 diff --git a/keyboards/cannonkeys/instant60/halconf.h b/keyboards/cannonkeys/instant60/halconf.h new file mode 100644 index 000000000000..38743e0904fd --- /dev/null +++ b/keyboards/cannonkeys/instant60/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/instant60/info.json b/keyboards/cannonkeys/instant60/info.json new file mode 100644 index 000000000000..73a64b8b3282 --- /dev/null +++ b/keyboards/cannonkeys/instant60/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Instant60", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_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":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_tsangan": { + "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}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps 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":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + } + } +} diff --git a/keyboards/cannonkeys/instant60/instant60.c b/keyboards/cannonkeys/instant60/instant60.c new file mode 100644 index 000000000000..25b7099b0b1a --- /dev/null +++ b/keyboards/cannonkeys/instant60/instant60.c @@ -0,0 +1 @@ +#include "instant60.h" diff --git a/keyboards/cannonkeys/instant60/instant60.h b/keyboards/cannonkeys/instant60/instant60.h new file mode 100644 index 000000000000..67d5ba98fe21 --- /dev/null +++ b/keyboards/cannonkeys/instant60/instant60.h @@ -0,0 +1,47 @@ +#pragma once + +#include "quantum.h" + +#define KNO KC_NO + +#define LAYOUT_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ + K40, K41, K42, K45, K49, K4A, K4B, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KNO}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KNO, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, KNO }, \ + { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, K4A, K4B, KNO, KNO, K4E } \ +} + +#define LAYOUT_tsangan( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E,\ + K40, K41, K42, K45, K49, K4B, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KNO, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, K3E }, \ + { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, KNO, K4B, KNO, KNO, K4E } \ +} + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E,\ + K40, K41, K42, K45, K49, K4A, K4B, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KNO, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, K3E }, \ + { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, K4A, K4B, KNO, KNO, K4E } \ +} diff --git a/keyboards/cannonkeys/instant60/keymaps/default/keymap.c b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c new file mode 100644 index 000000000000..7753181a4893 --- /dev/null +++ b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _BASE 0 +#define _FN1 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL + ), + + [_FN1] = LAYOUT_ansi( + 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, \ + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_GRV, _______, _______, _______, _______, _______, _______, RESET + ) +}; diff --git a/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c b/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c new file mode 100644 index 000000000000..c16c506301f2 --- /dev/null +++ b/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _BASE 0 +#define _FN1 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_tsangan( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN1),\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + [_FN1] = LAYOUT_tsangan( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______,\ + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, RESET + ) +}; diff --git a/keyboards/cannonkeys/instant60/keymaps/via/keymap.c b/keyboards/cannonkeys/instant60/keymaps/via/keymap.c new file mode 100644 index 000000000000..9be7d187e456 --- /dev/null +++ b/keyboards/cannonkeys/instant60/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + + +// 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. +#define _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL + ), + + [_FN1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, RESET + ) +}; diff --git a/keyboards/cannonkeys/instant60/keymaps/via/rules.mk b/keyboards/cannonkeys/instant60/keymaps/via/rules.mk new file mode 100644 index 000000000000..d12497792d56 --- /dev/null +++ b/keyboards/cannonkeys/instant60/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c b/keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c new file mode 100644 index 000000000000..b182ac5f4f0e --- /dev/null +++ b/keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c @@ -0,0 +1,43 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + + +// 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. +#define _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL + ), + + [_FN1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, RESET + ) +}; diff --git a/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk b/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk new file mode 100644 index 000000000000..d12497792d56 --- /dev/null +++ b/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/instant60/mcuconf.h b/keyboards/cannonkeys/instant60/mcuconf.h new file mode 100644 index 000000000000..048eb4df650d --- /dev/null +++ b/keyboards/cannonkeys/instant60/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/instant60/readme.md b/keyboards/cannonkeys/instant60/readme.md new file mode 100644 index 000000000000..9cd91e9516ee --- /dev/null +++ b/keyboards/cannonkeys/instant60/readme.md @@ -0,0 +1,12 @@ +# Instant60 + +Instant60 Keyboard + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/instant60: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). diff --git a/keyboards/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk new file mode 100644 index 000000000000..cd366c76aa7c --- /dev/null +++ b/keyboards/cannonkeys/instant60/rules.mk @@ -0,0 +1,56 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +# project specific files +VPATH += keyboards/cannonkeys/stm32f072 +SRC = keyboard.c \ + led.c + +#BOOTMAGIC_ENABLE = yes # 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 +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason +RGBLIGHT_ENABLE = yes + +# RAW_ENABLE = yes +# DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.c new file mode 100644 index 000000000000..8c5a87f35f8b --- /dev/null +++ b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.c @@ -0,0 +1,56 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "hal.h" + +// Value to place in RTC backup register 10 for persistent bootloader mode +#define RTC_BOOTLOADER_FLAG 0x424C + +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +#if HAL_USE_PAL || defined(__DOXYGEN__) +const PALConfig pal_default_config = +{ + {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, + {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, + {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, + {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, + {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, +}; +#endif + +/* + * Early initialization code. + * This initialization must be performed just after stack setup and before + * any other initialization. + */ +void __early_init(void) { + + stm32_clock_init(); +} + +/* + * Board-specific initialization code. + */ +void boardInit(void) { + //JTAG-DP Disabled and SW-DP Enabled + AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; + //Set backup register DR10 to enter bootloader on reset + BKP->DR10 = RTC_BOOTLOADER_FLAG; +} diff --git a/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.h new file mode 100644 index 000000000000..9427adabf11d --- /dev/null +++ b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.h @@ -0,0 +1,166 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _BOARD_H_ +#define _BOARD_H_ + +/* + * Setup for a Generic STM32F103 board. + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F103 +#define BOARD_NAME "Generic STM32F103x board" + +/* + * Board frequencies. + */ +#define STM32_LSECLK 32768 +#define STM32_HSECLK 8000000 + +/* + * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. + */ +#define STM32F103xB + +/* + * IO pins assignments + */ + +/* on-board */ + +#define GPIOA_LED 8 +#define GPIOD_OSC_IN 0 +#define GPIOD_OSC_OUT 1 + +/* In case your board has a "USB enable" hardware + controlled by a pin, define it here. (It could be just + a 1.5k resistor connected to D+ line.) +*/ +/* +#define GPIOB_USB_DISC 10 +*/ + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * + * The digits have the following meaning: + * 0 - Analog input. + * 1 - Push Pull output 10MHz. + * 2 - Push Pull output 2MHz. + * 3 - Push Pull output 50MHz. + * 4 - Digital input. + * 5 - Open Drain output 10MHz. + * 6 - Open Drain output 2MHz. + * 7 - Open Drain output 50MHz. + * 8 - Digital input with PullUp or PullDown resistor depending on ODR. + * 9 - Alternate Push Pull output 10MHz. + * A - Alternate Push Pull output 2MHz. + * B - Alternate Push Pull output 50MHz. + * C - Reserved. + * D - Alternate Open Drain output 10MHz. + * E - Alternate Open Drain output 2MHz. + * F - Alternate Open Drain output 50MHz. + * Please refer to the STM32 Reference Manual for details. + */ + +/* + * Port A setup. + * Everything input with pull-up except: + * PA2 - Alternate output (USART2 TX). + * PA3 - Normal input (USART2 RX). + * PA9 - Alternate output (USART1 TX). + * PA10 - Normal input (USART1 RX). + */ +#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ +#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ +#define VAL_GPIOAODR 0xFFFFFFFF + +/* + * Port B setup. + * Everything input with pull-up except: + * PB10 - Push Pull output (USB switch). + */ +#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ +#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ +#define VAL_GPIOBODR 0xFFFFFFFF + +/* + * Port C setup. + * Everything input with pull-up except: + * PC13 - Push Pull output (LED). + */ +#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ +#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ +#define VAL_GPIOCODR 0xFFFFFFFF + +/* + * Port D setup. + * Everything input with pull-up except: + * PD0 - Normal input (XTAL). + * PD1 - Normal input (XTAL). + */ +#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ +#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ +#define VAL_GPIODODR 0xFFFFFFFF + +/* + * Port E setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ +#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ +#define VAL_GPIOEODR 0xFFFFFFFF + +/* + * USB bus activation macro, required by the USB driver. + */ +/* The point is that most of the generic STM32F103* boards + have a 1.5k resistor connected on one end to the D+ line + and on the other end to some pin. Or even a slightly more + complicated "USB enable" circuit, controlled by a pin. + That should go here. + + However on some boards (e.g. one that I have), there's no + such hardware. In which case it's better to not do anything. +*/ +/* +#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); + +/* + * USB bus de-activation macro, required by the USB driver. + */ +/* +#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* _BOARD_H_ */ diff --git a/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.mk new file mode 100644 index 000000000000..6b8b312fd9fd --- /dev/null +++ b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/cannonkeys/practice65/bootloader_defs.h b/keyboards/cannonkeys/practice65/bootloader_defs.h new file mode 100644 index 000000000000..6b8fa9f727c9 --- /dev/null +++ b/keyboards/cannonkeys/practice65/bootloader_defs.h @@ -0,0 +1,10 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ + +// STM32F103* does NOT have an USB bootloader in ROM (only serial), +// so setting anything here does not make much sense +#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/cannonkeys/practice65/chconf.h b/keyboards/cannonkeys/practice65/chconf.h new file mode 100644 index 000000000000..bbd9b2da62d2 --- /dev/null +++ b/keyboards/cannonkeys/practice65/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 100000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/practice65/config.h b/keyboards/cannonkeys/practice65/config.h new file mode 100644 index 000000000000..d09b521bfabf --- /dev/null +++ b/keyboards/cannonkeys/practice65/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x6565 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER CannonKeys +#define PRODUCT Practice 65 +#define DESCRIPTION Practice 65 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { B8, B0, A0, B5, B10, B9, A6, B12, A7, A5, A4, A3, A2, A1, B13, B14 } +#define MATRIX_ROW_PINS { B4, B11, B1, B7, B6 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't 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 + +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 20 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + + +/* + * 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 diff --git a/keyboards/cannonkeys/practice65/halconf.h b/keyboards/cannonkeys/practice65/halconf.h new file mode 100644 index 000000000000..72879a575b9c --- /dev/null +++ b/keyboards/cannonkeys/practice65/halconf.h @@ -0,0 +1,353 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/practice65/info.json b/keyboards/cannonkeys/practice65/info.json new file mode 100644 index 000000000000..6c448fda205a --- /dev/null +++ b/keyboards/cannonkeys/practice65/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Practice65", + "url": "https://cannonkeys.com", + "maintainer": "awkannan", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_default": { + "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}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "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, "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}, {"x":15, "y":2}, {"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":1.75}, {"x":14, "y":3}, {"x":15, "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}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/cannonkeys/practice65/keymaps/default/keymap.c b/keyboards/cannonkeys/practice65/keymaps/default/keymap.c new file mode 100644 index 000000000000..fdc06e398579 --- /dev/null +++ b/keyboards/cannonkeys/practice65/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _BASE 0 +#define _FN1 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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_BSPC, KC_DEL, KC_INS,\ + 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_ENT, KC_PGUP, \ + 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_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + + [_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, _______, _______,\ + RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, RESET \ + ) +}; diff --git a/keyboards/cannonkeys/practice65/ld/MKL26Z64.ld b/keyboards/cannonkeys/practice65/ld/MKL26Z64.ld new file mode 100644 index 000000000000..c4ca8b874cca --- /dev/null +++ b/keyboards/cannonkeys/practice65/ld/MKL26Z64.ld @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com + * (C) 2016 flabbergast + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * KL26Z64 memory setup. + */ +MEMORY +{ + flash0 : org = 0x00000000, len = 0x100 + flash1 : org = 0x00000400, len = 0x10 + flash2 : org = 0x00000410, len = 62k - 0x410 + flash3 : org = 0x0000F800, len = 2k + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x1FFFF800, len = 8k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* Flash region for the configuration bytes.*/ +SECTIONS +{ + .cfmprotect : ALIGN(4) SUBALIGN(4) + { + KEEP(*(.cfmconfig)) + } > flash1 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +__eeprom_workarea_start__ = ORIGIN(flash3); +__eeprom_workarea_size__ = LENGTH(flash3); +__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/cannonkeys/practice65/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/cannonkeys/practice65/ld/STM32F103x8_stm32duino_bootloader.ld new file mode 100644 index 000000000000..d0688ef60164 --- /dev/null +++ b/keyboards/cannonkeys/practice65/ld/STM32F103x8_stm32duino_bootloader.ld @@ -0,0 +1,88 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * ST32F103xB memory setup for use with the maplemini bootloader. + * You will have to + * #define CORTEX_VTOR_INIT 0x5000 + * in your projects chconf.h + */ +MEMORY +{ + flash0 : org = 0x08002000, len = 64k - 0x2000 + flash1 : org = 0x00000000, len = 0 + flash2 : org = 0x00000000, len = 0 + flash3 : org = 0x00000000, len = 0 + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x20000000, len = 20k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/cannonkeys/practice65/mcuconf.h b/keyboards/cannonkeys/practice65/mcuconf.h new file mode 100644 index 000000000000..fced27289e0d --- /dev/null +++ b/keyboards/cannonkeys/practice65/mcuconf.h @@ -0,0 +1,209 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 TRUE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/practice65/practice65.c b/keyboards/cannonkeys/practice65/practice65.c new file mode 100644 index 000000000000..10f60460fac0 --- /dev/null +++ b/keyboards/cannonkeys/practice65/practice65.c @@ -0,0 +1,2 @@ + +#include "practice65.h" diff --git a/keyboards/cannonkeys/practice65/practice65.h b/keyboards/cannonkeys/practice65/practice65.h new file mode 100644 index 000000000000..dec02af936f7 --- /dev/null +++ b/keyboards/cannonkeys/practice65/practice65.h @@ -0,0 +1,19 @@ +#pragma once + +#include "quantum.h" + +#define KNO KC_NO + +#define LAYOUT_default( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2F, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, \ + K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO , K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, K2F }, \ + { K30, KNO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F }, \ + { K40, K41, K42, KNO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D, KC_NO, K4F } \ +} diff --git a/keyboards/cannonkeys/practice65/readme.md b/keyboards/cannonkeys/practice65/readme.md new file mode 100644 index 000000000000..515d1ab59599 --- /dev/null +++ b/keyboards/cannonkeys/practice65/readme.md @@ -0,0 +1,12 @@ +# Practice 65 + +A Blue Pill STM32F103C8T6-based 65% ANSI board. + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) +Hardware Supported: Blue Pill STM32F103C8T6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/practice65: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). diff --git a/keyboards/cannonkeys/practice65/rules.mk b/keyboards/cannonkeys/practice65/rules.mk new file mode 100644 index 000000000000..8bbc910aadef --- /dev/null +++ b/keyboards/cannonkeys/practice65/rules.mk @@ -0,0 +1,53 @@ +# project specific files +VPATH += keyboards/cannonkeys/bluepill +SRC = led.c \ + keyboard.c + +# GENERIC STM32F103C8T6 board - stm32duino bootloader +OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 +MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = GENERIC_STM32_F103 + +# OPT_DEFS = +# MCU_LDSCRIPT = STM32F103x8 +# BOARD = GENERIC_STM32_F103 + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F1xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f1xx +# it should exist either in /os/hal/boards/ +# or /boards +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m3 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + + +#BOOTMAGIC_ENABLE = yes # 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 +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000000..d9f7bc329e6d --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,111 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); +} diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000000..de3a93d1ceb0 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000000..b98dcdd26c6a --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 000000000000..9c7cf4fd76a3 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/cannonkeys/satisfaction75/bootloader_defs.h b/keyboards/cannonkeys/satisfaction75/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/satisfaction75/chconf.h b/keyboards/cannonkeys/satisfaction75/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h new file mode 100644 index 000000000000..092b372577b2 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -0,0 +1,120 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x57F5 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER CannonKeys +#define PRODUCT Satisfaction75 +#define DESCRIPTION Satisfaction 75 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { B1, B2, B10, B11, B12, B13, B14, A8, A9, A10, B0, A7, A5, B5, A15, A1 } +#define MATRIX_ROW_PINS { B3, B4, A0, A2, A4, A3 } +#define DIODE_DIRECTION COL2ROW + +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { B9 } +#define ENCODERS_PAD_B { B8 } + +//LEDS A6, RGB B15 +#define BACKLIGHT_LEVELS 24 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + + +/* Set 0 if debouncing isn't 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 + +#ifdef QWIIC_MICRO_OLED_ENABLE + +#undef I2C_ADDRESS_SA0_1 +#define I2C_ADDRESS_SA0_1 0b0111100 +#define LCDWIDTH 128 +#define LCDHEIGHT 32 + +#endif + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x01 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 + +// Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768) = 803 + +// I'm also putting my custom stuff after that +// 1 for enabled encoder modes +// 1 for custom backlighting controls +// 1 for OLED default mode +// 6 for 3x custom encoder settings, left, right, and press (18 total) + +#define DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES 803 +#define DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT 804 +#define DYNAMIC_KEYMAP_DEFAULT_OLED 805 +#define DYNAMIC_KEYMAP_CUSTOM_ENCODER 806 + +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 824 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + + + +/* + * 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 diff --git a/keyboards/cannonkeys/satisfaction75/halconf.h b/keyboards/cannonkeys/satisfaction75/halconf.h new file mode 100644 index 000000000000..9a9ab838e64e --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/halconf.h @@ -0,0 +1,354 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC TRUE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/cannonkeys/satisfaction75/i2c_master.c b/keyboards/cannonkeys/satisfaction75/i2c_master.c new file mode 100644 index 000000000000..56e810d32a18 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/i2c_master.c @@ -0,0 +1,124 @@ +/* Copyright 2018 Jack Humbert + * Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* This library is only valid for STM32 processors. + * This library follows the convention of the AVR i2c_master library. + * As a result addresses are expected to be already shifted (addr << 1). + * I2CD1 is the default driver which corresponds to pins B6 and B7. This + * can be changed. + * Please ensure that HAL_USE_I2C is TRUE in the halconf.h file and that + * STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file. Pins B6 and B7 are used + * but using any other I2C pins should be trivial. + */ + +#include "i2c_master.h" +#include "quantum.h" +#include +#include + +static uint8_t i2c_address; + +// This configures the I2C clock to 400khz assuming a 48Mhz clock +// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html +static const I2CConfig i2cconfig = { + STM32_TIMINGR_PRESC(0x00U) | + STM32_TIMINGR_SCLDEL(0x03U) | STM32_TIMINGR_SDADEL(0x01U) | + STM32_TIMINGR_SCLH(0x03U) | STM32_TIMINGR_SCLL(0x09U), + 0, + 0 +}; + +static i2c_status_t chibios_to_qmk(const msg_t status) { + switch (status) { + case I2C_NO_ERROR: + return I2C_STATUS_SUCCESS; + case I2C_TIMEOUT: + return I2C_STATUS_TIMEOUT; + // I2C_BUS_ERROR, I2C_ARBITRATION_LOST, I2C_ACK_FAILURE, I2C_OVERRUN, I2C_PEC_ERROR, I2C_SMB_ALERT + default: + return I2C_STATUS_ERROR; + } +} + +__attribute__ ((weak)) +void i2c_init(void) +{ + // Try releasing special pins for a short time + palSetPadMode(GPIOB, 6, PAL_MODE_INPUT); + palSetPadMode(GPIOB, 7, PAL_MODE_INPUT); + + chThdSleepMilliseconds(10); + + palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(1) | PAL_STM32_OTYPE_OPENDRAIN); + palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(1) | PAL_STM32_OTYPE_OPENDRAIN); + + //i2cInit(); //This is invoked by halInit() so no need to redo it. +} + +i2c_status_t i2c_start(uint8_t address) +{ + i2c_address = address; + i2cStart(&I2C_DRIVER, &i2cconfig); + return I2C_STATUS_SUCCESS; +} + +i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) +{ + i2c_address = address; + i2cStart(&I2C_DRIVER, &i2cconfig); + i2cAcquireBus(&I2C_DRIVER); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); + i2cReleaseBus(&I2C_DRIVER); + return chibios_to_qmk(status); +} + +i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) +{ + i2c_address = address; + i2cStart(&I2C_DRIVER, &i2cconfig); + msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); + return chibios_to_qmk(status); +} + +i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) +{ + i2c_address = devaddr; + i2cStart(&I2C_DRIVER, &i2cconfig); + + uint8_t complete_packet[length + 1]; + for(uint8_t i = 0; i < length; i++) + { + complete_packet[i+1] = data[i]; + } + complete_packet[0] = regaddr; + + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); + return chibios_to_qmk(status); +} + +i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout) +{ + i2c_address = devaddr; + i2cStart(&I2C_DRIVER, &i2cconfig); + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout)); + return chibios_to_qmk(status); +} + +void i2c_stop(void) +{ + i2cStop(&I2C_DRIVER); +} diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c new file mode 100644 index 000000000000..5e87c73dcc56 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_default( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, ENC_PRESS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_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_ENTER, KC_PGUP, + 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/jae/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/jae/keymap.c new file mode 100644 index 000000000000..733ba8cd6739 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/jae/keymap.c @@ -0,0 +1,37 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_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_DEL, ENC_PRESS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_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_NUHS, KC_ENTER, KC_PGDN, + 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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, OLED_TOGG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c new file mode 100644 index 000000000000..3595c107b98a --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/tester/keymap.c @@ -0,0 +1,37 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_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_DEL, ENC_PRESS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_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_NUHS, KC_ENTER, KC_PGUP, + KC_LSFT, KC_BSLS, 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, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/tester/rules.mk b/keyboards/cannonkeys/satisfaction75/keymaps/tester/rules.mk new file mode 100644 index 000000000000..3357eb91c057 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/tester/rules.mk @@ -0,0 +1 @@ +QWIIC_ENABLE = no diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c new file mode 100644 index 000000000000..296fd7da6aa3 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ + +#include QMK_KEYBOARD_H + + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_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_DEL, ENC_PRESS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_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_NUHS, KC_ENTER, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk b/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk new file mode 100644 index 000000000000..d12497792d56 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/satisfaction75/led.c b/keyboards/cannonkeys/satisfaction75/led.c new file mode 100644 index 000000000000..3ddcec2028bd --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/led.c @@ -0,0 +1,240 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#include "hal.h" +#include "led_custom.h" +#include "satisfaction75.h" +#include "printf.h" + +static void breathing_callback(PWMDriver *pwmp); + +static PWMConfig pwmCFG = { + 0xFFFF, /* PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + NULL, /* No Callback */ + { + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +static PWMConfig pwmCFG_breathing = { + 0xFFFF, /* 10kHz PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + breathing_callback, /* Breathing Callback */ + { + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t) y; + } +} + + +void backlight_init_ports(void) { + palSetPadMode(GPIOA, 6, PAL_MODE_ALTERNATE(1)); + pwmStart(&PWMD3, &pwmCFG); + if(kb_backlight_config.enable){ + if(kb_backlight_config.breathing){ + breathing_enable(); + } else{ + backlight_set(kb_backlight_config.level); + } + } else { + backlight_set(0); + } +} + +void backlight_set(uint8_t level) { + uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); + if (level == 0) { + // Turn backlight off + pwmDisableChannel(&PWMD3, 0); + } else { + // Turn backlight on + if(!is_breathing()){ + pwmEnableChannel(&PWMD3, 0, PWM_FRACTION_TO_WIDTH(&PWMD3,0xFFFF,duty)); + } + } +} + + +uint8_t backlight_tick = 0; + +void backlight_task(void) { +} + +#define BREATHING_NO_HALT 0 +#define BREATHING_HALT_OFF 1 +#define BREATHING_HALT_ON 2 +#define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +bool is_breathing(void) { + return PWMD3.config == &pwmCFG_breathing; +} + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) + + +void breathing_interrupt_enable(void){ + pwmStop(&PWMD3); + pwmStart(&PWMD3, &pwmCFG_breathing); + chSysLockFromISR(); + pwmEnablePeriodicNotification(&PWMD3); + pwmEnableChannelI( + &PWMD3, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD3, + 0xFFFF, + 0xFFFF + ) + ); + chSysUnlockFromISR(); +} + +void breathing_interrupt_disable(void){ + pwmStop(&PWMD3); + pwmStart(&PWMD3, &pwmCFG); +} + +void breathing_enable(void) +{ + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + breathing_interrupt_enable(); +} + +void breathing_pulse(void) +{ + if (kb_backlight_config.level == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + breathing_interrupt_enable(); +} + +void breathing_disable(void) +{ + breathing_interrupt_disable(); + // Restore backlight level + backlight_set(kb_backlight_config.level); +} + +void breathing_self_disable(void) +{ + if (kb_backlight_config.level == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()){ + breathing_disable(); + } else { + breathing_enable(); + } +} + +void breathing_period_set(uint8_t value) +{ + if (!value) + value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { + breathing_period_set(BREATHING_PERIOD); +} + +void breathing_period_inc(void) +{ + breathing_period_set(breathing_period+1); +} + +void breathing_period_dec(void) +{ + breathing_period_set(breathing_period-1); +} + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { + return v / BACKLIGHT_LEVELS * kb_backlight_config.level; +} + +static void breathing_callback(PWMDriver *pwmp) +{ + (void)pwmp; + uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 256); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || + ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) + { + breathing_interrupt_disable(); + } + + uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); + + chSysLockFromISR(); + pwmEnableChannelI( + &PWMD3, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD3, + 0xFFFF, + duty + ) + ); + chSysUnlockFromISR(); +} diff --git a/keyboards/cannonkeys/satisfaction75/led_custom.h b/keyboards/cannonkeys/satisfaction75/led_custom.h new file mode 100644 index 000000000000..fe5c9e5dcfae --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/led_custom.h @@ -0,0 +1,5 @@ +#pragma once + +void backlight_task(void); +void breathing_interrupt_disable(void); +void breathing_interrupt_enable(void); diff --git a/keyboards/cannonkeys/satisfaction75/mcuconf.h b/keyboards/cannonkeys/satisfaction75/mcuconf.h new file mode 100644 index 000000000000..6d8985796286 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSE + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/satisfaction75/prototype/prototype.h b/keyboards/cannonkeys/satisfaction75/prototype/prototype.h new file mode 100644 index 000000000000..42e574f3ea83 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/prototype/prototype.h @@ -0,0 +1,19 @@ +#pragma once + +#include "satisfaction75.h" + +#define LAYOUT_default( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K415, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO, K415 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} diff --git a/keyboards/fourier/keymaps/default/rules.mk b/keyboards/cannonkeys/satisfaction75/prototype/rules.mk similarity index 100% rename from keyboards/fourier/keymaps/default/rules.mk rename to keyboards/cannonkeys/satisfaction75/prototype/rules.mk diff --git a/keyboards/cannonkeys/satisfaction75/readme.md b/keyboards/cannonkeys/satisfaction75/readme.md new file mode 100644 index 000000000000..361d1eb0f1aa --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/readme.md @@ -0,0 +1,12 @@ +# Satisfaction75 + +Satisfaction75 Keyboard + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/Satisfaction75: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). diff --git a/keyboards/cannonkeys/satisfaction75/rev1/rev1.h b/keyboards/cannonkeys/satisfaction75/rev1/rev1.h new file mode 100644 index 000000000000..302b7e43def8 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/rev1/rev1.h @@ -0,0 +1,108 @@ +#pragma once + +#include "satisfaction75.h" + +// This layout is the default - it's what's in VIA +// ANSI, bottom row 1.25/1.25/1.25/6.25/1/1/1 +#define LAYOUT_default( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} + +// ISO, bottom row 1.25/1.25/1.25/6.25/1/1/1 +#define LAYOUT_iso( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} + +// ANSI, bottom row 1.25/1.25/1.25/6.25/1.5/1.5 +#define LAYOUT_3x2( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K505, K509, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, KC_NO, K511, K512, K513, KC_NO, K515 } \ +} + +// ANSI, WKL bottom row 1.5/1.5/7/1.5/1.5, Split Backspace +#define LAYOUT_2x2( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K505, K509, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, KC_NO, K511, K512, K513, KC_NO, K515 } \ +} + +// ANSI, bottom row 1.25/1.25/1.25/2.25/1.25/2.75/1/1/1 +// ANSI, bottom row 1.25/1.25/1.25/2.75/1.25/2.25/1/1/1 +#define LAYOUT_split_space( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K315, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K503, K505, K507, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO, K315 }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} + + +// Expose All Keys - Split backspace - ISO Extra keys - Split space bottom row +#define LAYOUT_all( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K415, \ + K500, K501, K502, K503, K505, K507, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, KC_NO, K415 }, \ + { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} diff --git a/keyboards/fourier/keymaps/valgrahf/rules.mk b/keyboards/cannonkeys/satisfaction75/rev1/rules.mk similarity index 100% rename from keyboards/fourier/keymaps/valgrahf/rules.mk rename to keyboards/cannonkeys/satisfaction75/rev1/rules.mk diff --git a/keyboards/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk new file mode 100644 index 000000000000..3e2877200ed2 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/rules.mk @@ -0,0 +1,57 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +SRC += led.c \ + satisfaction_encoder.c \ + satisfaction_oled.c + +#BOOTMAGIC_ENABLE = yes # 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 +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +ENCODER_ENABLE = yes +QWIIC_ENABLE += MICRO_OLED +#BACKLIGHT_ENABLE = yes + +# RAW_ENABLE = yes +# DYNAMIC_KEYMAP_ENABLE = yes + +DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1 diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c new file mode 100644 index 000000000000..0e788b29b786 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -0,0 +1,476 @@ +#include "satisfaction75.h" +#include "print.h" +#include "debug.h" + +#include "ch.h" +#include "hal.h" + +#ifdef QWIIC_MICRO_OLED_ENABLE +#include "micro_oled.h" +#include "qwiic.h" +#endif + +#include "timer.h" + +#include "raw_hid.h" +#include "dynamic_keymap.h" +#include "tmk_core/common/eeprom.h" + +// HACK +#include "keyboards/zeal60/zeal60_api.h" // Temporary hack +#include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack + + +/* Artificial delay added to get media keys to work in the encoder*/ +#define MEDIA_KEY_DELAY 10 + +uint16_t last_flush; + +volatile uint8_t led_numlock = false; +volatile uint8_t led_capslock = false; +volatile uint8_t led_scrolllock = false; + +uint8_t layer; + +bool queue_for_send = false; +bool clock_set_mode = false; +uint8_t oled_mode = OLED_DEFAULT; +bool oled_sleeping = false; + +uint8_t encoder_value = 32; +uint8_t encoder_mode = ENC_MODE_VOLUME; +uint8_t enabled_encoder_modes = 0x1F; + +RTCDateTime last_timespec; +uint16_t last_minute = 0; + +uint8_t time_config_idx = 0; +int8_t hour_config = 0; +int16_t minute_config = 0; +int8_t year_config = 0; +int8_t month_config = 0; +int8_t day_config = 0; +uint8_t previous_encoder_mode = 0; + +backlight_config_t kb_backlight_config = { + .enable = true, + .breathing = true, + .level = BACKLIGHT_LEVELS +}; + +bool eeprom_is_valid(void) +{ + return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && + eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); +} + +void eeprom_set_valid(bool valid) +{ + eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); + eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); +} + +void eeprom_reset(void) +{ + // Set the Zeal60 specific EEPROM state as invalid. + eeprom_set_valid(false); + // Set the TMK/QMK EEPROM state as invalid. + eeconfig_disable(); +} + +#ifdef RAW_ENABLE + +void raw_hid_receive( uint8_t *data, uint8_t length ) +{ + uint8_t *command_id = &(data[0]); + uint8_t *command_data = &(data[1]); + switch ( *command_id ) + { + case id_get_protocol_version: + { + command_data[0] = PROTOCOL_VERSION >> 8; + command_data[1] = PROTOCOL_VERSION & 0xFF; + break; + } + case id_get_keyboard_value: + { + switch( command_data[0]) + { + case id_uptime: + { + uint32_t value = timer_read32(); + command_data[1] = (value >> 24 ) & 0xFF; + command_data[2] = (value >> 16 ) & 0xFF; + command_data[3] = (value >> 8 ) & 0xFF; + command_data[4] = value & 0xFF; + break; + } + case id_oled_default_mode: + { + uint8_t default_oled = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED); + command_data[1] = default_oled; + break; + } + case id_oled_mode: + { + command_data[1] = oled_mode; + break; + + } + case id_encoder_modes: + { + command_data[1] = enabled_encoder_modes; + break; + } + case id_encoder_custom: + { + // uint8_t custom_encoder_idx = command_data[1]; + // command_data[2] = 0x00; + // command_data[3] = 0x00; + // command_data[4] = 0x00; + // command_data[5] = 0x00; + // command_data[6] = 0x00; + // command_data[7] = 0x00; + break; + } + default: + { + *command_id = id_unhandled; + break; + } + } + break; + } +#ifdef DYNAMIC_KEYMAP_ENABLE + case id_set_keyboard_value: + { + switch(command_data[0]){ + case id_oled_default_mode: + { + eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED, command_data[1]); + break; + } + case id_oled_mode: + { + oled_mode = command_data[1]; + draw_ui(); + break; + } + case id_encoder_modes: + { + enabled_encoder_modes = command_data[1]; + eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES, enabled_encoder_modes); + break; + } + case id_encoder_custom: + { + // uint8_t custom_encoder_idx = command_data[1]; + break; + } + default: + { + *command_id = id_unhandled; + break; + } + } + break; + } + case id_dynamic_keymap_get_keycode: + { + uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); + command_data[3] = keycode >> 8; + command_data[4] = keycode & 0xFF; + break; + } + case id_dynamic_keymap_set_keycode: + { + dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); + break; + } + case id_dynamic_keymap_reset: + { + dynamic_keymap_reset(); + break; + } + case id_dynamic_keymap_macro_get_count: + { + command_data[0] = dynamic_keymap_macro_get_count(); + break; + } + case id_dynamic_keymap_macro_get_buffer_size: + { + uint16_t size = dynamic_keymap_macro_get_buffer_size(); + command_data[0] = size >> 8; + command_data[1] = size & 0xFF; + break; + } + case id_dynamic_keymap_macro_get_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_macro_set_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_macro_reset: + { + dynamic_keymap_macro_reset(); + break; + } + case id_dynamic_keymap_get_layer_count: + { + command_data[0] = dynamic_keymap_get_layer_count(); + break; + } + case id_dynamic_keymap_get_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_get_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_set_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_set_buffer( offset, size, &command_data[3] ); + break; + } +#endif // DYNAMIC_KEYMAP_ENABLE + case id_eeprom_reset: + { + eeprom_reset(); + break; + } + case id_bootloader_jump: + { + // Need to send data back before the jump + // Informs host that the command is handled + raw_hid_send( data, length ); + // Give host time to read it + wait_ms(100); + bootloader_jump(); + break; + } + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + + // Return same buffer with values changed + raw_hid_send( data, length ); + +} + +#endif + + +void read_host_led_state(void) { + uint8_t leds = host_keyboard_leds(); + if (leds & (1 << USB_LED_NUM_LOCK)) { + if (led_numlock == false){ + led_numlock = true;} + } else { + if (led_numlock == true){ + led_numlock = false;} + } + if (leds & (1 << USB_LED_CAPS_LOCK)) { + if (led_capslock == false){ + led_capslock = true;} + } else { + if (led_capslock == true){ + led_capslock = false;} + } + if (leds & (1 << USB_LED_SCROLL_LOCK)) { + if (led_scrolllock == false){ + led_scrolllock = true;} + } else { + if (led_scrolllock == true){ + led_scrolllock = false;} + } +} + +uint32_t layer_state_set_kb(uint32_t state) { + state = layer_state_set_user(state); + layer = biton32(state); + queue_for_send = true; + return state; +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + queue_for_send = true; + switch (keycode) { + case OLED_TOGG: + if(!clock_set_mode){ + if (record->event.pressed) { + oled_mode = (oled_mode + 1) % _NUM_OLED_MODES; + draw_ui(); + } + } + return false; + case CLOCK_SET: + if (record->event.pressed) { + if(clock_set_mode){ + pre_encoder_mode_change(); + clock_set_mode = false; + encoder_mode = previous_encoder_mode; + post_encoder_mode_change(); + + }else{ + previous_encoder_mode = encoder_mode; + pre_encoder_mode_change(); + clock_set_mode = true; + encoder_mode = ENC_MODE_CLOCK_SET; + post_encoder_mode_change(); + } + } + return false; + case ENC_PRESS: + if (record->event.pressed) { + uint16_t mapped_code = handle_encoder_press(); + uint16_t held_keycode_timer = timer_read(); + if(mapped_code != 0){ + register_code(mapped_code); + while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ } + unregister_code(mapped_code); + } + } else { + // Do something else when release + } + return false; + default: + break; + } + +#ifdef DYNAMIC_KEYMAP_ENABLE + // Handle macros + if (record->event.pressed) { + if ( keycode >= MACRO00 && keycode <= MACRO15 ) + { + uint8_t id = keycode - MACRO00; + dynamic_keymap_macro_send(id); + return false; + } + } +#endif //DYNAMIC_KEYMAP_ENABLE + + return process_record_user(keycode, record); +} + + +void encoder_update_kb(uint8_t index, bool clockwise) { + encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; + queue_for_send = true; + if (index == 0) { + if (layer == 0){ + uint16_t mapped_code = 0; + if (clockwise) { + mapped_code = handle_encoder_clockwise(); + } else { + mapped_code = handle_encoder_ccw(); + } + uint16_t held_keycode_timer = timer_read(); + if(mapped_code != 0){ + register_code(mapped_code); + while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ } + unregister_code(mapped_code); + } + } else { + if(clockwise){ + change_encoder_mode(false); + } else { + change_encoder_mode(true); + } + } + } +} + +void dynamic_keymap_custom_reset(void){ + void *p = (void*)(DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT); + void *end = (void*)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); + while ( p != end ) { + eeprom_update_byte(p, 0); + ++p; + } + eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES, 0x1F); +} + +void save_backlight_config_to_eeprom(){ + eeprom_update_byte((uint8_t*)DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT, kb_backlight_config.raw); +} + +void load_custom_config(){ + kb_backlight_config.raw = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_CUSTOM_BACKLIGHT); +#ifdef DYNAMIC_KEYMAP_ENABLE + oled_mode = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_DEFAULT_OLED); + enabled_encoder_modes = eeprom_read_byte((uint8_t*)DYNAMIC_KEYMAP_ENABLED_ENCODER_MODES); +#endif +} + +void eeprom_init_kb(void) +{ + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM. + if (eeprom_is_valid()) { + load_custom_config(); + } else { + // If the EEPROM has not been saved before, or is out of date, + // save the default values to the EEPROM. Default values + // come from construction of the zeal_backlight_config instance. + //backlight_config_save(); +#ifdef DYNAMIC_KEYMAP_ENABLE + // This resets the keymaps in EEPROM to what is in flash. + dynamic_keymap_reset(); + // This resets the macros in EEPROM to nothing. + dynamic_keymap_macro_reset(); + // Reset the custom stuff + dynamic_keymap_custom_reset(); +#endif + // Save the magic number last, in case saving was interrupted + eeprom_set_valid(true); + } +} + +void matrix_init_kb(void) +{ + eeprom_init_kb(); + rtcGetTime(&RTCD1, &last_timespec); + queue_for_send = true; + backlight_init_ports(); + matrix_init_user(); +} + + +void matrix_scan_kb(void) { + rtcGetTime(&RTCD1, &last_timespec); + uint16_t minutes_since_midnight = last_timespec.millisecond / 1000 / 60; + + if (minutes_since_midnight != last_minute){ + last_minute = minutes_since_midnight; + if(!oled_sleeping){ + queue_for_send = true; + } + } +#ifdef QWIIC_MICRO_OLED_ENABLE + if (queue_for_send && oled_mode != OLED_OFF) { + oled_sleeping = false; + read_host_led_state(); + draw_ui(); + queue_for_send = false; + } + if (timer_elapsed(last_flush) > ScreenOffInterval && !oled_sleeping) { + send_command(DISPLAYOFF); /* 0xAE */ + oled_sleeping = true; + } +#endif +} + diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.h b/keyboards/cannonkeys/satisfaction75/satisfaction75.h new file mode 100644 index 000000000000..dfab68017f02 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.h @@ -0,0 +1,113 @@ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_cannonkeys_satisfaction75_prototype + #include "prototype.h" +#else + #include "rev1.h" +#endif + +/* screen off after this many milliseconds */ +#define ScreenOffInterval 60000 /* milliseconds */ + +typedef union { + uint8_t raw; + struct { + bool enable :1; + bool breathing : 1; + uint8_t level :6; + }; +} backlight_config_t; + +// Start these at the USER code range in VIA +enum my_keycodes { + ENC_PRESS = 0x5F80, + CLOCK_SET, + OLED_TOGG +}; + +enum s75_keyboard_value_id { + id_encoder_modes = 0x80, + id_oled_default_mode, + id_encoder_custom, + id_oled_mode +}; + +enum encoder_modes { + ENC_MODE_VOLUME, + ENC_MODE_MEDIA, + ENC_MODE_SCROLL, + ENC_MODE_BRIGHTNESS, + ENC_MODE_BACKLIGHT, + ENC_MODE_CUSTOM0, + ENC_MODE_CUSTOM1, + ENC_MODE_CUSTOM2, + _NUM_ENCODER_MODES, + ENC_MODE_CLOCK_SET // This shouldn't be included in the default modes, so we put it after NUM_ENCODER_MODES +}; + +enum oled_modes { + OLED_DEFAULT, + OLED_TIME, + OLED_OFF, + _NUM_OLED_MODES +}; + + +// Keyboard Information +extern volatile uint8_t led_numlock; +extern volatile uint8_t led_capslock; +extern volatile uint8_t led_scrolllock; +extern uint8_t layer; + +// OLED Behavior +extern uint16_t last_flush; +extern bool queue_for_send; +extern uint8_t oled_mode; +extern bool oled_sleeping; + +// Encoder Behavior +extern uint8_t encoder_value; +extern uint8_t encoder_mode; +extern uint8_t enabled_encoder_modes; + +// RTC +extern RTCDateTime last_timespec; +extern uint16_t last_minute; + +// RTC Configuration +extern bool clock_set_mode; +extern uint8_t time_config_idx; +extern int8_t hour_config; +extern int16_t minute_config; +extern int8_t year_config; +extern int8_t month_config; +extern int8_t day_config; +extern uint8_t previous_encoder_mode; + +// Backlighting +extern backlight_config_t kb_backlight_config; +extern bool kb_backlight_breathing; + +void pre_encoder_mode_change(void); +void post_encoder_mode_change(void); +void change_encoder_mode(bool negative); +uint16_t handle_encoder_clockwise(void); +uint16_t handle_encoder_ccw(void); +uint16_t handle_encoder_press(void); + +void update_time_config(int8_t increment); + +__attribute__ ((weak)) +void draw_ui(void); +void draw_default(void); +void draw_clock(void); + +void backlight_init_ports(void); +void backlight_set(uint8_t level); +bool is_breathing(void); +void breathing_enable(void); +void breathing_disable(void); +void load_custom_config(void); +void save_backlight_config_to_eeprom(void); diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c new file mode 100644 index 000000000000..677681691867 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c @@ -0,0 +1,184 @@ +#include "satisfaction75.h" + +void pre_encoder_mode_change(){ + if(encoder_mode == ENC_MODE_CLOCK_SET){ + RTCDateTime timespec; + timespec.year = year_config; + timespec.month = month_config; + timespec.day = day_config; + // timespec.dayofweek = last_timespec.dayofweek; + // timespec.dstflag = last_timespec.dstflag; + timespec.millisecond = (hour_config * 60 + minute_config) * 60 * 1000; + rtcSetTime(&RTCD1, ×pec); + } else if (encoder_mode == ENC_MODE_BACKLIGHT){ + save_backlight_config_to_eeprom(); + } +} + +void post_encoder_mode_change(){ + if(encoder_mode == ENC_MODE_CLOCK_SET){ + hour_config = (last_minute / 60); + minute_config = last_minute % 60; + year_config = last_timespec.year; + month_config = last_timespec.month; + day_config = last_timespec.day; + time_config_idx = 0; + } +} + +void change_encoder_mode(bool negative){ + pre_encoder_mode_change(); + if(enabled_encoder_modes == 0){ + enabled_encoder_modes = 0x1F; + } + do { + if(negative){ + if (encoder_mode == 0){ + encoder_mode = _NUM_ENCODER_MODES - 1; + } else{ + encoder_mode = encoder_mode - 1; + } + } else { + encoder_mode = (encoder_mode + 1) % _NUM_ENCODER_MODES; + } + } while(((1 << encoder_mode) & enabled_encoder_modes) == 0); + post_encoder_mode_change(); +} + +void update_time_config(int8_t increment){ + uint8_t day_limit = 31; + uint16_t adjusted_year = 1980 + year_config; + switch(time_config_idx){ + case 0: // hour + default: + hour_config = (hour_config + increment) % 24; + if (hour_config < 0){ + hour_config += 24; + } + break; + case 1: // minute + minute_config = (minute_config + increment) % 60; + if (minute_config < 0){ + minute_config += 60; + } + break; + case 2: // year + year_config += increment; + break; + case 3: // month + month_config = (month_config % 12) + increment; + if (month_config <= 0){ + month_config += 12; + } + break; + case 4: //day + if (month_config == 9 || month_config == 4 || month_config == 6 || month_config == 11){ + day_limit = 30; + } else if(month_config == 2){ + day_limit = adjusted_year % 4 == 0 && !(adjusted_year % 100 == 0 && adjusted_year % 400 != 0) ? 29 : 28; + } + day_config = (day_config % day_limit) + increment; + if(day_config <= 0){ + day_config += day_limit; + } + break; + } +} + +uint16_t handle_encoder_clockwise(){ + uint16_t mapped_code = 0; + switch(encoder_mode){ + default: + case ENC_MODE_VOLUME: + mapped_code = KC_VOLU; + break; + case ENC_MODE_MEDIA: + mapped_code = KC_MEDIA_NEXT_TRACK; + break; + case ENC_MODE_SCROLL: + mapped_code = KC_WH_D; + break; + case ENC_MODE_BACKLIGHT: + kb_backlight_config.level = kb_backlight_config.level + 1; + if(kb_backlight_config.level > BACKLIGHT_LEVELS){ + kb_backlight_config.level = BACKLIGHT_LEVELS; + } + backlight_set(kb_backlight_config.level); + if (kb_backlight_config.level != 0){ + kb_backlight_config.enable = true; + } + break; + case ENC_MODE_BRIGHTNESS: + mapped_code = KC_BRIGHTNESS_UP; + break; + case ENC_MODE_CLOCK_SET: + update_time_config(1); + queue_for_send = true; + break; + } + return mapped_code; +} + +uint16_t handle_encoder_ccw(){ + uint16_t mapped_code = 0; + switch(encoder_mode){ + default: + case ENC_MODE_VOLUME: + mapped_code = KC_VOLD; + break; + case ENC_MODE_MEDIA: + mapped_code = KC_MEDIA_PREV_TRACK; + break; + case ENC_MODE_SCROLL: + mapped_code = KC_WH_U; + break; + case ENC_MODE_BACKLIGHT: + // mapped_code = BL_DEC; + if(kb_backlight_config.level != 0){ + kb_backlight_config.level = kb_backlight_config.level - 1; + } + backlight_set(kb_backlight_config.level); + if (kb_backlight_config.level == 0){ + kb_backlight_config.enable = false; + } + break; + case ENC_MODE_BRIGHTNESS: + mapped_code = KC_BRIGHTNESS_DOWN; + break; + case ENC_MODE_CLOCK_SET: + update_time_config(-1); + queue_for_send = true; + break; + } + return mapped_code; +} + +uint16_t handle_encoder_press(){ + uint16_t mapped_code = 0; + switch(encoder_mode){ + case ENC_MODE_VOLUME: + mapped_code = KC_MUTE; + break; + case ENC_MODE_MEDIA: + mapped_code = KC_MEDIA_PLAY_PAUSE; + break; + case ENC_MODE_SCROLL: + mapped_code = KC_BTN3; + break; + case ENC_MODE_BACKLIGHT: + // mapped_code = BL_TOGG; + kb_backlight_config.breathing = !kb_backlight_config.breathing; + if(!kb_backlight_config.breathing){ + breathing_disable(); + } else{ + breathing_enable(); + } + break; + case ENC_MODE_CLOCK_SET: + time_config_idx = (time_config_idx + 1) % 5; + default: + case ENC_MODE_BRIGHTNESS: + break; + } + return mapped_code; +} diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c new file mode 100644 index 000000000000..4e22587db851 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c @@ -0,0 +1,271 @@ +#include "satisfaction75.h" +#include "micro_oled.h" + +__attribute__ ((weak)) +void draw_ui() { +#ifdef QWIIC_MICRO_OLED_ENABLE + clear_buffer(); + last_flush = timer_read(); + send_command(DISPLAYON); + if(clock_set_mode){ + draw_clock(); + return; + } + switch (oled_mode){ + default: + case OLED_DEFAULT: + draw_default(); + break; + case OLED_TIME: + draw_clock(); + break; + case OLED_OFF: + send_command(DISPLAYOFF); + break; + } +#endif +} + +void draw_encoder(int8_t startX, int8_t startY, bool show_legend){ + if(show_legend){ + draw_string(startX + 1, startY + 2, "ENC", PIXEL_ON, NORM, 0); + } else { + startX -= 22; + } + draw_rect_filled_soft(startX + 22, startY + 1, 3 + (3 * 6), 9, PIXEL_ON, NORM); + char* mode_string = ""; + switch(encoder_mode){ + default: + case ENC_MODE_VOLUME: + mode_string = "VOL"; + break; + case ENC_MODE_MEDIA: + mode_string = "MED"; + break; + case ENC_MODE_SCROLL: + mode_string = "SCR"; + break; + case ENC_MODE_BRIGHTNESS: + mode_string = "BRT"; + break; + case ENC_MODE_BACKLIGHT: + mode_string = "BKL"; + break; + case ENC_MODE_CLOCK_SET: + mode_string = "CLK"; + break; + case ENC_MODE_CUSTOM0: + mode_string = "CS0"; + break; + case ENC_MODE_CUSTOM1: + mode_string = "CS1"; + break; + case ENC_MODE_CUSTOM2: + mode_string = "CS2"; + break; + } + draw_string(startX + 24, startY + 2, mode_string, PIXEL_ON, XOR, 0); +} + +void draw_layer_section(int8_t startX, int8_t startY, bool show_legend){ + if(show_legend){ + draw_string(startX + 1, startY + 2, "LAYER", PIXEL_ON, NORM, 0); + } else { + startX -= 32; + } + draw_rect_filled_soft(startX + 32, startY + 1, 9, 9, PIXEL_ON, NORM); + draw_char(startX + 34, startY + 2, layer + 0x30, PIXEL_ON, XOR, 0); +} + +void draw_default(){ + uint8_t hour = last_minute / 60; + uint16_t minute = last_minute % 60; + + if(encoder_mode == ENC_MODE_CLOCK_SET){ + hour = hour_config; + minute = minute_config; + } + + bool is_pm = (hour / 12) > 0; + hour = hour % 12; + if (hour == 0){ + hour = 12; + } + char hour_str[2] = ""; + char min_str[2] = ""; + + sprintf(hour_str, "%02d", hour); + sprintf(min_str, "%02d", minute); + + uint8_t mods = get_mods(); + +/* Layer indicator is 41 x 10 pixels */ + draw_layer_section(0,0,true); + +#define ENCODER_INDICATOR_X 45 +#define ENCODER_INDICATOR_Y 0 + draw_encoder(ENCODER_INDICATOR_X, ENCODER_INDICATOR_Y, true); +/* Matrix display is 19 x 9 pixels */ +#define MATRIX_DISPLAY_X 0 +#define MATRIX_DISPLAY_Y 18 + + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + for (uint8_t y = 0; y < MATRIX_COLS; y++) { + draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); + } + } + draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM); + /* hadron oled location on thumbnail */ + draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM); + +/* Mod display is 41 x 16 pixels */ +#define MOD_DISPLAY_X 30 +#define MOD_DISPLAY_Y 18 + + if (mods & MOD_LSFT) { + draw_rect_filled_soft(MOD_DISPLAY_X + 0, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_ON, NORM, 0); + } + if (mods & MOD_LCTL) { + draw_rect_filled_soft(MOD_DISPLAY_X + 10, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_ON, NORM, 0); + } + if (mods & MOD_LALT) { + draw_rect_filled_soft(MOD_DISPLAY_X + 20, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_ON, NORM, 0); + } + if (mods & MOD_LGUI) { + draw_rect_filled_soft(MOD_DISPLAY_X + 30, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_ON, NORM, 0); + } + +/* Lock display is 23 x 21 */ +#define LOCK_DISPLAY_X 100 +#define LOCK_DISPLAY_Y 0 + + if (led_capslock == true) { + draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y, 5 + (3 * 6), 9, PIXEL_ON, NORM); + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y +1, "CAP", PIXEL_OFF, NORM, 0); + } else if (led_capslock == false) { + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y +1, "CAP", PIXEL_ON, NORM, 0); + } + + if (led_scrolllock == true) { + draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 11, 5 + (3 * 6), 9, PIXEL_ON, NORM); + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "SCR", PIXEL_OFF, NORM, 0); + } else if (led_scrolllock == false) { + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "SCR", PIXEL_ON, NORM, 0); + } + +#define TIME_DISPLAY_X 82 +#define TIME_DISPLAY_Y 22 + draw_string(TIME_DISPLAY_X, TIME_DISPLAY_Y, hour_str, PIXEL_ON, NORM, 0); + draw_string(TIME_DISPLAY_X + 11, TIME_DISPLAY_Y, ":", PIXEL_ON, NORM, 0); + draw_string(TIME_DISPLAY_X + 15, TIME_DISPLAY_Y, min_str, PIXEL_ON, NORM, 0); + if(is_pm){ + draw_string(TIME_DISPLAY_X + 27, TIME_DISPLAY_Y, "pm", PIXEL_ON, NORM, 0); + } else{ + draw_string(TIME_DISPLAY_X + 27, TIME_DISPLAY_Y, "am", PIXEL_ON, NORM, 0); + } + + send_buffer(); +} + +void draw_clock(){ + int8_t hour = last_minute / 60; + int16_t minute = last_minute % 60; + int16_t year = last_timespec.year + 1980; + int8_t month = last_timespec.month; + int8_t day = last_timespec.day; + + if(encoder_mode == ENC_MODE_CLOCK_SET){ + hour = hour_config; + minute = minute_config; + year = year_config + 1980; + month = month_config; + day = day_config; + } + + bool is_pm = (hour / 12) > 0; + hour = hour % 12; + if (hour == 0){ + hour = 12; + } + char hour_str[2] = ""; + char min_str[2] = ""; + char year_str[4] = ""; + char month_str[2] = ""; + char day_str[2] = ""; + + sprintf(hour_str, "%02d", hour); + sprintf(min_str, "%02d", minute); + sprintf(year_str, "%d", year); + sprintf(month_str, "%02d", month); + sprintf(day_str, "%02d", day); + + +#define DATE_DISPLAY_X 6 +#define DATE_DISPLAY_Y 0 + draw_string(DATE_DISPLAY_X, DATE_DISPLAY_Y, year_str, PIXEL_ON, NORM, 0); + draw_string(DATE_DISPLAY_X + 25, DATE_DISPLAY_Y, "-", PIXEL_ON, NORM, 0); + draw_string(DATE_DISPLAY_X + 31, DATE_DISPLAY_Y, month_str, PIXEL_ON, NORM, 0); + draw_string(DATE_DISPLAY_X + 44, DATE_DISPLAY_Y, "-", PIXEL_ON, NORM, 0); + draw_string(DATE_DISPLAY_X + 50, DATE_DISPLAY_Y, day_str, PIXEL_ON, NORM, 0); + +#define CLOCK_DISPLAY_X 6 +#define CLOCK_DISPLAY_Y 14 + draw_string(CLOCK_DISPLAY_X, CLOCK_DISPLAY_Y, hour_str, PIXEL_ON, NORM, 1); + draw_string(CLOCK_DISPLAY_X + 17, CLOCK_DISPLAY_Y, ":", PIXEL_ON, NORM, 1); + draw_string(CLOCK_DISPLAY_X + 25, CLOCK_DISPLAY_Y, min_str, PIXEL_ON, NORM, 1); + if(is_pm){ + draw_string(CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y, "pm", PIXEL_ON, NORM, 1); + } else{ + draw_string(CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y, "am", PIXEL_ON, NORM, 1); + } + + if(clock_set_mode){ + switch(time_config_idx){ + case 0: // hour + default: + draw_line(CLOCK_DISPLAY_X, CLOCK_DISPLAY_Y + 17, CLOCK_DISPLAY_X + 16, CLOCK_DISPLAY_Y + 17, PIXEL_ON, NORM); + break; + case 1: // minute + draw_line(CLOCK_DISPLAY_X + 25, CLOCK_DISPLAY_Y + 17, CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y + 17, PIXEL_ON, NORM); + break; + case 2: // year + draw_line(DATE_DISPLAY_X, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 23, DATE_DISPLAY_Y + 9, PIXEL_ON, NORM); + break; + case 3: // month + draw_line(DATE_DISPLAY_X + 31, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 43, DATE_DISPLAY_Y + 9, PIXEL_ON, NORM); + break; + case 4: //day + draw_line(DATE_DISPLAY_X + 50, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 61, DATE_DISPLAY_Y + 9,PIXEL_ON, NORM); + break; + } + } + + draw_encoder(80, 0, true); + draw_layer_section(80, 11, true); + +#define CAPS_DISPLAY_X 86 +#define CAPS_DISPLAY_Y 22 + + if (led_capslock == true) { + draw_rect_filled_soft(CAPS_DISPLAY_X, CAPS_DISPLAY_Y, 5 + (4 * 6), 9, PIXEL_ON, NORM); + draw_string(CAPS_DISPLAY_X + 3, CAPS_DISPLAY_Y +1, "CAPS", PIXEL_OFF, NORM, 0); + } else if (led_capslock == false) { + draw_string(CAPS_DISPLAY_X + 3, CAPS_DISPLAY_Y +1, "CAPS", PIXEL_ON, NORM, 0); + } + + + send_buffer(); + +} diff --git a/keyboards/cannonkeys/stm32f072/keyboard.c b/keyboards/cannonkeys/stm32f072/keyboard.c new file mode 100644 index 000000000000..02c6dae18b27 --- /dev/null +++ b/keyboards/cannonkeys/stm32f072/keyboard.c @@ -0,0 +1,303 @@ +#include "keyboard.h" +#include "ch.h" +#include "hal.h" +#include "led_custom.h" +#include "util.h" +#include "quantum.h" + +#include "ws2812.h" + +#include "raw_hid.h" +#include "dynamic_keymap.h" +#include "tmk_core/common/eeprom.h" + +// HACK +#include "keyboards/zeal60/zeal60_api.h" // Temporary hack +#include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack + + +backlight_config_t kb_backlight_config = { + .enable = true, + .breathing = true, + .level = BACKLIGHT_LEVELS +}; + +bool eeprom_is_valid(void) +{ + return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && + eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); +} + +void eeprom_set_valid(bool valid) +{ + eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); + eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); +} + +void eeprom_reset(void) +{ + eeprom_set_valid(false); + eeconfig_disable(); +} + +void save_backlight_config_to_eeprom(){ + eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw); +} + +void load_custom_config(){ + kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT); +} + +#ifdef DYNAMIC_KEYMAP_ENABLE +void dynamic_keymap_custom_reset(void){ + void *p = (void*)(EEPROM_CUSTOM_BACKLIGHT); + void *end = (void*)(DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR); + while ( p != end ) { + eeprom_update_byte(p, 0); + ++p; + } +} +#endif + +void eeprom_init_kb(void) +{ + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM. + if (eeprom_is_valid()) { + load_custom_config(); + } else { +#ifdef DYNAMIC_KEYMAP_ENABLE + // This resets the keymaps in EEPROM to what is in flash. + dynamic_keymap_reset(); + // This resets the macros in EEPROM to nothing. + dynamic_keymap_macro_reset(); + // Reset the custom stuff + dynamic_keymap_custom_reset(); +#endif + // Save the magic number last, in case saving was interrupted + save_backlight_config_to_eeprom(); + eeprom_set_valid(true); + } +} + +__attribute__ ((weak)) +void matrix_init_board(void); + +void matrix_init_kb(void){ + eeprom_init_kb(); + /* MOSI pin*/ + palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0)); + wait_ms(500); + +#ifdef RGBLIGHT_ENABLE + leds_init(); +#endif + backlight_init_ports(); + + matrix_init_board(); +} + +void matrix_scan_kb(void) +{ + #ifdef RGBLIGHT_ENABLE + rgblight_task(); + #endif +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case BL_INC: + if (record->event.pressed) { + kb_backlight_config.level = kb_backlight_config.level + 1; + if(kb_backlight_config.level > BACKLIGHT_LEVELS){ + kb_backlight_config.level = BACKLIGHT_LEVELS; + } + backlight_set(kb_backlight_config.level); + save_backlight_config_to_eeprom(); + } + return false; + case BL_TOGG: + if (record->event.pressed) { + kb_backlight_config.enable = !kb_backlight_config.enable; + if(kb_backlight_config.enable){ + backlight_set(kb_backlight_config.level); + } else { + backlight_set(0); + } + save_backlight_config_to_eeprom(); + } + return false; + + case BL_DEC: + if (record->event.pressed) { + if(kb_backlight_config.level <= 1){ + kb_backlight_config.level = 0; + } else { + kb_backlight_config.level = kb_backlight_config.level - 1; + } + backlight_set(kb_backlight_config.level); + save_backlight_config_to_eeprom(); + } + return false; + case BL_BRTG: + if (record->event.pressed) { + kb_backlight_config.breathing = !kb_backlight_config.breathing; + breathing_toggle(); + save_backlight_config_to_eeprom(); + } + return false; + default: + break; + } + + #ifdef DYNAMIC_KEYMAP_ENABLE + // Handle macros + if (record->event.pressed) { + if ( keycode >= MACRO00 && keycode <= MACRO15 ) + { + uint8_t id = keycode - MACRO00; + dynamic_keymap_macro_send(id); + return false; + } + } + #endif //DYNAMIC_KEYMAP_ENABLE + + return true; +} + + +// Start Dynamic Keymap code +#ifdef RAW_ENABLE + +void raw_hid_receive( uint8_t *data, uint8_t length ) +{ + uint8_t *command_id = &(data[0]); + uint8_t *command_data = &(data[1]); + switch ( *command_id ) + { + case id_get_protocol_version: + { + command_data[0] = PROTOCOL_VERSION >> 8; + command_data[1] = PROTOCOL_VERSION & 0xFF; + break; + } + case id_get_keyboard_value: + { + switch( command_data[0]) + { + case id_uptime: + { + uint32_t value = timer_read32(); + command_data[1] = (value >> 24 ) & 0xFF; + command_data[2] = (value >> 16 ) & 0xFF; + command_data[3] = (value >> 8 ) & 0xFF; + command_data[4] = value & 0xFF; + break; + } + default: + { + *command_id = id_unhandled; + break; + } + } + break; + } +#ifdef DYNAMIC_KEYMAP_ENABLE + + case id_dynamic_keymap_get_keycode: + { + uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); + command_data[3] = keycode >> 8; + command_data[4] = keycode & 0xFF; + break; + } + case id_dynamic_keymap_set_keycode: + { + dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); + break; + } + case id_dynamic_keymap_reset: + { + dynamic_keymap_reset(); + break; + } + case id_dynamic_keymap_macro_get_count: + { + command_data[0] = dynamic_keymap_macro_get_count(); + break; + } + case id_dynamic_keymap_macro_get_buffer_size: + { + uint16_t size = dynamic_keymap_macro_get_buffer_size(); + command_data[0] = size >> 8; + command_data[1] = size & 0xFF; + break; + } + case id_dynamic_keymap_macro_get_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_macro_set_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_macro_reset: + { + dynamic_keymap_macro_reset(); + break; + } + case id_dynamic_keymap_get_layer_count: + { + command_data[0] = dynamic_keymap_get_layer_count(); + break; + } + case id_dynamic_keymap_get_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_get_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_set_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_set_buffer( offset, size, &command_data[3] ); + break; + } +#endif // DYNAMIC_KEYMAP_ENABLE + case id_eeprom_reset: + { + eeprom_reset(); + break; + } + case id_bootloader_jump: + { + // Need to send data back before the jump + // Informs host that the command is handled + raw_hid_send( data, length ); + // Give host time to read it + wait_ms(100); + bootloader_jump(); + break; + } + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + + // Return same buffer with values changed + raw_hid_send( data, length ); + +} + +#endif diff --git a/keyboards/cannonkeys/stm32f072/keyboard.h b/keyboards/cannonkeys/stm32f072/keyboard.h new file mode 100644 index 000000000000..94c973d6153f --- /dev/null +++ b/keyboards/cannonkeys/stm32f072/keyboard.h @@ -0,0 +1,23 @@ +#pragma once + +#include "quantum.h" + +typedef union { + uint8_t raw; + struct { + bool enable :1; + bool breathing : 1; + uint8_t level :6; + }; +} backlight_config_t; + +// Backlighting +extern backlight_config_t kb_backlight_config; +extern bool kb_backlight_breathing; +void backlight_init_ports(void); +void backlight_set(uint8_t level); +bool is_breathing(void); +void breathing_enable(void); +void breathing_disable(void); +void load_custom_config(void); +void save_backlight_config_to_eeprom(void); diff --git a/keyboards/cannonkeys/stm32f072/led.c b/keyboards/cannonkeys/stm32f072/led.c new file mode 100644 index 000000000000..5c7df47da75c --- /dev/null +++ b/keyboards/cannonkeys/stm32f072/led.c @@ -0,0 +1,251 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#include "hal.h" +#include "led_custom.h" +#include "keyboard.h" +#include "printf.h" + +static void breathing_callback(PWMDriver *pwmp); + +static PWMConfig pwmCFG = { + 0xFFFF, /* PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + NULL, /* No Callback */ + { + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +static PWMConfig pwmCFG_breathing = { + 0xFFFF, /* 10kHz PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + breathing_callback, /* Breathing Callback */ + { + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t) y; + } +} + + +uint8_t get_backlight_level(void){ + return kb_backlight_config.level; +} + +void backlight_init_ports(void) { + printf("backlight_init_ports()\n"); + palSetPadMode(GPIOA, 6, PAL_MODE_ALTERNATE(1)); + pwmStart(&PWMD3, &pwmCFG); + // pwmEnableChannel(&PWMD3, 0, PWM_FRACTION_TO_WIDTH(&PWMD3, 0xFFFF,cie_lightness(0xFFFF))); + if(kb_backlight_config.enable){ + backlight_set(kb_backlight_config.level); + if(kb_backlight_config.breathing){ + breathing_enable(); + } + } else { + backlight_set(0); + } + +} + +void backlight_set(uint8_t level) { + printf("backlight_set(%d)\n", level); + uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); + printf("duty: (%d)\n", duty); + if (level == 0) { + // Turn backlight off + pwmDisableChannel(&PWMD3, 0); + } else { + // Turn backlight on + if(!is_breathing()){ + pwmEnableChannel(&PWMD3, 0, PWM_FRACTION_TO_WIDTH(&PWMD3,0xFFFF,duty)); + } + } +} + + +uint8_t backlight_tick = 0; + +void backlight_task(void) { +} + +#define BREATHING_NO_HALT 0 +#define BREATHING_HALT_OFF 1 +#define BREATHING_HALT_ON 2 +#define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +bool is_breathing(void) { + return PWMD3.config == &pwmCFG_breathing; +} + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) + + +void breathing_interrupt_enable(void){ + pwmStop(&PWMD3); + pwmStart(&PWMD3, &pwmCFG_breathing); + chSysLockFromISR(); + pwmEnablePeriodicNotification(&PWMD3); + pwmEnableChannelI( + &PWMD3, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD3, + 0xFFFF, + 0xFFFF + ) + ); + chSysUnlockFromISR(); +} + +void breathing_interrupt_disable(void){ + pwmStop(&PWMD3); + pwmStart(&PWMD3, &pwmCFG); +} + +void breathing_enable(void) +{ + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + breathing_interrupt_enable(); +} + +void breathing_pulse(void) +{ + if (get_backlight_level() == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + breathing_interrupt_enable(); +} + +void breathing_disable(void) +{ + printf("breathing_disable()\n"); + breathing_interrupt_disable(); + // Restore backlight level + backlight_set(get_backlight_level()); +} + +void breathing_self_disable(void) +{ + if (get_backlight_level() == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()){ + printf("disable breathing\n"); + breathing_disable(); + } else { + printf("enable breathing\n"); + breathing_enable(); + } +} + +void breathing_period_set(uint8_t value) +{ + if (!value) + value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { + breathing_period_set(BREATHING_PERIOD); +} + +void breathing_period_inc(void) +{ + breathing_period_set(breathing_period+1); +} + +void breathing_period_dec(void) +{ + breathing_period_set(breathing_period-1); +} + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { + return v / BACKLIGHT_LEVELS * get_backlight_level(); +} + +static void breathing_callback(PWMDriver *pwmp) +{ + (void)pwmp; + uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 256); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || + ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) + { + breathing_interrupt_disable(); + } + + uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); + + chSysLockFromISR(); + pwmEnableChannelI( + &PWMD3, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD3, + 0xFFFF, + duty + ) + ); + chSysUnlockFromISR(); +} diff --git a/keyboards/cannonkeys/stm32f072/led_custom.h b/keyboards/cannonkeys/stm32f072/led_custom.h new file mode 100644 index 000000000000..28e0f02ed34b --- /dev/null +++ b/keyboards/cannonkeys/stm32f072/led_custom.h @@ -0,0 +1,6 @@ +#pragma once + +void backlight_task(void); +void breathing_interrupt_disable(void); +void breathing_interrupt_enable(void); +void breathing_toggle(void); diff --git a/keyboards/cannonkeys/stm32f072/ws2812.c b/keyboards/cannonkeys/stm32f072/ws2812.c new file mode 100644 index 000000000000..665763931e31 --- /dev/null +++ b/keyboards/cannonkeys/stm32f072/ws2812.c @@ -0,0 +1,150 @@ +#include "ch.h" +#include "hal.h" + +#include "ws2812.h" + +#define BYTES_FOR_LED_BYTE 4 +#define NB_COLORS 3 +#define BYTES_FOR_LED BYTES_FOR_LED_BYTE*NB_COLORS +#define DATA_SIZE BYTES_FOR_LED*NB_LEDS +#define RESET_SIZE 200 + +// Define the spi your LEDs are plugged to here +#define LEDS_SPI WS2812_SPI +// Define the number of LEDs you wish to control in your LED strip +#define NB_LEDS RGBLED_NUM + +#define LED_SPIRAL 0 + +static uint8_t txbuf[DATA_SIZE + RESET_SIZE]; +static uint8_t get_protocol_eq(uint8_t data, int pos); + +/* + * This lib is meant to be used asynchronously, thus the colors contained in + * the txbuf will be sent in loop, so that the colors are always the ones you + * put in the table (the user thus have less to worry about) + * + * Since the data are sent via DMA, and the call to spiSend is a blocking one, + * the processor ressources are not used to much, if you see your program being + * too slow, simply add a: + * chThdSleepMilliseconds(x); + * after the spiSend, where you increment x untill you are satisfied with your + * program speed, another trick may be to lower this thread priority : your call + */ +static THD_WORKING_AREA(LEDS_THREAD_WA, 128); +static THD_FUNCTION(ledsThread, arg) { + (void) arg; + while(1){ + spiSend(&LEDS_SPI, DATA_SIZE + RESET_SIZE, txbuf); + } +} + +#if LED_SPIRAL +/* + * 'Led spiral' is a simple demo in which we put all the leds to the same + * color, where this color does all the hsv circle in loop. + * If you want to launch the thread that will chage the led colors to the + * appropriate value, simply set LED_SPIRAL to 1. + */ + +static THD_WORKING_AREA(HSVTRANS_WA, 128); +static THD_FUNCTION(hsv_transThread, arg) { + (void) arg; + hsv_color color = {0, 255, 255}; + while(1){ + color.h += 1; + color.h %= 256; + set_leds_color_hsv(color); + chThdSleepMilliseconds(50); + } +} +#endif + +static const SPIConfig spicfg = { + NULL, + GPIOB, + 15, + SPI_CR1_BR_1|SPI_CR1_BR_0 // baudrate : fpclk / 8 => 1tick is 0.32us +}; + +/* + * Function used to initialize the driver. + * + * Starts by shutting off all the LEDs. + * Then gets access on the LED_SPI driver. + * May eventually launch an animation on the LEDs (e.g. a thread setting the + * txbuff values) + */ +void leds_init(void){ + for(int i = 0; i < RESET_SIZE; i++) + txbuf[DATA_SIZE+i] = 0x00; + spiAcquireBus(&LEDS_SPI); /* Acquire ownership of the bus. */ + spiStart(&LEDS_SPI, &spicfg); /* Setup transfer parameters. */ + spiSelect(&LEDS_SPI); /* Slave Select assertion. */ + chThdCreateStatic(LEDS_THREAD_WA, sizeof(LEDS_THREAD_WA),NORMALPRIO, ledsThread, NULL); +#if LED_SPIRAL + chThdCreateStatic(HSVTRANS_WA, sizeof(HSVTRANS_WA), + NORMALPRIO, hsv_transThread, NULL); +#endif +} + +/* + * As the trick here is to use the SPI to send a huge pattern of 0 and 1 to + * the ws2812b protocol, we use this helper function to translate bytes into + * 0s and 1s for the LED (with the appropriate timing). + */ +static uint8_t get_protocol_eq(uint8_t data, int pos){ + uint8_t eq = 0; + if (data & (1 << (2*(3-pos)))) + eq = 0b1110; + else + eq = 0b1000; + if (data & (2 << (2*(3-pos)))) + eq += 0b11100000; + else + eq += 0b10000000; + return eq; +} + +// +///* +// * If you want to set a LED's color in the RGB color space, simply call this +// * function with a hsv_color containing the desired color and the index of the +// * led on the LED strip (starting from 0, the first one being the closest the +// * first plugged to the board) +// * +// * Only set the color of the LEDs through the functions given by this API +// * (unless you really know what you are doing) +// */ +void set_led_color_rgb(LED_TYPE color, int pos){ + for(int j = 0; j < 4; j++) + txbuf[BYTES_FOR_LED*pos + j] = get_protocol_eq(color.g, j); + for(int j = 0; j < 4; j++) + txbuf[BYTES_FOR_LED*pos + BYTES_FOR_LED_BYTE+j] = get_protocol_eq(color.r, j); + for(int j = 0; j < 4; j++) + txbuf[BYTES_FOR_LED*pos + BYTES_FOR_LED_BYTE*2+j] = get_protocol_eq(color.b, j); +} + + +void WS2812_init(void) { + leds_init(); +} + +void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) { + uint8_t i = 0; + while (i < number_of_leds) { + set_led_color_rgb(ledarray[i], i); + i++; + } +} + + +void set_leds_color_rgb(LED_TYPE color){ + for(int i = 0; i < NB_LEDS; i++) + set_led_color_rgb(color, i); +} + + +void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds) { + +} diff --git a/keyboards/cannonkeys/stm32f072/ws2812.h b/keyboards/cannonkeys/stm32f072/ws2812.h new file mode 100644 index 000000000000..3b61ddcfa9bf --- /dev/null +++ b/keyboards/cannonkeys/stm32f072/ws2812.h @@ -0,0 +1,20 @@ +#pragma once + +#include "hal.h" +#include "rgblight_types.h" + + +void set_leds_color_rgb(LED_TYPE color); +void set_led_color_rgb(LED_TYPE color, int pos); +void leds_init(void); + + + // This is what users will use to interface with this +void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); +void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); + + +void WS2812_init(void); +void WS2812_set_color( uint8_t index, uint8_t red, uint8_t green, uint8_t blue ); +void WS2812_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); +void WS2812_send_colors(void); diff --git a/keyboards/canoe/info.json b/keyboards/canoe/info.json index fec60338af6e..17bdacaa5db9 100644 --- a/keyboards/canoe/info.json +++ b/keyboards/canoe/info.json @@ -2,7 +2,7 @@ "keyboard_name": "Canoe", "maintainer": "qmk", "url": "", - "height": 8, + "height": 6, "width": 15, "layouts": { "LAYOUT_iso": { diff --git a/keyboards/catch22/keymaps/default/keymap.c b/keyboards/catch22/keymaps/default/keymap.c index 790ae1eeb908..3216c02707fe 100644 --- a/keyboards/catch22/keymaps/default/keymap.c +++ b/keyboards/catch22/keymaps/default/keymap.c @@ -3,8 +3,6 @@ #define _BASE 0 #define _FN 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( /* Base */ KC_NLCK, KC_PSLS, KC_PAST, KC_BSPC, \ diff --git a/keyboards/chibios_test/keymaps/default/keymap.c b/keyboards/chibios_test/keymaps/default/keymap.c index 11616cf55901..0edc697bf9f5 100644 --- a/keyboards/chibios_test/keymaps/default/keymap.c +++ b/keyboards/chibios_test/keymaps/default/keymap.c @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "chibios_test.h" +#include QMK_KEYBOARD_H const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {{KC_CAPS}}, // test with KC_CAPS, KC_A, RESET diff --git a/keyboards/chimera_ergo/keymaps/default/keymap.c b/keyboards/chimera_ergo/keymaps/default/keymap.c index 1b83877266ea..0b60b1dafaf1 100644 --- a/keyboards/chimera_ergo/keymaps/default/keymap.c +++ b/keyboards/chimera_ergo/keymaps/default/keymap.c @@ -36,10 +36,6 @@ enum chimera_ergo_layers #define LONGPRESS_DELAY 150 //#define LAYER_TOGGLE_DELAY 300 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( diff --git a/keyboards/chimera_ortho/keymaps/dcompact/README.md b/keyboards/chimera_ortho/keymaps/dcompact/readme.md similarity index 84% rename from keyboards/chimera_ortho/keymaps/dcompact/README.md rename to keyboards/chimera_ortho/keymaps/dcompact/readme.md index 18c23d66eda2..bf72567ef10b 100644 --- a/keyboards/chimera_ortho/keymaps/dcompact/README.md +++ b/keyboards/chimera_ortho/keymaps/dcompact/readme.md @@ -34,10 +34,10 @@ merge with those in the keyboard folder_ ## Relevant Links -- ![Online Dvorak Layout Trainer](https://learn.dvorak.nl/) -- ![Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) -- ![QMK Docs](https://docs.qmk.fm/#/) -- ![QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes) +- [Online Dvorak Layout Trainer](https://learn.dvorak.nl/) +- [Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) +- [QMK Docs](https://docs.qmk.fm/#/) +- [QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes) ## Contact diff --git a/keyboards/christmas_tree/keymaps/default/config.h b/keyboards/christmas_tree/keymaps/default/config.h index 4553e621ddfa..271f48d0011b 100644 --- a/keyboards/christmas_tree/keymaps/default/config.h +++ b/keyboards/christmas_tree/keymaps/default/config.h @@ -1,6 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" - -#endif \ No newline at end of file +// place overrides here diff --git a/keyboards/christmas_tree/keymaps/default/keymap.c b/keyboards/christmas_tree/keymaps/default/keymap.c index 7880fd625478..6621201996b2 100644 --- a/keyboards/christmas_tree/keymaps/default/keymap.c +++ b/keyboards/christmas_tree/keymaps/default/keymap.c @@ -28,8 +28,6 @@ enum custom_keycodes { BACKLIT }; -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base @@ -82,4 +80,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/ckeys/handwire_101/config.h b/keyboards/ckeys/handwire_101/config.h index 106a7fd961ed..40faec066b2b 100755 --- a/keyboards/ckeys/handwire_101/config.h +++ b/keyboards/ckeys/handwire_101/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D4, C6, D7, E6 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW //#define BACKLIGHT_PIN B7 diff --git a/keyboards/ckeys/nakey/config.h b/keyboards/ckeys/nakey/config.h index cdd16015d477..cd8b1aa32939 100644 --- a/keyboards/ckeys/nakey/config.h +++ b/keyboards/ckeys/nakey/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B0, B1, B2, B3 } #define UNUSED_PINS { D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, B4, B5, B6, B7 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/ckeys/obelus/config.h b/keyboards/ckeys/obelus/config.h index 4ef308819aca..8d3bfa3b67e5 100644 --- a/keyboards/ckeys/obelus/config.h +++ b/keyboards/ckeys/obelus/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, B2, B3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/ckeys/obelus/keymaps/default/config.h b/keyboards/ckeys/obelus/keymaps/default/config.h index 04bf9f4a9d32..271f48d0011b 100644 --- a/keyboards/ckeys/obelus/keymaps/default/config.h +++ b/keyboards/ckeys/obelus/keymaps/default/config.h @@ -1,6 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" -// Add overrides here -#endif +// place overrides here diff --git a/keyboards/ckeys/obelus/keymaps/default/keymap.c b/keyboards/ckeys/obelus/keymaps/default/keymap.c index bdad1cacab17..f71ac562766d 100644 --- a/keyboards/ckeys/obelus/keymaps/default/keymap.c +++ b/keyboards/ckeys/obelus/keymaps/default/keymap.c @@ -1,7 +1,4 @@ #include QMK_KEYBOARD_H -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif extern keymap_config_t keymap_config; diff --git a/keyboards/claw44/claw44.c b/keyboards/claw44/claw44.c new file mode 100644 index 000000000000..f564fb623b8a --- /dev/null +++ b/keyboards/claw44/claw44.c @@ -0,0 +1,10 @@ +#include "claw44.h" +#include "ssd1306.h" + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { +#ifdef SSD1306OLED + return process_record_gfx(keycode,record) && process_record_user(keycode, record); +#else + return process_record_user(keycode, record); +#endif +} diff --git a/keyboards/claw44/claw44.h b/keyboards/claw44/claw44.h new file mode 100644 index 000000000000..4ca25fcb2b1e --- /dev/null +++ b/keyboards/claw44/claw44.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef KEYBOARD_claw44_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/orthodox/config.h b/keyboards/claw44/config.h similarity index 81% rename from keyboards/orthodox/config.h rename to keyboards/claw44/config.h index 821cd7e29f2a..fb1cdf3962a1 100644 --- a/keyboards/orthodox/config.h +++ b/keyboards/claw44/config.h @@ -1,9 +1,6 @@ /* -This is the c configuration file for the keyboard - Copyright 2012 Jun Wako -Copyright 2017 Jack Humbert -Copyright 2017 Art Ortenburger +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 @@ -19,9 +16,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif +#include + +#define USE_I2C +#define USE_SERIAL + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/sol/i2c.c b/keyboards/claw44/i2c.c similarity index 100% rename from keyboards/sol/i2c.c rename to keyboards/claw44/i2c.c diff --git a/keyboards/sol/i2c.h b/keyboards/claw44/i2c.h similarity index 96% rename from keyboards/sol/i2c.h rename to keyboards/claw44/i2c.h index 47cf6bd1b2c9..710662c7abd6 100644 --- a/keyboards/sol/i2c.h +++ b/keyboards/claw44/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/claw44/keymaps/default/config.h b/keyboards/claw44/keymaps/default/config.h new file mode 100644 index 000000000000..eff6ad3c7bac --- /dev/null +++ b/keyboards/claw44/keymaps/default/config.h @@ -0,0 +1,35 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_TERM 200 diff --git a/keyboards/claw44/keymaps/default/keymap.c b/keyboards/claw44/keymaps/default/keymap.c new file mode 100644 index 000000000000..c346571255f1 --- /dev/null +++ b/keyboards/claw44/keymaps/default/keymap.c @@ -0,0 +1,169 @@ +#include QMK_KEYBOARD_H +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +extern uint8_t is_master; + +// 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 custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +#define KC_ KC_TRNS +#define KC_RST RESET +#define KC_L_SPC LT(_LOWER, KC_SPC) // lower +#define KC_R_ENT LT(_RAISE, KC_ENT) // raise +#define KC_G_JA LGUI_T(KC_LANG1) // cmd or win +#define KC_G_EN LGUI_T(KC_LANG2) // cmd or win +#define KC_C_BS LCTL_T(KC_BSPC) // ctrl +#define KC_A_DEL ALT_T(KC_DEL) // alt + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( \ + //,--------+--------+---------+--------+---------+--------. ,--------+---------+--------+---------+--------+--------. + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS, + //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------| + KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, + //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------| + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, + //`--------+--------+---------+--------+---------+--------/ \--------+---------+--------+---------+--------+--------' + KC_A_DEL, KC_G_EN, KC_L_SPC, KC_C_BS, KC_C_BS, KC_R_ENT, KC_G_JA, KC_A_DEL + // `----------+--------+---------+--------' `--------+---------+--------+---------' + ), + + // \ ^ ! & | @ = + * % - + // ( # $ " ' ~ ← ↓ ↑ → ` ) + // { [ ] } + + [_RAISE] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + _______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LPRN, KC_HASH, KC_DLR , KC_DQT , KC_QUOT, KC_TILD, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_GRV , KC_RPRN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, _______, _______, _______, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + _______, _______, _______, _______, _______, _______, _______, RESET + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), + + [_LOWER] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , _______, KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, KC_COMM, KC_DOT , KC_SLSH, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + RESET , _______, _______, _______, _______, _______, _______, _______ + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), +}; + +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 +} + +//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 QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + break; + } + return true; +} diff --git a/keyboards/claw44/keymaps/yfuku/config.h b/keyboards/claw44/keymaps/yfuku/config.h new file mode 100644 index 000000000000..244ffa7096d1 --- /dev/null +++ b/keyboards/claw44/keymaps/yfuku/config.h @@ -0,0 +1,36 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_TERM 180 +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/claw44/keymaps/yfuku/keymap.c b/keyboards/claw44/keymaps/yfuku/keymap.c new file mode 100644 index 000000000000..77d459b928d3 --- /dev/null +++ b/keyboards/claw44/keymaps/yfuku/keymap.c @@ -0,0 +1,221 @@ +#include QMK_KEYBOARD_H +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +extern uint8_t is_master; + +// 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 custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +// common +#define KC_ KC_TRNS +#define KC_XXXX KC_NO +#define KC_RST RESET +#define KC_VD KC__VOLDOWN +#define KC_VU KC__VOLUP + +// layer +#define KC_L_SPC LT(_LOWER, KC_SPC) +#define KC_R_ENT LT(_RAISE, KC_ENT) + +// shift_t +#define KC_S_TAB LSFT_T(KC_TAB) +#define KC_S_ESC LSFT_T(KC_ESC) +#define KC_S_JA LSFT_T(KC_LANG1) +#define KC_S_EN LSFT_T(KC_LANG2) + +// cmd_t +#define KC_M_F LCMD_T(KC_F) +#define KC_M_D LCMD_T(KC_D) +#define KC_M_J LCMD_T(KC_J) +#define KC_M_K LCMD_T(KC_K) + +// ctl_t +#define KC_C_S LCTL_T(KC_S) +#define KC_C_L LCTL_T(KC_L) +#define KC_C_BS LCTL_T(KC_BSPC) + +// alt_t +#define KC_A_D ALT_T(KC_D) +#define KC_A_K ALT_T(KC_K) +#define KC_A_Z ALT_T(KC_Z) +#define KC_A_SL ALT_T(KC_SLSH) +#define KC_A_DEL ALT_T(KC_DEL) + +// cmd+shift_t +#define KC_MS_Q SCMD_T(KC_Q) +#define KC_MS_A SCMD_T(KC_A) +#define KC_MS_S SCMD_T(KC_S) +#define KC_MS_SC SCMD_T(KC_SCLN) +#define KC_MS_ESC SCMD_T(KC_ESC) + +// +#define KC_MR RCMD(KC_R) +#define KC_MF RCMD(KC_F) +#define KC_MW RCMD(KC_W) +#define KC_MX RCMD(KC_X) +#define KC_MC RCMD(KC_C) +#define KC_MV RCMD(KC_V) +#define KC_MTAB RCMD(KC_TAB) +#define KC_MSF RCMD(RSFT(KC_F)) +#define KC_MSR RCMD(RSFT(KC_R)) +#define KC_MST RCMD(RSFT(KC_T)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // M_ = LCMD_T( + // A_ = ALT_T( + // C_ = LCTL_T( + // MS_ = SMD_T( + // R_ = LT(_RAISE + // L_ = LT(_LOWER + + [_QWERTY] = LAYOUT_kc( \ + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ESC , Q , W , E , R , T , Y , U , I , O , P ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + S_TAB, A ,C_S , D ,M_F , G , H ,M_J , K ,C_L ,SCLN,S_ESC, + //|----+----+----+----+----+----+ |----+----+----+----+----+----| + , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, , + //`----+----+----+----+----+----/ \----+----+----+----+----+----' + A_DEL,S_EN,L_SPC,C_BS, C_BS,R_ENT,S_JA,A_DEL + // `----+----+----+----' `----+----+----+----' + ), + + // \ ^ ! & | @ = + * % - + // ( # $ " ' ~ ← ↓ ↑ → ` ) + // { [ ] } + + [_RAISE] = LAYOUT_kc( \ + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + ,BSLS,CIRC,EXLM,AMPR,PIPE, AT ,EQL ,PLUS,ASTR,PERC,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LPRN,HASH,DLR ,DQT ,QUOT,TILD, LEFT,DOWN, UP ,RGHT,GRV ,RPRN, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , ,LCBR,LBRC, RBRC,RCBR, , , , , + //`----+----+----+----+----+----/ \----+----+----+----+----+----' + , ,BSPC, , , , ,RST + // `----+----+----+----' `----+----+----+----' + ), + + [_LOWER] = LAYOUT_kc( \ + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , ,MSF ,MSR ,MST , ,EQL ,PLUS,ASTR,PERC,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , ,COMM,DOT ,SLSH, , + //`----+----+----+--+-+----+----/ \----+----+----+----+----+----' + RST , , , , ,DEL , , + // `----+----+----+----' `----+----+----+----' + ), +}; + +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 +} + +//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 QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + break; + } + return true; +} + diff --git a/keyboards/claw44/lib/glcdfont.c b/keyboards/claw44/lib/glcdfont.c new file mode 100644 index 000000000000..91f53d9c24ea --- /dev/null +++ b/keyboards/claw44/lib/glcdfont.c @@ -0,0 +1,243 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font +const unsigned char font[] PROGMEM = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, +0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, +0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, +0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, +0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, +0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, +0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, +0x00, 0x18, 0x24, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, +0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, +0x26, 0x29, 0x79, 0x29, 0x26, 0x00, +0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, +0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, +0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, +0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, +0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, +0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, +0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, +0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, +0x60, 0x60, 0x60, 0x60, 0x60, 0x00, +0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, +0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, +0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, +0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, +0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, +0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, +0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, +0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, +0x00, 0x07, 0x00, 0x07, 0x00, 0x00, +0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, +0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, +0x23, 0x13, 0x08, 0x64, 0x62, 0x00, +0x36, 0x49, 0x56, 0x20, 0x50, 0x00, +0x00, 0x08, 0x07, 0x03, 0x00, 0x00, +0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, +0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, +0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, +0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, +0x00, 0x80, 0x70, 0x30, 0x00, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x00, +0x00, 0x00, 0x60, 0x60, 0x00, 0x00, +0x20, 0x10, 0x08, 0x04, 0x02, 0x00, +0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, +0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, +0x72, 0x49, 0x49, 0x49, 0x46, 0x00, +0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, +0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, +0x27, 0x45, 0x45, 0x45, 0x39, 0x00, +0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, +0x41, 0x21, 0x11, 0x09, 0x07, 0x00, +0x36, 0x49, 0x49, 0x49, 0x36, 0x00, +0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, +0x00, 0x00, 0x14, 0x00, 0x00, 0x00, +0x00, 0x40, 0x34, 0x00, 0x00, 0x00, +0x00, 0x08, 0x14, 0x22, 0x41, 0x00, +0x14, 0x14, 0x14, 0x14, 0x14, 0x00, +0x00, 0x41, 0x22, 0x14, 0x08, 0x00, +0x02, 0x01, 0x59, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, +0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, +0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, +0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, +0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, +0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, +0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, +0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, +0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, +0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, +0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, +0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, +0x26, 0x49, 0x49, 0x49, 0x32, 0x00, +0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, +0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, +0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, +0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, +0x63, 0x14, 0x08, 0x14, 0x63, 0x00, +0x03, 0x04, 0x78, 0x04, 0x03, 0x00, +0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, +0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, +0x02, 0x04, 0x08, 0x10, 0x20, 0x00, +0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, +0x04, 0x02, 0x01, 0x02, 0x04, 0x00, +0x40, 0x40, 0x40, 0x40, 0x40, 0x00, +0x00, 0x03, 0x07, 0x08, 0x00, 0x00, +0x20, 0x54, 0x54, 0x78, 0x40, 0x00, +0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, +0x38, 0x44, 0x44, 0x44, 0x28, 0x00, +0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, +0x38, 0x54, 0x54, 0x54, 0x18, 0x00, +0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, +0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, +0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, +0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, +0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, +0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, +0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, +0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, +0x38, 0x44, 0x44, 0x44, 0x38, 0x00, +0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, +0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, +0x48, 0x54, 0x54, 0x54, 0x24, 0x00, +0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, +0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, +0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, +0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, +0x44, 0x28, 0x10, 0x28, 0x44, 0x00, +0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, +0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, +0x00, 0x08, 0x36, 0x41, 0x00, 0x00, +0x00, 0x00, 0x77, 0x00, 0x00, 0x00, +0x00, 0x41, 0x36, 0x08, 0x00, 0x00, +0x02, 0x01, 0x02, 0x04, 0x02, 0x00, +0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, + 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0xC0, 0xF0, 0xF8, 0xF8, + 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xE0, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, +0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, +0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, +0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, +0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, +0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, +0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, +0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, + 0xFF, 0x1F, 0x07, 0x07, 0x07, 0x07, + 0x1F, 0x1F, 0x1F, 0x1E, 0x18, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0x00, 0x00, 0x00, 0x9E, 0xDF, 0xDF, + 0xCF, 0xC7, 0xE7, 0xE7, 0xE7, 0xFF, + 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x03, + 0x3F, 0xFF, 0xFF, 0xFE, 0xC0, 0x00, + 0xF0, 0xFF, 0xFF, 0x1F, 0xFF, 0xFF, + 0xF0, 0x00, 0xC0, 0xFC, 0xFF, 0xFF, + 0x3F, 0x03, 0x00, 0xC0, 0xF0, 0xF8, + 0xFE, 0x9F, 0x87, 0x83, 0x80, 0xFF, + 0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x00, + 0x00, 0xE0, 0xF8, 0xFC, 0xBF, 0x8F, + 0x83, 0x81, 0xFF, 0xFF, 0xFF, 0xFF, + 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, +0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, +0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, +0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, +0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, +0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x1F, 0x3F, + 0x7F, 0x7C, 0x78, 0x70, 0x70, 0x78, + 0x7E, 0x3E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x7F, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x00, 0x1F, 0x3F, 0x7F, 0x7F, + 0x79, 0x71, 0x70, 0x30, 0x38, 0x3F, + 0x7F, 0x7F, 0x7F, 0x60, 0x00, 0x00, + 0x00, 0x01, 0x1F, 0x7F, 0x7F, 0x7E, + 0x7F, 0x1F, 0x01, 0x00, 0x01, 0x3F, + 0x7F, 0x7E, 0x7F, 0x7F, 0x0F, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x7F, + 0x7F, 0x7F, 0x7F, 0x03, 0x03, 0x00, + 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x7F, 0x7F, 0x7F, 0x7F, + 0x07, 0x03, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +#endif // FONT5X7_H diff --git a/keyboards/claw44/lib/host_led_state_reader.c b/keyboards/claw44/lib/host_led_state_reader.c new file mode 100644 index 000000000000..980823b318c3 --- /dev/null +++ b/keyboards/claw44/lib/host_led_state_reader.c @@ -0,0 +1,15 @@ +#include +#include "claw44.h" + +char host_led_state_str[24]; + +const char *read_host_led_state(void) +{ + uint8_t leds = host_keyboard_leds(); + snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s", + (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ", + (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ", + (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "); + + return host_led_state_str; +} diff --git a/keyboards/claw44/lib/keylogger.c b/keyboards/claw44/lib/keylogger.c new file mode 100644 index 000000000000..092b6929bc2e --- /dev/null +++ b/keyboards/claw44/lib/keylogger.c @@ -0,0 +1,45 @@ +#include +#include "claw44.h" + +char keylog_str[24] = {}; +char keylogs_str[21] = {}; +int keylogs_str_idx = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ', + ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); + + // update keylogs + if (keylogs_str_idx == sizeof(keylogs_str) - 1) { + keylogs_str_idx = 0; + for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { + keylogs_str[i] = ' '; + } + } + + keylogs_str[keylogs_str_idx] = name; + keylogs_str_idx++; +} + +const char *read_keylog(void) { + return keylog_str; +} + +const char *read_keylogs(void) { + return keylogs_str; +} diff --git a/keyboards/claw44/lib/layer_state_reader.c b/keyboards/claw44/lib/layer_state_reader.c new file mode 100644 index 000000000000..d92b6df5827f --- /dev/null +++ b/keyboards/claw44/lib/layer_state_reader.c @@ -0,0 +1,35 @@ + +#include QMK_KEYBOARD_H +#include +#include "claw44.h" + +#define L_BASE 0 +#define L_LOWER (1<<_LOWER) +#define L_RAISE (1<<_RAISE) +#define L_ADJUST (1<<_ADJUST) +#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) + +char layer_state_str[24]; + +const char *read_layer_state(void) { + switch (layer_state) + { + case L_BASE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default"); + break; + case L_RAISE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise"); + break; + case L_LOWER: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower"); + break; + case L_ADJUST: + case L_ADJUST_TRI: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); + break; + default: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state); + } + + return layer_state_str; +} diff --git a/keyboards/claw44/lib/logo_reader.c b/keyboards/claw44/lib/logo_reader.c new file mode 100644 index 000000000000..b5b437b2b892 --- /dev/null +++ b/keyboards/claw44/lib/logo_reader.c @@ -0,0 +1,11 @@ +#include "claw44.h" + +const char *read_logo(void) { + static char logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + + return logo; +} diff --git a/keyboards/claw44/lib/mode_icon_reader.c b/keyboards/claw44/lib/mode_icon_reader.c new file mode 100644 index 000000000000..a9272bb9a780 --- /dev/null +++ b/keyboards/claw44/lib/mode_icon_reader.c @@ -0,0 +1,15 @@ +#include +#include "claw44.h" + +char mode_icon[24]; + +const char *read_mode_icon(bool swap) { + static char logo[][2][3] = {{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}}; + if (swap == false) { + snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[0][0], logo[0][1]); + } else { + snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[1][0], logo[1][1]); + } + + return mode_icon; +} diff --git a/keyboards/claw44/lib/rgb_state_reader.c b/keyboards/claw44/lib/rgb_state_reader.c new file mode 100644 index 000000000000..e0efe2e5288f --- /dev/null +++ b/keyboards/claw44/lib/rgb_state_reader.c @@ -0,0 +1,15 @@ +#ifdef RGBLIGHT_ENABLE + +#include QMK_KEYBOARD_H +#include + +extern rgblight_config_t rgblight_config; +char rbf_info_str[24]; +const char *read_rgb_info(void) { + + snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d", + rgblight_config.enable ? "on" : "- ", rgblight_config.mode, + rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + return rbf_info_str; +} +#endif diff --git a/keyboards/claw44/lib/timelogger.c b/keyboards/claw44/lib/timelogger.c new file mode 100644 index 000000000000..ecd4ed3ea8c0 --- /dev/null +++ b/keyboards/claw44/lib/timelogger.c @@ -0,0 +1,16 @@ +#include +#include "claw44.h" + +char timelog_str[24] = {}; +int last_time = 0; +int elapsed_time = 0; + +void set_timelog(void) { + elapsed_time = timer_elapsed(last_time); + last_time = timer_read(); + snprintf(timelog_str, sizeof(timelog_str), "lt:%5d, et:%5d", last_time, elapsed_time); +} + +const char *read_timelog(void) { + return timelog_str; +} diff --git a/keyboards/claw44/readme.md b/keyboards/claw44/readme.md new file mode 100644 index 000000000000..7e72e0897134 --- /dev/null +++ b/keyboards/claw44/readme.md @@ -0,0 +1,15 @@ +# Claw44 + +![Claw44](https://i.imgur.com/5a8iogl.jpg) + +A split keyboard with 3x6 vertically staggered keys and 4 thumb keys. + +Keyboard Maintainer: [@yfuku_](https://twitter.com/yfuku_) +Hardware Supported: Claw44 PCB, ProMicro +Hardware Availability: https://yfuku.booth.pm/ + +Make example for this keyboard (after setting up your build environment): + + make claw44: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). diff --git a/keyboards/ergodash/rev2/config.h b/keyboards/claw44/rev1/config.h similarity index 73% rename from keyboards/ergodash/rev2/config.h rename to keyboards/claw44/rev1/config.h index 09657250b135..ba2ed4559e8d 100644 --- a/keyboards/ergodash/rev2/config.h +++ b/keyboards/claw44/rev1/config.h @@ -16,57 +16,46 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV2_CONFIG_H -#define REV2_CONFIG_H - -#include "config_common.h" +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0100 -#define MANUFACTURER Omkbd -#define PRODUCT ErgoDash -#define DESCRIPTION Power +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yfuku +#define PRODUCT claw44 +#define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 4 thumb keys /* key matrix size */ // Rows are doubled-up -#define MATRIX_ROWS 10 +#define MATRIX_ROWS 8 #define MATRIX_COLS 7 +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } // wiring of each half -#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } // #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order -/* define tapping term */ -#define TAPPING_TERM 120 - /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST -#define C6_AUDIO - /* number of backlight levels */ -#ifdef BACKLIGHT_ENABLE - #define BACKLIGHT_PIN B6 - #define BACKLIGHT_LEVELS 7 -// #define BACKLIGHT_BREATHING -// #define BREATHING_PERIOD 4 -#endif +// #define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE +//#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE +//#define LOCKING_RESYNC_ENABLE /* ws2812 RGB LED */ +/* #define RGB_DI_PIN D3 -#define RGBLED_NUM 24 // Number of LEDs +#define RGBLED_NUM 12 // Number of LEDs +*/ /* * Feature disable options @@ -85,5 +74,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/bfo9000/matrix.c b/keyboards/claw44/rev1/matrix.c similarity index 72% rename from keyboards/bfo9000/matrix.c rename to keyboards/claw44/rev1/matrix.c index 2ca5f4d87abc..718cc574481a 100644 --- a/keyboards/bfo9000/matrix.c +++ b/keyboards/claw44/rev1/matrix.c @@ -20,10 +20,7 @@ along with this program. If not, see . */ #include #include -#ifdef USE_I2C -// provides memcpy for copying TWI slave buffer -// #include -#endif +#include #include #include #include @@ -34,12 +31,11 @@ along with this program. If not, see . #include "matrix.h" #include "split_util.h" #include "pro_micro.h" -#include "config.h" -#ifdef USE_I2C +#ifdef USE_MATRIX_I2C # include "i2c.h" #else // USE_SERIAL -# include "serial.h" +# include "split_scomm.h" #endif #ifndef DEBOUNCE @@ -51,6 +47,7 @@ along with this program. If not, see . static uint8_t debouncing = DEBOUNCE; static const int ROWS_PER_HAND = MATRIX_ROWS/2; static uint8_t error_count = 0; +uint8_t is_master = 0 ; static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; @@ -63,6 +60,7 @@ static matrix_row_t read_cols(void); static void init_cols(void); static void unselect_rows(void); static void select_row(uint8_t row); +static uint8_t matrix_master_scan(void); __attribute__ ((weak)) @@ -105,6 +103,8 @@ void matrix_init(void) init_cols(); TX_RX_LED_INIT; + TXLED0; + RXLED0; // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { @@ -112,12 +112,14 @@ void matrix_init(void) matrix_debouncing[i] = 0; } + is_master = has_usb(); + matrix_init_quantum(); } uint8_t _matrix_scan(void) { - // Right hand is stored after the left in the matrix so, we need to offset it + // Right hand is stored after the left in the matirx so, we need to offset it int offset = isLeftHand ? 0 : (ROWS_PER_HAND); for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { @@ -144,7 +146,7 @@ uint8_t _matrix_scan(void) return 1; } -#ifdef USE_I2C +#ifdef USE_MATRIX_I2C // Get rows from other half over i2c int i2c_transaction(void) { @@ -162,31 +164,14 @@ int i2c_transaction(void) { if (err) goto i2c_error; if (!err) { - /* - // read from TWI byte-by-byte into matrix_row_t memory space - size_t i; - for (i = 0; i < SLAVE_BUFFER_SIZE-1; ++i) { - *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_ACK); + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); } - // last byte to be read / end of chunk - *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_NACK); - */ - - // kludge for column #9: unpack bits for keys (2,9) and (3,9) from (1,7) and (1,8) - // i2c_master_read(I2C_ACK); - matrix[slaveOffset+0] = i2c_master_read(I2C_ACK); - // i2c_master_read(I2C_ACK); - matrix[slaveOffset+1] = (matrix_row_t)i2c_master_read(I2C_ACK)\ - | (matrix[slaveOffset+0]&0x40U)<<2; - // i2c_master_read(I2C_ACK); - matrix[slaveOffset+2] = (matrix_row_t)i2c_master_read(I2C_NACK)\ - | (matrix[slaveOffset+0]&0x80U)<<1; - // clear highest two bits on row 1, where the col9 bits were transported - matrix[slaveOffset+0] &= 0x3F; - + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); i2c_master_stop(); } else { -i2c_error: // the cable is disconnected, or something else went wrong +i2c_error: // the cable is disconnceted, or something else went wrong i2c_reset_state(); return err; } @@ -196,30 +181,64 @@ int i2c_transaction(void) { #else // USE_SERIAL -int serial_transaction(void) { +int serial_transaction(int master_changed) { int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { +#ifdef SERIAL_USE_MULTI_TRANSACTION + int ret=serial_update_buffers(master_changed); +#else + int ret=serial_update_buffers(); +#endif + if (ret ) { + if(ret==2) RXLED1; return 1; } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } + RXLED0; + memcpy(&matrix[slaveOffset], + (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH); return 0; } #endif uint8_t matrix_scan(void) { + if (is_master) { + matrix_master_scan(); + }else{ + matrix_slave_scan(); + int offset = (isLeftHand) ? ROWS_PER_HAND : 0; + memcpy(&matrix[offset], + (void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH); + matrix_scan_quantum(); + } + return 1; +} + + +uint8_t matrix_master_scan(void) { + int ret = _matrix_scan(); + int mchanged = 1; + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; +#ifdef USE_MATRIX_I2C +// for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ +// i2c_slave_buffer[i] = matrix[offset+i]; +// } +#else // USE_SERIAL + #ifdef SERIAL_USE_MULTI_TRANSACTION + mchanged = memcmp((void *)serial_master_buffer, + &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); + #endif + memcpy((void *)serial_master_buffer, + &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); +#endif -#ifdef USE_I2C +#ifdef USE_MATRIX_I2C if( i2c_transaction() ) { #else // USE_SERIAL - if( serial_transaction() ) { + if( serial_transaction(mchanged) ) { #endif // turn on the indicator led when halves are disconnected TXLED1; @@ -247,29 +266,25 @@ void matrix_slave_scan(void) { int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; -#ifdef USE_I2C - // SLAVE_BUFFER_SIZE is from i2c.h - // (MATRIX_ROWS/2*sizeof(matrix_row_t)) - // memcpy((void*)i2c_slave_buffer, (const void*)&matrix[offset], (ROWS_PER_HAND*sizeof(matrix_row_t))); - - // kludge for column #9: put bits for keys (2,9) and (3,9) into (1,7) and (1,8) - i2c_slave_buffer[0] = (uint8_t)(matrix[offset+0])\ - | (matrix[offset+1]&0x100U)>>2\ - | (matrix[offset+2]&0x100U)>>1; - i2c_slave_buffer[1] = (uint8_t)(matrix[offset+1]); - i2c_slave_buffer[2] = (uint8_t)(matrix[offset+2]); - // note: looks like a possible operator-precedence bug here, in last version? - /* - i2c_slave_buffer[1] = (uint8_t)matrix[offset+0]; - i2c_slave_buffer[2] = (uint8_t)(matrix[offset+1]>>8); - i2c_slave_buffer[3] = (uint8_t)(matrix[offset+1]>>8); - i2c_slave_buffer[4] = (uint8_t)(matrix[offset+2]>>8); - i2c_slave_buffer[5] = (uint8_t)matrix[offset+2]; - */ +#ifdef USE_MATRIX_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ + i2c_slave_buffer[i] = matrix[offset+i]; + } #else // USE_SERIAL + #ifdef SERIAL_USE_MULTI_TRANSACTION + int change = 0; + #endif for (int i = 0; i < ROWS_PER_HAND; ++i) { + #ifdef SERIAL_USE_MULTI_TRANSACTION + if( serial_slave_buffer[i] != matrix[offset+i] ) + change = 1; + #endif serial_slave_buffer[i] = matrix[offset+i]; } + #ifdef SERIAL_USE_MULTI_TRANSACTION + slave_buffer_change_count += change; + #endif #endif } diff --git a/keyboards/claw44/rev1/rev1.c b/keyboards/claw44/rev1/rev1.c new file mode 100644 index 000000000000..9529636f5636 --- /dev/null +++ b/keyboards/claw44/rev1/rev1.c @@ -0,0 +1,8 @@ +#include "claw44.h" + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + //led_set_user(usb_led); +} +#endif diff --git a/keyboards/claw44/rev1/rev1.h b/keyboards/claw44/rev1/rev1.h new file mode 100644 index 000000000000..f7ec2cbfe657 --- /dev/null +++ b/keyboards/claw44/rev1/rev1.h @@ -0,0 +1,57 @@ +#pragma once + +#include "../claw44.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, R30, R31, R32, R33 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, KC_NO, L30, L31, L32, L33 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { KC_NO, KC_NO, R33, R32, R31, R30 } \ + } + +#define LAYOUT_kc( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, R30, R31, R32, R33 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##R30, KC_##R31, KC_##R32, KC_##R33 \ + ) + +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; diff --git a/keyboards/claw44/rev1/rules.mk b/keyboards/claw44/rev1/rules.mk new file mode 100644 index 000000000000..ae95ec401454 --- /dev/null +++ b/keyboards/claw44/rev1/rules.mk @@ -0,0 +1,31 @@ +SRC += rev1/matrix.c +SRC += rev1/split_util.c +SRC += rev1/split_scomm.c + +# Build Options +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# 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 you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/rgb_state_reader.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/claw44/rev1/serial_config.h b/keyboards/claw44/rev1/serial_config.h new file mode 100644 index 000000000000..4fab8e8ddfcf --- /dev/null +++ b/keyboards/claw44/rev1/serial_config.h @@ -0,0 +1,4 @@ +#ifndef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/claw44/rev1/split_scomm.c b/keyboards/claw44/rev1/split_scomm.c new file mode 100644 index 000000000000..a1fe6ba5b823 --- /dev/null +++ b/keyboards/claw44/rev1/split_scomm.c @@ -0,0 +1,91 @@ +#ifdef USE_SERIAL +#ifdef SERIAL_USE_MULTI_TRANSACTION +/* --- USE flexible API (using multi-type transaction function) --- */ + +#include +#include +#include +#include +#include "serial.h" +#ifdef CONSOLE_ENABLE + #include +#endif + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; +uint8_t volatile status_com = 0; +uint8_t volatile status1 = 0; +uint8_t slave_buffer_change_count = 0; +uint8_t s_change_old = 0xff; +uint8_t s_change_new = 0xff; + +SSTD_t transactions[] = { +#define GET_SLAVE_STATUS 0 + /* master buffer not changed, only recive slave_buffer_change_count */ + { (uint8_t *)&status_com, + 0, NULL, + sizeof(slave_buffer_change_count), &slave_buffer_change_count, + }, +#define PUT_MASTER_GET_SLAVE_STATUS 1 + /* master buffer changed need send, and recive slave_buffer_change_count */ + { (uint8_t *)&status_com, + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + sizeof(slave_buffer_change_count), &slave_buffer_change_count, + }, +#define GET_SLAVE_BUFFER 2 + /* recive serial_slave_buffer */ + { (uint8_t *)&status1, + 0, NULL, + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + } +}; + +void serial_master_init(void) +{ + soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); +} + +void serial_slave_init(void) +{ + soft_serial_target_init(transactions, TID_LIMIT(transactions)); +} + +// 0 => no error +// 1 => slave did not respond +// 2 => checksum error +int serial_update_buffers(int master_update) +{ + int status, smatstatus; + static int need_retry = 0; + + if( s_change_old != s_change_new ) { + smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); + if( smatstatus == TRANSACTION_END ) { + s_change_old = s_change_new; +#ifdef CONSOLE_ENABLE + uprintf("slave matrix = %b %b %b %b\n", + serial_slave_buffer[0], serial_slave_buffer[1], + serial_slave_buffer[2], serial_slave_buffer[3]); +#endif + } + } else { + // serial_slave_buffer dosen't change + smatstatus = TRANSACTION_END; // dummy status + } + + if( !master_update && !need_retry) { + status = soft_serial_transaction(GET_SLAVE_STATUS); + } else { + status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); + } + if( status == TRANSACTION_END ) { + s_change_new = slave_buffer_change_count; + need_retry = 0; + } else { + need_retry = 1; + } + return smatstatus; +} + +#endif // SERIAL_USE_MULTI_TRANSACTION +#endif /* USE_SERIAL */ diff --git a/keyboards/claw44/rev1/split_scomm.h b/keyboards/claw44/rev1/split_scomm.h new file mode 100644 index 000000000000..873d8939d81f --- /dev/null +++ b/keyboards/claw44/rev1/split_scomm.h @@ -0,0 +1,24 @@ +#ifndef SPLIT_COMM_H +#define SPLIT_COMM_H + +#ifndef SERIAL_USE_MULTI_TRANSACTION +/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ +#include "serial.h" + +#else +/* --- USE flexible API (using multi-type transaction function) --- */ +// Buffers for master - slave communication +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 + +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; +extern uint8_t slave_buffer_change_count; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(int master_changed); + +#endif + +#endif /* SPLIT_COMM_H */ diff --git a/keyboards/orthodox/split_util.c b/keyboards/claw44/rev1/split_util.c similarity index 81% rename from keyboards/orthodox/split_util.c rename to keyboards/claw44/rev1/split_util.c index 39639c3b4bd8..e1ff8b4379dc 100644 --- a/keyboards/orthodox/split_util.c +++ b/keyboards/claw44/rev1/split_util.c @@ -7,12 +7,11 @@ #include "split_util.h" #include "matrix.h" #include "keyboard.h" -#include "config.h" -#ifdef USE_I2C +#ifdef USE_MATRIX_I2C # include "i2c.h" #else -# include "serial.h" +# include "split_scomm.h" #endif volatile bool isLeftHand = true; @@ -31,18 +30,17 @@ static void setup_handedness(void) { } static void keyboard_master_setup(void) { -#ifdef USE_I2C + +#ifdef USE_MATRIX_I2C i2c_master_init(); -#ifdef SSD1306OLED - matrix_master_OLED_init (); -#endif #else serial_master_init(); #endif } static void keyboard_slave_setup(void) { -#ifdef USE_I2C + +#ifdef USE_MATRIX_I2C i2c_slave_init(SLAVE_I2C_ADDRESS); #else serial_slave_init(); @@ -66,19 +64,7 @@ void split_keyboard_setup(void) { sei(); } -void keyboard_slave_loop(void) { - matrix_init(); - - while (1) { - matrix_slave_scan(); - } -} - // this code runs before the usb and keyboard is initialized void matrix_setup(void) { split_keyboard_setup(); - - if (!has_usb()) { - keyboard_slave_loop(); - } } diff --git a/keyboards/bfo9000/split_util.h b/keyboards/claw44/rev1/split_util.h similarity index 91% rename from keyboards/bfo9000/split_util.h rename to keyboards/claw44/rev1/split_util.h index 595a0659e1dd..687ca19bd3e5 100644 --- a/keyboards/bfo9000/split_util.h +++ b/keyboards/claw44/rev1/split_util.h @@ -13,7 +13,6 @@ void matrix_slave_scan(void); void split_keyboard_setup(void); bool has_usb(void); -void keyboard_slave_loop(void); void matrix_master_OLED_init (void); diff --git a/keyboards/claw44/rules.mk b/keyboards/claw44/rules.mk new file mode 100644 index 000000000000..907a5c832532 --- /dev/null +++ b/keyboards/claw44/rules.mk @@ -0,0 +1,74 @@ +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c + +# if firmware size over limit, try this option +# CFLAGS += -flto + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes + +DEFAULT_FOLDER = claw44/rev1 diff --git a/keyboards/claw44/serial.c b/keyboards/claw44/serial.c new file mode 100644 index 000000000000..325c29a3f704 --- /dev/null +++ b/keyboards/claw44/serial.c @@ -0,0 +1,590 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + * + * 2018-10-28 checked + * avr-gcc 4.9.2 + * avr-gcc 5.4.0 + * avr-gcc 7.3.0 + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include +#include "serial.h" +//#include + +#ifdef SOFT_SERIAL_PIN + +#ifdef __AVR_ATmega32U4__ + // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. + #ifdef USE_I2C + #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 + #error Using ATmega32U4 I2C, so can not use PD0, PD1 + #endif + #endif + + #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 + #define SERIAL_PIN_DDR DDRD + #define SERIAL_PIN_PORT PORTD + #define SERIAL_PIN_INPUT PIND + #if SOFT_SERIAL_PIN == D0 + #define SERIAL_PIN_MASK _BV(PD0) + #define EIMSK_BIT _BV(INT0) + #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) + #define SERIAL_PIN_INTERRUPT INT0_vect + #elif SOFT_SERIAL_PIN == D1 + #define SERIAL_PIN_MASK _BV(PD1) + #define EIMSK_BIT _BV(INT1) + #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) + #define SERIAL_PIN_INTERRUPT INT1_vect + #elif SOFT_SERIAL_PIN == D2 + #define SERIAL_PIN_MASK _BV(PD2) + #define EIMSK_BIT _BV(INT2) + #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) + #define SERIAL_PIN_INTERRUPT INT2_vect + #elif SOFT_SERIAL_PIN == D3 + #define SERIAL_PIN_MASK _BV(PD3) + #define EIMSK_BIT _BV(INT3) + #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) + #define SERIAL_PIN_INTERRUPT INT3_vect + #endif + #elif SOFT_SERIAL_PIN == E6 + #define SERIAL_PIN_DDR DDRE + #define SERIAL_PIN_PORT PORTE + #define SERIAL_PIN_INPUT PINE + #define SERIAL_PIN_MASK _BV(PE6) + #define EIMSK_BIT _BV(INT6) + #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) + #define SERIAL_PIN_INTERRUPT INT6_vect + #else + #error invalid SOFT_SERIAL_PIN value + #endif + +#else + #error serial.c now support ATmega32U4 only +#endif + +//////////////// for backward compatibility //////////////////////////////// +#ifndef SERIAL_USE_MULTI_TRANSACTION +/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; + #endif + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + #endif + uint8_t volatile status0 = 0; + +SSTD_t transactions[] = { + { (uint8_t *)&status0, + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + #else + 0, (uint8_t *)NULL, + #endif + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + #else + 0, (uint8_t *)NULL, + #endif + } +}; + +void serial_master_init(void) +{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } + +void serial_slave_init(void) +{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } + +// 0 => no error +// 1 => slave did not respond +// 2 => checksum error +int serial_update_buffers() +{ + int result; + result = soft_serial_transaction(); + return result; +} + +#endif // end of Simple API (OLD API, compatible with let's split serial.c) +//////////////////////////////////////////////////////////////////////////// + +#define ALWAYS_INLINE __attribute__((always_inline)) +#define NO_INLINE __attribute__((noinline)) +#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) + +// parity check +#define ODD_PARITY 1 +#define EVEN_PARITY 0 +#define PARITY EVEN_PARITY + +#ifdef SERIAL_DELAY + // custom setup in config.h + // #define TID_SEND_ADJUST 2 + // #define SERIAL_DELAY 6 // micro sec + // #define READ_WRITE_START_ADJUST 30 // cycles + // #define READ_WRITE_WIDTH_ADJUST 8 // cycles +#else +// ============ Standard setups ============ + +#ifndef SELECT_SOFT_SERIAL_SPEED +#define SELECT_SOFT_SERIAL_SPEED 1 +// 0: about 189kbps +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +#endif + +#if __GNUC__ < 6 + #define TID_SEND_ADJUST 14 +#else + #define TID_SEND_ADJUST 2 +#endif + +#if SELECT_SOFT_SERIAL_SPEED == 0 + // Very High speed + #define SERIAL_DELAY 4 // micro sec + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 34 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 1 + // High speed + #define SERIAL_DELAY 6 // micro sec + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 30 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 2 + // Middle speed + #define SERIAL_DELAY 12 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 3 + // Low speed + #define SERIAL_DELAY 24 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 4 + // Very Low speed + #define SERIAL_DELAY 36 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 5 + // Ultra Low speed + #define SERIAL_DELAY 48 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#else +#error invalid SELECT_SOFT_SERIAL_SPEED value +#endif /* SELECT_SOFT_SERIAL_SPEED */ +#endif /* SERIAL_DELAY */ + +#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) +#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) + +#define SLAVE_INT_WIDTH_US 1 +#ifndef SERIAL_USE_MULTI_TRANSACTION + #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY +#else + #define SLAVE_INT_ACK_WIDTH_UNIT 2 + #define SLAVE_INT_ACK_WIDTH 4 +#endif + +static SSTD_t *Transaction_table = NULL; +static uint8_t Transaction_table_size = 0; + +inline static void serial_delay(void) ALWAYS_INLINE; +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static void serial_delay_half1(void) ALWAYS_INLINE; +inline static +void serial_delay_half1(void) { + _delay_us(SERIAL_DELAY_HALF1); +} + +inline static void serial_delay_half2(void) ALWAYS_INLINE; +inline static +void serial_delay_half2(void) { + _delay_us(SERIAL_DELAY_HALF2); +} + +inline static void serial_output(void) ALWAYS_INLINE; +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static void serial_input_with_pullup(void) ALWAYS_INLINE; +inline static +void serial_input_with_pullup(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static void serial_low(void) ALWAYS_INLINE; +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static void serial_high(void) ALWAYS_INLINE; +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_output(); + serial_high(); +} + +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_input_with_pullup(); + + // Enable INT0-INT3,INT6 + EIMSK |= EIMSK_BIT; +#if SERIAL_PIN_MASK == _BV(PE6) + // Trigger on falling edge of INT6 + EICRB &= EICRx_BIT; +#else + // Trigger on falling edge of INT0-INT3 + EICRA &= EICRx_BIT; +#endif +} + +// Used by the sender to synchronize timing with the reciver. +static void sync_recv(void) NO_INLINE; +static +void sync_recv(void) { + for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { + } + // This shouldn't hang if the target disconnects because the + // serial line will float to high if the target does disconnect. + while (!serial_read_pin()); +} + +// Used by the reciver to send a synchronization signal to the sender. +static void sync_send(void) NO_INLINE; +static +void sync_send(void) { + serial_low(); + serial_delay(); + serial_high(); +} + +// Reads a byte from the serial line +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { + uint8_t byte, i, p, pb; + + _delay_sub_us(READ_WRITE_START_ADJUST); + for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { + serial_delay_half1(); // read the middle of pulses + if( serial_read_pin() ) { + byte = (byte << 1) | 1; p ^= 1; + } else { + byte = (byte << 1) | 0; p ^= 0; + } + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + } + /* recive parity bit */ + serial_delay_half1(); // read the middle of pulses + pb = serial_read_pin(); + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + + *pterrcount += (p != pb)? 1 : 0; + + return byte; +} + +// Sends a byte with MSB ordering +void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; +void serial_write_chunk(uint8_t data, uint8_t bit) { + uint8_t b, p; + for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { + if(data & b) { + serial_high(); p ^= 1; + } else { + serial_low(); p ^= 0; + } + serial_delay(); + } + /* send parity bit */ + if(p & 1) { serial_high(); } + else { serial_low(); } + serial_delay(); + + serial_low(); // sync_send() / senc_recv() need raise edge +} + +static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +void serial_send_packet(uint8_t *buffer, uint8_t size) { + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + data = buffer[i]; + sync_send(); + serial_write_chunk(data,8); + } +} + +static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { + uint8_t pecount = 0; + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + sync_recv(); + data = serial_read_chunk(&pecount, 8); + buffer[i] = data; + } + return pecount == 0; +} + +inline static +void change_sender2reciver(void) { + sync_send(); //0 + serial_delay_half1(); //1 + serial_low(); //2 + serial_input_with_pullup(); //2 + serial_delay_half1(); //3 +} + +inline static +void change_reciver2sender(void) { + sync_recv(); //0 + serial_delay(); //1 + serial_low(); //3 + serial_output(); //3 + serial_delay_half1(); //4 +} + +static inline uint8_t nibble_bits_count(uint8_t bits) +{ + bits = (bits & 0x5) + (bits >> 1 & 0x5); + bits = (bits & 0x3) + (bits >> 2 & 0x3); + return bits; +} + +// interrupt handle to be used by the target device +ISR(SERIAL_PIN_INTERRUPT) { + +#ifndef SERIAL_USE_MULTI_TRANSACTION + serial_low(); + serial_output(); + SSTD_t *trans = Transaction_table; +#else + // recive transaction table index + uint8_t tid, bits; + uint8_t pecount = 0; + sync_recv(); + bits = serial_read_chunk(&pecount,7); + tid = bits>>3; + bits = (bits&7) != nibble_bits_count(tid); + if( bits || pecount> 0 || tid > Transaction_table_size ) { + return; + } + serial_delay_half1(); + + serial_high(); // response step1 low->high + serial_output(); + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); + SSTD_t *trans = &Transaction_table[tid]; + serial_low(); // response step2 ack high->low +#endif + + // target send phase + if( trans->target2initiator_buffer_size > 0 ) + serial_send_packet((uint8_t *)trans->target2initiator_buffer, + trans->target2initiator_buffer_size); + // target switch to input + change_sender2reciver(); + + // target recive phase + if( trans->initiator2target_buffer_size > 0 ) { + if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size) ) { + *trans->status = TRANSACTION_ACCEPTED; + } else { + *trans->status = TRANSACTION_DATA_ERROR; + } + } else { + *trans->status = TRANSACTION_ACCEPTED; + } + + sync_recv(); //weit initiator output to high +} + +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) +// +// Returns: +// TRANSACTION_END +// TRANSACTION_NO_RESPONSE +// TRANSACTION_DATA_ERROR +// this code is very time dependent, so we need to disable interrupts +#ifndef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_transaction(void) { + SSTD_t *trans = Transaction_table; +#else +int soft_serial_transaction(int sstd_index) { + if( sstd_index > Transaction_table_size ) + return TRANSACTION_TYPE_ERROR; + SSTD_t *trans = &Transaction_table[sstd_index]; +#endif + cli(); + + // signal to the target that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(SLAVE_INT_WIDTH_US); + +#ifndef SERIAL_USE_MULTI_TRANSACTION + // wait for the target response + serial_input_with_pullup(); + _delay_us(SLAVE_INT_RESPONSE_TIME); + + // check if the target is present + if (serial_read_pin()) { + // target failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + +#else + // send transaction table index + int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); + sync_send(); + _delay_sub_us(TID_SEND_ADJUST); + serial_write_chunk(tid, 7); + serial_delay_half1(); + + // wait for the target response (step1 low->high) + serial_input_with_pullup(); + while( !serial_read_pin() ) { + _delay_sub_us(2); + } + + // check if the target is present (step2 high->low) + for( int i = 0; serial_read_pin(); i++ ) { + if (i > SLAVE_INT_ACK_WIDTH + 1) { + // slave failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); + } +#endif + + // initiator recive phase + // if the target is present syncronize with it + if( trans->target2initiator_buffer_size > 0 ) { + if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, + trans->target2initiator_buffer_size) ) { + serial_output(); + serial_high(); + *trans->status = TRANSACTION_DATA_ERROR; + sei(); + return TRANSACTION_DATA_ERROR; + } + } + + // initiator switch to output + change_reciver2sender(); + + // initiator send phase + if( trans->initiator2target_buffer_size > 0 ) { + serial_send_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size); + } + + // always, release the line when not in use + sync_send(); + + *trans->status = TRANSACTION_END; + sei(); + return TRANSACTION_END; +} + +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index) { + SSTD_t *trans = &Transaction_table[sstd_index]; + cli(); + int retval = *trans->status; + *trans->status = 0;; + sei(); + return retval; +} +#endif + +#endif + +// Helix serial.c history +// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) +// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) +// (adjusted with avr-gcc 4.9.2) +// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) +// (adjusted with avr-gcc 4.9.2) +// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) +// (adjusted with avr-gcc 4.9.2) +// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) +// (adjusted with avr-gcc 7.3.0) +// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) +// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/claw44/serial.h b/keyboards/claw44/serial.h new file mode 100644 index 000000000000..7e0c0847a431 --- /dev/null +++ b/keyboards/claw44/serial.h @@ -0,0 +1,84 @@ +#ifndef SOFT_SERIAL_H +#define SOFT_SERIAL_H + +#include + +// ///////////////////////////////////////////////////////////////// +// Need Soft Serial defines in config.h +// ///////////////////////////////////////////////////////////////// +// ex. +// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 +// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 +// // 1: about 137kbps (default) +// // 2: about 75kbps +// // 3: about 39kbps +// // 4: about 26kbps +// // 5: about 20kbps +// +// //// USE Simple API (OLD API, compatible with let's split serial.c) +// ex. +// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +// #define SERIAL_MASTER_BUFFER_LENGTH 1 +// +// //// USE flexible API (using multi-type transaction function) +// #define SERIAL_USE_MULTI_TRANSACTION +// +// ///////////////////////////////////////////////////////////////// + + +#ifndef SERIAL_USE_MULTI_TRANSACTION +/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ +#if SERIAL_SLAVE_BUFFER_LENGTH > 0 +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +#endif +#if SERIAL_MASTER_BUFFER_LENGTH > 0 +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; +#endif + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); + +#endif // USE Simple API + +// Soft Serial Transaction Descriptor +typedef struct _SSTD_t { + uint8_t *status; + uint8_t initiator2target_buffer_size; + uint8_t *initiator2target_buffer; + uint8_t target2initiator_buffer_size; + uint8_t *target2initiator_buffer; +} SSTD_t; +#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) + +// initiator is transaction start side +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); +// target is interrupt accept side +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); + +// initiator resullt +#define TRANSACTION_END 0 +#define TRANSACTION_NO_RESPONSE 0x1 +#define TRANSACTION_DATA_ERROR 0x2 +#define TRANSACTION_TYPE_ERROR 0x4 +#ifndef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_transaction(void); +#else +int soft_serial_transaction(int sstd_index); +#endif + +// target status +// *SSTD_t.status has +// initiator: +// TRANSACTION_END +// or TRANSACTION_NO_RESPONSE +// or TRANSACTION_DATA_ERROR +// target: +// TRANSACTION_DATA_ERROR +// or TRANSACTION_ACCEPTED +#define TRANSACTION_ACCEPTED 0x8 +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index); +#endif + +#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/claw44/ssd1306.c b/keyboards/claw44/ssd1306.c new file mode 100644 index 000000000000..e32fc091c244 --- /dev/null +++ b/keyboards/claw44/ssd1306.c @@ -0,0 +1,346 @@ +#ifdef SSD1306OLED + +#include "ssd1306.h" +#include "i2c.h" +#include +#include "print.h" +#ifdef ADAFRUIT_BLE_ENABLE +#include "adafruit_ble.h" +#endif +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#endif +#include "sendchar.h" +#include "timer.h" + +extern const unsigned char font[] PROGMEM; + +// Set this to 1 to help diagnose early startup problems +// when testing power-on with ble. Turn it off otherwise, +// as the latency of printing most of the debug info messes +// with the matrix scan, causing keys to drop. +#define DEBUG_TO_SCREEN 0 + +//static uint16_t last_battery_update; +//static uint32_t vbat; +//#define BatteryUpdateInterval 10000 /* milliseconds */ + +// 'last_flush' is declared as uint16_t, +// so this must be less than 65535 +#define ScreenOffInterval 60000 /* milliseconds */ +#if DEBUG_TO_SCREEN +static uint8_t displaying; +#endif +static uint16_t last_flush; + +static bool force_dirty = true; + +// Write command sequence. +// Returns true on success. +static inline bool _send_cmd1(uint8_t cmd) { + bool res = false; + + if (i2c_start_write(SSD1306_ADDRESS)) { + xprintf("failed to start write to %d\n", SSD1306_ADDRESS); + goto done; + } + + if (i2c_master_write(0x0 /* command byte follows */)) { + print("failed to write control byte\n"); + + goto done; + } + + if (i2c_master_write(cmd)) { + xprintf("failed to write command %d\n", cmd); + goto done; + } + res = true; +done: + i2c_master_stop(); + return res; +} + +// Write 2-byte command sequence. +// Returns true on success +static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { + if (!_send_cmd1(cmd)) { + return false; + } + return _send_cmd1(opr); +} + +// Write 3-byte command sequence. +// Returns true on success +static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { + if (!_send_cmd1(cmd)) { + return false; + } + if (!_send_cmd1(opr1)) { + return false; + } + return _send_cmd1(opr2); +} + +#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} +#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} +#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} + +static void clear_display(void) { + matrix_clear(&display); + + // Clear all of the display bits (there can be random noise + // in the RAM on startup) + send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); + send_cmd3(ColumnAddr, 0, DisplayWidth - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < DisplayWidth; ++col) { + i2c_master_write(0); + } + } + + display.dirty = false; + +done: + i2c_master_stop(); +} + +#if DEBUG_TO_SCREEN +#undef sendchar +static int8_t capture_sendchar(uint8_t c) { + sendchar(c); + iota_gfx_write_char(c); + + if (!displaying) { + iota_gfx_flush(); + } + return 0; +} +#endif + +bool iota_gfx_init(bool rotate) { + bool success = false; + + i2c_master_init(); + send_cmd1(DisplayOff); + send_cmd2(SetDisplayClockDiv, 0x80); + send_cmd2(SetMultiPlex, DisplayHeight - 1); + + send_cmd2(SetDisplayOffset, 0); + + + send_cmd1(SetStartLine | 0x0); + send_cmd2(SetChargePump, 0x14 /* Enable */); + send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); + + if(rotate){ + // the following Flip the display orientation 180 degrees + send_cmd1(SegRemap); + send_cmd1(ComScanInc); + }else{ + // Flips the display orientation 0 degrees + send_cmd1(SegRemap | 0x1); + send_cmd1(ComScanDec); + } + + send_cmd2(SetComPins, 0x2); + send_cmd2(SetContrast, 0x8f); + send_cmd2(SetPreCharge, 0xf1); + send_cmd2(SetVComDetect, 0x40); + send_cmd1(DisplayAllOnResume); + send_cmd1(NormalDisplay); + send_cmd1(DeActivateScroll); + send_cmd1(DisplayOn); + + send_cmd2(SetContrast, 0); // Dim + + clear_display(); + + success = true; + + iota_gfx_flush(); + +#if DEBUG_TO_SCREEN + print_set_sendchar(capture_sendchar); +#endif + +done: + return success; +} + +bool iota_gfx_off(void) { + bool success = false; + + send_cmd1(DisplayOff); + success = true; + +done: + return success; +} + +bool iota_gfx_on(void) { + bool success = false; + + send_cmd1(DisplayOn); + success = true; + +done: + return success; +} + +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { + *matrix->cursor = c; + ++matrix->cursor; + + if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { + // We went off the end; scroll the display upwards by one line + memmove(&matrix->display[0], &matrix->display[1], + MatrixCols * (MatrixRows - 1)); + matrix->cursor = &matrix->display[MatrixRows - 1][0]; + memset(matrix->cursor, ' ', MatrixCols); + } +} + +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { + matrix->dirty = true; + + if (c == '\n') { + // Clear to end of line from the cursor and then move to the + // start of the next line + uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; + + while (cursor_col++ < MatrixCols) { + matrix_write_char_inner(matrix, ' '); + } + return; + } + + matrix_write_char_inner(matrix, c); +} + +void iota_gfx_write_char(uint8_t c) { + matrix_write_char(&display, c); +} + +void matrix_write(struct CharacterMatrix *matrix, const char *data) { + const char *end = data + strlen(data); + while (data < end) { + matrix_write_char(matrix, *data); + ++data; + } +} + +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { + char data_ln[strlen(data)+2]; + snprintf(data_ln, sizeof(data_ln), "%s\n", data); + matrix_write(matrix, data_ln); +} + +void iota_gfx_write(const char *data) { + matrix_write(&display, data); +} + +void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { + while (true) { + uint8_t c = pgm_read_byte(data); + if (c == 0) { + return; + } + matrix_write_char(matrix, c); + ++data; + } +} + +void iota_gfx_write_P(const char *data) { + matrix_write_P(&display, data); +} + +void matrix_clear(struct CharacterMatrix *matrix) { + memset(matrix->display, ' ', sizeof(matrix->display)); + matrix->cursor = &matrix->display[0][0]; + matrix->dirty = true; +} + +void iota_gfx_clear_screen(void) { + matrix_clear(&display); +} + +void matrix_render(struct CharacterMatrix *matrix) { + last_flush = timer_read(); + iota_gfx_on(); +#if DEBUG_TO_SCREEN + ++displaying; +#endif + + // Move to the home position + send_cmd3(PageAddr, 0, MatrixRows - 1); + send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < MatrixCols; ++col) { + const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); + + for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { + uint8_t colBits = pgm_read_byte(glyph + glyphCol); + i2c_master_write(colBits); + } + + // 1 column of space between chars (it's not included in the glyph) + //i2c_master_write(0); + } + } + + matrix->dirty = false; + +done: + i2c_master_stop(); +#if DEBUG_TO_SCREEN + --displaying; +#endif +} + +void iota_gfx_flush(void) { + matrix_render(&display); +} + +__attribute__ ((weak)) +void iota_gfx_task_user(void) { +} + +void iota_gfx_task(void) { + iota_gfx_task_user(); + + if (display.dirty|| force_dirty) { + iota_gfx_flush(); + force_dirty = false; + } + + /* + if (timer_elapsed(last_flush) > ScreenOffInterval) { + iota_gfx_off(); + } + */ +} + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { + force_dirty = true; + return true; +} + +#endif diff --git a/keyboards/claw44/ssd1306.h b/keyboards/claw44/ssd1306.h new file mode 100644 index 000000000000..ea8c9232805d --- /dev/null +++ b/keyboards/claw44/ssd1306.h @@ -0,0 +1,91 @@ +#pragma once + +#include +#include +#include "pincontrol.h" +#include "action.h" + +enum ssd1306_cmds { + DisplayOff = 0xAE, + DisplayOn = 0xAF, + + SetContrast = 0x81, + DisplayAllOnResume = 0xA4, + + DisplayAllOn = 0xA5, + NormalDisplay = 0xA6, + InvertDisplay = 0xA7, + SetDisplayOffset = 0xD3, + SetComPins = 0xda, + SetVComDetect = 0xdb, + SetDisplayClockDiv = 0xD5, + SetPreCharge = 0xd9, + SetMultiPlex = 0xa8, + SetLowColumn = 0x00, + SetHighColumn = 0x10, + SetStartLine = 0x40, + + SetMemoryMode = 0x20, + ColumnAddr = 0x21, + PageAddr = 0x22, + + ComScanInc = 0xc0, + ComScanDec = 0xc8, + SegRemap = 0xa0, + SetChargePump = 0x8d, + ExternalVcc = 0x01, + SwitchCapVcc = 0x02, + + ActivateScroll = 0x2f, + DeActivateScroll = 0x2e, + SetVerticalScrollArea = 0xa3, + RightHorizontalScroll = 0x26, + LeftHorizontalScroll = 0x27, + VerticalAndRightHorizontalScroll = 0x29, + VerticalAndLeftHorizontalScroll = 0x2a, +}; + +// Controls the SSD1306 128x32 OLED display via i2c + +#ifndef SSD1306_ADDRESS +#define SSD1306_ADDRESS 0x3C +#endif + +#define DisplayHeight 32 +#define DisplayWidth 128 + +#define FontHeight 8 +#define FontWidth 6 + +#define MatrixRows (DisplayHeight / FontHeight) +#define MatrixCols (DisplayWidth / FontWidth) + +struct CharacterMatrix { + uint8_t display[MatrixRows][MatrixCols]; + uint8_t *cursor; + bool dirty; +}; + +struct CharacterMatrix display; + +bool iota_gfx_init(bool rotate); +void iota_gfx_task(void); +bool iota_gfx_off(void); +bool iota_gfx_on(void); +void iota_gfx_flush(void); +void iota_gfx_write_char(uint8_t c); +void iota_gfx_write(const char *data); +void iota_gfx_write_P(const char *data); +void iota_gfx_clear_screen(void); + +void iota_gfx_task_user(void); + +void matrix_clear(struct CharacterMatrix *matrix); +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write(struct CharacterMatrix *matrix, const char *data); +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); +void matrix_write_P(struct CharacterMatrix *matrix, const char *data); +void matrix_render(struct CharacterMatrix *matrix); + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record); \ No newline at end of file diff --git a/keyboards/clueboard/2x1800/config.h b/keyboards/clueboard/2x1800/config.h index 1b47a9d65562..62821f7663be 100644 --- a/keyboards/clueboard/2x1800/config.h +++ b/keyboards/clueboard/2x1800/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D2, D3, D4, D5, D7, E0, E1, B0, E6, B3, B2 } #define UNUSED_PINS { D0, D1, D6, C5, C6, E4, E5, E7, F0, F1, A0, A1, A2, A3, A4, A5, A6, A7 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/clueboard/2x1800/keymaps/default/config.h b/keyboards/clueboard/2x1800/keymaps/default/config.h index 152e2f148759..dd48c69e36e2 100644 --- a/keyboards/clueboard/2x1800/keymaps/default/config.h +++ b/keyboards/clueboard/2x1800/keymaps/default/config.h @@ -16,6 +16,4 @@ #pragma once -#include "config_common.h" - // place overrides here diff --git a/keyboards/clueboard/60/rules.mk b/keyboards/clueboard/60/rules.mk index aada07352591..a0927025bb51 100644 --- a/keyboards/clueboard/60/rules.mk +++ b/keyboards/clueboard/60/rules.mk @@ -35,6 +35,7 @@ OPT_DEFS = # Options to pass to dfu-util when flashing DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 # Build Options # comment out to disable the options. diff --git a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c index 8d93715676af..cd9ae01188e9 100644 --- a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c +++ b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -// Helpful defines -#define xxxxxxx KC_NO - // 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 @@ -90,19 +87,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) /* Keymap _MI: MIDI layer (Advanced)*/ [_MI] = LAYOUT( - TO_BASE,MI_VEL_1,MI_VEL_2,MI_VEL_3,MI_VEL_4,MI_VEL_5,MI_VEL_6,MI_VEL_7,MI_VEL_8,MI_VEL_9,MI_VEL_10, MI_CHD, MI_CHU, xxxxxxx, xxxxxxx, xxxxxxx, - xxxxxxx, xxxxxxx, MI_Cs, MI_Ds, xxxxxxx, MI_Fs, MI_Gs, MI_As, xxxxxxx, MI_Cs_1, MI_Ds_1, xxxxxxx, MI_Fs_1, xxxxxxx, xxxxxxx, - MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, MI_G_1, xxxxxxx, - MI_SUS, xxxxxxx, MI_OCTD, MI_OCTU,MI_MODSD,MI_MODSU, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, MI_TRNSD,MI_TRNSU,MI_TRNS_0, MI_SUS, xxxxxxx, - xxxxxxx, xxxxxxx, xxxxxxx,xxxxxxx, MI_ALLOFF, MI_ALLOFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx), + TO_BASE,MI_VEL_1,MI_VEL_2,MI_VEL_3,MI_VEL_4,MI_VEL_5,MI_VEL_6,MI_VEL_7,MI_VEL_8,MI_VEL_9,MI_VEL_10, MI_CHD, MI_CHU, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, MI_Cs, MI_Ds, XXXXXXX, MI_Fs, MI_Gs, MI_As, XXXXXXX, MI_Cs_1, MI_Ds_1, XXXXXXX, MI_Fs_1, XXXXXXX, XXXXXXX, + MI_MOD, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_D_1, MI_E_1, MI_F_1, MI_G_1, XXXXXXX, + MI_SUS, XXXXXXX, MI_OCTD, MI_OCTU,MI_MODSD,MI_MODSU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MI_TRNSD,MI_TRNSU,MI_TRNS_0, MI_SUS, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, MI_ALLOFF, MI_ALLOFF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX), #elif defined(MIDI_ENABLE) && defined(MIDI_BASIC) /* Keymap _MI: MIDI layer (Basic)*/ [_MI] = LAYOUT( - TO_BASE, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, - xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, - xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, - xxxxxxx, xxxxxxx, MI_ON, MI_OFF, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, - xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx, xxxxxxx), + TO_BASE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, MI_ON, MI_OFF, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX), #endif }; diff --git a/keyboards/clueboard/66/keymaps/smt/keymap.c b/keyboards/clueboard/66/keymaps/smt/keymap.c index c1e3756909aa..89fc495919eb 100644 --- a/keyboards/clueboard/66/keymaps/smt/keymap.c +++ b/keyboards/clueboard/66/keymaps/smt/keymap.c @@ -16,9 +16,6 @@ enum planck_keycodes { DVORAK }; -// Helpful defines -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) diff --git a/keyboards/clueboard/66/keymaps/xyverz/keymap.c b/keyboards/clueboard/66/keymaps/xyverz/keymap.c index 916a448e26ca..3341ced918ab 100644 --- a/keyboards/clueboard/66/keymaps/xyverz/keymap.c +++ b/keyboards/clueboard/66/keymaps/xyverz/keymap.c @@ -24,8 +24,6 @@ enum planck_keycodes { }; // Useful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define FN_CAPS LT(_FL, KC_CAPS) // Tap for Caps Lock, Hold for Function Layer diff --git a/keyboards/clueboard/66/rev4/rules.mk b/keyboards/clueboard/66/rev4/rules.mk index 846b1eee0b74..4d20ff2e96e4 100644 --- a/keyboards/clueboard/66/rev4/rules.mk +++ b/keyboards/clueboard/66/rev4/rules.mk @@ -13,6 +13,7 @@ OPT_DEFS = # Options to pass to dfu-util when flashing DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 # Build Options # comment out to disable the options. diff --git a/keyboards/clueboard/66_hotswap/66_hotswap.h b/keyboards/clueboard/66_hotswap/66_hotswap.h index 9367c26337ba..a1ea44841f3a 100644 --- a/keyboards/clueboard/66_hotswap/66_hotswap.h +++ b/keyboards/clueboard/66_hotswap/66_hotswap.h @@ -3,3 +3,7 @@ #ifdef KEYBOARD_clueboard_66_hotswap_gen1 #include "gen1.h" #endif + +#ifdef KEYBOARD_clueboard_66_hotswap_prototype + #include "prototype.h" +#endif diff --git a/keyboards/clueboard/66_hotswap/config.h b/keyboards/clueboard/66_hotswap/config.h index 88adb57378d3..2c265c9470ad 100644 --- a/keyboards/clueboard/66_hotswap/config.h +++ b/keyboards/clueboard/66_hotswap/config.h @@ -16,7 +16,6 @@ along with this program. If not, see . */ #pragma once - #include "config_common.h" /* USB Device descriptor parameter */ diff --git a/keyboards/dztech/dz60rgb/chconf.h b/keyboards/clueboard/66_hotswap/gen1/chconf.h similarity index 100% rename from keyboards/dztech/dz60rgb/chconf.h rename to keyboards/clueboard/66_hotswap/gen1/chconf.h diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h index d5d36d4a1c2e..795adecd56e0 100644 --- a/keyboards/clueboard/66_hotswap/gen1/config.h +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -1,44 +1,141 @@ -#pragma once +/* + * Copyright 2017 skully + * + * 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 . + */ +#pragma once #include "config_common.h" -#define PRODUCT_ID 0x2390 +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED +#define PRODUCT_ID 0x2391 #define DEVICE_VER 0x0001 +#define MANUFACTURER Clueboard + +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 /* key matrix size */ #define MATRIX_ROWS 10 #define MATRIX_COLS 8 -/* ROWS: Top to bottom, COLS: Left to right +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * */ -#define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 } -#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 } -#define UNUSED_PINS +#define MATRIX_ROW_PINS { B11, A6, A3, A2, A1, B5, B6, C15, C14, C13 } +#define MATRIX_COL_PINS { B10, B2, B1, B0, A7, B4, B3, B7 } +#define UNUSED_PINS { A0, A8, A15, B12, B13, B14, B15 } +#define DIODE_DIRECTION COL2ROW -/* Speaker configuration +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 6 + +/* 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 + +/* + * 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 B7_AUDIO -#define NO_MUSIC_MODE -#define AUDIO_CLICKY +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG -/* Backlight configuration +/* 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 */ -#define BACKLIGHT_LEVELS 1 -/* Underlight configuration +/* 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 + + /* Backlight configuration */ -#define RGB_DI_PIN D7 -#define RGBLED_NUM 26 // Number of LEDs -#define RGBLIGHT_HUE_STEP 32 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 -#define RGBLIGHT_EFFECT_BREATHE_MAX 200 -#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2 -#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 // How many LEDs wide to light up -#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 16 // The led to start at -#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8 // How many LEDs to travel -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up +#define BACKLIGHT_LEVELS 10 + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define LED_DRIVER_ADDR_1 0b1110100 +#define I2C1_BANK GPIOB +#define I2C1_SCL 8 +#define I2C1_SDA 9 + +#define LED_DRIVER_COUNT 1 +#define LED_DRIVER_LED_COUNT 71 diff --git a/keyboards/clueboard/66_hotswap/gen1/gen1.c b/keyboards/clueboard/66_hotswap/gen1/gen1.c index 01f74bc50bcb..c70f223756ca 100644 --- a/keyboards/clueboard/66_hotswap/gen1/gen1.c +++ b/keyboards/clueboard/66_hotswap/gen1/gen1.c @@ -1,63 +1,186 @@ +/* Copyright 2017 Clueboard + * + * 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 . + */ #include "gen1.h" -#include -#include "backlight.h" -#include "print.h" +#include "is31fl3731-simple.h" void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); - - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1< + * + * 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 . + */ #pragma once #include "quantum.h" +/* + * These are shortcuts to help you work with the various layout options. If your + * keymap works with one of the LAYOUT_...() macros you are encouraged to use that + * and to contribute your keymap to the corresponding layout in + * `qmk_firmware/layouts/community`. + */ + /* Clueboard matrix layout * ,-----------------------------------------------------------. ,---. - * | 00| 01| 02| 03| 04| 05| 06| 07| 50| 51| 52| 53| 54| 56| | 57| + * | 00| 01| 02| 03| 04| 05| 06| 07| 50| 51| 52| 53| 54| 56 | | 57| * |-----------------------------------------------------------| |---| * | 10| 11| 12| 13| 14| 15| 16| 17| 60| 61| 62| 63| 64| 65| | 67| * |-----------------------------------------------------------| `---' * | 20| 21| 22| 23| 24| 25| 26| 27| 70| 71| 72| 73| 75| - * |-------------------------------------------------------------. - * | 30| 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 85| 86| - * |-----------------------------------------------------------------. - * | 40| 41| 42| 45| 46| 90| 92| 93| 94| 95| 96| 97| - * `-----------------------------------------------------------------' + * |--------------------------------------------------------------. + * | 30 | 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 85 |86| + * |------------------------------------------------------------------. + * | 40| 41| 42| 45| 46| 90| 92| 93| 94| 95|96| 97| + * `------------------------------------------------------------------' * ,-----------------------------------------------------------. ,---. * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins| * |-----------------------------------------------------------| |---| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del| * |-----------------------------------------------------------| `---' * |Caps | A| S| D| F| G| H| J| k| L| ;| '|Enter | - * |-------------------------------------------------------------. - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up | - * |-----------------------------------------------------------------. - * |Ctrl|Alt |Gui | Space| Space|Gui |Alt |Fn |Ctrl|Lft|Dwn|Rgt| - * `-----------------------------------------------------------------' + * |--------------------------------------------------------------. + * |Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| Up| + * |------------------------------------------------------------------. + * |Ctrl|Alt|Gui | Space| Space|Gui |Alt |Fn |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' */ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \ - k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \ - k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \ - k40, k41, k42, k45, k46, k90, k92, k93, k94, k95, k96, k97 \ + k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k57, \ + k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \ + k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \ + k40, k41, k42, k45, k46, k90, k92, k93, k94, k95, k96, k97 \ ) { \ - { k00, k01, k02, k03, k04, k05, k06, k07 }, \ - { k10, k11, k12, k13, k14, k15, k16, k17 }, \ - { k20, k21, k22, k23, k24, k25, k26, k27 }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \ - { k40, k41, k42, KC_NO, KC_NO, k45, k46, KC_NO }, \ - { k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \ - { k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \ - { k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \ - { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ - { k90, KC_NO, k92, k93, k94, k95, k96, k97 } \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, KC_NO, KC_NO, k45, k46, KC_NO }, \ + { k50, k51, k52, k53, k54, k55, KC_NO, k57 }, \ + { k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \ + { k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \ + { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ + { k90, KC_NO, k92, k93, k94, k95, k96, k97 } \ } #define LAYOUT_66_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k56, k57, \ - k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ - k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \ - k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \ - k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \ + k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, k57, \ + k10, k11, k12, k13, k14, k15, k16, k17, k60, k61, k62, k63, k64, k65, k67, \ + k20, k21, k22, k23, k24, k25, k26, k27, k70, k71, k72, k73, k75, \ + k30, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k85, k86, \ + k40, k41, k42, k46, k92, k93, k94, k95, k96, k97 \ ) { \ - { k00, k01, k02, k03, k04, k05, k06, k07 }, \ - { k10, k11, k12, k13, k14, k15, k16, k17 }, \ - { k20, k21, k22, k23, k24, k25, k26, k27 }, \ - { k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \ - { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \ - { k50, k51, k52, k53, k54, KC_NO, k56, k57 }, \ - { k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \ - { k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \ - { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ - { KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO }, \ + { k50, k51, k52, k53, k54, k55, KC_NO, k57 }, \ + { k60, k61, k62, k63, k64, k65, KC_NO, k67 }, \ + { k70, k71, k72, k73, KC_NO, k75, KC_NO, KC_NO }, \ + { k80, k81, k82, k83, KC_NO, k85, k86, KC_NO }, \ + { KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \ } diff --git a/keyboards/dztech/dz60rgb/halconf.h b/keyboards/clueboard/66_hotswap/gen1/halconf.h similarity index 100% rename from keyboards/dztech/dz60rgb/halconf.h rename to keyboards/clueboard/66_hotswap/gen1/halconf.h diff --git a/keyboards/clueboard/66_hotswap/gen1/info.json b/keyboards/clueboard/66_hotswap/gen1/info.json new file mode 100644 index 000000000000..bab110f3d50c --- /dev/null +++ b/keyboards/clueboard/66_hotswap/gen1/info.json @@ -0,0 +1,11 @@ +{ + "layouts": { + "LAYOUT": { + "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"}] + }, + + "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}, {"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}] + } + } +} diff --git a/keyboards/clueboard/66_hotswap/gen1/led.c b/keyboards/clueboard/66_hotswap/gen1/led.c new file mode 100644 index 000000000000..efbf532022af --- /dev/null +++ b/keyboards/clueboard/66_hotswap/gen1/led.c @@ -0,0 +1,21 @@ +/* + * Copyright 2017 skully + * + * 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 . +*/ + +#include "hal.h" +#include "backlight.h" +#include "led.h" +#include "printf.h" diff --git a/keyboards/clueboard/66_hotswap/gen1/matrix.c b/keyboards/clueboard/66_hotswap/gen1/matrix.c new file mode 100644 index 000000000000..c3e59b56460f --- /dev/null +++ b/keyboards/clueboard/66_hotswap/gen1/matrix.c @@ -0,0 +1,160 @@ +#include +#include +#include +#include "hal.h" +#include "timer.h" +#include "wait.h" +#include "printf.h" +#include "backlight.h" +#include "matrix.h" +#include "action.h" +#include "keycode.h" +#include + +/* + * #define MATRIX_ROW_PINS { PB11, PA6, PA3, PA2, PA1, PB5, PB6, PC15, PC14, PC13 } + * #define MATRIX_COL_PINS { PB10, PB2, PB1, PB0, PA7, PB4, PB3, PB7 } + */ +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_COLS]; +static bool debouncing = false; +static uint16_t debouncing_time = 0; + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +void matrix_init(void) { + printf("matrix init\n"); + //debug_matrix = true; + + // actual matrix setup + palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 4, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL); + + palSetPadMode(GPIOB, 11, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOA, 6, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOA, 3, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOA, 2, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOA, 1, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOB, 5, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOB, 6, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOC, 13, PAL_MODE_INPUT_PULLDOWN); + + memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t)); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) { + // actual matrix + for (int col = 0; col < MATRIX_COLS; col++) { + matrix_row_t data = 0; + + // strobe col { PB10, PB2, PB1, PB0, PA7, PB4, PB3, PB7 } + switch (col) { + case 0: palSetPad(GPIOB, 10); break; + case 1: palSetPad(GPIOB, 2); break; + case 2: palSetPad(GPIOB, 1); break; + case 3: palSetPad(GPIOB, 0); break; + case 4: palSetPad(GPIOA, 7); break; + case 5: palSetPad(GPIOB, 4); break; + case 6: palSetPad(GPIOB, 3); break; + case 7: palSetPad(GPIOB, 7); break; + } + + // need wait to settle pin state + wait_us(20); + + // read row data { PB11, PA6, PA3, PA2, PA1, PB5, PB6, PC15, PC14, PC13 } + data = ( + (palReadPad(GPIOB, 11) << 0 ) | + (palReadPad(GPIOA, 6) << 1 ) | + (palReadPad(GPIOA, 3) << 2 ) | + (palReadPad(GPIOA, 2) << 3 ) | + (palReadPad(GPIOA, 1) << 4 ) | + (palReadPad(GPIOB, 5) << 5 ) | + (palReadPad(GPIOB, 6) << 6 ) | + (palReadPad(GPIOC, 15) << 7 ) | + (palReadPad(GPIOC, 14) << 8 ) | + (palReadPad(GPIOC, 13) << 9 ) + ); + + // unstrobe col { B11, B10, B2, B1, A7, B0 } + switch (col) { + case 0: palClearPad(GPIOB, 10); break; + case 1: palClearPad(GPIOB, 2); break; + case 2: palClearPad(GPIOB, 1); break; + case 3: palClearPad(GPIOB, 0); break; + case 4: palClearPad(GPIOA, 7); break; + case 5: palClearPad(GPIOB, 4); break; + case 6: palClearPad(GPIOB, 3); break; + case 7: palClearPad(GPIOB, 7); break; + } + + if (matrix_debouncing[col] != data) { + matrix_debouncing[col] = data; + debouncing = true; + debouncing_time = timer_read(); + } + } + + if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { + for (int row = 0; row < MATRIX_ROWS; row++) { + matrix[row] = 0; + for (int col = 0; col < MATRIX_COLS; col++) { + matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col); + } + } + debouncing = false; + } + + matrix_scan_quantum(); + + return 1; +} + +bool matrix_is_on(uint8_t row, uint8_t col) { + return (matrix[row] & (1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# LED Configuration +LED_MATRIX_ENABLE = IS31FL3731 # Build Options # comment out to disable the options. # BACKLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes -COMMAND_ENABLE = no -NKRO_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) +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 +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +#CUSTOM_MATRIX = yes # Custom matrix file AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = yes -MIDI_ENABLE = no -UNICODE_ENABLE = no -BLUETOOTH_ENABLE = no +# SERIAL_LINK_ENABLE = yes diff --git a/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c b/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c index 94f2ec0c400a..6451cf0370bc 100644 --- a/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c +++ b/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c @@ -6,6 +6,30 @@ #define _FL 1 #define _CL 2 +enum custom_keycodes { + S_BSKTC = SAFE_RANGE, + S_ODEJY, + S_RCKBY, + S_DOEDR, + S_SCALE, + S_ONEUP, + S_COIN, + S_SONIC, + S_ZELDA +}; + +#ifdef AUDIO_ENABLE + float song_basketcase[][2] = SONG(BASKET_CASE); + float song_ode_to_joy[][2] = SONG(ODE_TO_JOY); + float song_rock_a_bye_baby[][2] = SONG(ROCK_A_BYE_BABY); + float song_doe_a_deer[][2] = SONG(DOE_A_DEER); + float song_scale[][2] = SONG(MUSIC_SCALE_SOUND); + float song_coin[][2] = SONG(COIN_SOUND); + float song_one_up[][2] = SONG(ONE_UP_SOUND); + float song_sonic_ring[][2] = SONG(SONIC_RING); + float song_zelda_puzzle[][2] = SONG(ZELDA_PUZZLE); +#endif + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ @@ -28,9 +52,72 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _CL: Control layer */ [_CL] = LAYOUT( - BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, RGB_TOG, RGB_VAI, \ - _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ + BL_STEP,S_ONEUP,S_SCALE,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, BL_TOGG, BL_INC, \ + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC, \ _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, \ - _______,_______,_______, RGB_MOD,RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), + _______,_______,_______, BL_BRTG,BL_BRTG, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), }; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + #ifdef AUDIO_ENABLE + case S_BSKTC: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_basketcase); + } + return false; + case S_ODEJY: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_ode_to_joy); + } + return false; + case S_RCKBY: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_rock_a_bye_baby); + } + return false; + case S_DOEDR: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_doe_a_deer); + } + return false; + case S_SCALE: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_scale); + } + return false; + case S_ONEUP: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_one_up); + } + return false; + case S_COIN: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_coin); + } + return false; + case S_SONIC: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_sonic_ring); + } + return false; + case S_ZELDA: + if (record->event.pressed) { + stop_all_notes(); + PLAY_SONG(song_zelda_puzzle); + } + return false; + #endif + } + return true; +} diff --git a/keyboards/clueboard/66_hotswap/prototype/config.h b/keyboards/clueboard/66_hotswap/prototype/config.h new file mode 100644 index 000000000000..7679d08e5236 --- /dev/null +++ b/keyboards/clueboard/66_hotswap/prototype/config.h @@ -0,0 +1,55 @@ +#pragma once +#include "config_common.h" + +#define PRODUCT_ID 0x2390 +#define DEVICE_VER 0x0001 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +// ROWS: Top to bottom, COLS: Left to right +/* Row pin configuration +* row: 0 1 2 3 4 5 6 7 8 9 +* pin: B2 C7 C6 B6 B5 B0 B3 D5 D3 D2 +*/ + +#define MATRIX_ROW_PINS { B2, C7, C6, B6, B5, B0, B3, D5, D3, D2 } +/* Column pin configuration + * col: 0 1 2 3 4 5 6 7 + * pin: F0 F1 F4 F5 F6 F7 E6 B1 + */ +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, E6, B1 } +#define UNUSED_PINS + +/* Speaker configuration + */ +#define B7_AUDIO +#define NO_MUSIC_MODE +#define AUDIO_CLICKY + +/* Space savings + */ +#define NO_ACTION_TAPPING + +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 1 + +/* Underlight configuration + */ +#define RGB_DI_PIN D7 +#define RGBLED_NUM 26 // Number of LEDs +#define RGBLIGHT_HUE_STEP 32 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#define RGBLIGHT_EFFECT_BREATHE_MAX 200 +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 666*2 +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 // How many LEDs wide to light up +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 16 // The led to start at +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 8 // How many LEDs to travel +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up diff --git a/keyboards/clueboard/66_hotswap/prototype/prototype.c b/keyboards/clueboard/66_hotswap/prototype/prototype.c new file mode 100644 index 000000000000..991d4b8faea1 --- /dev/null +++ b/keyboards/clueboard/66_hotswap/prototype/prototype.c @@ -0,0 +1,63 @@ +#include "prototype.h" +#include +#include "backlight.h" +#include "print.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); + + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1<event.pressed) { - switch (id) { - case 0: - PLAY_SONG(tone_startup); - break; - case 1: - PLAY_SONG(music_scale); - break; - case 2: - PLAY_SONG(tone_goodbye); - break; - } - } -}; - void matrix_init_user(void) { } @@ -53,7 +37,31 @@ void matrix_scan_user(void) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + switch (keycode) { + case SONG_SU: + if (record->event.pressed) { + PLAY_SONG(tone_startup); + } + + return false; + + case SONG_SC: + if (record->event.pressed) { + PLAY_SONG(music_scale); + } + + return false; + + case SONG_GB: + if (record->event.pressed) { + PLAY_SONG(tone_goodbye); + } + + return false; + + default: + return true; + } } void led_set_user(uint8_t usb_led) { diff --git a/keyboards/comet46/keymaps/default-rgbled/keymap.c b/keyboards/comet46/keymaps/default-rgbled/keymap.c index d446d50d0508..a576cc36b132 100644 --- a/keyboards/comet46/keymaps/default-rgbled/keymap.c +++ b/keyboards/comet46/keymaps/default-rgbled/keymap.c @@ -25,9 +25,6 @@ enum custom_keycodes { RAISE, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) diff --git a/keyboards/comet46/keymaps/default/config.h b/keyboards/comet46/keymaps/default/config.h index 7873cf5a72a3..ee02a94b7e1a 100644 --- a/keyboards/comet46/keymaps/default/config.h +++ b/keyboards/comet46/keymaps/default/config.h @@ -18,14 +18,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once + +// place overrides here -// #include "../../config.h" /* Use I2C or Serial */ #define USE_I2C #define SSD1306OLED - -#endif diff --git a/keyboards/comet46/keymaps/default/keymap.c b/keyboards/comet46/keymaps/default/keymap.c index c87492e4b948..9ef967646576 100644 --- a/keyboards/comet46/keymaps/default/keymap.c +++ b/keyboards/comet46/keymaps/default/keymap.c @@ -29,9 +29,6 @@ enum custom_keycodes { RAISE, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) diff --git a/keyboards/comet46/keymaps/satt/action_pseudo_lut.c b/keyboards/comet46/keymaps/satt/action_pseudo_lut.c index 0ac7133591f2..4a7cb3a3a2f5 100644 --- a/keyboards/comet46/keymaps/satt/action_pseudo_lut.c +++ b/keyboards/comet46/keymaps/satt/action_pseudo_lut.c @@ -1,4 +1,5 @@ #include "quantum.h" +#include "command.h" #include "action_pseudo_lut.h" static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE]; diff --git a/keyboards/comet46/ssd1306.c b/keyboards/comet46/ssd1306.c index 4330c8497db2..20c2738db774 100644 --- a/keyboards/comet46/ssd1306.c +++ b/keyboards/comet46/ssd1306.c @@ -13,7 +13,7 @@ #include "sendchar.h" #include "timer.h" -static const unsigned char font[] PROGMEM; +extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems // when testing power-on with ble. Turn it off otherwise, diff --git a/keyboards/contra/keymaps/dana/keymap.c b/keyboards/contra/keymaps/dana/keymap.c index f296805b0b9c..51fa9f75fb48 100644 --- a/keyboards/contra/keymaps/dana/keymap.c +++ b/keyboards/contra/keymaps/dana/keymap.c @@ -5,10 +5,6 @@ extern keymap_config_t keymap_config; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/contra/keymaps/default/config.h b/keyboards/contra/keymaps/default/config.h index a1635f2bab5f..d61ee2938e96 100644 --- a/keyboards/contra/keymaps/default/config.h +++ b/keyboards/contra/keymaps/default/config.h @@ -1,7 +1,5 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "config_common.h" #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(PLANCK_SOUND) @@ -25,7 +23,7 @@ /* enable basic MIDI features: - MIDI notes can be sent when in Music mode is on */ - + #define MIDI_BASIC /* enable advanced MIDI features: @@ -38,5 +36,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#endif \ No newline at end of file diff --git a/keyboards/contra/keymaps/msiu/config.h b/keyboards/contra/keymaps/msiu/config.h new file mode 100644 index 000000000000..8757eb70d453 --- /dev/null +++ b/keyboards/contra/keymaps/msiu/config.h @@ -0,0 +1,37 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * 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 2 diff --git a/keyboards/contra/keymaps/msiu/keymap.c b/keyboards/contra/keymaps/msiu/keymap.c new file mode 100644 index 000000000000..c68c2c7bbf66 --- /dev/null +++ b/keyboards/contra/keymaps/msiu/keymap.c @@ -0,0 +1,175 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _DVORAK, + _LOWER, + _RAISE, + _NUMB, + _FUNC, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + DVORAK, + LOWER, + RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,------------------------------------------------------------------------------------------. + * | Tab / Numb | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |-------------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc / Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | + * |-------------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift | Z | X | C | V | B | N | M | , | . | / |Enter | + * |-------------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Hyper | Alt | GUI |Lower | Func |Space |Raise | Left | Down | Up |Right | + * `------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_ortho_4x12( + LT(_NUMB, KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LCTL_T(KC_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_LCTL, KC_HYPR, KC_LALT, KC_LGUI, LOWER, MO(_FUNC), KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_DVORAK] = LAYOUT_ortho_4x12( + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, + _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = 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_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, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT + ), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = 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_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, QWERTY, DVORAK, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET + ), + + [_FUNC] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_NUMB] = LAYOUT_ortho_4x12( + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______ + ) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + // print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/contra/keymaps/msiu/readme.md b/keyboards/contra/keymaps/msiu/readme.md new file mode 100644 index 000000000000..80aba1095487 --- /dev/null +++ b/keyboards/contra/keymaps/msiu/readme.md @@ -0,0 +1,2 @@ +# The Default Contra Layout + diff --git a/keyboards/contra/keymaps/ryanm101/keymap.c b/keyboards/contra/keymaps/ryanm101/keymap.c index 70082a5a4f52..721a9a06eaf2 100644 --- a/keyboards/contra/keymaps/ryanm101/keymap.c +++ b/keyboards/contra/keymaps/ryanm101/keymap.c @@ -3,9 +3,6 @@ extern keymap_config_t keymap_config; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom Key Combos #define LCKSCR LCTL(LGUI(KC_Q)) //#define KC_CAD LCTL(LALT(KC_DEL)) // CTL+ALT+DEL (windows) diff --git a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk index 76d349920fc7..8ff095047200 100644 --- a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk +++ b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk @@ -12,9 +12,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode -UNICODEMAP_ENABLE = yes 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. PS2_USE_USART = yes API_SYSEX_ENABLE = no diff --git a/keyboards/converter/ibm_terminal/rules.mk b/keyboards/converter/ibm_terminal/rules.mk index 3fa8792464c8..a48038ccde23 100644 --- a/keyboards/converter/ibm_terminal/rules.mk +++ b/keyboards/converter/ibm_terminal/rules.mk @@ -58,7 +58,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode -UNICODEMAP_ENABLE = yes BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_USE_USART = yes diff --git a/keyboards/converter/modelm101/config.h b/keyboards/converter/modelm101/config.h new file mode 100644 index 000000000000..97b78614ce60 --- /dev/null +++ b/keyboards/converter/modelm101/config.h @@ -0,0 +1,123 @@ +/* +Copyright 2019 iw0rm3r + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER iw0rm3r +#define PRODUCT IBM Model M 101/102 +#define DESCRIPTION Controlled by AVR chip + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F7, F6, F5, F4, F3, F2, F1, F0 } +#define MATRIX_COL_PINS { C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, D6, D5, D4, D3, D2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed (5 is default) */ +#define DEBOUNCING_DELAY 5 + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION \ No newline at end of file diff --git a/keyboards/converter/modelm101/info.json b/keyboards/converter/modelm101/info.json new file mode 100644 index 000000000000..868cd89b1a60 --- /dev/null +++ b/keyboards/converter/modelm101/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "IBM Model M 101 ANSI/102 ISO", + "url": "https://github.com/iw0rm3r/qmk_firmware/tree/modelm101/keyboards/converter/modelm101", + "maintainer": "iw0rm3r", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Num Lock", "x":18.5, "y":1.5}, {"label":"/", "x":19.5, "y":1.5}, {"label":"*", "x":20.5, "y":1.5}, {"label":"-", "x":21.5, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"7", "x":18.5, "y":2.5}, {"label":"8", "x":19.5, "y":2.5}, {"label":"9", "x":20.5, "y":2.5}, {"label":"+", "x":21.5, "y":2.5, "h":2}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.5}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"~", "x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"4", "x":18.5, "y":3.5}, {"label":"5", "x":19.5, "y":3.5}, {"label":"6", "x":20.5, "y":3.5}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"|", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"1", "x":18.5, "y":4.5}, {"label":"2", "x":19.5, "y":4.5}, {"label":"3", "x":20.5, "y":4.5}, {"label":"Enter", "x":21.5, "y":4.5, "h":2}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}, {"label":"0", "x":18.5, "y":5.5, "w":2}, {"label":".", "x":20.5, "y":5.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/converter/modelm101/keymaps/default/config.h b/keyboards/converter/modelm101/keymaps/default/config.h new file mode 100644 index 000000000000..779e5a858f9f --- /dev/null +++ b/keyboards/converter/modelm101/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 iw0rm3r + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/converter/modelm101/keymaps/default/keymap.c b/keyboards/converter/modelm101/keymaps/default/keymap.c new file mode 100644 index 000000000000..644e9a5ef82e --- /dev/null +++ b/keyboards/converter/modelm101/keymaps/default/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2019 iw0rm3r + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base layer */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/converter/modelm101/keymaps/default/readme.md b/keyboards/converter/modelm101/keymaps/default/readme.md new file mode 100644 index 000000000000..fb91a8ebe520 --- /dev/null +++ b/keyboards/converter/modelm101/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for modelm101 \ No newline at end of file diff --git a/keyboards/converter/modelm101/keymaps/iw0rm3r/config.h b/keyboards/converter/modelm101/keymaps/iw0rm3r/config.h new file mode 100644 index 000000000000..779e5a858f9f --- /dev/null +++ b/keyboards/converter/modelm101/keymaps/iw0rm3r/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 iw0rm3r + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/converter/modelm101/keymaps/iw0rm3r/keymap.c b/keyboards/converter/modelm101/keymaps/iw0rm3r/keymap.c new file mode 100644 index 000000000000..26ced801e5a6 --- /dev/null +++ b/keyboards/converter/modelm101/keymaps/iw0rm3r/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2019 iw0rm3r + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base layer */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, KC_PPLS, + KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + 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_P1, KC_P2, KC_P3, KC_CAPS, + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_APP, KC_PDOT + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/converter/modelm101/keymaps/iw0rm3r/readme.md b/keyboards/converter/modelm101/keymaps/iw0rm3r/readme.md new file mode 100644 index 000000000000..17b0f40da276 --- /dev/null +++ b/keyboards/converter/modelm101/keymaps/iw0rm3r/readme.md @@ -0,0 +1,5 @@ +# This is my personal keymap for modelm101 + +Caps Lock is mapped as LGUI (Windows key). +Num Enter is mapped as Caps Lock. +Num0 is mapped as App key (context menu). \ No newline at end of file diff --git a/keyboards/converter/modelm101/modelm101.c b/keyboards/converter/modelm101/modelm101.c new file mode 100644 index 000000000000..c2204bea660e --- /dev/null +++ b/keyboards/converter/modelm101/modelm101.c @@ -0,0 +1,67 @@ +/* Copyright 2019 iw0rm3r + * + * 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 . + */ +#include "modelm101.h" + +void keyboard_pre_init_kb(void) { + /* Setting status LEDs pins to output and +5V (off) */ + setPinOutput(B4); + setPinOutput(B5); + setPinOutput(B6); + writePinHigh(B4); + writePinHigh(B5); + writePinHigh(B6); +} + +void matrix_init_kb(void) { + /* put your keyboard start-up code here + * runs once when the firmware starts up */ + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + /* put your looping keyboard code here + * runs every cycle (a lot) */ + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + /* put your per-action keyboard code here + * runs for every action, just before processing by the firmware */ + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1<. + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * The first section contains "names" for physical keys of the keyboard + * and defines their position on the board. + * The second section defines position of the keys on the switch matrix + * (where COLUMNS and ROWS crosses). */ + +#define LAYOUT( \ + K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, \ + \ + K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, K4S, K4T, K4U, \ + K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, K3R, K3S, K3T, K3U, \ + K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2O, K2P, K2Q, \ + K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \ + K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, K0J \ +) \ +{ \ +/* 00 */ { KC_NO, KC_NO, K5A, K1B, K5E, K2F, K5F, K2G, K5G, KC_NO, K2L, KC_NO, K0I, K0J, K1N, K0B }, \ +/* 01 */ { KC_NO, K1A, K3A, K2A, K5D, K3F, K4N, K3G, K3M, K5H, K3L, K2O, K2P, K2Q, KC_NO, KC_NO }, \ +/* 02 */ { K0A, KC_NO, K4A, K5B, K5C, K4F, K5J, K4G, K4M, K5I, K4L, K3O, K4O, K4Q, K4P, KC_NO }, \ +/* 03 */ { KC_NO, KC_NO, K4B, K4C, K4D, K4E, K5K, K4H, K4I, K4J, K4K, K5L, K5M, K3Q, K3P, K5N }, \ +/* 04 */ { KC_NO, KC_NO, K3B, K3C, K3D, K3E, KC_NO, K3H, K3I, K3J, K3K, K3R, K3S, K3T, K3U, K5O }, \ +/* 05 */ { KC_NO, KC_NO, K2B, K2C, K2D, K2E, K3N, K2H, K2I, K2J, K2K, K1O, K1P, K1Q, K1R, KC_NO }, \ +/* 06 */ { K0E, K1M, K1C, K1D, K1E, K1F, K2N, K1I, K1J, K1K, K2M, K4R, K4S, K4T, K5P, KC_NO }, \ +/* 07 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K1G, K0C, K1H, KC_NO, KC_NO, K1L, K0G, K0H, K4U, K0F, K0D }, \ +} +/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ \ No newline at end of file diff --git a/keyboards/converter/modelm101/readme.md b/keyboards/converter/modelm101/readme.md new file mode 100644 index 000000000000..5355c8007142 --- /dev/null +++ b/keyboards/converter/modelm101/readme.md @@ -0,0 +1,42 @@ +# modelm101 + +![IBM Model M 101 ANSI/102 ISO](https://i.imgur.com/DAE3W7g.jpg) + +This is a configuration for the QMK firmware for reversible conversion of IBM's Model M keyboards (common 101-key ANSI and 102-key ISO models) from stock, power-hungry controller, to a modern one, running the USB bus. +Configuration is build for the Atmel AT90USB1286 controller, which you can easily use on the Teensy 2.0++ board (produced by PJRC). +Project is heavely based on 2 other projects: +1. Teensy 2.0++-based custom Model M controller running TMK firmware ('modelm" by [lmorchard](https://blog.lmorchard.com/2016/02/21/modelm-controller/)); - had a few issues. +2. Teensy 2.0++-based custom Model M 122-key controller running QMK firmware ("ibm122m" by [lukexorz](https://github.com/lukexorz)); - had wrong layout for 101/102-key boards and no status LED support. + +For this conversion you will need: +1. Teensy 2.0++ dev board itself (can be used a different dev board, but it will require some changes in configuration); +2. Ribbon connectors to connect the membrane to a dev board. Depending on your Model M variation, you will need 1 Trio-mate 16pin connector (6-520315-6 or 6-520415-6) and 1 Trio-mate 8pin connector (5-120628-8 or 5-520314-8), or 2 Trio-mate 16pin connectors; +3. Full-sized breadboard (without power rails; half-size should do, but full-sized one looks more native) or a PCB to wire everything up; +4. A bunch of jumper wires; +5. mini-USB male cable with any USB socket you want to use to connect Teensy inside the keyboard to your PC (I use short mini-USB male to mini-USB female cable); +6. (optional) Resistors for connecting status LEDs if your LED PCB doesn't have any; +7. (optional) Double-sided tape to fix USB socket on or inside the keyboard case. + +Pins of the Teensy board you should use by default: +``` +Columns: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 +Pins: C7 C6 C5 C4 C3 C2 C1 C0 E1 E0 D7 D6 D5 D4 D3 D2 +-------------------------------------------------------- +Rows: 1 2 3 4 5 6 7 8 +Pins: F7 F6 F5 F4 F3 F2 F1 F0 +-------------------------------------------------------- +Status LEDs: CapsLock +5V ScrollLock NumLock +Pins: B6 5V B5 B4 +``` + +Please note that some versions of Model M have LED connected with a ribbon cable, and not with separate wires. + +Keyboard Maintainer: [iw0rm3r](https://github.com/iw0rm3r) +Hardware Supported: Teensy 2.0++ board by PJRC +Hardware Availability: https://www.pjrc.com/store/teensypp.html + +Make example for this keyboard (after setting up your build environment): + + make converter/modelm101:default:teensy + +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). diff --git a/keyboards/converter/modelm101/rules.mk b/keyboards/converter/modelm101/rules.mk new file mode 100644 index 000000000000..620526971519 --- /dev/null +++ b/keyboards/converter/modelm101/rules.mk @@ -0,0 +1,81 @@ +# MCU name +MCU = at90usb1286 +#MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = halfkay + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +#OPT_DEFS += -DBOOTLOADER_SIZE=1024 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/converter/numeric_keypad_IIe/config.h b/keyboards/converter/numeric_keypad_IIe/config.h new file mode 100644 index 000000000000..8cf0eaa40fdc --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/config.h @@ -0,0 +1,101 @@ +/* +Copyright 2019 Adam Newbold + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Apple Inc. +#define PRODUCT Numeric Keypad IIe +#define DESCRIPTION "Numeric Keypad IIe, A2M2003" + +/* + +Pin Mappings +============ + +Dsub-15 Connection +------------------ + + Dsub-15 (female) + ,-------------------------. + \ 08 07 06 05 04 03 02 01 / + \ 15 14 13 12 11 10 09 / + `---------------------' + +Header Pins +----------- + _____________________________________ +| | +| 11 10 9 8 7 6 5 4 3 2 1 | +|_____________________________________| + + +Header / Matrix +--------------- + +Pin Name Description +-------------------------------------------------------------- +1,2,5,3,4,6 Y0-Y5 Y-direction key-matrix connections +7 NC +9,11,10,8 X4-X7 X-direction key-matrix connections + + +Microcontroller Configuration +----------------------------- + +(Pins are for an Arduino Micro) + ++-----------------------------------+ +| Dsub-15 | Header | Matrix | Micro | +|---------+--------+--------+-------| +| 12 | 11 | X5 | B0 | +| 11 | 10 | X6 | D3 | +| 10 | 9 | X4 | B2 | +| 9 | 8 | X7 | D2 | +| NC | 7 | NC | -- | +| 7 | 6 | Y5 | E6 | +| 6 | 5 | Y2 | D4 | +| 5 | 4 | Y4 | D7 | +| 3 | 3 | Y3 | C6 | +| 2 | 2 | Y1 | D0 | +| 1 | 1 | Y0 | D1 | ++-----------------------------------+ + +Note: Dsub-15 pins 4, 8, 13, 14, and 15 are unused + +Reference +--------- + +https://deskthority.net/wiki/Apple_Numeric_Keypad_IIe +https://geekhack.org/index.php?topic=78048.0 +http://wiki.apple2.org/index.php?title=Pinouts#Apple_.2F.2Fe_Numeric_Keypad_connector + +*/ + +#define MATRIX_ROWS 4 +#define MATRIX_COLS 6 +#define MATRIX_ROW_PINS { B0, B2, D2, D3 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6 } +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW +#define SOFT_SERIAL_PIN D0 +#define DEBOUNCING_DELAY 5 diff --git a/keyboards/converter/numeric_keypad_IIe/info.json b/keyboards/converter/numeric_keypad_IIe/info.json new file mode 100644 index 000000000000..f1990698ae1c --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Numeric Keypad IIe", + "url": "", + "maintainer": "qmk", + "width": 7.5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"7", "x":2, "y":0}, {"label":"8", "x":3, "y":0}, {"label":"9", "x":4, "y":0}, {"label":"(", "x":5.5, "y":0}, {"label":")", "x":6.5, "y":0}, {"label":"\u2190", "x":0, "y":1}, {"label":"4", "x":2, "y":1}, {"label":"5", "x":3, "y":1}, {"label":"6", "x":4, "y":1}, {"label":"\u2212", "x":5.5, "y":1}, {"label":"\u00f7", "x":6.5, "y":1}, {"label":"\u2192", "x":0, "y":2}, {"label":"1", "x":2, "y":2}, {"label":"2", "x":3, "y":2}, {"label":"3", "x":4, "y":2}, {"label":"+", "x":5.5, "y":2}, {"label":"\u00d7", "x":6.5, "y":2}, {"label":"Space", "x":0, "y":3}, {"label":"0", "x":1.5, "y":3, "w":1.5}, {"label":",", "x":3, "y":3}, {"label":".", "x":4, "y":3}, {"label":"Ret", "x":5.5, "y":3}, {"label":"Print", "x":6.5, "y":3}] + } + } +} diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/default/config.h b/keyboards/converter/numeric_keypad_IIe/keymaps/default/config.h new file mode 100644 index 000000000000..667668959a3f --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Adam Newbold + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/default/keymap.c b/keyboards/converter/numeric_keypad_IIe/keymaps/default/keymap.c new file mode 100644 index 000000000000..a8f45535569a --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/keymaps/default/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2019 Adam Newbold + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + +-------+ +-------+-------+-------+ +-------+-------+ + | Esc | | 7 | 8 | 9 | | ( | ) | + +-------+ +-------+-------+-------+ +-------+-------+ + | <-- | | 4 | 5 | 6 | | - | / | + +-------+ +-------+-------+-------+ +-------+-------+ + | --> | | 1 | 2 | 3 | | + | * | + +-------+ +--+-------+-------+-------+ +-------+-------+ + | Space | | 0 | , | . | | Ret | Print | + +-------+ +----------+-------+-------+ +-------+-------+ +*/ + [0] = LAYOUT( + KC_ESCAPE, KC_KP_7, KC_KP_8, KC_KP_9, KC_LEFT_PAREN, KC_RIGHT_PAREN, \ + KC_LEFT, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, KC_KP_SLASH, \ + KC_RIGHT, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, KC_KP_ASTERISK, \ + KC_SPACE, KC_KP_0, KC_KP_COMMA, KC_KP_DOT, KC_RETURN, KC_QUESTION \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void keyboard_post_init_user(void) { + +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/default/readme.md b/keyboards/converter/numeric_keypad_IIe/keymaps/default/readme.md new file mode 100644 index 000000000000..c58b09d156c7 --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Numeric Keypad //e Default Keymap + +All keys perform their default functions displayed on the stock keycaps. Note that the "Print" key presses a question mark (?), which was the default behavior on the Apple //e (with ? the shorthand for the AppleSoft BASIC PRINT command). diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/config.h b/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/config.h new file mode 100644 index 000000000000..667668959a3f --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Adam Newbold + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/keymap.c b/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/keymap.c new file mode 100644 index 000000000000..e0f04557c64c --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 Adam Newbold + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + +-------+ +-------+-------+-------+ +-------+-------+ + | Esc | | 7 | 8 | 9 | | ( | ) | + +-------+ +-------+-------+-------+ +-------+-------+ + | <-- | | 4 | 5 | 6 | | - | / | + +-------+ +-------+-------+-------+ +-------+-------+ + | --> | | 1 | 2 | 3 | | + | * | + +-------+ +--+-------+-------+-------+ +-------+-------+ + | Space | | 0 | , | . | | Ret | Print | + +-------+ +----------+-------+-------+ +-------+-------+ +*/ + [0] = LAYOUT( + KC__MUTE, KC_KP_7, KC_KP_8, KC_KP_9, KC_LEFT_PAREN, KC_RIGHT_PAREN, \ + KC__VOLDOWN, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, KC_KP_SLASH, \ + KC__VOLUP, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, KC_KP_ASTERISK, \ + MO(1), KC_KP_0, KC_KP_COMMA, KC_KP_DOT, KC_RETURN, KC_QUESTION \ + ), + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_BRMD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_BRMU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void keyboard_post_init_user(void) { + +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/readme.md b/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/readme.md new file mode 100644 index 000000000000..0bccfdb6cf81 --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/readme.md @@ -0,0 +1,28 @@ +# @newbold's layout for the Numeric Keypad IIe + +Includes the standard layout for all keys except for the left-most column, which is remapped to these keys: + + +-----------------+ + | Mute | + +-----------------+ + | Volume Down | + +-----------------+ + | Volume Up | + +-----------------+ + | Function | + +-----------------+ + + With Function held down: + + +-----------------+ + | Mute | + +-----------------+ + | Brightness Down | + +-----------------+ + | Brightness Up | + +-----------------+ + | Function | + +-----------------+ + + And also with Function held down, "Print" (the lower right key) will trigger RESET (putting the controller into bootloader mode so it can be flashed). + \ No newline at end of file diff --git a/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.c b/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.c new file mode 100644 index 000000000000..c29d85d488ef --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Adam Newbold + * + * 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 . + */ +#include "numeric_keypad_IIe.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.h b/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.h new file mode 100644 index 000000000000..8892b5553b79 --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.h @@ -0,0 +1,30 @@ +/* Copyright Adam Newbold + * + * 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 . + */ + +#pragma once +#include "quantum.h" + +#define LAYOUT( \ + K_ESC, K_7, K_8, K_9, K_LEFT_PARENS, K_RIGHT_PARENS, \ + K_LEFT, K_4, K_5, K_6, K_MINUS, K_DIVIDE, \ + K_RIGHT, K_1, K_2, K_3, K_PLUS, K_MULTIPLY, \ + K_SPACE, K_0, K_COMMA, K_DOT, K_RETURN, K_PRINT \ +){ \ + { K_RIGHT_PARENS, K_ESC, K_4, K_5, K_6, K_7 },\ + { K_DIVIDE, K_LEFT, K_0, K_1, K_2, K_3 },\ + { K_PRINT, K_SPACE, K_LEFT_PARENS, K_MINUS, K_RETURN, K_COMMA },\ + { K_MULTIPLY, K_RIGHT, K_8, K_9, K_DOT, K_PLUS },\ +} diff --git a/keyboards/converter/numeric_keypad_IIe/readme.md b/keyboards/converter/numeric_keypad_IIe/readme.md new file mode 100644 index 000000000000..9eba41610a84 --- /dev/null +++ b/keyboards/converter/numeric_keypad_IIe/readme.md @@ -0,0 +1,16 @@ +# Numeric Keypad IIe + +![Numeric Keypad IIe](https://upload.wikimedia.org/wikipedia/commons/3/3b/Apple_Numeric_Keypad_IIe.jpg) + +This is a conversion project for the Numeric Keypad IIe, model A2M2003. This was an external keypad that connected to the Apple //e's motherboard (and as such, it lacked any kind of onboard controller). + +The reference conversion setup uses the keyboard's DB15 (VGA) fixed cable connected to a DB15 wiring terminal with breakout board ([this one](https://www.amazon.com/gp/product/B07437293Y/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1), specifically) and wired to an [Arduino Micro](https://store.arduino.cc/usa/arduino-micro). + +Keyboard Maintainer: [Adam Newbold](https://github.com/newbold) +Hardware Supported: Internal Numeric Keypad IIe PCB (Apple part 820.0081.c), ATmega32U4 microcontroller + +Make example for this keyboard (after setting up your build environment): + + make converter/numeric_keypad_IIe: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). diff --git a/keyboards/40percentclub/mf68_ble/rules.mk b/keyboards/converter/numeric_keypad_IIe/rules.mk similarity index 89% rename from keyboards/40percentclub/mf68_ble/rules.mk rename to keyboards/converter/numeric_keypad_IIe/rules.mk index 2ca811833c7e..f61a7d4501b8 100644 --- a/keyboards/40percentclub/mf68_ble/rules.mk +++ b/keyboards/converter/numeric_keypad_IIe/rules.mk @@ -12,8 +12,7 @@ MCU = atmega32u4 # does not *change* the processor frequency - it should merely be updated to # reflect the processor speed set externally so that the code can use accurate # software delays. -F_CPU = 8000000 - +F_CPU = 16000000 # # LUFA specific @@ -37,7 +36,6 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Bootloader selection # Teensy halfkay # Pro Micro caterina @@ -47,7 +45,6 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # atmega32a bootloadHID BOOTLOADER = caterina - # If you don't know the bootloader type, then you can specify the # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line # Teensy halfKay 512 @@ -57,11 +54,10 @@ BOOTLOADER = caterina # USBaspLoader 2048 # OPT_DEFS += -DBOOTLOADER_SIZE=4096 - # Build Options # 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) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -71,9 +67,10 @@ 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 on B7 by default -MIDI_ENABLE = no # MIDI controls +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - -BLUETOOTH = AdafruitBLE +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/converter/palm_usb/readme.md b/keyboards/converter/palm_usb/readme.md index 17ba329dade2..850005d9ea3c 100644 --- a/keyboards/converter/palm_usb/readme.md +++ b/keyboards/converter/palm_usb/readme.md @@ -23,9 +23,10 @@ qmk because the Arduino softserial library uses different pins from QMK. I've wired the pro micro hardware as follows. -Label| TX0,RX1,GND,GND,2 ,3 ,4 ,5 ,6 ,7 -Palm | , , * ,GND,VCC,RX ,NC ,RTS,nc ,DCD -MCU | ,D1 ,D0 , ,C6 , ,E6 +| Label | TX0 | RX1 | GND | GND | 2 | 3 | 4 | 5 | 6 | 7 | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | +| Palm | | | * | GND | VCC | RX | NC | RTS | NC | DCD | +| MCU | | | | | D1 | D0 | | C6 | | E6 | \* The RX line from the keyboard should be conected to a ~10K ohm pull down resistor to ground. RX --|--3 diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk index 8dfc2ca4d719..7374fd955f96 100644 --- a/keyboards/converter/palm_usb/rules.mk +++ b/keyboards/converter/palm_usb/rules.mk @@ -22,7 +22,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode -UNICODEMAP_ENABLE = no BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/converter/sun_usb/rules.mk b/keyboards/converter/sun_usb/rules.mk index 22311c3d4c73..db6b5c7ee406 100644 --- a/keyboards/converter/sun_usb/rules.mk +++ b/keyboards/converter/sun_usb/rules.mk @@ -22,7 +22,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode -UNICODEMAP_ENABLE = yes BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/converter/usb_usb/config.h b/keyboards/converter/usb_usb/config.h index 1cab3c1c3c57..fdaf42eda49d 100644 --- a/keyboards/converter/usb_usb/config.h +++ b/keyboards/converter/usb_usb/config.h @@ -37,7 +37,7 @@ along with this program. If not, see . #define MATRIX_COLS 16 /* matrix scanning is done in custom_matrix.cpp */ -#define DIODE_DIRECTION CUSTOM_MATRIX +//#define DIODE_DIRECTION /* * Feature disable options diff --git a/keyboards/converter/usb_usb/custom_matrix.cpp b/keyboards/converter/usb_usb/custom_matrix.cpp index fba107c7cbac..6f381aabf405 100644 --- a/keyboards/converter/usb_usb/custom_matrix.cpp +++ b/keyboards/converter/usb_usb/custom_matrix.cpp @@ -98,6 +98,7 @@ extern "C" kbd2.SetReportParser(0, (HIDReportParser*)&kbd_parser2); kbd3.SetReportParser(0, (HIDReportParser*)&kbd_parser3); kbd4.SetReportParser(0, (HIDReportParser*)&kbd_parser4); + matrix_init_quantum(); } static void or_report(report_keyboard_t report) { @@ -115,6 +116,24 @@ extern "C" } } + __attribute__ ((weak)) + void matrix_init_kb(void) { + matrix_init_user(); + } + + __attribute__ ((weak)) + void matrix_init_user(void) { + } + + __attribute__ ((weak)) + void matrix_scan_kb(void) { + matrix_scan_user(); + } + + __attribute__ ((weak)) + void matrix_scan_user(void) { + } + uint8_t matrix_scan(void) { static uint16_t last_time_stamp1 = 0; static uint16_t last_time_stamp2 = 0; @@ -169,6 +188,7 @@ extern "C" keyboard_set_leds(host_keyboard_leds()); } } + matrix_scan_quantum(); return 1; } diff --git a/keyboards/converter/usb_usb/keymaps/default/config.h b/keyboards/converter/usb_usb/keymaps/default/config.h index 7fa3bf328ec9..271f48d0011b 100644 --- a/keyboards/converter/usb_usb/keymaps/default/config.h +++ b/keyboards/converter/usb_usb/keymaps/default/config.h @@ -1,6 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" - -#endif +// place overrides here diff --git a/keyboards/coseyfannitutti/mullet/config.h b/keyboards/coseyfannitutti/mullet/config.h new file mode 100644 index 000000000000..527294e51ad2 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/config.h @@ -0,0 +1,172 @@ +/* +Copyright 2019 COSEYFANNITUTTI + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6969 +#define DEVICE_VER 0x0001 +#define MANUFACTURER coseyfannitutti +#define PRODUCT mullet +#define DESCRIPTION 65% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, B0, F0, F1 } +#define MATRIX_COL_PINS { B2, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D2, D3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D5 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + diff --git a/keyboards/coseyfannitutti/mullet/info.json b/keyboards/coseyfannitutti/mullet/info.json new file mode 100644 index 000000000000..a6088863336b --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "mullet", + "url": "https://github.com/coseyfannitutti/mullet", + "maintainer": "coseyfannitutti", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "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":"Insert", "x":15, "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":"Page Up", "x":15, "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":"Page Down", "x":15, "y":2}, {"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":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "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":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c b/keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c new file mode 100644 index 000000000000..21ca2ffb636a --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/keymaps/alternate/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + /* Qwerty + * .---------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Del | + * |---------------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | PgUp| + * |---------------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgDn| + * |---------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | Fn | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | Space | RAlt | Fn |||||Left |Down |Right| + * '---------------------------------------------------------------------------------------------' + */ + + /* FnLayer + * .---------------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Delete | | + * |---------------------------------------------------------------------------------------------+ + * | Tab |STATC|BRTHE|RNBOW|RESET| | | | | | |PrScr| | \ | Home| + * |---------------------------------------------------------------------------------------------+ + * | Caps |RGBH+|RGBS+|RGBB+| | | | | | | | | Enter | End | + * |---------------------------------------------------------------------------------------------+ + * | Shift |RGBH-|RGBS-|RGBB-| | | | |RGBM-|RGBM+|RGBTG| Shift |VolUp| | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | | RAlt | Fn ||||| |VolDn| | + * '---------------------------------------------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_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_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(_FL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc delete */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, + /* tab Q W E R T Y U I O P [ ] \ pg up */ + KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_BSLS, KC_HOME, + /* caps A S D F G H J K L ; ' enter pg dn */ + KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_END, + /* shift Z X C V B N M , . / shift up fn */ + KC_LSFT, RGB_HUD, RGB_SAD, RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,RGB_RMOD, RGB_MOD, RGB_TOG, KC_RSFT, KC_VOLU, KC_TRNS, + /* ctrl win alt space alt fn left down right */ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c b/keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c new file mode 100644 index 000000000000..07d939dfdc16 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + /* Qwerty + * .---------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | Ins | + * |---------------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Del | + * |---------------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | PgUp| + * |---------------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | U | Pgdn| + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | Space | RAlt | FN ||||| L | D | R | + * '---------------------------------------------------------------------------------------------' + */ + + /* FnLayer + * .---------------------------------------------------------------------------------------------. + * | ` ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DELETE |PNTSC| + * |---------------------------------------------------------------------------------------------+ + * | Tab |STATC|BRTHE|RNBOW|RESET| | | | | | |PAUSE| | \ | | + * |---------------------------------------------------------------------------------------------+ + * | Caps |RGBH+|RGBS+|RGBB+| | | | | | | | INS | Enter | HOME| + * |---------------------------------------------------------------------------------------------+ + * | Shift |RGBH-|RGBS-|RGBB-| | | | |RGBM-|RGBM+|RGBTG| Shift |VOLUP| END | + * |---------------------------------------------------------------------------------------------+ + * | Ctrl | Win | Alt | | RAlt | FN ||||| L |VOLDN| R | + * '---------------------------------------------------------------------------------------------' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + 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_ENT, KC_PGUP, + 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_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = LAYOUT( + /* esc 1 2 3 4 5 6 7 8 9 0 - = bkspc insert*/ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, + /* tab Q W E R T Y U I O P [ ] \ delete*/ + KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, KC_BSLS, KC_TRNS, + /* caps A S D F G H J K L ; ' enter pg up*/ + KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, + /* shift Z X C V B N M , . / shift up pg dn*/ + KC_LSFT, RGB_HUD, RGB_SAD, RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_MUTE,RGB_RMOD, RGB_MOD, RGB_TOG, KC_RSFT, KC_VOLU, KC_END, + /* ctrl win alt space alt fn left down right*/ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS) +}; diff --git a/keyboards/coseyfannitutti/mullet/mullet.c b/keyboards/coseyfannitutti/mullet/mullet.c new file mode 100644 index 000000000000..4f451f3dbb17 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/mullet.c @@ -0,0 +1,23 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include "mullet.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/coseyfannitutti/mullet/mullet.h b/keyboards/coseyfannitutti/mullet/mullet.h new file mode 100644 index 000000000000..848fd19226f8 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/mullet.h @@ -0,0 +1,42 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define _x_ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +) { \ +{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ +{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ +{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ +{ K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ +{ K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, _x_, K4A, K4B, K4C, K4D, K4E} \ +} diff --git a/keyboards/coseyfannitutti/mullet/readme.md b/keyboards/coseyfannitutti/mullet/readme.md new file mode 100644 index 000000000000..45c17fb5ba63 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/readme.md @@ -0,0 +1,15 @@ +# mullet + +![mullet](https://i.imgur.com/EBOMbhH.jpg) + +A 68 key keyboard with USB Type-C and RGB underglow + +Keyboard Maintainer: [coseyfannitutti](https://github.com/coseyfannitutti) +Hardware Supported: Mullet, atmega32u4 +Hardware Availability: https://github.com/coseyfannitutti/mullet + +Make example for this keyboard (after setting up your build environment): + + make coseyfannitutti/mullet: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). diff --git a/keyboards/coseyfannitutti/mullet/rules.mk b/keyboards/coseyfannitutti/mullet/rules.mk new file mode 100644 index 000000000000..fa02fe6fce92 --- /dev/null +++ b/keyboards/coseyfannitutti/mullet/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/coseyfannitutti/mulletpad/config.h b/keyboards/coseyfannitutti/mulletpad/config.h new file mode 100644 index 000000000000..ad594105545b --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/config.h @@ -0,0 +1,172 @@ +/* +Copyright 2019 COSEYFANNITUTTI + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6666 +#define DEVICE_VER 0x0001 +#define MANUFACTURER coseyfannitutti +#define PRODUCT mulletpad +#define DESCRIPTION numpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4, F1, F5, F6, F7 } +#define MATRIX_COL_PINS { F0, C7, C6, B6, } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +//#define RGB_DI_PIN D5 +//#ifdef RGB_DI_PIN +//#define RGBLIGHT_ANIMATIONS +//#define RGBLED_NUM 8 +//#define RGBLIGHT_HUE_STEP 8 +//#define RGBLIGHT_SAT_STEP 8 +//#define RGBLIGHT_VAL_STEP 8 +//#define RGBLIGHT_SLEEP +//#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + diff --git a/keyboards/coseyfannitutti/mulletpad/info.json b/keyboards/coseyfannitutti/mulletpad/info.json new file mode 100644 index 000000000000..1cfade20d132 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "mulletpad", + "url": "https://github.com/coseyfannitutti/mulletpad", + "maintainer": "coseyfannitutti", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Num Lock", "x":0, "y":0}, {"label":"/", "x":1, "y":0}, {"label":"*", "x":2, "y":0}, {"label":"-", "x":3, "y":0}, {"label":"7", "x":0, "y":1}, {"label":"8", "x":1, "y":1}, {"label":"9", "x":2, "y":1}, {"label":"+", "x":3, "y":1, "h":2}, {"label":"4", "x":0, "y":2}, {"label":"5", "x":1, "y":2}, {"label":"6", "x":2, "y":2}, {"label":"1", "x":0, "y":3}, {"label":"2", "x":1, "y":3}, {"label":"3", "x":2, "y":3}, {"label":"Enter", "x":3, "y":3, "h":2}, {"label":"0", "x":0, "y":4, "w":2}, {"label":".", "x":2, "y":4}] + } + } +} diff --git a/keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c b/keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c new file mode 100644 index 000000000000..ffdc1044dff4 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT ) +}; diff --git a/keyboards/coseyfannitutti/mulletpad/mulletpad.c b/keyboards/coseyfannitutti/mulletpad/mulletpad.c new file mode 100644 index 000000000000..be335cc547cb --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/mulletpad.c @@ -0,0 +1,23 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#include "mulletpad.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/coseyfannitutti/mulletpad/mulletpad.h b/keyboards/coseyfannitutti/mulletpad/mulletpad.h new file mode 100644 index 000000000000..41c5c014a983 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/mulletpad.h @@ -0,0 +1,42 @@ +/* Copyright 2019 COSEYFANNITUTTI + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define _x_ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K30, K31, K32, \ + K40, K42, K43 \ +) { \ +{ K00, K01, K02, K03, }, \ +{ K10, K11, K12, _x_, }, \ +{ K20, K21, K22, K23, }, \ +{ K30, K31, K32, _x_, }, \ +{ K40, _x_, K42, K43, }, \ +} diff --git a/keyboards/coseyfannitutti/mulletpad/readme.md b/keyboards/coseyfannitutti/mulletpad/readme.md new file mode 100644 index 000000000000..9ee49ca96cb0 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/readme.md @@ -0,0 +1,15 @@ +# mulletpad + +![mulletpad](https://i.imgur.com/MHKo5f5.png) + +A 17-key numpad with USB Type-C. + +Keyboard Maintainer: [coseyfannitutti](https://github.com/coseyfannitutti) +Hardware Supported: Mulletpad, atmega32u4 +Hardware Availability: https://github.com/coseyfannitutti/mulletpad + +Make example for this keyboard (after setting up your build environment): + + make coseyfannitutti/mulletpad: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). diff --git a/keyboards/coseyfannitutti/mulletpad/rules.mk b/keyboards/coseyfannitutti/mulletpad/rules.mk new file mode 100644 index 000000000000..b3a473ef4b94 --- /dev/null +++ b/keyboards/coseyfannitutti/mulletpad/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = numpad_5x4 diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h index 1f7c174e6e46..b7e7ec384cc3 100644 --- a/keyboards/cospad/config.h +++ b/keyboards/cospad/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -32,42 +31,43 @@ along with this program. If not, see . #define MATRIX_ROWS 6 #define MATRIX_COLS 4 -// ROWS: Top to bottom, COLS: Left to right - +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7 } #define UNUSED_PINS -#define BACKLIGHT_PIN F7 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST +/* Backlight configuration */ +#define BACKLIGHT_PIN F7 +#define BACKLIGHT_LEVELS 1 + +/* Underlight configuration */ +#define RGB_DI_PIN F6 +#define RGBLED_NUM 4 +#define RGBLIGHT_ANIMATIONS -/* Set 0 if debouncing isn't needed */ +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* Backlight configuration - */ -#define BACKLIGHT_LEVELS 4 - -/* Underlight configuration - */ - -#define RGB_DI_PIN F6 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 4 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -86,4 +86,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/cospad/cospad.c b/keyboards/cospad/cospad.c index 48d752a84b10..e7ef71f874b2 100644 --- a/keyboards/cospad/cospad.c +++ b/keyboards/cospad/cospad.c @@ -1,37 +1,33 @@ + +/* Copyright 2019 + * + * 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 . + */ #include "cospad.h" -#include "led.h" -extern inline void cospad_bl_led_on(void); -extern inline void cospad_bl_led_off(void); -extern inline void cospad_bl_led_togg(void); +#ifdef BACKLIGHT_ENABLE -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); -}; - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - matrix_scan_user(); -}; +void backlight_init_ports(void) { + setPinOutput(F7); +} -void led_init_ports(void) { - // * Set our LED pins as output - DDRB |= (1<<2); - DDRF |= (1<<7); - // * Setting BL LEDs to init as off - PORTF |= (1<<7); +void backlight_set(uint8_t level) { + writePin(F7, !!level); } -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. + */ +#pragma once #include "quantum.h" +#define ___ KC_NO -// readability -#define XXX KC_NO +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ /* COSPAD ortho matrix layout * ,-------------------. @@ -21,40 +43,6 @@ * | 50 | 51 | 52 | 53 | * `-------------------' */ - -/* COSPAD gamepad matrix layout - * ,-------------------. - * | 00 | 01 | 02 | 03 | - * |----|----|----|----| - * | 10 | 11 | 12 | 13 | - * |----|----|----|----| - * | 20 | 21 | 22 | | - * |----|----|----| 23 | - * | 30 | 31 | 32 | | - * |----|----|----|----| - * | 40 | 41 | 42 | 43 | - * |----|----|----|----| - * | 50 | 51 | 52 | 53 | - * `-------------------' - */ - -/* COSPAD numpad matrix layout - * ,-------------------. - * | 00 | 01 | 02 | 03 | - * |----|----|----|----| - * | 10 | 11 | 12 | 13 | - * |----|----|----|----| - * | 20 | 21 | 22 | | - * |----|----|----| 23 | - * | 30 | 31 | 32 | | - * |----|----|----|----| - * | 40 | 41 | 42 | | - * |----|----|----| 43 | - * | 50 | 52 | | - * `-------------------' - */ -// The first section contains all of the arguments -// The second converts the arguments into a two-dimensional array #define LAYOUT_ortho_6x4( \ k00, k01, k02, k03, \ k10, k11, k12, k13, \ @@ -72,6 +60,21 @@ {k50, k51, k52, k53} \ } +/* COSPAD gamepad matrix layout + * ,-------------------. + * | 00 | 01 | 02 | 03 | + * |----|----|----|----| + * | 10 | 11 | 12 | 13 | + * |----|----|----|----| + * | 20 | 21 | 22 | | + * |----|----|----| 23 | + * | 30 | 31 | 32 | | + * |----|----|----|----| + * | 40 | 41 | 42 | 43 | + * |----|----|----|----| + * | 50 | 51 | 52 | 53 | + * `-------------------' + */ #define LAYOUT_gamepad_6x4( \ k00, k01, k02, k03, \ k10, k11, k12, k13, \ @@ -84,11 +87,26 @@ {k00, k01, k02, k03}, \ {k10, k11, k12, k13}, \ {k20, k21, k22, k23}, \ - {k30, k31, k32, KC_NO}, \ + {k30, k31, k32, ___}, \ {k40, k41, k42, k43}, \ {k50, k51, k52, k53} \ } +/* COSPAD numpad matrix layout + * ,-------------------. + * | 00 | 01 | 02 | 03 | + * |----|----|----|----| + * | 10 | 11 | 12 | 13 | + * |----|----|----|----| + * | 20 | 21 | 22 | | + * |----|----|----| 23 | + * | 30 | 31 | 32 | | + * |----|----|----|----| + * | 40 | 41 | 42 | | + * |----|----|----| 43 | + * | 50 | 52 | | + * `-------------------' + */ #define LAYOUT_numpad_6x4( \ k00, k01, k02, k03, \ k10, k11, k12, k13, \ @@ -98,25 +116,15 @@ k50, k52, k43 \ ) \ { \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, KC_NO}, \ - {k40, k41, k42, k43}, \ - {k50, KC_NO, k52, KC_NO} \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, ___}, \ + {k40, k41, k42, k43}, \ + {k50, ___, k52, ___} \ } -void matrix_init_user(void); -void matrix_scan_user(void); -inline void cospad_bl_led_on(void) { PORTF &= ~(1<<7); } -inline void cospad_bl_led_off(void) { PORTF |= (1<<7); } - -inline void cospad_bl_led_togg(void) { - uint8_t bl_mask = PORTF&(1<<7); - if (bl_mask) { - PORTF &= ~(1<<7); - } else { - PORTF |= (1<<7); - } -} -#endif +// Add backwards compatibility for existing keymaps +#define cospad_bl_led_on backlight_enable +#define cospad_bl_led_off backlight_disable +#define cospad_bl_led_togg backlight_toggle diff --git a/keyboards/cospad/info.json b/keyboards/cospad/info.json index b34013a47afe..c17f44f52591 100644 --- a/keyboards/cospad/info.json +++ b/keyboards/cospad/info.json @@ -7,6 +7,7 @@ "height": 6, "layouts": { "LAYOUT_numpad_6x4": { + "key_count": 21, "layout": [ {"label":"Esc", "x":0, "y":0}, {"label":"Tab", "x":1, "y":0}, @@ -33,35 +34,62 @@ }, "LAYOUT_gamepad_6x4": { + "key_count": 23, "layout": [ - {"label":"k00", "x":5, "y":0}, - {"label":"k01", "x":5, "y":1}, - {"label":"k02", "x":5, "y":2}, - {"label":"k03", "x":5, "y":3}, - {"label":"k10", "x":4, "y":0}, - {"label":"k11", "x":4, "y":1}, - {"label":"k12", "x":4, "y":2}, - {"label":"k13", "x":4, "y":3}, - {"label":"k20", "x":3, "y":0}, - {"label":"k21", "x":3, "y":1}, - {"label":"k22", "x":3, "y":2}, - {"label":"k30", "x":2, "y":0}, - {"label":"k31", "x":2, "y":1}, - {"label":"k32", "x":2, "y":2}, - {"label":"k23", "x":2, "y":3, "w":2}, - {"label":"k40", "x":1, "y":0}, - {"label":"k41", "x":1, "y":1}, - {"label":"k42", "x":1, "y":2}, - {"label":"k43", "x":1, "y":3}, - {"label":"k50", "x":0, "y":0}, - {"label":"k51", "x":0, "y":1}, - {"label":"k52", "x":0, "y":2}, - {"label":"k53", "x":0, "y":3} + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k10", "x":0, "y":1}, + {"label":"k11", "x":1, "y":1}, + {"label":"k12", "x":2, "y":1}, + {"label":"k13", "x":3, "y":1}, + {"label":"k20", "x":0, "y":2}, + {"label":"k21", "x":1, "y":2}, + {"label":"k22", "x":2, "y":2}, + {"label":"k30", "x":0, "y":3}, + {"label":"k31", "x":1, "y":3}, + {"label":"k32", "x":2, "y":3}, + {"label":"k23", "x":3, "y":2, "h":2}, + {"label":"k40", "x":0, "y":4}, + {"label":"k41", "x":1, "y":4}, + {"label":"k42", "x":2, "y":4}, + {"label":"k43", "x":3, "y":4}, + {"label":"k50", "x":0, "y":5}, + {"label":"k51", "x":1, "y":5}, + {"label":"k52", "x":2, "y":5}, + {"label":"k53", "x":3, "y":5} ] }, "LAYOUT_ortho_6x4": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Tab", "x":1, "y":0}, {"label":"Fn", "x":2, "y":0}, {"label":"Back", "x":3, "y":0}, {"label":"Num Lock", "x":0, "y":1}, {"label":"/", "x":1, "y":1}, {"label":"*", "x":2, "y":1}, {"label":"-", "x":3, "y":1}, {"label":"7", "x":0, "y":2}, {"label":"8", "x":1, "y":2}, {"label":"9", "x":2, "y":2}, {"label":"+", "x":3, "y":2}, {"label":"4", "x":0, "y":3}, {"label":"5", "x":1, "y":3}, {"label":"6", "x":2, "y":3}, {"x":3, "y":3}, {"label":"1", "x":0, "y":4}, {"label":"2", "x":1, "y":4}, {"label":"3", "x":2, "y":4}, {"label":"Enter", "x":3, "y":4}, {"label":"0", "x":0, "y":5}, {"x":1, "y":5}, {"label":".", "x":2, "y":5}, {"x":3, "y":5}] + "key_count": 24, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k10", "x":0, "y":1}, + {"label":"k11", "x":1, "y":1}, + {"label":"k12", "x":2, "y":1}, + {"label":"k13", "x":3, "y":1}, + {"label":"k20", "x":0, "y":2}, + {"label":"k21", "x":1, "y":2}, + {"label":"k22", "x":2, "y":2}, + {"label":"k23", "x":3, "y":2}, + {"label":"k30", "x":0, "y":3}, + {"label":"k31", "x":1, "y":3}, + {"label":"k32", "x":2, "y":3}, + {"label":"k33", "x":3, "y":3}, + {"label":"k40", "x":0, "y":4}, + {"label":"k41", "x":1, "y":4}, + {"label":"k42", "x":2, "y":4}, + {"label":"k43", "x":3, "y":4}, + {"label":"k50", "x":0, "y":5}, + {"label":"k51", "x":1, "y":5}, + {"label":"k52", "x":2, "y":5}, + {"label":"k53", "x":3, "y":5} + ] } } } diff --git a/keyboards/cospad/keymaps/default/keymap.c b/keyboards/cospad/keymaps/default/keymap.c index f066ad677da2..adcca112d233 100644 --- a/keyboards/cospad/keymaps/default/keymap.c +++ b/keyboards/cospad/keymaps/default/keymap.c @@ -1,86 +1,60 @@ #include QMK_KEYBOARD_H -#include "led.h" - -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif // 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. -#define _BL 0 -#define _FL 1 - -#define _______ KC_TRNS +enum layers { + _BL = 0, + _FL +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,-------------------. - * |Esc |TAB | FN | BS | - * |----|----|----|----| - * | NL | / | * | - | - * |----|----|----|----| - * | 7 | 8 | 9 | | - * |----|----|----| + | - * | 4 | 5 | 6 | | - * |----|----|----|----| - * | 1 | 2 | 3 | | - * |----|----|----| En | - * | 0 | . | | - * `-------------------' - */ +/* Keymap _BL: (Base Layer) Default Layer + * ,-------------------. + * |Esc |TAB | FN | BS | + * |----|----|----|----| + * | NL | / | * | - | + * |----|----|----|----| + * | 7 | 8 | 9 | | + * |----|----|----| + | + * | 4 | 5 | 6 | | + * |----|----|----|----| + * | 1 | 2 | 3 | | + * |----|----|----| En | + * | 0 | . | | + * `-------------------' + */ + [_BL] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, MO(_FL), KC_BSPC, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, \ + KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_P1, KC_P2, KC_P3, \ + KC_P0, KC_PDOT, KC_PENT + ), -[_BL] = LAYOUT_numpad_6x4( - KC_ESC, KC_TAB, MO(_FL), KC_BSPC, \ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ - KC_P7, KC_P8, KC_P9, \ - KC_P4, KC_P5, KC_P6, KC_PPLS, \ - KC_P1, KC_P2, KC_P3, \ - KC_P0, KC_PDOT, KC_PENT), - - /* Keymap _FL: Function Layer - * ,-------------------. - * |RGBT|TAB | FN | BS | - * |----|----|----|----| - * |RGBM|RGBP|BTOG| - | - * |----|----|----|----| - * |HUD |HUI |BON | | - * |----|----|----| + | - * |SAD |SAI |BOFF| | - * |----|----|----|----| - * |VAD |VAS | 3 | | - * |----|----|----| En | - * | 0 |RST | | - * `-------------------' - */ -[_FL] = LAYOUT_numpad_6x4( - RGB_TOG, KC_TAB, KC_TRNS, KC_BSPC, \ - RGB_MOD, RGB_M_P, BL_TOGG, KC_PMNS, \ - RGB_HUD, RGB_HUI, BL_ON, \ - RGB_SAD, RGB_SAI, BL_OFF, KC_PPLS, \ - RGB_VAD, RGB_VAI, KC_P3, \ - KC_P0, RESET, KC_PENT), +/* Keymap _FL: Function Layer + * ,-------------------. + * |RGBT| | | | + * |----|----|----|----| + * |RGBM|RGBP|BTOG| | + * |----|----|----|----| + * |HUD |HUI |BON | | + * |----|----|----| | + * |SAD |SAI |BOFF| | + * |----|----|----|----| + * |VAD |VAS |BSTP| | + * |----|----|----| | + * | |RST | | + * `-------------------' + */ + [_FL] = LAYOUT_numpad_6x4( + RGB_TOG, _______, _______, _______, \ + RGB_MOD, RGB_M_P, BL_TOGG, _______, \ + RGB_HUD, RGB_HUI, BL_ON, \ + RGB_SAD, RGB_SAI, BL_OFF, _______, \ + RGB_VAD, RGB_VAI, BL_STEP, \ + _______, RESET, _______ + ), }; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case BL_TOGG: - if (record->event.pressed) { - cospad_bl_led_togg(); - } - return false; - case BL_ON: - if (record->event.pressed) { - cospad_bl_led_on(); - } - return false; - case BL_OFF: - if(record->event.pressed) { - cospad_bl_led_off(); - } - return false; - default: - return true; - } -} diff --git a/keyboards/cospad/keymaps/detrus/keymap.c b/keyboards/cospad/keymaps/detrus/keymap.c index f9eddc2a87ad..93f95bb01eff 100644 --- a/keyboards/cospad/keymaps/detrus/keymap.c +++ b/keyboards/cospad/keymaps/detrus/keymap.c @@ -6,8 +6,6 @@ #include "rgblight.h" #endif -#define _______ KC_TRNS - // Each layer gets a name for readability, which is then used in the keymap matrix below. enum cospad_layers { _QWERTY_LAYER, diff --git a/keyboards/cospad/rules.mk b/keyboards/cospad/rules.mk index 3c5913d0d91f..61c7a5182ce1 100644 --- a/keyboards/cospad/rules.mk +++ b/keyboards/cospad/rules.mk @@ -1,6 +1,5 @@ # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. @@ -40,27 +39,43 @@ F_USB = $(F_CPU) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + # Boot Section Size in *bytes* # Teensy halfKay 512 # Teensy++ halfKay 1024 # Atmel DFU loader 4096 # LUFA bootloader 4096 # USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # 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 -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_CUSTOM_DRIVER = yes +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + + +LAYOUTS = numpad_6x4 ortho_6x4 diff --git a/keyboards/crkbd/info.json b/keyboards/crkbd/info.json index 45a0255c1ac8..d7f6309043bf 100644 --- a/keyboards/crkbd/info.json +++ b/keyboards/crkbd/info.json @@ -3,7 +3,7 @@ "url": "", "maintainer": "qmk", "width": 15, - "height": 4.5, + "height": 4.7, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 1e2e57a2b452..5bb89d2594ae 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -22,9 +22,9 @@ extern uint8_t is_master; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. #define _QWERTY 0 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -246,4 +246,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - diff --git a/keyboards/crkbd/keymaps/drashna/config.h b/keyboards/crkbd/keymaps/drashna/config.h index cbc3feeb6165..724d52c38c1b 100644 --- a/keyboards/crkbd/keymaps/drashna/config.h +++ b/keyboards/crkbd/keymaps/drashna/config.h @@ -27,7 +27,8 @@ along with this program. If not, see . // #define MASTER_RIGHT #define EE_HANDS -#define SSD1306OLED +#undef USE_I2C +#undef SSD1306OLED #define USE_SERIAL_PD2 @@ -35,16 +36,60 @@ along with this program. If not, see . // #define TAPPING_TERM 100 #ifdef RGBLIGHT_ENABLE -#undef RGBLED_NUM -#define RGBLED_NUM 27 +# undef RGBLED_NUM +# define RGBLED_NUM 27 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_LIMIT_VAL 100 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 100 +#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_FRAMEBUFFER_EFFECTS + +// # define DISABLE_RGB_MATRIX_ALPHAS_MODS +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_BREATHING +# define DISABLE_RGB_MATRIX_CYCLE_ALL +# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define DISABLE_RGB_MATRIX_DUAL_BEACON +# define DISABLE_RGB_MATRIX_RAINBOW_BEACON +# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # define DISABLE_RGB_MATRIX_RAINDROPS +// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP +// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define DISABLE_RGB_MATRIX_SPLASH +// # define DISABLE_RGB_MATRIX_MULTISPLASH +# define DISABLE_RGB_MATRIX_SOLID_SPLASH +# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif #ifdef AUDIO_ENABLE -#define B6_AUDIO +# define B6_AUDIO // #define NO_MUSIC_MODE #endif + +#undef PRODUCT +#define PRODUCT Drashna Hacked Corne Keyboard + +#define OLED_FONT_H "keyboards/crkbd/keymaps/drashna/glcdfont.c" +// #define OLED_FONT_WIDTH 5 +// #define OLED_FONT_HEIGHT 7 + +#define TAPPING_TERM_PER_KEY diff --git a/keyboards/crkbd/keymaps/drashna/glcdfont.c b/keyboards/crkbd/keymaps/drashna/glcdfont.c new file mode 100644 index 000000000000..28521b428926 --- /dev/null +++ b/keyboards/crkbd/keymaps/drashna/glcdfont.c @@ -0,0 +1,240 @@ +#pragma once + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Helidox 8x6 font with QMK Firmware Logo +// Online editor: http://teripom.x0.com/ + +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, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, +0xF0, 0xF8, 0xF8, 0x18, 0x00, 0xC0, +0xF0, 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, +0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, +0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, +0x80, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, +0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, +0x00, 0x00, 0x00, 0xE0, 0xE0, 0xC0, +0xC0, 0xE0, 0xE0, 0xE0, 0xE0, 0x00, +0x00, 0xE0, 0xE0, 0xC0, 0xC0, 0xE0, +0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x80, +0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, +0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, +0xE0, 0xE0, 0xC0, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, +0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, +0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, +0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, +0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, +0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, +0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, +0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xF8, 0xFC, 0xFE, +0xFF, 0xE0, 0x00, 0xFF, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, +0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, +0xFF, 0x1F, 0x07, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xFF, 0xFF, 0xFF, 0x81, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x81, +0xC3, 0xC3, 0xC3, 0x00, 0x00, 0xFF, +0xFF, 0xFF, 0x81, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x81, 0xFF, 0xFF, +0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, +0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, +0x9D, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, +0x1C, 0x9D, 0xDF, 0xDF, 0xDF, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, +0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, +0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, +0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, +0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, +0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, +0x3F, 0x3F, 0x3F, 0x3F, 0x1F, 0x1F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x3F, +0x3F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7C, 0x78, 0x78, 0x38, 0x1C, +0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x07, 0x07, +0x07, 0x07, 0x07, 0x07, 0x07, 0x07, +0x03, 0x01, 0x00, 0x00, 0x00, 0x00, +0x01, 0x03, 0x07, 0x07, 0x07, 0x07, +0x07, 0x07, 0x07, 0x07, 0x03, 0x01, +0x00, 0x00, 0x00, 0x07, 0x07, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x07, 0x07, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x07, 0x07, +0x07, 0x00, 0x00, 0x00, 0x01, 0x03, +0x07, 0x07, 0x07, 0x07, 0x07, 0x07, +0x07, 0x07, 0x03, 0x01, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 678fd33b5757..af0bc0d9a74a 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -1,12 +1,5 @@ #include QMK_KEYBOARD_H #include "drashna.h" -#ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif extern keymap_config_t keymap_config; extern uint8_t is_master; @@ -17,7 +10,7 @@ extern rgblight_config_t rgblight_config; #endif enum crkbd_keycodes { - RGBRST = NEW_SAFE_RANGE + RGBRST = NEW_SAFE_RANGE }; #define LAYOUT_crkbd_base( \ @@ -27,9 +20,9 @@ enum crkbd_keycodes { ) \ LAYOUT_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ - KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \ - OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \ - LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \ + KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \ ) #define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) @@ -58,6 +51,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ ), + [_NORMAN] = LAYOUT_crkbd_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_crkbd_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_crkbd_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_crkbd_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + [_MODS] = LAYOUT_wrapper( _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, @@ -83,40 +100,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY, - _______, _______, _______, KC_NUKE, TG_MODS, _______ + _______, KC_NUKE, _______, _______, TG_MODS, _______ ) }; void matrix_init_keymap(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 - - #ifndef CONVERT_TO_PROTON_C +#ifndef CONVERT_TO_PROTON_C setPinOutput(D5); writePinHigh(D5); setPinOutput(B0); writePinHigh(B0); - #endif +#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_logo(void); -char layer_state_str[24]; -char modifier_state_str[24]; -char host_led_state_str[24]; -char keylog_str[24] = {}; -char keylogs_str[21] = {}; -int keylogs_str_idx = 0; +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_master) { + return OLED_ROTATION_270; + } else { + return rotation; + } +} + +void render_crkbd_logo(void) { + static const char PROGMEM crkbd_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + oled_write_P(crkbd_logo, false); +} -// const char *read_mode_icon(bool swap); -// void set_timelog(void); -// const char *read_timelog(void); +#define KEYLOG_LEN (int)(32 / OLED_FONT_WIDTH) +char keylog_str[KEYLOG_LEN] = {}; +uint8_t keylogs_str_idx = 0; +uint16_t log_timer = 0; const char code_to_name[60] = { ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', @@ -126,141 +146,184 @@ const char code_to_name[60] = { 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; -void set_keylog(uint16_t keycode, keyrecord_t *record) { - char name = ' '; - if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } - if (keycode < 60) { - name = code_to_name[keycode]; - } - // update keylog - snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", - record->event.key.row, record->event.key.col, - keycode, name); - - // update keylogs - if (keylogs_str_idx == sizeof(keylogs_str) - 1) { - keylogs_str_idx = 0; - for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { - keylogs_str[i] = ' '; +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 = keycode & 0xFF; } + + for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) { + keylog_str[i] = keylog_str[i - 1]; } - } + if (keycode < 60) { + keylog_str[0] = code_to_name[keycode]; + } + keylog_str[KEYLOG_LEN] = 0; - keylogs_str[keylogs_str_idx] = name; - keylogs_str_idx++; + log_timer = timer_read(); } -const char *read_keylog(void) { - return keylog_str; +void update_log(void) { + if (timer_elapsed(log_timer) > 750) { + add_keylog(0); + } } -const char *read_keylogs(void) { - return keylogs_str; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { add_keylog(keycode); } + return true; } +void render_status(void) { + + oled_write_P(PSTR("Layer"), false); + switch (biton32(layer_state)) { + case 0: + oled_write_P(PSTR("Base "), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise"), false); + break; + case _LOWER: + oled_write_P(PSTR("Lower"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjst"), false); + break; + default: + oled_write_P(PSTR("Unkn "), false); + break; + } + oled_write_P(PSTR("Lyout"), false); + switch (biton32(default_layer_state)) { + case _QWERTY: + oled_write_P(PSTR("QWRTY"), false); + break; + case _COLEMAK: + oled_write_P(PSTR("COLMK"), false); + break; + case _DVORAK: + oled_write_P(PSTR("DVRAK"), false); + break; + case _WORKMAN: + oled_write_P(PSTR("WRKMN"), false); + break; + case _NORMAN: + oled_write_P(PSTR("NORMN"), false); + break; + case _MALTRON: + oled_write_P(PSTR("MLTRN"), false); + break; + case _EUCALYN: + oled_write_P(PSTR("ECLYN"), false); + break; + case _CARPLAX: + oled_write_P(PSTR("CRPLX"), false); + break; + } + + uint8_t modifiers = get_mods(); + uint8_t one_shot = get_oneshot_mods(); -const char* read_modifier_state(void) { - uint8_t modifiers = get_mods(); - uint8_t one_shot = get_oneshot_mods(); + oled_write_P(PSTR("Mods:"), false); + oled_write_P( (modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? PSTR(" SFT ") : PSTR(" "), false); + oled_write_P( (modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL ) ? PSTR(" CTL ") : PSTR(" "), false); + oled_write_P( (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT ) ? PSTR(" ALT ") : PSTR(" "), false); + oled_write_P( (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI ) ? PSTR(" GUI ") : PSTR(" "), false); - snprintf(modifier_state_str, sizeof(modifier_state_str), "Mods:%s %s %s %s", - (modifiers & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) ? "CTL" : " ", - (modifiers & MODS_GUI_MASK || one_shot & MODS_GUI_MASK) ? "GUI" : " ", - (modifiers & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) ? "ALT" : " ", - (modifiers & MODS_SHIFT_MASK || one_shot & MODS_SHIFT_MASK) ? "SFT" : " " - ); - return modifier_state_str; -} + oled_write_P(PSTR("BTMGK"), false); -const char *read_host_led_state(void) { - uint8_t leds = host_keyboard_leds(); + if (keymap_config.swap_lalt_lgui) { + oled_write_P(PSTR(" Mac "), false); + } else { + oled_write_P(PSTR(" Win "), false); + } - snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s", - (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ", - (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ", - (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- " - ); + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(PSTR("Lock:"), false); + oled_write_P(led_usb_state & (1<display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} +#ifdef RGB_MATRIX_ENABLE -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); +void suspend_power_down_keymap(void) { + rgb_matrix_set_suspend_state(true); } -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_A ... KC_SLASH: - case KC_F1 ... KC_F12: - case KC_INSERT ... KC_UP: - case KC_KP_SLASH ... KC_KP_DOT: - case KC_F13 ... KC_F24: - if (record->event.pressed) { set_keylog(keycode, record); } - break; - // set_timelog(); - } - return true; +void suspend_wakeup_init_keymap(void) { + rgb_matrix_set_suspend_state(false); } +void rgb_matrix_indicators_user(void) { + if ( userspace_config.rgb_layer_change && +#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED + !g_suspend_state && +#endif +#if defined(RGBLIGHT_ENABLE) + (!rgblight_config.enable && rgb_matrix_config.enable) +#else + rgb_matrix_config.enable +#endif + ) { + switch (biton32(layer_state)) { + case _MODS: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _GAMEPAD: + rgb_matrix_layer_helper(0xFF, 0x80, 0x00, LED_FLAG_UNDERGLOW); break; + case _DIABLO: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_UNDERGLOW); break; + case _RAISE: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _LOWER: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _ADJUST: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_UNDERGLOW); break; + default: + switch (biton32(default_layer_state)) { + case _QWERTY: + rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_UNDERGLOW); break; + case _COLEMAK: + rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_UNDERGLOW); break; + case _DVORAK: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _WORKMAN: + rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_UNDERGLOW); break; + case _NORMAN: + rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_UNDERGLOW); break; + case _MALTRON: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_UNDERGLOW); break; + case _EUCALYN: + rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_UNDERGLOW); break; + case _CARPLAX: + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_UNDERGLOW); break; + } + } + } +} #endif diff --git a/keyboards/crkbd/keymaps/drashna/rules.mk b/keyboards/crkbd/keymaps/drashna/rules.mk index 4b70f66f7bb2..39b48f9447cc 100644 --- a/keyboards/crkbd/keymaps/drashna/rules.mk +++ b/keyboards/crkbd/keymaps/drashna/rules.mk @@ -3,31 +3,29 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # 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 -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SWAP_HANDS_ENABLE = no # Enable one-hand typing +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +RGBLIGHT_STARTUP_ANIMATION = yes +RGB_MATRIX_ENABLE = WS2812 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend BOOTLOADER = qmk-dfu -# If you want to change the display of OLED, you need to change here -SRC += ./lib/glcdfont.c \ - ./lib/rgb_state_reader.c \ - ./lib/logo_reader.c \ - # ./lib/keylogger.c \ - # ./lib/host_led_state_reader.c \ - # ./lib/mode_icon_reader.c \ - # ./lib/layer_state_reader.c \ - # ./lib/timelogger.c \ +OLED_DRIVER_ENABLE = yes + +ifneq ($(strip $(OLED_DRIVER_ENABLE)), yes) + RGB_MATRIX_SPLIT_RIGHT=yes +endif diff --git a/keyboards/crkbd/keymaps/edvorakjp/config.h b/keyboards/crkbd/keymaps/edvorakjp/config.h index 515591a4292f..b8662aca092d 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/config.h +++ b/keyboards/crkbd/keymaps/edvorakjp/config.h @@ -3,15 +3,16 @@ /* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT +// #define MASTER_LEFT +#define MASTER_RIGHT // #define EE_HANDS #define SSD1306OLED #define SWAP_SCLN // #define TAPPING_FORCE_HOLD -#define TAPPING_TERM 120 +#define TAPPING_TERM 300 +#define IGNORE_MOD_TAP_INTERRUPT #undef RGBLED_NUM #define RGBLIGHT_EFFECT_STATIC_GRADIENT diff --git a/keyboards/crkbd/keymaps/edvorakjp/keymap.c b/keyboards/crkbd/keymaps/edvorakjp/keymap.c index ae2f710a03a0..32001f22daad 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/keymap.c +++ b/keyboards/crkbd/keymaps/edvorakjp/keymap.c @@ -16,113 +16,61 @@ #define KC_ KC_TRNS -#define KC_TMB1 LGUI_T(KC_TAB) -#define KC_TMB2 LSFT_T(KC_SPC) +#define KC_TMB1 KC_LA(TAB) +#define KC_TMB2 KC_LS(SPC) #define KC_TMB3 TD(TD_LOWER) // act as LOWER when hold, as KC_LANG2(=English) when tapped #define KC_TMB4 TD(TD_RAISE) // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped -#define KC_TMB5 RCTL_T(KC_BSPC) -#define KC_TMB6 RALT_T(KC_ENT) -#define KC_TMB7 KC_DEL -#define KC_TMB8 RALT(KC_ENT) -#define KC_TMB9 LGUI(KC_TAB) - -#define KC_RST RESET -#define KC_DBUG DEBUG -#define KC_RTOG RGB_TOG -#define KC_EDJP EDVORAK -#define KC_QWER QWERTY +#define KC_TMB5 KC_RC(BSPC) +#define KC_TMB6 KC_RG(ENT) +#define KC_TMB7 KC_RC(DEL) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_EDVORAK] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ESC ,QUOT,COMM,DOT , Y , P , F , G , R , W , Q ,BSLS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - EQL , A , O , E , I , U , D , T , N , S , M ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - GRV ,SCLN, X , C , V , Z , B , H , J , K , L ,SLSH, - //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - TMB1,TMB2,TMB3, TMB4,TMB5,TMB6 - // `----+----+----' `----+----+----' - ), - - [_EDVORAKJ1] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , Y , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , - //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - , , , , , - // `----+----+----' `----+----+----' - ), - - [_EDVORAKJ2] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , Y , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , - //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - , , , , , - // `----+----+----' `----+----+----' - ), - - [_QWERTY] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - EQL , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - GRV , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,BSLS, - //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - , , , , , - // `----+----+----' `----+----+----' + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + GRV ,QUOT,COMM , DOT , Y , Q , F , G , R , W , P ,BSLS, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + EQL , A ,LA(O),LG(E),LC(I), U , D ,RS(T),RG(N),RA(S), M ,MINS, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + ESC ,SCLN, X , C , V , Z , H , J , K , L , B ,SLSH, + //`----+----+-----+-----+-----+----+----| |----+----+-----+-----+-----+----+----' + TMB1 ,TMB2,TMB3, TMB4,TMB5,TMB6 + // `-----+----+----' `----+----+-----' ), [_LOWER] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , 1 ,EXLM, AT ,HASH,DLR , PERC,CIRC,AMPR,ASTR, 0 , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , LT ,LCBR,LPRN,LBRC, RBRC,RPRN,RCBR, GT , , , - //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - , , , ,TMB7,TMB8 - // `----+----+----' `----+----+----' + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + , , LCBR , LBRC , LPRN , , , RPRN , RBRC , RCBR , , , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + F1 , F2 ,LA(F3),LG(F4),LC(F5), F6 , F7 ,RS(F8),RG(F9),RA(F10),F11 ,F12 , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + PSCR, , HOME , PGDN , PGUP ,END , LEFT, DOWN , UP , RGHT , , , + //`----+----+------+------+------+----+----| |----+----+------+------+-------+----+----' + , , NO , MAC ,TMB7, + // `-----+----+----' `----+----+-----' ), [_RAISE] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,F11 ,F12 ,PSCR,SLCK,PAUS, ,HOME,PGDN,PGUP,END , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , ,LEFT,DOWN, UP ,RGHT, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - TMB9, , , , , - // `----+----+----' `----+----+----' - ), - - [_ADJUST] = LAYOUT_kc( - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , ,EXTOFF, , ,EXTON, , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , ,QWER,WIN ,RST , RTOG,MAC ,EDJP, , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , , - //`----+----+----+----+----+----+----| |----+----+----+----+----+----+----' - , , , , , - // `----+----+----' `----+----+----' + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + , ,EXLM , AT ,HASH ,DLR , PERC,CIRC ,AMPR ,ASTR , , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + , 1 ,LA(2),LG(3),LC(4), 5 , 6 ,RS(7),RG(8),RA(9), 0 , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + PSCR, ,HOME ,PGDN ,PGUP ,END , LEFT,DOWN , UP ,RGHT , , , + //`----+----+-----+-----+-----+----+----| |----+----+-----+-----+-----+----+----' + , ,WIN , NO , , + // `-----+----+----' `----+----+----' ) }; #ifdef SSD1306OLED void matrix_init_keymap(void) { //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - iota_gfx_init(!has_usb()); // turns on the display +#ifdef MASTER_RIGHT + iota_gfx_init(has_usb()); // turns on the display +#else + iota_gfx_init(!has_usb()); +#endif // MASTER_RIGHT } void matrix_scan_user(void) { @@ -134,23 +82,15 @@ void matrix_scan_user(void) { uint32_t layer_state_set_keymap(uint32_t state) { rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); switch (biton32(state)) { - case _EDVORAKJ1: - case _EDVORAKJ2: - // _EDVORAKJ1 & J2 are same colored - rgblight_sethsv_noeeprom_white(); - break; case _LOWER: rgblight_sethsv_noeeprom_red(); break; case _RAISE: - rgblight_sethsv_noeeprom_blue(); - break; - case _ADJUST: rgblight_sethsv_noeeprom_green(); break; - default: // for any other layers, or the default layer - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3); - rgblight_sethsv_noeeprom_red(); + default: // for any other layers, or the default layer + rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3); + rgblight_sethsv_red(); break; } return state; diff --git a/keyboards/crkbd/keymaps/edvorakjp/oled.c b/keyboards/crkbd/keymaps/edvorakjp/oled.c index e4cccf3e7f83..cbb43d06156d 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/oled.c +++ b/keyboards/crkbd/keymaps/edvorakjp/oled.c @@ -21,11 +21,7 @@ const char *read_layer_state(void) { switch (biton32(layer_state)) { case L_BASE: - strcpy(layer_name, default_layer_state == 1UL<<_EDVORAK ? "EDVORAK" : "QWERTY"); - break; - case _EDVORAKJ1: - case _EDVORAKJ2: - strcpy(layer_name, "JP_EXT"); + strcpy(layer_name, "Default"); break; case _RAISE: strcpy(layer_name, "Raise"); @@ -33,9 +29,6 @@ const char *read_layer_state(void) { case _LOWER: strcpy(layer_name, "Lower"); break; - case _ADJUST: - strcpy(layer_name, "Adjust"); - break; default: snprintf(layer_name, sizeof(layer_name), "Undef-%ld", layer_state); } @@ -49,10 +42,7 @@ const char *read_layer_state(void) { const char *read_host_led_state(void) { static char led_str[24]; - bool ext_status = get_enable_jp_extra_layer() && get_japanese_mode(); - strcpy(led_str, ext_status ? "EXT" : " "); - - strcat(led_str, (host_keyboard_leds() & (1< +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +//#define TAPPING_FORCE_HOLD +//#define TAPPING_TERM 100 + +#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 diff --git a/keyboards/crkbd/keymaps/jarred/keymap.c b/keyboards/crkbd/keymaps/jarred/keymap.c new file mode 100644 index 000000000000..f00a735bfc56 --- /dev/null +++ b/keyboards/crkbd/keymaps/jarred/keymap.c @@ -0,0 +1,182 @@ +#include QMK_KEYBOARD_H +#include "jarred.h" + +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; +extern uint8_t is_master; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +#define LAYOUT_crkbd_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K31, K32, K33, K34, K35, K36 \ + ) + +#define LAYOUT_crkbd_wrapper(...) LAYOUT(__VA_ARGS__) + +#define QWERTY_4_CRKBD KC_LCTL, MO(_LW), KC_SPC, KC_ENT, MO(_LW), KC_RALT + +#define BLANK_4_CRKBD KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_crkbd_wrapper( + QWERTY_1_12, + QWERTY_2_12, + QWERTY_3_12, + QWERTY_4_DOX + ), + + [_LW] = LAYOUT_crkbd_wrapper( + LOWER_1_12, + LOWER_2_12, + LOWER_3_12, + LOWER_4_DOX + ), + + [_NV] = LAYOUT_crkbd_wrapper( + NAV_1_12, + NAV_2_12, + NAV_3_12, + NAV_4_DOX + ), + + [_NP] = LAYOUT_crkbd_wrapper( + NUMPAD_1_12, + NUMPAD_2_12, + NUMPAD_3_12, + NUMPAD_4_DOX + ), + + [_MS] = LAYOUT_crkbd_wrapper( + MOUSE_1_12, + MOUSE_2_12, + MOUSE_3_12, + MOUSE_4_DOX + ) +}; + +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 +} + +//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_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +char matrix_line_str[24]; + +const char *read_layer_state(void) { + uint8_t layer = biton32(layer_state); + + strcpy(matrix_line_str, "Layer: "); + + switch (layer) + { + case _QW: + strcat(matrix_line_str, "Default"); + break; + case _LW: + strcat(matrix_line_str, "Lower"); + break; + case _NV: + strcat(matrix_line_str, "Navigation"); + break; + case _NP: + strcat(matrix_line_str, "Adjust"); + break; + case _MS: + strcat(matrix_line_str, "Mouse"); + break; + default: + sprintf(matrix_line_str + strlen(matrix_line_str), "Unknown (%d)", layer); + } + + return matrix_line_str; +} + +const char *read_usb_state(void) { + + strcpy(matrix_line_str, "USB : "); + + switch (USB_DeviceState) { + case DEVICE_STATE_Unattached: + strcat(matrix_line_str, "Unattached"); + break; + case DEVICE_STATE_Suspended: + strcat(matrix_line_str, "Suspended"); + break; + case DEVICE_STATE_Configured: + strcat(matrix_line_str, "Connected"); + break; + case DEVICE_STATE_Powered: + strcat(matrix_line_str, "Powered"); + break; + case DEVICE_STATE_Default: + strcat(matrix_line_str, "Default"); + break; + case DEVICE_STATE_Addressed: + strcat(matrix_line_str, "Addressed"); + break; + default: + strcat(matrix_line_str, "Invalid"); + } + + return matrix_line_str; +} + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_usb_state()); + matrix_write_ln(matrix, read_keylogs()); + } 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_keymap(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + set_keylog(keycode, record); + } + + return true; +} diff --git a/keyboards/crkbd/keymaps/jarred/readme.md b/keyboards/crkbd/keymaps/jarred/readme.md new file mode 100644 index 000000000000..15e355bbca1d --- /dev/null +++ b/keyboards/crkbd/keymaps/jarred/readme.md @@ -0,0 +1,9 @@ +# Jarred's CRKBD Layout + +Check out [user space readme](../../../../users/jarred/readme.md) for more info + +# Build + +``` +make crkbd:jarred:avrdude +``` diff --git a/keyboards/crkbd/keymaps/jarred/rules.mk b/keyboards/crkbd/keymaps/jarred/rules.mk new file mode 100644 index 000000000000..ab6329f0ebfb --- /dev/null +++ b/keyboards/crkbd/keymaps/jarred/rules.mk @@ -0,0 +1,31 @@ + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# 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 you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + #./lib/layer_state_reader.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/crkbd/keymaps/like_jis/keymap.c b/keyboards/crkbd/keymaps/like_jis/keymap.c index b1b6c64b1ec4..41df6330f514 100644 --- a/keyboards/crkbd/keymaps/like_jis/keymap.c +++ b/keyboards/crkbd/keymaps/like_jis/keymap.c @@ -11,11 +11,6 @@ extern keymap_config_t keymap_config; -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - extern uint8_t is_master; // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -241,6 +236,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_init_user(void) { #ifdef RGBLIGHT_ENABLE RGB_current_mode = rgblight_config.mode; + UPDATE_KEYMAP_STATUS(); #endif //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h #ifdef SSD1306OLED diff --git a/keyboards/crkbd/keymaps/omgvee/config.h b/keyboards/crkbd/keymaps/omgvee/config.h index 95d5328adb8f..5699c3bebe57 100644 --- a/keyboards/crkbd/keymaps/omgvee/config.h +++ b/keyboards/crkbd/keymaps/omgvee/config.h @@ -46,3 +46,6 @@ along with this program. If not, see . #undef PRODUCT #define PRODUCT "Vee's hotswappable Helidox/Corne/CRKBD split keeb" + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/crkbd/keymaps/omgvee/keymap.c b/keyboards/crkbd/keymaps/omgvee/keymap.c index 5c4dd416e0e3..2c33d8b8c577 100644 --- a/keyboards/crkbd/keymaps/omgvee/keymap.c +++ b/keyboards/crkbd/keymaps/omgvee/keymap.c @@ -22,9 +22,9 @@ extern uint8_t is_master; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. #define _QWERTY 0 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------. ,-----------------------------------------. RST, LRST, XXXXX, XXXXX, XXXXX, ERST, MNXT, MPRV, MFFD, MRWD, XXXXX, EJCT,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - LTOG, LHUI, LSAI, LVAI, PGUP, HOME, LEFT, DOWN, UP, RIGHT, XXXXX, XXXXX,\ + LTOG, LHUI, LSAI, LVAI, PGUP, HOME, LEFT, DOWN, UP, RIGHT, XXXXX, INS,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| LMOD, LHUD, LSAD, LVAD, PGDN, END, BRID, BRIU, VOLD, VOLU, MUTE, MPLY,\ //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| @@ -240,4 +240,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - diff --git a/keyboards/crkbd/keymaps/omgvee/rules.mk b/keyboards/crkbd/keymaps/omgvee/rules.mk index 16deaf45d1de..88e43aa99f34 100644 --- a/keyboards/crkbd/keymaps/omgvee/rules.mk +++ b/keyboards/crkbd/keymaps/omgvee/rules.mk @@ -3,13 +3,14 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # +EXTRAFLAGS += -flto BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # 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 -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +NKRO_ENABLE = yes # 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 MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/ergodash/rev2/keymaps/default/config.h b/keyboards/crkbd/keymaps/rs/config.h similarity index 84% rename from keyboards/ergodash/rev2/keymaps/default/config.h rename to keyboards/crkbd/keymaps/rs/config.h index 7e7fe4f69a86..9701c2b3f2c1 100644 --- a/keyboards/ergodash/rev2/keymaps/default/config.h +++ b/keyboards/crkbd/keymaps/rs/config.h @@ -18,15 +18,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C +//#define USE_MATRIX_I2C /* Select hand configuration */ @@ -34,11 +28,17 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#endif +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 300 #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 24 +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/crkbd/keymaps/rs/keymap.c b/keyboards/crkbd/keymaps/rs/keymap.c new file mode 100644 index 000000000000..135ccb076c06 --- /dev/null +++ b/keyboards/crkbd/keymaps/rs/keymap.c @@ -0,0 +1,39 @@ +#include QMK_KEYBOARD_H +#include "rs.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+ |----+----+----+----+----+----| + LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENTS, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LALT,LGUI,SPC , BSPC,CODE,FN + // `----+----+----' `+---+----+----'c + ), + [_CODE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GRV ,EXLM, AT ,HASH, DLR,PERC, CIRC,LPLT,ASTR,RPGT,NEQL, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , 1 , 2 , 3 , 4 , 5 , MINS,LBRC, UP ,RBRC, ,BSLS, + //|----+----+----+----+----+----+ |----+----+----+----+----+----| + , 6 , 7 , 8 , 9 , 0 , AMPR,LEFT,DOWN,RGHT, ,PIPE, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , ,DOT , , , + // `----+----+----' `----+----+----' + ), + [_FN] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LTOG,LHUI,LSAI,LVAI,LRST,BRMU, VOLU, ,PGUP, , , , + //|----+----+----+----+----+----+ |----+----+----+----+----+----| + LMOD,LHUD,LSAD,LVAD,RST ,BRMD, VOLD,CTRA,PGDN,CTRE, , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , MUTE, , + // `----+----+----' `----+----+----' + ), +}; + diff --git a/keyboards/crkbd/keymaps/rs/oled.c b/keyboards/crkbd/keymaps/rs/oled.c new file mode 100644 index 000000000000..c94dff9eda9e --- /dev/null +++ b/keyboards/crkbd/keymaps/rs/oled.c @@ -0,0 +1,104 @@ +#ifdef SSD1306OLED +#include QMK_KEYBOARD_H +#include "ssd1306.h" +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +extern uint8_t is_master; + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_logo(void); +const char *read_keylog(void); +const char *read_keylogs(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); + +void matrix_scan_user(void) { iota_gfx_task(); } + +typedef struct { + uint8_t state; + char name[8]; +} LAYER_DISPLAY_NAME; + +#define LAYER_DISPLAY_MAX 5 +const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = { + {0, "Base"}, + {2, "Code"}, + {4, "Fn"}, + {6, "Fn+Code"}, + {__UINT8_MAX__, "?"}, +}; +static uint8_t layer_name_idx; +static char layer_status_buf[24] = "Layer: Base\n"; + +#ifdef RGBLIGHT_ENABLE +// Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +void update_keymap_status(void) { + snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "Layer:%s RGB: %d\n", + layer_display_name[layer_name_idx].name, rgblight_config.mode); +} +#else +void update_keymap_status(void) { + snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "Layer:%s\n", + layer_display_name[layer_name_idx].name); +} +#endif + +void matrix_init_user(void) { + iota_gfx_init(!has_usb()); // turns on the display + update_keymap_status(); +} + +// declared in users/rs/rs.c +void rgb_mod_changed_keymap(void) { + update_keymap_status(); +} + +// declared in users/rs/rs.c +void keylog_set_keymap(uint16_t keycode, keyrecord_t *record) { + set_keylog(keycode, record); +} + +uint32_t layer_state_set_user(uint32_t state) { + for (layer_name_idx = 0; layer_name_idx < LAYER_DISPLAY_MAX; ++layer_name_idx) { + if (state == 0 && layer_display_name[layer_name_idx].state == default_layer_state) { + break; + } else if (state != 0 && layer_display_name[layer_name_idx].state == state) { + break; + } + } + update_keymap_status(); + return state; +} + +static inline void render_keymap_status(struct CharacterMatrix *matrix) { + matrix_write(matrix, layer_status_buf); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + render_keymap_status(matrix); + matrix_write_ln(matrix, read_keylog()); + matrix_write_ln(matrix, read_keylogs()); + } 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 diff --git a/keyboards/crkbd/keymaps/rs/readme.md b/keyboards/crkbd/keymaps/rs/readme.md new file mode 100644 index 000000000000..d7f7bb6459ec --- /dev/null +++ b/keyboards/crkbd/keymaps/rs/readme.md @@ -0,0 +1,19 @@ +# RS40: Code Friendly 40% Keymap + +This keymap is an evolution of my previous keymap optimized for coding with a 60% keyboards like the Iris. I tried to keep the simplicity of my previous keymap with all the keys necessary for coding on a single layer in addition to the base one. + +Because I sometime have to use my internal keyboard I my macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the code layer / backspace on right command key etc. + +See [rs readme](../../../../users/rs/readme.md) for a list of other keyboards supported by this keymap. + +## Base Layer + +[![](http://poitr.us/moooMf+)](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=E&_x:8%3B&=I%3B&@_y:-0.87&x:2%3B&=W&_x:1%3B&=R&_x:6%3B&=U&_x:1%3B&=O%3B&@_y:-0.8799999999999999&x:5%3B&=T&_x:4%3B&=Y%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=Tab&_c=%236750f2&t=%2344b8b8%3B&=Q&_x:12%3B&=P&_c=%233a1ee6&t=%23b84465&a:5%3B&=+%0A%2F=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=D&_x:8%3B&=K%3B&@_y:-0.8700000000000001&x:2%3B&=S&_x:1%3B&=F&_x:6%3B&=J&_x:1%3B&=L%3B&@_y:-0.8799999999999999&x:5%3B&=G&_x:4%3B&=H%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465&a:5%3B&=Esc%0ACtrl&_c=%236750f2&t=%2344b8b8&a:7%3B&=A&_x:12&a:5%3B&=%2F:%0A%2F%3B&_c=%233a1ee6&t=%23b84465%3B&=%22%0A'%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=C&_x:8&a:5%3B&=%3C%0A,%3B&@_y:-0.8700000000000001&x:2&a:7%3B&=X&_x:1%3B&=V&_x:6%3B&=M&_x:1&a:5%3B&=%3E%0A.%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=B&_x:4%3B&=N%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Shift&_c=%236750f2&t=%2344b8b8%3B&=Z&_x:12&a:5%3B&=%3F%0A%2F%2F&_c=%233a1ee6&t=%23b84465&a:7%3B&=Enter%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=Alt%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=Cmd%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=Space%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Back%20Space%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code) + +## Code Layer + +[![](http://poitr.us/GvljvC+)](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=%23&_x:8%3B&=*%3B&@_y:-0.87&x:2%3B&=%2F@&_x:1%3B&=$&_x:6&a:5%3B&=%3C%0A(&_x:1%3B&=%3E%0A)%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=%25&_x:4%3B&=%5E%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=Tab&_c=%236750f2&t=%2344b8b8%3B&=!&_x:12%3B&=!%2F=&_c=%233a1ee6&t=%23b84465&a:5%3B&=+%0A%2F=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=3&_x:8%3B&=↑%3B&@_y:-0.8700000000000001&x:2%3B&=2&_x:1%3B&=4&_x:6&a:5%3B&=%7B%0A%5B&_x:1%3B&=%7D%0A%5D%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=5&_x:4&a:5%3B&=%2F_%0A-%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Esc%0ACtrl&_c=%236750f2&t=%2344b8b8&a:7%3B&=1&_x:12&a:5%3B&=%2F:%0A%2F%3B&_c=%233a1ee6&t=%23b84465%3B&=%7C%0A%5C%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=8&_x:8%3B&=↓%3B&@_y:-0.8700000000000001&x:2%3B&=7&_x:1%3B&=9&_x:6%3B&=←&_x:1%3B&=→%3B&@_y:-0.8799999999999999&x:5%3B&=0&_x:4%3B&=%2F&%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Shift&_c=%236750f2&t=%2344b8b8%3B&=6&_x:12&a:5%3B&=%3F%0A%2F%2F&_c=%233a1ee6&t=%23b84465&a:7%3B&=Enter%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=Alt%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=Cmd%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=.%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Back%20Space%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code) + +## Fn Layer + +[![](http://poitr.us/OXwmBK+)](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=F3&_x:8%3B&=F8%3B&@_y:-0.87&x:2%3B&=F2&_x:1%3B&=F4&_x:6%3B&=F7&_x:1%3B&=F9%3B&@_y:-0.8799999999999999&x:5%3B&=F5&_x:4%3B&=F6%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=&_c=%236750f2&t=%2344b8b8%3B&=F1&_x:12%3B&=F10&_c=%233a1ee6&t=%23b84465%3B&=F11%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8%3B&=RGB%20Value+&_x:8%3B&=Page%20Up%3B&@_y:-0.8700000000000001&x:2%3B&=RGB%20Sat+&_x:1%3B&=RGB%20Reset&_x:6%3B&=&_x:1%3B&=%3B&@_y:-0.8799999999999999&x:5%3B&=Bright+&_x:4%3B&=Vol+%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=RGB%20Toggle&_c=%236750f2&t=%2344b8b8%3B&=RGB%20Hue+&_x:12%3B&=&_c=%233a1ee6&t=%23b84465%3B&=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8%3B&=RGB%20Value-&_x:8%3B&=Page%20Down%3B&@_y:-0.8700000000000001&x:2%3B&=RGB%20Sat-&_x:1%3B&=Reset&_x:6%3B&=Ctrl+A&_x:1%3B&=Ctrl+E%3B&@_y:-0.8799999999999999&x:5%3B&=Bright-&_x:4%3B&=Vol-%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=RGB%20Mode&_c=%236750f2&t=%2344b8b8%3B&=RGB%20Hue-&_x:12%3B&=&_c=%233a1ee6&t=%23b84465%3B&=%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Mute%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code) \ No newline at end of file diff --git a/keyboards/crkbd/keymaps/rs/rules.mk b/keyboards/crkbd/keymaps/rs/rules.mk new file mode 100644 index 000000000000..683b4b70ddd1 --- /dev/null +++ b/keyboards/crkbd/keymaps/rs/rules.mk @@ -0,0 +1,32 @@ + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +TAP_DANCE_ENABLE = no + +BOOTLOADER = atmel-dfu + +# 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 you want to change the display of OLED, you need to change here +SRC += oled.c \ + ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ diff --git a/keyboards/crkbd/keymaps/thefrey/README.md b/keyboards/crkbd/keymaps/thefrey/README.md new file mode 100644 index 000000000000..69b20cfcd6a3 --- /dev/null +++ b/keyboards/crkbd/keymaps/thefrey/README.md @@ -0,0 +1,16 @@ +![the-frey-layout](https://raw.githubusercontent.com/the-frey/the-frey.github.com/master/assets/images/keyboard-layout.jpg) + +# Keyboard layout by the-frey + +This is a layout that allows access to all the paren keys easily, has a tab on the lower layer (for SUPER-TAB app switching) and some utility features like PGUP/PGDOWN and HOME/END. + +In addition, the arrows are on the lower layer and are bound to the vim keys (h,j,k,l). I've found this a productive layout for programming in emacs and hopefully you will too. + +The layout image above shows the keymap, with each key marked with all three layers: + +- The top indicates the raise layer +- The middle indicates the default layer +- The bottom indicates the lower layer + +All the keys respond as you'd expect to the 'shift' key - i.e. on a UK/GB keyboard, `/` becomes `?` and so on. + diff --git a/keyboards/crkbd/keymaps/thefrey/config.h b/keyboards/crkbd/keymaps/thefrey/config.h new file mode 100644 index 000000000000..cee901fc816e --- /dev/null +++ b/keyboards/crkbd/keymaps/thefrey/config.h @@ -0,0 +1,45 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C +#define FORCE_NKRO + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#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 diff --git a/keyboards/crkbd/keymaps/thefrey/keymap.c b/keyboards/crkbd/keymaps/thefrey/keymap.c new file mode 100644 index 000000000000..9a142a924ae4 --- /dev/null +++ b/keyboards/crkbd/keymaps/thefrey/keymap.c @@ -0,0 +1,243 @@ +#include QMK_KEYBOARD_H +#include "bootloader.h" +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + BACKLIT, + RGBRST +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +#define KC______ KC_TRNS +#define KC_XXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_RST RESET +#define KC_LRST RGBRST +#define KC_LTOG RGB_TOG +#define KC_LHUI RGB_HUI +#define KC_LHUD RGB_HUD +#define KC_LSAI RGB_SAI +#define KC_LSAD RGB_SAD +#define KC_LVAI RGB_VAI +#define KC_LVAD RGB_VAD +#define KC_LMOD RGB_MOD +#define KC_CTLTB CTL_T(KC_TAB) +#define KC_GUIEI GUI_T(KC_LANG2) +#define KC_ALTKN ALT_T(KC_LANG1) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + TAB, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, MUTE, VOLD, VOLU, PGUP, PGDN, LEFT, DOWN, UP, RIGHT, HOME, END,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, XXXXX,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + ESC, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, GRV,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, BSLS, TILD,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ) +}; + +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_config.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 QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + 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; + break; + 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; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} diff --git a/keyboards/crkbd/keymaps/thefrey/rules.mk b/keyboards/crkbd/keymaps/thefrey/rules.mk new file mode 100644 index 000000000000..16deaf45d1de --- /dev/null +++ b/keyboards/crkbd/keymaps/thefrey/rules.mk @@ -0,0 +1,31 @@ + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# 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 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 \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/crkbd/lib/layer_state_reader.c b/keyboards/crkbd/lib/layer_state_reader.c index 3249d650b76e..63d80b136ccf 100644 --- a/keyboards/crkbd/lib/layer_state_reader.c +++ b/keyboards/crkbd/lib/layer_state_reader.c @@ -3,12 +3,12 @@ #include #include "crkbd.h" +// in the future, should use (1U<<_LAYER_NAME) instead, but needs to be moved to keymap,c #define L_BASE 0 -#define L_LOWER 4 -#define L_RAISE 8 -#define L_FUNC 16 -#define L_ADJUST 65536 -#define L_ADJUST_TRI 65560 +#define L_LOWER 2 +#define L_RAISE 4 +#define L_ADJUST 8 +#define L_ADJUST_TRI 14 char layer_state_str[24]; @@ -24,9 +24,6 @@ const char *read_layer_state(void) { case L_LOWER: snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower"); break; - case L_FUNC: - snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Function"); - break; case L_ADJUST: case L_ADJUST_TRI: snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); diff --git a/keyboards/crkbd/rev1/config.h b/keyboards/crkbd/rev1/config.h index 55bf5930fd2e..6564c8503d0a 100644 --- a/keyboards/crkbd/rev1/config.h +++ b/keyboards/crkbd/rev1/config.h @@ -53,7 +53,14 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 +#ifdef RGBLIGHT_ENABLE #define RGBLED_NUM 12 // Number of LEDs +#endif + +#ifdef RGB_MATRIX_ENABLE +#define RGBLED_NUM 54 // Number of LEDs +#define DRIVER_LED_TOTAL RGBLED_NUM +#endif /* * Feature disable options diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c index 6523feebade2..38ab927881ee 100644 --- a/keyboards/crkbd/rev1/rev1.c +++ b/keyboards/crkbd/rev1/rev1.c @@ -13,6 +13,106 @@ void led_set_kb(uint8_t usb_led) { } #endif +#ifdef RGB_MATRIX_ENABLE + + // Logical Layout + // Columns + // Left + // 0 1 2 3 4 5 + // ROWS + // 25 24 19 18 11 10 0 + // 03 02 01 + // 26 23 20 17 12 09 1 + // 04 05 06 + // 27 22 21 16 13 08 2 + // + // 15 14 07 3 + // + // Right + // 0 1 2 3 4 5 + // ROWS + // 25 24 19 18 11 10 4 + // 03 02 01 + // 26 23 20 17 12 09 5 + // 04 05 06 + // 27 22 21 16 13 08 6 + // + // 15 14 07 7 + // + // Physical Layout + // Columns + // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 + // ROWS + // 25 24 19 18 11 10 10 11 18 19 24 25 0 + // 03 02 01 01 02 03 + // 26 23 20 17 12 09 09 12 17 20 23 26 1 + // 04 04 + // 27 22 21 16 13 08 08 13 16 21 22 27 2 + // 05 06 06 05 + // 15 14 07 07 14 15 3 + + +#ifdef RGB_MATRIX_SPLIT_RIGHT +led_config_t g_led_config = { { + { 51, 50, 45, 44, 37, 36, NO_LED }, + { 52, 49, 46, 43, 38, 35, NO_LED }, + { 53, 48, 47, 42, 39, 34, NO_LED }, + { NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED }, + { 24, 23, 18, 17, 10, 9, NO_LED }, + { 25, 22, 19, 16, 11, 8, NO_LED }, + { 26, 21, 20, 15, 12, 7, NO_LED }, + { NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED } +}, { + { 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, + { 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, + { 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, + { 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 }, + { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 }, + { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 }, + { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 }, + { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 } +}, { + 2, 2, 2, 2, 2, 2, 1, + 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 1, 4, + 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1 +} }; +#else +led_config_t g_led_config = { { + { 24, 23, 18, 17, 10, 9, NO_LED }, + { 25, 22, 19, 16, 11, 8, NO_LED }, + { 26, 21, 20, 15, 12, 7, NO_LED }, + { NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED }, + { 51, 50, 45, 44, 37, 36, NO_LED }, + { 52, 49, 46, 43, 38, 35, NO_LED }, + { 53, 48, 47, 42, 39, 34, NO_LED }, + { NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED } +}, { + { 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, + { 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, + { 60, 55 }, { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, + { 16, 42 }, { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }, { 139, 16 }, + { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, { 139, 39 }, + { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, { 164, 55 }, + { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, { 208, 42 }, + { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 } +}, { + 2, 2, 2, 2, 2, 2, 1, + 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 1, 4, + 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1 +} }; +#endif + +#endif void matrix_init_kb(void) { #ifdef AUDIO_ENABLE diff --git a/keyboards/crkbd/rev1/rules.mk b/keyboards/crkbd/rev1/rules.mk index 6028b5a5b95a..f12849f989dc 100644 --- a/keyboards/crkbd/rev1/rules.mk +++ b/keyboards/crkbd/rev1/rules.mk @@ -1,3 +1,9 @@ +RGB_MATRIX_SPLIT_RIGHT = no # if no, order LEDs for left hand, if yes, order LEDs for right hand + +ifeq ($(strip $(RGB_MATRIX_SPLIT_RIGHT)), yes) + OPT_DEFS += -DRGB_MATRIX_SPLIT_RIGHT +endif + SRC += rev1/matrix.c SRC += rev1/split_util.c SRC += rev1/split_scomm.c diff --git a/keyboards/crkbd/ssd1306.c b/keyboards/crkbd/ssd1306.c index 4330c8497db2..20c2738db774 100644 --- a/keyboards/crkbd/ssd1306.c +++ b/keyboards/crkbd/ssd1306.c @@ -13,7 +13,7 @@ #include "sendchar.h" #include "timer.h" -static const unsigned char font[] PROGMEM; +extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems // when testing power-on with ble. Turn it off otherwise, diff --git a/keyboards/cu24/config.h b/keyboards/cu24/config.h index 351694a111fe..1de9d33cb781 100644 --- a/keyboards/cu24/config.h +++ b/keyboards/cu24/config.h @@ -45,7 +45,7 @@ #define MATRIX_COL_PINS { F0, F1, D0, D1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL /* Backlight */ diff --git a/keyboards/cu24/keymaps/default/keymap.c b/keyboards/cu24/keymaps/default/keymap.c index 73427ee8abac..bbec2907ad16 100644 --- a/keyboards/cu24/keymaps/default/keymap.c +++ b/keyboards/cu24/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "cu24.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_grid( /* Base */ diff --git a/keyboards/cu75/keymaps/default/config.h b/keyboards/cu75/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/cu75/keymaps/default/config.h +++ b/keyboards/cu75/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/cu75/keymaps/default/keymap.c b/keyboards/cu75/keymaps/default/keymap.c index e8abbb6f1fcd..0040473fba45 100644 --- a/keyboards/cu75/keymaps/default/keymap.c +++ b/keyboards/cu75/keymaps/default/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -//Define a clearer 'transparent' key code -#define _______ KC_TRNS - enum keymap_layout { VANILLA = 0, FUNC, diff --git a/keyboards/cu75/keymaps/iso/keymap.c b/keyboards/cu75/keymaps/iso/keymap.c index 040029084685..358a1e11e5ef 100644 --- a/keyboards/cu75/keymaps/iso/keymap.c +++ b/keyboards/cu75/keymaps/iso/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -//Define a clearer 'transparent' key code -#define _______ KC_TRNS - enum keymap_layout { VANILLA = 0, FUNC, diff --git a/keyboards/daisy/config.h b/keyboards/daisy/config.h index 4698c216e1d1..f397d28da618 100644 --- a/keyboards/daisy/config.h +++ b/keyboards/daisy/config.h @@ -29,7 +29,7 @@ #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN D0 diff --git a/keyboards/dc01/arrow/config.h b/keyboards/dc01/arrow/config.h index f734d9b18968..e58967ac0855 100644 --- a/keyboards/dc01/arrow/config.h +++ b/keyboards/dc01/arrow/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, B7, D2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/dc01/left/config.h b/keyboards/dc01/left/config.h index 9a8ba1b558d6..3f51373124af 100644 --- a/keyboards/dc01/left/config.h +++ b/keyboards/dc01/left/config.h @@ -48,7 +48,7 @@ along with this program. If not, see . #define F_SCL 300000UL -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/dc01/left/matrix.c b/keyboards/dc01/left/matrix.c index cbe3b3f3d8fa..a3db220e4f6e 100644 --- a/keyboards/dc01/left/matrix.c +++ b/keyboards/dc01/left/matrix.c @@ -455,10 +455,10 @@ i2c_status_t i2c_transaction(uint8_t address, uint32_t mask, uint8_t col_offset) matrix[MATRIX_ROWS - 1] |= ((uint32_t)err << (MATRIX_COLS_SCANNED + col_offset)); //add new bits at the end } else { - i2c_stop(10); + i2c_stop(); return 1; } - i2c_stop(10); + i2c_stop(); return 0; } \ No newline at end of file diff --git a/keyboards/dc01/numpad/config.h b/keyboards/dc01/numpad/config.h index 982be66456a2..a8a24455421f 100644 --- a/keyboards/dc01/numpad/config.h +++ b/keyboards/dc01/numpad/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, B7, D2, D3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/dc01/numpad/keymaps/default/keymap.c b/keyboards/dc01/numpad/keymaps/default/keymap.c index a4461a7d4e5f..6c88d445fcb7 100644 --- a/keyboards/dc01/numpad/keymaps/default/keymap.c +++ b/keyboards/dc01/numpad/keymaps/default/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_numpad_5x4( TG(1), KC_PSLS, KC_PAST, KC_PMNS, \ diff --git a/keyboards/dc01/numpad/keymaps/ortho_5x4/keymap.c b/keyboards/dc01/numpad/keymaps/ortho_5x4/keymap.c index cde2b26e21f4..133f33cb0052 100644 --- a/keyboards/dc01/numpad/keymaps/ortho_5x4/keymap.c +++ b/keyboards/dc01/numpad/keymaps/ortho_5x4/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum custom_keycodes { KC_P00 = SAFE_RANGE }; diff --git a/keyboards/dc01/right/config.h b/keyboards/dc01/right/config.h index e7aea97a32f5..4933f58295e9 100644 --- a/keyboards/dc01/right/config.h +++ b/keyboards/dc01/right/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F1, E6, F6, F5, F4, D4, D6, D7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/deltasplit75/keymaps/default/config.h b/keyboards/deltasplit75/keymaps/default/config.h index f14678a22308..307531da667a 100644 --- a/keyboards/deltasplit75/keymaps/default/config.h +++ b/keyboards/deltasplit75/keymaps/default/config.h @@ -16,16 +16,10 @@ along with this program. If not, see . */ +#pragma once + #define USE_SERIAL #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS - - -#ifdef SUBPROJECT_v2 - #include "../../v2/config.h" -#endif -#ifdef SUBPROJECT_protosplit - #include "../../protosplit/config.h" -#endif diff --git a/keyboards/deltasplit75/keymaps/default/keymap.c b/keyboards/deltasplit75/keymaps/default/keymap.c index 8824986120c9..fc34d1cec9bf 100644 --- a/keyboards/deltasplit75/keymaps/default/keymap.c +++ b/keyboards/deltasplit75/keymaps/default/keymap.c @@ -7,11 +7,6 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear - -#define _______ KC_TRNS - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_v2( 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_INS, KC_HOME, KC_PGUP, diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c b/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c index d7857294fb4f..8eadc7aee12e 100644 --- a/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c +++ b/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c @@ -7,11 +7,6 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear - -#define _______ KC_TRNS - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer *,-----------------------------------------------------------------------. diff --git a/keyboards/deltasplit75/keymaps/mbsurfer/keymap.c b/keyboards/deltasplit75/keymaps/mbsurfer/keymap.c index d42d15da0471..cba17015de9c 100644 --- a/keyboards/deltasplit75/keymaps/mbsurfer/keymap.c +++ b/keyboards/deltasplit75/keymaps/mbsurfer/keymap.c @@ -9,9 +9,6 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer * ,---------------------------- ----------------------------------------. diff --git a/keyboards/deltasplit75/keymaps/protosplit/keymap.c b/keyboards/deltasplit75/keymaps/protosplit/keymap.c index 5505f9780293..7d6cb33949ab 100644 --- a/keyboards/deltasplit75/keymaps/protosplit/keymap.c +++ b/keyboards/deltasplit75/keymaps/protosplit/keymap.c @@ -7,11 +7,6 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear - -#define _______ KC_TRNS - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_protosplit( 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_INS, KC_HOME, KC_PGUP, diff --git a/keyboards/dichotomy/keymaps/default/keymap.c b/keyboards/dichotomy/keymaps/default/keymap.c index f3417a3fcd71..b8c7ef427450 100755 --- a/keyboards/dichotomy/keymaps/default/keymap.c +++ b/keyboards/dichotomy/keymaps/default/keymap.c @@ -1,7 +1,7 @@ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "dichotomy.h" +#include QMK_KEYBOARD_H // 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. @@ -40,10 +40,6 @@ enum dichotomy_keycodes #define GREEN_BRIGHTNESS 2 #define BLUE_BRIGHTNESS 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BS] = LAYOUT( /* Base layout, nearly qwerty but with modifications because it's not a full keyboard. Obviously. */ CK_TE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, diff --git a/keyboards/dilly/keymaps/default/config.h b/keyboards/dilly/keymaps/default/config.h deleted file mode 100644 index 7fa3bf328ec9..000000000000 --- a/keyboards/dilly/keymaps/default/config.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -#endif diff --git a/keyboards/diverge3/config.h b/keyboards/diverge3/config.h index 27938cf239a0..aa9f52fcbd36 100644 --- a/keyboards/diverge3/config.h +++ b/keyboards/diverge3/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL #define BACKLIGHT_PIN C6 diff --git a/keyboards/diverge3/keymaps/default/config.h b/keyboards/diverge3/keymaps/default/config.h index 87ce06b3b8d2..fc375f08129f 100644 --- a/keyboards/diverge3/keymaps/default/config.h +++ b/keyboards/diverge3/keymaps/default/config.h @@ -14,14 +14,9 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here #define MASTER_RIGHT #define PERMISSIVE_HOLD #define TAPPING_TERM 150 - -#endif diff --git a/keyboards/diverge3/keymaps/default/keymap.c b/keyboards/diverge3/keymaps/default/keymap.c index 1b704e87ed27..29e5576fcde3 100644 --- a/keyboards/diverge3/keymaps/default/keymap.c +++ b/keyboards/diverge3/keymaps/default/keymap.c @@ -95,9 +95,6 @@ enum custom_keycodes { PSELF_MACRO }; -// Make layer undefined do nothing -#define _______ KC_TRNS - // Macros #define KC_PMAC PAREN_MACRO #define KC_AMAC ARROW_MACRO diff --git a/keyboards/diverge3/keymaps/workman/keymap.c b/keyboards/diverge3/keymaps/workman/keymap.c index 5e681f4188d6..415df2eead52 100644 --- a/keyboards/diverge3/keymaps/workman/keymap.c +++ b/keyboards/diverge3/keymaps/workman/keymap.c @@ -22,8 +22,6 @@ extern keymap_config_t keymap_config; #define _GAME 1 #define _RAISE 2 -#define _______ KC_TRNS - #define SHIFT_MOD MOD_BIT(KC_LSFT) #define SPACE_RAISE LT(_RAISE, KC_SPC) #define ENT_RAISE LT(_RAISE, KC_ENT) @@ -209,4 +207,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, BL_BRTG, KC_MUTE, _______, _______, KC_MPRV, KC_MNXT, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______), -}; \ No newline at end of file +}; diff --git a/keyboards/divergetm2/config.h b/keyboards/divergetm2/config.h index a5b1eaa682d7..2cdc315dea78 100644 --- a/keyboards/divergetm2/config.h +++ b/keyboards/divergetm2/config.h @@ -45,7 +45,7 @@ #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/divergetm2/info.json b/keyboards/divergetm2/info.json new file mode 100644 index 000000000000..3a4389bb8275 --- /dev/null +++ b/keyboards/divergetm2/info.json @@ -0,0 +1,59 @@ +{ + "keyboard_name": "UniKeyboard Diverge TM 2", + "url": "", + "maintainer": "islandman93, xton", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"R00", "x":7, "y":0}, + {"label":"R01", "x":8, "y":0}, + {"label":"R02", "x":9, "y":0}, + {"label":"R03", "x":10, "y":0}, + {"label":"R04", "x":11, "y":0}, + {"label":"R05", "x":12, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"R10", "x":7, "y":1}, + {"label":"R11", "x":8, "y":1}, + {"label":"R12", "x":9, "y":1}, + {"label":"R13", "x":10, "y":1}, + {"label":"R14", "x":11, "y":1}, + {"label":"R15", "x":12, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"R20", "x":7, "y":2}, + {"label":"R21", "x":8, "y":2}, + {"label":"R22", "x":9, "y":2}, + {"label":"R23", "x":10, "y":2}, + {"label":"R24", "x":11, "y":2}, + {"label":"R25", "x":12, "y":2}, + {"label":"L30", "x":0, "y":3}, + {"label":"L31", "x":1, "y":3}, + {"label":"L32", "x":2, "y":3}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3, "w":2}, + {"label":"R31", "x":7, "y":3, "w":2}, + {"label":"R32", "x":9, "y":3}, + {"label":"R33", "x":10, "y":3}, + {"label":"R34", "x":11, "y":3}, + {"label":"R35", "x":12, "y":3} + ] + } + } +} diff --git a/keyboards/dk60/dk60.c b/keyboards/dk60/dk60.c index 93aeb33b4a3c..8b9dc547d4ea 100644 --- a/keyboards/dk60/dk60.c +++ b/keyboards/dk60/dk60.c @@ -1,5 +1,15 @@ #include "dk60.h" +extern inline void dk60_caps_led_on(void); +extern inline void dk60_esc_led_on(void); + +extern inline void dk60_caps_led_off(void); +extern inline void dk60_esc_led_off(void); + +extern inline void dk60_led_all_on(void); +extern inline void dk60_led_all_off(void); + + void dk60_blink_all_leds(void) { dk60_led_all_off(); diff --git a/keyboards/do60/keymaps/default/keymap.c b/keyboards/do60/keymaps/default/keymap.c index 7c66f0ac0b1f..f8e4a5e92be6 100644 --- a/keyboards/do60/keymaps/default/keymap.c +++ b/keyboards/do60/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -9,7 +8,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_SLSH, KC_UP, KC_SLSH, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_BSPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_BSPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer [1] = LAYOUT_all( @@ -17,15 +16,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, BL_TOGG,BL_ON, BL_INC, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, BL_STEP,BL_OFF, BL_DEC, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP, KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO , KC_PGUP, KC_INS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - }; - // Macros /* const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { @@ -44,4 +38,4 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // Loop void matrix_scan_user(void) { // Empty -}; \ No newline at end of file +}; diff --git a/keyboards/do60/keymaps/test/keymap.c b/keyboards/do60/keymaps/test/keymap.c index 6bac713fdafe..f145177b0fb9 100644 --- a/keyboards/do60/keymaps/test/keymap.c +++ b/keyboards/do60/keymaps/test/keymap.c @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, 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_SLSH, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer [1] = LAYOUT_all( @@ -17,15 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP, KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO , KC_PGUP, KC_INS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; -// Custom Actions - const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - }; - // Macros /* const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/donutcables/budget96/budget96.c b/keyboards/donutcables/budget96/budget96.c new file mode 100644 index 000000000000..7831a91f5234 --- /dev/null +++ b/keyboards/donutcables/budget96/budget96.c @@ -0,0 +1,80 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include "budget96.h" + +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#ifdef RGBLIGHT_ENABLE +#include "rgblight.h" +#endif + +#include + +#include "action_layer.h" +#include "i2c_master.h" +#include "quantum.h" + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} +#endif + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + + void backlight_set(uint8_t level) { + if (level == 0) { + // turn RGB LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } + } diff --git a/keyboards/donutcables/budget96/budget96.h b/keyboards/donutcables/budget96/budget96.h new file mode 100644 index 000000000000..561d0cbfa220 --- /dev/null +++ b/keyboards/donutcables/budget96/budget96.h @@ -0,0 +1,56 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k79, k78, \ + k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4D, k4E, k46, k47, k48, k49, \ + k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \ + k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2C, k2D, k26, k27, k28, k29, \ + k10, k03, k11, k12, k13, k14, k15, k64, k6E, k7E, k74, k1A, k1B, k68, k16, k17, k18, k19, \ + k00, k01, k02, k65, k75, k0A, k0B, k66, k67, k69, k06, k08, k09 \ +) \ +{ \ + { k00, k01, k02, k03, KC_NO, KC_NO, k06, KC_NO, k08, k09, k0A, k0B, KC_NO, k0D, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, KC_NO, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \ + { k50, KC_NO, k52, k53, k54, k55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k5B, k5C, k5D, k5E }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E }, \ + { k70, k71, k72, k73, k74, k75, k76, KC_NO, k78, k79, k7A, k7B, k7C, k7D, k7E }, \ +} + +#define LAYOUT_96_ansi( \ + k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k79, k78, \ + k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4E, k46, k47, k48, k49, \ + k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \ + k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2D, k26, k27, k28, k29, \ + k10, k11, k12, k13, k14, k15, k64, k6E, k7E, k74, k1A, k1B, k68, k16, k17, k18, \ + k00, k01, k02, k65, k75, k0B, k66, k67, k69, k06, k08, k09 \ +) \ +{ \ + { k00, k01, k02, KC_NO, KC_NO, KC_NO, k06, KC_NO, k08, k09, KC_NO, k0B, KC_NO, k0D, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, KC_NO, k1A, k1B, KC_NO, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, k4E }, \ + { k50, KC_NO, k52, k53, k54, k55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k5B, k5C, k5D, k5E }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E }, \ + { k70, k71, k72, k73, k74, k75, k76, KC_NO, k78, k79, k7A, k7B, k7C, k7D, k7E }, \ +} diff --git a/keyboards/donutcables/budget96/config.h b/keyboards/donutcables/budget96/config.h new file mode 100644 index 000000000000..74661d828cd2 --- /dev/null +++ b/keyboards/donutcables/budget96/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define MANUFACTURER DonutCables +#define PRODUCT budget96 + +#define RGBLED_NUM 16 + +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/donutcables/budget96/info.json b/keyboards/donutcables/budget96/info.json new file mode 100644 index 000000000000..40a942127f48 --- /dev/null +++ b/keyboards/donutcables/budget96/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "budget96", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 6, + "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}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2}, {"x":0, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3}, {"x":13.75, "y":3, "w":1.25}, {"x":15, "y":3}, {"x":16, "y":3}, {"x":17, "y":3}, {"x":18, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":16, "y":4}, {"x":17, "y":4}, {"x":18, "y":4}, {"x":0, "y":5, "w":1.25}, {"x":1.25, "y":5, "w":1.25}, {"x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"x":10, "y":5}, {"x":11, "y":5}, {"x":12, "y":5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}, {"x":16, "y":5}, {"x":17, "y":5}, {"x":18, "y":5}] + }, + + "LAYOUT_96_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}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1, "w":2}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2, "w":1.5}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2}, {"x":0, "y":3, "w":1.75}, {"x":1.75, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3, "w":2.25}, {"x":15, "y":3}, {"x":16, "y":3}, {"x":17, "y":3}, {"x":18, "y":3}, {"x":0, "y":4, "w":2.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4}, {"x":4.25, "y":4}, {"x":5.25, "y":4}, {"x":6.25, "y":4}, {"x":7.25, "y":4}, {"x":8.25, "y":4}, {"x":9.25, "y":4}, {"x":10.25, "y":4}, {"x":11.25, "y":4}, {"x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"x":15, "y":4}, {"x":16, "y":4}, {"x":17, "y":4}, {"x":0, "y":5, "w":1.25}, {"x":1.25, "y":5, "w":1.25}, {"x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"x":10, "y":5, "w":1.5}, {"x":11.5, "y":5, "w":1.5}, {"x":13, "y":5}, {"x":14, "y":5}, {"x":15, "y":5}, {"x":16, "y":5}, {"x":17, "y":5}, {"x":18, "y":4, "h":2}] + } + } +} diff --git a/keyboards/scrabblepad/keymaps/default/config.h b/keyboards/donutcables/budget96/keymaps/default/config.h similarity index 89% rename from keyboards/scrabblepad/keymaps/default/config.h rename to keyboards/donutcables/budget96/keymaps/default/config.h index 2c852d181991..a3ed4f762a6e 100644 --- a/keyboards/scrabblepad/keymaps/default/config.h +++ b/keyboards/donutcables/budget96/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/donutcables/budget96/keymaps/default/keymap.c b/keyboards/donutcables/budget96/keymaps/default/keymap.c new file mode 100644 index 000000000000..dcb79780e086 --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2018 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_96_ansi(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NLCK, KC_INS, KC_HOME, KC_PGUP, KC_PSLS, \ + 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_END, KC_PGDN, KC_PSLS, KC_PAST, \ + 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_P7, KC_P8, KC_P9, KC_PMNS, \ + 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_P4, KC_P5, KC_P6, KC_PPLS, \ + 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_P1, KC_P2, KC_P3, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT, KC_PENT), \ + +[1] = LAYOUT_96_ansi(\ + RESET, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + BL_TOGG, BL_STEP, BL_ON, BL_OFF, BL_INC, BL_DEC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, 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), \ +}; + diff --git a/keyboards/donutcables/budget96/keymaps/default/readme.md b/keyboards/donutcables/budget96/keymaps/default/readme.md new file mode 100644 index 000000000000..acbac7b4e0b4 --- /dev/null +++ b/keyboards/donutcables/budget96/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for budget96 diff --git a/keyboards/donutcables/budget96/readme.md b/keyboards/donutcables/budget96/readme.md new file mode 100644 index 000000000000..70e4d3afba7e --- /dev/null +++ b/keyboards/donutcables/budget96/readme.md @@ -0,0 +1,44 @@ +# budget96 + +96 key atmega32a keyboard. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Budget96 PCB +Hardware Availability: [DonutCables](https://donutcables.com/) + +Make example for this keyboard (after setting up your build environment): + + make donutcables/budget96:default + +Flashing + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as left control while plugging in the keyboard. + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +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). diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/donutcables/budget96/rules.mk similarity index 87% rename from keyboards/ps2avrGB/rules.mk rename to keyboards/donutcables/budget96/rules.mk index 1be9edc24f88..67697ac73337 100644 --- a/keyboards/ps2avrGB/rules.mk +++ b/keyboards/donutcables/budget96/rules.mk @@ -28,23 +28,22 @@ F_CPU = 12000000 # This definition is optional, and if your keyboard supports multiple bootloaders of # different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. -BOOTLOADER = atmel-dfu +BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full -MOUSEKEY_ENABLE = no +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no +BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes RGBLIGHT_CUSTOM_DRIVER = yes OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = i2c_master.c # programming options -PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/donutcables/budget96/usbconfig.h b/keyboards/donutcables/budget96/usbconfig.h new file mode 100644 index 000000000000..223b69bb94cc --- /dev/null +++ b/keyboards/donutcables/budget96/usbconfig.h @@ -0,0 +1,394 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'D', 'o', 'n', 'u', 't', 'C', 'a', 'b', 'l', 'e', 's' +#define USB_CFG_VENDOR_NAME_LEN 11 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'b', 'u', 'd', 'g', 'e', 't', '9', '6' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + diff --git a/keyboards/donutcables/readme.md b/keyboards/donutcables/readme.md new file mode 100644 index 000000000000..d68b6a743cce --- /dev/null +++ b/keyboards/donutcables/readme.md @@ -0,0 +1,12 @@ +# Donut Cables + +Donut Cables LLC is located in North Carolina, USA. + +Website: https://donutcables.com/ + +**Contact Donut Cables at the following:** + +Email: contact@donutcables.com +Reddit: /u/donutcat_cables +Geekhack/DeskThority: donutcat +Discord: @donutcat on the #mechkeys Discord \ No newline at end of file diff --git a/keyboards/scrabblepad/config.h b/keyboards/donutcables/scrabblepad/config.h similarity index 98% rename from keyboards/scrabblepad/config.h rename to keyboards/donutcables/scrabblepad/config.h index 800b9297b5df..bf3d3db72a85 100644 --- a/keyboards/scrabblepad/config.h +++ b/keyboards/donutcables/scrabblepad/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,10 +45,10 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D6, D7, E0, E1, B7, D2, D3, D4, C0, B4, B5, B6, F0, E6, E7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -// #define BACKLIGHT_PIN +// #define BACKLIGHT_PIN // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 @@ -188,5 +187,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#endif diff --git a/keyboards/scrabblepad/info.json b/keyboards/donutcables/scrabblepad/info.json similarity index 100% rename from keyboards/scrabblepad/info.json rename to keyboards/donutcables/scrabblepad/info.json diff --git a/keyboards/donutcables/scrabblepad/keymaps/default/config.h b/keyboards/donutcables/scrabblepad/keymaps/default/config.h new file mode 100644 index 000000000000..a3ed4f762a6e --- /dev/null +++ b/keyboards/donutcables/scrabblepad/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/scrabblepad/keymaps/default/keymap.c b/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c similarity index 99% rename from keyboards/scrabblepad/keymaps/default/keymap.c rename to keyboards/donutcables/scrabblepad/keymaps/default/keymap.c index 8d110dbd5bcb..6f97d87e1ba2 100644 --- a/keyboards/scrabblepad/keymaps/default/keymap.c +++ b/keyboards/donutcables/scrabblepad/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "scrabblepad.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( /* Base */ diff --git a/keyboards/scrabblepad/keymaps/default/readme.md b/keyboards/donutcables/scrabblepad/keymaps/default/readme.md similarity index 100% rename from keyboards/scrabblepad/keymaps/default/readme.md rename to keyboards/donutcables/scrabblepad/keymaps/default/readme.md diff --git a/keyboards/scrabblepad/keymaps/random/keymap.c b/keyboards/donutcables/scrabblepad/keymaps/random/keymap.c similarity index 100% rename from keyboards/scrabblepad/keymaps/random/keymap.c rename to keyboards/donutcables/scrabblepad/keymaps/random/keymap.c diff --git a/keyboards/scrabblepad/keymaps/random/readme.md b/keyboards/donutcables/scrabblepad/keymaps/random/readme.md similarity index 100% rename from keyboards/scrabblepad/keymaps/random/readme.md rename to keyboards/donutcables/scrabblepad/keymaps/random/readme.md diff --git a/keyboards/scrabblepad/readme.md b/keyboards/donutcables/scrabblepad/readme.md similarity index 67% rename from keyboards/scrabblepad/readme.md rename to keyboards/donutcables/scrabblepad/readme.md index 0227b988fa8c..f0b05cbcedf3 100644 --- a/keyboards/scrabblepad/readme.md +++ b/keyboards/donutcables/scrabblepad/readme.md @@ -12,6 +12,6 @@ Hardware Availability: [Donut Cables](https://donutcables.com/) Make example for this keyboard (after setting up your build environment): - make scrabblepad:default + make donutcables/scrabblepad: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). diff --git a/keyboards/scrabblepad/rules.mk b/keyboards/donutcables/scrabblepad/rules.mk similarity index 100% rename from keyboards/scrabblepad/rules.mk rename to keyboards/donutcables/scrabblepad/rules.mk diff --git a/keyboards/scrabblepad/scrabblepad.c b/keyboards/donutcables/scrabblepad/scrabblepad.c similarity index 100% rename from keyboards/scrabblepad/scrabblepad.c rename to keyboards/donutcables/scrabblepad/scrabblepad.c diff --git a/keyboards/scrabblepad/scrabblepad.h b/keyboards/donutcables/scrabblepad/scrabblepad.h similarity index 98% rename from keyboards/scrabblepad/scrabblepad.h rename to keyboards/donutcables/scrabblepad/scrabblepad.h index fbe0dfc7276e..b4ac8b2c4f53 100644 --- a/keyboards/scrabblepad/scrabblepad.h +++ b/keyboards/donutcables/scrabblepad/scrabblepad.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef SCRABBLEPAD_H -#define SCRABBLEPAD_H +#pragma once #include "quantum.h" @@ -53,5 +52,3 @@ { kD0, kD1, kD2, kD3, kD4, kD5, kD6, kD7, kD8, kD9, kDA, kDB, kDC, kDD, kDE, }, \ { kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, kE8, kE9, kEA, kEB, kEC, kED, kEE } \ } - -#endif diff --git a/keyboards/doro67/multi/config.h b/keyboards/doro67/multi/config.h new file mode 100644 index 000000000000..4a15063cc26e --- /dev/null +++ b/keyboards/doro67/multi/config.h @@ -0,0 +1,33 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xD070 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Backprop Studio +#define PRODUCT Doro67 Multi PCB +#define DESCRIPTION 65% custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 7 diff --git a/keyboards/doro67/multi/info.json b/keyboards/doro67/multi/info.json new file mode 100644 index 000000000000..03252140dd56 --- /dev/null +++ b/keyboards/doro67/multi/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Doro67 Multi PCB", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_ansi": { + "layout": [{"label":"Esc", "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":"Ins", "x":15, "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":"Del", "x":15, "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":"PgUp", "x":15, "y":2}, {"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":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "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":"MO(1)", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + }, + "LAYOUT_iso": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"Ins", "x":15, "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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Del", "x":15, "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":"~", "x":12.75, "y":2}, {"label":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"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":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "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":"MO(1)", "x":11.25, "y":4, "w":1.25}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + }, + "LAYOUT_multi": { + "layout": [{"label":"Esc", "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":"Back", "x":13, "y":0}, {"label":"F2", "x":14, "y":0}, {"label":"Ins", "x":15, "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":"Del", "x":15, "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":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"F1", "x":1.25, "y":3}, {"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":1.75}, {"label":"Up", "x":14, "y":3}, {"label":"PgDn", "x":15, "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":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"label":"Alt", "x":10, "y":4}, {"label":"MO(1)", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"Left", "x":13, "y":4}, {"label":"Down", "x":14, "y":4}, {"label":"Right", "x":15, "y":4}] + } + } +} diff --git a/keyboards/doro67/multi/keymaps/default/keymap.c b/keyboards/doro67/multi/keymaps/default/keymap.c new file mode 100644 index 000000000000..dd40a6c3faa9 --- /dev/null +++ b/keyboards/doro67/multi/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2019 ShadeDream + * + * 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 . + */ +#include QMK_KEYBOARD_H + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + 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_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + BL_TOGG, BL_STEP, BL_DEC, BL_INC, 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 + ), + +}; diff --git a/keyboards/doro67/multi/keymaps/default/readme.md b/keyboards/doro67/multi/keymaps/default/readme.md new file mode 100644 index 000000000000..9b9136b34416 --- /dev/null +++ b/keyboards/doro67/multi/keymaps/default/readme.md @@ -0,0 +1,43 @@ +# Default Doro67 ANSI layout. + +**THIS IS THE DEFAULT ANSI KEYMAP (AVAILABILITY: CHINA + INTERNATIONAL GB)** +The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker). +The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose. + +The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers. +If you purchased an RGB PCB, please see the 'rgb' directory. + +This is the default ANSI layout that comes flashed on the Doro67 multi PCB with +the exception of adding backtick as it was not mapped. + +Default Layer: + +``` +,---------------------------------------------------------------. +|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|BackSp |Ins| +|---------------------------------------------------------------| +|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del| +|---------------------------------------------------------------| +|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Enter |PUp| +|---------------------------------------------------------------| +|Shift | Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn| +|---------------------------------------------------------------| +|Ctrl |GUI |Alt | Space |Alt |FN |Lft|Dwn|Rgt| +`---------------------------------------------------------------' +``` + +FN Layer: + +``` +,---------------------------------------------------------------. +|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | +|---------------------------------------------------------------| +|BLTog|Stp|Dec|Inc| | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | +`---------------------------------------------------------------' +``` diff --git a/keyboards/doro67/multi/keymaps/default_iso/keymap.c b/keyboards/doro67/multi/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..2e8d8398204f --- /dev/null +++ b/keyboards/doro67/multi/keymaps/default_iso/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2019 ShadeDream + * + * 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 . + */ +#include QMK_KEYBOARD_H + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_iso( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + 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_ENT, 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_NUHS, KC_PGUP, + 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_LSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_iso( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + BL_TOGG, BL_STEP, BL_DEC, BL_INC, 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 + ), + +}; diff --git a/keyboards/doro67/multi/keymaps/default_iso/readme.md b/keyboards/doro67/multi/keymaps/default_iso/readme.md new file mode 100644 index 000000000000..4b3d2ba4ad46 --- /dev/null +++ b/keyboards/doro67/multi/keymaps/default_iso/readme.md @@ -0,0 +1,43 @@ +# Default Doro67 ISO layout. + +**THIS IS THE DEFAULT ISO KEYMAP (AVAILABILITY: CHINA + INTERNATIONAL GB)** +The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker). +The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose. + +The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers. +If you purchased an RGB PCB, please see the 'rgb' directory. + +This is the default ISO layout that comes flashed on the Doro67 multi PCB with +the exception of adding backtick and UK ISO specific keycodes as they were not mapped. + +Default Layer: + +``` +,---------------------------------------------------------------. +|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|BackSp |Ins| +|---------------------------------------------------------------| +|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |Del| +|------------------------------------------------------|Entr|---| +|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| #| |PUp| +|---------------------------------------------------------------| +|Shft| \| Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn| +|---------------------------------------------------------------| +|Ctrl |GUI |Alt | Space |Alt |FN |Lft|Dwn|Rgt| +`---------------------------------------------------------------' +``` + +FN Layer: + +``` +,---------------------------------------------------------------. +|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | +|---------------------------------------------------------------| +|BLTog|Stp|Dec|Inc| | | | | | | | | | | | +|------------------------------------------------------| |---| +| | | | | | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | +`---------------------------------------------------------------' +``` diff --git a/keyboards/doro67/multi/keymaps/default_multi/keymap.c b/keyboards/doro67/multi/keymaps/default_multi/keymap.c new file mode 100644 index 000000000000..e57dce1ea2be --- /dev/null +++ b/keyboards/doro67/multi/keymaps/default_multi/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2019 ShadeDream + * + * 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 . + */ +#include QMK_KEYBOARD_H + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_multi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_F2, KC_INS, + 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_ENT, KC_PGUP, + KC_LSFT, KC_F1, 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, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_multi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, + BL_TOGG, BL_STEP, BL_DEC, BL_INC, 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 + ), + +}; diff --git a/keyboards/doro67/multi/keymaps/default_multi/readme.md b/keyboards/doro67/multi/keymaps/default_multi/readme.md new file mode 100644 index 000000000000..5761c006bfbc --- /dev/null +++ b/keyboards/doro67/multi/keymaps/default_multi/readme.md @@ -0,0 +1,46 @@ +# Default Doro67 Multi layout. + +**THIS IS THE DEFAULT MULTI-LAYOUT (SPLIT BACKSPACE) KEYMAP (AVAILABILITY: CHINA + INTERNATIONAL GB)** +The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker). +The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose. + +The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers. +If you purchased an RGB PCB, please see the 'rgb' directory. + +This is the default Multi layout that comes flashed on the Doro67 multi PCB with +the exception of adding backtick as it was not mapped. + +This layout supports both the blocker and non-blocker layouts (2 & 4) with the +difference that the blocker layout lacks the right control key. + +Default Layer: + +``` +,---------------------------------------------------------------. +|Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS| F2|Ins| +|---------------------------------------------------------------| +|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del| +|---------------------------------------------------------------| +|Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Enter |PUp| +|---------------------------------------------------------------| +|Shft| F1| Z| X| C| V| B| N| M| ,| .| /| Shift| Up|PDn| +|---------------------------------------------------------------| +|Ctrl |GUI |Alt | Space |Space| Space |Alt|MO1|Ctl|Lft|Dwn|Rgt| +`---------------------------------------------------------------' +``` + +FN Layer: + +``` +,---------------------------------------------------------------. +|` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | +|---------------------------------------------------------------| +|BLTog|Stp|Dec|Inc| | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | | | | | | | +|---------------------------------------------------------------| +| | | | | | | | | | | | | +`---------------------------------------------------------------' +``` diff --git a/keyboards/doro67/multi/multi.c b/keyboards/doro67/multi/multi.c new file mode 100644 index 000000000000..14e3359c1af6 --- /dev/null +++ b/keyboards/doro67/multi/multi.c @@ -0,0 +1,50 @@ +/* Copyright 2019 ShadeDream + * + * 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 . + */ +#include "multi.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + setPinOutput(E6); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + + led_set_user(usb_led); +} diff --git a/keyboards/doro67/multi/multi.h b/keyboards/doro67/multi/multi.h new file mode 100644 index 000000000000..0b68aed42608 --- /dev/null +++ b/keyboards/doro67/multi/multi.h @@ -0,0 +1,59 @@ +/* Copyright 2019 ShadeDream + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K44, K49, K4A, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E }, \ +} + +#define LAYOUT_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K44, K49, K4A, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E }, \ +} + +#define LAYOUT_multi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K48, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K43, K44, K45, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, KC_NO, KC_NO, K48, K49, K4A, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/doro67/multi/readme.md b/keyboards/doro67/multi/readme.md new file mode 100644 index 000000000000..80465c3ac973 --- /dev/null +++ b/keyboards/doro67/multi/readme.md @@ -0,0 +1,20 @@ +# Doro67 Multi PCB + +65% custom keyboard made by 80ultraman/Alf/Backprop Studios with multiple layout support. Despite the layout options available, layout is dictated by the selected integrated plate. + +**MULTI-LAYOUT PCB (AVAILABILITY: CHINA + INTERNATIONAL GB)** +The "multi" directory includes keymaps for the multi-layout PCB, which supports ANSI, ISO, and multi (split backspace & non-blocker). +The keymap you choose from the "multi" directory must correspond to the integrated plate option you chose. + +The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers. +If you purchased an RGB PCB, please see the 'rgb' directory. + +Keyboard Maintainer: [ShadeDream](https://github.com/shadedream) +Hardware Supported: Doro67 Multi PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0) + +Make example for this keyboard (after setting up your build environment): + + make doro67/multi: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). diff --git a/keyboards/doro67/multi/rules.mk b/keyboards/doro67/multi/rules.mk new file mode 100644 index 000000000000..387ce74822c9 --- /dev/null +++ b/keyboards/doro67/multi/rules.mk @@ -0,0 +1,47 @@ +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/doro67/readme.md b/keyboards/doro67/readme.md new file mode 100644 index 000000000000..1648fbde5772 --- /dev/null +++ b/keyboards/doro67/readme.md @@ -0,0 +1,12 @@ +# Doro67 + +The Doro67 is a 65% USB C, integrated plate keyboard with blocker based on the M65-a by Keyclack/Rama. + +The [Group Buy](https://geekhack.org/index.php?topic=97265.0) was run by 80ultraman in coordination with Alf for machining and Backprop Studios for PCB design. + +There were 3 different PCBs available for this group buy. +## **Please be aware of which PCB you own and flash the correct firmware on it.** + +**Regular:** PCB made for the China GB which only had 1 layout. +**Multi:** PCB made for the international GB comprising of multiple layouts. While several layouts were possible, layout was determined by the integrated plate layout chosen by the customer. +**RGB:** PCB made for the international GB which had an identical switch matrix and layout to the regular PCB, with the addition of per key RGB LEDs. \ No newline at end of file diff --git a/keyboards/doro67/regular/config.h b/keyboards/doro67/regular/config.h new file mode 100644 index 000000000000..8c5c670da929 --- /dev/null +++ b/keyboards/doro67/regular/config.h @@ -0,0 +1,31 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Backprop Studio +#define PRODUCT Doro67 Regular PCB +#define DESCRIPTION 65% custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 } + +#define DIODE_DIRECTION COL2ROW + diff --git a/keyboards/doro67/regular/info.json b/keyboards/doro67/regular/info.json new file mode 100644 index 000000000000..68c9f5dbdf36 --- /dev/null +++ b/keyboards/doro67/regular/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 67, + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K07", "x":7, "y":0}, + {"label":"K08", "x":8, "y":0}, + {"label":"K09", "x":9, "y":0}, + {"label":"K0A", "x":10, "y":0}, + {"label":"K0B", "x":11, "y":0}, + {"label":"K0C", "x":12, "y":0}, + {"label":"K0D", "x":13, "y":0, "w":2}, + {"label":"K0E", "x":15, "y":0}, + {"label":"K10", "x":0, "y":1, "w":1.5}, + {"label":"K11", "x":1.5, "y":1}, + {"label":"K12", "x":2.5, "y":1}, + {"label":"K13", "x":3.5, "y":1}, + {"label":"K14", "x":4.5, "y":1}, + {"label":"K15", "x":5.5, "y":1}, + {"label":"K16", "x":6.5, "y":1}, + {"label":"K17", "x":7.5, "y":1}, + {"label":"K18", "x":8.5, "y":1}, + {"label":"K19", "x":9.5, "y":1}, + {"label":"K1A", "x":10.5, "y":1}, + {"label":"K1B", "x":11.5, "y":1}, + {"label":"K1C", "x":12.5, "y":1}, + {"label":"K1D", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E", "x":15, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K21", "x":1.75, "y":2}, + {"label":"K22", "x":2.75, "y":2}, + {"label":"K23", "x":3.75, "y":2}, + {"label":"K24", "x":4.75, "y":2}, + {"label":"K25", "x":5.75, "y":2}, + {"label":"K26", "x":6.75, "y":2}, + {"label":"K27", "x":7.75, "y":2}, + {"label":"K28", "x":8.75, "y":2}, + {"label":"K29", "x":9.75, "y":2}, + {"label":"K2A", "x":10.75, "y":2}, + {"label":"K2B", "x":11.75, "y":2}, + {"label":"K2D", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E", "x":15, "y":2}, + {"label":"K30", "x":0, "y":3, "w":2.25}, + {"label":"K32", "x":2.25, "y":3}, + {"label":"K33", "x":3.25, "y":3}, + {"label":"K34", "x":4.25, "y":3}, + {"label":"K35", "x":5.25, "y":3}, + {"label":"K36", "x":6.25, "y":3}, + {"label":"K37", "x":7.25, "y":3}, + {"label":"K38", "x":8.25, "y":3}, + {"label":"K39", "x":9.25, "y":3}, + {"label":"K3A", "x":10.25, "y":3}, + {"label":"K3B", "x":11.25, "y":3}, + {"label":"K3C", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D", "x":14, "y":3}, + {"label":"K3E", "x":15, "y":3}, + {"label":"K40", "x":0, "y":4, "w":1.25}, + {"label":"K41", "x":1.25, "y":4, "w":1.25}, + {"label":"K42", "x":2.5, "y":4, "w":1.25}, + {"label":"K43", "x":3.75, "y":4, "w":6.25}, + {"label":"K49", "x":10, "y":4, "w":1.25}, + {"label":"K4A", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C", "x":13, "y":4}, + {"label":"K4D", "x":14, "y":4}, + {"label":"K4E", "x":15, "y":4} + ] + } + } + } + \ No newline at end of file diff --git a/keyboards/doro67/regular/keymaps/default/config.h b/keyboards/doro67/regular/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/doro67/regular/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/doro67/regular/keymaps/default/keymap.c b/keyboards/doro67/regular/keymaps/default/keymap.c new file mode 100644 index 000000000000..5271d42c15ab --- /dev/null +++ b/keyboards/doro67/regular/keymaps/default/keymap.c @@ -0,0 +1,134 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, \ + 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_ENT, KC_PGUP, KC_LSFT, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, \ + KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( \ + 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 \ + ), + [2] = LAYOUT( \ + 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 \ + ), + [3] = LAYOUT( \ + 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 \ + ), + [4] = LAYOUT( \ + 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 \ + ), + [5] = LAYOUT( \ + 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 \ + ), + [6] = LAYOUT( \ + 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 \ + ), + [7] = LAYOUT( \ + 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 \ + ), + [8] = LAYOUT( \ + 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 \ + ), + [9] = LAYOUT( \ + 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 \ + ), + [10] = LAYOUT( \ + 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 \ + ), + [11] = LAYOUT( \ + 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 \ + ), + [12] = LAYOUT( \ + 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 \ + ), + [13] = LAYOUT( \ + 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 \ + ), + [14] = LAYOUT( \ + 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 \ + ), + [15] = LAYOUT( \ + 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 \ + ), + +}; diff --git a/keyboards/doro67/regular/keymaps/default/readme.md b/keyboards/doro67/regular/keymaps/default/readme.md new file mode 100644 index 000000000000..0af057d7800a --- /dev/null +++ b/keyboards/doro67/regular/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# The default keymap for doro67 + +**THIS IS THE DEFAULT KEYMAP DIRECTORY (AVAILABILITY: CHINA GB ONLY)** +If you are a non-china buyer, you probably have the multi PCB or rgb PCB. +Please look at the "multi" and "rgb" readme files. \ No newline at end of file diff --git a/keyboards/doro67/regular/readme.md b/keyboards/doro67/regular/readme.md new file mode 100644 index 000000000000..e2ef7bc646ba --- /dev/null +++ b/keyboards/doro67/regular/readme.md @@ -0,0 +1,19 @@ +# Doro67 Regular PCB + +65% custom keyboard made by 80ultraman/Alf/Backprop Studios available during the China Group Buy. + +This is not the PCB with RGB support. Do not flash RGB firmware for this board. + +**REGULAR PCB (AVAILABILITY: CHINA GB ONLY)* +If you are a non-china buyer, you probably have the multi PCB or rgb PCB. +Please look at the "multi" and "rgb" readme files. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Doro67 Regular PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0) + +Make example for this keyboard (after setting up your build environment): + + make doro67/regular: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). diff --git a/keyboards/doro67/regular/regular.c b/keyboards/doro67/regular/regular.c new file mode 100644 index 000000000000..719ceea6fe95 --- /dev/null +++ b/keyboards/doro67/regular/regular.c @@ -0,0 +1,47 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include "regular.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(E6); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + led_set_user(usb_led); +} diff --git a/keyboards/doro67/regular/regular.h b/keyboards/doro67/regular/regular.h new file mode 100644 index 000000000000..76d606b13a01 --- /dev/null +++ b/keyboards/doro67/regular/regular.h @@ -0,0 +1,41 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K43, K49, K4A, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E }, \ +} + diff --git a/keyboards/doro67/regular/rules.mk b/keyboards/doro67/regular/rules.mk new file mode 100644 index 000000000000..831bd0e616ae --- /dev/null +++ b/keyboards/doro67/regular/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/doro67/rgb/config.h b/keyboards/doro67/rgb/config.h new file mode 100644 index 000000000000..87a30e084727 --- /dev/null +++ b/keyboards/doro67/rgb/config.h @@ -0,0 +1,71 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Backprop Studio +#define PRODUCT Doro67 RGB PCB +#define DESCRIPTION 65% custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +// The pin connected to the data pin of the LEDs +#define RGB_DI_PIN B7 +// The number of LEDs connected +#define DRIVER_LED_TOTAL 67 + +#define RGB_MATRIX_KEYPRESSES + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define RGBLED_NUM 67 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 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 diff --git a/keyboards/doro67/rgb/info.json b/keyboards/doro67/rgb/info.json new file mode 100644 index 000000000000..2d9b79a23e1b --- /dev/null +++ b/keyboards/doro67/rgb/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Doro 67 RGB", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 67, + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K07", "x":7, "y":0}, + {"label":"K08", "x":8, "y":0}, + {"label":"K09", "x":9, "y":0}, + {"label":"K0A", "x":10, "y":0}, + {"label":"K0B", "x":11, "y":0}, + {"label":"K0C", "x":12, "y":0}, + {"label":"K0D", "x":13, "y":0, "w":2}, + {"label":"K0E", "x":15, "y":0}, + {"label":"K10", "x":0, "y":1, "w":1.5}, + {"label":"K11", "x":1.5, "y":1}, + {"label":"K12", "x":2.5, "y":1}, + {"label":"K13", "x":3.5, "y":1}, + {"label":"K14", "x":4.5, "y":1}, + {"label":"K15", "x":5.5, "y":1}, + {"label":"K16", "x":6.5, "y":1}, + {"label":"K17", "x":7.5, "y":1}, + {"label":"K18", "x":8.5, "y":1}, + {"label":"K19", "x":9.5, "y":1}, + {"label":"K1A", "x":10.5, "y":1}, + {"label":"K1B", "x":11.5, "y":1}, + {"label":"K1C", "x":12.5, "y":1}, + {"label":"K1D", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E", "x":15, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K21", "x":1.75, "y":2}, + {"label":"K22", "x":2.75, "y":2}, + {"label":"K23", "x":3.75, "y":2}, + {"label":"K24", "x":4.75, "y":2}, + {"label":"K25", "x":5.75, "y":2}, + {"label":"K26", "x":6.75, "y":2}, + {"label":"K27", "x":7.75, "y":2}, + {"label":"K28", "x":8.75, "y":2}, + {"label":"K29", "x":9.75, "y":2}, + {"label":"K2A", "x":10.75, "y":2}, + {"label":"K2B", "x":11.75, "y":2}, + {"label":"K2D", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E", "x":15, "y":2}, + {"label":"K30", "x":0, "y":3, "w":2.25}, + {"label":"K32", "x":2.25, "y":3}, + {"label":"K33", "x":3.25, "y":3}, + {"label":"K34", "x":4.25, "y":3}, + {"label":"K35", "x":5.25, "y":3}, + {"label":"K36", "x":6.25, "y":3}, + {"label":"K37", "x":7.25, "y":3}, + {"label":"K38", "x":8.25, "y":3}, + {"label":"K39", "x":9.25, "y":3}, + {"label":"K3A", "x":10.25, "y":3}, + {"label":"K3B", "x":11.25, "y":3}, + {"label":"K3C", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D", "x":14, "y":3}, + {"label":"K3E", "x":15, "y":3}, + {"label":"K40", "x":0, "y":4, "w":1.25}, + {"label":"K41", "x":1.25, "y":4, "w":1.25}, + {"label":"K42", "x":2.5, "y":4, "w":1.25}, + {"label":"K43", "x":3.75, "y":4, "w":6.25}, + {"label":"K49", "x":10, "y":4, "w":1.25}, + {"label":"K4A", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C", "x":13, "y":4}, + {"label":"K4D", "x":14, "y":4}, + {"label":"K4E", "x":15, "y":4} + ] + } + } + } + \ No newline at end of file diff --git a/keyboards/doro67/rgb/keymaps/default/config.h b/keyboards/doro67/rgb/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/doro67/rgb/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/doro67/rgb/keymaps/default/keymap.c b/keyboards/doro67/rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..d02665ae7688 --- /dev/null +++ b/keyboards/doro67/rgb/keymaps/default/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, \ + 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_ENT, KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + [1] = LAYOUT( \ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, \ + QMKBEST, QMKURL, 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, \ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_SPD, 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 \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} diff --git a/keyboards/doro67/rgb/keymaps/default/readme.md b/keyboards/doro67/rgb/keymaps/default/readme.md new file mode 100644 index 000000000000..eb5c49419d8d --- /dev/null +++ b/keyboards/doro67/rgb/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# The default keymap for rgb + +**RGB PCB (AVAILABILITY: CHINA + INTERNATIONAL GB)** +The "rgb" directory includes the keymap for the RGB PCB. + +The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers. +If you purchased a non-rgb PCB, please see the 'multi' directory. \ No newline at end of file diff --git a/keyboards/doro67/rgb/readme.md b/keyboards/doro67/rgb/readme.md new file mode 100644 index 000000000000..61c82d0d1466 --- /dev/null +++ b/keyboards/doro67/rgb/readme.md @@ -0,0 +1,23 @@ +# Doro67 RGB PCB + +65% custom keyboard made by 80ultraman/Alf/Backprop Studios with in switch RGB featuring the same switch matrix and layout as the regular PCB. + +Flashing the regular PCB firmware on this board will work, but will disable RGB lighting. + +**THIS IS THE RGB PCB DIRECTORY (AVAILABILITY: CHINA + INTERNATIONAL GB)** +The "rgb" directory includes the keymap for the RGB PCB. + +The multi-layout PCB and RGB pcb were the only two options available to NON-china buyers. +If you purchased a non-rgb PCB, please see the 'multi' directory. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Doro 67 RGB PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0) + +Make example for this keyboard (after setting up your build environment): + + make doro67/rgb:default + +**RGB Note:** The WS2812 string of LEDs starts from the `K00` key connected to pin `B7` and is connected from left to right, top to bottom, following the physical layout of the board. + +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). diff --git a/keyboards/doro67/rgb/rgb.c b/keyboards/doro67/rgb/rgb.c new file mode 100644 index 000000000000..e8c9ac632166 --- /dev/null +++ b/keyboards/doro67/rgb/rgb.c @@ -0,0 +1,84 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include "rgb.h" +#include "rgb_matrix_types.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(E6); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + led_set_user(usb_led); +} + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, + { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, + { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 }, + { 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }, + { 58, 59, 60, 61, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 62, 63, NO_LED, 64, 65, 66 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Ins + { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, { 225, 0 }, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , Del + { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, { 225, 16 }, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Pgup + { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, { 225, 32 }, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Pgdn + { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, { 225, 48 }, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Ins + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , Del + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Pgup + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Pgdn + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + 1, 1, 1, 4, 1, 1, 1, 1, 1 +} }; diff --git a/keyboards/doro67/rgb/rgb.h b/keyboards/doro67/rgb/rgb.h new file mode 100644 index 000000000000..aafba11d0e63 --- /dev/null +++ b/keyboards/doro67/rgb/rgb.h @@ -0,0 +1,41 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k49, k4A, k4C, k4D, k4E \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D, k2E }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, KC_NO, k4C, k4D, k4E }, \ +} diff --git a/keyboards/doro67/rgb/rules.mk b/keyboards/doro67/rgb/rules.mk new file mode 100644 index 000000000000..6438868dc03d --- /dev/null +++ b/keyboards/doro67/rgb/rules.mk @@ -0,0 +1,83 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +RGB_MATRIX_ENABLE = WS2812 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/dozen0/config.h b/keyboards/dozen0/config.h new file mode 100644 index 000000000000..6b0f8525a3d1 --- /dev/null +++ b/keyboards/dozen0/config.h @@ -0,0 +1,222 @@ +/* +Copyright 2019 yynmt + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yynmt +#define PRODUCT Dozen0 +#define DESCRIPTION 12 keys macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, B5, B4, E6, D7, C6, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* 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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/dozen0/dozen0.c b/keyboards/dozen0/dozen0.c new file mode 100644 index 000000000000..8b52aa898677 --- /dev/null +++ b/keyboards/dozen0/dozen0.c @@ -0,0 +1,43 @@ +/* Copyright 2019 yynmt + * + * 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 . + */ +#include "dozen0.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/dozen0/dozen0.h b/keyboards/dozen0/dozen0.h new file mode 100644 index 000000000000..e2ab35bcef88 --- /dev/null +++ b/keyboards/dozen0/dozen0.h @@ -0,0 +1,34 @@ +/* Copyright 2019 yynmt + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, \ + K06, K07, K08, K09, K10, K11 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11 }, \ +} diff --git a/keyboards/dozen0/info.json b/keyboards/dozen0/info.json new file mode 100644 index 000000000000..36eb8bec63c2 --- /dev/null +++ b/keyboards/dozen0/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Dozen0", + "url": "http://yynmt.com", + "maintainer": "yynmt", + "width": 6, + "height": 2, + "layouts": { + "LAYOUT": { + "key_count": 12, + "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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1} + ] + } + } +} diff --git a/keyboards/dozen0/keymaps/default/config.h b/keyboards/dozen0/keymaps/default/config.h new file mode 100644 index 000000000000..bab59c67e07a --- /dev/null +++ b/keyboards/dozen0/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 yynmt + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/dozen0/keymaps/default/keymap.c b/keyboards/dozen0/keymaps/default/keymap.c new file mode 100644 index 000000000000..da0aae0b02ba --- /dev/null +++ b/keyboards/dozen0/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 yynmt + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_UP, KC_DEL, KC_BSPC, \ + KC_LCTRL, KC_LSFT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_ENT \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/dozen0/keymaps/default/readme.md b/keyboards/dozen0/keymaps/default/readme.md new file mode 100644 index 000000000000..bf63c1f1ae17 --- /dev/null +++ b/keyboards/dozen0/keymaps/default/readme.md @@ -0,0 +1,8 @@ +# The default keymap for Dozen0 + +``` + ,-------------------------------------------------. +| Ctrl+X | Ctrl+C | Ctrl+V | Up | Delete | Bksp | +| Ctrl | Shift | Left | Down | Right | Enter | +`--------------------------------------------------' +``` diff --git a/keyboards/dozen0/keymaps/f12/config.h b/keyboards/dozen0/keymaps/f12/config.h new file mode 100644 index 000000000000..bab59c67e07a --- /dev/null +++ b/keyboards/dozen0/keymaps/f12/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 yynmt + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/dozen0/keymaps/f12/keymap.c b/keyboards/dozen0/keymaps/f12/keymap.c new file mode 100644 index 000000000000..bc8cd4123dda --- /dev/null +++ b/keyboards/dozen0/keymaps/f12/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 yynmt + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/dozen0/readme.md b/keyboards/dozen0/readme.md new file mode 100644 index 000000000000..7ef119246199 --- /dev/null +++ b/keyboards/dozen0/readme.md @@ -0,0 +1,15 @@ +# Dozen0 + +![Dozen0](https://raw.githubusercontent.com/yynmt/Dozen0/master/images/main_image_mx.jpg) + +Dozen0 is 12 keys macropad. + +Keyboard Maintainer: [yynmt](https://github.com/yynmt) +Hardware Supported: Dozen0 PCBs, ProMicro supported +Hardware Availability: links to where you can find this hardware + +Make example for this keyboard (after setting up your build environment): + + make dozen0: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). diff --git a/keyboards/dozen0/rules.mk b/keyboards/dozen0/rules.mk new file mode 100644 index 000000000000..383a3594b474 --- /dev/null +++ b/keyboards/dozen0/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/duck/duck_led/duck_led.c b/keyboards/duck/duck_led/duck_led.c new file mode 100644 index 000000000000..2fa920e4b611 --- /dev/null +++ b/keyboards/duck/duck_led/duck_led.c @@ -0,0 +1,7 @@ +#include +#include "duck_led.h" +#include "quantum.h" + +void show(void) { + wait_us((RES / 1000UL) + 1); +} diff --git a/keyboards/duck/duck_led/duck_led.h b/keyboards/duck/duck_led/duck_led.h new file mode 100644 index 000000000000..2546366d0c5d --- /dev/null +++ b/keyboards/duck/duck_led/duck_led.h @@ -0,0 +1,16 @@ +#pragma once + +#define RES 6000 + +#define NS_PER_SEC (1000000000L) +#define CYCLES_PER_SEC (F_CPU) +#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) +#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) + +enum Device { + Device_PCBRGB, + Device_STATUSLED +}; + +void show(void); + diff --git a/keyboards/duck/eagle_viper/readme.md b/keyboards/duck/eagle_viper/readme.md index 14fb1666983f..63623940bec8 100644 --- a/keyboards/duck/eagle_viper/readme.md +++ b/keyboards/duck/eagle_viper/readme.md @@ -2,11 +2,6 @@ Non official firmware for custom Korean keyboard with 60% key layout made by Duck. -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. - Newest version is the [Eagle/Viper V2](http://duck0113.tistory.com/127) -Make example for this keyboard (after setting up your build environment): - - make duck/eagle_viper/v2: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). diff --git a/keyboards/duck/eagle_viper/v2/config.h b/keyboards/duck/eagle_viper/v2/config.h index f454b2e0e1db..a0ce866cc354 100644 --- a/keyboards/duck/eagle_viper/v2/config.h +++ b/keyboards/duck/eagle_viper/v2/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,6 +43,9 @@ along with this program. If not, see . #define RGB_DI_PIN D6 #define RGBLED_NUM 17 +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 4 +#define BOOTMAGIC_LITE_COLUMN 10 + #define TAPPING_TERM 200 -#endif diff --git a/keyboards/duck/eagle_viper/v2/indicator_leds.c b/keyboards/duck/eagle_viper/v2/indicator_leds.c index 03a93197da6b..fc90ed3fbda7 100644 --- a/keyboards/duck/eagle_viper/v2/indicator_leds.c +++ b/keyboards/duck/eagle_viper/v2/indicator_leds.c @@ -19,19 +19,13 @@ along with this program. If not, see . #include #include #include "indicator_leds.h" - -#define RES 6000 +#include "duck_led/duck_led.h" #define LED_T1H 600 #define LED_T1L 650 #define LED_T0H 250 #define LED_T0L 1000 -#define NS_PER_SEC (1000000000L) -#define CYCLES_PER_SEC (F_CPU) -#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) -#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) - void send_bit_d4(bool bitVal) { if(bitVal) { asm volatile ( @@ -66,14 +60,12 @@ void send_bit_d4(bool bitVal) { } } -void show(void) { - _delay_us((RES / 1000UL) + 1); -} - -void send_value(uint8_t byte) { +void send_value(uint8_t byte, enum Device device) { for(uint8_t b = 0; b < 8; b++) { - send_bit_d4(byte & 0b10000000); - byte <<= 1; + if(device == Device_STATUSLED) { + send_bit_d4(byte & 0b10000000); + byte <<= 1; + } } } @@ -83,7 +75,8 @@ void indicator_leds_set(bool leds[8]) { cli(); for(led_cnt = 0; led_cnt < 8; led_cnt++) - send_value(leds[led_cnt] ? 255 : 0); + send_value(leds[led_cnt] ? 255 : 0, Device_STATUSLED); sei(); show(); } + diff --git a/keyboards/duck/eagle_viper/v2/indicator_leds.h b/keyboards/duck/eagle_viper/v2/indicator_leds.h index c174fa404da5..fe66eef6b2fc 100644 --- a/keyboards/duck/eagle_viper/v2/indicator_leds.h +++ b/keyboards/duck/eagle_viper/v2/indicator_leds.h @@ -1,2 +1 @@ void indicator_leds_set(bool leds[8]); -void show(void); diff --git a/keyboards/duck/eagle_viper/v2/matrix.c b/keyboards/duck/eagle_viper/v2/matrix.c index 7003a7ae00df..b705ae49ff3d 100644 --- a/keyboards/duck/eagle_viper/v2/matrix.c +++ b/keyboards/duck/eagle_viper/v2/matrix.c @@ -89,6 +89,9 @@ uint8_t matrix_scan(void) { bool curr_bit = rows & (1<. */ -#ifndef V2_H -#define V2_H +#pragma once #include "quantum.h" @@ -78,4 +77,3 @@ #define LAYOUT_eagle LAYOUT_60_ansi -#endif diff --git a/keyboards/duck/jetfire/config.h b/keyboards/duck/jetfire/config.h index f49a298883cb..774e28491835 100644 --- a/keyboards/duck/jetfire/config.h +++ b/keyboards/duck/jetfire/config.h @@ -31,7 +31,7 @@ along with this program. If not, see . #define MATRIX_ROWS 6 #define MATRIX_COLS 20 -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_LEVELS 1 @@ -48,6 +48,10 @@ along with this program. If not, see . /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 10 + /* 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). */ diff --git a/keyboards/duck/jetfire/backlight_led.c b/keyboards/duck/jetfire/indicator_leds.c similarity index 76% rename from keyboards/duck/jetfire/backlight_led.c rename to keyboards/duck/jetfire/indicator_leds.c index 7e9dca6e9f10..7dbdb1ff79b2 100644 --- a/keyboards/duck/jetfire/backlight_led.c +++ b/keyboards/duck/jetfire/indicator_leds.c @@ -17,21 +17,13 @@ along with this program. If not, see . #include #include #include -#include "backlight_led.h" +#include "indicator_leds.h" #include "quantum.h" -// #include "led.h" - -#define T1H 900 -#define T1L 600 -#define T0H 400 -#define T0L 900 -#define RES 6000 - -#define NS_PER_SEC (1000000000L) -#define CYCLES_PER_SEC (F_CPU) -#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) -#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) +#define LED_T1H 900 +#define LED_T1L 600 +#define LED_T0H 400 +#define LED_T0L 900 void send_bit_d4(bool bitVal) { @@ -48,8 +40,8 @@ void send_bit_d4(bool bitVal) :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (4), - [onCycles] "I" (NS_TO_CYCLES(T1H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T1L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); } else { asm volatile ( "sbi %[port], %[bit] \n\t" @@ -63,8 +55,8 @@ void send_bit_d4(bool bitVal) :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (4), - [onCycles] "I" (NS_TO_CYCLES(T0H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T0L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); } } @@ -83,8 +75,8 @@ void send_bit_d6(bool bitVal) :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (6), - [onCycles] "I" (NS_TO_CYCLES(T1H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T1L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); } else { asm volatile ( "sbi %[port], %[bit] \n\t" @@ -98,20 +90,15 @@ void send_bit_d6(bool bitVal) :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (6), - [onCycles] "I" (NS_TO_CYCLES(T0H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T0L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); } } -void show(void) -{ - _delay_us((RES / 1000UL) + 1); -} - void send_value(uint8_t byte, enum Device device) { for(uint8_t b = 0; b < 8; b++) { - if(device == Device_STATELED) { + if(device == Device_STATUSLED) { send_bit_d4(byte & 0b10000000); } if(device == Device_PCBRGB) { @@ -123,7 +110,7 @@ void send_value(uint8_t byte, enum Device device) void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device) { - send_value(g, device); send_value(r, device); + send_value(g, device); send_value(b, device); } diff --git a/keyboards/duck/jetfire/backlight_led.h b/keyboards/duck/jetfire/indicator_leds.h similarity index 70% rename from keyboards/duck/jetfire/backlight_led.h rename to keyboards/duck/jetfire/indicator_leds.h index 36d8d9aa9b3e..695e1db6d41e 100644 --- a/keyboards/duck/jetfire/backlight_led.h +++ b/keyboards/duck/jetfire/indicator_leds.h @@ -1,10 +1,6 @@ -#ifndef BACKLIGHT_LED_H -#define BACKLIGHT_LED_H +#pragma once -enum Device { - Device_PCBRGB, - Device_STATELED -}; +#include "duck_led/duck_led.h" void backlight_init_ports(void); void backlight_set_state(bool cfg[7]); @@ -13,6 +9,3 @@ void backlight_toggle_rgb(bool enabled); void backlight_set_rgb(uint8_t cfg[17][3]); void backlight_set(uint8_t level); void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device); -void show(void); - -#endif diff --git a/keyboards/duck/jetfire/jetfire.c b/keyboards/duck/jetfire/jetfire.c index 81bdb95ba1f9..0662489c6f26 100644 --- a/keyboards/duck/jetfire/jetfire.c +++ b/keyboards/duck/jetfire/jetfire.c @@ -14,9 +14,9 @@ * along with this program. If not, see . */ #include "jetfire.h" -#include "backlight_led.h" +#include "indicator_leds.h" -enum backlight_level { +enum BACKLIGHT_AREAS { BACKLIGHT_ALPHA = 0b0000001, BACKLIGHT_MOD = 0b0000010, BACKLIGHT_FROW = 0b0000100, @@ -137,15 +137,15 @@ void backlight_update_state() send_color(backlight_state_led & (1<. */ -#ifndef JETFIRE_H -#define JETFIRE_H +#pragma once #include "quantum.h" @@ -57,4 +56,3 @@ { K0A, K0B, K0C, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, K0I, KC_NO,KC_NO,KC_NO, K0M, K0N, K0O, K0P, K0Q, K0R, K0S, KC_NO } \ } -#endif diff --git a/keyboards/duck/jetfire/readme.md b/keyboards/duck/jetfire/readme.md index 34b351a7266b..8de2f5ced6fa 100644 --- a/keyboards/duck/jetfire/readme.md +++ b/keyboards/duck/jetfire/readme.md @@ -9,7 +9,7 @@ Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) Hardware Supported: Duck Jetfire PCB Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=92708.0) -To get into bootloader mode, hold the top top most key above the 2 navigation keys while connecting the USB cable. +**Reset Key:** To put the Jetfire into reset, hold top most key above the 2 navigation keys (`K5P`) while plugging in. Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/duck/jetfire/rules.mk b/keyboards/duck/jetfire/rules.mk index 8e05516df3da..c708593293a2 100644 --- a/keyboards/duck/jetfire/rules.mk +++ b/keyboards/duck/jetfire/rules.mk @@ -51,7 +51,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -70,5 +70,5 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) CUSTOM_MATRIX = yes -SRC += backlight_led.c \ - matrix.c +SRC += indicator_leds.c \ + matrix.c duck_led/duck_led.c diff --git a/keyboards/duck/lightsaver/config.h b/keyboards/duck/lightsaver/config.h index 9e3a08fbd1a5..d302fb395322 100644 --- a/keyboards/duck/lightsaver/config.h +++ b/keyboards/duck/lightsaver/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,6 +43,9 @@ along with this program. If not, see . #define RGB_DI_PIN D6 #define RGBLED_NUM 17 +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 10 + #define TAPPING_TERM 200 -#endif diff --git a/keyboards/duck/lightsaver/indicator_leds.c b/keyboards/duck/lightsaver/indicator_leds.c index 0a54e151e1d6..5d2e1ad9f638 100644 --- a/keyboards/duck/lightsaver/indicator_leds.c +++ b/keyboards/duck/lightsaver/indicator_leds.c @@ -18,17 +18,12 @@ along with this program. If not, see . #include #include #include +#include "duck_led/duck_led.h" -#define T1H 900 -#define T1L 600 -#define T0H 400 -#define T0L 900 -#define RES 6000 - -#define NS_PER_SEC (1000000000L) -#define CYCLES_PER_SEC (F_CPU) -#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) -#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) +#define LED_T1H 900 +#define LED_T1L 600 +#define LED_T0H 400 +#define LED_T0L 900 void send_bit_d4(bool bitVal) { if(bitVal) { @@ -44,8 +39,8 @@ void send_bit_d4(bool bitVal) { :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (4), - [onCycles] "I" (NS_TO_CYCLES(T1H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T1L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); } else { asm volatile ( "sbi %[port], %[bit] \n\t" @@ -59,33 +54,31 @@ void send_bit_d4(bool bitVal) { :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (4), - [onCycles] "I" (NS_TO_CYCLES(T0H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T0L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); } } -void show(void) { - _delay_us((RES / 1000UL) + 1); -} - -void send_value(uint8_t byte) { +void send_value(uint8_t byte, enum Device device) { for(uint8_t b = 0; b < 8; b++) { - send_bit_d4(byte & 0b10000000); - byte <<= 1; + if(device == Device_STATUSLED) { + send_bit_d4(byte & 0b10000000); + byte <<= 1; + } } } -void send_color(uint8_t r, uint8_t g, uint8_t b) { - send_value(g); - send_value(r); - send_value(b); +void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device) { + send_value(r, device); + send_value(g, device); + send_value(b, device); } void indicator_leds_set(bool leds[8]) { cli(); - send_color(leds[1] ? 255 : 0, leds[2] ? 255 : 0, leds[0] ? 255 : 0); - send_color(leds[4] ? 255 : 0, leds[5] ? 255 : 0, leds[3] ? 255 : 0); - send_color(leds[6] ? 255 : 0, leds[7] ? 255 : 0, 0); + send_color(leds[1] ? 255 : 0, leds[2] ? 255 : 0, leds[0] ? 255 : 0, Device_STATUSLED); + send_color(leds[4] ? 255 : 0, leds[5] ? 255 : 0, leds[3] ? 255 : 0, Device_STATUSLED); + send_color(leds[6] ? 255 : 0, leds[7] ? 255 : 0, 0, Device_STATUSLED); sei(); show(); } diff --git a/keyboards/duck/lightsaver/lightsaver.h b/keyboards/duck/lightsaver/lightsaver.h index 19fcf36bacb4..1e1185713b17 100644 --- a/keyboards/duck/lightsaver/lightsaver.h +++ b/keyboards/duck/lightsaver/lightsaver.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef LIGHTSAVER_H -#define LIGHTSAVER_H +#pragma once #include "quantum.h" @@ -37,4 +36,3 @@ /* 5 */ { K0A, K0B, K0C, NO, NO, NO, NO, NO, K0I, NO, K0K, NO, K0M, K0N, K0O, K0P, K0Q, K0R } \ } -#endif diff --git a/keyboards/duck/lightsaver/matrix.c b/keyboards/duck/lightsaver/matrix.c index a07cdd0d161a..543205c0b788 100644 --- a/keyboards/duck/lightsaver/matrix.c +++ b/keyboards/duck/lightsaver/matrix.c @@ -87,6 +87,9 @@ uint8_t matrix_scan(void) { bool curr_bit = rows & (1<. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,6 +43,8 @@ along with this program. If not, see . #define RGB_DI_PIN D6 #define RGBLED_NUM 17 -#define TAPPING_TERM 200 +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 10 -#endif +#define TAPPING_TERM 200 diff --git a/keyboards/duck/octagon/v1/matrix.c b/keyboards/duck/octagon/v1/matrix.c index 8555349943ce..233404ed30f6 100644 --- a/keyboards/duck/octagon/v1/matrix.c +++ b/keyboards/duck/octagon/v1/matrix.c @@ -84,6 +84,9 @@ uint8_t matrix_scan(void) { bool curr_bit = rows & (1<. */ -#ifndef V1_H -#define V1_H +#pragma once #include "quantum.h" @@ -49,4 +48,3 @@ { K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, KC_NO, K1M, K1N, KC_NO, K1P }, \ { K0A, K0B, K0C, KC_NO, KC_NO, K0G, KC_NO, KC_NO, K0J, K0K, K0L, KC_NO, K0M, K0N, KC_NO, K0P } \ } -#endif diff --git a/keyboards/duck/octagon/v2/config.h b/keyboards/duck/octagon/v2/config.h index 78d18d3bb3b2..4aab587f663d 100644 --- a/keyboards/duck/octagon/v2/config.h +++ b/keyboards/duck/octagon/v2/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,6 +43,9 @@ along with this program. If not, see . #define RGB_DI_PIN D6 #define RGBLED_NUM 17 +/* Set to top left most key */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 10 + #define TAPPING_TERM 200 -#endif diff --git a/keyboards/duck/octagon/v2/indicator_leds.c b/keyboards/duck/octagon/v2/indicator_leds.c index c24509f51441..116306fb7126 100644 --- a/keyboards/duck/octagon/v2/indicator_leds.c +++ b/keyboards/duck/octagon/v2/indicator_leds.c @@ -20,16 +20,10 @@ along with this program. If not, see . #include #include "indicator_leds.h" -#define T1H 900 -#define T1L 600 -#define T0H 400 -#define T0L 900 -#define RES 6000 - -#define NS_PER_SEC (1000000000L) -#define CYCLES_PER_SEC (F_CPU) -#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) -#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) +#define LED_T1H 900 +#define LED_T1L 600 +#define LED_T0H 400 +#define LED_T0L 900 void send_bit_d4(bool bitVal) { if(bitVal) { @@ -45,8 +39,8 @@ void send_bit_d4(bool bitVal) { :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (4), - [onCycles] "I" (NS_TO_CYCLES(T1H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T1L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); } else { asm volatile ( "sbi %[port], %[bit] \n\t" @@ -60,8 +54,8 @@ void send_bit_d4(bool bitVal) { :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (4), - [onCycles] "I" (NS_TO_CYCLES(T0H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T0L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); } } @@ -80,8 +74,8 @@ void send_bit_d6(bool bitVal) :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (6), - [onCycles] "I" (NS_TO_CYCLES(T1H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T1L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T1H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T1L) - 2)); } else { asm volatile ( "sbi %[port], %[bit] \n\t" @@ -95,15 +89,11 @@ void send_bit_d6(bool bitVal) :: [port] "I" (_SFR_IO_ADDR(PORTD)), [bit] "I" (6), - [onCycles] "I" (NS_TO_CYCLES(T0H) - 2), - [offCycles] "I" (NS_TO_CYCLES(T0L) - 2)); + [onCycles] "I" (NS_TO_CYCLES(LED_T0H) - 2), + [offCycles] "I" (NS_TO_CYCLES(LED_T0L) - 2)); } } -void show(void) { - _delay_us((RES / 1000UL) + 1); -} - void send_value(uint8_t byte, enum Device device) { for(uint8_t b = 0; b < 8; b++) { if(device == Device_STATUSLED) { @@ -117,8 +107,8 @@ void send_value(uint8_t byte, enum Device device) { } void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device) { - send_value(g, device); send_value(r, device); + send_value(g, device); send_value(b, device); } diff --git a/keyboards/duck/octagon/v2/indicator_leds.h b/keyboards/duck/octagon/v2/indicator_leds.h index 9bb2c8ced93f..ad3ec54f52a9 100644 --- a/keyboards/duck/octagon/v2/indicator_leds.h +++ b/keyboards/duck/octagon/v2/indicator_leds.h @@ -1,11 +1,7 @@ -enum Device { - Device_PCBRGB, - Device_STATUSLED -}; +#include "duck_led/duck_led.h" void indicator_leds_set(bool leds[8]); void backlight_toggle_rgb(bool enabled); void backlight_set_rgb(uint8_t cfg[17][3]); void backlight_init_ports(void); void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device); -void show(void); \ No newline at end of file diff --git a/keyboards/duck/octagon/v2/matrix.c b/keyboards/duck/octagon/v2/matrix.c index a63a37640ffc..e6e7046b45bc 100644 --- a/keyboards/duck/octagon/v2/matrix.c +++ b/keyboards/duck/octagon/v2/matrix.c @@ -89,6 +89,9 @@ uint8_t matrix_scan(void) { bool curr_bit = rows & (1<. */ -#ifndef V2_H -#define V2_H +#pragma once #include "quantum.h" @@ -49,4 +48,3 @@ { K1A, KC_NO, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, KC_NO, K1M, K1N, K1O, K1P, KC_NO }, \ { K0A, K0B, K0C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0J, KC_NO, K0K, K0L, K0M, K0N, K0O, K0P, KC_NO } \ } -#endif diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index 202bd1db4d4d..fb4a14c7dda5 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -386,4 +386,31 @@ { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k4b, KC_NO, k4d, k4e } \ } +/* LAYOUT_60_iso_split_space_bs_rshift + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐2d │ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │1e │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │30 |31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴───┼───┴┬────┬┴───┤ + * │40 │41 │43 │44 │46 │48 │4a │4b │4d │4e │ + * └────┴────┴────┴────────┴────┴──────────┴────┴────┴────┴────┘ +*/ +#define LAYOUT_60_iso_split_space_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k44, k46, k48, k4a, k4b, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO,k3d, k3e }, \ + { k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, KC_NO,k4d, k4e } \ +} + #endif diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index 6a30234962a8..1eb2d6c8c7bc 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -60,6 +60,10 @@ "LAYOUT_60_tsangan_hhkb": { "key_count": 62, "layout": [{"label":"Esc", "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":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_60_iso_split_space_bs_rshift": { + "key_count": 66, + "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":"Del", "x":13, "y":0, "w":1}, {"label":"Backspace", "x":14, "y":0, "w":1}, {"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":"CapsLock", "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":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"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":1.75}, {"label":"Print screen", "x":14, "y":3, "w":1}, {"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":2.25}, {"label":"FN", "x":6.00, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] } } } diff --git a/keyboards/dz60/keymaps/LEdiodes/keymap.c b/keyboards/dz60/keymaps/LEdiodes/keymap.c index 8149b255bc6f..c6a9214a0136 100644 --- a/keyboards/dz60/keymaps/LEdiodes/keymap.c +++ b/keyboards/dz60/keymaps/LEdiodes/keymap.c @@ -6,8 +6,6 @@ #define _L3 3 #define _L4 4 -#define _______ KC_TRNS - enum { TD_SPC_ENT = 0, TD_KC_LSFT_CAPS, diff --git a/keyboards/dz60/keymaps/atlacat/keymap.c b/keyboards/dz60/keymaps/atlacat/keymap.c index 72d6b04a4de0..606698b75515 100644 --- a/keyboards/dz60/keymaps/atlacat/keymap.c +++ b/keyboards/dz60/keymaps/atlacat/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define RGB_STA RGB_M_P //rgb static #define RGB_BRE RGB_M_B //rgb breathe #define RGB_RAI RGB_M_R //rgb rainbow diff --git a/keyboards/dz60/keymaps/billiams/build_flash.sh b/keyboards/dz60/keymaps/billiams/build_flash.sh new file mode 100644 index 000000000000..e7a81114415c --- /dev/null +++ b/keyboards/dz60/keymaps/billiams/build_flash.sh @@ -0,0 +1,9 @@ +# dfu-programmer atmega32u4 erase --force +# dfu-programmer atmega32u4 flash /path/to/firmware.hex +# dfu-programmer atmega32u4 reset + +# run this in the qmk_firmware directory +make dz60:billiams +dfu-programmer atmega32u4 erase --force && \ +dfu-programmer atmega32u4 flash dz60_billiams.hex && \ +dfu-programmer atmega32u4 reset \ No newline at end of file diff --git a/keyboards/dz60/keymaps/billiams/config.h b/keyboards/dz60/keymaps/billiams/config.h new file mode 100644 index 000000000000..9560d51a6f94 --- /dev/null +++ b/keyboards/dz60/keymaps/billiams/config.h @@ -0,0 +1 @@ +#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed diff --git a/keyboards/dz60/keymaps/billiams/keymap.c b/keyboards/dz60/keymaps/billiams/keymap.c new file mode 100644 index 000000000000..b1c75d9036ea --- /dev/null +++ b/keyboards/dz60/keymaps/billiams/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . |Tap(/) Shft| U | ESC | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, _______, RSFT_T(KC_SLSH) , KC_UP, KC_ESCAPE, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + /* FN Layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | + * |-----------------------------------------------------------------------------------------+ + * | |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | Left| Down| Up |Right| | | Play/Pause | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | |Scr- |Scr+ | |PG_UP|RESET| + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | HOME|PG_DN| END | + * `-----------------------------------------------------------------------------------------' + */ + + LAYOUT_directional( + _______, 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, + _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, KC_MUTE, KC__VOLDOWN, KC__VOLUP, KC_MRWD, KC_MFFD, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + KC_MPLY, _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, _______, _______, KC_PGUP, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_END + ), +}; diff --git a/keyboards/dz60/keymaps/billiams/readme.md b/keyboards/dz60/keymaps/billiams/readme.md new file mode 100644 index 000000000000..5c0431e2387a --- /dev/null +++ b/keyboards/dz60/keymaps/billiams/readme.md @@ -0,0 +1,72 @@ +## Billiam's DZ60 layout + +This layout is optimized for MacOS and is for a Build 4 DZ60 with a 2U left shift, 2U right shift and an arrow +cluster in the bottom right. Don't use this layout if you didn't get Build 4, you will enter a world of pain Donny. + +Settings: + +* The `CAPS LOCK` key is replaced with a second function key. +* The `ALT` and `CMD` keys are swapped to replicate the Mac layout. +* Del is available as `Fn` + `Backspace` +* `/ ?` are available when you tap the right shift. Otherwise RShift is shift when held down +* RESET is available as `Fn`+ ` ESC` +* Underglow toggle is available as `Fn` + `Q`. Yes your keyboard has lights even if you didn't get the LEDs. Bonus! +* vim-style arrow key bindings H J K L in layer 1 + +### Initial Installation + +I found the instructions to be longer than they had to be, and I ended up having to Google some steps anyway. These are the steps I took to get my keyboard setup, in case you are new to the process. + +1. Clone the qmk_firmware repo locally +``` +# Choose one: +git clone git@github.com:qmk/qmk_firmware.git # OR +git clone https://github.com/qmk/qmk_firmware.git +``` +2. Customize your layout by starting with a [keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps). I copied [StephenGrier](https://github.com/qmk/qmk_firmware/tree/master/keyboards/dz60/keymaps/stephengrier)'s and modified it for DZ60 Build 4 and changed a few things, like the `grave` key, `ESC` and `/`. + +3. Build your hex file +``` +make dz60:billiams # be in the qmk_firmware directory to do this +``` +A hex file `dz60_billiams.hex` will be created in the base qmk_firmware directory + +4. Before plugging in your keyboard into your computer, hold `SPACE` and `B` keys down +5. Holding those keys down, plug the keyboard into your computer, which will put the keyboard in bootlegger mode +6. If you are using [QMK toolbox](https://github.com/qmk/qmk_toolbox/releases), upload the .hex file you made above, select it and hit the flash button. For the love of all that is good and holy on Earth, don't hit the load button, that will load the default keymap and that's not what you want! Unless it is, in which case click away. + +Note: If you didn't follow my instructions in 4 and accidentally loaded the default keymap, then to `RESET` the keyboard and kick it into bootleg mode again, hold the `down arrow` key and `\`. The default layout is Build 1 and sets the `MENU` key on that build to `Fn`. `MENU` corresponds to `down arrow` in build 4. Note that you don't have to unplug the keyboard. + +Hope this helps! + +### 0 Qwerty +``` +,-----------------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bkspc | +|-----------------------------------------------------------------------------------------+ +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +|-----------------------------------------------------------------------------------------+ +| Fn | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +|-----------------------------------------------------------------------------------------+ +| Shift | Z | X | C | V | B | N | M | , | . | Tap:/ RSh | U | ESC | +|-----------------------------------------------------------------------------------------+ +| Ctrl | Alt | Cmd | Space | Alt | Fn | L | D | R | +`-----------------------------------------------------------------------------------------' +``` + +### 1 Fn Layer +``` +FN Layer +,-----------------------------------------------------------------------------------------. +| ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | +|-----------------------------------------------------------------------------------------+ +| |RBB T|RGB M| Hue-| Hue+| Sat-| Sat+| Val-| Val+| Mute | Vol-| Vol+| Prev | Next | +|-----------------------------------------------------------------------------------------+ +| | | | | | | Left| Down| Up |Right| | | Play/Pause | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | |Scr- |Scr+ | | PG_UP |RESET| +|-----------------------------------------------------------------------------------------+ +| | | | | | | HOME | PG_DN | END | +`-----------------------------------------------------------------------------------------' +``` + diff --git a/keyboards/dz60/keymaps/billypython/config.h b/keyboards/dz60/keymaps/billypython/config.h new file mode 100644 index 000000000000..4b511eb8484f --- /dev/null +++ b/keyboards/dz60/keymaps/billypython/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define LAYER_FN diff --git a/keyboards/dz60/keymaps/billypython/keymap.c b/keyboards/dz60/keymaps/billypython/keymap.c new file mode 100644 index 000000000000..78fc55f6f953 --- /dev/null +++ b/keyboards/dz60/keymaps/billypython/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H +#include "billypython.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┬───┤ + * │LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSC│ ↑ │Del│ + * ├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │RAl│FnL│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [L_BASE] = LAYOUT_directional( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSF_RCT, KC_UP, KC_DEL, \ + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC, XXXXXXX, KC_RALT, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + /* Function layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │PSc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │PgU│ ↑ │PgD│Ply│Prv│Nxt│Clear│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │M← │M↓ │M→ │MW↑│ │Hom│ ← │ ↓ │ → │End│ │ │ + * ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┬───┤ + * │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│App│PgU│Ins│ + * ├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + * │ │ │ │ MW↓ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [L_FN] = LAYOUT_directional( \ + _______, 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_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, KC_PGUP, KC_UP, KC_PGDN, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, \ + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, _______, \ + _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, KC_INS, \ + _______, _______, _______, XXXXXXX, KC_WH_D, XXXXXXX, _______, _______, KC_HOME, KC_PGDN, KC_END \ + ), +}; diff --git a/keyboards/dz60/keymaps/billypython/rules.mk b/keyboards/dz60/keymaps/billypython/rules.mk new file mode 100644 index 000000000000..3326136043fd --- /dev/null +++ b/keyboards/dz60/keymaps/billypython/rules.mk @@ -0,0 +1,8 @@ +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +RGBLIGHT_ENABLE = no +TAP_DANCE_ENABLE = yes diff --git a/keyboards/dz60/keymaps/bingocaller/config.h b/keyboards/dz60/keymaps/bingocaller/config.h new file mode 100644 index 000000000000..b04b47a30bc2 --- /dev/null +++ b/keyboards/dz60/keymaps/bingocaller/config.h @@ -0,0 +1,3 @@ +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_TIME_TO_MAX 15 diff --git a/keyboards/dz60/keymaps/bingocaller/keymap.c b/keyboards/dz60/keymaps/bingocaller/keymap.c new file mode 100644 index 000000000000..6b3317497823 --- /dev/null +++ b/keyboards/dz60/keymaps/bingocaller/keymap.c @@ -0,0 +1,93 @@ +#include QMK_KEYBOARD_H + +#define WORD_BACK A(KC_LEFT) +#define WORD_FORWARD A(KC_RIGHT) +#define DELETE_WORD_BACK A(KC_BSPACE) +#define DELETE_WORD_FORWARD A(KC_DELETE) +#define FINE_VOLUP S(A(KC__VOLUP)) +#define FINE_VOLDOWN S(A(KC__VOLDOWN)) + +enum layers { + _BASE, + _ARROWS, + _HDUE, // Home, PgDown, PgUp, End + _MOUSE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default layer: + * Space Cadet shifts (parentheses on tap) + * Caps Lock is Control on hold, Esc on tap + * Hyper/Caps Lock on Control + * Hold D to activate layer 1 + * Hold Space to activate layer 3 (Mouse keys) + * Hold FN to activate layer 4 + */ + [_BASE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, 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, + LCTL_T(KC_ESC), KC_A, KC_S, LT(_ARROWS, KC_D), KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSPO, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_NO, + ALL_T(KC_CAPS), KC_LALT, KC_LGUI, KC_NO, LT(_MOUSE, KC_SPC), KC_NO, KC_RGUI, KC_RALT, KC_NO, MO(_FN), ALL_T(KC_CAPS)), + + /* Layer 1: + * Vim arrows (HJKL) + * Vim-like move across words with W(ord), and B(eginning) + * Media controls (fine volume controls using Option+Shift) + * Backspace/Del on N/M + * Hold F to activate layer 2 + */ + [_ARROWS] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, WORD_FORWARD, _______, _______, _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC__MUTE, FINE_VOLDOWN, FINE_VOLUP, _______, + _______, _______, _______, _______, LT(_HDUE, _______), _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, WORD_BACK, KC_BSPC, KC_DEL, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + /* Layer 2: + * Home, End, Page Up, Page Down + * Delete word forward/back on W/B + */ + [_HDUE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, DELETE_WORD_FORWARD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDOWN, KC_PGUP, KC_END, _______, _______, _______, + _______, _______, _______, _______, _______, _______, DELETE_WORD_BACK, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + /* Layer 3: + * Mouse keys + * Cursor movement: HJKL + * MB 1, 2, and 3 on F, D, and S, respectively + * Mouse wheel: up (V), down (R) (reversed because of Natural Scrolling) + */ + [_MOUSE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_WH_D, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, _______, + _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + /* Layer 4: + * F1-12 + * Del on backspace + * RGB (underglow) controls + * RESET firmware on backslash + * Screen brightness: Z (decrease), X (increase) + */ + [_FN] = LAYOUT( + _______, 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, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_BRMD, KC_BRMU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + // TEMPLATE + // LAYOUT( + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; diff --git a/keyboards/dz60/keymaps/bingocaller/readme.md b/keyboards/dz60/keymaps/bingocaller/readme.md new file mode 100644 index 000000000000..d32dc626749a --- /dev/null +++ b/keyboards/dz60/keymaps/bingocaller/readme.md @@ -0,0 +1,114 @@ +# MacOS standard 60% keymap with Vim-like arrows + +This is a MacOS-specific keymap for DZ60 configured in a standard 60% ANSI layout, with a stepped Caps Lock: + +[![](https://i.imgur.com/lFP2O41.png)](http://www.keyboard-layout-editor.com/#/gists/4b156fdf2c1426bffc82fadd2b1c5634) + +**[Fully assembled 60% keyboard from KBDfans](https://kbdfans.cn/collections/fully-assembled-keyboard/products/fully-assembled-plastic-case-mechanical-keyboard)** + +## Base Layer + +``` +,-----------------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +|-----------------------------------------------------------------------------------------+ +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +|-----------------------------------------------------------------------------------------+ +| Ctrl/Esc | A | S | D/L1 | F | G | H | J | K | L | ; | ' | Enter | +|-----------------------------------------------------------------------------------------+ +| Shift/( | Z | X | C | V | B | N | M | , | . | / | Shift/) | +|-----------------------------------------------------------------------------------------+ +| Hyper | Alt | Cmd | Space/L3 | Cmd | Alt | L4 | Hyper | +`-----------------------------------------------------------------------------------------' +``` + +* Space Cadet shifts (parentheses on tap) +* Caps Lock is Control on hold, Esc on tap +* Hyper/Caps Lock on Control +* Hold D to activate layer 1 +* Hold Space to activate layer 3 (Mouse keys) +* Hold FN to activate layer 4 + +## `L1` + +``` +,-----------------------------------------------------------------------------------------. +| | | | | | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | W→ | | | | | ⏮ | ⏯ | ⏭ | 🔇 | 🔉 | 🔊 | | +|-----------------------------------------------------------------------------------------+ +| | | | | L2 | | ← | ↓ | ↑ | → | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | W← | ⌫ | ⌦ | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | +`-----------------------------------------------------------------------------------------' +``` + +* Vim arrows (HJKL) +* Vim-like move across words with W(ord), and B(eginning) +* Media controls (fine volume controls using Option+Shift) +* Backspace/Del on N/M +* Hold F to activate layer 2 + +## `L2` + +``` +,-----------------------------------------------------------------------------------------. +| | | | | | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | W⌦ | | | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | ↖ | ⇞ | ⇟ | ↘︎ | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | W⌫ | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | +`-----------------------------------------------------------------------------------------' +``` + +* Home, End, Page Up, Page Down +* Delete word forward/back on W/B + +## `L3` + +``` +,-----------------------------------------------------------------------------------------. +| | | | | | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | MWU | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | M3 | M2 | M1 | | M← | M↓ | M↑ | M→ | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | MWD | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | +`-----------------------------------------------------------------------------------------' +``` + +* Mouse keys + * Cursor movement: HJKL + * MB 1, 2, and 3 on F, D, and S, respectively + * Mouse wheel: up (V), down (R) (reversed because of Natural Scrolling) + +## `L4` + +``` +,-----------------------------------------------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ⌦ | +|-----------------------------------------------------------------------------------------+ +| |RGB_T|RGB_M|RGB_H+|RGB_H-|RGB_S+|RGB_S-|RGB_V+|RGB_V-| | | | | RESET | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | 🔅 | 🔆 | | | | | | | | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | +`-----------------------------------------------------------------------------------------' +``` + +* F1-12 +* Del on backspace +* RGB (underglow) controls +* RESET firmware on backspace +* Screen brightness: Z (decrease), X (increase) diff --git a/keyboards/dz60/keymaps/edulpn/README.md b/keyboards/dz60/keymaps/edulpn/README.md new file mode 100644 index 000000000000..221be722b1b2 --- /dev/null +++ b/keyboards/dz60/keymaps/edulpn/README.md @@ -0,0 +1,10 @@ +# Edulpn Tsangan Keymap for the DZ60 PCB + +## Additional Notes +Tsangan 60% Keymap for DZ60 + Fn layer. + +### Layout +![Edulpn Tsangan Keymap for the DZ60](https://i.imgur.com/z7HHeH7.png) + +## Build +To build the default keymap, simply run `make dz60:edulpn`. diff --git a/keyboards/dz60/keymaps/edulpn/keymap.c b/keyboards/dz60/keymaps/edulpn/keymap.c new file mode 100644 index 000000000000..74d7ca4f21d3 --- /dev/null +++ b/keyboards/dz60/keymaps/edulpn/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_tsangan_hhkb( + 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_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + [1] = LAYOUT_60_tsangan_hhkb( + 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_TRNS, RESET, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_DEL, + KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_RIGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/dz60/keymaps/hailbreno/keymap.c b/keyboards/dz60/keymaps/hailbreno/keymap.c index edc22a5a2454..130927e1267f 100644 --- a/keyboards/dz60/keymaps/hailbreno/keymap.c +++ b/keyboards/dz60/keymaps/hailbreno/keymap.c @@ -8,7 +8,6 @@ #include QMK_KEYBOARD_H #define X KC_NO -#define _______ KC_TRNS extern keymap_config_t keymap_config; diff --git a/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c b/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c index 7c17a6f5f812..a54c06f55783 100644 --- a/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c +++ b/keyboards/dz60/keymaps/iso_split-spacebar/keymap.c @@ -9,11 +9,6 @@ #include QMK_KEYBOARD_H - -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - /* * Each layer gets a name for readability. * The underscores don't mean anything - you can diff --git a/keyboards/dz60/keymaps/iso_uk/keymap.c b/keyboards/dz60/keymaps/iso_uk/keymap.c index 13e6e185947f..b725907ec85f 100644 --- a/keyboards/dz60/keymaps/iso_uk/keymap.c +++ b/keyboards/dz60/keymaps/iso_uk/keymap.c @@ -10,12 +10,6 @@ #define _CONTROL 2 // Control layer #define _CN _CONTROL -// KEYCODES -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -#define MO_FN MO(1) -#define MO_FN MO(1) #define MO_FN MO(1) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/dz60/keymaps/krusli/keymap.c b/keyboards/dz60/keymaps/krusli/keymap.c index 0ad6f1b2b540..59162675dda9 100644 --- a/keyboards/dz60/keymaps/krusli/keymap.c +++ b/keyboards/dz60/keymaps/krusli/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( diff --git a/keyboards/dz60/keymaps/macos_64/config.h b/keyboards/dz60/keymaps/macos_64/config.h new file mode 100644 index 000000000000..235ae1b2db2c --- /dev/null +++ b/keyboards/dz60/keymaps/macos_64/config.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_KEYMAP_H +#define CONFIG_KEYMAP_H + +#include "../../config.h" + +// Fix KC_GESC conflict with Cmd+Alt+Esc on macos +#define GRAVE_ESC_GUI_OVERRIDE + +#endif \ No newline at end of file diff --git a/keyboards/dz60/keymaps/macos_64/keymap.c b/keyboards/dz60/keymaps/macos_64/keymap.c new file mode 100644 index 000000000000..fd19bfe14e7c --- /dev/null +++ b/keyboards/dz60/keymaps/macos_64/keymap.c @@ -0,0 +1,42 @@ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |Shift| Up |Delete| + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Cmd | Space | Fn | Alt | Left| Down|Right| + * `-----------------------------------------------------------------------------------------' + */ + LAYOUT_all( + 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_NO, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, 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_DELETE, + KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_NO, MO(1), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), + + /* ,-----------------------------------------------------------------------------------------. + * | ` ~ | BR- | BR+ | | | | |PREV |PLAY |NEXT |MUTE | V- | V+ | Delete | + * |-----------------------------------------------------------------------------------------+ + * | | | | Up | | | | | 0 | 1 | 2 | 3 | | RESET | + * |-----------------------------------------------------------------------------------------+ + * | | | Left| Down|Right| | | | | 4 | 5 | 6 | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | 7 | 8 | 9 | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | + * `-----------------------------------------------------------------------------------------' + */ + LAYOUT_all( + KC_GRV , KC_SCROLLLOCK, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_1, KC_2, KC_3, KC_TRNS, RESET, + KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_4, KC_5, KC_6, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, 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), +}; diff --git a/keyboards/dz60/keymaps/macos_64/readme.md b/keyboards/dz60/keymaps/macos_64/readme.md new file mode 100644 index 000000000000..c559c2b3836a --- /dev/null +++ b/keyboards/dz60/keymaps/macos_64/readme.md @@ -0,0 +1,45 @@ +# MacOS 64 keymap + +This is a keymap of DZ60 configured with 64 keys for MacOS. It refers the keymap of [macos_arrow](../macos_arrow/readme.md). + +## How to use + +1. Follow the [introduction](https://docs.qmk.fm/#/) to compile the keymap +2. Download QMK Toolbox from [here](https://github.com/qmk/qmk_toolbox/releases) +3. Insert the dz60 keyboard while pressing ```Space+b``` (default) +4. Flash the firmware + +More details about flashing firmware please check the [documentation](https://docs.qmk.fm/#/) of QMK. + +## Base Layer + +``` +,-----------------------------------------------------------------------------------------. +| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | +|-----------------------------------------------------------------------------------------+ +| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | +|-----------------------------------------------------------------------------------------+ +| Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | +|-----------------------------------------------------------------------------------------+ +| Shift | Z | X | C | V | B | N | M | , | . | / |Shift| Up |Delete| +|-----------------------------------------------------------------------------------------+ +| Ctrl | Alt | Cmd | Space | Fn | Alt | Left| Down|Right| +`-----------------------------------------------------------------------------------------' +``` + +## Fn Layer + +``` +,-----------------------------------------------------------------------------------------. +| ` ~ | BR- | BR+ | | | | |PREV |PLAY |NEXT |MUTE | V- | V+ | Delete | +|-----------------------------------------------------------------------------------------+ +| | | | Up | | | | | 0 | 1 | 2 | 3 | | RESET | +|-----------------------------------------------------------------------------------------+ +| | | Left| Down|Right| | | | | 4 | 5 | 6 | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | | 7 | 8 | 9 | | | +|-----------------------------------------------------------------------------------------+ +| | | | | | | | | | +`-----------------------------------------------------------------------------------------' + +``` diff --git a/keyboards/dz60/keymaps/macos_64/rules.mk b/keyboards/dz60/keymaps/macos_64/rules.mk new file mode 100644 index 000000000000..e1cfb3e508ca --- /dev/null +++ b/keyboards/dz60/keymaps/macos_64/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/dz60/keymaps/macos_arrow/keymap.c b/keyboards/dz60/keymaps/macos_arrow/keymap.c index 81d61a59aec3..0675a7954ab3 100644 --- a/keyboards/dz60/keymaps/macos_arrow/keymap.c +++ b/keyboards/dz60/keymaps/macos_arrow/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------------+ * | Shift | Z | X | C | V | B | N | M | , | . | / | | Up |Shift| * |-----------------------------------------------------------------------------------------+ - * | Ctrl | Alt | Gui | Space / _NL |Gui/_ML| Alt | Left| Down|Right| + * | Ctrl | Alt | Gui | Space |Gui/_ML| Alt | Left| Down|Right| * `-----------------------------------------------------------------------------------------' */ [_BL] = LAYOUT_all( @@ -30,25 +30,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, LT(_FL, 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_ENT, KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_A, KC_UP, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, KC_NO, LT(_NL, KC_SPC), KC_NO, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_NO, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), /* ,-----------------------------------------------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del | * |-----------------------------------------------------------------------------------------+ - * | | | | | | | |PgUp | | | | | | | + * | | | | PgUp| | | | | Up | | | | | | * |-----------------------------------------------------------------------------------------+ - * | | | | | | | Left| Down| Up |Right| | | | + * | | |Home |PgDwn| End | | | Left| Down|Right| | | | * |-----------------------------------------------------------------------------------------+ - * | | | | | | | |PgDwn| | | | | | | + * | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------+ * | | | | | | | | | | * `-----------------------------------------------------------------------------------------' */ [_FL] = LAYOUT_all( _______, 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_NO, KC_DEL, - _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, - _______, KC_NO, _______, _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_PGUP, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, + _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), /* ,-----------------------------------------------------------------------------------------. @@ -64,30 +64,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ [_ML] = LAYOUT_all( - KC_MEDIA_EJECT, BR_DOWN, BR_UP, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______, + KC_MEDIA_EJECT, BR_DOWN, BR_UP, BL_TOGG, RGB_TOG, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - - /* ,-----------------------------------------------------------------------------------------. - * | | | | | | | | | % | ( | ) | < | > | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | * | 0 | 1 | 2 | 3 | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | . | - | 4 | 5 | 6 | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | , | = | 7 | 8 | 9 | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | - * `-----------------------------------------------------------------------------------------' - */ - [_NL] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, KC_PERCENT, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LEFT_ANGLE_BRACKET, KC_RIGHT_ANGLE_BRACKET, KC_NO, _______, - _______, _______, _______, _______, _______, _______, _______, KC_ASTERISK, KC_0, KC_1, KC_2, KC_3, _______, RESET, - _______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_MINS, KC_4, KC_5, KC_6, _______, - _______, KC_NO, _______, _______, _______, _______, _______, _______, KC_COMMA, KC_EQL, KC_7, KC_8, KC_9, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_BRTG, BL_INC, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_MODE_REVERSE, BL_DEC, RGB_MODE_FORWARD), }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/dz60/keymaps/macos_arrow/rules.mk b/keyboards/dz60/keymaps/macos_arrow/rules.mk index e1cfb3e508ca..1572f18c79a4 100644 --- a/keyboards/dz60/keymaps/macos_arrow/rules.mk +++ b/keyboards/dz60/keymaps/macos_arrow/rules.mk @@ -1,2 +1,2 @@ -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = no \ No newline at end of file +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/dz60/keymaps/marianas/keyDefinitions.h b/keyboards/dz60/keymaps/marianas/keyDefinitions.h index 010ace769473..d3aac3dcbf45 100644 --- a/keyboards/dz60/keymaps/marianas/keyDefinitions.h +++ b/keyboards/dz60/keymaps/marianas/keyDefinitions.h @@ -70,7 +70,6 @@ #define ____ KC_TRNS #define _____ KC_TRNS #define ______ KC_TRNS -#define _______ KC_TRNS #define ________ KC_TRNS #define ___________ KC_TRNS #define _________________ KC_TRNS diff --git a/keyboards/dz60/keymaps/n0velty/keymap.c b/keyboards/dz60/keymaps/n0velty/keymap.c index 7f532b7beb75..1b9c73eb9596 100644 --- a/keyboards/dz60/keymaps/n0velty/keymap.c +++ b/keyboards/dz60/keymaps/n0velty/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS //readability - #define _DL 0 //default #define _F1 1 //function 1 #define _F2 2 //function 2 diff --git a/keyboards/dz60/keymaps/olligranlund_iso/keymap.c b/keyboards/dz60/keymaps/olligranlund_iso/keymap.c new file mode 100644 index 000000000000..74953764fdc9 --- /dev/null +++ b/keyboards/dz60/keymaps/olligranlund_iso/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +/* ISO 60 layout by olligranlund +* +* This layout starts from a standard ISO 60% layout, and adds one function layer. +* If you wish to only have one wide spacebar, you can easily do that by dismissing the "side" spacebar switches. +* +* Default Layer +* ,-----------------------------------------------------------------------------------------. +* | Esc | 1 ! | 2 " | 3 § | 4 $ | 5 % | 6 & | 7 / | 8 ( | 9 ) | 0 = | ß ? | ´ ` | Del | BSPC| +* |-----------------------------------------------------------------------------------------| +* | Tab | Q | W | E | R | T | Y | U | I | O | P | Ä | + * | Enter | +* |---------------------------------------------------------------------------------- | +* | FN | A | S | D | F | G | H | J | K | L | Ö | Ü | # ' | | +* |-----------------------------------------------------------------------------------------| +* | Shift | < > | Z | X | C | V | B | N | M | , ; | . : | - _ | Shift |Shift| +* |-----------------------------------------------------------------------------------------| +* | LCtl | LGUI | LAlt | Space | Space | Space | RAlt | FN | App | RCtl | +* `-----------------------------------------------------------------------------------------' +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_60_iso_split_space_bs_rshift( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, 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, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, 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_PSCR, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL), + + LAYOUT_60_iso_split_space_bs_rshift( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, + KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_PGDOWN,KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO, + KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_RSFT, KC_CAPS, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL), + +}; diff --git a/keyboards/dz60/keymaps/olligranlund_iso/readme.md b/keyboards/dz60/keymaps/olligranlund_iso/readme.md new file mode 100644 index 000000000000..6aa4007d3871 --- /dev/null +++ b/keyboards/dz60/keymaps/olligranlund_iso/readme.md @@ -0,0 +1,6 @@ +# DZ60 with splitted parts +### by Oliver Granlund + +![Finished product](https://i.imgur.com/HlEo5Yg.jpg) + +This is still under progress, but currently works on Windows as a daily driver. \ No newline at end of file diff --git a/keyboards/dz60/keymaps/tailcall/keymap.c b/keyboards/dz60/keymaps/tailcall/keymap.c index f824e9de380d..3835b1f646eb 100644 --- a/keyboards/dz60/keymaps/tailcall/keymap.c +++ b/keyboards/dz60/keymaps/tailcall/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( diff --git a/keyboards/dz60/keymaps/zepol_layout/keymap.c b/keyboards/dz60/keymaps/zepol_layout/keymap.c new file mode 100644 index 000000000000..4caf83b67e50 --- /dev/null +++ b/keyboards/dz60/keymaps/zepol_layout/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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_NO, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, + KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_NO, MO(1), KC_RCTL), + + LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, + KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_SCROLLLOCK, KC_PAUSE, KC_HOME, KC_END, KC_INSERT, KC_PSCR, 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), + + LAYOUT( + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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), +}; diff --git a/keyboards/dztech/dz40rgb/config.h b/keyboards/dztech/dz40rgb/config.h new file mode 100644 index 000000000000..5f1502f4af17 --- /dev/null +++ b/keyboards/dztech/dz40rgb/config.h @@ -0,0 +1,32 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1220 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DZTECH +#define PRODUCT DZ40RGB +#define DESCRIPTION DZ40 ARM RGB keyboard +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define MATRIX_ROW_PINS { B13, B12, A2, A1 } +#define MATRIX_COL_PINS {A6, A7, B0, B1, C15, C14, C13, B9, B8, A8, B14, B15 } + +/* #define UNUSED_PINS {A0,A1,A2, A3,A4,A9,A10,C15,A13,A14,B2}*/ + +#define DIODE_DIRECTION COL2ROW + +#define DEBOUNCE 3 +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define DRIVER_ADDR_1 0b1010000 +#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. + +#define DRIVER_COUNT 2 diff --git a/keyboards/dztech/dz40rgb/dz40rgb.c b/keyboards/dztech/dz40rgb/dz40rgb.c new file mode 100644 index 000000000000..92e4a7cad306 --- /dev/null +++ b/keyboards/dztech/dz40rgb/dz40rgb.c @@ -0,0 +1,203 @@ +#include "dz40rgb.h" +#include "config.h" +#if defined (split_space) +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + + {0, K_13, J_13, L_13}, + {0, K_14, J_14, L_14}, + + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + + {0, H_13, G_13, I_13}, + {0, H_14, G_14, I_14}, + + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + + {0, E_13, D_13, F_13}, + {0, E_14, D_14, F_14}, + + {0, B_12, A_12, C_12}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1} + +}; + +led_config_t g_led_config = { { + { 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, + { 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 }, + { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42 } +}, { + { 223, 0 }, { 203, 0 }, { 183, 0 }, { 162, 0 }, { 142, 0 }, { 122, 0 }, { 101, 0 }, { 81, 0 }, { 61, 0 }, { 40, 0 }, { 20, 0 }, { 0, 0 }, + { 223, 10 }, { 0, 10 }, { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 }, + { 20, 21 }, { 0, 21 }, { 223, 31 }, { 0, 31 }, { 223, 42 }, { 203, 42 }, { 183, 42 }, { 162, 42 }, { 142, 42 }, { 122, 42 }, { 101, 42 }, { 81, 42 }, + { 61, 42 }, { 40, 42 }, { 20, 42 }, { 0, 42 }, { 223, 53 }, { 0, 53 }, { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 122, 63 }, + { 101, 63 }, { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1 +} }; + +#else +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + + {0, K_13, J_13, L_13}, + {0, K_14, J_14, L_14}, + + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + + {0, H_13, G_13, I_13}, + {0, H_14, G_14, I_14}, + + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + + {0, E_13, D_13, F_13}, + {0, E_14, D_14, F_14}, + + {0, B_12, A_12, C_12}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_13, A_13, C_13}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1} + +}; + +led_config_t g_led_config = { { + { 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, + { 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 }, + { 52, 51, 50, 49, 48, NO_LED, 47, 46, 45, 44, 43, 42 } +}, { + { 223, 0 }, { 203, 0 }, { 183, 0 }, { 162, 0 }, { 142, 0 }, { 122, 0 }, { 101, 0 }, { 81, 0 }, { 61, 0 }, { 40, 0 }, { 20, 0 }, { 0, 0 }, + { 223, 10 }, { 0, 10 }, { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 }, + { 20, 21 }, { 0, 21 }, { 223, 31 }, { 0, 31 }, { 223, 42 }, { 203, 42 }, { 183, 42 }, { 162, 42 }, { 142, 42 }, { 122, 42 }, { 101, 42 }, { 81, 42 }, + { 61, 42 }, { 40, 42 }, { 20, 42 }, { 0, 42 }, { 223, 53 }, { 0, 53 }, { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 111, 63 }, + { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 +} }; + +#endif + +void matrix_init_kb(void) { + matrix_init_user(); +} +void matrix_scan_kb(void) { + matrix_scan_user(); +} +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} diff --git a/keyboards/dztech/dz40rgb/dz40rgb.h b/keyboards/dztech/dz40rgb/dz40rgb.h new file mode 100644 index 000000000000..5f88a6225ad3 --- /dev/null +++ b/keyboards/dztech/dz40rgb/dz40rgb.h @@ -0,0 +1,27 @@ +#pragma once +#include "quantum.h" +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k36, k36, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_SPLIT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} diff --git a/keyboards/dztech/dz40rgb/keymaps/default/config.h b/keyboards/dztech/dz40rgb/keymaps/default/config.h new file mode 100644 index 000000000000..30bf11ed5d14 --- /dev/null +++ b/keyboards/dztech/dz40rgb/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once +#define DRIVER_1_LED_TOTAL 53 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz40rgb/keymaps/default/keymap.c b/keyboards/dztech/dz40rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..e4f56f5a8ee8 --- /dev/null +++ b/keyboards/dztech/dz40rgb/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +#include QMK_KEYBOARD_H +#define _LAYER0 0 +#define _LAYER1 1 +#define _LAYER2 2 +#define _LAYER3 3 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT( /* Base */ + 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + [_LAYER1] = LAYOUT( /* FN */ + 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, _______, + _______, _______, _______, _______, _______, _______, TO(3), KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [_LAYER2] = LAYOUT( /* FN2 */ + 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, _______, + RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [_LAYER3] = LAYOUT( /* FN3 */ + TO(0), RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + rgb_matrix_set_color( i, red, green, blue ); + } + } +} + +void rgb_matrix_indicators_user(void) { + if (!g_suspend_state) { + switch (biton32(layer_state)) { + case _LAYER1: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; + case _LAYER2: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; + case _LAYER3: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; + } + } + +} + + + + + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; + } + diff --git a/keyboards/dztech/dz40rgb/keymaps/split_space/config.h b/keyboards/dztech/dz40rgb/keymaps/split_space/config.h new file mode 100644 index 000000000000..4f35bef37365 --- /dev/null +++ b/keyboards/dztech/dz40rgb/keymaps/split_space/config.h @@ -0,0 +1,5 @@ +#pragma once +#include "../../config.h" +#define split_space +#define DRIVER_1_LED_TOTAL 54 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c b/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c new file mode 100644 index 000000000000..04c31bab1bf5 --- /dev/null +++ b/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c @@ -0,0 +1,96 @@ +#include QMK_KEYBOARD_H +#define _LAYER0 0 +#define _LAYER1 1 +#define _LAYER2 2 +#define _LAYER3 3 +#define _LAYER4 4 +#define _LAYER5 5 +#define _LAYER6 6 +#define _LAYER7 7 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT_SPLIT( /* Base */ + 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + [_LAYER1] = LAYOUT_SPLIT( /* FN */ + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), + [_LAYER2] = LAYOUT_SPLIT( /* LIGHT */ + 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), + [_LAYER3] = LAYOUT_SPLIT( /* NUMPAD */ + 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + [_LAYER4] = LAYOUT_SPLIT( /* MAC */ + 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + [_LAYER5] = LAYOUT_SPLIT( /* NEED TO DEFINE */ + 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + [_LAYER6] = LAYOUT_SPLIT( /* NEED TO DEFINE */ + 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + [_LAYER7] = LAYOUT_SPLIT( /* NEED TO DEFINE */ + 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 , + RGB_MOD, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + }; + + + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + rgb_matrix_set_color( i, red, green, blue ); + } + } +} + +void rgb_matrix_indicators_user(void) { + if (!g_suspend_state) { + switch (biton32(layer_state)) { + case _LAYER1: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; + case _LAYER2: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; + case _LAYER4: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; + case _LAYER5: + rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, false); break; + case _LAYER6: + rgb_matrix_layer_helper(0xFF, 0xFF, 0xFF, false); break; + } + } + +} + + + + + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; + } + diff --git a/keyboards/dztech/dz40rgb/rules.mk b/keyboards/dztech/dz40rgb/rules.mk new file mode 100644 index 000000000000..fc4b028d5c0f --- /dev/null +++ b/keyboards/dztech/dz40rgb/rules.mk @@ -0,0 +1,14 @@ +MCU = STM32F303 +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover +AUDIO_ENABLE = no +RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in66666666666666666666666666 diff --git a/keyboards/dztech/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h index 167b67a87d58..edf0982ab20d 100644 --- a/keyboards/dztech/dz60rgb/config.h +++ b/keyboards/dztech/dz60rgb/config.h @@ -6,7 +6,8 @@ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1219 #define DEVICE_VER 0x0001 -#define MANUFACTURER DOU +#define MANUFACTURER DZTECH + #define PRODUCT DZ60RGB #define DESCRIPTION DZ60 ARM RGB keyboard #define MATRIX_ROWS 5 @@ -20,17 +21,22 @@ #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 3 - #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended -#define RGB_MATRIX_SKIP_FRAMES 0 +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH #define DRIVER_ADDR_1 0b1010000 #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. - #define DRIVER_COUNT 2 +#if defined (dzrgb60_ansi) || defined (dzrgb60_iso) +#define DRIVER_1_LED_TOTAL 61 +#elif defined (dzrgb60_hhkb) || defined (dzrgb60_hhkb_iso) +#define DRIVER_1_LED_TOTAL 62 +#else #define DRIVER_1_LED_TOTAL 63 +#endif #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index 4a4893b8e41b..28ac7ce9e251 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -1,11 +1,7 @@ #include "dz60rgb.h" +#include "config.h" +#if defined (dzrgb60_iso) const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ {0, K_14, J_14, L_14}, {0, K_13, J_13, L_13}, {0, K_12, J_12, L_12}, @@ -20,7 +16,92 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_3, J_3, L_3}, {0, K_2, J_2, L_2}, {0, K_1, J_1, L_1}, + {0, H_15, G_15, I_15}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + {0, B_14, A_14, C_14}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, E_15, D_15, F_15}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16}, +}; + +led_config_t g_led_config = { { + { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 28 }, + { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 14 }, + { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, + { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } +}, { + { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, + { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, + { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 }, + { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 }, + { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, + 1, 4, 1, 1, 1 +} }; +#elif defined (dzrgb60_hhkb) +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, H_15, G_15, I_15}, + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, {0, H_14, G_14, I_14}, {0, H_13, G_13, I_13}, {0, H_12, G_12, I_12}, @@ -35,7 +116,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, H_3, G_3, I_3}, {0, H_2, G_2, I_2}, {0, H_1, G_1, I_1}, - {0, E_14, D_14, F_14}, {0, E_12, D_12, F_12}, {0, E_11, D_11, F_11}, @@ -49,7 +129,6 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, E_3, D_3, F_3}, {0, E_2, D_2, F_2}, {0, E_1, D_1, F_1}, - {0, B_14, A_14, C_14}, {0, B_13, A_13, C_13}, {0, B_11, A_11, C_11}, @@ -63,110 +142,312 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, B_3, A_3, C_3}, {0, B_2, A_2, C_2}, {0, B_1, A_1, C_1}, - {0, B_15, A_15, C_15}, {0, E_13, D_13, F_13}, {0, B_12, A_12, C_12}, - {0, E_15, D_15, F_15}, - {0, H_15, G_15, I_15}, {0, B_16, A_16, C_16}, {0, E_16, D_16, F_16}, {0, H_16, G_16, I_16}, {0, K_16, J_16, L_16}, }; -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - {{0|(13<<4)}, {17.23*13, 0}, 1}, - {{0|(12<<4)}, {17.23*12, 0}, 1}, - {{0|(11<<4)}, {17.23*11, 0}, 1}, - {{0|(10<<4)}, {17.23*10, 0}, 1}, - {{0|(9<<4)}, {17.23*9, 0}, 1}, - {{0|(8<<4)}, {17.23*8, 0}, 1}, - {{0|(7<<4)}, {17.23*7, 0}, 1}, - {{0|(6<<4)}, { 17.23*6, 0}, 1}, - {{0|(5<<4)}, { 17.23*5, 0}, 1}, - {{0|(4<<4)}, { 17.23*4, 0}, 1}, - {{0|(3<<4)}, { 17.23*3, 0}, 1}, - {{0|(2<<4)}, { 17.23*2, 0}, 1}, - {{0|(1<<4)}, { 17.23*1, 0}, 1}, - {{0|(0<<4)}, { 17.23*0, 0}, 1}, +led_config_t g_led_config = { { + { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, + { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 }, + { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 29 }, + { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, + { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } +}, { + { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, + { 0, 0 }, { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, + { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, + { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 }, + { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 4, 1, 1, 1 +} }; - {{1|(13<<4)}, {17.23*13, 16}, 1}, - {{1|(12<<4)}, {17.23*12, 16}, 0}, - {{1|(11<<4)}, {17.23*11, 16}, 0}, - {{1|(10<<4)}, {17.23*10, 16}, 0}, - {{1|(9<<4)}, {17.23*9, 16}, 0}, - {{1|(8<<4)}, {17.23*8, 16}, 0}, - {{1|(7<<4)}, {17.23*7, 16}, 0}, - {{1|(6<<4)}, { 17.23*6, 16}, 0}, - {{1|(5<<4)}, { 17.23*5, 16}, 0}, - {{1|(4<<4)}, { 17.23*4, 16}, 0}, - {{1|(3<<4)}, { 17.23*3, 16}, 0}, - {{1|(2<<4)}, { 17.23*2, 16}, 0}, - {{1|(1<<4)}, { 17.23*1, 16}, 0}, - {{1|(0<<4)}, { 17.23*0, 16}, 1}, +#elif defined (dzrgb60_hhkb_iso) +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, H_15, G_15, I_15}, + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + {0, K_15, J_15, L_15}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + {0, E_15, D_15, F_15}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + {0, B_14, A_14, C_14}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16}, +}; - {{2|(13<<4)}, {17.23*13, 32}, 1}, - {{2|(11<<4)}, {17.23*11, 32}, 0}, - {{2|(10<<4)}, {17.23*10, 32}, 0}, - {{2|(9<<4)}, {17.23*9, 32}, 0}, - {{2|(8<<4)}, {17.23*8, 32}, 0}, - {{2|(7<<4)}, {17.23*7, 32}, 0}, - {{2|(6<<4)}, { 17.23*6, 32}, 0}, - {{2|(5<<4)}, { 17.23*5, 32}, 0}, - {{2|(4<<4)}, { 17.23*4, 32}, 0}, - {{2|(3<<4)}, { 17.23*3, 32}, 0}, - {{2|(2<<4)}, { 17.23*2, 32}, 0}, - {{2|(1<<4)}, { 17.23*1, 32}, 0}, - {{2|(0<<4)}, { 17.23*0, 32}, 1}, +led_config_t g_led_config = { { + { 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 }, + { 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 29 }, + { 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 15 }, + { 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 }, + { 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 } +}, { + { 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, + { 0, 0 }, { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, + { 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, + { 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 }, + { 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 4, 1, 1, 1 +} }; - {{3|(13<<4)}, {17.23*13, 48}, 1}, - {{3|(11<<4)}, {17.23*11, 48}, 0}, - {{3|(10<<4)}, {17.23*10, 48}, 0}, - {{3|(9<<4)}, {17.23*9, 48}, 0}, - {{3|(8<<4)}, {17.23*8, 48}, 0}, - {{3|(7<<4)}, {17.23*7, 48}, 0}, - {{3|(6<<4)}, { 17.23*6, 48}, 0}, - {{3|(5<<4)}, { 17.23*5, 48}, 0}, - {{3|(4<<4)}, { 17.23*4, 48}, 0}, - {{3|(3<<4)}, { 17.23*3, 48}, 0}, - {{3|(2<<4)}, { 17.23*2, 48}, 0}, - {{3|(1<<4)}, { 17.23*1, 48}, 0}, - {{3|(0<<4)}, { 17.23*0, 48}, 1}, +#elif defined (dzrgb60_ansi) +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + {0, H_14, G_14, I_14}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + {0, E_14, D_14, F_14}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, E_15, D_15, F_15}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16}, +}; - {{4|(13<<4)}, {17.23*13, 64}, 1}, - {{4|(11<<4)}, {17.23*11, 64}, 1}, - {{4|(10<<4)}, {17.23*10, 64}, 1}, - {{4|(9<<4)}, {17.23*9, 64}, 1}, - {{4|(8<<4)}, {17.23*8, 64}, 1}, - {{4|(5<<4)}, { 17.23*5, 64}, 0}, - {{4|(2<<4)}, { 17.23*2, 64}, 1}, - {{4|(1<<4)}, { 17.23*1, 64}, 1}, - {{4|(0<<4)}, { 17.23*0, 64}, 1}, +led_config_t g_led_config = { { + { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, + { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, + { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED }, + { 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 } +}, { + { 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 }, + { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 }, + { 214, 24 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 }, + { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 }, + { 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, + 1, 4, 1, 1, 1 +} }; +#else +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + {0, H_14, G_14, I_14}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + {0, E_14, D_14, F_14}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + {0, B_14, A_14, C_14}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, E_15, D_15, F_15}, + {0, H_15, G_15, I_15}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16}, }; +led_config_t g_led_config = { { + { 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }, + { 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 }, + { 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 }, + { 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, NO_LED, 41 }, + { 62, 61, 60, NO_LED, NO_LED, 59, NO_LED, NO_LED, 58, 57, 56, 55, NO_LED, 54 } +}, { + { 223, 0 }, { 206, 0 }, { 189, 0 }, { 172, 0 }, { 155, 0 }, { 137, 0 }, { 120, 0 }, { 103, 0 }, { 86, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, + { 223, 16 }, { 206, 16 }, { 189, 16 }, { 172, 16 }, { 155, 16 }, { 137, 16 }, { 120, 16 }, { 103, 16 }, { 86, 16 }, { 68, 16 }, { 51, 16 }, { 34, 16 }, { 17, 16 }, { 0, 16 }, + { 223, 32 }, { 189, 32 }, { 172, 32 }, { 155, 32 }, { 137, 32 }, { 120, 32 }, { 103, 32 }, { 86, 32 }, { 68, 32 }, { 51, 32 }, { 34, 32 }, { 17, 32 }, { 0, 32 }, { 223, 48 }, + { 189, 48 }, { 172, 48 }, { 155, 48 }, { 137, 48 }, { 120, 48 }, { 103, 48 }, { 86, 48 }, { 68, 48 }, { 51, 48 }, { 34, 48 }, { 17, 48 }, { 0, 48 }, { 223, 64 }, { 189, 64 }, + { 172, 64 }, { 155, 64 }, { 137, 64 }, { 86, 64 }, { 34, 64 }, { 17, 64 }, { 0, 64 } +}, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 1, 4, 1, 1, 1 +} }; + +#endif + void matrix_init_kb(void) { matrix_init_user(); } - - void matrix_scan_kb(void) { matrix_scan_user(); } - - bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return process_record_user(keycode, record); } - - void suspend_power_down_kb(void) { rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); } void suspend_wakeup_init_kb(void) { rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); } diff --git a/keyboards/dztech/dz60rgb/dz60rgb.h b/keyboards/dztech/dz60rgb/dz60rgb.h index a029933f1fff..1884ddfb0b8a 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.h +++ b/keyboards/dztech/dz60rgb/dz60rgb.h @@ -1,6 +1,7 @@ #pragma once #define XXX KC_NO #include "quantum.h" + #define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ @@ -14,3 +15,58 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ { K40, K41, K42, XXX, XXX, K45, XXX, XXX, K48, K49, K4A, K4B, XXX, K4D } \ } +#define LAYOUT_ISO( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ + K40, K41, K42, K45, K49, K4A, K4B, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, XXX }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, XXX, K4D } \ +} + +#define LAYOUT_HHKB( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D,\ + K40, K41, K42, K45, K4A, K4B, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, XXX, K4A, K4B, XXX, K4D } \ +} + +#define LAYOUT_HHKB_ISO( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D,}, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, XXX, K4A, K4B, XXX, K4D } \ +} + +#define LAYOUT_ANSI( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \ + K40, K41, K42, K45, K49, K4A, K4B, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, XXX }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, XXX, K4D } \ +} diff --git a/keyboards/dztech/dz60rgb/info.json b/keyboards/dztech/dz60rgb/info.json index 4615706c69a6..d615fe53db52 100644 --- a/keyboards/dztech/dz60rgb/info.json +++ b/keyboards/dztech/dz60rgb/info.json @@ -6,7 +6,12 @@ "height": 5, "layouts": { "LAYOUT": { + "key_count": 63, "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"Shift", "x":11.25, "y":3, "w":1.75}, {"label":"\u2191", "x":13, "y":3},{"label":"?", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Ctrl", "x":11, "y":4}, {"label":"\u2190", "x":12, "y":4}, {"label":"\u2193", "x":13, "y":4}, {"label":"\u2192", "x":14, "y":4}] - } - } + }, + "LAYOUT_ANSI": { + "key_count": 61, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } } diff --git a/keyboards/dztech/dz60rgb/keymaps/ansi/config.h b/keyboards/dztech/dz60rgb/keymaps/ansi/config.h new file mode 100644 index 000000000000..4bfad0df0df9 --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/ansi/config.h @@ -0,0 +1,2 @@ +#pragma once +#define dzrgb60_ansi diff --git a/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c b/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c new file mode 100644 index 000000000000..8633b1836a9f --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c @@ -0,0 +1,78 @@ +#include QMK_KEYBOARD_H +#define _LAYER0 0 +#define _LAYER1 1 +#define _LAYER2 2 +#define _LAYER3 3 +#define _LAYER4 4 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT_ANSI( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\ + CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(2), KC_RCTL), + [_LAYER1] = LAYOUT_ANSI( /* FN */ + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS,\ + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, \ + KC_TRNS, KC_TRNS, KC_TRNS, TO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_LAYER2] = LAYOUT_ANSI( /* FN2 */ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_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), + [_LAYER3] = LAYOUT_ANSI( /* FN3 */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\ + CTL_T(KC_CAPS),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_TRNS,MO(4), KC_RALT, KC_RCTL), + [_LAYER4] = LAYOUT_ANSI( /* FN4 */ + 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, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_HOME, KC_PGUP, KC_TRNS,\ + KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, \ + KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + }; + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + rgb_matrix_set_color( i, red, green, blue ); + } + } +} + +void rgb_matrix_indicators_user(void) { + uint8_t this_led = host_keyboard_leds(); + if (!g_suspend_state) { + switch (biton32(layer_state)) { + case _LAYER1: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; + case _LAYER2: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; + case _LAYER3: + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, false); break; + case _LAYER4: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; + } + } + if ( this_led & (1< 255 ? 255 : hsv.s + 16; + sad.s = hsv.s - 16 < 0 ? 0 : hsv.s - 16; + vai.v = hsv.v + 16 > 255 ? 255 : hsv.v + 16; + vad.v = hsv.v - 16 < 0 ? 0 : hsv.v - 16; + RGB rgb = hsv_to_rgb(hsv); + RGB rgbHUI = hsv_to_rgb(hui); + RGB rgbHUD = hsv_to_rgb(hud); + RGB rgbSAI = hsv_to_rgb(sai); + RGB rgbSAD = hsv_to_rgb(sad); + RGB rgbVAI = hsv_to_rgb(vai); + RGB rgbVAD = hsv_to_rgb(vad); + rgb_matrix_set_color(41, 0xFF, 0xFF, 0xFF); // layer indicator + rgb_matrix_set_color(59, rgb.r, rgb.g, rgb.b); // color indicator + rgb_matrix_set_color(26, 0xFF, 0x80, 0x00); //MOD + rgb_matrix_set_color(39, 0xFF, 0x80, 0x00); //MOD + rgb_matrix_set_color(16, 0xFF, 0x80, 0x00); //RGB_RMOD + rgb_matrix_set_color(15, 0xFF, 0x80, 0x00); //MOD + rgb_matrix_set_color(52, 0xFF, 0x40, 0x00); //TOG + rgb_matrix_set_color(25, 0x80, 0x80, 0x80); //SPI + rgb_matrix_set_color(38, 0x80, 0x80, 0x80); //SPD + rgb_matrix_set_color(24, rgbHUI.r, rgbHUI.g, rgbHUI.b); //HUI + rgb_matrix_set_color(37, rgbHUD.r, rgbHUD.g, rgbHUD.b); //HUD + rgb_matrix_set_color(23, rgbSAI.r, rgbSAI.g, rgbSAI.b); //SAI + rgb_matrix_set_color(36, rgbSAD.r, rgbSAD.g, rgbSAD.b); //SAD + rgb_matrix_set_color(22, rgbVAI.r, rgbVAI.g, rgbVAI.b); //VAI + rgb_matrix_set_color(35, rgbVAD.r, rgbVAD.g, rgbVAD.b); //VAD + rgb_matrix_set_color(19, 0xF0, 0x00, 0xFF); //MAS_MGT + rgb_matrix_set_color(18, 0x00, 0x02, 0xFF); //MAS_BLU + rgb_matrix_set_color(33, 0xFF, 0x00, 0x00); //MAS_RED + rgb_matrix_set_color(32, 0x00, 0x00, 0x00); //MAS_KEY + rgb_matrix_set_color(31, 0x00, 0xFF, 0xF7); //MAS_CYN + rgb_matrix_set_color(46, 0xFF, 0xDA, 0x00); //MAS_YEL + rgb_matrix_set_color(45, 0x00, 0xFF, 0x01); //MAS_GRN + rgb_matrix_set_color(44, 0xFF, 0xA5, 0x18); //MAS_CRM + rgb_matrix_set_color(30, 0x81, 0x3C, 0xFF); //MAS_PRP + rgb_matrix_set_color(17, 0xFF, 0xFF, 0xFF); //MAS_WHT + } + break; + + case _FNC: + rgb_matrix_set_color(57, 0xFF, 0xFF, 0xFF); // layer indicator + rgb_matrix_set_color(48, 0xFF, 0x00, 0x00); // bootloader + rgb_matrix_set_color(42, 0x00, 0x80, 0xFF); // vol + rgb_matrix_set_color(55, 0x00, 0x80, 0xFF); + rgb_matrix_set_color(58, 0xFF, 0x00, 0x00); // mute + rgb_matrix_set_color(56, 0xFF, 0x80, 0x00); // ctrl+left/right + rgb_matrix_set_color(54, 0xFF, 0x80, 0x00); + rgb_matrix_set_color(41, 0xFF, 0x00, 0x40); // ctrl+delete + rgb_matrix_set_color(43, 0xFF, 0x00, 0x40); // ctrl+slash + + if (this_led & (1 << !autoshift_enabled)) { + rgb_matrix_set_color(0, 0xFF, 0x00, 0x00); // KC_ASTG + } else { + rgb_matrix_set_color(0, 0xFF, 0xFF, 0x00); + } + + break; + } + } + + if (this_led & (1 << USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); + } +} + +void matrix_init_user(void) +{ + //user initialization + autoshift_disable(); +} + +void matrix_scan_user(void) +{ + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t* record) +{ + static uint32_t key_timer; + + switch (keycode) { + case REBOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + rgb_matrix_enable_noeeprom(); + rgb_matrix_mode_noeeprom(1); + rgb_matrix_sethsv_noeeprom(11, 11, 11); + wait_ms(150); + reset_keyboard(); + } else { + register_code(KC_RCTL); + tap_code(KC_B); + unregister_code(KC_RCTL); + } + } + + return false; + + case MAS_CRM: + if (record->event.pressed) { + rgb_matrix_sethsv(32, 160, 255); + } + + return false; + + case MAS_PRP: + if (record->event.pressed) { + rgb_matrix_sethsv(192, 112, 255); + } + + return false; + + case MAS_RED: + if (record->event.pressed) { + rgb_matrix_sethsv(0, 255, 255); + } + + return false; + + case MAS_GRN: + if (record->event.pressed) { + rgb_matrix_sethsv(88, 255, 255); + } + + return false; + + case MAS_BLU: + if (record->event.pressed) { + rgb_matrix_sethsv(168, 255, 255); + } + + return false; + + case MAS_CYN: + if (record->event.pressed) { + rgb_matrix_sethsv(128, 255, 255); + } + + return false; + + case MAS_MGT: + if (record->event.pressed) { + rgb_matrix_sethsv(216, 255, 255); + } + + return false; + + case MAS_YEL: + if (record->event.pressed) { + rgb_matrix_sethsv(40, 255, 255); + } + + return false; + + case MAS_KEY: + if (record->event.pressed) { + rgb_matrix_sethsv(0, 0, 0); + } + + return false; + + case MAS_WHT: + if (record->event.pressed) { + rgb_matrix_sethsv(128, 0, 255); + } + + return false; + + default: + return true; + } +} diff --git a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/rules.mk b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/rules.mk new file mode 100644 index 000000000000..15b8ec1bafc0 --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/rules.mk @@ -0,0 +1,7 @@ +NKRO_ENABLE = yes # USB Nkey Rollover +AUTO_SHIFT_ENABLE = yes # Auto Shift +# VELOCIKEY_ENABLE = yes + +EXTRAFLAGS += -flto + +# SRC += dz60rgb.c diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c new file mode 100644 index 000000000000..11afb22d9b0c --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c @@ -0,0 +1,173 @@ +#include QMK_KEYBOARD_H +#define _LAYER0 0 +#define _LAYER1 1 +#define _LAYER2 2 +#define _LAYER3 3 +#define _LAYER4 4 +#define _LAYER5 5 +#define _LAYER6 6 +#define _LAYER7 7 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, \ + CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL), \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(1) , KC_LEFT, KC_DOWN, KC_RIGHT), + [_LAYER1] = LAYOUT( /* FN */ + TO(3), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL , \ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET , \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN, KC_VOLU, KC_MUTE, \ + KC_TRNS, KC_TRNS, KC_TRNS, TO(4), KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + [_LAYER2] = LAYOUT( /* LIGHT */ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL , \ + KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET , \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_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), + [_LAYER3] = LAYOUT( /* NUMPAD */ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_TRNS, \ + KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, TO(0), \ + KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_PENT, \ + KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_P0, KC_PDOT, KC_PENT, KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS), + [_LAYER4] = LAYOUT( /* MAC */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, \ + CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(5) , KC_LEFT, KC_DOWN, KC_RIGHT), + [_LAYER5] = LAYOUT( /* FN */ + TO(3), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL , \ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET , \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN, KC_VOLU, KC_MUTE, \ + KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), +} +; + + + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + rgb_matrix_set_color( i, red, green, blue ); + } + } +} + +void rgb_matrix_indicators_user(void) +{ + uint8_t this_led = host_keyboard_leds(); + + if (!g_suspend_state) { + switch (biton32(layer_state)) { + case _LAYER1: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break; + + case _LAYER2: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break; + + case _LAYER4: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break; + } + } + + if (this_led & (1 << USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); + } + + switch (biton32(layer_state)) { + case _LAYER3: + if (this_led & (1 << USB_LED_NUM_LOCK)) { + rgb_matrix_set_color(13, 0xFF, 0x00, 0x00); + } else { + rgb_matrix_set_color(13, 0x00, 0x00, 0x00); + } + + rgb_matrix_set_color(0, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(1, 0x00, 0x00, 0x00); + rgb_matrix_set_color(1, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(2, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(3, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(4, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(5, 0x00, 0x00, 0x00); + rgb_matrix_set_color(6, 0x00, 0x00, 0x00); + rgb_matrix_set_color(7, 0x00, 0x00, 0x00); + rgb_matrix_set_color(8, 0x00, 0x00, 0x00); + rgb_matrix_set_color(9, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(10, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(11, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(12, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(14, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(15, 0x00, 0x00, 0x00); + rgb_matrix_set_color(16, 0x00, 0x00, 0x00); + rgb_matrix_set_color(17, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(18, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(19, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(20, 0x00, 0x00, 0x00); + rgb_matrix_set_color(21, 0x00, 0x00, 0x00); + rgb_matrix_set_color(22, 0x00, 0x00, 0x00); + rgb_matrix_set_color(23, 0x00, 0x00, 0x00); + rgb_matrix_set_color(24, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(25, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(26, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(27, 0x00, 0x00, 0x00); + rgb_matrix_set_color(28, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(29, 0x00, 0x00, 0x00); + rgb_matrix_set_color(30, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(31, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(33, 0x00, 0x00, 0x00); + rgb_matrix_set_color(34, 0x00, 0x00, 0x00); + rgb_matrix_set_color(35, 0x00, 0x00, 0x00); + rgb_matrix_set_color(36, 0x00, 0x00, 0x00); + rgb_matrix_set_color(37, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(38, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(39, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(40, 0x00, 0x00, 0x00); + rgb_matrix_set_color(41, 0x00, 0x00, 0x00); + rgb_matrix_set_color(42, 0x00, 0x00, 0x00); + rgb_matrix_set_color(43, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(44, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(45, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(46, 0x00, 0x00, 0x00); + rgb_matrix_set_color(47, 0x00, 0x00, 0x00); + rgb_matrix_set_color(48, 0x00, 0x00, 0x00); + rgb_matrix_set_color(49, 0x00, 0x00, 0x00); + rgb_matrix_set_color(50, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(51, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(52, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(53, 0x00, 0x00, 0x00); + rgb_matrix_set_color(54, 0x00, 0x00, 0x00); + rgb_matrix_set_color(55, 0x00, 0x00, 0x00); + rgb_matrix_set_color(56, 0x00, 0x00, 0x00); + rgb_matrix_set_color(57, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(58, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(59, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(60, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(61, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(62, 0x00, 0x00, 0x00); + break; + } +} + + + + + +void matrix_init_user(void) +{ + //user initialization +} + +void matrix_scan_user(void) +{ + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t* record) +{ + return true; +} diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/readme.md b/keyboards/dztech/dz60rgb/keymaps/mekanist/readme.md new file mode 100644 index 000000000000..e85200457e3f --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/readme.md @@ -0,0 +1,34 @@ +# mekanist keymap instructions + +## Dev Environment setup (macOS) + +1. Install Homebrew by copy pasting the following into a terminal: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` + +2. Refer to the [QMK macOS Instructions](https://github.com/qmk/qmk_firmware/blob/master/docs/getting_started_build_tools.md#macos) and install the list of tools using the `brew` command in terminal. + +3. While in terminal, issue the following command within the directory you wish to clone qmk_firmware in. + + ``` + git clone https://github.com/qmk/qmk_firmware.git + ``` + +## Creating the mekanist dz60rgb firmware file + +1. While in the `qmk_firmware` directory, issue the following command + + ``` + make git-submodule + ``` + + This will download the chibi-os submoduled needed to create firmware for ARM based boards such as the dz60rgb. + +2. While in the `qmk_firmware` directory, issue the followng command + + ``` + make dztech/dz60rgb:mekanist + ``` + + This will result in a file called `dztech_dz60rgb_mekanist.bin` that you can flash onto your board using QMK Toolbox. diff --git a/keyboards/dztech/dz60rgb/rules.mk b/keyboards/dztech/dz60rgb/rules.mk index cf89c4949ea8..8ff1cbdc2961 100644 --- a/keyboards/dztech/dz60rgb/rules.mk +++ b/keyboards/dztech/dz60rgb/rules.mk @@ -1,49 +1,6 @@ -# project specific files - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC - -# Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 -OPT_DEFS = - -# Do not put the microcontroller into power saving mode -# when we get USB suspend event. We want it to keep updating -# backlight effects. -OPT_DEFS += -DNO_SUSPEND_POWER_DOWN - -# Options to pass to dfu-util when flashing +MCU = STM32F303 DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave - -# Build Options -# comment out to disable the options. -# +DFU_SUFFIX_ARGS = -p DF11 -v 0483 BACKLIGHT_ENABLE = no BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys diff --git a/keyboards/dztech/dz65rgb/config.h b/keyboards/dztech/dz65rgb/config.h new file mode 100644 index 000000000000..f4c1f1114934 --- /dev/null +++ b/keyboards/dztech/dz65rgb/config.h @@ -0,0 +1,29 @@ +#pragma once +#include "config_common.h" +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1224 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DZTECH +#define PRODUCT DZ65RGB +#define DESCRIPTION DZ65 ARM RGB keyboard + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B1, B10, B11, B14, B12 } +#define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14, C15 } +#define DIODE_DIRECTION COL2ROW + +#define RGB_MATRIX_LED_PROCESS_LIMIT 4 +#define RGB_MATRIX_LED_FLUSH_LIMIT 26 +#define DEBOUNCE 3 +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 + +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110111 +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 35 +#define DRIVER_2_LED_TOTAL 33 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/dztech/dz65rgb/dz65rgb.c b/keyboards/dztech/dz65rgb/dz65rgb.c new file mode 100644 index 000000000000..932d3f68b6ca --- /dev/null +++ b/keyboards/dztech/dz65rgb/dz65rgb.c @@ -0,0 +1,116 @@ +#include "dz65rgb.h" +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + {0, C2_1, C3_1, C4_1}, // LA0 + {0, C1_1, C3_2, C4_2}, // LA1 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_7, C2_7, C3_7}, // LA7 + {0, C1_8, C2_8, C3_8}, // LA8 + {0, C9_1, C8_1, C7_1}, // LA9 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_6, C8_6, C7_6}, // LA14 + {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_8, C7_7, C6_7}, // LA16 + {0, C8_8, C7_8, C6_8}, // LA17 + {0, C2_9, C3_9, C4_9}, // LB0 + {0, C1_9, C3_10, C4_10}, // LB1 + {0, C1_10, C2_10, C4_11}, // LB2 + {0, C1_11, C2_11, C3_11}, // LB3 + //{0, C1_12, C2_12, C3_12}, // LB4 + {0, C1_13, C2_13, C3_13}, // LB5 + {0, C1_14, C2_14, C3_14}, // LB6 + {0, C1_15, C2_15, C3_15}, // LB7 + {0, C1_16, C2_16, C3_16}, // LB8 + {0, C9_9, C8_9, C7_9}, // LB9 + {0, C9_10, C8_10, C7_10}, // LB10 + {0, C9_11, C8_11, C7_11}, // LB11 + {0, C9_12, C8_12, C7_12}, // LB12 + {0, C9_13, C8_13, C7_13}, // LB13 + {0, C9_14, C8_14, C7_14}, // LB14 + {0, C9_15, C8_15, C6_14}, // LB15 + {0, C9_16, C7_15, C6_15}, // LB16 + {0, C8_16, C7_16, C6_16}, // LB17 + {1, C2_1, C3_1, C4_1}, // LC0 + {1, C1_1, C3_2, C4_2}, // LC1 + {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_5, C2_5, C3_5}, // LC5 + //{1, C1_6, C2_6, C3_6}, // LC6 + {1, C1_7, C2_7, C3_7}, // LC7 + {1, C1_8, C2_8, C3_8}, // LC8 + {1, C9_1, C8_1, C7_1}, // LC9 + {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_6, C8_6, C7_6}, // LC14 + //{1, C9_7, C8_7, C6_6}, // LC15 + {1, C9_8, C7_7, C6_7}, // LC16 + {1, C8_8, C7_8, C6_8}, // LC17 + {1, C2_9, C3_9, C4_9}, // LD0 + {1, C1_9, C3_10, C4_10}, // LD1 + {1, C1_10, C2_10, C4_11}, // LD2 + {1, C1_11, C2_11, C3_11}, // LD3 + {1, C1_12, C2_12, C3_12}, // LD4 + {1, C1_13, C2_13, C3_13}, // LD5 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_16, C2_16, C3_16}, // LD8 + {1, C9_9, C8_9, C7_9}, // LD9 + {1, C9_10, C8_10, C7_10}, // LD10 + {1, C9_11, C8_11, C7_11}, // LD11 + {1, C9_12, C8_12, C7_12}, // LD12 + //{1, C9_13, C8_13, C7_13}, // LD13 + {1, C9_14, C8_14, C7_14}, // LD14 + {1, C9_15, C8_15, C6_14}, // LD15 + {1, C9_16, C7_15, C6_15}, // LD16 + {1, C8_16, C7_16, C6_16}, // LD17 +}; + +led_config_t g_led_config = { { + { 17, 16, 15, 14, 13, 12, 11, 10, 9, 18, 19, 20, 21, 22, 23 }, + { 7, 6, 5, 4, 3, 2, 1, 0, 26, 27, 28, 29, 30, 31, 24 }, + { 8, 48, 47, 46, 45, 44, 43, 51, 52, 53, 54, 55, NO_LED, 56, 25 }, + { 49, 40, 39, 38, 37, 36, 60, 61, 62, 63, 57, 58, NO_LED, 59, 32 }, + { 50, 42, 41, NO_LED, NO_LED, 35, NO_LED, NO_LED, 64, 65, 66, 67, NO_LED, 34, 33 } +}, { + { 112, 16 }, { 96, 16 }, { 80, 16 }, { 64, 16 }, { 48, 16 }, { 32, 16 }, { 16, 16 }, { 0, 16 }, { 0, 32 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, + { 32, 0 }, { 16, 0 }, { 0, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, { 224, 0 }, { 224, 16 }, { 224, 32 }, { 128, 16 }, { 144, 16 }, { 160, 16 }, { 176, 16 }, + { 192, 16 }, { 208, 16 }, { 224, 48 }, { 224, 64 }, { 208, 64 }, { 80, 64 }, { 80, 48 }, { 64, 48 }, { 48, 48 }, { 32, 48 }, { 16, 48 }, { 32, 64 }, { 16, 64 }, { 96, 32 }, { 80, 32 }, + { 64, 32 }, { 48, 32 }, { 32, 32 }, { 16, 32 }, { 0, 48 }, { 0, 64 }, { 112, 32 }, { 128, 32 }, { 144, 32 }, { 160, 32 }, { 176, 32 }, { 208, 32 }, { 160, 48 }, { 176, 48 }, { 208, 48 }, + { 96, 48 }, { 112, 48 }, { 128, 48 }, { 144, 48 }, { 128, 64 }, { 144, 64 }, { 160, 64 }, { 176, 64 } +}, { + 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, + 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 1, 1, 4, 4, + 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 1, 1, 1, 1 +} }; + +void matrix_init_kb(void) { + matrix_init_user(); +} +void matrix_scan_kb(void) { + matrix_scan_user(); +} +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); + suspend_power_down_user(); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); + suspend_wakeup_init_user(); +} diff --git a/keyboards/dztech/dz65rgb/dz65rgb.h b/keyboards/dztech/dz65rgb/dz65rgb.h new file mode 100644 index 000000000000..b251a339f91d --- /dev/null +++ b/keyboards/dztech/dz65rgb/dz65rgb.h @@ -0,0 +1,16 @@ +#pragma once +#define XXX KC_NO +#include "quantum.h" +#define LAYOUT_65_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K40, K41, K42, K45, K48, K49, K4A, K4B, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, K48, K49, K4A, K4B, XXX, K4D, K4E } \ +} diff --git a/keyboards/dztech/dz65rgb/info.json b/keyboards/dztech/dz65rgb/info.json new file mode 100644 index 000000000000..fe61e5d9733e --- /dev/null +++ b/keyboards/dztech/dz65rgb/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "dz65rgb", + "url": "", + "maintainer": "dztch", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2},{"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5},{"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75},{"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/dztech/dz65rgb/keymaps/default/keymap.c b/keyboards/dztech/dz65rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..dae08a48c674 --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H +#define _LAYER0 0 +#define _LAYER1 1 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT_65_ansi( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH, KC_PGUP,\ + CTL_T(KC_CAPS),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + [_LAYER1] = LAYOUT_65_ansi( /* FN */ + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_HOME,\ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET, KC_PGUP,\ + CTL_T(KC_CAPS),RGB_SPI, RGB_SPD, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, KC_PGDN,\ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), +}; + +void rgb_matrix_indicators_user(void) +{ + if (IS_LED_ON(host_keyboard_leds(), USB_LED_CAPS_LOCK)) + { + rgb_matrix_set_color(8, 0xFF, 0xFF, 0xFF); + } +} + +void matrix_init_user(void) +{ + //user initialization +} + +void matrix_scan_user(void) +{ + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + return true; +} diff --git a/keyboards/dztech/dz65rgb/readme.md b/keyboards/dztech/dz65rgb/readme.md new file mode 100644 index 000000000000..7f8aad95f87e --- /dev/null +++ b/keyboards/dztech/dz65rgb/readme.md @@ -0,0 +1,14 @@ +# DZ65RGB + +A customizable 65% RGB keyboard. + +Keyboard Maintainer: [DZtech](http://keyboarddiy.taobao.com) +Hardware Supported: [DZtech](http://keyboarddiy.taobao.com) +Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) + + +Make example for this keyboard (after setting up your build environment): + + make dztech/dz65rgb: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). diff --git a/keyboards/dztech/dz65rgb/rules.mk b/keyboards/dztech/dz65rgb/rules.mk new file mode 100644 index 000000000000..bf392b4faadc --- /dev/null +++ b/keyboards/dztech/dz65rgb/rules.mk @@ -0,0 +1,14 @@ +MCU = STM32F303 +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no +RGB_MATRIX_ENABLE = yes # Use RGB matrix + +LAYOUTS = 65_ansi diff --git a/keyboards/eco/keymaps/default/keymap.c b/keyboards/eco/keymaps/default/keymap.c index 7d714d9ad34e..ede68d59da66 100644 --- a/keyboards/eco/keymaps/default/keymap.c +++ b/keyboards/eco/keymaps/default/keymap.c @@ -18,10 +18,6 @@ enum eco_keycodes { QWERTY = SAFE_RANGE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/eco/keymaps/fsck/config.h b/keyboards/eco/keymaps/fsck/config.h new file mode 100644 index 000000000000..b0a7901b2d6c --- /dev/null +++ b/keyboards/eco/keymaps/fsck/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Frederick Hirsch + * + * 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 . + */ + +#pragma once + +#define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/eco/keymaps/fsck/keymap.c b/keyboards/eco/keymaps/fsck/keymap.c new file mode 100644 index 000000000000..8d7cb89c1758 --- /dev/null +++ b/keyboards/eco/keymaps/fsck/keymap.c @@ -0,0 +1,76 @@ +/* Copyright 2019 Frederick Hirsch + * + * 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 . + */ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _RAISE 3 + +enum eco_keycodes { + QWERTY = SAFE_RANGE, + RAISE +}; + +#define JC_Z CTL_T(KC_Z) +#define JC_X ALT_T(KC_X) +#define JC_C GUI_T(KC_C) +#define JC_COMM GUI_T(KC_COMM) +#define JC_DOT ALT_T(KC_DOT) +#define JC_SLSH CTL_T(KC_SLSH) + +#define JC_CAPS LT(_RAISE,KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-------------------------------------------------------------------------------------------------. + * | Tab | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 10 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | Home | PgUp | Y | U | I | O | P | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Raise| A | S | D | F | G | End | PgDn | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | Space | N | M | , | . | / | Shift| + * | | Ctrl | Alt | GUI | | | | GUI | Alt | Ctrl | | + * `-------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + JC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_END, KC_PGDN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, JC_Z, JC_X, JC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, KC_M, JC_COMM, JC_DOT, JC_SLSH, KC_RSFT +), + + +/* Raise + * ,-------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | | | F6 | F7 | F8 | F9 | F0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | | Up | | | | |PrntSc| | | | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Left | Down | Right| | |ScrLck|Pause | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | |Insert| + * `-------------------------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS +) +}; \ No newline at end of file diff --git a/keyboards/eco/keymaps/fsck/readme.md b/keyboards/eco/keymaps/fsck/readme.md new file mode 100644 index 000000000000..1f3678daf116 --- /dev/null +++ b/keyboards/eco/keymaps/fsck/readme.md @@ -0,0 +1,5 @@ +![eco:fsck Layout Image](https://i.imgur.com/Sb8n8B0.png) + +# ECO Layout by fsck + +This is the fsck layout for the eco keyboard. The bottom row of the default layer are dual function tap/hold keys. \ No newline at end of file diff --git a/keyboards/eco/keymaps/fsck/rules.mk b/keyboards/eco/keymaps/fsck/rules.mk new file mode 100644 index 000000000000..8fb2adf38380 --- /dev/null +++ b/keyboards/eco/keymaps/fsck/rules.mk @@ -0,0 +1,19 @@ +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/eco/keymaps/hexwire/keymap.c b/keyboards/eco/keymaps/hexwire/keymap.c index 7c6616aac878..3f21eacd3b29 100644 --- a/keyboards/eco/keymaps/hexwire/keymap.c +++ b/keyboards/eco/keymaps/hexwire/keymap.c @@ -23,8 +23,6 @@ enum eco_keycodes { // Fillers to make layering more clear #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_RST RESET #define KC_DBUG DEBUG diff --git a/keyboards/eco/keymaps/that_canadian/keymap.c b/keyboards/eco/keymaps/that_canadian/keymap.c index 444bc48f8045..f9696c77e5f7 100644 --- a/keyboards/eco/keymaps/that_canadian/keymap.c +++ b/keyboards/eco/keymaps/that_canadian/keymap.c @@ -25,10 +25,6 @@ enum eco_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/eco/keymaps/xyverz/keymap.c b/keyboards/eco/keymaps/xyverz/keymap.c index b4ca0f1a5f1e..395a014acb36 100644 --- a/keyboards/eco/keymaps/xyverz/keymap.c +++ b/keyboards/eco/keymaps/xyverz/keymap.c @@ -28,10 +28,6 @@ enum planck_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases to make reading the keymap easier #define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. diff --git a/keyboards/emptystring/NQG/NQG.c b/keyboards/emptystring/NQG/NQG.c new file mode 100644 index 000000000000..eedf25e88155 --- /dev/null +++ b/keyboards/emptystring/NQG/NQG.c @@ -0,0 +1 @@ +#include "NQG.h" diff --git a/keyboards/emptystring/NQG/NQG.h b/keyboards/emptystring/NQG/NQG.h new file mode 100644 index 000000000000..943ea6ab167b --- /dev/null +++ b/keyboards/emptystring/NQG/NQG.h @@ -0,0 +1,15 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, L07, L08, L09, \ + L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, \ + L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, \ + L30, L32, L33, L34, L35, L36, L37 \ + ) { \ + {L00, L01, L02, L03, L04, L05, L06, L07, L08, L09}, \ + {L10, L11, L12, L13, L14, L15, L16, L17, L18, L19}, \ + {L20, L21, L22, L23, L24, L25, L26, L27, L28, L29}, \ + {L30, KC_NO, L32, L33, L34, L35, L36, L37, KC_NO, KC_NO} \ + } diff --git a/keyboards/emptystring/NQG/config.h b/keyboards/emptystring/NQG/config.h new file mode 100644 index 000000000000..3f52ba3ea68c --- /dev/null +++ b/keyboards/emptystring/NQG/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2019 Bernard Shih (twitter: @SA_EndlessGame) + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x0076 +#define PRODUCT_ID 0x0037 +#define DEVICE_VER 0x0100 +#define MANUFACTURER emptystring +#define PRODUCT NQG +#define DESCRIPTION 30% ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 10 + +/* key matrix pins */ +#define MATRIX_ROW_PINS {B6, B2, B3, B1} +#define MATRIX_COL_PINS {F7, F6, B5, B4, E6, D7, C6, D4, D0, D1} + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define TAPPING_TERM 200 diff --git a/keyboards/emptystring/NQG/info.json b/keyboards/emptystring/NQG/info.json new file mode 100644 index 000000000000..008dbbe98d91 --- /dev/null +++ b/keyboards/emptystring/NQG/info.json @@ -0,0 +1,50 @@ +{ + "keyboard_name": "NQG (Not Quite Gherkin)", + "url": "", + "maintainer": "culturalsnow", + "width": 11, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"A", "x":1, "y":1}, + {"label":"S", "x":2, "y":1}, + {"label":"D", "x":3, "y":1}, + {"label":"F", "x":4, "y":1}, + {"label":"G", "x":5, "y":1}, + {"label":"H", "x":6, "y":1}, + {"label":"J", "x":7, "y":1}, + {"label":"K", "x":8, "y":1}, + {"label":"L", "x":9, "y":1}, + {"label":"; '", "x":10, "y":1}, + {"label":"Z", "x":1, "y":2}, + {"label":"X", "x":2, "y":2}, + {"label":"C", "x":3, "y":2}, + {"label":"V", "x":4, "y":2}, + {"label":"B", "x":5, "y":2}, + {"label":"N", "x":6, "y":2}, + {"label":"M", "x":7, "y":2}, + {"label":",", "x":8, "y":2}, + {"label":".", "x":9, "y":2}, + {"label":"/ Enter", "x":10, "y":2}, + {"label":"Shift / Tab", "x":0, "y":2}, + {"label":"LT(_LOWER, KC_ESC)", "x":3, "y":3}, + {"label":"Ctrl / Backspace", "x":4, "y":3}, + {"label":"Ctrl / Backspace", "x":5, "y":3}, + {"label":"Space", "x":6, "y":3}, + {"label":"Space", "x":7, "y":3}, + {"label":"MO(_RAISE)", "x":8, "y":3} + ] + } + } +} diff --git a/keyboards/emptystring/NQG/keymaps/default/keymap.c b/keyboards/emptystring/NQG/keymaps/default/keymap.c new file mode 100644 index 000000000000..cd465519bf67 --- /dev/null +++ b/keyboards/emptystring/NQG/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +#define _BASE 0 +#define _LOWER 1 +#define _RAISE 2 + +enum tapdances{ + TD_SCCL = 0, + TD_ENSL, + TD_N0BS, + TD_RPPI, +}; + +#define KC_SCCL TD(TD_SCCL) +#define KC_ENSL TD(TD_ENSL) +#define KC_N0BS TD(TD_N0BS) +#define KC_RPPI TD(TD_RPPI) + +#define KC_BSCT LCTL_T(KC_BSPC) +#define KC_ALEN LALT(KC_ENT) +#define KC_CTEN LCTL(KC_ENT) +#define KC_STAB LSFT_T(KC_TAB) +#define KC_WLNG LALT(KC_LSFT) +#define KC_LOCK LGUI(KC_L) +#define KC_ULCK LCTL(LALT(KC_DEL)) +#define KC_DSTP LGUI(KC_D) +#define KC_ESLO LT(_LOWER, KC_ESC) + + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT), + [TD_ENSL] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_ENT), + [TD_N0BS] = ACTION_TAP_DANCE_DOUBLE(KC_0, KC_BSLS), + [TD_RPPI] = ACTION_TAP_DANCE_DOUBLE(KC_RPRN, KC_PIPE), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENSL,\ + KC_STAB, KC_ESLO, KC_BSCT, KC_BSCT, KC_SPC, KC_SPC, MO(_RAISE) + ), + + [_LOWER] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPPI, \ + _______, _______, KC_DSTP, _______, KC_WLNG, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, \ + _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, KC_HOME, KC_END,\ + KC_CTEN, _______, KC_BSCT, KC_BSCT, KC_SPC, KC_SPC, KC_ULCK + ), + + [_RAISE] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_N0BS, \ + _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, \ + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,\ + KC_ALEN, KC_LOCK, KC_BSCT, KC_BSCT, KC_SPC, KC_SPC, _______ + ), + + +}; diff --git a/keyboards/emptystring/NQG/keymaps/default/rules.mk b/keyboards/emptystring/NQG/keymaps/default/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/emptystring/NQG/keymaps/default/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/emptystring/NQG/readme.md b/keyboards/emptystring/NQG/readme.md new file mode 100644 index 000000000000..5e78420e2b0a --- /dev/null +++ b/keyboards/emptystring/NQG/readme.md @@ -0,0 +1,15 @@ +# NQG: Not Quite Gherkin + +![NQG](https://github.com/culturalsnow/NQG/blob/master/images/NQGLayout.jpg) + +NQG (Not Quite Gherkin) is a 30% ortholinear keyboard with a macro key and dedicated row for thumb keys, made by emptystring studio. + +Keyboard Maintainer: [Culturalsnow](http://github.com/culturalsnow) +Hardware Supported: NQG PCB, Pro Micro +Hardware Availability: Kits are available from [SA_EndlessGame](http://twitter.com/SA_EndlessGame) + +Make example for this keyboard (after setting up your build environment): + + make emptystring/NQG: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). diff --git a/keyboards/emptystring/NQG/rules.mk b/keyboards/emptystring/NQG/rules.mk new file mode 100644 index 000000000000..9a46bb854401 --- /dev/null +++ b/keyboards/emptystring/NQG/rules.mk @@ -0,0 +1,64 @@ +# MCU name + +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/ep/40/config.h b/keyboards/ep/40/config.h index 0a2495953d6d..b7f99a3b7cbc 100644 --- a/keyboards/ep/40/config.h +++ b/keyboards/ep/40/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { C7, C6, B6, B5 } #define MATRIX_COL_PINS { F6, F5, F4, F1, F0, D2, D3, D5, D4, D6, D7, B4 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/ep/96/config.h b/keyboards/ep/96/config.h index 9438553093b6..152b04b6281b 100644 --- a/keyboards/ep/96/config.h +++ b/keyboards/ep/96/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C7, F7, F6, F5, F4, F1, F0, E6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #endif diff --git a/keyboards/ergo42/keymaps/biacco-biacco/keymap.c b/keyboards/ergo42/keymaps/biacco-biacco/keymap.c index ee471b3a51c3..9eaba22099f5 100644 --- a/keyboards/ergo42/keymaps/biacco-biacco/keymap.c +++ b/keyboards/ergo42/keymaps/biacco-biacco/keymap.c @@ -12,10 +12,6 @@ extern keymap_config_t keymap_config; #define BMETA 5 #define BSYMB 6 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE diff --git a/keyboards/ergo42/keymaps/biacco-macOS/keymap.c b/keyboards/ergo42/keymaps/biacco-macOS/keymap.c index 7d897abbf8eb..8299eb701104 100644 --- a/keyboards/ergo42/keymaps/biacco-macOS/keymap.c +++ b/keyboards/ergo42/keymaps/biacco-macOS/keymap.c @@ -7,10 +7,6 @@ extern keymap_config_t keymap_config; #define SYMB 2 #define GAME 3 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE diff --git a/keyboards/ergo42/keymaps/biacco-underglow/keymap.c b/keyboards/ergo42/keymaps/biacco-underglow/keymap.c index 7722eb0068e6..3449192802ae 100644 --- a/keyboards/ergo42/keymaps/biacco-underglow/keymap.c +++ b/keyboards/ergo42/keymaps/biacco-underglow/keymap.c @@ -8,10 +8,6 @@ extern keymap_config_t keymap_config; #define GAME 3 #define RGB 4 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; diff --git a/keyboards/ergo42/keymaps/biacco/keymap.c b/keyboards/ergo42/keymaps/biacco/keymap.c index c567e5c758b6..a6cc610529a6 100644 --- a/keyboards/ergo42/keymaps/biacco/keymap.c +++ b/keyboards/ergo42/keymaps/biacco/keymap.c @@ -7,10 +7,6 @@ extern keymap_config_t keymap_config; #define SYMB 2 #define GAME 3 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE diff --git a/keyboards/ergo42/keymaps/default-illustrator/keymap.c b/keyboards/ergo42/keymaps/default-illustrator/keymap.c index 9e0f7fb2e960..62af6b2ab112 100644 --- a/keyboards/ergo42/keymaps/default-illustrator/keymap.c +++ b/keyboards/ergo42/keymaps/default-illustrator/keymap.c @@ -8,10 +8,6 @@ extern keymap_config_t keymap_config; #define GAME 3 #define ILLUST 4 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE diff --git a/keyboards/ergo42/keymaps/default-underglow/keymap.c b/keyboards/ergo42/keymaps/default-underglow/keymap.c index 4d7242579ac5..212d9138df08 100644 --- a/keyboards/ergo42/keymaps/default-underglow/keymap.c +++ b/keyboards/ergo42/keymaps/default-underglow/keymap.c @@ -8,10 +8,6 @@ extern keymap_config_t keymap_config; #define GAME 3 #define RGB 4 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; diff --git a/keyboards/ergo42/keymaps/default/keymap.c b/keyboards/ergo42/keymaps/default/keymap.c index 6c4cc1a620d3..f99ec5fb6676 100644 --- a/keyboards/ergo42/keymaps/default/keymap.c +++ b/keyboards/ergo42/keymaps/default/keymap.c @@ -7,10 +7,6 @@ extern keymap_config_t keymap_config; #define SYMB 2 #define GAME 3 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE diff --git a/keyboards/ergo42/keymaps/hdbx/keymap.c b/keyboards/ergo42/keymaps/hdbx/keymap.c index b7bddd553124..da579de01a9a 100644 --- a/keyboards/ergo42/keymaps/hdbx/keymap.c +++ b/keyboards/ergo42/keymaps/hdbx/keymap.c @@ -26,9 +26,6 @@ enum custom_keycodes { // Use Dynamic macro #include "dynamic_macro.h" -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_LOWR LT(_LOWER, KC_MHEN) // タップで無変換 ホールドでLower #define KC_RASE LT(_RAISE, KC_HENK) // タップで変換 ホールドでRaise #define KC_LSLB MT(MOD_LSFT, JP_LBRC) // タップで[ ホールドで左Shift diff --git a/keyboards/ergo42/keymaps/ichi-t/keymap.c b/keyboards/ergo42/keymaps/ichi-t/keymap.c index 82cda6df1dd2..94d57936ed5c 100644 --- a/keyboards/ergo42/keymaps/ichi-t/keymap.c +++ b/keyboards/ergo42/keymaps/ichi-t/keymap.c @@ -8,10 +8,6 @@ extern keymap_config_t keymap_config; #define _CMOVE 3 #define _WIN 4 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY diff --git a/keyboards/ergo42/keymaps/koba/keymap.c b/keyboards/ergo42/keymaps/koba/keymap.c index f05f78b9e7c6..9bc504207fb1 100644 --- a/keyboards/ergo42/keymaps/koba/keymap.c +++ b/keyboards/ergo42/keymaps/koba/keymap.c @@ -37,36 +37,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* WIN * ,------------------------------------------------. ,------------------------------------------------. - * | Esc | Tab | Q | W | E | R | T | | Y | U | I | O | P | @ ` | Bksp | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Del | Ctrl | A | S | D | F | G | | H | J | K | L | ; + | ; * |Enter | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Esc | Del | Q | W | E | R | T | | Y | U | I | O | P | @ ` | Bksp | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Tab | Ctrl | A | S | D | F | G | | H | J | K | L | ; + | ; * |Enter | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | H/Z |Shift | Z | X | C | V | B | | N | M | , < | . > | / ? | Up |Shift | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Fn | Ctrl | Win | Alt | Mhen |LOWER |Space | |Space |RAISE | Henk | Menu | Left | Down |Right | * `------------------------------------------------' `------------------------------------------------' */ [_WIN] = LAYOUT( \ - KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_BSPC, \ - KC_DELT, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, \ + KC_ESC, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_BSPC, \ + KC_TAB, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, \ KC_ZKHK, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ FN, KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, LOWER, KC_SPC, KC_SPC, RAISE, KC_HENK, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT \ ), /* MACOS * ,------------------------------------------------. ,------------------------------------------------. - * | Esc | Tab | Q | W | E | R | T | | Y | U | I | O | P | @ ` | Bksp | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Del | Ctrl | A | S | D | F | G | | H | J | K | L | ; + | ; * |Enter | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Esc | Del | Q | W | E | R | T | | Y | U | I | O | P | @ ` | Bksp | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Tab | Ctrl | A | S | D | F | G | | H | J | K | L | ; + | ; * |Enter | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Caps |Shift | Z | X | C | V | B | | N | M | , < | . > | / ? | Up |Shift | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | Fn | Ctrl | Opt | Cmd | Eisu |LOWER |Space | |Space |RAISE | Kana | Cmd | Left | Down |Right | * `------------------------------------------------' `------------------------------------------------' */ [_MACOS] = LAYOUT( \ - KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_BSPC, \ - KC_DELT, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, \ + KC_ESC, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_BSPC, \ + KC_TAB, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, \ KC_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ FN, KC_LCTL, KC_LALT, KC_LGUI, KC_EISU, LOWER, KC_SPC, KC_SPC, RAISE, KC_KNA, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT \ ), @@ -74,9 +74,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* LOWER * ,------------------------------------------------. ,------------------------------------------------. * | | | ! | " | # | $ | % | | & | ' | ( | ) | | = | | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | XXXX | XXXX | XXXX | { | ( | | ) | } | XXXX | ~ | | | _ | | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | XXXX | XXXX | XXXX | XXXX | XXXX | | XXXX | XXXX | XXXX | XXXX | XXXX | PgUp | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | | | | | | | | | | | Home | PgDn | End | @@ -92,9 +92,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* RAISE * ,------------------------------------------------. ,------------------------------------------------. * | | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | F11 | F12 | XXXX | [ | ( | | ) | ] | XXXX | ^ | \ | \ | | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| * | | | | | | | | | | | | | | | | @@ -109,20 +109,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* FUNC * ,------------------------------------------------. ,------------------------------------------------. - * |Reset | | XXXX | XXXX | XXXX | XXXX | XXXX | |PrtSc |SLock |Pause | XXXX | XXXX | XXXX | | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | | | XXXX | XXXX | XXXX | XXXX | >Win | | Ins | XXXX | XXXX | XXXX | XXXX | XXXX | | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | | | XXXX | XXXX | XXXX | XXXX | >Mac | | XXXX | XXXX | XXXX | XXXX | XXXX | Vol+ | | + * |Reset | Ins | XXXX | XXXX | XXXX | XXXX | XXXX | | XXXX | XXXX |PrtSc |SrcLk |Pause | XXXX | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | XXXX | XXXX | XXXX | XXXX | >Win | | * | / | Home | PgUp | XXXX | XXXX | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Caps | | XXXX | XXXX | XXXX | XXXX | >Mac | | + | - | End | PgDn | XXXX | Vol+ | | * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | Vol- | Play | + * | | | | | | | | | | | | | Mute | Vol- | Play | * `------------------------------------------------' `------------------------------------------------' */ [_FUNC] = LAYOUT( \ - RESET, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ - _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, WIN, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ - _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MACOS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_VOLD, KC_MPLY \ + RESET, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, _______, \ + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, WIN, JP_ASTR, KC_SLSH, KC_HOME, KC_PGUP, XXXXXXX, XXXXXXX, _______, \ + KC_CAPS, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MACOS, JP_PLUS, KC_MINS, KC_END, KC_PGDN, XXXXXXX, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY \ ) }; diff --git a/keyboards/ergo42/keymaps/koba/readme.md b/keyboards/ergo42/keymaps/koba/readme.md index 1fe0543902f4..bbf9c1c4a6c9 100644 --- a/keyboards/ergo42/keymaps/koba/readme.md +++ b/keyboards/ergo42/keymaps/koba/readme.md @@ -6,12 +6,12 @@ This keymap is for Ergo42. - JIS layout. - Independent Windows layout/MacOS layout layers. -- Bottom row keys arranged like a standard keyboard. +- Bottom row keys are arranged like a standard keyboard. - Arrow keys are designed in the inverted-T. ## Layout -![keyboard-layout](https://user-images.githubusercontent.com/1042121/45888288-aa35ed00-bdf8-11e8-8741-71fe9a0fadc6.png) +![keyboard-layout](https://user-images.githubusercontent.com/1042121/52666273-32a45e00-2f51-11e9-9e15-c231155f3bed.png) ## Windows mode/MacOS mode diff --git a/keyboards/ergo42/keymaps/koba/readme_ja.md b/keyboards/ergo42/keymaps/koba/readme_ja.md index e1dbda821f02..188fb48310e2 100644 --- a/keyboards/ergo42/keymaps/koba/readme_ja.md +++ b/keyboards/ergo42/keymaps/koba/readme_ja.md @@ -11,7 +11,7 @@ Ergo42 用キーマップです。 ## レイアウト -![keyboard-layout](https://user-images.githubusercontent.com/1042121/45888288-aa35ed00-bdf8-11e8-8741-71fe9a0fadc6.png) +![keyboard-layout](https://user-images.githubusercontent.com/1042121/52666273-32a45e00-2f51-11e9-9e15-c231155f3bed.png) ## Windows モード/MacOS モード diff --git a/keyboards/ergo42/keymaps/yshrsmz/keymap.c b/keyboards/ergo42/keymaps/yshrsmz/keymap.c index a4a83a2e1b3d..55fe30e89b64 100644 --- a/keyboards/ergo42/keymaps/yshrsmz/keymap.c +++ b/keyboards/ergo42/keymaps/yshrsmz/keymap.c @@ -17,10 +17,6 @@ enum custom_keycodes { KANA }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE diff --git a/keyboards/ergodash/ergodash.h b/keyboards/ergodash/ergodash.h index bf2bac581ebb..83c785930787 100644 --- a/keyboards/ergodash/ergodash.h +++ b/keyboards/ergodash/ergodash.h @@ -6,26 +6,6 @@ #ifdef KEYBOARD_ergodash_rev1 #include "rev1.h" - // Used to create a keymap using only KC_ prefixed keys - #define LAYOUT_kc( \ - L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ - L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ - LT0, LT1, LT2, LT3, LT4, LT5, RT0, RT1, RT2, RT3, RT4, RT5 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \ - KC_##LT0, KC_##LT1, KC_##LT2, KC_##LT3, KC_##LT4, KC_##LT5, KC_##RT0, KC_##RT1, KC_##RT2, KC_##RT3, KC_##RT4, KC_##RT5 \ - ) -#endif // #ifdef KEYBOARD_ergodash_rev1 - -#ifdef KEYBOARD_ergodash_rev2 - #include "rev2.h" - // Used to create a keymap using only KC_ prefixed keys #define LAYOUT_kc( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ @@ -41,7 +21,7 @@ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \ KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46 \ ) -#endif // #ifdef KEYBOARD_ergodash_rev2 +#endif // #ifdef KEYBOARD_ergodash_rev1 #ifdef KEYBOARD_ergodash_mini #include "mini.h" diff --git a/keyboards/ergodash/matrix.c b/keyboards/ergodash/matrix.c deleted file mode 100644 index bdf265a87496..000000000000 --- a/keyboards/ergodash/matrix.c +++ /dev/null @@ -1,490 +0,0 @@ -/* -Copyright 2017 Danny Nguyen - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" -#include "config.h" -#include "timer.h" - -#ifdef BACKLIGHT_ENABLE - #include "backlight.h" - extern backlight_config_t backlight_config; -#endif - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 -#endif - -#if (DEBOUNCING_DELAY > 0) - static uint16_t debouncing_time; - static bool debouncing = false; -#endif - -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#else -# error "Currently only supports 8 COLS" -#endif -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#define ERROR_DISCONNECT_COUNT 5 - -#define SERIAL_LED_ADDR 0x00 - -#define ROWS_PER_HAND (MATRIX_ROWS/2) - -static uint8_t error_count = 0; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#if (DIODE_DIRECTION == COL2ROW) - static void init_cols(void); - static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); - static void unselect_rows(void); - static void select_row(uint8_t row); - static void unselect_row(uint8_t row); -#elif (DIODE_DIRECTION == ROW2COL) - static void init_rows(void); - static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); - static void unselect_cols(void); - static void unselect_col(uint8_t col); - static void select_col(uint8_t col); -#endif - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col -#if (DIODE_DIRECTION == COL2ROW) - unselect_rows(); - init_cols(); -#elif (DIODE_DIRECTION == ROW2COL) - unselect_cols(); - init_rows(); -#endif - - TX_RX_LED_INIT; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - matrix_init_quantum(); - -} - -uint8_t _matrix_scan(void) -{ - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); -#if (DIODE_DIRECTION == COL2ROW) - // Set row, read cols - for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { -# if (DEBOUNCING_DELAY > 0) - bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); - - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - PORTD ^= (1 << 2); - } - -# else - read_cols_on_row(matrix+offset, current_row); -# endif - - } - -#elif (DIODE_DIRECTION == ROW2COL) - // Set col, read rows - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) - bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } -# else - read_rows_on_col(matrix+offset, current_col); -# endif - - } -#endif - -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - debouncing = false; - } -# endif - - return 1; -} - -#ifdef USE_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - -#ifdef BACKLIGHT_ENABLE - // Write backlight level for slave to read - err = i2c_master_write(backlight_config.enable ? backlight_config.level : 0); -#else - // Write zero, so our byte index is the same - err = i2c_master_write(0x00); -#endif - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { - return 1; - } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - -#ifdef BACKLIGHT_ENABLE - // Write backlight level for slave to read - serial_master_buffer[SERIAL_LED_ADDR] = backlight_config.enable ? backlight_config.level : 0; -#endif - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); - -#ifdef USE_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_I2C -#ifdef BACKLIGHT_ENABLE - // Read backlight level sent from master and update level on slave - backlight_set(i2c_slave_buffer[0]); -#endif - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[i+1] = matrix[offset+i]; - } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } - -#ifdef BACKLIGHT_ENABLE - // Read backlight level sent from master and update level on slave - backlight_set(serial_master_buffer[SERIAL_LED_ADDR]); -#endif -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) -{ - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[current_row]; - - // Clear data in matrix row - current_matrix[current_row] = 0; - - // Select row and wait for row selecton to stabilize - select_row(current_row); - wait_us(30); - - // For each col... - for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { - - // Select the col pin to read (active low) - uint8_t pin = col_pins[col_index]; - uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); - - // Populate the matrix row with the state of the col pin - current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); - } - - // Unselect row - unselect_row(current_row); - - return (last_row_value != current_matrix[current_row]); -} - -static void select_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -#elif (DIODE_DIRECTION == ROW2COL) - -static void init_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) -{ - bool matrix_changed = false; - - // Select col and wait for col selecton to stabilize - select_col(current_col); - wait_us(30); - - // For each row... - for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) - { - - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[row_index]; - - // Check row pin state - if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) - { - // Pin LO, set col bit - current_matrix[row_index] |= (ROW_SHIFTER << current_col); - } - else - { - // Pin HI, clear col bit - current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); - } - - // Determine if the matrix changed state - if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) - { - matrix_changed = true; - } - } - - // Unselect col - unselect_col(current_col); - - return matrix_changed; -} - -static void select_col(uint8_t col) -{ - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_col(uint8_t col) -{ - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_cols(void) -{ - for(uint8_t x = 0; x < MATRIX_COLS; x++) { - uint8_t pin = col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -#endif diff --git a/keyboards/ergodash/mini/config.h b/keyboards/ergodash/mini/config.h index fc63cc1e9d20..cac1bba6f7b8 100644 --- a/keyboards/ergodash/mini/config.h +++ b/keyboards/ergodash/mini/config.h @@ -45,10 +45,6 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST #define C6_AUDIO -#ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(STARTUP_SOUND) - #define GOODBYE_SONG SONG(GOODBYE_SOUND) -#endif /* number of backlight levels */ #ifdef BACKLIGHT_ENABLE @@ -68,23 +64,18 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - -#define RGBLED_NUM 20 // Number of LEDs - -/* - * 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 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 10, 10 } // Number of LEDs + +#define SOFT_SERIAL_PIN D0 +#define SELECT_SOFT_SERIAL_SPEED 1 +/*Sets the protocol speed when using serial communication*/ +//Speeds: +//0: about 189kbps (Experimental only) +//1: about 137kbps (default) +//2: about 75kbps +//3: about 39kbps +//4: about 26kbps +//5: about 20kbps diff --git a/keyboards/ergodash/mini/keymaps/default/config.h b/keyboards/ergodash/mini/keymaps/default/config.h index a5a722fb2a31..df04873a97ec 100644 --- a/keyboards/ergodash/mini/keymaps/default/config.h +++ b/keyboards/ergodash/mini/keymaps/default/config.h @@ -20,6 +20,7 @@ along with this program. If not, see . #pragma once + /* Use I2C or Serial, not both */ #define USE_SERIAL @@ -30,10 +31,3 @@ along with this program. If not, see . #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 20 -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/ergodash/mini/keymaps/default/keymap.c b/keyboards/ergodash/mini/keymaps/default/keymap.c index ecf1f723f7a2..35cbd87a36a8 100644 --- a/keyboards/ergodash/mini/keymaps/default/keymap.c +++ b/keyboards/ergodash/mini/keymaps/default/keymap.c @@ -14,9 +14,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define EISU LALT(KC_GRV) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ergodash/mini/keymaps/default/rules.mk b/keyboards/ergodash/mini/keymaps/default/rules.mk index e69de29bb2d1..bb9e33b08297 100644 --- a/keyboards/ergodash/mini/keymaps/default/rules.mk +++ b/keyboards/ergodash/mini/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no +AUDIO_ENABLE = no diff --git a/keyboards/ergodash/mini/rules.mk b/keyboards/ergodash/mini/rules.mk index b6c9a2580598..bb9e33b08297 100644 --- a/keyboards/ergodash/mini/rules.mk +++ b/keyboards/ergodash/mini/rules.mk @@ -1,2 +1,3 @@ BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = no +AUDIO_ENABLE = no diff --git a/keyboards/ergodash/readme.md b/keyboards/ergodash/readme.md index 1545b44624e0..27672c3ecf37 100644 --- a/keyboards/ergodash/readme.md +++ b/keyboards/ergodash/readme.md @@ -9,17 +9,24 @@ Hardware Availability: Order your own [yourself](https://github.com/omkbd/ErgoDa Make example for this keyboard (after setting up your build environment): - make ergodash/rev2:default + make ergodash/rev1: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. Install Example: (for pro micro) - `make ergodash/rev2:default:avrdude` - + `make ergodash/rev1:default:avrdude` + Note: - "rev2" is for PCB ver 1.1,1.2 - "rev1" is from earlier pcb + "rev1" is for PCB ver 1.0,1.1,1.2 + **The original Rev 1 was owned only by the designer. Therefore, Rev1 has been removed. Since the current PCB is Rev1, we changed Rev2 to Rev1 to match the firmware version.** + # Layout ![layout](https://github.com/omkbd/picture/blob/master/ergodash-layout.png) + +Layout Note: +- In thumb cluster, it is not possible to use all 5 positions as small keys. (as pictured) +- The top 2 1u keys in the thumb cluster share the same connection. +- 2u key (center) position shares with the lower 1u key position + ![PCB](https://github.com/omkbd/picture/blob/master/Ergodash_PCB.jpg) diff --git a/keyboards/ergodash/rev1/config.h b/keyboards/ergodash/rev1/config.h index 160e703629fc..5b7d8568878c 100644 --- a/keyboards/ergodash/rev1/config.h +++ b/keyboards/ergodash/rev1/config.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "config_common.h" @@ -35,9 +34,9 @@ along with this program. If not, see . #define MATRIX_COLS 7 // wiring of each half -#define MATRIX_ROW_PINS { D7, E6, B4, B5, D4 } -#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } -// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order /* define tapping term */ #define TAPPING_TERM 120 @@ -45,8 +44,15 @@ along with this program. If not, see . /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST +#define C6_AUDIO + /* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 +#ifdef BACKLIGHT_ENABLE + #define BACKLIGHT_PIN B6 + #define BACKLIGHT_LEVELS 7 +// #define BACKLIGHT_BREATHING +// #define BREATHING_PERIOD 4 +#endif /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 @@ -58,25 +64,18 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - -#define RGBLED_NUM 24 // Number of LEDs - -/* - * 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 - -#endif +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 24 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT { 12, 12 } // Number of LEDs + +#define SOFT_SERIAL_PIN D0 +#define SELECT_SOFT_SERIAL_SPEED 1 +/*Sets the protocol speed when using serial communication*/ +//Speeds: +//0: about 189kbps (Experimental only) +//1: about 137kbps (default) +//2: about 75kbps +//3: about 39kbps +//4: about 26kbps +//5: about 20kbps diff --git a/keyboards/ergodash/rev1/info.json b/keyboards/ergodash/rev1/info.json index f5ed321de663..bcfbda6d33b6 100644 --- a/keyboards/ergodash/rev1/info.json +++ b/keyboards/ergodash/rev1/info.json @@ -1,13 +1,13 @@ { - "keyboard_name": "ErgoDash rev1", + "keyboard_name": "ErgoDash rev2", "url": "", "maintainer": "qmk", - "width": 16, + "width": 18, "height": 6.25, "layouts": { "LAYOUT": { - "key_count": 68, - "layout": [{"label":"L00", "x":0, "y":0.375}, {"label":"L01", "x":1, "y":0.375}, {"label":"L02", "x":2, "y":0.125}, {"label":"L03", "x":3, "y":0}, {"label":"L04", "x":4, "y":0.125}, {"label":"L05", "x":5, "y":0.25}, {"label":"L06", "x":6, "y":0.75}, {"label":"R00", "x":9, "y":0.75}, {"label":"R01", "x":10, "y":0.25}, {"label":"R02", "x":11, "y":0.125}, {"label":"R03", "x":12, "y":0}, {"label":"R04", "x":13, "y":0.125}, {"label":"R05", "x":14, "y":0.375}, {"label":"R06", "x":15, "y":0.375}, {"label":"L10", "x":0, "y":1.375}, {"label":"L11", "x":1, "y":1.375}, {"label":"L12", "x":2, "y":1.125}, {"label":"L13", "x":3, "y":1}, {"label":"L14", "x":4, "y":1.125}, {"label":"L15", "x":5, "y":1.25}, {"label":"L16", "x":6, "y":1.75}, {"label":"R10", "x":9, "y":1.75}, {"label":"R11", "x":10, "y":1.25}, {"label":"R12", "x":11, "y":1.125}, {"label":"R13", "x":12, "y":1}, {"label":"R14", "x":13, "y":1.125}, {"label":"R15", "x":14, "y":1.375}, {"label":"R16", "x":15, "y":1.375}, {"label":"L20", "x":0, "y":2.375}, {"label":"L21", "x":1, "y":2.375}, {"label":"L22", "x":2, "y":2.125}, {"label":"L23", "x":3, "y":2}, {"label":"L24", "x":4, "y":2.125}, {"label":"L25", "x":5, "y":2.25}, {"label":"L26", "x":6, "y":2.75}, {"label":"R20", "x":9, "y":2.75}, {"label":"R21", "x":10, "y":2.25}, {"label":"R22", "x":11, "y":2.125}, {"label":"R23", "x":12, "y":2}, {"label":"R24", "x":13, "y":2.125}, {"label":"R25", "x":14, "y":2.375}, {"label":"R26", "x":15, "y":2.375}, {"label":"L30", "x":0, "y":3.375}, {"label":"L31", "x":1, "y":3.375}, {"label":"L32", "x":2, "y":3.125}, {"label":"L33", "x":3, "y":3}, {"label":"L34", "x":4, "y":3.125}, {"label":"L35", "x":5, "y":3.25}, {"label":"L36", "x":6.5, "y":4.25}, {"label":"R30", "x":8.5, "y":4.25}, {"label":"R31", "x":10, "y":3.25}, {"label":"R32", "x":11, "y":3.125}, {"label":"R33", "x":12, "y":3}, {"label":"R34", "x":13, "y":3.125}, {"label":"R35", "x":14, "y":3.375}, {"label":"R36", "x":15, "y":3.375}, {"label":"LT0", "x":0, "y":4.375}, {"label":"LT1", "x":1, "y":4.375}, {"label":"LT2", "x":2, "y":4.125}, {"label":"LT3", "x":3, "y":4}, {"label":"LT4", "x":5.5, "y":5.25}, {"label":"LT5", "x":6.5, "y":5.25}, {"label":"RT0", "x":8.5, "y":5.25}, {"label":"RT1", "x":9.5, "y":5.25}, {"label":"RT2", "x":12, "y":4}, {"label":"RT3", "x":13, "y":4.125}, {"label":"RT4", "x":14, "y":4.375}, {"label":"RT5", "x":15, "y":4.375}] + "key_count": 70, + "layout": [{"label":"L00", "x":0, "y":0.375}, {"label":"L01", "x":1, "y":0.375}, {"label":"L02", "x":2, "y":0.125}, {"label":"L03", "x":3, "y":0}, {"label":"L04", "x":4, "y":0.125}, {"label":"L05", "x":5, "y":0.25}, {"label":"L06", "x":6, "y":0.75}, {"label":"R00", "x":11, "y":0.75}, {"label":"R01", "x":12, "y":0.25}, {"label":"R02", "x":13, "y":0.125}, {"label":"R03", "x":14, "y":0}, {"label":"R04", "x":15, "y":0.125}, {"label":"R05", "x":16, "y":0.375}, {"label":"R06", "x":17, "y":0.375}, {"label":"L10", "x":0, "y":1.375}, {"label":"L11", "x":1, "y":1.375}, {"label":"L12", "x":2, "y":1.125}, {"label":"L13", "x":3, "y":1}, {"label":"L14", "x":4, "y":1.125}, {"label":"L15", "x":5, "y":1.25}, {"label":"L16", "x":6, "y":1.75}, {"label":"R10", "x":11, "y":1.75}, {"label":"R11", "x":12, "y":1.25}, {"label":"R12", "x":13, "y":1.125}, {"label":"R13", "x":14, "y":1}, {"label":"R14", "x":15, "y":1.125}, {"label":"R15", "x":16, "y":1.375}, {"label":"R16", "x":17, "y":1.375}, {"label":"L20", "x":0, "y":2.375}, {"label":"L21", "x":1, "y":2.375}, {"label":"L22", "x":2, "y":2.125}, {"label":"L23", "x":3, "y":2}, {"label":"L24", "x":4, "y":2.125}, {"label":"L25", "x":5, "y":2.25}, {"label":"L26", "x":6, "y":2.75}, {"label":"R20", "x":11, "y":2.75}, {"label":"R21", "x":12, "y":2.25}, {"label":"R22", "x":13, "y":2.125}, {"label":"R23", "x":14, "y":2}, {"label":"R24", "x":15, "y":2.125}, {"label":"R25", "x":16, "y":2.375}, {"label":"R26", "x":17, "y":2.375}, {"label":"L30", "x":0, "y":3.375}, {"label":"L31", "x":1, "y":3.375}, {"label":"L32", "x":2, "y":3.125}, {"label":"L33", "x":3, "y":3}, {"label":"L34", "x":4, "y":3.125}, {"label":"L35", "x":5, "y":3.25}, {"label":"L36", "x":6.5, "y":4.25}, {"label":"R30", "x":10.5, "y":4.25}, {"label":"R31", "x":12, "y":3.25}, {"label":"R32", "x":13, "y":3.125}, {"label":"R33", "x":14, "y":3}, {"label":"R34", "x":15, "y":3.125}, {"label":"R35", "x":16, "y":3.375}, {"label":"R36", "x":17, "y":3.375}, {"label":"L40", "x":0, "y":4.375}, {"label":"L41", "x":1, "y":4.375}, {"label":"L42", "x":2, "y":4.125}, {"label":"L43", "x":3, "y":4}, {"label":"L44", "x":5.5, "y":5.25}, {"label":"L45", "x":6.5, "y":5.25}, {"label":"L46", "x":7.5, "y":4.25, "h":2}, {"label":"R40", "x":9.5, "y":4.25, "h":2}, {"label":"R41", "x":10.5, "y":5.25}, {"label":"R42", "x":11.5, "y":5.25}, {"label":"R43", "x":14, "y":4}, {"label":"R44", "x":15, "y":4.125}, {"label":"R45", "x":16, "y":4.375}, {"label":"R46", "x":17, "y":4.375}] } } } diff --git a/keyboards/ergodash/rev1/keymaps/default/config.h b/keyboards/ergodash/rev1/keymaps/default/config.h index 7e7fe4f69a86..df04873a97ec 100644 --- a/keyboards/ergodash/rev1/keymaps/default/config.h +++ b/keyboards/ergodash/rev1/keymaps/default/config.h @@ -18,10 +18,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" /* Use I2C or Serial, not both */ @@ -33,12 +31,3 @@ along with this program. If not, see . #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS - -#endif - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 24 -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/ergodash/rev1/keymaps/default/keymap.c b/keyboards/ergodash/rev1/keymaps/default/keymap.c index 1464fd20e0c9..61539987482b 100644 --- a/keyboards/ergodash/rev1/keymaps/default/keymap.c +++ b/keyboards/ergodash/rev1/keymaps/default/keymap.c @@ -1,6 +1,4 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -16,95 +14,92 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO -#define KC_JPN LALT(KC_GRV) +#define EISU LALT(KC_GRV) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty - * ,-------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | [ | ] | 6 | 7 | 8 | 9 | 0 | Caps | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | ` | Q | W | E | R | T | - | = | Y | U | I | O | P | \ | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | A | S | D | F | G | Del | Bksp | H | J | K | L | ; | " | - * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | JPN | Enter| N | M | , | . | / | Shift| - * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' - * | Ctrl | GUI | ALt |Adjust| |Lower | Space |Enter |Raise| | Left| Down | Up | Right| - * ,-------------------------------------------------------------------------------------------------. + * ,----------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 |Pscree| + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | ` | Q | W | E | R | T | - | | = | Y | U | I | O | P | \ | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Tab | A | S | D | F | G | Del | | Bksp | H | J | K | L | ; | " | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | Space| | Enter| N | M | , | . | / | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | Ctrl | GUI | ALt | EISU |||||||| Lower| Space| Del |||||||| Bksp | Enter| Raise|||||||| Left | Down | Up | Right| + * ,----------------------------------------------------------------------------------------------------------------------. */ [_QWERTY] = LAYOUT( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CAPS, \ - KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL , KC_BSPC, 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_JPN , KC_ENT , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC , KC_ENT , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PSCR, \ + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL , KC_BSPC, 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_SPC , KC_ENT , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,KC_DEL, KC_BSPC,KC_ENT , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower - * ,-------------------------------------------------------------------------------------------------. - * | F11 | F1 | F2 | F3 | F4 | F5 | { | } | F6 | F7 | F8 | F9 | F10 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | _ | + | ^ | & | * | ( | ) | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | 1 | 2 | 3 | 4 | 5 | Del | Bksp | H | J | K | L | : | " | - * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | Shift| 6 | 7 | 8 | 9 | 0 | JPN | Enter| N | M | < | > | ? | Shift| - * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' - * | Ctrl | GUI | ALt |Adjust| |Lower | Space |Enter |Raise| | Home |PageDn|PageUp| End | - * ,-------------------------------------------------------------------------------------------------. + * ,----------------------------------------------------------------------------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | { | | } | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | _ | | + | ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Tab | 1 | 2 | 3 | 4 | 5 | Del | | Bksp | H | J | K | L | : | " | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| 6 | 7 | 8 | 9 | 0 | Space| | Enter| N | M | < | > | ? | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | Ctrl | GUI | ALt | EISU |||||||| Lower| Space| Del |||||||| Bksp | Enter| Raise|||||||| Home |PageDn|PageUp| End | + * ,----------------------------------------------------------------------------------------------------------------------. */ [_LOWER] = LAYOUT( - KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ - KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL , KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_DQT , \ - KC_LSFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_JPN , KC_ENT , KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC , KC_ENT , RAISE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL , KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_DQT , \ + KC_LSFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SPC , KC_ENT , KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,KC_DEL, KC_BSPC,KC_ENT , RAISE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ ), /* Raise - * ,-------------------------------------------------------------------------------------------------. - * | F11 | F1 | F2 | F3 | F4 | F5 | { | } | F6 | F7 | F8 | F9 | F10 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | _ | + | ^ | & | * | ( | ) | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | 1 | 2 | 3 | 4 | 5 | Del | Bksp | H | J | K | L | : | " | - * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | Shift| 6 | 7 | 8 | 9 | 0 | JPN | Enter| N | M | < | > | ? | Shift| - * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' - * | Ctrl | GUI | ALt |Adjust| |Lower | Space |Enter |Raise| | Home |PageDn|PageUp| End | - * ,-------------------------------------------------------------------------------------------------. + * ,----------------------------------------------------------------------------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | { | | } | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | _ | | + | ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Tab | 1 | 2 | 3 | 4 | 5 | Del | | Bksp | H | J | K | L | : | " | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| 6 | 7 | 8 | 9 | 0 | Space| | Enter| N | M | < | > | ? | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | Ctrl | GUI | ALt | EISU |||||||| Lower| Space| Del |||||||| Bksp | Enter| Raise|||||||| Home |PageDn|PageUp| End | + * ,----------------------------------------------------------------------------------------------------------------------. */ [_RAISE] = LAYOUT( - KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ - KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL , KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_DQT , \ - KC_LSFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_JPN , KC_ENT , KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC , KC_ENT , RAISE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL , KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_DQT , \ + KC_LSFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SPC , KC_ENT , KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,KC_DEL, KC_BSPC,KC_ENT , RAISE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ ), /* Adjust - * ,-------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset|RGB ON| MODE| HUE-| HUE+| | | SAT-| SAT+| VAL-| VAL+| | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' - * | | | | | | | | | | | | | | | - * ,-------------------------------------------------------------------------------------------------. + * ,----------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | | Reset|RGB ON| MODE| HUE-| HUE+| | | | SAT-| SAT+| VAL-| VAL+| | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | | | BL ON| BRTG| INC| DEC| | | | | | | | | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | | | | |||||||| | | |||||||| | | |||||||| | | | | + * ,----------------------------------------------------------------------------------------------------------------------. */ [_ADJUST] = LAYOUT( - _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \ - _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI,_______, _______, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \ - _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI,_______, _______, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \ + _______, _______, BL_TOGG, BL_BRTG, BL_INC , BL_DEC ,_______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______,_______,_______, _______,_______, _______, _______, _______, _______, _______ \ ) }; diff --git a/keyboards/ergodash/rev1/keymaps/default/rules.mk b/keyboards/ergodash/rev1/keymaps/default/rules.mk index e69de29bb2d1..bb9e33b08297 100644 --- a/keyboards/ergodash/rev1/keymaps/default/rules.mk +++ b/keyboards/ergodash/rev1/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no +AUDIO_ENABLE = no diff --git a/keyboards/levinson/keymaps/default/config.h b/keyboards/ergodash/rev1/keymaps/greenshadowmaker/config.h similarity index 95% rename from keyboards/levinson/keymaps/default/config.h rename to keyboards/ergodash/rev1/keymaps/greenshadowmaker/config.h index e710d6e4aaba..df04873a97ec 100644 --- a/keyboards/levinson/keymaps/default/config.h +++ b/keyboards/ergodash/rev1/keymaps/greenshadowmaker/config.h @@ -3,7 +3,6 @@ This is the c configuration file for the keymap Copyright 2012 Jun Wako Copyright 2015 Jack Humbert -Copyright 2018 Danny Nguyen 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 @@ -21,6 +20,7 @@ along with this program. If not, see . #pragma once + /* Use I2C or Serial, not both */ #define USE_SERIAL diff --git a/keyboards/ergodash/rev1/keymaps/greenshadowmaker/keyboard-layout-editor.json b/keyboards/ergodash/rev1/keymaps/greenshadowmaker/keyboard-layout-editor.json new file mode 100644 index 000000000000..8f8d30855384 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/greenshadowmaker/keyboard-layout-editor.json @@ -0,0 +1,460 @@ +[ + { + "name": "gsm-ErgoDash", + "notes": "Front Legend = \"Adust\" layer (both lower and Raise)\n\n\nLayout Positions are an aproximation and not exact" + }, + [ + { + "x": 3, + "t": "#0000ff\n#ff0000" + }, + "\nF3\n\n\n\n\n\n\n\n3 #", + { + "x": 11 + }, + "\nF8\n\n\n\n\n\n\n\n8 *" + ], + [ + { + "y": -0.875, + "x": 2 + }, + "\nF2\n\n\n\n\n\n\n\n2 @", + { + "x": 1 + }, + "\nF4\n\n\n\n\n\n\n\n4 $", + { + "x": 9 + }, + "\nF7\n\n\n\n\n\n\n\n7 &", + { + "x": 1 + }, + "\nF9\n\n\n\n\n\n\n\n9 (" + ], + [ + { + "y": -0.875, + "x": 5 + }, + "\nF5\n\n\n\n\n\n\n\n5 %", + { + "x": 7 + }, + "\nF6\n\n\n\n\n\n\n\n6 &" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 3 + }, + "Esc\n\n\n\nreset", + { + "t": "#0000ff\n#ff0000", + "a": 4 + }, + "\nF1\n\n\n\n\n\n\n\n1 !", + { + "x": 15 + }, + "\nF10\n\n\n\n\n\n\n\n0 )", + { + "t": "#000000", + "a": 7, + "fa": [ + 2 + ] + }, + "Bksp" + ], + [ + { + "y": -0.625, + "x": 6, + "f": 3 + }, + "= +", + { + "x": 5, + "f": 3 + }, + "- _" + ], + [ + { + "y": -0.75, + "x": 3, + "f": 3 + }, + "E", + { + "x": 11, + "f": 3 + }, + "I" + ], + [ + { + "y": -0.875, + "x": 2, + "t": "#0000ff\n#ff0000\n\n\n\n\n\n\n\n\n#ff0000", + "a": 4, + "f": 3 + }, + "PgUP\nUP\n\n\n\n\n\n\n\nW", + { + "x": 1, + "t": "#000000", + "a": 3, + "f": 3 + }, + "R\n\n\n\nrgb_tog", + { + "x": 9, + "a": 7, + "f": 3 + }, + "U", + { + "x": 1, + "f": 3 + }, + "O" + ], + [ + { + "y": -0.875, + "x": 5, + "a": 3, + "f": 3 + }, + "T\n\n\n\nbl_tog", + { + "x": 7, + "a": 7, + "f": 3 + }, + "Y" + ], + [ + { + "y": -0.875, + "f": 3 + }, + "Tab", + { + "f": 3 + }, + "Q", + { + "x": 15, + "f": 3 + }, + "P", + { + "f": 3 + }, + "] }" + ], + [ + { + "y": -0.625, + "x": 6 + }, + "", + { + "x": 5, + "f": 3 + }, + "[ {" + ], + [ + { + "y": -0.75, + "x": 3, + "t": "#0000ff\n#ff0000\n\n\n\n\n\n\n\n\n#ff0000", + "a": 0, + "f": 3 + }, + "End\nRIGHT\n\n\nrgb_sai\n\n\n\n\nD", + { + "x": 11, + "t": "#000000", + "a": 7, + "f": 3 + }, + "K" + ], + [ + { + "y": -0.875, + "x": 2, + "t": "#0000ff\n#ff0000\n\n\n\n\n\n\n\n\n#ff0000", + "a": 0, + "f": 3 + }, + "PgDwn\nDOWN\n\n\nrgb_hai\n\n\n\n\nS", + { + "x": 1, + "t": "#000000", + "a": 3, + "f": 3 + }, + "F\n\n\n\nrgb_val", + { + "x": 9, + "a": 7, + "f": 3 + }, + "J", + { + "x": 1, + "f": 3 + }, + "L" + ], + [ + { + "y": -0.875, + "x": 5, + "a": 3, + "f": 3 + }, + "G\n\n\n\nbl_inc", + { + "x": 7, + "a": 7, + "f": 3 + }, + "H" + ], + [ + { + "y": -0.875, + "c": "#0000ff", + "t": "#ffffffff", + "f": 3 + }, + "Raise", + { + "c": "#cccccc", + "t": "#0000ff\n#ff0000\n\n\n\n\n\n\n\n\n#ff0000", + "a": 4, + "f": 3 + }, + "Home\nLEFT\n\n\n\n\n\n\n\nA", + { + "x": 15, + "t": "#000000", + "a": 7, + "f": 3 + }, + ": ;", + { + "f": 3 + }, + "' \"" + ], + [ + { + "y": -0.625, + "x": 6 + }, + "", + { + "x": 5 + }, + "" + ], + [ + { + "y": -0.75, + "x": 3, + "a": 3, + "f": 3 + }, + "C\n\n\n\nrgb_sad", + { + "x": 11, + "a": 7, + "f": 3 + }, + ", <" + ], + [ + { + "y": -0.875, + "x": 2, + "a": 3, + "f": 3 + }, + "X\n\n\n\nrgb_sad", + { + "x": 1, + "f": 3 + }, + "V\n\n\n\nrgb_vad", + { + "x": 9, + "a": 7, + "f": 3 + }, + "M", + { + "x": 1, + "f": 3 + }, + ". >" + ], + [ + { + "y": -0.875, + "x": 5, + "a": 3, + "f": 3 + }, + "B\n\n\n\nbl_dec", + { + "x": 7, + "a": 7, + "f": 3 + }, + "N" + ], + [ + { + "y": -0.875, + "a": 3, + "f": 3 + }, + "Shift\n\n\n\neep_rst", + { + "a": 7, + "f": 3 + }, + "Z", + { + "x": 15, + "f": 3 + }, + "/ ?", + { + "f": 3 + }, + "Shift" + ], + [ + { + "y": -0.25, + "x": 2, + "f": 3 + }, + "Alt", + { + "x": 13, + "f": 3 + }, + "DOWN" + ], + [ + { + "y": -0.9749999999999996, + "x": 3.5, + "f": 3 + }, + "Ctrl", + { + "x": 10.15, + "f": 3 + }, + "LEFT" + ], + [ + { + "y": -0.7750000000000004, + "f": 3 + }, + "`~", + { + "f": 3 + }, + "\\|", + { + "x": 15, + "f": 3 + }, + "UP", + { + "f": 3 + }, + "RIGHT" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -0.25, + "x": -0.2999999999999998, + "c": "#eb7c15", + "f": 3, + "h": 2 + }, + "Space", + { + "c": "#cccccc", + "f": 3 + }, + "Del" + ], + [ + { + "x": -1.2999999999999998, + "c": "#ff0000", + "f": 3 + }, + "Lower", + { + "x": 1, + "c": "#cccccc", + "t": "#0000ff\n#ff0000", + "a": 4 + }, + "\nApp\n\n\n\n\n\n\n\nOS" + ], + [ + { + "r": -30, + "rx": 13, + "y": -0.5, + "x": -2, + "t": "#000000", + "a": 7, + "f": 3 + }, + "PrtScr", + { + "c": "#eb7c15", + "f": 3, + "h": 2 + }, + "Space" + ], + [ + { + "x": -2, + "c": "#cccccc", + "f": 3 + }, + "Enter", + { + "x": 1, + "c": "#0000ff", + "t": "#ffffff", + "f": 3 + }, + "Raise" + ] +] \ No newline at end of file diff --git a/keyboards/ergodash/rev1/keymaps/greenshadowmaker/keymap.c b/keyboards/ergodash/rev1/keymaps/greenshadowmaker/keymap.c new file mode 100644 index 000000000000..7a7985f75fc8 --- /dev/null +++ b/keyboards/ergodash/rev1/keymaps/greenshadowmaker/keymap.c @@ -0,0 +1,136 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,----------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | = | | - | 6 | 7 | 8 | 9 | 0 |Backsp| + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | | [ | Y | U | I | O | P | ] | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Raise| A | S | D | F | G | | | | H | J | K | L | ; | " | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B |||||||| Del | | |||||||| N | M | , | . | / | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | ` | \ | ALt | Ctrl |||||||| Lower| Space| LGui|||||||| Enter| Space| Raise|||||||| Left | Down | Up | Right| + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_QWERTY] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, \ + RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, 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_DEL, KC_PSCR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_GRV,KC_BSLS, KC_LALT, KC_LCTL, LOWER, KC_SPC,KC_LGUI, KC_ENT ,KC_SPC , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,----------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | | | Up | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Raise| Left | Down | Rght | | | | | | | | | | | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| | | | | |||||||| | | |||||||| | | | | | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | | | | |||||||| Lower| Space| |||||||| | Space| Raise|||||||| | | | | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_LOWER] = LAYOUT( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RAISE, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \ + XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ), + + /* Raise + * ,----------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | | | PgUp | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Raise| Home | PgDwn| End | | | | | | | | | | | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + * | Shift| | | | | |||||||| | | |||||||| | | | | | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | | | | |||||||| Lower| Space| |||||||| |Space | Raise|||||||| | | | | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_RAISE] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RAISE, KC_HOME,KC_PGDOWN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \ + XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC , RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ), + + /* Adjust (Both Raise and Lower Together) + * ,----------------------------------------------------------------------------------------------------------------------. + * | Reset| | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | | | | |rgbtog|bl_tog| | | | | | | | | | + * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| + * | Raise| |rgbhui|rgbsai|rgbvai|bl_inc| | | | | | | | | | + * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| + *|EEP_RST| |rgbhud|rgbdec|rgbvad|bl_dec|||||||| | | |||||||| | | | | | Shift| + * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| + * | | | | |||||||| Lower| Space| |||||||| | Space| Raise|||||||| | | | | + * ,----------------------------------------------------------------------------------------------------------------------. + */ + [_ADJUST] = LAYOUT( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RAISE, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + EEP_RST, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, \ + XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, LOWER, KC_SPC ,XXXXXXX, XXXXXXX, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/zen/keymaps/default/rules.mk b/keyboards/ergodash/rev1/keymaps/greenshadowmaker/rules.mk similarity index 71% rename from keyboards/zen/keymaps/default/rules.mk rename to keyboards/ergodash/rev1/keymaps/greenshadowmaker/rules.mk index 73142a16803a..11b62b9bffeb 100644 --- a/keyboards/zen/keymaps/default/rules.mk +++ b/keyboards/ergodash/rev1/keymaps/greenshadowmaker/rules.mk @@ -1,3 +1,3 @@ -RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes - +RGBLIGHT_ENABLE = yes +AUDIO_ENABLE = no diff --git a/keyboards/ergodash/rev1/rev1.h b/keyboards/ergodash/rev1/rev1.h index 952801916a11..55135adca6d4 100644 --- a/keyboards/ergodash/rev1/rev1.h +++ b/keyboards/ergodash/rev1/rev1.h @@ -25,19 +25,19 @@ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ - LT0, LT1, LT2, LT3, LT4, LT5, RT0, RT1, RT2, RT3, RT4, RT5 \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ ) \ { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { LT0, LT1, LT2, LT3, LT4, LT5, KC_NO }, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20 }, \ - { R36, R35, R34, R33, R32, R31, R30 }, \ - { RT5, RT4, RT3, RT2, RT1, RT0, KC_NO } \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ } #else // Keymap with right side flipped @@ -47,19 +47,19 @@ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ - LT0, LT1, LT2, LT3, LT4, LT5, RT0, RT1, RT2, RT3, RT4, RT5 \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ ) \ { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { LT0, LT1, LT2, LT3, LT4, LT5, KC_NO }, \ - { R00, R01, R02, R03, R04, R05, R06 }, \ - { R10, R11, R12, R13, R14, R15, R16 }, \ - { R20, R21, R22, R23, R24, R25, R26 }, \ - { R30, R31, R32, R33, R34, R35, R36 }, \ - { RT0, RT1, RT2, RT3, RT4, RT5, KC_NO } \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ } #endif diff --git a/keyboards/ergodash/rev1/rules.mk b/keyboards/ergodash/rev1/rules.mk index 7b30c0beff2a..bb9e33b08297 100644 --- a/keyboards/ergodash/rev1/rules.mk +++ b/keyboards/ergodash/rev1/rules.mk @@ -1 +1,3 @@ BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no +AUDIO_ENABLE = no diff --git a/keyboards/ergodash/rev2/info.json b/keyboards/ergodash/rev2/info.json deleted file mode 100644 index bcfbda6d33b6..000000000000 --- a/keyboards/ergodash/rev2/info.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "keyboard_name": "ErgoDash rev2", - "url": "", - "maintainer": "qmk", - "width": 18, - "height": 6.25, - "layouts": { - "LAYOUT": { - "key_count": 70, - "layout": [{"label":"L00", "x":0, "y":0.375}, {"label":"L01", "x":1, "y":0.375}, {"label":"L02", "x":2, "y":0.125}, {"label":"L03", "x":3, "y":0}, {"label":"L04", "x":4, "y":0.125}, {"label":"L05", "x":5, "y":0.25}, {"label":"L06", "x":6, "y":0.75}, {"label":"R00", "x":11, "y":0.75}, {"label":"R01", "x":12, "y":0.25}, {"label":"R02", "x":13, "y":0.125}, {"label":"R03", "x":14, "y":0}, {"label":"R04", "x":15, "y":0.125}, {"label":"R05", "x":16, "y":0.375}, {"label":"R06", "x":17, "y":0.375}, {"label":"L10", "x":0, "y":1.375}, {"label":"L11", "x":1, "y":1.375}, {"label":"L12", "x":2, "y":1.125}, {"label":"L13", "x":3, "y":1}, {"label":"L14", "x":4, "y":1.125}, {"label":"L15", "x":5, "y":1.25}, {"label":"L16", "x":6, "y":1.75}, {"label":"R10", "x":11, "y":1.75}, {"label":"R11", "x":12, "y":1.25}, {"label":"R12", "x":13, "y":1.125}, {"label":"R13", "x":14, "y":1}, {"label":"R14", "x":15, "y":1.125}, {"label":"R15", "x":16, "y":1.375}, {"label":"R16", "x":17, "y":1.375}, {"label":"L20", "x":0, "y":2.375}, {"label":"L21", "x":1, "y":2.375}, {"label":"L22", "x":2, "y":2.125}, {"label":"L23", "x":3, "y":2}, {"label":"L24", "x":4, "y":2.125}, {"label":"L25", "x":5, "y":2.25}, {"label":"L26", "x":6, "y":2.75}, {"label":"R20", "x":11, "y":2.75}, {"label":"R21", "x":12, "y":2.25}, {"label":"R22", "x":13, "y":2.125}, {"label":"R23", "x":14, "y":2}, {"label":"R24", "x":15, "y":2.125}, {"label":"R25", "x":16, "y":2.375}, {"label":"R26", "x":17, "y":2.375}, {"label":"L30", "x":0, "y":3.375}, {"label":"L31", "x":1, "y":3.375}, {"label":"L32", "x":2, "y":3.125}, {"label":"L33", "x":3, "y":3}, {"label":"L34", "x":4, "y":3.125}, {"label":"L35", "x":5, "y":3.25}, {"label":"L36", "x":6.5, "y":4.25}, {"label":"R30", "x":10.5, "y":4.25}, {"label":"R31", "x":12, "y":3.25}, {"label":"R32", "x":13, "y":3.125}, {"label":"R33", "x":14, "y":3}, {"label":"R34", "x":15, "y":3.125}, {"label":"R35", "x":16, "y":3.375}, {"label":"R36", "x":17, "y":3.375}, {"label":"L40", "x":0, "y":4.375}, {"label":"L41", "x":1, "y":4.375}, {"label":"L42", "x":2, "y":4.125}, {"label":"L43", "x":3, "y":4}, {"label":"L44", "x":5.5, "y":5.25}, {"label":"L45", "x":6.5, "y":5.25}, {"label":"L46", "x":7.5, "y":4.25, "h":2}, {"label":"R40", "x":9.5, "y":4.25, "h":2}, {"label":"R41", "x":10.5, "y":5.25}, {"label":"R42", "x":11.5, "y":5.25}, {"label":"R43", "x":14, "y":4}, {"label":"R44", "x":15, "y":4.125}, {"label":"R45", "x":16, "y":4.375}, {"label":"R46", "x":17, "y":4.375}] - } - } -} diff --git a/keyboards/ergodash/rev2/keymaps/default/keymap.c b/keyboards/ergodash/rev2/keymaps/default/keymap.c deleted file mode 100644 index 418089e1b036..000000000000 --- a/keyboards/ergodash/rev2/keymaps/default/keymap.c +++ /dev/null @@ -1,159 +0,0 @@ -#include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO -#define EISU LALT(KC_GRV) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Qwerty - * ,----------------------------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 |Pscree| - * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| - * | ` | Q | W | E | R | T | - | | = | Y | U | I | O | P | \ | - * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| - * | Tab | A | S | D | F | G | Del | | Bksp | H | J | K | L | ; | " | - * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | Space| | Enter| N | M | , | . | / | Shift| - * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| - * | Ctrl | GUI | ALt | EISU |||||||| Lower| Space| |||||||| | Enter| Raise|||||||| Left | Down | Up | Right| - * ,----------------------------------------------------------------------------------------------------------------------. - */ - [_QWERTY] = LAYOUT( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PSCR, \ - KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL , KC_BSPC, 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_SPC , KC_ENT , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,_______, _______,KC_ENT , RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ - ), - - /* Lower - * ,----------------------------------------------------------------------------------------------------------------------. - * | F11 | F1 | F2 | F3 | F4 | F5 | { | | } | F6 | F7 | F8 | F9 | F10 | F12 | - * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | _ | | + | ^ | & | * | ( | ) | | | - * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| - * | Tab | 1 | 2 | 3 | 4 | 5 | Del | | Bksp | H | J | K | L | : | " | - * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| - * | Shift| 6 | 7 | 8 | 9 | 0 | Space| | Enter| N | M | < | > | ? | Shift| - * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| - * | Ctrl | GUI | ALt | EISU |||||||| Lower| Space| |||||||| | Enter| Raise|||||||| Home |PageDn|PageUp| End | - * ,----------------------------------------------------------------------------------------------------------------------. - */ - [_LOWER] = LAYOUT( - KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ - KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL , KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_DQT , \ - KC_LSFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SPC , KC_ENT , KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,_______, _______,KC_ENT , RAISE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ - ), - - /* Raise - * ,----------------------------------------------------------------------------------------------------------------------. - * | F11 | F1 | F2 | F3 | F4 | F5 | { | | } | F6 | F7 | F8 | F9 | F10 | F12 | - * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | _ | | + | ^ | & | * | ( | ) | | | - * |------+------+------+------+------+------+------+--------------------+------+------+------+------+------+------+------| - * | Tab | 1 | 2 | 3 | 4 | 5 | Del | | Bksp | H | J | K | L | : | " | - * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| - * | Shift| 6 | 7 | 8 | 9 | 0 | Space| | Enter| N | M | < | > | ? | Shift| - * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| - * | Ctrl | GUI | ALt | EISU |||||||| Lower| Space| |||||||| | Enter| Raise|||||||| Home |PageDn|PageUp| End | - * ,----------------------------------------------------------------------------------------------------------------------. - */ - [_RAISE] = LAYOUT( - KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ - KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL , KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_DQT , \ - KC_LSFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SPC , KC_ENT , KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, EISU, LOWER, KC_SPC ,_______, _______,KC_ENT , RAISE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ - ), - - /* Adjust - * ,----------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| - * | | Reset|RGB ON| MODE| HUE-| HUE+| | | | SAT-| SAT+| VAL-| VAL+| | | - * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+---------------------------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * |-------------+------+------+------+------+------+------+------+------+------+------+------+------+------+-------------| - * | | | | |||||||| | | |||||||| | | |||||||| | | | | - * ,----------------------------------------------------------------------------------------------------------------------. - */ - [_ADJUST] = LAYOUT( - _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \ - _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI,_______, _______, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \ - _______, _______, BL_TOGG, BL_BRTG, BL_INC , BL_DEC ,_______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______,_______,_______, _______,_______, _______, _______, _______, _______, _______ \ - ) -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - print("mode just switched to qwerty and this is a huge string\n"); - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; - } - return true; -} diff --git a/keyboards/ergodash/rev2/rev2.c b/keyboards/ergodash/rev2/rev2.c deleted file mode 100644 index 5e787921cbbc..000000000000 --- a/keyboards/ergodash/rev2/rev2.c +++ /dev/null @@ -1,39 +0,0 @@ -#include "ergodash.h" - -#ifdef AUDIO_ENABLE - float tone_startup[][2] = SONG(STARTUP_SOUND); - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif - -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -#endif - -void matrix_init_kb(void) { - - #ifdef AUDIO_ENABLE - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); - #endif - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - -void shutdown_user(void) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); - #endif -} diff --git a/keyboards/ergodash/rev2/rev2.h b/keyboards/ergodash/rev2/rev2.h deleted file mode 100644 index 55135adca6d4..000000000000 --- a/keyboards/ergodash/rev2/rev2.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef REV1_H -#define REV1_H - -#include "ergodash.h" - -//void promicro_bootloader_jmp(bool program); -#include "quantum.h" - - -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif - -//void promicro_bootloader_jmp(bool program); - -#ifndef FLIP_HALF -// Standard Keymap -// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ - L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { L40, L41, L42, L43, L44, L45, L46 }, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20 }, \ - { R36, R35, R34, R33, R32, R31, R30 }, \ - { R46, R45, R44, R43, R42, R41, R40 } \ - } -#else -// Keymap with right side flipped -// (TRRS jack on both halves are to the right) -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ - L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { L40, L41, L42, L43, L44, L45, L46 }, \ - { R00, R01, R02, R03, R04, R05, R06 }, \ - { R10, R11, R12, R13, R14, R15, R16 }, \ - { R20, R21, R22, R23, R24, R25, R26 }, \ - { R30, R31, R32, R33, R34, R35, R36 }, \ - { R40, R41, R42, R43, R44, R45, R46 } \ - } -#endif - -#endif diff --git a/keyboards/ergodash/rules.mk b/keyboards/ergodash/rules.mk index e25346dacd12..8be059d969ff 100644 --- a/keyboards/ergodash/rules.mk +++ b/keyboards/ergodash/rules.mk @@ -1,52 +1,21 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c \ - ssd1306.c - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. F_CPU = 16000000 -# # LUFA specific # # Target architecture (see library "Board Types" documentation). ARCH = AVR8 # Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. BOOTLOADER = caterina # Build Options @@ -57,19 +26,17 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # 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 BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = yes -USE_I2C = yes +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = yes +SPLIT_KEYBOARD = yes # Enables split keyboard support -DEFAULT_FOLDER = ergodash/rev2 +DEFAULT_FOLDER = ergodash/rev1 diff --git a/keyboards/ergodash/serial.c b/keyboards/ergodash/serial.c deleted file mode 100644 index 74bcbb6bf6e2..000000000000 --- a/keyboards/ergodash/serial.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include "serial.h" - -#ifndef USE_I2C - -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -} - -// Used by the master to synchronize timing with the slave. -static -void sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static -void sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - serial_input(); - for ( uint8_t i = 0; i < 8; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - _delay_us(1); - } - - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 8; - serial_output(); - while( b-- ) { - if(data & (1 << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); - - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); - sync_send(); - checksum += serial_slave_buffer[i]; - } - serial_write_byte(checksum); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); - - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_master_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += serial_master_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_send(); - - serial_input(); // end transaction - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(1); - - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - sei(); - return 1; - } - - // if the slave is present syncronize with it - sync_recv(); - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_slave_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += serial_slave_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_recv(); - - if (checksum_computed != checksum_received) { - sei(); - return 1; - } - - uint8_t checksum = 0; - // send data to the slave - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_master_buffer[i]); - sync_recv(); - checksum += serial_master_buffer[i]; - } - serial_write_byte(checksum); - sync_recv(); - - // always, release the line when not in use - serial_output(); - serial_high(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/ergodash/serial.h b/keyboards/ergodash/serial.h deleted file mode 100644 index 15fe4db7b4c6..000000000000 --- a/keyboards/ergodash/serial.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H - -#include "config.h" -#include - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD0) -#define SERIAL_PIN_INTERRUPT INT0_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/ergodash/split_util.c b/keyboards/ergodash/split_util.c deleted file mode 100644 index 346cbc908949..000000000000 --- a/keyboards/ergodash/split_util.c +++ /dev/null @@ -1,86 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" -#include "config.h" -#include "timer.h" - -#ifdef USE_I2C -# include "i2c.h" -#else -# include "serial.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { -#ifdef USE_I2C - i2c_master_init(); -#ifdef SSD1306OLED - matrix_master_OLED_init (); -#endif -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - timer_init(); -#ifdef USE_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include "eeconfig.h" - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); -void keyboard_slave_loop(void); - -void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/ergodone/info.json b/keyboards/ergodone/info.json index 81c7e2afaa76..33128758ac3c 100644 --- a/keyboards/ergodone/info.json +++ b/keyboards/ergodone/info.json @@ -1,8 +1,8 @@ { "keyboard_name": "Ergodone", "maintainer": "Yu He", - "width": 19.5, - "height": 9.375, + "width": 17, + "height": 8, "layouts": { "LAYOUT_ergodox": { diff --git a/keyboards/ergodone/keymaps/default/keymap.c b/keyboards/ergodone/keymaps/default/keymap.c index cbc180d6a07f..7f13f3d6729e 100644 --- a/keyboards/ergodone/keymaps/default/keymap.c +++ b/keyboards/ergodone/keymaps/default/keymap.c @@ -1,6 +1,4 @@ #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" #include "version.h" #define BASE 0 // default layer @@ -53,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -143,10 +141,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodone/keymaps/eozaki/keymap.c b/keyboards/ergodone/keymaps/eozaki/keymap.c index a6d17b61c29e..d29f4b763187 100644 --- a/keyboards/ergodone/keymaps/eozaki/keymap.c +++ b/keyboards/ergodone/keymaps/eozaki/keymap.c @@ -143,10 +143,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodone/keymaps/erovia/keymap.c b/keyboards/ergodone/keymaps/erovia/keymap.c index 627805afb077..697e917119ab 100644 --- a/keyboards/ergodone/keymaps/erovia/keymap.c +++ b/keyboards/ergodone/keymaps/erovia/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_COPY, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MUTE, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, TT(FN), KC_LCTL, KC_LGUI, KC_LALT, KC_LEFT, KC_RGHT, KC_CAPS, KC_LGUI, KC_HOME, @@ -87,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_COPY, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_MUTE, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_FN1, + KC_LSPO, KC_Z, KC_X, KC_C, KC_D, KC_V, TT(FN), KC_LCTL, KC_LGUI, KC_LALT, KC_LEFT, KC_RGHT, KC_CAPS, KC_LGUI, KC_HOME, @@ -146,10 +146,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(FN) // FN1 - Momentary Layer 1 -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case VRSN: diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index 096368f7abce..d22836bd8676 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -98,7 +98,6 @@ along with this program. If not, see . * 5, which is now closer to 10ms, but still plenty according to * manufacturer specs. */ -#define DEBOUNCE 10 #define USB_MAX_POWER_CONSUMPTION 500 @@ -108,8 +107,7 @@ along with this program. If not, see . #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 24 #define DRIVER_2_LED_TOTAL 24 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL -#define RGB_MATRIX_SKIP_FRAMES 10 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) // #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF /* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */ diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 3b2c943506f1..09443cf72529 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -128,7 +128,7 @@ uint8_t init_mcp23018(void) { mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; - i2c_stop(ERGODOX_EZ_I2C_TIMEOUT); + i2c_stop(); // set pull-up // - unused : on : 1 @@ -140,7 +140,7 @@ uint8_t init_mcp23018(void) { mcp23018_status = i2c_write(0b00111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; out: - i2c_stop(ERGODOX_EZ_I2C_TIMEOUT); + i2c_stop(); #ifdef LEFT_LEDS if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update(); @@ -179,7 +179,7 @@ uint8_t ergodox_left_leds_update(void) { if (mcp23018_status) goto out; out: - i2c_stop(ERGODOX_EZ_I2C_TIMEOUT); + i2c_stop(); return mcp23018_status; } #endif @@ -269,69 +269,39 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { }; -__attribute__ ((weak)) -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - - /*{row | col << 4} - | {x=0..224, y=0..64} - | | modifier - | | | */ - {{0|(0<<4)}, {24.9*5, 16*0}, 0}, // LED 1 on right - {{0|(1<<4)}, {24.9*6, 16*0}, 0}, // LED 2 - {{0|(2<<4)}, {24.9*7, 16*0}, 0}, // LED 3 - {{0|(3<<4)}, {24.9*8, 16*0}, 0}, // LED 4 - {{0|(4<<4)}, {24.9*9, 16*0}, 0}, // LED 5 - - {{1|(5<<4)}, {24.9*5, 16*1}, 0}, // LED 6 - {{1|(6<<4)}, {24.9*6, 16*1}, 0}, // LED 7 - {{1|(7<<4)}, {24.9*7, 16*1}, 0}, // LED 8 - {{1|(8<<4)}, {24.9*8, 16*1}, 0}, // LED 9 - {{1|(9<<4)}, {24.9*9, 16*1}, 0}, // LED 10 - - {{2|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 11 - {{2|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 12 - {{2|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 13 - {{2|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 14 - {{2|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 15 - - {{3|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 16 - {{3|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 17 - {{3|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 18 - {{3|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 19 - {{3|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 20 - - {{4|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 21 - {{4|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 22 - {{4|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 23 - {{4|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 24 - - {{0|(0<<4)}, {24.9*4, 16*0}, 0}, // LED 1 on left - {{0|(1<<4)}, {24.9*3, 16*0}, 0}, // LED 2 - {{0|(2<<4)}, {24.9*2, 16*0}, 0}, // LED 3 - {{0|(3<<4)}, {24.9*1, 16*0}, 0}, // LED 4 - {{0|(4<<4)}, {24.9*0, 16*0}, 0}, // LED 5 - - {{1|(5<<4)}, {24.9*4, 16*1}, 0}, // LED 6 - {{1|(6<<4)}, {24.9*3, 16*1}, 0}, // LED 7 - {{1|(7<<4)}, {24.9*2, 16*1}, 0}, // LED 8 - {{1|(8<<4)}, {24.9*1, 16*1}, 0}, // LED 9 - {{1|(9<<4)}, {24.9*0, 16*1}, 0}, // LED 10 - - {{2|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 11 - {{2|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 12 - {{2|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 13 - {{2|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 14 - {{2|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 15 - - {{3|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 16 - {{3|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 17 - {{3|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 18 - {{3|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 19 - {{3|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 20 - - {{4|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 21 - {{4|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 22 - {{4|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 23 - {{4|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 24 -}; +led_config_t g_led_config = { { + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { 28, 33, 38, 43, 47, NO_LED }, + { 27, 32, 37, 42, 46, NO_LED }, + { 26, 31, 36, 41, 45, NO_LED }, + { 25, 30, 35, 40, 44, NO_LED }, + { 24, 29, 34, 39, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { 0, 5, 10, 15, NO_LED, NO_LED }, + { 1, 6, 11, 16, 20, NO_LED }, + { 2, 7, 12, 17, 21, NO_LED }, + { 3, 8, 13, 18, 22, NO_LED }, + { 4, 9, 14, 19, 23, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } +}, { + { 137, 0 }, { 154, 0 }, { 172, 0 }, { 189, 0 }, { 206, 0 }, { 137, 12 }, + { 154, 12 }, { 172, 12 }, { 189, 12 }, { 206, 12 }, { 137, 25 }, { 154, 25 }, + { 172, 25 }, { 189, 25 }, { 206, 25 }, { 137, 38 }, { 154, 38 }, { 172, 38 }, + { 189, 38 }, { 206, 38 }, { 154, 51 }, { 172, 51 }, { 189, 51 }, { 206, 51 }, + { 86, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 86, 12 }, + { 68, 12 }, { 51, 12 }, { 34, 12 }, { 17, 12 }, { 86, 25 }, { 68, 25 }, + { 51, 25 }, { 34, 25 }, { 17, 25 }, { 86, 38 }, { 68, 38 }, { 51, 38 }, + { 34, 38 }, { 17, 38 }, { 68, 51 }, { 51, 51 }, { 34, 51 }, { 17, 51 } +}, { + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1, 1, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1, 1 +} }; + #endif diff --git a/keyboards/ergodox_ez/info.json b/keyboards/ergodox_ez/info.json index 7470ab906834..e543206fedc6 100644 --- a/keyboards/ergodox_ez/info.json +++ b/keyboards/ergodox_ez/info.json @@ -1,9 +1,9 @@ { "keyboard_name": "ErgoDox EZ", "url": "ergodox-ez.com", - "maintainer": "erez", - "width": 19.5, - "height": 9.375, + "maintainer": "ZSA", + "width": 17, + "height": 8, "layouts": { "LAYOUT_ergodox": { diff --git a/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c b/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c index 325743b2ec02..8facc6e92562 100644 --- a/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c +++ b/keyboards/ergodox_ez/keymaps/blakedietz/keymap.c @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT, MEH_T(KC_NO), KC_N, KC_M, GUI_COMM, ALT_DOT, CTL_SLSH, KC_RSFT, - KC_DOWN, KC_UP, KC_LBRC, KC_RBRC, KC_FN1, + KC_DOWN, KC_UP, KC_LBRC, KC_RBRC, TT(SYMB), KC_PGDN, KC_PGUP, KC_ESC, @@ -198,10 +198,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - // MACRODOWN only works in this function const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c index 5834fa43af76..40d0a1eaf03b 100644 --- a/keyboards/ergodox_ez/keymaps/default/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_TAB, KC_ENT @@ -137,10 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { diff --git a/keyboards/ergodox_ez/keymaps/default_osx/keymap.c b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c index 038940772ace..864c62a470b3 100644 --- a/keyboards/ergodox_ez/keymaps/default_osx/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_LGUI, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -138,10 +138,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c index dd5ee2897950..c342b9076987 100644 --- a/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/ergodox_ez/keymaps/dvorak_42_key/keymap.c @@ -55,14 +55,16 @@ enum custom_keycodes { }; -#define BASE 0 // base dvorak layer -#define KEYNAV 1 // arrow navigation (right hand) -#define KEYSEL 2 // arrow navigation + shift (allow text selection) -#define SHELL_NAV 3 // bash shortcuts -#define SHELL_SCREEN 4 // linux screen shortcuts -#define SCREEN_NAV 5 // navigate between linux screen tabs -#define BROWSER_CONTROL 6 // control browser and mouse -#define COMBINED 7 // combined numbers and symbols layer +#define BASE 0 // base dvorak layer +#define BASE_ALTERNATE 1 // base dvorak layer, with different layer toggling +#define KEYNAV 2 // arrow navigation (right hand) +#define KEYSEL 3 // arrow navigation + shift (allow text selection) +#define SHELL_NAV 4 // bash shortcuts +#define SHELL_SCREEN 5 // linux screen shortcuts +#define SCREEN_NAV 6 // navigate between linux screen tabs +#define BROWSER_CONTROL 7 // control browser and mouse +#define COMBINED 8 // combined numbers and symbols layer +#define ANDROID_STUDIO 9 // macros @@ -94,7 +96,17 @@ enum custom_keycodes { #define SCREEN_PASTEREG_3 30 #define DEL_TO_HOME 36 - +// Android Studio shortcuts +#define AS_TABLEFT LALT(KC_LEFT) +#define AS_TABRIGHT LALT(KC_RIGHT) +#define AS_SYMBOL LCTL(LALT(KC_N)) +#define AS_CLASS LCTL(KC_N) +#define AS_FINDUSAGE LALT(KC_F7) +#define AS_BACK LCTL(LALT(KC_LEFT)) +#define AS_GO_DECLARATION LCTL(KC_B) +#define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B)) +#define AS_CLOSETAB LCTL(KC_F4) +#define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4)) #define MACRO_SCREEN_NUM(MACRO_NAME,NUM) \ @@ -164,6 +176,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH(KC_F5),MEH(KC_F6),MEH(KC_F7),MEH(KC_F8),KC_ENTER,KC_SPACE ), + + // alternate base layout + [BASE_ALTERNATE] = LAYOUT_ergodox( + // left hand + 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, + OSL(ANDROID_STUDIO),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + 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, + // bottom row + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), [KEYNAV] = LAYOUT_ergodox( // left hand @@ -195,7 +233,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), KC_TRNS,MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, // bottom row - RESET,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + RESET,DF(BASE),DF(BASE_ALTERNATE),KC_TRNS,KC_TRNS, // thumb cluster KC_TRNS,KC_TRNS, KC_TRNS, @@ -294,7 +332,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - + // android studio shortcuts + [ANDROID_STUDIO] = LAYOUT_ergodox( + // left hand + KC_NO, 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, + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, AS_FINDUSAGE, AS_GO_DECLARATION, AS_GO_IMPLEMENTATION, KC_TRNS, + KC_TRNS, AS_TABLEFT, AS_TABRIGHT, AS_SYMBOL, AS_CLASS, AS_BACK, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, AS_CLOSETAB, AS_CLOSETOOLWINDOW, KC_TRNS, + // bottom row + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), [COMBINED] = LAYOUT_ergodox( @@ -348,10 +410,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(1) -}; - // leaving this in place for compatibilty with old keymaps cloned and re-compiled. const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/ergodox_ez/keymaps/kou/keymap.c b/keyboards/ergodox_ez/keymaps/kou/keymap.c index 6116548050d5..98fafe8ce62d 100644 --- a/keyboards/ergodox_ez/keymaps/kou/keymap.c +++ b/keyboards/ergodox_ez/keymaps/kou/keymap.c @@ -248,11 +248,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_ez/keymaps/profet_80/keymap.c b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c index 984c90b1eac6..29505b641e59 100644 --- a/keyboards/ergodox_ez/keymaps/profet_80/keymap.c +++ b/keyboards/ergodox_ez/keymaps/profet_80/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP,KC_3, KC_4, KC_PGDN,KC_TAB, KC_ENT @@ -136,10 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_ez/keymaps/pvinis/keymap.c b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c new file mode 100644 index 000000000000..9943886e2b2f --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/pvinis/keymap.c @@ -0,0 +1,330 @@ +// pvinis ergodox ez +// ,------------------------------------. ,------------------------------------. +// | | | | | | | | | | | | | | | | +// |------+----+----+----+----+---------| |----+----+----+----+----+----+------| +// | | | | | | | | | | | | | | | | +// |------+----+----+----x----x----| | | |----x----x----+----+----+------| +// | | | | | | |----| |----| | | | | | | +// |------+----+----+----x----x----| | | |----x----x----+----+----+------| +// | | | | | | | | | | | | | | | | +// `------+----+----+----+----+---------' `---------+----+----+----+----+------' +// | | | | | | | | | | | | +// `------------------------' `------------------------' +// ,---------. ,---------. +// | | | | | | +// ,----+----+----| |----+----+----. +// | | | | | | | | +// | | |----| |----| | | +// | | | | | | | | +// `--------------' `--------------' + + +#include QMK_KEYBOARD_H +#include "pvinis.h" +#include "mousekey.h" + + +// layers +enum { + MOUSE = 8, +}; + +// extra keys +enum { + NONE = 30, + TD_LAYR, // SYSCTL and MOUSE layer switch +}; + +// application selection +// this is sending ctrl-alt-gui-, and this is picked up by hammerspoon +#define AP_SLCK ALLM(KC_S) +#define AP_XCOD ALLM(KC_X) +#define AP_MSGR ALLM(KC_M) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // ,------------------------------------. ,------------------------------------. + // |4xFLSH| | | | | |Opt | | | | | | | | | + // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| + // | Tab | | | | | | | | | | | | | | | + // |------+----+----+----x----x----| | | |----x----x----+----+----+------| + // |EscCtl| | | | | |----| |----| | | | | | Ent | + // |------+----+----+----x----x----| | | |----x----x----+----+----+------| + // |LShift| | | | | | | | | | | | | |RShift| + // `------+----+----+----+----+---------' `---------+----+----+----+----+------' + // | | | | |Cmd | | | | | | | + // `------------------------' `------------------------' + // ,---------. ,---------. + // |QWER| | | | | + // ,----+----+----| |----+----+----. + // | Ba | L | | | | | | + // | ck |Shi |----| |----| |Spc | + // | spc| ft | | | | | | + // `--------------' `--------------' + [LR_BASE] = LAYOUT_ergodox_pretty_wrapper( + TD_3FLS, _______, _______, _______, _______, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______, + KC_TAB , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT , + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, KC_LGUI, SYMBOL , SYSCTL , KC_RALT, _______, _______, _______, + QWERTY , CARPALX, _______, _______, + _______, _______, + KC_BSPC, _______, _______, _______, _______, KC_SPC + ), + + // ,------------------------------------. ,------------------------------------. + // | | NUMBERS_L | | | - | NUMBERS_R | = | + // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| + // | | | [ | | ] | | | + // |------+ | | | | +------| + // | | QWERTY_L |----| |----| QWERTY_R | | + // |------+ | ( | | ) | +------| + // | | | | | | | | + // `------+----+----+----+----+---------' `---------+----+----+----+----+------' + // | | ` | | | | | | | | ' | | + // `------------------------' `------------------------' + // ,---------. ,---------. + // | | | | | | + // ,----+----+----| |----+----+----. + // | | | | | | | | + // | | |----| |----| | | + // | | | | | | | | + // `--------------' `--------------' + // See `users/pvinis/pvinis.h` + [LR_QWERTY] = LAYOUT_ergodox_pretty_wrapper( + _______, ________________NUMBERS_L__________________, _______, KC_MINS, ________________NUMBERS_R__________________, KC_EQL , + _______, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, _________________QWERTY_R1_________________, _______, + _______, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _______, + _______, _________________QWERTY_L3_________________, KC_LPRN, KC_RPRN, _________________QWERTY_R3_________________, _______, + _______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_QUOT , _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + // ,------------------------------------. ,------------------------------------. + // | | NUMBERS_L | | | | NUMBERS_R | | + // |------+----+----+----+----+---------| |----+----+----+----+----+----+------| + // | | | | | | | | + // |------+ | | | | +------| + // | | CARPALX_L |----| |----| CARPALX_R | | + // |------+ | | | | +------| + // | | | | | | | | + // `------+----+----+----+----+---------' `---------+----+----+----+----+------' + // | | | | | | | | | | | | + // `------------------------' `------------------------' + // ,---------. ,---------. + // | | | | | | + // ,----+----+----| |----+----+----. + // | | | | | | | | + // | | |----| |----| | | + // | | | | | | | | + // `--------------' `--------------' + // See `users/pvinis/pvinis.h` + [LR_CARPALX] = LAYOUT_ergodox_pretty_wrapper( + _______, ________________NUMBERS_L__________________, _______, _______, ________________NUMBERS_R__________________, _______, + _______, ________________CARPALX_L1_________________, _______, _______, ________________CARPALX_R1_________________, _______, + _______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______, + _______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + // See `users/pvinis/pvinis.h` + [LR_SYMBOL] = LAYOUT_ergodox_pretty_wrapper( + _______, ______________________F_L__________________, KC_F11 , KC_F12 , ______________________F_R__________________, _______, + _______, _________________SYMBOL_L1_________________, _______, _______, _________________SYMBOL_R1_________________, _______, + _______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, + _______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + // See `users/pvinis/pvinis.h` + [LR_SYSCTL] = LAYOUT_ergodox_pretty_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______, + _______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + // See `users/pvinis/pvinis.h` + [LR_KBCTL] = LAYOUT_ergodox_pretty_wrapper( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R1_________________, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R2_________________, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + +/* MOUSE + * a keymap to control my system. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ^ | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | MsUp | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | |MidClk| + * ,------|------|------| |------+------+------. + * | | | | | |Left |Right | + * | | |------| |------| Click| Click| + * | | | ^ | | | | | + * `--------------------' `--------------------' + */ + [MOUSE] = LAYOUT_ergodox_pretty( + KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_TRNS + + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_MS_U ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + + ,KC_NO ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_NO + ), +}; + + +// keyboard initialization +void keyboard_post_init_user_local(void) { + ergodox_led_all_on(); + for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { + ergodox_led_all_set(i); + wait_ms(5); + } + wait_ms(1000); + for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { + ergodox_led_all_set(i); + wait_ms(10); + } + ergodox_led_all_off(); + + // restore default brightness for future use + ergodox_led_all_set(LED_BRIGHTNESS_HI); +} + +// light up leds based on the layer +uint32_t layer_state_set_user_local(uint32_t state) { + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (biton32(state)) { + case LR_SYSCTL: + ergodox_right_led_3_on(); // blue + break; + case LR_KBCTL: + ergodox_right_led_1_on(); // red + break; + case LR_SYMBOL: + ergodox_right_led_2_on(); // green + break; + default: break; + } + return state; +} + +// extra keys +// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + // switch (id) { + // } + // return MACRO_NONE; +// } + +// tap dances + +// flash keyboard on 4x tap, with leds +// void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) { +// switch (state->count) { +// case 1: +// ergodox_right_led_3_on(); +// break; +// case 2: +// ergodox_right_led_2_on(); +// break; +// case 3: +// ergodox_right_led_1_on(); +// break; +// case 4: +// ergodox_right_led_3_off(); +// wait_ms(50); +// ergodox_right_led_2_off(); +// wait_ms(50); +// ergodox_right_led_1_off(); +// break; +// } +// } + +// void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) { +// if (state->count >= 4) { +// reset_keyboard(); +// reset_tap_dance(state); +// } +// } + +// void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) { +// ergodox_right_led_1_off(); +// wait_ms(50); +// ergodox_right_led_2_off(); +// wait_ms(50); +// ergodox_right_led_3_off(); +// } + +// SYSCTL on first tap, MOUSE ON second tap +// void layers_dance_finished(qk_tap_dance_state_t *state, void *user_data) { +// uint8_t layer = biton32(layer_state); + +// switch(state->count) { +// case 1: +// switch(layer) { +// case LR_SYSCTL: +// layer_off(LR_SYSCTL); +// break; +// case MOUSE: +// layer_off(MOUSE); +// break; +// default: +// layer_on(LR_SYSCTL); +// break; +// } +// break; +// case 2: +// layer_on(MOUSE); +// break; +// } +// } + +// qk_tap_dance_action_t tap_dance_actions[] = { + // [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ), + // [TD_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, layers_dance_finished, NULL ), +// }; diff --git a/layouts/community/ergodox/pvinis/Readme.md b/keyboards/ergodox_ez/keymaps/pvinis/readme.md similarity index 100% rename from layouts/community/ergodox/pvinis/Readme.md rename to keyboards/ergodox_ez/keymaps/pvinis/readme.md diff --git a/keyboards/ergodox_ez/keymaps/pvinis/rules.mk b/keyboards/ergodox_ez/keymaps/pvinis/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/pvinis/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/skug/keymap.c b/keyboards/ergodox_ez/keymaps/skug/keymap.c index b3696f3a980b..6f9a577f7e3a 100644 --- a/keyboards/ergodox_ez/keymaps/skug/keymap.c +++ b/keyboards/ergodox_ez/keymaps/skug/keymap.c @@ -192,10 +192,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c index eec8ef8753cf..9194c041c282 100644 --- a/keyboards/ergodox_ez/keymaps/smurmann/keymap.c +++ b/keyboards/ergodox_ez/keymaps/smurmann/keymap.c @@ -6,8 +6,6 @@ #define BASE 0 // default layer #define MDIA 1 // media keys -#define _______ KC_TRNS - enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, @@ -105,10 +103,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(MDIA) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_ez/keymaps/steno/keymap.c b/keyboards/ergodox_ez/keymaps/steno/keymap.c index 3cc008e7bc9c..45fc9f8ba99c 100644 --- a/keyboards/ergodox_ez/keymaps/steno/keymap.c +++ b/keyboards/ergodox_ez/keymaps/steno/keymap.c @@ -1,8 +1,7 @@ #include QMK_KEYBOARD_H #include "debug.h" #include "action_layer.h" -#include "sendchar.h" -#include "virtser.h" +#include "keymap_steno.h" #define BASE 0 // default layer #define SYMB 1 // symbols @@ -49,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(TXBOLT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -137,35 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK ), -// TxBolt Codes -#define Sl 0b00000001 -#define Tl 0b00000010 -#define Kl 0b00000100 -#define Pl 0b00001000 -#define Wl 0b00010000 -#define Hl 0b00100000 -#define Rl 0b01000001 -#define Al 0b01000010 -#define Ol 0b01000100 -#define X 0b01001000 -#define Er 0b01010000 -#define Ur 0b01100000 -#define Fr 0b10000001 -#define Rr 0b10000010 -#define Pr 0b10000100 -#define Br 0b10001000 -#define Lr 0b10010000 -#define Gr 0b10100000 -#define Tr 0b11000001 -#define Sr 0b11000010 -#define Dr 0b11000100 -#define Zr 0b11001000 -#define NM 0b11010000 -#define GRPMASK 0b11000000 -#define GRP0 0b00000000 -#define GRP1 0b01000000 -#define GRP2 0b10000000 -#define GRP3 0b11000000 /* Keymap 3: TxBolt (Serial) * * ,--------------------------------------------------. ,--------------------------------------------------. @@ -190,22 +160,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // TxBolt over Serial [TXBOLT] = LAYOUT_ergodox( KC_BSPC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, M(NM), M(NM), M(NM), M(NM), M(NM), KC_NO, - KC_NO, M(Sl), M(Tl), M(Pl), M(Hl), M(X), - KC_NO, M(Sl), M(Kl), M(Wl), M(Rl), M(X), KC_NO, + KC_NO, STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, KC_NO, + KC_NO, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, + KC_NO, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - M(Al), M(Ol), KC_NO, + STN_A, STN_O, KC_NO, // right hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_TRNS, M(NM), M(NM), M(NM), M(NM), M(NM), M(NM), - M(X), M(Fr), M(Pr), M(Lr), M(Tr), M(Dr), - KC_NO, M(X), M(Rr), M(Br), M(Gr), M(Sr), M(Zr), + KC_TRNS, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, + STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + KC_NO, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, M(Er), M(Ur) + KC_NO, STN_E, STN_U ), /* Keymap 4: TxBolt (Serial) Alternative * @@ -230,73 +200,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // TxBolt over Serial [TXBOLT2] = LAYOUT_ergodox( - KC_NO, M(NM), M(NM), M(NM), M(NM), M(NM), KC_NO, - KC_NO, M(Sl), M(Tl), M(Pl), M(Hl), M(X), KC_NO, - KC_NO, M(Sl), M(Kl), M(Wl), M(Rl), M(X), + KC_NO, STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, KC_NO, + KC_NO, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, KC_NO, + KC_NO, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, M(Al), M(Ol), + KC_NO, KC_NO, KC_NO, STN_A, STN_O, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, // right hand - KC_NO, M(NM), M(NM), M(NM), M(NM), M(NM), M(NM), - KC_TRNS, M(X), M(Fr), M(Pr), M(Lr), M(Tr), M(Dr), - M(X), M(Rr), M(Br), M(Gr), M(Sr), M(Zr), + KC_NO, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, + KC_TRNS, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - M(Er), M(Ur), KC_NO, KC_NO, KC_NO, + STN_E, STN_U, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - -uint8_t chord[4] = {0,0,0,0}; -uint8_t pressed_count = 0; - -void send_chord(void) -{ - for(uint8_t i = 0; i < 4; i++) - { - if(chord[i]) - virtser_send(chord[i]); - } - virtser_send(0); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) -{ - // We need to track keypresses in all modes, in case the user - // changes mode whilst pressing other keys. - if (record->event.pressed) - pressed_count++; - else - pressed_count--; - return true; -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - - if (record->event.pressed) { - uint8_t grp = (id & GRPMASK) >> 6; - chord[grp] |= id; - } - else { - if (pressed_count == 0) { - send_chord(); - chord[0] = chord[1] = chord[2] = chord[3] = 0; - } - } - return MACRO_NONE; -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { + steno_set_mode(STENO_MODE_BOLT); // or STENO_MODE_GEMINI }; // Runs constantly in the background, in a loop. diff --git a/keyboards/ergodox_ez/keymaps/steno/rules.mk b/keyboards/ergodox_ez/keymaps/steno/rules.mk index b6fb9b1a800b..4b64fd22de6a 100644 --- a/keyboards/ergodox_ez/keymaps/steno/rules.mk +++ b/keyboards/ergodox_ez/keymaps/steno/rules.mk @@ -1,3 +1,3 @@ -VIRTSER_ENABLE = yes +STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER # Not enough interupts, so something has to go MOUSEKEY_ENABLE = no diff --git a/keyboards/ergodox_ez/keymaps/vim/keymap.c b/keyboards/ergodox_ez/keymaps/vim/keymap.c index 5ebe0c8475b9..2823a7b4eafe 100644 --- a/keyboards/ergodox_ez/keymaps/vim/keymap.c +++ b/keyboards/ergodox_ez/keymaps/vim/keymap.c @@ -5,7 +5,6 @@ #include "vim.h" #define VERSION_STRING QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION -#define _______ KC_TRNS #define X_____X KC_TRNS #define KC_ATM LGUI(LSFT(KC_P)) #define KC_ATP LGUI(LCTL(KC_P)) @@ -154,10 +153,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(1) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { case 0: diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index 22837d312a2f..2bfe27b9a300 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -1,9 +1,5 @@ /* -Note for ErgoDox EZ customizers: Here be dragons! -This is not a file you want to be messing with. -All of the interesting stuff for you is under keymaps/ :) -Love, Erez Copyright 2013 Oleg Kostyuk @@ -33,14 +29,14 @@ along with this program. If not, see . #include "debug.h" #include "util.h" #include "matrix.h" +#include "debounce.h" #include QMK_KEYBOARD_H #ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" +# include "timer.h" #endif /* - * This constant define not debouncing time in msecs, but amount of matrix - * scan loops which should be made to get stable debounced results. + * This constant define not debouncing time in msecs, assuming eager_pr. * * On Ergodox matrix scan rate is relatively low, because of slow I2C. * Now it's only 317 scans/second, or about 3.15 msec/scan. @@ -52,26 +48,17 @@ along with this program. If not, see . */ #ifndef DEBOUNCE -# define DEBOUNCE 5 +# define DEBOUNCE 5 #endif /* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -/* - * matrix state(1:on, 0:off) - * contains the raw values without debounce filtering of the last read cycle. - */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; - -// Debouncing: store for each key the number of scans until it's eligible to -// change. When scanning the matrix, ignore any changes in keys that have -// already changed in the last DEBOUNCE scans. -static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; +static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values +static matrix_row_t matrix[MATRIX_ROWS]; // debounced values static matrix_row_t read_cols(uint8_t row); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; // static uint16_t mcp23018_reset_loop; @@ -81,197 +68,150 @@ uint32_t matrix_timer; uint32_t matrix_scan_count; #endif +__attribute__((weak)) void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_init_user(void) {} +__attribute__((weak)) void matrix_scan_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) {} +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } -void matrix_init(void) -{ - // initialize row and col +void matrix_init(void) { + // initialize row and col - mcp23018_status = init_mcp23018(); + mcp23018_status = init_mcp23018(); + unselect_rows(); + init_cols(); - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - raw_matrix[i] = 0; - for (uint8_t j=0; j < MATRIX_COLS; ++j) { - debounce_matrix[i * MATRIX_COLS + j] = 0; - } - } + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + raw_matrix[i] = 0; + } #ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; + matrix_timer = timer_read32(); + matrix_scan_count = 0; #endif - - matrix_init_quantum(); - + debounce_init(MATRIX_ROWS); + matrix_init_quantum(); } void matrix_power_up(void) { - mcp23018_status = init_mcp23018(); + mcp23018_status = init_mcp23018(); - unselect_rows(); - init_cols(); + unselect_rows(); + init_cols(); - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - } + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } #ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; + matrix_timer = timer_read32(); + matrix_scan_count = 0; #endif } -// Returns a matrix_row_t whose bits are set if the corresponding key should be -// eligible to change in this scan. -matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) { - matrix_row_t result = 0; - matrix_row_t change = rawcols ^ raw_matrix[row]; - raw_matrix[row] = rawcols; - for (uint8_t i = 0; i < MATRIX_COLS; ++i) { - if (debounce_matrix[row * MATRIX_COLS + i]) { - --debounce_matrix[row * MATRIX_COLS + i]; - } else { - result |= (1 << i); - } - if (change & (1 << i)) { - debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE; - } +// Reads and stores a row, returning +// whether a change occurred. +static inline bool store_raw_matrix_row(uint8_t index) { + matrix_row_t temp = read_cols(index); + if (raw_matrix[index] != temp) { + raw_matrix[index] = temp; + return true; } - return result; + return false; } -matrix_row_t debounce_read_cols(uint8_t row) { - // Read the row without debouncing filtering and store it for later usage. - matrix_row_t cols = read_cols(row); - // Get the Debounce mask. - matrix_row_t mask = debounce_mask(cols, row); - // debounce the row and return the result. - return (cols & mask) | (matrix[row] & ~mask);; -} - -uint8_t matrix_scan(void) -{ - if (mcp23018_status) { // if there was an error - if (++mcp23018_reset_loop == 0) { - // if (++mcp23018_reset_loop >= 1300) { - // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans - // this will be approx bit more frequent than once per second - print("trying to reset mcp23018\n"); - mcp23018_status = init_mcp23018(); - if (mcp23018_status) { - print("left side not responding\n"); - } else { - print("left side attached\n"); - ergodox_blink_all_leds(); - } - } +uint8_t matrix_scan(void) { + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + // if (++mcp23018_reset_loop >= 1300) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + ergodox_blink_all_leds(); + } } + } #ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; + matrix_scan_count++; - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); + uint32_t timer_now = timer_read32(); + if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); - matrix_timer = timer_now; - matrix_scan_count = 0; - } + matrix_timer = timer_now; + matrix_scan_count = 0; + } #endif #ifdef LEFT_LEDS - mcp23018_status = ergodox_left_leds_update(); -#endif // LEFT_LEDS - for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { - select_row(i); - // and select on left hand - select_row(i + MATRIX_ROWS_PER_SIDE); - // we don't need a 30us delay anymore, because selecting a - // left-hand row requires more than 30us for i2c. - - // grab cols from left hand - matrix[i] = debounce_read_cols(i); - // grab cols from right hand - matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE); - - unselect_rows(); - } + mcp23018_status = ergodox_left_leds_update(); +#endif // LEFT_LEDS + bool changed = false; + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + // select rows from left and right hands + uint8_t left_index = i; + uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; + select_row(left_index); + select_row(right_index); + + // we don't need a 30us delay anymore, because selecting a + // left-hand row requires more than 30us for i2c. + + changed |= store_raw_matrix_row(left_index); + changed |= store_raw_matrix_row(right_index); - matrix_scan_quantum(); + unselect_rows(); + } - return 1; -} + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + matrix_scan_quantum(); -bool matrix_is_modified(void) // deprecated and evidently not called. -{ - return true; + return 1; } -inline -bool matrix_is_on(uint8_t row, uint8_t col) +bool matrix_is_modified(void) // deprecated and evidently not called. { - return (matrix[row] & ((matrix_row_t)1<> 2)); + uint8_t data = 0; + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status) goto out; + mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); + if (mcp23018_status < 0) goto out; + data = ~((uint8_t)mcp23018_status); + mcp23018_status = I2C_STATUS_SUCCESS; + out: + i2c_stop(); + return data; } + } else { + /* read from teensy + * bitmask is 0b11110011, but we want those all + * in the lower six bits. + * we'll return 1s for the top two, but that's harmless. + */ + + return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); + } } /* Row pin configuration @@ -333,69 +275,70 @@ static matrix_row_t read_cols(uint8_t row) * row: 0 1 2 3 4 5 6 * pin: A0 A1 A2 A3 A4 A5 A6 */ -static void unselect_rows(void) -{ - // no need to unselect on mcp23018, because the select step sets all - // the other row bits high, and it's not changing to a different - // direction - - // unselect on teensy - // Hi-Z(DDR:0, PORT:0) to unselect - DDRB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3); - PORTB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3); - DDRD &= ~(1<<2 | 1<<3); - PORTD &= ~(1<<2 | 1<<3); - DDRC &= ~(1<<6); - PORTC &= ~(1<<6); +static void unselect_rows(void) { + // no need to unselect on mcp23018, because the select step sets all + // the other row bits high, and it's not changing to a different + // direction + + // unselect on teensy + // Hi-Z(DDR:0, PORT:0) to unselect + DDRB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3); + PORTB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3); + DDRD &= ~(1 << 2 | 1 << 3); + PORTD &= ~(1 << 2 | 1 << 3); + DDRC &= ~(1 << 6); + PORTC &= ~(1 << 6); } -static void select_row(uint8_t row) -{ - if (row < 7) { - // select on mcp23018 - if (mcp23018_status) { // if there was an error - // do nothing - } else { - // set active row low : 0 - // set other rows hi-Z : 1 - mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0xFF & ~(1< +Copyright 2013 Oleg Kostyuk + +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 . +*/ + +// Copy and worked on with love from the EZ team + +#pragma once +#include "config_common.h" + +#define VERBOSE + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1337 +#define DEVICE_VER 0x0001 +#define MANUFACTURER g Heavy Industries +#define PRODUCT ErgoTaco +#define DESCRIPTION QMK keyboard firmware for ErgoTaco + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) +#define MATRIX_COLS 1 + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* 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 + +/* key combination for command */ +#define IS_COMMAND() (get_mods() == MOD_MASK_CTRL || get_mods() == MOD_MASK_SHIFT) + +#define DEBOUNCE 5 +#define USB_MAX_POWER_CONSUMPTION 500 diff --git a/keyboards/ergotaco/ergotaco.c b/keyboards/ergotaco/ergotaco.c new file mode 100644 index 000000000000..ecab74b3a26a --- /dev/null +++ b/keyboards/ergotaco/ergotaco.c @@ -0,0 +1,72 @@ +#include QMK_KEYBOARD_H + +bool i2c_initialized = 0; +i2c_status_t mcp23018_status = 0x20; + +void matrix_init_kb(void) { + // (tied to Vcc for hardware convenience) + //DDRB &= ~(1<<4); // set B(4) as input + //PORTB &= ~(1<<4); // set B(4) internal pull-up disabled + + // unused pins + // set as input with internal pull-up enabled + DDRB &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7); + PORTB |= (1<<4 | 1<<5 | 1<<6 | 1<<7); + + DDRC &= ~(1<<7 | 1<<6); + PORTC |= (1<<7 | 1<<6); + + DDRD &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7); + PORTD |= (1<<4 | 1<<5 | 1<<6 | 1<<7); + + DDRE &= ~(1<<6); + PORTE |= (1<<6); + + DDRF &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6 | 1<<7); + PORTF |= (1<<0 | 1<<1 | 1<<4 | 1<<6 | 1<<7); + + matrix_init_user(); +} + + +uint8_t init_mcp23018(void) { + print("starting init"); + mcp23018_status = 0x20; + + // I2C subsystem + + // uint8_t sreg_prev; + // sreg_prev=SREG; + // cli(); + + if (i2c_initialized == 0) { + i2c_init(); // on pins D(1,0) + i2c_initialized = true; + _delay_ms(1000); + } + + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + i2c_stop(); + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + +out: + i2c_stop(); + // SREG=sreg_prev; + //uprintf("Init %x\n", mcp23018_status); + return mcp23018_status; +} diff --git a/keyboards/ergotaco/ergotaco.h b/keyboards/ergotaco/ergotaco.h new file mode 100644 index 000000000000..6bc5ce36f896 --- /dev/null +++ b/keyboards/ergotaco/ergotaco.h @@ -0,0 +1,50 @@ +#pragma once +#include +#include +#include +#include "quantum.h" +#include "i2c_master.h" +#include "matrix.h" + + +extern i2c_status_t mcp23018_status; +#define ERGODOX_EZ_I2C_TIMEOUT 1000 +#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) +#define CPU_16MHz 0x00 + +// I2C aliases and register addresses (see "mcp23018.md") +//#define I2C_ADDR 0b0100000 +#define I2C_ADDR 0x20 +#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) +#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 + +void init_ergodox(void); +uint8_t init_mcp23018(void); + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ +#define LAYOUT( \ + L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05) \ + \ + /* matrix positions */ \ + { \ + {R00}, \ + {R01}, \ + {R02}, \ + {R03}, \ + {R04}, \ + {R05}, \ + {L05}, \ + {L04}, \ + {L03}, \ + {L02}, \ + {L01}, \ + {L00}, \ +} diff --git a/keyboards/ergotaco/info.json b/keyboards/ergotaco/info.json new file mode 100644 index 000000000000..cf6b810fecd2 --- /dev/null +++ b/keyboards/ergotaco/info.json @@ -0,0 +1,61 @@ +{ + "keyboard_name": "ErgoTaco", + "url": "http://gboards.ca", + "maintainer": "germ", + "width": 13, + "height": 2.75, + "layouts": { + "LAYOUT": { + "layout": [ + { + "x": 0, + "y": 1.25 + }, + { + "x": 1, + "y": 0.75 + }, + { + "x": 2, + "y": 0.5 + }, + { + "x": 3, + "y": 0.25 + }, + { + "x": 4, + "y": 1 + }, + { + "x": 5, + "y": 1.75 + }, + { + "x": 7, + "y": 1.75 + }, + { + "x": 8, + "y": 1 + }, + { + "x": 9, + "y": 0.25 + }, + { + "x": 10, + "y": 0.5 + }, + { + "x": 11, + "y": 0.75 + }, + { + "x": 12, + "y": 1.25 + } + ] + } + } +} diff --git a/keyboards/ergotaco/keymaps/default/keymap.c b/keyboards/ergotaco/keymaps/default/keymap.c new file mode 100644 index 000000000000..be1267ef06c4 --- /dev/null +++ b/keyboards/ergotaco/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Good on you for modifying your layout! if you don't have + * time to read the QMK docs, a list of keycodes can be found at + * + * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md + * + * There's also a template for adding new layers at the bottom of this file! + */ + +#include QMK_KEYBOARD_H + +#define FIESTA 0 // default layer +#define TACOTIME 1 // symbols + +// Blank template at the bottom +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap template + * + * ,-------------------------------------------------. ,--------------------------------------------. + * | | | | | | | | | | | | | | | + * `-------+------+------+------+------+-------------' `-------+------+------+------+------+--------' */ +[FIESTA] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H +), +}; + +/* Keymap template + * + * ,-------------------------------------------------. ,--------------------------------------------. + * | | | | | | | | | | | | | | | + * `-------+------+------+------+------+-------------' `-------+------+------+------+------+--------' +[FIESTA] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + */ + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; diff --git a/keyboards/ergotaco/keymaps/default/readme.md b/keyboards/ergotaco/keymaps/default/readme.md new file mode 100644 index 000000000000..653f3774eaa9 --- /dev/null +++ b/keyboards/ergotaco/keymaps/default/readme.md @@ -0,0 +1,6 @@ +This is the default keymap for the ErgoTaco, Make it your own! + +## Settings +To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/ergotaco/keymaps/default/rules.mk + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! diff --git a/keyboards/ergotaco/keymaps/default/rules.mk b/keyboards/ergotaco/keymaps/default/rules.mk new file mode 100644 index 000000000000..e394fbf1e647 --- /dev/null +++ b/keyboards/ergotaco/keymaps/default/rules.mk @@ -0,0 +1,10 @@ +#---------------------------------------------------------------------------- +# make ergotaco:default:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- +# Firmware options + +#Debug options +VERBOSE = yes +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_MATRIX = yes diff --git a/keyboards/ergotaco/matrix.c b/keyboards/ergotaco/matrix.c new file mode 100644 index 000000000000..f7ceb194ad61 --- /dev/null +++ b/keyboards/ergotaco/matrix.c @@ -0,0 +1,362 @@ +/* + +Copyright 2013 Oleg Kostyuk + +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 . +*/ + +#include "matrix.h" +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include QMK_KEYBOARD_H +#ifdef DEBUG_MATRIX_SCAN_RATE +#include "timer.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +// ATmega pin defs +#define ROW1 (1<<5) +#define COL6 (1<<0) +#define COL7 (1<<1) +#define COL8 (1<<2) +#define COL9 (1<<3) +#define COL10 (1<<2) +#define COL11 (1<<3) + + +// bit masks +#define BMASK (COL7 | COL8 | COL9 | COL6) +#define DMASK (COL10 | COL11) +#define FMASK (ROW1) + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +/* + * matrix state(1:on, 0:off) + * contains the raw values without debounce filtering of the last read cycle. + */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; + +// Debouncing: store for each key the number of scans until it's eligible to +// change. When scanning the matrix, ignore any changes in keys that have +// already changed in the last DEBOUNCE scans. +static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +static uint8_t mcp23018_reset_loop; +// static uint16_t mcp23018_reset_loop; + +#ifdef DEBUG_MATRIX_SCAN_RATE +uint32_t matrix_timer; +uint32_t matrix_scan_count; +#endif + + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + + +void matrix_init(void) +{ + // initialize row and col + mcp23018_status = init_mcp23018(); + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + raw_matrix[i] = 0; + for (uint8_t j=0; j < MATRIX_COLS; ++j) { + debounce_matrix[i * MATRIX_COLS + j] = 0; + } + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + matrix_init_quantum(); +} + +void matrix_power_up(void) { + mcp23018_status = init_mcp23018(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + +} + +// Returns a matrix_row_t whose bits are set if the corresponding key should be +// eligible to change in this scan. +matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) { + matrix_row_t result = 0; + matrix_row_t change = rawcols ^ raw_matrix[row]; + raw_matrix[row] = rawcols; + for (uint8_t i = 0; i < MATRIX_COLS; ++i) { + if (debounce_matrix[row * MATRIX_COLS + i]) { + --debounce_matrix[row * MATRIX_COLS + i]; + } else { + result |= (1 << i); + } + if (change & (1 << i)) { + debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE; + } + } + return result; +} + +matrix_row_t debounce_read_cols(uint8_t row) { + // Read the row without debouncing filtering and store it for later usage. + matrix_row_t cols = read_cols(row); + // Get the Debounce mask. + matrix_row_t mask = debounce_mask(cols, row); + // debounce the row and return the result. + return (cols & mask) | (matrix[row] & ~mask);; +} + +uint8_t matrix_scan(void) +{ + // Then the keyboard + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + // if (++mcp23018_reset_loop >= 1300) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + } + } + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_scan_count++; + uint32_t timer_now = timer_read32(); + if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); + + matrix_timer = timer_now; + matrix_scan_count = 0; + } +#endif + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + select_row(i); + // and select on left hand + select_row(i + MATRIX_ROWS_PER_SIDE); + // we don't need a 30us delay anymore, because selecting a + // left-hand row requires more than 30us for i2c. + + // grab cols from left hand + matrix[i] = debounce_read_cols(i); + // grab cols from right hand + matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE); + + unselect_rows(); + } + + matrix_scan_quantum(); + +#ifdef DEBUG_MATRIX + for (uint8_t c = 0; c < MATRIX_COLS; c++) + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); +#endif + + return 1; +} + +bool matrix_is_modified(void) // deprecated and evidently not called. +{ + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 2) & 0x01 ; + mcp23018_status = I2C_STATUS_SUCCESS; + out: + i2c_stop(); + +#ifdef DEBUG_MATRIX + if (data != 0x00) xprintf("I2C: %d\n", data); +#endif + return data; + } + } else { + // Read using bitmask + return ~((((PINF & ROW1) >> 5)) & 0x1); + } +} + +// Row pin configuration +static void unselect_rows(void) +{ + // no need to unselect on mcp23018, because the select step sets all + // the other row bits high, and it's not changing to a different + // direction + // Hi-Z(DDR:0, PORT:0) to unselect + DDRB &= ~BMASK; + PORTB &= ~BMASK; + DDRD &= ~DMASK; + PORTD &= ~DMASK; +} + +static void select_row(uint8_t row) +{ + if (row < 6) { + // select on mcp23018 + if (mcp23018_status) { // do nothing on error + // Read using bitmask + } else { // set active row low : 0 // set other rows hi-Z : 1 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(~(1< + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +// #define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/ergotravel/keymaps/jarred/keymap.c b/keyboards/ergotravel/keymaps/jarred/keymap.c new file mode 100644 index 000000000000..33031f931b39 --- /dev/null +++ b/keyboards/ergotravel/keymaps/jarred/keymap.c @@ -0,0 +1,50 @@ +/* Copyright 2018 Jarred Steenvoorden + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "jarred.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = LAYOUT_ergotravel_grid_wrapper( + QWERTY_L1, KC_NO, KC_NO, QWERTY_R1, + QWERTY_L2, KC_NO, KC_NO, QWERTY_R2, + QWERTY_L3, KC_NO, KC_NO, QWERTY_R3, + QWERTY_4_12), + + [_LW] = LAYOUT_ergotravel_grid_wrapper( + LOWER_L1, KC_NO, KC_NO, LOWER_R1, + LOWER_L2, KC_NO, KC_NO, LOWER_R2, + LOWER_L3, KC_NO, KC_NO, LOWER_R3, + LOWER_4_12), + + [_NV] = LAYOUT_ergotravel_grid_wrapper( + NAV_L1, KC_NO, KC_NO, NAV_R1, + NAV_L2, KC_NO, KC_NO, NAV_R2, + NAV_L3, KC_NO, KC_NO, NAV_R3, + NAV_4_12), + + [_NP] = LAYOUT_ergotravel_grid_wrapper( + NUMPAD_L1, KC_NO, KC_NO, NUMPAD_R1, + NUMPAD_L2, KC_NO, KC_NO, NUMPAD_R2, + NUMPAD_L3, KC_NO, KC_NO, NUMPAD_R3, + NUMPAD_4_12), + + [_MS] = LAYOUT_ergotravel_grid_wrapper( + MOUSE_L1, KC_NO, KC_NO, MOUSE_R1, + MOUSE_L2, KC_NO, KC_NO, MOUSE_R2, + MOUSE_L3, KC_NO, KC_NO, MOUSE_R3, + MOUSE_4_12) +}; diff --git a/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c b/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c index b2374b71155c..764b2b18c771 100644 --- a/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c +++ b/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -15,7 +15,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/ergotravel/keymaps/rs/keymap.c b/keyboards/ergotravel/keymaps/rs/keymap.c index 634e97c49c78..1ac0a94d9389 100644 --- a/keyboards/ergotravel/keymaps/rs/keymap.c +++ b/keyboards/ergotravel/keymaps/rs/keymap.c @@ -1,25 +1,7 @@ #include QMK_KEYBOARD_H - -enum layers { - _QWERTY, - _HYPER, - _SIGN -}; - - -#define KC_ KC_TRNS - -#define KC_ESCC MT(MOD_LCTL, KC_ESC) -#define KC_ENTS MT(MOD_LSFT, KC_ENT) -#define KC_HYPE MO(_HYPER) -#define KC_SIGN MO(_SIGN) -#define KC_RST RESET -// Brightness -#define KC_BRUP KC_PAUS -#define KC_BRDN KC_SLCK +#include "rs.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc( //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. TAB , Q , W , E , R , T , GRV, BSLS, Y , U , I , O , P ,EQL , @@ -28,32 +10,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| LSFT, Z , X , C , V , B , SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS, //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| - SIGN, ,LCTL,LALT,LGUI, SPC, BSPC, HYPE,LEFT, UP ,DOWN,RIGHT + FN , ,LCTL,LALT,LGUI, SPC, BSPC, CODE,LEFT, UP ,DOWN,RIGHT //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' ), - - - [_HYPER] = LAYOUT_kc( + [_CODE] = LAYOUT_kc( //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - GRV , 1 , 2 , 3 , 4 , 5 , , , 6 , 7 , 8 , 9 , 0 , , + GRV ,EXLM, AT ,HASH, DLR,PERC, , ,CIRC,LPLT,ASTR,RPGT,NEQL, , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , ,PGUP, , , , , , , UP ,LBRC,RBRC,BSLS, + , 1 , 2 , 3 , 4 , 5 , , ,MINS,LBRC, UP ,RBRC, ,BSLS, //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , ,HOME,PGDN,END , , , VOLU, ,LEFT,DOWN,RGHT, ,PIPE, + , 6 , 7 , 8 , 9 , 0 , DOT, ,AMPR,LEFT,DOWN,RGHT, ,PIPE, //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| - , , , , , , VOLD, ,MUTE, , , + , , , , , , , , , , , //`----+----+----+----+----/----/ \----\----+----+----+----+----' ), - - [_SIGN] = LAYOUT_kc( + [_FN] = LAYOUT_kc( //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - TILD,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LBRC,RBRC, , + , F1 , F2 , F3 , F4 , F5 , , , F6 , F7 , F8 , F9 , F10,F11 , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - RST , F1 , F2 , F3 , F4 , F5 , F6 , , , , ,LCBR,RCBR,PIPE, + , , , , , ,BRMU, , , ,PGUP, , , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , 1 , 2 , 3 , 4 , 5 , , BRUP, 6 , 7 , 8 , 9 , 0 , , + , , , , , RST,BRMD, VOLU, ,CTRA,PGDN,CTRE, , , //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| - , , , , , , BRDN, , , , , + , , , , , , VOLD,MUTE, , , , //`----+----+----+----+----/----/ \----\----+----+----+----+----' ), }; \ No newline at end of file diff --git a/keyboards/ergotravel/keymaps/rs/readme.md b/keyboards/ergotravel/keymaps/rs/readme.md index 93b87cc23a16..d23ab66877a5 100644 --- a/keyboards/ergotravel/keymaps/rs/readme.md +++ b/keyboards/ergotravel/keymaps/rs/readme.md @@ -1,13 +1 @@ -# Code friendly 60% keymap - -I developped this keymap to make a better use of 60% ortho keyboards I use like the preonic of the iris. Instead of trying to mimic the Planck layout like the default preonic keymap, this keymap removes the raise and lower layers and offers a simpler hyper layer concept for a few missing sign keys and cursors / media keys. - -The important part for coders is that most important signs needed to code are available at their usual position on a full keyboard, without complex layer gymnastic. Access to [] and {} are available on the hyper layer at their usual emplacement. - -The right thumb is used for both backspace and hyper layer switching. On the hyper layer, in addition to some coding signs, you get the cursor keys arranged in cross, just under your right fingers, so you don't have to move your hand when navigating in code or command line. Other hand gets the home/end page up/down in a similar layout. - -Because you sometime have to use your internal keyboard when you use a macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the hyper layer / backspace on right command key etc. - -This keymap is also available for other keyboards: -- [ortho_5x12/rs](../../../../layouts/community/ortho_5x12/rs/keymap.c) -- [Iris/rs](../../../iris/keymaps/rs/keymap.c) +See [rs readme](../../../../users/rs/readme.md). \ No newline at end of file diff --git a/keyboards/ergotravel/keymaps/viet/keymap.c b/keyboards/ergotravel/keymaps/viet/keymap.c index 0e3ec074c774..dd7fffcc69e0 100644 --- a/keyboards/ergotravel/keymaps/viet/keymap.c +++ b/keyboards/ergotravel/keymaps/viet/keymap.c @@ -1,4 +1,4 @@ -#include "ergotravel.h" +#include "ergotravel.h" #include "action_layer.h" #include "eeconfig.h" #include "mousekey.h" @@ -26,7 +26,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_ADJT MO(_ADJUST) #define KC_RST RESET diff --git a/keyboards/espectro/espectro.h b/keyboards/espectro/espectro.h index ff58f9d97f01..98c930f8f57d 100755 --- a/keyboards/espectro/espectro.h +++ b/keyboards/espectro/espectro.h @@ -104,6 +104,25 @@ { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C } \ } +// Split backspace 1.5u right mods +#define LAYOUT_split_bs_joined_right( \ + K00, K01, K02, K03, K04, K60, K61, K62, K63, K05, K06, K07, K08, K72, K09, K0A, K0B, K0C, K7C, \ + K10, K11, K12, K13, K14, K64, K65, K66, K67, K15, K16, K17, K18, K70, K71, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K68, K69, K6A, K6B, K25, K26, K27, K28, K73, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K6C, K75, K76, K77, K35, K36, K37, K38, K39, K3A, K3B, \ + K40, K42, K43, K44, K78, K79, K7A, K7B, K45, K46, K47, K48, K74, K49, K4A, K4B, K4C, \ + K50, K51, K52, K59, K55, K57, K58, K53, K54, K5A, K5B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C }, \ + { K50, K51, K52, K53, K54, K55, KC_NO, K57, K58, K59, K5A, K5B, KC_NO }, \ + { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C }, \ +} + // Split numpad (enter, 0), split shifts (right, left), split backspace // This layout contains every possible keycode placement #define LAYOUT_split_shift_and_bs( \ @@ -121,7 +140,7 @@ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C }, \ { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C }, \ { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C }, \ - { K71, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C }, \ + { K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C }, \ } // ISO Layout diff --git a/keyboards/espectro/keymaps/mac/keymap.c b/keyboards/espectro/keymaps/mac/keymap.c index 9c03e1345fd0..9bd75d61d646 100644 --- a/keyboards/espectro/keymaps/mac/keymap.c +++ b/keyboards/espectro/keymaps/mac/keymap.c @@ -132,7 +132,6 @@ ________________________________________________________________________________ }; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { @@ -159,8 +158,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LGUI) SS_TAP(X_Q) SS_UP(X_LGUI) SS_UP(X_LALT)); return false; } - return false; } return true; }; - diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.c b/keyboards/exclusive/e6_rgb/e6_rgb.c index d50af86b51b9..106e58497eed 100644 --- a/keyboards/exclusive/e6_rgb/e6_rgb.c +++ b/keyboards/exclusive/e6_rgb/e6_rgb.c @@ -114,91 +114,79 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, E_16, D_16, F_16}, {0, B_16, A_16, C_16}, }; -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { -/* {row | col << 4} - * | {x=0..224, y=0..64} - * | | modifier - * | | | */ -//cs1 - {{0|(0<<4)}, { 0, 0}, 1}, - {{0|(1<<4)}, { 17, 0}, 0}, - {{1|(0<<4)}, { 0, 16}, 1}, - {{2|(0<<4)}, { 0, 32}, 1}, +led_config_t g_led_config = { { + { 0, 1, 4, 5, 12, 13, 36, 20, 21, 24, 25, 16, 17, 28 }, + { 2, 6, 7, 14, 15, 37, 38, 22, 23, 26, 27, 18, 19, 30 }, + { 3, 8, 9, 32, 33, 39, 40, 44, 45, 48, 49, 52, 31, NO_LED }, + { 59, 10, 11, 34, 35, 41, 42, 46, 47, 50, 53, 54, 56, NO_LED }, + { 60, 61, 62, NO_LED, NO_LED, 43, 51, 55, 58, 57, NO_LED, NO_LED, NO_LED, NO_LED } +}, { +//cs1 + { 0, 0 }, { 17, 0 }, { 0, 16 }, { 0, 32 }, //cs2 - {{0|(2<<4)}, { 34, 0}, 0}, - {{0|(3<<4)}, { 51, 0}, 0}, - {{1|(1<<4)}, { 17, 16}, 0}, - {{1|(2<<4)}, { 34, 16}, 0}, + { 34, 0 }, { 51, 0 }, { 17, 16 }, { 34, 16 }, //cs3 - {{2|(1<<4)}, { 17, 32}, 0}, - {{2|(2<<4)}, { 34, 32}, 0}, - {{3|(1<<4)}, { 17, 48}, 0}, - {{3|(2<<4)}, { 34, 48}, 0}, + { 17, 32 }, { 34, 32 }, { 17, 48 }, { 34, 48 }, //cs4 - {{0|(4<<4)}, { 68, 0}, 0}, - {{0|(5<<4)}, { 85, 0}, 0}, - {{1|(3<<4)}, { 51, 16}, 0}, - {{1|(4<<4)}, { 68, 16}, 0}, + { 68, 0 }, { 85, 0 }, { 51, 16 }, { 68, 16 }, //cs5 - {{0|(11<<4)}, {187, 0}, 0}, - {{0|(12<<4)}, {204, 0}, 0}, - {{1|(11<<4)}, {187, 16}, 0}, - {{1|(12<<4)}, {204, 16}, 0}, + { 187, 0 }, { 204, 0 }, { 187, 16 }, { 204, 16 }, //cs6 - {{0|(7<<4)}, {119, 0}, 0}, - {{0|(8<<4)}, {136, 0}, 0}, - {{1|(7<<4)}, {119, 16}, 0}, - {{1|(8<<4)}, {136, 16}, 0}, + { 119, 0 }, { 136, 0 }, { 119, 16 }, { 136, 16 }, //cs7 - {{0|(9<<4)}, {153, 0}, 0}, - {{0|(10<<4)}, {170, 0}, 0}, - {{1|(9<<4)}, {153, 16}, 0}, - {{1|(10<<4)}, {170, 16}, 0}, + { 153, 0 }, { 170, 0 }, { 153, 16 }, { 170, 16 }, //cs8 - {{0|(13<<4)}, {221, 0}, 0}, - {{0|(14<<4)}, {221, 0}, 0}, - {{1|(13<<4)}, {221, 32}, 1}, - {{2|(12<<4)}, {221, 16}, 1}, + { 221, 0 }, { 221, 0 }, { 221, 32 }, { 221, 16 }, //cs9 - {{2|(3<<4)}, { 51, 32}, 0}, - {{2|(4<<4)}, { 68, 32}, 0}, - {{3|(3<<4)}, { 51, 48}, 0}, - {{3|(4<<4)}, { 68, 48}, 0}, + { 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 }, //cs10 - {{0|(6<<4)}, {102, 0}, 0}, - {{1|(5<<4)}, { 85, 16}, 0}, - {{1|(6<<4)}, {102, 16}, 0}, - {{2|(5<<4)}, { 85, 32}, 0}, + { 102, 0 }, { 85, 16 }, { 102, 16 }, { 85, 32 }, //cs11 - {{2|(6<<4)}, {102, 32}, 0}, - {{3|(5<<4)}, { 85, 48}, 0}, - {{3|(6<<4)}, {102, 48}, 0}, - {{4|(5<<4)}, {102, 64}, 0}, + { 102, 32 }, { 85, 48 }, { 102, 48 }, { 102, 64 }, //cs12 - {{2|(7<<4)}, {119, 32}, 0}, - {{2|(8<<4)}, {136, 32}, 0}, - {{3|(7<<4)}, {119, 48}, 0}, - {{3|(8<<4)}, {136, 48}, 0}, + { 119, 32 }, { 136, 32 }, { 119, 48 }, { 136, 48 }, //cs13 - {{2|(9<<4)}, {153, 32}, 0}, - {{2|(10<<4)}, {170, 32}, 0}, - {{3|(9<<4)}, {153, 48}, 0}, - {{4|(6<<4)}, {136, 48}, 1}, + { 153, 32 }, { 170, 32 }, { 153, 48 }, { 136, 48 }, //cs14 - {{2|(11<<4)}, {187, 32}, 0}, - {{3|(10<<4)}, {170, 48}, 0}, - {{3|(11<<4)}, {187, 48}, 1}, - {{4|(7<<4)}, {153, 48}, 1}, + { 187, 32 }, { 170, 48 }, { 187, 48 }, { 153, 48 }, //cs15 - {{3|(12<<4)}, {221, 48}, 1}, - - {{4|(9<<4)}, {221, 64}, 1}, - {{4|(8<<4)}, {204, 64}, 1}, + { 221, 48 }, { 221, 64 }, { 204, 64 }, //cs16 - {{3|(0<<4)}, { 0, 48}, 1}, - {{4|(0<<4)}, { 0, 64}, 1}, - {{4|(1<<4)}, { 17, 64}, 1}, - {{4|(2<<4)}, { 34, 64}, 1}, -}; + { 0, 48 }, { 0, 64 }, { 17, 64 }, { 34, 64 } +}, { +//cs1 + 1, 4, 1, 1, +//cs2 + 4, 4, 4, 4, +//cs3 + 4, 4, 4, 4, +//cs4 + 4, 4, 4, 4, +//cs5 + 4, 4, 4, 4, +//cs6 + 4, 4, 4, 4, +//cs7 + 4, 4, 4, 4, +//cs8 + 4, 4, 1, 1, +//cs9 + 4, 4, 4, 4, +//cs10 + 4, 4, 4, 4, +//cs11 + 4, 4, 4, 4, +//cs12 + 4, 4, 4, 4, +//cs13 + 4, 4, 4, 1, +//cs14 + 4, 4, 1, 1, +//cs15 + 1, 1, 1, +//cs16 + 1, 1, 1, 1 +} }; + #endif diff --git a/keyboards/exclusive/e6v2/oe_bmc/config.h b/keyboards/exclusive/e6v2/oe_bmc/config.h new file mode 100644 index 000000000000..fc7c91ca6654 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER exclusive +#define PRODUCT e6v2 oe bmc +#define DESCRIPTION A custom 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 11 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + +// 0 1 2 3 4 5 6 7 8 9 A +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 } +#define DIODE_DIRECTION COL2ROW + +#define RGBLED_NUM 6 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/exclusive/e6v2/oe_bmc/info.json b/keyboards/exclusive/e6v2/oe_bmc/info.json new file mode 100644 index 000000000000..aa6d171ba871 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "", + "url": "", + "maintainer": "qmk", + "width": 15, + "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}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":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, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.26}, {"x":10.0, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_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":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_hhkb": { + "layout": [{"label":"Esc", "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":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Delete", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Os", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Os", "x":12.5, "y":4}] + }, + + "LAYOUT_60_tsangan": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/config.h b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c new file mode 100644 index 000000000000..730041917650 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, MO(1) + ), + +[1] = LAYOUT_60_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/readme.md b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/readme.md new file mode 100644 index 000000000000..4a1b6efa62cb --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bmc diff --git a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c new file mode 100644 index 000000000000..5357550ae124 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c @@ -0,0 +1,96 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include "oe_bmc.h" +#include "rgblight.h" +#include "i2c_master.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} +#endif + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn RGB LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} diff --git a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.h b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.h new file mode 100644 index 000000000000..44c02c8600fe --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.h @@ -0,0 +1,101 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +// LAYOUT_all ignores the key often coded as ~# to the left of Enter on ISO layouts. +// This is done as it shares the same row AND col as the pipe key. +#define LAYOUT_all( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k53, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ + k00, k01, k02, k75, k04, k08, k09, k05 \ +) \ +{ \ + { k00, k01, k02, KC_NO, k04, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, k53, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ +} + +#define LAYOUT_60_ansi( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, \ + k00, k01, k02, k75, k04, k08, k09, k05 \ +) \ +{ \ + { k00, k01, k02, KC_NO, k04, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ +} + +#define LAYOUT_60_hhkb( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ + k01, k02, k75, k08, k09 \ +) \ +{ \ + { KC_NO, k01, k02, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, KC_NO, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ +} + +#define LAYOUT_60_tsangan( \ + k50, k41, k42, k43, k44, k45, k61, k68, k78, k71, k49, k48, k47, k52, k4A, \ + k30, k31, k32, k33, k34, k35, k62, k67, k77, k72, k39, k38, k37, k36, \ + k20, k21, k22, k23, k24, k25, k63, k66, k76, k73, k29, k28, k26, \ + k10, k11, k12, k13, k14, k15, k64, k6A, k7A, k74, k19, k18, k54, \ + k00, k01, k02, k75, k08, k09, k05 \ +) \ +{ \ + { k00, k01, k02, KC_NO, KC_NO, k05, KC_NO, KC_NO, k08, k09, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, KC_NO, k18, k19, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, KC_NO, k28, k29, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, KC_NO }, \ + { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4A }, \ + { k50, KC_NO, k52, KC_NO, k54, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k61, k62, k63, k64, KC_NO, k66, k67, k68, KC_NO, k6A }, \ + { KC_NO, k71, k72, k73, k74, k75, k76, k77, k78, KC_NO, k7A }, \ +} diff --git a/keyboards/exclusive/e6v2/oe_bmc/readme.md b/keyboards/exclusive/e6v2/oe_bmc/readme.md new file mode 100644 index 000000000000..a386abf6c0a4 --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/readme.md @@ -0,0 +1,44 @@ +# E6-V2 Bootmapper Client (ps2avrgb) OE + +These docs are for the BMC version of the E6-V2 PCB sold during Round 1 which has an atmega32a microcontroller. Please do not flash this `.hex` file on your atmega32u4 equipped E6-V2 or your E6V2 BMC from Round 2. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: ps2avrgb E6-V2 with atmega32a microcontroller +Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e6v2/oe_bmc:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as left control while plugging in the keyboard. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +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). diff --git a/keyboards/exclusive/e6v2/oe_bmc/rules.mk b/keyboards/exclusive/e6v2/oe_bmc/rules.mk new file mode 100644 index 000000000000..885bce24538c --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/rules.mk @@ -0,0 +1,90 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32a +PROTOCOL = VUSB + +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 12000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +# ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +# F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS = -DDEBUG_LEVEL=0 + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = bootloadHID + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +RGBLIGHT_CUSTOM_DRIVER = yes +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +SRC += i2c_master.c + +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h b/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h new file mode 100644 index 000000000000..f22f2b631dbe --- /dev/null +++ b/keyboards/exclusive/e6v2/oe_bmc/usbconfig.h @@ -0,0 +1,393 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'E', 'x', 'c', 'l', 'u', 's', 'i', 'v', 'e' +#define USB_CFG_VENDOR_NAME_LEN 9 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'E', '6', 'V', '2' +#define USB_CFG_DEVICE_NAME_LEN 4 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect diff --git a/keyboards/exclusive/e6v2/readme.md b/keyboards/exclusive/e6v2/readme.md index c09d1ccf1b56..515db082e0e7 100644 --- a/keyboards/exclusive/e6v2/readme.md +++ b/keyboards/exclusive/e6v2/readme.md @@ -13,7 +13,7 @@ The E6-V2 is a 60% keyboard manufactured by Exclusive. These docs are for the QMK version of the E6-V2 PCB. [More info on qmk.fm](http://qmk.fm/) -The E6V2 has been available with either a bootmapper client or QMK powered PCB. During the second round, the QMK powered PCB was redesigned and used different ports and a different switch matrix. +The E6V2 has been available with either a Bootmapper Client or QMK-powered PCB. During the second round, the QMK-powered and BMC PCBs were redesigned, and used different ports and a different switch matrix. Please use the appropriate version when making your firmware. Flashing one in place of the other, can brick your PCB. Please be certain whether you have a OE or LE PCB. diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h index c952ca737233..b4fb0d4cddd1 100644 --- a/keyboards/facew/config.h +++ b/keyboards/facew/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef FACEW_CONFIG_H -#define FACEW_CONFIG_H +#pragma once #include "config_common.h" @@ -40,7 +39,3 @@ along with this program. If not, see . #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS - -#define NO_UART 1 - -#endif diff --git a/keyboards/facew/facew.c b/keyboards/facew/facew.c index 9c255c68f450..7ec56548b16d 100644 --- a/keyboards/facew/facew.c +++ b/keyboards/facew/facew.c @@ -26,7 +26,7 @@ along with this program. If not, see . #include #include "action_layer.h" -#include "i2c.h" +#include "i2c_master.h" #include "quantum.h" #ifdef RGBLIGHT_ENABLE @@ -42,7 +42,7 @@ void rgblight_set(void) { } i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); } #endif diff --git a/keyboards/facew/facew.h b/keyboards/facew/facew.h index 7d949de98e36..b3356f2628e2 100644 --- a/keyboards/facew/facew.h +++ b/keyboards/facew/facew.h @@ -15,15 +15,14 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef FACEW_H -#define FACEW_H +#pragma once #include "quantum.h" #define LAYOUT_all( \ K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K10, K60,\ K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \ - K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \ + K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K48, K40, \ K19, K13, K41, K42, K43, K44, K54, K55, K45, K46, K47, K58, K49, K50,\ K09, K00, K39, K30, K59, K69, K57, K29\ ){ \ @@ -31,7 +30,7 @@ along with this program. If not, see . { KC_NO, K11, K12, K13, K14, K15, K16, KC_NO, K18, K19, K10}, \ { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K20}, \ { KC_NO, KC_NO, KC_NO, KC_NO, K34, K35, KC_NO, KC_NO, K38, K39, K30}, \ - { KC_NO, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K40}, \ + { KC_NO, K41, K42, K43, K44, K45, K46, K47, K48, K49, K40}, \ { KC_NO, KC_NO, KC_NO, KC_NO, K54, K55, KC_NO, K57, K58, K59, K50}, \ { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \ { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \ @@ -53,5 +52,3 @@ along with this program. If not, see . { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \ { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \ } - -#endif diff --git a/keyboards/facew/i2c.c b/keyboards/facew/i2c.c deleted file mode 100644 index a4f95213524f..000000000000 --- a/keyboards/facew/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/facew/info.json b/keyboards/facew/info.json index 3f94985b2dd2..b7b6acca7856 100644 --- a/keyboards/facew/info.json +++ b/keyboards/facew/info.json @@ -6,7 +6,7 @@ "height": 5, "layouts": { "LAYOUT_all": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps 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":1.25}, {"x":1.25, "y":3}, {"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":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + "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}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps 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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"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":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, "LAYOUT_60_ansi": { diff --git a/keyboards/facew/keymaps/default/keymap.c b/keyboards/facew/keymaps/default/keymap.c index a237f8489e76..6e91fba238b8 100644 --- a/keyboards/facew/keymaps/default/keymap.c +++ b/keyboards/facew/keymaps/default/keymap.c @@ -21,21 +21,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( 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_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, - MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL ), [1] = LAYOUT_all( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_DEL, - MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, + MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, 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_PGUP, KC_PGDN, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [2] = LAYOUT_all( 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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - MO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + MO(1), 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 ), diff --git a/keyboards/facew/keymaps/mechmerlin/keymap.c b/keyboards/facew/keymaps/mechmerlin/keymap.c deleted file mode 100644 index 35b59e6a42f3..000000000000 --- a/keyboards/facew/keymaps/mechmerlin/keymap.c +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( - 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_NO, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TG(2), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL - ), - [1] = LAYOUT_all( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - [2] = LAYOUT_all( - 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_UP, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT - ), - - [3] = LAYOUT_all( - 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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, 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 - ), -}; - diff --git a/keyboards/facew/keymaps/mechmerlin/readme.md b/keyboards/facew/keymaps/mechmerlin/readme.md deleted file mode 100644 index eeb83b0a16db..000000000000 --- a/keyboards/facew/keymaps/mechmerlin/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -MechMerlin's FaceW Sprit Edition Layout -====================== - -This is the preferred 60% layout used by u/merlin36, host of the [MechMerlin YouTube channel](www.youtube.com/mechmerlin). - -## Keyboard Notes -- The FaceW Sprit Edition can be purchased on [mechanicalkeyboards.com](www.mechanicalkeyboards.com) -- Uses ps2avru instead of ps2avrgb -- To put in reset mode hold `q` while inserting the USB cable -- Use flashing instructions from ps2avrgb QMK port - -## Keymap Notes -- Does not support any form of inswitch lighting as Merlin hates them. -- Arrow toggle switch to the right of right shift -- Reset is FN + Left Shift + R - -### Build -To build this keymap, simply run `make facew:mechmerlin` from the qmk_firmware directory. diff --git a/keyboards/facew/matrix.c b/keyboards/facew/matrix.c deleted file mode 100644 index 57aa36b5ff74..000000000000 --- a/keyboards/facew/matrix.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/facew/readme.md b/keyboards/facew/readme.md index 578dcf888843..b749d18d296a 100644 --- a/keyboards/facew/readme.md +++ b/keyboards/facew/readme.md @@ -2,20 +2,12 @@ A 60% no frills keyboard. -The FaceW is a special run of the WKL B.Face sourced from Sprit that doesn't have underglow RGB LEDs -but does have in switch LEDs. Also unlike the B.Face, it is based on ps2avru instead of ps2avrGB. It -is designed and manufactured in Korea. It originally uses BootMapperClient for programming but -can now also use QMK. +The FaceW is a special run of the WKL B.Face sourced from Sprit that doesn't have underglow RGB LEDs but does have in switch LEDs. Also unlike the B.Face, it is based on ps2avru instead of ps2avrGB. It is designed and manufactured in Korea. Keyboard Maintainer: [MechMerlin](www.github.com/mechmerlin) Hardware Supported: FaceW Sprit Edition PCB Hardware Availability: https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=1352 -## Keyboard Notes -- The FaceW Sprit Edition can be purchased on [mechanicalkeyboards.com](www.mechanicalkeyboards.com) -- Uses ps2avru instead of ps2avrgb -- To put in reset mode hold `q` while inserting the USB cable - Make example for this keyboard (after setting up your build environment): make facew:default @@ -24,6 +16,8 @@ Flashing ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. +**Reset Key:** To put the FaceW into reset, hold `q` (`K01`) while plugging in. + Windows: 1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). 2. Place your keyboard into reset. @@ -42,12 +36,12 @@ macOS: ``` 3. Install the following packages: ``` - brew install python - brew install pyusb - brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb 4. Place your keyboard into reset. 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. -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). diff --git a/keyboards/facew/rules.mk b/keyboards/facew/rules.mk index 77d29b3320d0..b939b0fd240b 100644 --- a/keyboards/facew/rules.mk +++ b/keyboards/facew/rules.mk @@ -31,20 +31,19 @@ F_CPU = 12000000 BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = yes +BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes RGBLIGHT_CUSTOM_DRIVER = yes OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = i2c_master.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/facew/usbconfig.h b/keyboards/facew/usbconfig.h index d2d848fcdc8f..f3d663f8a6ee 100644 --- a/keyboards/facew/usbconfig.h +++ b/keyboards/facew/usbconfig.h @@ -8,8 +8,7 @@ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ */ -#ifndef __usbconfig_h_included__ -#define __usbconfig_h_included__ +#pragma once #include "config.h" @@ -241,8 +240,8 @@ section at the end of this file). #define USB_CFG_DEVICE_VERSION 0x00, 0x02 /* Version number of the device: Minor number first, then major number. */ -#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' -#define USB_CFG_VENDOR_NAME_LEN 13 +#define USB_CFG_VENDOR_NAME 'S', 'p', 'r', 'i', 't' +#define USB_CFG_VENDOR_NAME_LEN 5 /* These two values define the vendor name returned by the USB device. The name * must be given as a list of characters under single quotes. The characters * are interpreted as Unicode (UTF-16) entities. @@ -251,8 +250,8 @@ section at the end of this file). * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for * details. */ -#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' -#define USB_CFG_DEVICE_NAME_LEN 8 +#define USB_CFG_DEVICE_NAME 'F', 'a', 'c', 'e', 'W' +#define USB_CFG_DEVICE_NAME_LEN 5 /* Same as above for the device name. If you don't want a device name, undefine * the macros. See the file USB-IDs-for-free.txt before you assign a name if * you use a shared VID/PID. @@ -392,5 +391,3 @@ section at the end of this file). /* #define USB_INTR_PENDING EIFR */ #define USB_INTR_PENDING_BIT INTF1 #define USB_INTR_VECTOR INT1_vect - -#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/fc660c/config.h b/keyboards/fc660c/config.h index 96f04b097c1c..fe9c695174c9 100644 --- a/keyboards/fc660c/config.h +++ b/keyboards/fc660c/config.h @@ -32,7 +32,7 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 16 -#define DIODE_DIRECTION CUSTOM_MATRIX +//#define DIODE_DIRECTION /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/fc660c/keymaps/default/config.h b/keyboards/fc660c/keymaps/default/config.h index 596198be1048..b89b05009a64 100644 --- a/keyboards/fc660c/keymaps/default/config.h +++ b/keyboards/fc660c/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/fc660c/keymaps/spacebarracecar/config.h b/keyboards/fc660c/keymaps/spacebarracecar/config.h deleted file mode 100644 index 9d83a27000ef..000000000000 --- a/keyboards/fc660c/keymaps/spacebarracecar/config.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -/* -higher value means deeper actuation point, less sensitive -this should probably stay in the range +/-5. -*/ -#undef ACTUATION_DEPTH_ADJUSTMENT -#define ACTUATION_DEPTH_ADJUSTMENT -1 diff --git a/keyboards/fc660c/keymaps/spacebarracecar/keymap.c b/keyboards/fc660c/keymaps/spacebarracecar/keymap.c deleted file mode 100644 index 760b83b9fb8d..000000000000 --- a/keyboards/fc660c/keymaps/spacebarracecar/keymap.c +++ /dev/null @@ -1,38 +0,0 @@ -#include QMK_KEYBOARD_H -#include "spacebarracecar.h" - -enum layers { - _BASE -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_BASE] = LAYOUT( - KC_ESC, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, DE_MINS,CU_EQL, KC_BSPC, KC_INS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, CU_Z, KC_U, KC_I, KC_O, KC_P, CU_LBRC,CU_RBRC,CU_BSLS, KC_DEL, - CU_NAV, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, CU_SCLN,CU_QUOT, KC_ENT, - CU_LSFT,CU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, CU_COMM,CU_DOT, CU_SLSH,CU_RSFT, KC_UP, - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT - ), - - [_DEADKEY] = LAYOUT( - CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, _______, CU_ED, - _______,CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_UE, CU_ED, CU_OE, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, - _______,CU_AE, CU_SS, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_DDQ, CU_DDQ , - _______,CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, _______, _______, - _______,_______,_______, CU_DDQ, _______,_______,_______, _______,_______,_______ - ), - - [_NAV] = LAYOUT( - CU_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, CU_GAME, - _______,KC_PGDN,KC_UP, KC_PGUP,KC_HOME,XXXXXXX,XXXXXXX,XXXXXXX,GUIU, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, CU_ESCT, - _______,KC_LEFT,KC_DOWN,KC_RGHT,KC_END, XXXXXXX,XXXXXXX,GUIL, GUID, GUIR, XXXXXXX,XXXXXXX, KC_ENT, - _______,KC_MPRV,KC_MPLY,KC_MNXT,KC_VOLD,KC_VOLU,KC_MUTE,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,_______, KC_PGUP, - RESET, _______,_______, KC_SPC, _______,_______,_______, KC_HOME,KC_PGDN,KC_END - ) - -}; - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; -} diff --git a/keyboards/fc660c/keymaps/spacebarracecar/rules.mk b/keyboards/fc660c/keymaps/spacebarracecar/rules.mk deleted file mode 100644 index 8ee642a4a734..000000000000 --- a/keyboards/fc660c/keymaps/spacebarracecar/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work - -# Userspace defines -GERMAN_ENABLE = yes # Enable Custom US Ansi Keycodes for PC with German set as input language diff --git a/keyboards/fc980c/README.md b/keyboards/fc980c/README.md index 768d7d3a3cb9..61dcf6ee9643 100644 --- a/keyboards/fc980c/README.md +++ b/keyboards/fc980c/README.md @@ -155,7 +155,7 @@ Datasheets - AD5258: http://www.analog.com/media/en/technical-documentation/data-sheets/AD5258.pdf - JST S5B-PH-SM4: http://www.jst-mfg.com/product/pdf/eng/ePH.pdf - Hirose UX60SC-MB-5S8: https://www.hirose.com/product/en/products/UX/UX60SC-MB-5S8%2880%29/ -- Tr(E42) for LED?: http://cj-elec.com/txUpfile/2013614923661845.pdf +- Tr(E42) for LED?: http://www.bklighting.com/cimages/specs-758.pdf - TYU TU1252WNR-05S: http://php2.twinner.com.tw/files/goodjob/TY1252series.pdf diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h index a6cb97756261..b46bdfd55065 100644 --- a/keyboards/fc980c/config.h +++ b/keyboards/fc980c/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . // #define MATRIX_COL_PINS { F5, B1, F0, F1, F4, B3, D7, D6, D4, D5, D3, D2, D1, D0 } // #define UNUSED_PINS -#define DIODE_DIRECTION CUSTOM_MATRIX +//#define DIODE_DIRECTION /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/fc980c/keymaps/default/config.h b/keyboards/fc980c/keymaps/default/config.h index 596198be1048..20fd511474e8 100644 --- a/keyboards/fc980c/keymaps/default/config.h +++ b/keyboards/fc980c/keymaps/default/config.h @@ -14,11 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "config_common.h" // place overrides here - -#endif diff --git a/keyboards/fleuron/config.h b/keyboards/fleuron/config.h index cccb798be07e..8e1d27436996 100644 --- a/keyboards/fleuron/config.h +++ b/keyboards/fleuron/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C7, B6, B3, B5, B4, D7, D4, D5, D3, D2, D1, D0, B7, B0, B1, B2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/fleuron/keymaps/default/keymap.c b/keyboards/fleuron/keymaps/default/keymap.c index 3314013669c4..367ee4895077 100644 --- a/keyboards/fleuron/keymaps/default/keymap.c +++ b/keyboards/fleuron/keymaps/default/keymap.c @@ -34,9 +34,6 @@ enum custom_keycodes { #define _RAISE 2 */ -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_ortho_6x16( /* Qwerty diff --git a/keyboards/fleuron/keymaps/dollartacos/keymap.c b/keyboards/fleuron/keymaps/dollartacos/keymap.c index e38dd8bd5727..f8535fdc788e 100644 --- a/keyboards/fleuron/keymaps/dollartacos/keymap.c +++ b/keyboards/fleuron/keymaps/dollartacos/keymap.c @@ -34,9 +34,6 @@ enum custom_keycodes { #define _RAISE 2 */ -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_fleuron_grid( /* Qwerty diff --git a/keyboards/fortitude60/keymaps/default/config.h b/keyboards/fortitude60/keymaps/default/config.h index 17483734816c..b6c6273d927c 100644 --- a/keyboards/fortitude60/keymaps/default/config.h +++ b/keyboards/fortitude60/keymaps/default/config.h @@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once #define USE_SERIAL @@ -34,5 +31,3 @@ along with this program. If not, see . /* #define RGBLIGHT_HUE_STEP 8 */ /* #define RGBLIGHT_SAT_STEP 8 */ /* #define RGBLIGHT_VAL_STEP 8 */ - -#endif diff --git a/keyboards/fortitude60/keymaps/default/keymap.c b/keyboards/fortitude60/keymaps/default/keymap.c index f0b9964ab5d7..d20ca40fbbad 100644 --- a/keyboards/fortitude60/keymaps/default/keymap.c +++ b/keyboards/fortitude60/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -23,9 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) diff --git a/keyboards/four_banger/keymaps/default/keymap.c b/keyboards/four_banger/keymaps/default/keymap.c index 3fea0afd4fa3..fc04e0fb1bce 100644 --- a/keyboards/four_banger/keymaps/default/keymap.c +++ b/keyboards/four_banger/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "four_banger.h" +#include QMK_KEYBOARD_H enum custom_keycodes { UP_URL = SAFE_RANGE diff --git a/keyboards/fourier/rev1/rev1.h b/keyboards/fourier/rev1/rev1.h deleted file mode 100644 index ac889462b30b..000000000000 --- a/keyboards/fourier/rev1/rev1.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include "fourier.h" -#include "quantum.h" - -#define LAYOUT( \ - LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \ - LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB7, \ - LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC3, RC4, RC5, RC6, RC7, \ - LD1, LD2, LD3, LD4, LD5, RD1, RD4, RD5, RD6, RD7 \ - ) \ - { \ - { LA1, LA2, LA3, LA4, LA5, LA6, KC_NO}, \ - { LB1, LB2, LB3, LB4, LB5, LB6, KC_NO}, \ - { LC1, LC2, LC3, LC4, LC5, LC6, KC_NO}, \ - { LD1, LD2, LD3, LD4, LD5, KC_NO, KC_NO}, \ - { RA1, RA2, RA3, RA4, RA5, RA6, RA7}, \ - { RB1, RB2, RB3, RB4, RB5, KC_NO, RB7}, \ - { RC1, KC_NO, RC3, RC4, RC5, RC6, RC7}, \ - { RD1, KC_NO, KC_NO, RD4, RD5, RD6, RD7} \ - } diff --git a/keyboards/foxlab/leaf60/hotswap/config.h b/keyboards/foxlab/leaf60/hotswap/config.h new file mode 100644 index 000000000000..a471ea8e5864 --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/config.h @@ -0,0 +1,229 @@ +/* +Copyright 2019 Fox Lab + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Fox Lab +#define PRODUCT Leaf60 Hotswap +#define DESCRIPTION A custom hotswap 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D2, D1, D0, D3, D5 } +#define MATRIX_COL_PINS { F5, F4, F1, F0, B0, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 4 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 8 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/foxlab/leaf60/hotswap/hotswap.c b/keyboards/foxlab/leaf60/hotswap/hotswap.c new file mode 100644 index 000000000000..20778d927d20 --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/hotswap.c @@ -0,0 +1,59 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#include "hotswap.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(E6); + matrix_init_user(); +} +/* + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + led_set_user(usb_led); +} diff --git a/keyboards/foxlab/leaf60/hotswap/hotswap.h b/keyboards/foxlab/leaf60/hotswap/hotswap.h new file mode 100644 index 000000000000..eaf0b2d3aedc --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/hotswap.h @@ -0,0 +1,40 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_60_tsangan_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K407, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, KC_NO, K407, KC_NO, KC_NO, KC_NO, K411, K412, K413, KC_NO } \ +} diff --git a/keyboards/foxlab/leaf60/hotswap/info.json b/keyboards/foxlab/leaf60/hotswap/info.json new file mode 100644 index 000000000000..1e8daa704d79 --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Fox Lab Hotswap Leaf60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_tsangan_hhkb": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/foxlab/leaf60/hotswap/keymaps/default/config.h b/keyboards/foxlab/leaf60/hotswap/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/foxlab/leaf60/hotswap/keymaps/default/keymap.c b/keyboards/foxlab/leaf60/hotswap/keymaps/default/keymap.c new file mode 100644 index 000000000000..3f9ea1b49c58 --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_60_tsangan_hhkb( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, + 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL), + + LAYOUT_60_tsangan_hhkb( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, 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) + +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/foxlab/leaf60/hotswap/keymaps/default/readme.md b/keyboards/foxlab/leaf60/hotswap/keymaps/default/readme.md new file mode 100644 index 000000000000..870439f268ac --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Fox Lab Hotswap Leaf60 \ No newline at end of file diff --git a/keyboards/foxlab/leaf60/hotswap/readme.md b/keyboards/foxlab/leaf60/hotswap/readme.md new file mode 100644 index 000000000000..cdec1870d74f --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/readme.md @@ -0,0 +1,13 @@ +# Fox Lab Hotswap Leaf60 + +A hotswap, Tsangan-layout, gasket-mount 60% keyboard. + +Keyboard Maintainer: [Fox Lab](https://github.com/fox-lab), [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Leaf60 powered by the ATmega32U4 +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=99002.0) + +Make example for this keyboard (after setting up your build environment): + + make foxlab/leaf60/hotswap: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). diff --git a/keyboards/foxlab/leaf60/hotswap/rules.mk b/keyboards/foxlab/leaf60/hotswap/rules.mk new file mode 100644 index 000000000000..75ee00a1a9c4 --- /dev/null +++ b/keyboards/foxlab/leaf60/hotswap/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/foxlab/leaf60/readme.md b/keyboards/foxlab/leaf60/readme.md new file mode 100644 index 000000000000..994915680ca5 --- /dev/null +++ b/keyboards/foxlab/leaf60/readme.md @@ -0,0 +1,7 @@ +# Fox Lab Leaf60 + +The Leaf60 is a 60% gasket mount board sold via [Geekhack Group Buy](https://geekhack.org/index.php?topic=99002.0). + +It was available with a universal layout PCB and a hotswap tsangan PCB. + +**Firmware generated for one PCB will not work on the other.** \ No newline at end of file diff --git a/keyboards/foxlab/leaf60/universal/config.h b/keyboards/foxlab/leaf60/universal/config.h new file mode 100644 index 000000000000..d8d66ee38357 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/config.h @@ -0,0 +1,229 @@ +/* +Copyright 2019 Fox Lab + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Fox Lab +#define PRODUCT Leaf60 Universal +#define DESCRIPTION A custom 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, F0, F4, F1 } +#define MATRIX_COL_PINS { B0, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 8 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/foxlab/leaf60/universal/info.json b/keyboards/foxlab/leaf60/universal/info.json new file mode 100644 index 000000000000..f08503377feb --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "Fox Lab Leaf60", + "url": "", + "maintainer": "qmk", + "width": 15, + "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}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":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, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_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":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_hhkb": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/foxlab/leaf60/universal/keymaps/default/config.h b/keyboards/foxlab/leaf60/universal/keymaps/default/config.h new file mode 100644 index 000000000000..d8f6533c6ba9 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/foxlab/leaf60/universal/keymaps/default/keymap.c b/keyboards/foxlab/leaf60/universal/keymaps/default/keymap.c new file mode 100644 index 000000000000..ff84fa39995a --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL), + + LAYOUT_all( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, 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) + +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/foxlab/leaf60/universal/keymaps/default/readme.md b/keyboards/foxlab/leaf60/universal/keymaps/default/readme.md new file mode 100644 index 000000000000..a9f033367433 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Universal Leaf60 \ No newline at end of file diff --git a/keyboards/foxlab/leaf60/universal/readme.md b/keyboards/foxlab/leaf60/universal/readme.md new file mode 100644 index 000000000000..b65f1d40f407 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/readme.md @@ -0,0 +1,13 @@ +# Fox Lab Leaf60 + +A 60% gasket sandwich made by Fox Lab. + +Keyboard Maintainer: [Fox Lab](https://github.com/fox-lab), [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Leaf60 powered by the ATmega32U4 +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=99002.0) + +Make example for this keyboard (after setting up your build environment): + + make foxlab/leaf60/universal: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). diff --git a/keyboards/foxlab/leaf60/universal/rules.mk b/keyboards/foxlab/leaf60/universal/rules.mk new file mode 100644 index 000000000000..a865410333ad --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = 60_ansi 60_hhkb diff --git a/keyboards/foxlab/leaf60/universal/universal.c b/keyboards/foxlab/leaf60/universal/universal.c new file mode 100644 index 000000000000..5fe663a1bff5 --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/universal.c @@ -0,0 +1,61 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#include "universal.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(E6); + matrix_init_user(); +} + +/* + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ + + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(E6); + } else { + writePinHigh(E6); + } + led_set_user(usb_led); +} diff --git a/keyboards/foxlab/leaf60/universal/universal.h b/keyboards/foxlab/leaf60/universal/universal.h new file mode 100644 index 000000000000..ab3f388a496f --- /dev/null +++ b/keyboards/foxlab/leaf60/universal/universal.h @@ -0,0 +1,68 @@ +/* Copyright 2019 Fox Lab + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K404, K406, K408, K410, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO }, \ + { K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, KC_NO } \ +} + +#define LAYOUT_60_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K406, K410, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ +} + +#define LAYOUT_60_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K401, K402, K406, K411, K412 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO }, \ + { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, K412, KC_NO, KC_NO } \ +} diff --git a/keyboards/ft/mars80/config.h b/keyboards/ft/mars80/config.h new file mode 100644 index 000000000000..e03d1b39993b --- /dev/null +++ b/keyboards/ft/mars80/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0001 +#define MANUFACTURER FT +#define PRODUCT Mars 8.0 +#define DESCRIPTION A custom TKL Keyboard + +#define RGBLED_NUM 20 + +#define MATRIX_ROWS 7 +#define MATRIX_COLS 14 +// 0 1 2 3 4 5 6 7 8 9 A B C D +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } +#define UNUSED_PINS {} + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + diff --git a/keyboards/ft/mars80/info.json b/keyboards/ft/mars80/info.json new file mode 100644 index 000000000000..7d71cd040a8f --- /dev/null +++ b/keyboards/ft/mars80/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Mars 8.0", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_iso": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/ft/mars80/keymaps/default/config.h b/keyboards/ft/mars80/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/ft/mars80/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/ft/mars80/keymaps/default/keymap.c b/keyboards/ft/mars80/keymaps/default/keymap.c new file mode 100644 index 000000000000..ba7ef83d9875 --- /dev/null +++ b/keyboards/ft/mars80/keymaps/default/keymap.c @@ -0,0 +1,75 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_tkl_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_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_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(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSEL, \ + _______, _______, _______, KC_CALC, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/ft/mars80/keymaps/default/readme.md b/keyboards/ft/mars80/keymaps/default/readme.md new file mode 100644 index 000000000000..180935f5d4a8 --- /dev/null +++ b/keyboards/ft/mars80/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Mars 8.0 \ No newline at end of file diff --git a/keyboards/ft/mars80/mars80.c b/keyboards/ft/mars80/mars80.c new file mode 100644 index 000000000000..75434508223b --- /dev/null +++ b/keyboards/ft/mars80/mars80.c @@ -0,0 +1,91 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#include "mars80.h" + +#include "rgblight.h" +#include "i2c_master.h" +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} +#endif + +void matrix_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + if (rgblight_config.enable) { + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + } +#endif + // call user level keymaps, if any + matrix_init_user(); +} + +void matrix_scan_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_task(); +#endif + matrix_scan_user(); + /* Nothing else for now. */ +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} \ No newline at end of file diff --git a/keyboards/ft/mars80/mars80.h b/keyboards/ft/mars80/mars80.h new file mode 100644 index 000000000000..6308d06d0df7 --- /dev/null +++ b/keyboards/ft/mars80/mars80.h @@ -0,0 +1,63 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_tkl_iso( \ + k11, k13, k14, k15, k16, k18, k19, k1A, k1B, k1C, k10, k1D, k12, k02, k03, k00, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k20, k2D, k07, k06, k05, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k30, k0D, k09, k08, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k3D, k40, \ + k51, k4D, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, \ + k61, k62, k63, k65, k69, k6A, k6B, k6C, k60, k6D, k68 \ +) \ +{ \ + { k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \ + { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \ + { k60, k61, k62, k63, KC_NO, k65, KC_NO, KC_NO, k68, k69, k6A, k6B, k6C, k6D }, \ +} + +#define LAYOUT_tkl_ansi( \ + k11, k13, k14, k15, k16, k18, k19, k1A, k1B, k1C, k10, k1D, k12, k02, k03, k00, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k20, k2D, k07, k06, k05, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k30, k3D, k0D, k09, k08, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k40, \ + k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, \ + k61, k62, k63, k65, k69, k6A, k6B, k6C, k60, k6D, k68 \ +) \ +{ \ + { k00, KC_NO, k02, k03, KC_NO, k05, k06, k07, k08, k09, KC_NO, KC_NO, KC_NO, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, KC_NO, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, KC_NO, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO }, \ + { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D }, \ + { k60, k61, k62, k63, KC_NO, k65, KC_NO, KC_NO, k68, k69, k6A, k6B, k6C, k6D }, \ +} diff --git a/keyboards/ft/mars80/readme.md b/keyboards/ft/mars80/readme.md new file mode 100644 index 000000000000..962275133418 --- /dev/null +++ b/keyboards/ft/mars80/readme.md @@ -0,0 +1,44 @@ +# Mars 8.0 + +TKL Keyboard with in switch backlight and RGB Underglow. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Mars 8.0 PCB +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=93723.0) + +Make example for this keyboard (after setting up your build environment): + + make ft/mars80:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as `Pause/Break` while plugging in the keyboard. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +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). diff --git a/keyboards/ft/mars80/rules.mk b/keyboards/ft/mars80/rules.mk new file mode 100644 index 000000000000..159307f8d0c5 --- /dev/null +++ b/keyboards/ft/mars80/rules.mk @@ -0,0 +1,50 @@ +# Copyright 2019 Luiz Ribeiro +# +# 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 . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +SRC += i2c_master.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex + +LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/ft/mars80/usbconfig.h b/keyboards/ft/mars80/usbconfig.h new file mode 100644 index 000000000000..338b67f5839f --- /dev/null +++ b/keyboards/ft/mars80/usbconfig.h @@ -0,0 +1,393 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'f', 't' +#define USB_CFG_VENDOR_NAME_LEN 2 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'm', 'a', 'r', 's', '8', '0' +#define USB_CFG_DEVICE_NAME_LEN 6 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect diff --git a/keyboards/georgi/config.h b/keyboards/georgi/config.h new file mode 100644 index 000000000000..b35a1be789c1 --- /dev/null +++ b/keyboards/georgi/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk + +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 . +*/ + +// Copy and worked on with love from the EZ team + +#pragma once +#include "config_common.h" + +/* Defaults */ + +#define VERSION "v1.1: ClayM" +#define VERBOSE + +#define FORCE_NKRO +#define NO_ACTION_FUNCTION +#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1337 +#define DEVICE_VER 0x0001 +#define MANUFACTURER g Heavy Industries +#define PRODUCT Georgi +#define DESCRIPTION QMK keyboard firmware for Georgi + +/* key matrix size */ +#define MATRIX_ROWS 14 +#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2) +#define MATRIX_COLS 4 + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 +#define TAPPING_TOGGLE 2 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* 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 + +/* key combination for command */ +#define IS_COMMAND() ( \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +#define DEBOUNCE 5 +#define USB_MAX_POWER_CONSUMPTION 500 diff --git a/keyboards/georgi/georgi.c b/keyboards/georgi/georgi.c new file mode 100644 index 000000000000..8866886ce7c7 --- /dev/null +++ b/keyboards/georgi/georgi.c @@ -0,0 +1,68 @@ +#include QMK_KEYBOARD_H + +bool i2c_initialized = 0; +i2c_status_t mcp23018_status = 0x20; + +void matrix_init_kb(void) { + steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT + + // (tied to Vcc for hardware convenience) + //DDRB &= ~(1<<4); // set B(4) as input + //PORTB &= ~(1<<4); // set B(4) internal pull-up disabled + + // unused pins - C7, D4, D5, D7, E6 + // set as input with internal pull-up enabled + DDRC &= ~(1<<7); + DDRD &= ~(1<<5 | 1<<4 | 1<<6 | 1<<7); + DDRE &= ~(1<<6); + PORTC |= (1<<7); + PORTD |= (1<<5 | 1<<4 | 1<<6 | 1<<7); + PORTE |= (1<<6); + + matrix_init_user(); +} + + +uint8_t init_mcp23018(void) { + print("starting init"); + mcp23018_status = 0x20; + + // I2C subsystem + + // uint8_t sreg_prev; + // sreg_prev=SREG; + // cli(); + + if (i2c_initialized == 0) { + i2c_init(); // on pins D(1,0) + i2c_initialized = true; + _delay_ms(1000); + } + // i2c_init(); // on pins D(1,0) + // _delay_ms(1000); + + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b10000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + i2c_stop(); + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b10000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + +out: + i2c_stop(); + // SREG=sreg_prev; + //uprintf("Init %x\n", mcp23018_status); + return mcp23018_status; +} diff --git a/keyboards/georgi/georgi.h b/keyboards/georgi/georgi.h new file mode 100644 index 000000000000..df6bb6ea9a40 --- /dev/null +++ b/keyboards/georgi/georgi.h @@ -0,0 +1,82 @@ +#pragma once +#include +#include +#include +#include "quantum.h" +#include "i2c_master.h" +#include "matrix.h" + + +extern i2c_status_t mcp23018_status; +#define ERGODOX_EZ_I2C_TIMEOUT 1000 +#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) +#define CPU_16MHz 0x00 + +// I2C aliases and register addresses (see "mcp23018.md") +//#define I2C_ADDR 0b0100000 +#define I2C_ADDR 0x20 +#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) +#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 + +void init_ergodox(void); +uint8_t init_mcp23018(void); + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ +#define LAYOUT_georgi( \ + L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05, \ + L10,L11,L12,L13,L14,L15, R10,R11,R12,R13,R14,R15, \ + L20,L21,L22, R20,R21,R22) \ + \ + { \ + { KC_NO, R00, R10, R21}, \ + { KC_NO, R01, R11, R20}, \ + { KC_NO, R02, R12, R22}, \ + { KC_NO, R03, R13, KC_NO}, \ + { KC_NO, R04, R14, KC_NO}, \ + { KC_NO, R05, R15, KC_NO}, \ + { KC_NO, KC_NO, KC_NO, KC_NO}, \ + \ + { KC_NO, L05, L15, L22}, \ + { KC_NO, L04, L14, L21}, \ + { KC_NO, L03, L13, L20}, \ + { KC_NO, L02, L12, KC_NO}, \ + { KC_NO, L01, L11, KC_NO}, \ + { KC_NO, L00, L10, KC_NO}, \ + { KC_NO, KC_NO, KC_NO, KC_NO}, \ + \ +} + +/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- +#define LAYOUT_GERGO( \ + L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05, \ + L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \ + L20,L21,L22,L23,L24,L25,L26, R20,R21,R22,R23,R24,R25,R26, \ + L31,L32, R33,R34, \ + L30, R30, \ + L33,L34, R31,R32) \ + \ + { \ + { KC_NO, L16, L26, L30}, \ + { L05, L15, L25, L34}, \ + { L04, L14, L24, L33}, \ + { L03, L13, L23, L32}, \ + { L02, L12, L22, L31}, \ + { L01, L11, L21, KC_NO}, \ + { L00, L10, L20, KC_NO}, \ + \ + { KC_NO, R10, R20, R30}, \ + { R00, R11, R21, R31}, \ + { R01, R12, R22, R32}, \ + { R02, R13, R23, R33}, \ + { R03, R14, R24, R34}, \ + { R04, R15, R25, KC_NO}, \ + { R05, R16, R26, KC_NO}, \ +} */ diff --git a/keyboards/georgi/info.json b/keyboards/georgi/info.json new file mode 100644 index 000000000000..d0752e2cd3eb --- /dev/null +++ b/keyboards/georgi/info.json @@ -0,0 +1,133 @@ +{ + "keyboard_name": "Georgi", + "url": "http://gboards.ca", + "maintainer": "germ", + "width": 13.2, + "height": 3.68, + "layouts": { + "LAYOUT_georgi": { + "layout": [ + { + "x": 0.05, + "y": 0.54 + }, + { + "x": 1.06, + "y": 0.55 + }, + { + "x": 2.06, + "y": 0.29 + }, + { + "x": 3.05, + "y": 0.16 + }, + { + "x": 4.06, + "y": 0.41 + }, + { + "x": 5.06, + "y": 0.54 + }, + { + "x": 7.1899999999999995, + "y": 0.41 + }, + { + "x": 8.2, + "y": 0.3 + }, + { + "x": 9.2, + "y": 0.05 + }, + { + "x": 10.2, + "y": 0.29 + }, + { + "x": 11.2, + "y": 0.43 + }, + { + "x": 12.2, + "y": 0.42 + }, + { + "x": 0.05, + "y": 1.54 + }, + { + "x": 1.06, + "y": 1.54 + }, + { + "x": 2.06, + "y": 1.28 + }, + { + "x": 3.05, + "y": 1.16 + }, + { + "x": 4.06, + "y": 1.4 + }, + { + "x": 5.06, + "y": 1.54 + }, + { + "x": 7.1899999999999995, + "y": 1.4 + }, + { + "x": 8.2, + "y": 1.28 + }, + { + "x": 9.2, + "y": 1.04 + }, + { + "x": 10.2, + "y": 1.28 + }, + { + "x": 11.2, + "y": 1.42 + }, + { + "x": 12.2, + "y": 1.42 + }, + { + "x": 3.05, + "y": 2.67 + }, + { + "x": 4.06, + "y": 2.68 + }, + { + "x": 5.06, + "y": 2.68 + }, + { + "x": 7.19, + "y": 2.67 + }, + { + "x": 8.2, + "y": 2.67 + }, + { + "x": 9.2, + "y": 2.66 + } + ] + } + } +} diff --git a/keyboards/georgi/keymaps/colemak-dh/keymap.c b/keyboards/georgi/keymaps/colemak-dh/keymap.c new file mode 100644 index 000000000000..29b35f6abd9e --- /dev/null +++ b/keyboards/georgi/keymaps/colemak-dh/keymap.c @@ -0,0 +1,306 @@ +/* + * Good on you for modifying your layout, this is the most nonQMK layout you will come across + * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer + * + * Don't modify the steno layer directly, instead add chords using the keycodes and macros + * from sten.h to the layout you want to modify. + * + * Observe the comment above processQWERTY! + * + * http://docs.gboards.ca + */ + +#include QMK_KEYBOARD_H +#include "sten.h" +#include "keymap_steno.h" +#define IGNORE_MOD_TAP_INTERRUPT + +// Steno Layers +#define FUNCT ( LSD | LK | LP | LH ) +#define MEDIA ( LSD | LK | LW | LR ) +#define MOVE ( LSD | LK ) +#define NUM ( PWR ) +#define SYM ( RZ ) + +// Keys and chords that, once they appear, are added to every subsequent partial chord +// until the whole thing is sent. +uint32_t stenoLayers[] = {NUM, SYM, MOVE, MEDIA, FUNCT}; + +// QMK Layers +#define STENO_LAYER 0 +#define GAMING 1 +#define GAMING_2 2 + +/* Keyboard Layout + * ,---------------------------------. ,------------------------------. + * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD | + * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----| + * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | RB | RG | RS | RZ | + * `---------------------------------' `------------------------------' + * ,---------------, .---------------. + * | LNO | LA | LO | | RE | RU | RNO | + * `---------------' `---------------' + */ + +// Note: You can only use basic keycodes here! +// +// P() is just a wrapper to make your life easier. +// PC() applies the mapping to all of the StenoLayers. For overloading, define these last. +// +// FN is unavailable. That is reserved for system use. +// Chords containing PWR are always available, even in steno mode. +// +// http://docs.gboards.ca +uint32_t processQwerty(bool lookup) { + // Special keys + P( RT | RS | RD | RZ | LNO, SEND_STRING(VERSION); SEND_STRING(__DATE__)); + P( LFT | LK | LP | LW, REPEAT()); + + // Mouse Keys + /* P( LO | LSD | LK, CLICK_MOUSE(KC_MS_BTN2)); */ + /* P( LO | LR | LW, CLICK_MOUSE(KC_MS_BTN1)); */ + + +/* Function layer + * ,-----------------------------------, ,-----------------------------------, + * | | | | NCTFUNCTF | | | | F1 | F2 | F3 | F4 | | + * | + + + + + | | + F5 + F6 + F7 + F8 + | + * | | FUNCTFUNC | | | | | | F9 | F10 | F11 | F12 | | + * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' +*/ + P( FUNCT | RF, SEND(KC_F1)); + P( FUNCT | RP, SEND(KC_F2)); + P( FUNCT | RL, SEND(KC_F3)); + P( FUNCT | RT, SEND(KC_F4)); + + P( FUNCT | RF | RR, SEND(KC_F5)); + P( FUNCT | RP | RB, SEND(KC_F6)); + P( FUNCT | RL | RG, SEND(KC_F7)); + P( FUNCT | RT | RS, SEND(KC_F8)); + + P( FUNCT | RR, SEND(KC_F9)); + P( FUNCT | RG, SEND(KC_F10)); + P( FUNCT | RB, SEND(KC_F11)); + P( FUNCT | RS, SEND(KC_F12)); + + +/* Movement layer + * ,-----------------------------------, ,-----------------------------------, + * | | | | | | | | | <- | ↓ | ↑ | -> | | + * | + + + + + | | + + + + + | + * | | MOVEMOVEM | | | | | | Hm | PgD | PgU | End | | + * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' +*/ + P( MOVE | RF, SEND(KC_LEFT)); + P( MOVE | RP, SEND(KC_DOWN)); + P( MOVE | RL, SEND(KC_UP)); + P( MOVE | RT, SEND(KC_RIGHT)); + + P( MOVE | RR, SEND(KC_HOME)); + P( MOVE | RB, SEND(KC_PGDN)); + P( MOVE | RG, SEND(KC_PGUP)); + P( MOVE | RS, SEND(KC_END)); + + +/* Media Layer + * ,-----------------------------------, ,-----------------------------------, + * | | | | | | | | |Prev |Play | PLY |Next | VolU| + * | + + + + + | | + + + + + | + * | | MEDIAMEDIAMEDIAMEDIAM | | | | | | |Mute | VolD| + * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' +*/ + P( MEDIA | RF, SEND(KC_MPRV)); + P( MEDIA | RP, SEND(KC_MPLY)); + P( MEDIA | RL, SEND(KC_MPLY)); + P( MEDIA | RT, SEND(KC_MNXT)); + P( MEDIA | RD, SEND(KC_VOLU)); + + P( MEDIA | RS, SEND(KC_MUTE)); + P( MEDIA | RZ, SEND(KC_VOLD)); + + +/* Numbers + * ,-----------------------------------, ,-----------------------------------, + * | | | a | b | c | | | : | 1 | 2 | 3 | . | | + * | + + d + e + f + | | 0 + 4 + 5 + 6 + - + | + * | NUM | | | | | | | | 7 | 8 | 9 | 0 | | + * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' +*/ + P( NUM | LFT, SEND(KC_A)); + P( NUM | LP, SEND(KC_B)); + P( NUM | LH, SEND(KC_C)); + P( NUM | LK, SEND(KC_D)); + P( NUM | LW, SEND(KC_E)); + P( NUM | LR, SEND(KC_F)); + + // Right hand + P( NUM | ST3, SEND_STRING(":")); + P( NUM | RF, SEND(KC_1)); + P( NUM | RP, SEND(KC_2)); + P( NUM | RL, SEND(KC_3)); + P( NUM | RT, SEND(KC_DOT)); + + P( NUM | ST3 | ST4, SEND(KC_0)); + P( NUM | RF | RR, SEND(KC_4)); + P( NUM | RP | RB, SEND(KC_5)); + P( NUM | RG | RL, SEND(KC_6)); + P( NUM | RT | RS, SEND(KC_MINUS)); + + P( NUM | RR, SEND(KC_7)); + P( NUM | RB, SEND(KC_8)); + P( NUM | RG, SEND(KC_9)); + P( NUM | RS, SEND(KC_0)); + + +/* Symbols + * ,-----------------------------------, ,-----------------------------------, + * | | ` | [ | { | ( | < | | > | ) | } | ] | ? | | + * | + ~ + - + ' + : + _ | | \ + = + " + + + ? + | + * | | ! | @ | # | $ | % | | | | ^ | & | * | ? | SYM | + * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' +*/ + // Left hand + P( SYM | LSU, SEND(KC_GRV)); + P( SYM | LFT, SEND(KC_LBRC)); + P( SYM | LP, SEND_STRING("{")); + P( SYM | LH, SEND_STRING("(")); + P( SYM | ST1, SEND_STRING("<")); + + P( SYM | LSU | LSD, SEND_STRING("~")); + P( SYM | LFT | LK, SEND(KC_MINS)); + P( SYM | LP | LW, SEND(KC_QUOTE)); + P( SYM | LH | LR, SEND_STRING(":")); + P( SYM | ST1 | ST2, SEND_STRING("_")); + + P( SYM | LSD, SEND_STRING("!")); + P( SYM | LK, SEND_STRING("@")); + P( SYM | LW, SEND_STRING("#")); + P( SYM | LR, SEND_STRING("$")); + P( SYM | ST2, SEND_STRING("%")); + + // Right hand + P( SYM | ST3, SEND_STRING(">")); + P( SYM | RF, SEND_STRING(")")); + P( SYM | RP, SEND_STRING("}")); + P( SYM | RL, SEND_STRING("]")); + P( SYM | RT, SEND_STRING("?")); + + P( SYM | ST3 | ST4, SEND(KC_BSLASH)); + P( SYM | RF | RR, SEND(KC_EQUAL)); + P( SYM | RP | RB, SEND_STRING("\"")); + P( SYM | RG | RL, SEND_STRING("+")); + P( SYM | RT | RS, SEND_STRING("?")); + + P( SYM | ST4, SEND_STRING("|")); + P( SYM | RR, SEND_STRING("^")); + P( SYM | RB, SEND_STRING("&")); + P( SYM | RG, SEND_STRING("*")); + P( SYM | RS, SEND_STRING("?")); + + +/* Letters + * ,-----------------------------------, ,-----------------------------------, + * | | Q | W | F | P | B | | J | L | U | Y | ; | ctl | + * +-----+- A -+- R -+- S -+- T -+- G -| |- M -+- N -+- E -+- I -+- O -+-----| + * | bsp | Z | X | C | D | V | | K | H | , | . | / | del | + * `-----+-----+-----+-----+-----+-----' `-----+-----+-----+-----+-----+-----' + * ,---------------, .---------------. + * | alt | ent|shfr| | spc| gui| alt | + * `---------------' `---------------' +*/ + // Left hand + P( LSU, SEND(KC_Q)); + P( LFT, SEND(KC_W)); + P( LP, SEND(KC_F)); + P( LH, SEND(KC_P)); + P( ST1, SEND(KC_B)); + + P( LSU | LSD, SEND(KC_A)); + P( LFT | LK, SEND(KC_R)); + P( LP | LW, SEND(KC_S)); + P( LH | LR, SEND(KC_T)); + P( ST1 | ST2, SEND(KC_G)); + + P( LSD, SEND(KC_Z)); + P( LK, SEND(KC_X)); + P( LW, SEND(KC_C)); + P( LR, SEND(KC_D)); + P( ST2, SEND(KC_V)); + + // Right hand + P( ST3, SEND(KC_J)); + P( RF, SEND(KC_L)); + P( RP, SEND(KC_U)); + P( RL, SEND(KC_Y)); + P( RT, SEND(KC_SCLN)); + + P( ST3 | ST4, SEND(KC_M)); + P( RF | RR, SEND(KC_N)); + P( RP | RB, SEND(KC_E)); + P( RG | RL, SEND(KC_I)); + P( RT | RS, SEND(KC_O)); + + P( ST4, SEND(KC_K)); + P( RR, SEND(KC_H)); + P( RB, SEND(KC_COMM)); + P( RG, SEND(KC_DOT)); + P( RS, SEND(KC_SLSH)); + + // Thumb Chords and modifiers + // + PC( LNO | RNO | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT)); + PC( LNO | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT)); + + // overrides + P( PWR | LO, SEND(KC_LSFT); SEND(KC_BSPC)); + P( PWR | RD, SEND(KC_LCTL); SEND(KC_BSPC)); + P( RZ | RD, SEND(KC_LCTL); SEND(KC_DEL)); + + PC( LNO | LA | LO, SEND(KC_LSFT); SEND(KC_ESC)); + PC( LA | LO, SEND(KC_ESC)); + PC( LNO, SEND(KC_LALT)); + PC( LA, SEND(KC_ENT)); + PC( LO, SEND(KC_LSFT)); + + PC( RNO, SEND(KC_RALT)); + PC( RE | RU, SEND(KC_TAB)); + PC( RE, SEND(KC_SPC)); + PC( RU, SEND(KC_LGUI)); + + PC( PWR, SEND(KC_BSPC)); + PC( RD, SEND(KC_LCTL)); + P( RZ, SEND(KC_DEL)); + + return 0; +} + +// "Layers" +// Steno layer should be first in your map. +// When PWR | FN | ST3 | ST4 is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end. +// If you need more space for chords, remove the two gaming layers. +// Note: If using NO_ACTION_TAPPING, LT will not work! + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Main layer, everything goes through here + [STENO_LAYER] = LAYOUT_georgi( + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N7 + ), + // Gaming layer with Numpad, Very limited + [GAMING] = LAYOUT_georgi( + KC_LSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DQUO, + KC_LALT, KC_SPC, LT(GAMING_2, KC_ENT), KC_DEL, KC_ASTR, TO(STENO_LAYER) + ), + + [GAMING_2] = LAYOUT_georgi( + KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, + KC_LALT, KC_SPC, KC_ENT, KC_DEL, KC_ASTR, TO(STENO_LAYER) + ) +}; + +// Don't fuck with this, thanks. +size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); +size_t stenoLayerCount = sizeof(stenoLayers)/sizeof(stenoLayers[0]); diff --git a/keyboards/georgi/keymaps/colemak-dh/readme.md b/keyboards/georgi/keymaps/colemak-dh/readme.md new file mode 100644 index 000000000000..f9da34b02454 --- /dev/null +++ b/keyboards/georgi/keymaps/colemak-dh/readme.md @@ -0,0 +1,11 @@ +# Georgi QWERTY/Steno firmware + +This is the default keymap for Georgi, it's based heavily off of the naps62 ErgoDox and the Gergo layout. +It is both a ergonomic and programmer friendly keymap. + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! + +## Space issues +If you find yourself running out of space for dictionary entries, disabling mousekeys in rules.mk will save +you about 4k for entries! +Get a free 1k by deleting the Gaming layers from the keymap! diff --git a/keyboards/georgi/keymaps/colemak-dh/rules.mk b/keyboards/georgi/keymaps/colemak-dh/rules.mk new file mode 100644 index 000000000000..07394aef485c --- /dev/null +++ b/keyboards/georgi/keymaps/colemak-dh/rules.mk @@ -0,0 +1,45 @@ +#---------------------------------------------------------------------------- +# make georgi:claymager:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- + +NO_REPEAT = yes +VERBOSE = yes +KEYBOARD_SHARED_EP = yes +CUSTOM_MATRIX = yes +STENO_LAYERS = yes + +#Firmware reduction options +MOUSEKEY_ENABLE = yes # 1500 bytes +NO_TAPPING = no # 2000 bytes +NO_PRINT = yes + +#Debug options +CONSOLE_ENABLE = no +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_MATRIX = no +ONLY_QWERTY = no + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +SRC += matrix.c i2c_master.c +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif +ifeq ($(strip $(NO_REPEAT)), yes) + OPT_DEFS += -DNO_REPEAT +endif +ifeq ($(strip $(NO_PRINT)), yes) + OPT_DEFS += -DNO_PRINT -DNO_DEBUG +endif +ifeq ($(strip $(ONLY_QWERTY)), yes) + OPT_DEFS += -DONLYQWERTY +endif +ifeq ($(strip $(NO_TAPPING)), yes) + OPT_DEFS += -DNO_ACTION_TAPPING +endif +ifeq ($(strip $(STENO_LAYERS)), yes) + OPT_DEFS += -DSTENOLAYERS +endif diff --git a/keyboards/georgi/keymaps/default/keymap.c b/keyboards/georgi/keymaps/default/keymap.c new file mode 100644 index 000000000000..404aac8fc18a --- /dev/null +++ b/keyboards/georgi/keymaps/default/keymap.c @@ -0,0 +1,248 @@ +/* + * Good on you for modifying your layout, this is the most nonQMK layout you will come across + * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer + * + * Don't modify the steno layer directly, instead add chords using the keycodes and macros + * from sten.h to the layout you want to modify. + * + * Observe the comment above processQWERTY! + * + * http://docs.gboards.ca + */ + +#include QMK_KEYBOARD_H +#include "sten.h" +#include "keymap_steno.h" +#define IGNORE_MOD_TAP_INTERRUPT + +// Proper Layers +#define FUNCT (LSD | LK | LP | LH) +#define MEDIA (LSD | LK | LW | LR) +#define MOVE (ST1 | ST2) + +// QMK Layers +#define STENO_LAYER 0 +#define GAMING 1 +#define GAMING_2 2 + +/* Keyboard Layout + * ,---------------------------------. ,------------------------------. + * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD | + * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----| + * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | BB | RG | RS | RZ | + * `---------------------------------' `------------------------------' + * ,---------------, .---------------. + * | LNO | LA | LO | | RE | RU | RNO | + * `---------------' `---------------' + */ + +// Note: You can only use basic keycodes here! +// P() is just a wrapper to make your life easier. +// PC() applies the mapping to all of the StenoLayers. +// To overload, declare it with P() first. +// Be sure to enable in rules.mk and see colemak-dh for usage +// +// FN is unavailable. That is reserved for system use. +// Chords containing PWR are always available, even in steno mode. +// +// http://docs.gboards.ca +uint32_t processQwerty(bool lookup) { + // Specials + P( RT | RS | RD | RZ | LNO, SEND_STRING(VERSION); SEND_STRING(__DATE__)); + P( LNO | RNO | LA | LO | RE | RU, SEND(KC_MPLY)); + P( LFT | LK | LP | LW, REPEAT()); + P( ST1 | ST2 | LW | ST4, SEND(KC_BSPC)); + + // Mouse Keys + P( LO | LSD | LK, CLICK_MOUSE(KC_MS_BTN2)); + P( LO | LR | LW, CLICK_MOUSE(KC_MS_BTN1)); + + // Thumb Chords + P( LA | LO | RE | RU, SEND(KC_CAPS)); + P( LA | RU, SEND(KC_ESC)); + P( LO | RE, SEND(KC_LCTL)); + P( LNO | RNO | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT)); + P( LNO | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT)); + + // Mods + P( RT | RD | RS | RZ, SEND(KC_LGUI)); + P( RT | RD, SEND(KC_LCTL)); + P( RS | RZ, SEND(KC_LALT)); + P( LA | LNO, SEND(KC_LCTL)); + P( LA | LO, SEND(KC_LALT)); + P( LO, SEND(KC_LSFT)); + + // Function Layer + P( FUNCT | RF | RR, SEND(KC_F5)); + P( FUNCT | RP | RB, SEND(KC_F6)); + P( FUNCT | RL | RG, SEND(KC_F7)); + P( FUNCT | RT | RS, SEND(KC_F8)); + P( FUNCT | RF, SEND(KC_F1)); + P( FUNCT | RP, SEND(KC_F2)); + P( FUNCT | RL, SEND(KC_F3)); + P( FUNCT | RT, SEND(KC_F4)); + P( FUNCT | RR, SEND(KC_F9)); + P( FUNCT | RG, SEND(KC_F10)); + P( FUNCT | RB, SEND(KC_F11)); + P( FUNCT | RS, SEND(KC_F12)); + + // Movement Layer + P( MOVE | RF, SEND(KC_LEFT)); + P( MOVE | RP, SEND(KC_DOWN)); + P( MOVE | RL, SEND(KC_UP)); + P( MOVE | RT, SEND(KC_RIGHT)); + P( MOVE | ST3, SEND(KC_PGUP)); + P( MOVE | ST4, SEND(KC_PGDN)); + + // Media Layer + P( MEDIA | RF, SEND(KC_MPRV)); + P( MEDIA | RP, SEND(KC_MPLY)); + P( MEDIA | RL, SEND(KC_MPLY)); + P( MEDIA | RT, SEND(KC_MNXT)); + P( MEDIA | RD, SEND(KC_VOLU)); + P( MEDIA | RZ, SEND(KC_VOLD)); + P( MEDIA | RS, SEND(KC_MUTE)); + + // Number Row, Left + P( LNO | LSU, SEND(KC_1)); + P( LNO | LFT, SEND(KC_2)); + P( LNO | LP, SEND(KC_3)); + P( LNO | LH, SEND(KC_4)); + P( LNO | ST1, SEND(KC_5)); + P( LNO | ST3, SEND(KC_6)); + P( LNO | RF, SEND(KC_7)); + P( LNO | RP, SEND(KC_8)); + P( LNO | RL, SEND(KC_9)); + P( LNO | RT, SEND(KC_0)); + + // Number Row, Right + P( RNO | LSU, SEND(KC_1)); + P( RNO | LFT, SEND(KC_2)); + P( RNO | LP, SEND(KC_3)); + P( RNO | LH, SEND(KC_4)); + P( RNO | ST1, SEND(KC_5)); + P( RNO | ST3, SEND(KC_6)); + P( RNO | RF, SEND(KC_7)); + P( RNO | RP, SEND(KC_8)); + P( RNO | RL, SEND(KC_9)); + P( RNO | RT, SEND(KC_0)); + P( RNO | LA, SEND(KC_5)); + + // Specials + P( RU | RNO, SEND(KC_TAB)); + P( RE | RU, SEND(KC_BSPC)); + P( RD | RZ, SEND(KC_ENT)); + P( RE, SEND(KC_ENT)); + P( RD, SEND(KC_BSPC)); + P( LNO, SEND(KC_BSPC)); + P( RNO, SEND(KC_BSPC)); + P( LA, SEND(KC_SPC)); + P( RU, SEND(KC_SPC)); + P( RZ, SEND(KC_ESC)); + + // Symbols and Numbers + P( PWR | RE | RU, SEND(KC_ENT)); + P( PWR | LA | LO, SEND(KC_SPC)); + P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // ( + P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // ) + P( PWR | ST1 | ST2, SEND(KC_GRV)); // ` + P( PWR | RD | RZ, SEND(KC_ESC)); + P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // # + P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $ + P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // ! + P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // % + P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @ + P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^ + P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // { + P( PWR | LW, SEND(KC_LBRC)); + P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // } + P( PWR | LR, SEND(KC_RBRC)); + P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // | + P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~ + P( PWR | ST3, SEND(KC_QUOT)); + P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // " + P( PWR | RF, SEND(KC_KP_PLUS)); + P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // & + P( PWR | RP, SEND(KC_MINS)); + P( PWR | RB, SEND(KC_EQL)); + P( PWR | RL, SEND(KC_SLSH)); + P( PWR | RG, SEND(KC_COMM)); + P( PWR | RT, SEND(KC_PAST)); + P( PWR | RS, SEND(KC_DOT)); + P( PWR | RD, SEND(KC_TAB)); + P( PWR | LA, SEND(KC_LSFT)); + P( PWR | LO, SEND(KC_SLSH)); + P( PWR | RE, SEND(KC_SCLN)); + P( PWR | RU, SEND(KC_BSLS)); + P( PWR | LNO, SEND(KC_BSLS)); + P( PWR | RF | RR, SEND(KC_LEFT)); + P( PWR | RP | RB, SEND(KC_DOWN)); + P( PWR | RL | RG, SEND(KC_UP)); + P( PWR | RT | RS, SEND(KC_RIGHT)); + + // Letters + P( LSU | LSD, SEND(KC_A)); + P( LFT | LK, SEND(KC_S)); + P( LP | LW, SEND(KC_D)); + P( LH | LR, SEND(KC_F)); + P( ST1 | ST2, SEND(KC_G)); + P( ST3 | ST4, SEND(KC_H)); + P( RF | RR, SEND(KC_J)); + P( RT | RS, SEND(KC_SCLN)); + P( RG | RL, SEND(KC_L)); + P( RP | RB, SEND(KC_K)); + P( LSU, SEND(KC_Q)); + P( LSD, SEND(KC_Z)); + P( LFT, SEND(KC_W)); + P( LK, SEND(KC_X)); + P( LP, SEND(KC_E)); + P( LW, SEND(KC_C)); + P( LH, SEND(KC_R)); + P( LR, SEND(KC_V)); + P( ST1, SEND(KC_T)); + P( ST2, SEND(KC_B)); + P( ST3, SEND(KC_Y)); + P( ST4, SEND(KC_N)); + P( RF, SEND(KC_U)); + P( RR, SEND(KC_M)); + P( RP, SEND(KC_I)); + P( RB, SEND(KC_COMM)); + P( RL, SEND(KC_O)); + P( RG, SEND(KC_DOT)); + P( RT, SEND(KC_P)); + P( RS, SEND(KC_SLSH)); + P( RNO, SEND(KC_BSPC)); + P( LNO, SEND(KC_BSPC)); + + return 0; +} + +// "Layers" +// Steno layer should be first in your map. +// When PWR | FN | ST3 | ST4 is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end. +// If you need more space for chords, remove the two gaming layers. +// Note: If using NO_ACTION_TAPPING, LT will not work! + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Main layer, everything goes through here + [STENO_LAYER] = LAYOUT_georgi( + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N7 + ), + // Gaming layer with Numpad, Very limited + [GAMING] = LAYOUT_georgi( + KC_LSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DQUO, + KC_LALT, KC_SPC, LT(GAMING_2, KC_ENT), KC_DEL, KC_ASTR, TO(STENO_LAYER) + ), + + [GAMING_2] = LAYOUT_georgi( + KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, + KC_LALT, KC_SPC, KC_ENT, KC_DEL, KC_ASTR, TO(STENO_LAYER) + ) +}; + +// Don't fuck with this, thanks. +size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); diff --git a/keyboards/georgi/keymaps/default/readme.md b/keyboards/georgi/keymaps/default/readme.md new file mode 100644 index 000000000000..f9da34b02454 --- /dev/null +++ b/keyboards/georgi/keymaps/default/readme.md @@ -0,0 +1,11 @@ +# Georgi QWERTY/Steno firmware + +This is the default keymap for Georgi, it's based heavily off of the naps62 ErgoDox and the Gergo layout. +It is both a ergonomic and programmer friendly keymap. + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! + +## Space issues +If you find yourself running out of space for dictionary entries, disabling mousekeys in rules.mk will save +you about 4k for entries! +Get a free 1k by deleting the Gaming layers from the keymap! diff --git a/keyboards/georgi/keymaps/default/rules.mk b/keyboards/georgi/keymaps/default/rules.mk new file mode 100644 index 000000000000..7bd3d7aa204f --- /dev/null +++ b/keyboards/georgi/keymaps/default/rules.mk @@ -0,0 +1,42 @@ +#---------------------------------------------------------------------------- +# make georgi:default:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- + +NO_REPEAT = no +VERBOSE = yes +KEYBOARD_SHARED_EP = yes +CUSTOM_MATRIX = yes +STENO_LAYERS = no + +#Firmware reduction options +MOUSEKEY_ENABLE = yes # 1500 bytes +NO_TAPPING = no # 2000 bytes +NO_PRINT = yes + +#Debug options +CONSOLE_ENABLE = no +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_MATRIX = no +ONLY_QWERTY = no + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +SRC += matrix.c i2c_master.c +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif +ifeq ($(strip $(NO_REPEAT)), yes) + OPT_DEFS += -DNO_REPEAT +endif +ifeq ($(strip $(NO_PRINT)), yes) + OPT_DEFS += -DNO_PRINT -DNO_DEBUG +endif +ifeq ($(strip $(ONLY_QWERTY)), yes) + OPT_DEFS += -DONLYQWERTY +endif +ifeq ($(strip $(NO_TAPPING)), yes) + OPT_DEFS += -DNO_ACTION_TAPPING +endif diff --git a/keyboards/georgi/keymaps/minimal/keymap.c b/keyboards/georgi/keymaps/minimal/keymap.c new file mode 100644 index 000000000000..1d9b57e9a54b --- /dev/null +++ b/keyboards/georgi/keymaps/minimal/keymap.c @@ -0,0 +1,223 @@ +/* + * Good on you for modifying your layout, this is the most nonQMK layout you will come across + * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer + * + * Don't modify the steno layer directly, instead add chords using the keycodes and macros + * from sten.h to the layout you want to modify. + * + * Observe the comment above processQWERTY! + * + * http://docs.gboards.ca + */ + +#include QMK_KEYBOARD_H +#include "sten.h" +#include "keymap_steno.h" +#define IGNORE_MOD_TAP_INTERRUPT + +// Proper Layers +#define FUNCT (LSD | LK | LP | LH) +#define MEDIA (LSD | LK | LW | LR) +#define MOVE (ST1 | ST2) + +// QMK Layers +#define STENO_LAYER 0 + +/* Keyboard Layout + * ,---------------------------------. ,------------------------------. + * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD | + * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----| + * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | BB | RG | RS | RZ | + * `---------------------------------' `------------------------------' + * ,---------------, .---------------. + * | LNO | LA | LO | | RE | RU | RNO | + * `---------------' `---------------' + */ + +// Note: You can only use basic keycodes here! +// P() is just a wrapper to make your life easier. +// +// http://docs.gboards.ca +uint32_t processQwerty(bool lookup) { + // Specials + P( RT | RS | RD | RZ | LNO, SEND_STRING(VERSION); SEND_STRING(__DATE__)); + P( LNO | RNO | LA | LO | RE | RU, SEND(KC_MPLY)); + P( LFT | LK | LP | LW, REPEAT()); + P( ST1 | ST2 | LW | ST4, SEND(KC_BSPC)); + + // Mouse Keys + P( LO | LSD | LK, CLICK_MOUSE(KC_MS_BTN2)); + P( LO | LR | LW, CLICK_MOUSE(KC_MS_BTN1)); + + // Thumb Chords + P( LA | LO | RE | RU, SEND(KC_CAPS)); + P( LA | RU, SEND(KC_ESC)); + P( LO | RE, SEND(KC_LCTL)); + P( LNO | RNO | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT)); + P( LNO | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT)); + + // Mods + P( RT | RD | RS | RZ, SEND(KC_LGUI)); + P( RT | RD, SEND(KC_LCTL)); + P( RS | RZ, SEND(KC_LALT)); + P( LA | LNO, SEND(KC_LCTL)); + P( LA | LO, SEND(KC_LALT)); + P( LO, SEND(KC_LSFT)); + + // Function Layer + P( FUNCT | RF | RR, SEND(KC_F5)); + P( FUNCT | RP | RB, SEND(KC_F6)); + P( FUNCT | RL | RG, SEND(KC_F7)); + P( FUNCT | RT | RS, SEND(KC_F8)); + P( FUNCT | RF, SEND(KC_F1)); + P( FUNCT | RP, SEND(KC_F2)); + P( FUNCT | RL, SEND(KC_F3)); + P( FUNCT | RT, SEND(KC_F4)); + P( FUNCT | RR, SEND(KC_F9)); + P( FUNCT | RG, SEND(KC_F10)); + P( FUNCT | RB, SEND(KC_F11)); + P( FUNCT | RS, SEND(KC_F12)); + + // Movement Layer + P( MOVE | RF, SEND(KC_LEFT)); + P( MOVE | RP, SEND(KC_DOWN)); + P( MOVE | RL, SEND(KC_UP)); + P( MOVE | RT, SEND(KC_RIGHT)); + P( MOVE | ST3, SEND(KC_PGUP)); + P( MOVE | ST4, SEND(KC_PGDN)); + + // Media Layer + P( MEDIA | RF, SEND(KC_MPRV)); + P( MEDIA | RP, SEND(KC_MPLY)); + P( MEDIA | RL, SEND(KC_MPLY)); + P( MEDIA | RT, SEND(KC_MNXT)); + P( MEDIA | RD, SEND(KC_VOLU)); + P( MEDIA | RZ, SEND(KC_VOLD)); + P( MEDIA | RS, SEND(KC_MUTE)); + + // Number Row, Left + P( LNO | LSU, SEND(KC_1)); + P( LNO | LFT, SEND(KC_2)); + P( LNO | LP, SEND(KC_3)); + P( LNO | LH, SEND(KC_4)); + P( LNO | ST1, SEND(KC_5)); + P( LNO | ST3, SEND(KC_6)); + P( LNO | RF, SEND(KC_7)); + P( LNO | RP, SEND(KC_8)); + P( LNO | RL, SEND(KC_9)); + P( LNO | RT, SEND(KC_0)); + + // Number Row, Right + P( RNO | LSU, SEND(KC_1)); + P( RNO | LFT, SEND(KC_2)); + P( RNO | LP, SEND(KC_3)); + P( RNO | LH, SEND(KC_4)); + P( RNO | ST1, SEND(KC_5)); + P( RNO | ST3, SEND(KC_6)); + P( RNO | RF, SEND(KC_7)); + P( RNO | RP, SEND(KC_8)); + P( RNO | RL, SEND(KC_9)); + P( RNO | RT, SEND(KC_0)); + P( RNO | LA, SEND(KC_5)); + + // Specials + P( RU | RNO, SEND(KC_TAB)); + P( RE | RU, SEND(KC_BSPC)); + P( RD | RZ, SEND(KC_ENT)); + P( RE, SEND(KC_ENT)); + P( RD, SEND(KC_BSPC)); + P( LNO, SEND(KC_BSPC)); + P( RNO, SEND(KC_BSPC)); + P( LA, SEND(KC_SPC)); + P( RU, SEND(KC_SPC)); + P( RZ, SEND(KC_ESC)); + + // Symbols and Numbers + P( PWR | RE | RU, SEND(KC_ENT)); + P( PWR | LA | LO, SEND(KC_SPC)); + P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // ( + P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // ) + P( PWR | ST1 | ST2, SEND(KC_GRV)); // ` + P( PWR | RD | RZ, SEND(KC_ESC)); + P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // # + P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $ + P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // ! + P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // % + P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @ + P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^ + P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // { + P( PWR | LW, SEND(KC_LBRC)); + P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // } + P( PWR | LR, SEND(KC_RBRC)); + P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // | + P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~ + P( PWR | ST3, SEND(KC_QUOT)); + P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // " + P( PWR | RF, SEND(KC_KP_PLUS)); + P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // & + P( PWR | RP, SEND(KC_MINS)); + P( PWR | RB, SEND(KC_EQL)); + P( PWR | RL, SEND(KC_SLSH)); + P( PWR | RG, SEND(KC_COMM)); + P( PWR | RT, SEND(KC_PAST)); + P( PWR | RS, SEND(KC_DOT)); + P( PWR | RD, SEND(KC_TAB)); + P( PWR | LA, SEND(KC_LSFT)); + P( PWR | LO, SEND(KC_SLSH)); + P( PWR | RE, SEND(KC_SCLN)); + P( PWR | RU, SEND(KC_BSLS)); + P( PWR | LNO, SEND(KC_BSLS)); + + // Letters + P( LSU | LSD, SEND(KC_A)); + P( LFT | LK, SEND(KC_S)); + P( LP | LW, SEND(KC_D)); + P( LH | LR, SEND(KC_F)); + P( ST1 | ST2, SEND(KC_G)); + P( ST3 | ST4, SEND(KC_H)); + P( RF | RR, SEND(KC_J)); + P( RT | RS, SEND(KC_SCLN)); + P( RG | RL, SEND(KC_L)); + P( RP | RB, SEND(KC_K)); + P( LSU, SEND(KC_Q)); + P( LSD, SEND(KC_Z)); + P( LFT, SEND(KC_W)); + P( LK, SEND(KC_X)); + P( LP, SEND(KC_E)); + P( LW, SEND(KC_C)); + P( LH, SEND(KC_R)); + P( LR, SEND(KC_V)); + P( ST1, SEND(KC_T)); + P( ST2, SEND(KC_B)); + P( ST3, SEND(KC_Y)); + P( ST4, SEND(KC_N)); + P( RF, SEND(KC_U)); + P( RR, SEND(KC_M)); + P( RP, SEND(KC_I)); + P( RB, SEND(KC_COMM)); + P( RL, SEND(KC_O)); + P( RG, SEND(KC_DOT)); + P( RT, SEND(KC_P)); + P( RS, SEND(KC_SLSH)); + P( RNO, SEND(KC_BSPC)); + P( LNO, SEND(KC_BSPC)); + + return 0; +} + +// "Layers" +// Steno layer should be first in your map. +// When PWR | FN | ST3 | ST4 is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end. +// If you need more space for chords, remove the two gaming layers. +// Note: If using NO_ACTION_TAPPING, LT will not work! + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Main layer, everything goes through here + [STENO_LAYER] = LAYOUT_georgi( + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N7 + ) +}; +// Don't fuck with this, thanks. +size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); diff --git a/keyboards/georgi/keymaps/minimal/readme.md b/keyboards/georgi/keymaps/minimal/readme.md new file mode 100644 index 000000000000..f9da34b02454 --- /dev/null +++ b/keyboards/georgi/keymaps/minimal/readme.md @@ -0,0 +1,11 @@ +# Georgi QWERTY/Steno firmware + +This is the default keymap for Georgi, it's based heavily off of the naps62 ErgoDox and the Gergo layout. +It is both a ergonomic and programmer friendly keymap. + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! + +## Space issues +If you find yourself running out of space for dictionary entries, disabling mousekeys in rules.mk will save +you about 4k for entries! +Get a free 1k by deleting the Gaming layers from the keymap! diff --git a/keyboards/georgi/keymaps/minimal/rules.mk b/keyboards/georgi/keymaps/minimal/rules.mk new file mode 100644 index 000000000000..cdbbbc280ec4 --- /dev/null +++ b/keyboards/georgi/keymaps/minimal/rules.mk @@ -0,0 +1,41 @@ +#---------------------------------------------------------------------------- +# make georgi:default:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- + +NO_REPEAT = no +VERBOSE = yes +KEYBOARD_SHARED_EP = yes +CUSTOM_MATRIX = yes + +#Firmware reduction options +MOUSEKEY_ENABLE = no # 1500 bytes +NO_TAPPING = yes # 2000 bytes +NO_PRINT = yes + +#Debug options +CONSOLE_ENABLE = no +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_MATRIX = no +ONLY_QWERTY = no + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +SRC += matrix.c i2c_master.c +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif +ifeq ($(strip $(NO_REPEAT)), yes) + OPT_DEFS += -DNO_REPEAT +endif +ifeq ($(strip $(NO_PRINT)), yes) + OPT_DEFS += -DNO_PRINT -DNO_DEBUG +endif +ifeq ($(strip $(ONLY_QWERTY)), yes) + OPT_DEFS += -DONLYQWERTY +endif +ifeq ($(strip $(NO_TAPPING)), yes) + OPT_DEFS += -DNO_ACTION_TAPPING +endif diff --git a/keyboards/georgi/keymaps/norman/keymap.c b/keyboards/georgi/keymaps/norman/keymap.c new file mode 100644 index 000000000000..58c42c852951 --- /dev/null +++ b/keyboards/georgi/keymaps/norman/keymap.c @@ -0,0 +1,267 @@ +/* + * Good on you for modifying your layout, this is the most nonQMK layout you will come across + * There are three modes, Steno (the default), QWERTY (Toggleable) and a Momentary symbol layer + * + * Don't modify the steno layer directly, instead add chords using the keycodes and macros + * from sten.h to the layout you want to modify. + * + * Observe the comment above processQWERTY! + * + * http://docs.gboards.ca + */ + +#include QMK_KEYBOARD_H +#include "sten.h" +#include "keymap_steno.h" +#define IGNORE_MOD_TAP_INTERRUPT + +// Proper Layers +#define FUNCT (LSD | LK | LP | LH) +#define MEDIA (LSD | LK | LW | LR) +#define MOVE (LH | ST2) + +/* Keyboard Layout + * ,---------------------------------. ,------------------------------. + * | FN | LSU | LFT | LP | LH | ST1 | | ST3 | RF | RP | RL | RT | RD | + * |-----+-----+-----+----+----|-----| |-----|----+----+----+----+----| + * | PWR | LSD | LK | LW | LR | ST2 | | ST4 | RR | RB | RG | RS | RZ | + * `---------------------------------' `------------------------------' + * ,---------------, .---------------. + * | LNO | LA | LO | | RE | RU | RNO | + * `---------------' `---------------' + */ + +// YOU MUST ORDER THIS! +// Order your chords from longest to shortest! +// You can only use basic keycodes here! +// +// P() is just a wrapper to make your life easier. +// +// http://docs.gboards.ca +uint32_t processQwerty(bool lookup) { + // Specials + P( RT | RS | RD | RZ | LNO, SEND_STRING(VERSION); SEND_STRING(__DATE__)); + P( LNO | LA | LO | RE | RU, SEND(KC_MPLY)); + P( ST1 | ST2 | ST3 | ST4, SEND(KC_BSPC)); + + // Thumb Chords + P( LA | LO | RE | RU, SEND(KC_CAPS)); + P( LA | RU, SEND(KC_ESC)); + P( LO | RE, SEND(KC_LCTL)); + P( LNO | LA | RU, SEND(KC_LCTL); SEND(KC_LSFT)); + P( LNO | LA | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_LALT)); + + // Mods + P( RT | RD | RS | RZ, SEND(KC_LGUI)); + P( RT | RD, SEND(KC_LCTL)); + P( RS | RZ, SEND(KC_LALT)); + P( LA | LNO, SEND(KC_LCTL)); + P( LA | LO, SEND(KC_LALT)); + P( LO, SEND(KC_LSFT)); + + // Function Layer + P( FUNCT | RF | RR, SEND(KC_F6)); + P( FUNCT | RP | RB, SEND(KC_F7)); + P( FUNCT | RL | RG, SEND(KC_F8)); + P( FUNCT | ST3 | ST4, SEND(KC_F5)); + P( FUNCT| ST3, SEND(KC_F1)); + P( FUNCT| ST4, SEND(KC_F9)); + P( FUNCT | RF, SEND(KC_F2)); + P( FUNCT | RP, SEND(KC_F3)); + P( FUNCT | RL, SEND(KC_F4)); + P( FUNCT | RR, SEND(KC_F10)); + P( FUNCT | RG, SEND(KC_F12)); + P( FUNCT | RB, SEND(KC_F11)); + P( FUNCT | RD, SEND(KC_RALT); SEND(KC_T); SEND(KC_H); SEND(KC_U); SEND(KC_P)); + P( FUNCT | RZ, SEND(KC_RALT); SEND(KC_T); SEND(KC_H); SEND(KC_D); SEND(KC_N)); + P( FUNCT | RT, SEND(KC_RALT); SEND(KC_S); SEND(KC_F)); + P( FUNCT | RS, SEND(KC_LALT); SEND(KC_SPC)); + P( FUNCT | RE, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_ESC)); + P( FUNCT | RU, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_0)); + + // Movement Layer + P( MOVE | RF, SEND(KC_LGUI); SEND(KC_LSFT); SEND(KC_LEFT)); + P( MOVE | RP, SEND(KC_UP)); + P( MOVE | RL, SEND(KC_LGUI); SEND(KC_LSFT); SEND(KC_RGHT)); + P( MOVE | RT, SEND(KC_LALT); SEND(KC_LCTL); SEND(KC_LGUI); SEND(KC_C)); + P( MOVE | ST3, SEND(KC_PGUP)); + P( MOVE | ST4, SEND(KC_PGDN)); + P( MOVE | RD, SEND(KC_HOME)); + P( MOVE | RZ, SEND(KC_END)); + P( MOVE | RG, SEND(KC_RIGHT)); + P( MOVE | RB, SEND(KC_DOWN)); + P( MOVE | RR, SEND(KC_LEFT)); + P( MOVE | RS, SEND(KC_LSFT); SEND(KC_LCTL); SEND(KC_LGUI); SEND(KC_T)); + P( MOVE | RE, SEND(KC_LSFT); SEND(KC_LALT); SEND(KC_LGUI); SEND(KC_S)); + P( MOVE | RU, SEND(KC_LSFT); SEND(KC_LCTL); SEND(KC_1)); + + + // Media Layer + P( MEDIA | RF, SEND(KC_MEDIA_PREV_TRACK)); + P( MEDIA | RP, SEND(KC_MPLY)); + P( MEDIA | RL, SEND(KC_MPLY)); + P( MEDIA | RT, SEND(KC_MEDIA_NEXT_TRACK)); + P( MEDIA | RD, SEND(KC_VOLU)); + P( MEDIA | RZ, SEND(KC_VOLD)); + P( MEDIA | RS, SEND(KC_MUTE)); + P( MEDIA | ST3, SEND(KC_LALT); SEND(KC_LCTL); SEND(KC_LGUI); SEND(KC_4)); + P( MEDIA | ST4, SEND(KC_LALT); SEND(KC_LCTL); SEND(KC_LGUI); SEND(KC_2)); + P( MEDIA | RR, SEND(KC_LALT); SEND(KC_LCTL); SEND(KC_LGUI); SEND(KC_3)); + P( MEDIA | RB, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_GRV)); + P( MEDIA | RG, SEND(KC_LCTL); SEND(KC_LSFT); SEND(KC_8)); + P( MEDIA | RE, SEND(KC_RALT); SEND(KC_F); SEND(KC_I); SEND(KC_R); SEND(KC_E)); + P( MEDIA | RU, SEND(KC_RALT); SEND(KC_T); SEND(KC_A); SEND(KC_D)); + + // Mouse Keys and Printscreen + P( LFT | LH, CLICK_MOUSE(KC_MS_BTN1)); + P( LK | LR, CLICK_MOUSE(KC_MS_BTN2)); + P( RF | RT, SEND(KC_PSCR);); + + // Number Row Left + P( LNO | LSU, SEND(KC_1)); + P( LNO | LFT, SEND(KC_2)); + P( LNO | LP, SEND(KC_3)); + P( LNO | LH, SEND(KC_4)); + P( LNO | ST1, SEND(KC_5)); + P( LNO | ST3, SEND(KC_6)); + P( LNO | RF, SEND(KC_7)); + P( LNO | RP, SEND(KC_8)); + P( LNO | RL, SEND(KC_9)); + P( LNO | RT, SEND(KC_0)); + P( LNO | LA, SEND(KC_5)); + P( LNO | RT, SEND(KC_0)); + + // Number Row Right + P( RNO | LSU, SEND(KC_1)); + P( RNO | LFT, SEND(KC_2)); + P( RNO | LP, SEND(KC_3)); + P( RNO | LH, SEND(KC_4)); + P( RNO | ST1, SEND(KC_5)); + P( RNO | ST3, SEND(KC_6)); + P( RNO | RF, SEND(KC_7)); + P( RNO | RP, SEND(KC_8)); + P( RNO | RL, SEND(KC_9)); + P( RNO | RT, SEND(KC_0)); + P( RNO | LA, SEND(KC_5)); + P( RNO | RT, SEND(KC_0)); + + // Specials + P( LA | LNO, SEND(KC_ESC)); + P( RU | RNO, SEND(KC_TAB)); + P( RE | RU, SEND(KC_LSFT); SEND(KC_SLSH)); + P( RD | RZ, SEND(KC_ENT)); + P( RE, SEND(KC_ENT)); + //P( RD, SEND(KC_BSPC)); + P( LNO, SEND(KC_BSPC)); + P( RD, SEND(KC_DEL)); + P( LA, SEND(KC_SPC)); + P( RU, SEND(KC_SPC)); + P( RZ, SEND(KC_ESC)); + //P( RNO, REPEAT()); + + // Letters + P( LSU | LSD, SEND(KC_A)); + P( LFT | LK, SEND(KC_S)); + P( LP | LW, SEND(KC_E)); + P( LH | LR, SEND(KC_T)); + P( ST1 | ST2, SEND(KC_G)); + P( ST3 | ST4, SEND(KC_Y)); + P( RF | RR, SEND(KC_N)); + P( RT | RS, SEND(KC_H)) + P( RG | RL, SEND(KC_O)); + P( RP | RB, SEND(KC_I)); + P( LSU, SEND(KC_Q)); + P( LSD, SEND(KC_Z)); + P( LFT, SEND(KC_W)); + P( LK, SEND(KC_X)); + P( LP, SEND(KC_D)); + P( LW, SEND(KC_C)); + P( LH, SEND(KC_F)); + P( LR, SEND(KC_V)); + P( ST1, SEND(KC_K)); + P( ST2, SEND(KC_B)); + P( ST3, SEND(KC_J)); + P( ST4, SEND(KC_P)); + P( RF, SEND(KC_U)); + P( RR, SEND(KC_M)); + P( RP, SEND(KC_R)); + P( RB, SEND(KC_COMM)); + P( RL, SEND(KC_L)); + P( RG, SEND(KC_DOT)); + P( RT, SEND(KC_SCLN)); + P( RS, SEND(KC_SLSH)); + + // Symbols and Numbers + P( PWR | RE | RU, SEND(KC_ENT)); + P( PWR | LA | LO, SEND(KC_SPC)); + P( PWR | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // ( + P( PWR | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // ) + P( PWR | ST1 | ST2, SEND(KC_GRV)); // ` + P( PWR | RD | RZ, SEND(KC_ESC)); + P( PWR | LSU | LSD, SEND(KC_LSFT); SEND(KC_3)); // # + P( PWR | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $ + P( PWR | LSU, SEND(KC_LSFT); SEND(KC_1)); // ! + P( PWR | LSD, SEND(KC_LSFT); SEND(KC_5)); // % + P( PWR | LFT, SEND(KC_LSFT); SEND(KC_2)); // @ + P( PWR | LK, SEND(KC_LSFT); SEND(KC_6)); // ^ + P( PWR | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // { + P( PWR | LW, SEND(KC_LBRC)); + P( PWR | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // } + P( PWR | LR, SEND(KC_RBRC)); + P( PWR | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // | + P( PWR | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~ + P( PWR | ST3, SEND(KC_QUOT)); + P( PWR | ST4, SEND(KC_LSFT); SEND(KC_QUOT)); // " + P( PWR | RF, SEND(KC_KP_PLUS)); + P( PWR | RR, SEND(KC_LSFT); SEND(KC_7)); // & + P( PWR | RP, SEND(KC_MINS)); + P( PWR | RB, SEND(KC_EQL)); + P( PWR | RL, SEND(KC_SLSH)); + P( PWR | RG, SEND(KC_LSFT); SEND(KC_MINS)); + P( PWR | RT, SEND(KC_PAST)); + P( PWR | RS, SEND(KC_DOT)); + P( PWR | RD, SEND(KC_TAB)); + P( PWR | LA, SEND(KC_LSFT); SEND(KC_SCLN)); + P( PWR | LO, SEND(KC_BSLS)); + P( PWR | RE, SEND(KC_SCLN)); + P( PWR | RU, SEND(KC_BSLS)); + P( PWR | RZ, SEND(KC_LSFT)); + + return 0; +} + +#define STENO_LAYER 0 +#define GAMING 1 +#define GAMING_2 2 +#define MOVEMENT 3 + +// "Layers" +// Steno layer should be first in your map. +// When PWR | FN | ST3 | ST4 is pressed, the layer is increased to the next map. You must return to STENO_LAYER at the end. +// If you need more space for chords, remove the two gaming layers. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// Main layer, everything goes through here +[STENO_LAYER] = LAYOUT_georgi( +STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, +STN_PWR, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + STN_N1, STN_A, STN_O, STN_E, STN_U, STN_N7) +, +// Gaming layer with Numpad, Very limited +[GAMING] = LAYOUT_georgi( +KC_LSFT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, +KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DQUO, +KC_LALT, KC_SPC, LT(GAMING_2, KC_ENT), KC_DEL, KC_ASTR, TO(STENO_LAYER)), + +[GAMING_2] = LAYOUT_georgi( +KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, +KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, + KC_LALT, KC_SPC, KC_NO, KC_DEL, KC_ASTR, TO(STENO_LAYER)), + +[MOVEMENT] = LAYOUT_georgi( +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_PGUP, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_HOME, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_END, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; +// Don't fuck with this, thanks. +size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); diff --git a/keyboards/georgi/keymaps/norman/readme.md b/keyboards/georgi/keymaps/norman/readme.md new file mode 100644 index 000000000000..f9da34b02454 --- /dev/null +++ b/keyboards/georgi/keymaps/norman/readme.md @@ -0,0 +1,11 @@ +# Georgi QWERTY/Steno firmware + +This is the default keymap for Georgi, it's based heavily off of the naps62 ErgoDox and the Gergo layout. +It is both a ergonomic and programmer friendly keymap. + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! + +## Space issues +If you find yourself running out of space for dictionary entries, disabling mousekeys in rules.mk will save +you about 4k for entries! +Get a free 1k by deleting the Gaming layers from the keymap! diff --git a/keyboards/georgi/keymaps/norman/rules.mk b/keyboards/georgi/keymaps/norman/rules.mk new file mode 100644 index 000000000000..bb97bef28158 --- /dev/null +++ b/keyboards/georgi/keymaps/norman/rules.mk @@ -0,0 +1,35 @@ +#---------------------------------------------------------------------------- +# make georgi:default:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- + +NO_REPEAT = yes +VERBOSE = yes +KEYBOARD_SHARED_EP = yes +CUSTOM_MATRIX = yes +MOUSEKEY_ENABLE = yes + +#Debug options +CONSOLE_ENABLE = no +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_MATRIX = no +NO_PRINT = yes +ONLY_QWERTY = no + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +SRC += matrix.c i2c_master.c +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif +ifeq ($(strip $(NO_REPEAT)), yes) + OPT_DEFS += -DNO_REPEAT +endif +ifeq ($(strip $(NO_PRINT)), yes) + OPT_DEFS += -DNO_PRINT -DNO_DEBUG +endif +ifeq ($(strip $(ONLY_QWERTY)), yes) + OPT_DEFS += -DONLYQWERTY +endif diff --git a/keyboards/georgi/matrix.c b/keyboards/georgi/matrix.c new file mode 100644 index 000000000000..58f0776c4252 --- /dev/null +++ b/keyboards/georgi/matrix.c @@ -0,0 +1,398 @@ +/* + +Copyright 2013 Oleg Kostyuk + +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 . +*/ + +#include "matrix.h" +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "keymap_steno.h" +#include QMK_KEYBOARD_H +#ifdef DEBUG_MATRIX_SCAN_RATE +#include "timer.h" +#endif + + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +// MCP Pin Defs +#define RROW1 (1<<3) +#define RROW2 (1<<2) +#define RROW3 (1<<1) +#define RROW4 (1<<0) +#define COL0 (1<<0) +#define COL1 (1<<1) +#define COL2 (1<<2) +#define COL3 (1<<3) +#define COL4 (1<<4) +#define COL5 (1<<5) +#define COL6 (1<<6) + +// ATmega pin defs +#define ROW1 (1<<6) +#define ROW2 (1<<5) +#define ROW3 (1<<4) +#define ROW4 (1<<1) +#define COL7 (1<<0) +#define COL8 (1<<1) +#define COL9 (1<<2) +#define COL10 (1<<3) +#define COL11 (1<<2) +#define COL12 (1<<3) +#define COL13 (1<<6) + + +// bit masks +#define BMASK (COL7 | COL8 | COL9 | COL10) +#define CMASK (COL13) +#define DMASK (COL11 | COL12) +#define FMASK (ROW1 | ROW2 | ROW3 | ROW4) +#define RROWMASK (RROW1 | RROW2 | RROW3 | RROW4) +#define MCPMASK (COL0 | COL1 | COL2 | COL3 | COL4 | COL5 | COL6) + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +/* + * matrix state(1:on, 0:off) + * contains the raw values without debounce filtering of the last read cycle. + */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; + +// Debouncing: store for each key the number of scans until it's eligible to +// change. When scanning the matrix, ignore any changes in keys that have +// already changed in the last DEBOUNCE scans. +static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +static uint8_t mcp23018_reset_loop; +// static uint16_t mcp23018_reset_loop; + +#ifdef DEBUG_MATRIX_SCAN_RATE +uint32_t matrix_timer; +uint32_t matrix_scan_count; +#endif + + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + + +void matrix_init(void) +{ + // initialize row and col + mcp23018_status = init_mcp23018(); + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + raw_matrix[i] = 0; + for (uint8_t j=0; j < MATRIX_COLS; ++j) { + debounce_matrix[i * MATRIX_COLS + j] = 0; + } + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + matrix_init_quantum(); +} + +void matrix_power_up(void) { + mcp23018_status = init_mcp23018(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + +} + +// Returns a matrix_row_t whose bits are set if the corresponding key should be +// eligible to change in this scan. +matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) { + matrix_row_t result = 0; + matrix_row_t change = rawcols ^ raw_matrix[row]; + raw_matrix[row] = rawcols; + for (uint8_t i = 0; i < MATRIX_COLS; ++i) { + if (debounce_matrix[row * MATRIX_COLS + i]) { + --debounce_matrix[row * MATRIX_COLS + i]; + } else { + result |= (1 << i); + } + if (change & (1 << i)) { + debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE; + } + } + return result; +} + +matrix_row_t debounce_read_cols(uint8_t row) { + // Read the row without debouncing filtering and store it for later usage. + matrix_row_t cols = read_cols(row); + // Get the Debounce mask. + matrix_row_t mask = debounce_mask(cols, row); + // debounce the row and return the result. + return (cols & mask) | (matrix[row] & ~mask);; +} + +uint8_t matrix_scan(void) +{ + // Then the keyboard + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + // if (++mcp23018_reset_loop >= 1300) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + } + } + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_scan_count++; + uint32_t timer_now = timer_read32(); + if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); + + matrix_timer = timer_now; + matrix_scan_count = 0; + } +#endif + for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { + select_row(i); + // and select on left hand + select_row(i + MATRIX_ROWS_PER_SIDE); + // we don't need a 30us delay anymore, because selecting a + // left-hand row requires more than 30us for i2c. + + // grab cols from left hand + matrix[i] = debounce_read_cols(i); + // grab cols from right hand + matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE); + + unselect_rows(); + } + + matrix_scan_quantum(); + +#ifdef DEBUG_MATRIX + for (uint8_t c = 0; c < MATRIX_COLS; c++) + for (uint8_t r = 0; r < MATRIX_ROWS; r++) + if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); +#endif + + return 1; +} + +bool matrix_is_modified(void) // deprecated and evidently not called. +{ + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 1 | ((PINC & CMASK) >> 6) | (PIN))); + //return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2)); + return ~( + (((PINF & ROW4) >> 1) + | ((PINF & (ROW1 | ROW2 | ROW3)) >> 3)) + & 0xF); + } +} + +// Row pin configuration +static void unselect_rows(void) +{ + // no need to unselect on mcp23018, because the select step sets all + // the other row bits high, and it's not changing to a different + // direction + // Hi-Z(DDR:0, PORT:0) to unselect + DDRB &= ~(BMASK); + PORTB &= ~(BMASK); + DDRC &= ~CMASK; + PORTC &= ~CMASK; + DDRD &= ~DMASK; + PORTD &= ~DMASK; +} + +static void select_row(uint8_t row) +{ + if (row < 7) { + // select on mcp23018 + if (mcp23018_status) { // do nothing on error + } else { // set active row low : 0 // set other rows hi-Z : 1 + mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0xFF & ~(1< 1) { +#ifndef NO_DEBUG + uprintf("Switching to QMK\n"); +#endif + layer_on(1); + goto out; + } + + // Lone FN press, toggle QWERTY +#ifndef ONLYQWERTY + if (cChord == FN) { + (cMode == STENO) ? (cMode = QWERTY) : (cMode = STENO); + goto out; + } +#endif + + // Check for Plover momentary + if (cMode == QWERTY && (cChord & FN)) { + cChord ^= FN; + goto steno; + } + + // Do QWERTY and Momentary QWERTY + if (cMode == QWERTY || (cMode == COMMAND) || (cChord & (FN | PWR))) { + processChord(false); + goto out; + } + + // Fallback NKRO Steno + if (cMode == STENO && QWERSTENO) { + processChord(true); + goto out; + } + +steno: + // Hey that's a steno chord! + inChord = false; + chordIndex = 0; + cChord = 0; + return true; + +out: + cChord = 0; + inChord = false; + chordIndex = 0; + clear_keyboard(); + repEngaged = false; + for (int i = 0; i < 32; i++) + chordState[i] = 0xFFFF; + + return false; +} + +// Update Chord State +bool process_steno_user(uint16_t keycode, keyrecord_t *record) { + // Everything happens in here when steno keys come in. + // Bail on keyup + if (!record->event.pressed) return true; + + // Update key repeat timers + repTimer = timer_read(); + inChord = true; + + // Switch on the press adding to chord + bool pr = record->event.pressed; + switch (keycode) { + // Mods and stuff + case STN_ST1: pr ? (cChord |= (ST1)): (cChord &= ~(ST1)); break; + case STN_ST2: pr ? (cChord |= (ST2)): (cChord &= ~(ST2)); break; + case STN_ST3: pr ? (cChord |= (ST3)): (cChord &= ~(ST3)); break; + case STN_ST4: pr ? (cChord |= (ST4)): (cChord &= ~(ST4)); break; + case STN_FN: pr ? (cChord |= (FN)) : (cChord &= ~(FN)); break; + case STN_PWR: pr ? (cChord |= (PWR)): (cChord &= ~(PWR)); break; + case STN_N1...STN_N6: pr ? (cChord |= (LNO)): (cChord &= ~(LNO)); break; + case STN_N7...STN_NC: pr ? (cChord |= (RNO)): (cChord &= ~(RNO)); break; + + // All the letter keys + case STN_S1: pr ? (cChord |= (LSU)) : (cChord &= ~(LSU)); break; + case STN_S2: pr ? (cChord |= (LSD)) : (cChord &= ~(LSD)); break; + case STN_TL: pr ? (cChord |= (LFT)) : (cChord &= ~(LFT)); break; + case STN_KL: pr ? (cChord |= (LK)) : (cChord &= ~(LK)); break; + case STN_PL: pr ? (cChord |= (LP)) : (cChord &= ~(LP)); break; + case STN_WL: pr ? (cChord |= (LW)) : (cChord &= ~(LW)); break; + case STN_HL: pr ? (cChord |= (LH)) : (cChord &= ~(LH)); break; + case STN_RL: pr ? (cChord |= (LR)) : (cChord &= ~(LR)); break; + case STN_A: pr ? (cChord |= (LA)) : (cChord &= ~(LA)); break; + case STN_O: pr ? (cChord |= (LO)) : (cChord &= ~(LO)); break; + case STN_E: pr ? (cChord |= (RE)) : (cChord &= ~(RE)); break; + case STN_U: pr ? (cChord |= (RU)) : (cChord &= ~(RU)); break; + case STN_FR: pr ? (cChord |= (RF)) : (cChord &= ~(RF)); break; + case STN_RR: pr ? (cChord |= (RR)) : (cChord &= ~(RR)); break; + case STN_PR: pr ? (cChord |= (RP)) : (cChord &= ~(RP)); break; + case STN_BR: pr ? (cChord |= (RB)) : (cChord &= ~(RB)); break; + case STN_LR: pr ? (cChord |= (RL)) : (cChord &= ~(RL)); break; + case STN_GR: pr ? (cChord |= (RG)) : (cChord &= ~(RG)); break; + case STN_TR: pr ? (cChord |= (RT)) : (cChord &= ~(RT)); break; + case STN_SR: pr ? (cChord |= (RS)) : (cChord &= ~(RS)); break; + case STN_DR: pr ? (cChord |= (RD)) : (cChord &= ~(RD)); break; + case STN_ZR: pr ? (cChord |= (RZ)) : (cChord &= ~(RZ)); break; + } + + // Store previous state for fastQWER + if (pr) { + chordState[chordIndex] = cChord; + chordIndex++; + } + + return true; +} +void matrix_scan_user(void) { + // We abuse this for early sending of key + // Key repeat only on QWER/SYMB layers + if (cMode != QWERTY || !inChord) return; + + // Check timers +#ifndef NO_REPEAT + if (repEngaged && timer_elapsed(repTimer) > REP_DELAY) { + // Process Key for report + processChord(false); + + // Send report to host + send_keyboard_report(); + clear_keyboard(); + repTimer = timer_read(); + } + + if (!repEngaged && timer_elapsed(repTimer) > REP_INIT_DELAY) { + repEngaged = true; + } +#endif +}; + +// For Plover NKRO +uint32_t processFakeSteno(bool lookup) { + P( LSU, SEND(KC_Q);); + P( LSD, SEND(KC_A);); + P( LFT, SEND(KC_W);); + P( LP, SEND(KC_E);); + P( LH, SEND(KC_R);); + P( LK, SEND(KC_S);); + P( LW, SEND(KC_D);); + P( LR, SEND(KC_F);); + P( ST1, SEND(KC_T);); + P( ST2, SEND(KC_G);); + P( LA, SEND(KC_C);); + P( LO, SEND(KC_V);); + P( RE, SEND(KC_N);); + P( RU, SEND(KC_M);); + P( ST3, SEND(KC_Y);); + P( ST4, SEND(KC_H);); + P( RF, SEND(KC_U);); + P( RP, SEND(KC_I);); + P( RL, SEND(KC_O);); + P( RT, SEND(KC_P);); + P( RD, SEND(KC_LBRC);); + P( RR, SEND(KC_J);); + P( RB, SEND(KC_K);); + P( RG, SEND(KC_L);); + P( RS, SEND(KC_SCLN);); + P( RZ, SEND(KC_COMM);); + P( LNO, SEND(KC_1);); + P( RNO, SEND(KC_1);); + + return 0; +} + +// Traverse the chord history to a given point +// Returns the mask to use +void processChord(bool useFakeSteno) { + // Save the clean chord state + uint32_t savedChord = cChord; + + // Apply Stick Bits if needed + if (stickyBits != 0) { + cChord |= stickyBits; + for (int i = 0; i <= chordIndex; i++) + chordState[i] |= stickyBits; + } + + // Strip FN + if (cChord & FN) cChord ^= FN; + + // First we test if a whole chord was passsed + // If so we just run it handling repeat logic + if (useFakeSteno && processFakeSteno(true) == cChord) { + processFakeSteno(false); + return; + } else if (processQwerty(true) == cChord) { + processQwerty(false); + // Repeat logic + if (repeatFlag) { + restoreState(); + repeatFlag = false; + processChord(false); + } else { + saveState(cChord); + } + return; + } + + // Iterate through chord picking out the individual + // and longest chords + uint32_t bufChords[QWERBUF]; + int bufLen = 0; + uint32_t mask = 0; + + // We iterate over it multiple times to catch the longest + // chord. Then that gets addded to the mask and re run. + while (savedChord != mask) { + uint32_t test = 0; + uint32_t longestChord = 0; + + for (int i = 0; i <= chordIndex; i++) { + cChord = chordState[i] & ~mask; + if (cChord == 0) + continue; + + // Assume mid parse Sym is new chord + if (i != 0 && test != 0 && (cChord ^ test) == PWR) { + longestChord = test; + break; + } + + // Lock SYM layer in once detected + if (mask & PWR) + cChord |= PWR; + + + // Testing for keycodes + if (useFakeSteno) { + test = processFakeSteno(true); + } else { + test = processQwerty(true); + } + + if (test != 0) { + longestChord = test; + } + } + + mask |= longestChord; + bufChords[bufLen] = longestChord; + bufLen++; + + // That's a loop of sorts, halt processing + if (bufLen >= QWERBUF) { + return; + } + } + + // Now that the buffer is populated, we run it + for (int i = 0; i < bufLen ; i++) { + cChord = bufChords[i]; + if (useFakeSteno) { + processFakeSteno(false); + } else { + processQwerty(false); + } + } + + // Save state in case of repeat + if (!repeatFlag) { + saveState(savedChord); + } + + // Restore cChord for held repeat + cChord = savedChord; + + return; +} +void saveState(uint32_t cleanChord) { + pChord = cleanChord; + pChordIndex = chordIndex; + for (int i = 0; i < 32; i++) + pChordState[i] = chordState[i]; +} +void restoreState() { + cChord = pChord; + chordIndex = pChordIndex; + for (int i = 0; i < 32; i++) + chordState[i] = pChordState[i]; +} + +// Macros for calling from keymap.c +void SEND(uint8_t kc) { + // Send Keycode, Does not work for Quantum Codes + if (cMode == COMMAND && CMDLEN < MAX_CMD_BUF) { +#ifndef NO_DEBUG + uprintf("CMD LEN: %d BUF: %d\n", CMDLEN, MAX_CMD_BUF); +#endif + CMDBUF[CMDLEN] = kc; + CMDLEN++; + } + + if (cMode != COMMAND) register_code(kc); + return; +} +void REPEAT(void) { + if (cMode != QWERTY) + return; + + repeatFlag = true; + return; +} +void SET_STICKY(uint32_t stick) { + stickyBits = stick; + return; +} +void SWITCH_LAYER(int layer) { + if (keymapsCount >= layer) + layer_on(layer); +} +void CLICK_MOUSE(uint8_t kc) { +#ifdef MOUSEKEY_ENABLE + mousekey_on(kc); + mousekey_send(); + + // Store state for later use + inMouse = true; + mousePress = kc; +#endif +} diff --git a/keyboards/georgi/sten.h b/keyboards/georgi/sten.h new file mode 100644 index 000000000000..e94f10fc2881 --- /dev/null +++ b/keyboards/georgi/sten.h @@ -0,0 +1,85 @@ +// 2019, g Heavy Industries +// Blessed mother of Christ, please keep this readable +// and protect us from segfaults. For thine is the clock, +// the slave and the master. Until we return from main. +// +// Amen. + +#include QMK_KEYBOARD_H +#include "mousekey.h" +#include "keymap.h" +#include "keymap_steno.h" +#include "wait.h" + +extern size_t keymapsCount; // Total keymaps +extern uint32_t cChord; // Current Chord +extern uint32_t stenoLayers[]; // Chords that simulate QMK layers +extern size_t stenoLayerCount; // Number of simulated layers +uint32_t refChord; // Reference chord for PC macro + +// Function defs +void processChord(bool useFakeSteno); +uint32_t processQwerty(bool lookup); +uint32_t processFakeSteno(bool lookup); +void saveState(uint32_t cChord); +void restoreState(void); + +// Macros for use in keymap.c +void SEND(uint8_t kc); +void REPEAT(void); +void SET_STICKY(uint32_t); +void SWITCH_LAYER(int); +void CLICK_MOUSE(uint8_t); + +// Keymap helper +#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} +#define PC(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} \ + for(int i = 0; i < stenoLayerCount; i++) { \ + refChord = stenoLayers[i] | chord; \ + if (cChord == (refChord)) { if (!lookup) {act;} return refChord;}; \ +} + +// Shift to internal representation +// i.e) S(teno)R(ight)F +#define STN(n) (1L< + +#include "quantum.h" #include #include -#include "quantum.h" #include "i2c_master.h" -#include "matrix.h" +#include extern i2c_status_t mcp23018_status; -#define ERGODOX_EZ_I2C_TIMEOUT 1000 +#define I2C_TIMEOUT 1000 #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) #define CPU_16MHz 0x00 @@ -26,18 +26,14 @@ extern i2c_status_t mcp23018_status; #define OLATA 0x14 // output latch register #define OLATB 0x15 -void init_ergodox(void); uint8_t init_mcp23018(void); /* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ -#define LAYOUT_GERGO( \ +#define LAYOUT_gergo( \ L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05, \ L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \ - L20,L21,L22,L23,L24,L25,L26, R20,R21,R22,R23,R24,R25,R26, \ - L31,L32, R33,R34, \ - L30, R30, \ - L33,L34, R31,R32) \ - \ + L20,L21,L22,L23,L24,L25,L26,L30, R30,R20,R21,R22,R23,R24,R25,R26, \ + L31,L32,L33,L34, R31,R32,R33,R34) \ /* matrix positions */ \ { \ { KC_NO, L16, L26, L30}, \ diff --git a/keyboards/gergo/i2cmaster.h b/keyboards/gergo/i2cmaster.h deleted file mode 100644 index 72e05084942f..000000000000 --- a/keyboards/gergo/i2cmaster.h +++ /dev/null @@ -1,178 +0,0 @@ -#ifndef _I2CMASTER_H -#define _I2CMASTER_H 1 -/************************************************************************* -* Title: C include file for the I2C master interface -* (i2cmaster.S or twimaster.c) -* Author: Peter Fleury http://jump.to/fleury -* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $ -* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 -* Target: any AVR device -* Usage: see Doxygen manual -**************************************************************************/ - -#ifdef DOXYGEN -/** - @defgroup pfleury_ic2master I2C Master library - @code #include @endcode - - @brief I2C (TWI) Master Software Library - - Basic routines for communicating with I2C slave devices. This single master - implementation is limited to one bus master on the I2C bus. - - This I2c library is implemented as a compact assembler software implementation of the I2C protocol - which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c). - Since the API for these two implementations is exactly the same, an application can be linked either against the - software I2C implementation or the hardware I2C implementation. - - Use 4.7k pull-up resistor on the SDA and SCL pin. - - Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module - i2cmaster.S to your target when using the software I2C implementation ! - - Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion. - - @note - The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted - to GNU assembler and AVR-GCC C call interface. - Replaced the incorrect quarter period delays found in AVR300 with - half period delays. - - @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury - - @par API Usage Example - The following code shows typical usage of this library, see example test_i2cmaster.c - - @code - - #include - - - #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet - - int main(void) - { - unsigned char ret; - - i2c_init(); // initialize I2C library - - // write 0x75 to EEPROM address 5 (Byte Write) - i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode - i2c_write(0x05); // write address = 5 - i2c_write(0x75); // write value 0x75 to EEPROM - i2c_stop(); // set stop conditon = release bus - - - // read previously written value back from EEPROM address 5 - i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode - - i2c_write(0x05); // write address = 5 - i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode - - ret = i2c_readNak(); // read one byte from EEPROM - i2c_stop(); - - for(;;); - } - @endcode - -*/ -#endif /* DOXYGEN */ - -/**@{*/ - -#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304 -#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !" -#endif - -#include - -/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */ -#define I2C_READ 1 - -/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */ -#define I2C_WRITE 0 - - -/** - @brief initialize the I2C master interace. Need to be called only once - @param void - @return none - */ -void i2c_init(void); - - -/** - @brief Terminates the data transfer and releases the I2C bus - @param void - @return none - */ -void i2c_stop(void); - - -/** - @brief Issues a start condition and sends address and transfer direction - - @param addr address and transfer direction of I2C device - @retval 0 device accessible - @retval 1 failed to access device - */ -unsigned char i2c_start(unsigned char addr); - - -/** - @brief Issues a repeated start condition and sends address and transfer direction - - @param addr address and transfer direction of I2C device - @retval 0 device accessible - @retval 1 failed to access device - */ -unsigned char i2c_rep_start(unsigned char addr); - - -/** - @brief Issues a start condition and sends address and transfer direction - - If device is busy, use ack polling to wait until device ready - @param addr address and transfer direction of I2C device - @return none - */ -void i2c_start_wait(unsigned char addr); - - -/** - @brief Send one byte to I2C device - @param data byte to be transfered - @retval 0 write successful - @retval 1 write failed - */ -unsigned char i2c_write(unsigned char data); - - -/** - @brief read one byte from the I2C device, request more data from device - @return byte read from I2C device - */ -unsigned char i2c_readAck(void); - -/** - @brief read one byte from the I2C device, read is followed by a stop condition - @return byte read from I2C device - */ -unsigned char i2c_readNak(void); - -/** - @brief read one byte from the I2C device - - Implemented as a macro, which calls either i2c_readAck or i2c_readNak - - @param ack 1 send ack, request more data from device
- 0 send nak, read is followed by a stop condition - @return byte read from I2C device - */ -unsigned char i2c_read(unsigned char ack); -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - - -/**@}*/ -#endif diff --git a/keyboards/gergo/info.json b/keyboards/gergo/info.json index 71dcca40fcdf..586b9c908124 100644 --- a/keyboards/gergo/info.json +++ b/keyboards/gergo/info.json @@ -1,11 +1,11 @@ { "maintainer": "germ", - "height": 4.75, + "height": 5.75, "width": 19.5, "keyboard_name": "Gergo", "url": "http://gboards.ca", "layouts": { - "LAYOUT_GERGO": { + "LAYOUT_gergo": { "layout": [ { "label": "L00", @@ -180,6 +180,16 @@ "x": 6.5, "y": 1.75 }, + { + "label": "L30", + "x": 8.25, + "y": 2.75 + }, + { + "label": "R30", + "x": 10.25, + "y": 2.75 + }, { "h": 1.5, "label": "R20", @@ -227,26 +237,6 @@ "x": 6, "y": 3.63 }, - { - "label": "R33", - "x": 12.5, - "y": 3.63 - }, - { - "label": "R34", - "x": 13.75, - "y": 3.25 - }, - { - "label": "L30", - "x": 8.25, - "y": 2.75 - }, - { - "label": "R30", - "x": 10.25, - "y": 2.75 - }, { "h": 2, "label": "L33", @@ -270,6 +260,16 @@ "label": "R32", "x": 11.25, "y": 3.75 + }, + { + "label": "R33", + "x": 12.5, + "y": 3.63 + }, + { + "label": "R34", + "x": 13.75, + "y": 3.25 } ] } diff --git a/keyboards/gergo/keymaps/colemak/keymap.c b/keyboards/gergo/keymaps/colemak/keymap.c new file mode 100644 index 000000000000..b2e79114f232 --- /dev/null +++ b/keyboards/gergo/keymaps/colemak/keymap.c @@ -0,0 +1,174 @@ +/* Good on you for modifying your layout! if you don't have + * time to read the QMK docs, a list of keycodes can be found at + * + * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md + * + * There's also a template for adding new layers at the bottom of this file! + */ + +#include QMK_KEYBOARD_H + +#define IGNORE_MOD_TAP_INTERRUPT +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define NUMB 2 // numbers/motion + +enum custom_keycodes { + M1_STRING = SAFE_RANGE, + M2_URL, +}; + +// Blank template at the bottom + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | TAB | Q | W | F | P | G | | J | L | U | Y | ; : | | \ | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | Ctrl | A | R | S | T | D |O(CMD)| |O(CTL)| H | N | E | I | O | ' " | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B |O(ALT)| | | K | M | , < | . > | / ? | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .----------. .-------. .------. .--------. + * | alt/del | | BKSP | | Space| |cmd/del | + * '----------' '-------' `------. '--------' + * ,-------. ,-------. + * | MMB | | : | + * ,------|-------| |-------|------. + * | NUMB | SYMB | | SYMB | NUMB | + * | Esc | F13 | | F14 | Enter| + * | | | | | | + * `--------------' `--------------' + */ +[BASE] = LAYOUT_gergo( +KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y,KC_SCLN, KC_BSLS, +KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, OSM(MOD_LGUI), OSM(MOD_LCTL), KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, +KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, OSM(MOD_LALT), KC_TRNS, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + + ALT_T(KC_DEL), KC_BSPC, KC_SPC, CMD_T(KC_DEL), + + KC_BTN3, KC_COLON, + LT(SYMB, KC_ESC), LT(NUMB, KC_F13), LT(NUMB, KC_F14), LT(SYMB, KC_ENT)), +/* Keymap 1: Symbols layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | VolUp | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | | [ | ] | { | } | ` | M1 | | | | - | _ | + | = | VolDn | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | | ` | ~ | | | ~ | M2 | | | | | Prev |Pl/Pau| Next | Mute | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | | | | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | | + * ,------|-------| |-------|------. + * | | | | | | + * | | | | | | + * | | | | | | + * `--------------' `--------------' + */ +[SYMB] = LAYOUT_gergo( +KC_TRNS, KC_EXLM, KC_AT, KC_HASH,KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC__VOLUP, +KC_TRNS, KC_LBRC, KC_RBRC, KC_LCBR,KC_RCBR, KC_PLUS, M1_STRING, KC_TRNS, KC_TRNS, KC_MINS, KC_UNDERSCORE, KC_PLUS, KC_EQL, KC__VOLDOWN, +KC_TRNS, KC_GRV, KC_TILD,KC_TRNS,KC_TRNS, KC_EQL, M2_URL, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_REWIND, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_FAST_FORWARD, KC__MUTE, + + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +/* Keymap 2: Pad/Function layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | PgUp | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | F1 | F2 | F3 | F4 | F5 | F6 | BTN1 | | Home | LEFT | DOWN | UP | RIGHT| End | PgDn | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | F7 | F8 | F9 | F10 | F11 | F12 | BTN2 | | | MLFT | MDWN | MUP | MRGHT| | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | ALT | | | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | | + * ,------|-------| |-------|------. + * | | | | | | + * | | | | | | + * | | | | | | + * `--------------' `--------------' + */ +[NUMB] = LAYOUT_gergo( +KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PGUP, +KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_BTN1, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_PGDN, +KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BTN2, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, KC_RALT, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + +/* Keymap template + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | | | | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | | + * ,------|-------| |-------|------. + * | | | | | | + * | | | | | | + * | | | | | | + * `--------------' `--------------' +[SYMB] = LAYOUT_gergo( +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), + */ + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + //uint8_t layer = biton32(layer_state); + biton32(layer_state); +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case M1_STRING: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("Hi!" SS_TAP(X_ENTER)); + } else { + // when keycode QMKBEST is released + } + break; + + case M2_URL: + if (record->event.pressed) { + SEND_STRING("https://ddg.gg" SS_TAP(X_ENTER)); + } + break; + + } + return true; +}; + diff --git a/keyboards/gergo/keymaps/colemak/readme.md b/keyboards/gergo/keymaps/colemak/readme.md new file mode 100644 index 000000000000..1c1cc7bdea23 --- /dev/null +++ b/keyboards/gergo/keymaps/colemak/readme.md @@ -0,0 +1,16 @@ +# [Gergo! By g Heavy Industries](http://gboards.ca) + +![Gergo image](https://4.bp.blogspot.com/-889nMXxgSM0/XCNxwnO5kUI/AAAAAAAA6mI/tZbWgZVCBW0dyZOCGJDkjN06DVax7j8XwCLcBGAs/s1600/48422820_967732713413298_485744639215665152_n.jpg) + +This is a [Colemak](https://colemak.com/) mapping for the Gergo, + +Unlike the default mapping, most symbols are at their original place on the number row to ease in the +learning curve. + +You can view this layout over at +[keyboad-layout-editor.com](http://www.keyboard-layout-editor.com/#/gists/f04d6a3b0cd3db91407c51f7ba36aeb3). + +## Settings +To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/gergo/keymaps/default/rules.mk + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! diff --git a/keyboards/gergo/keymaps/colemak/rules.mk b/keyboards/gergo/keymaps/colemak/rules.mk new file mode 100644 index 000000000000..ddec12d1b148 --- /dev/null +++ b/keyboards/gergo/keymaps/colemak/rules.mk @@ -0,0 +1,36 @@ +#---------------------------------------------------------------------------- +# make gergo:germ:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- +# Firmware options +BALLER = no # Enable to ball out +BALLSTEP = 20 # Multiple in px to move, multiplied by layer number +SCROLLSTEP = 1 # Lines to scroll with ball +MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller + +#Debug options +VERBOSE = no +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_BALLER = no +DEBUG_MATRIX = no + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +SRC += matrix.c i2c_master.c +ifneq ($(strip $(BALLSTEP)),) + OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP)) +endif +ifneq ($(strip $(SCROLLSTEP)),) + OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP)) +endif +ifeq ($(strip $(BALLER)), yes) + OPT_DEFS += -DBALLER +endif +ifeq ($(strip $(DEBUG_BALLER)), yes) + OPT_DEFS += -DDEBUG_BALLER +endif +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif diff --git a/keyboards/gergo/keymaps/default/config.h b/keyboards/gergo/keymaps/default/config.h new file mode 100644 index 000000000000..6393d46f14bf --- /dev/null +++ b/keyboards/gergo/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/gergo/keymaps/default/keymap.c b/keyboards/gergo/keymaps/default/keymap.c index fabd945fef6c..8e26223f17d5 100644 --- a/keyboards/gergo/keymaps/default/keymap.c +++ b/keyboards/gergo/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Good on you for modifying your layout! if you don't have +/* Good on you for modifying your layout! if you don't have * time to read the QMK docs, a list of keycodes can be found at * * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md @@ -8,7 +8,6 @@ #include QMK_KEYBOARD_H -#define IGNORE_MOD_TAP_INTERRUPT #define BASE 0 // default layer #define SYMB 1 // symbols #define NUMB 2 // numbers/motion @@ -41,15 +40,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | * `--------------' `--------------' */ -[BASE] = LAYOUT_GERGO( -LT(NUMB, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, -MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BTN2, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, -KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, - - MT(MOD_LGUI, KC_DEL), MT(MOD_LALT, KC_ENT), KC_TAB, KC_BSPC, - - KC_BTN3, KC_PGDN, - LT(SYMB, KC_SPC), LT(NUMB, KC_ESC), LT(SYMB, KC_ENT), LT(NUMB, KC_SPC)), +[BASE] = LAYOUT_gergo( + LT(NUMB, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BTN2, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BTN3, KC_PGDN, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + MT(MOD_LGUI, KC_DEL), MT(MOD_LALT, KC_ENT), LT(SYMB, KC_SPC), LT(NUMB, KC_ESC), LT(SYMB, KC_ENT), LT(NUMB, KC_SPC), KC_TAB, KC_BSPC + ), /* Keymap 1: Symbols layer * * ,-------------------------------------------. ,-------------------------------------------. @@ -70,14 +66,12 @@ KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BSP * | | | | | | * `--------------' `--------------' */ -[SYMB] = LAYOUT_GERGO( -KC_TRNS, KC_EXLM, KC_AT, KC_LCBR,KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, -KC_TRNS, KC_HASH, KC_DLR, KC_LPRN,KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, -KC_TRNS, KC_PERC, KC_CIRC,KC_LBRC,KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, - - KC_TRNS, KC_TRNS, KC_PGUP, KC_DEL, - KC_TRNS, KC_TRNS, - KC_SCLN, KC_EQL, KC_EQL, KC_SCLN), +[SYMB] = LAYOUT_gergo( + KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, + KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, + KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + KC_TRNS, KC_TRNS, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_PGUP, KC_DEL + ), /* Keymap 2: Pad/Function layer * * ,-------------------------------------------. ,-------------------------------------------. @@ -98,17 +92,15 @@ KC_TRNS, KC_PERC, KC_CIRC,KC_LBRC,KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_ * | | | | | | * `--------------' `--------------' */ -[NUMB] = LAYOUT_GERGO( -KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, -KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU, -KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_MPLY, KC_MNXT, - - KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +[NUMB] = LAYOUT_gergo( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_MPLY, KC_MNXT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), }; -/* Keymap template +/* Keymap template * * ,-------------------------------------------. ,-------------------------------------------. * | | | | | | | | | | | | | | @@ -127,25 +119,10 @@ KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, K * | | | | | | * | | | | | | * `--------------' `--------------' -[SYMB] = LAYOUT_GERGO( -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), +[SYMB] = LAYOUT_gergo( + 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 + ) */ - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - //uint8_t layer = biton32(layer_state); - biton32(layer_state); -}; - - diff --git a/keyboards/gergo/keymaps/default/rules.mk b/keyboards/gergo/keymaps/default/rules.mk index 2f825a76639f..da2d03af2c44 100644 --- a/keyboards/gergo/keymaps/default/rules.mk +++ b/keyboards/gergo/keymaps/default/rules.mk @@ -3,7 +3,7 @@ # Make sure you have dfu-programmer installed! #---------------------------------------------------------------------------- # Firmware options -BALLER = yes # Enable to ball out +BALLER = no # Enable to ball out BALLSTEP = 20 # Multiple in px to move, multiplied by layer number SCROLLSTEP = 1 # Lines to scroll with ball MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller @@ -12,7 +12,7 @@ MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller VERBOSE = yes DEBUG_MATRIX_SCAN_RATE = no DEBUG_BALLER = no -DEBUG_MATRIX = no +DEBUG_MATRIX = yes # A bunch of stuff that you shouldn't touch unless you # know what you're doing. @@ -26,6 +26,7 @@ ifneq ($(strip $(SCROLLSTEP)),) OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP)) endif ifeq ($(strip $(BALLER)), yes) + POINTING_DEVICE_ENABLE = yes OPT_DEFS += -DBALLER endif ifeq ($(strip $(DEBUG_BALLER)), yes) diff --git a/keyboards/gergo/keymaps/drashna/keymap.c b/keyboards/gergo/keymaps/drashna/keymap.c new file mode 100644 index 000000000000..ffa23462eeff --- /dev/null +++ b/keyboards/gergo/keymaps/drashna/keymap.c @@ -0,0 +1,113 @@ +/* Good on you for modifying your layout! if you don't have + * time to read the QMK docs, a list of keycodes can be found at + * + * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md + * + * There's also a template for adding new layers at the bottom of this file! + */ + +#include QMK_KEYBOARD_H +#include "drashna.h" + + +#define LAYOUT_gergo_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_gergo_wrapper( \ + KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \ + KC_TAB, K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, KC_QUOT, \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \ + ) + +#define LAYOUT_gergo_base_wrapper(...) LAYOUT_gergo_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_gergo_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + [_COLEMAK] = LAYOUT_gergo_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_gergo_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_gergo_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_gergo_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_gergo_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_gergo_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_gergo_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + + [_MODS] = LAYOUT_gergo_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, _______, _______, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, _______, _______, _______, _______, ___________________BLANK___________________, KC_RSFT, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_LOWER] = LAYOUT_gergo_wrapper( + KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, + _______, _________________LOWER_L2__________________, _______, _______, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _______, _______, _______, _______, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_gergo_wrapper( + _______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, + _______, _________________RAISE_L2__________________, _______, _______, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_gergo_wrapper( + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + VRSN, _________________ADJUST_L2_________________, _______, KC_NUKE, _________________ADJUST_R2_________________, EEP_RST, + _______, _________________ADJUST_L3_________________, _______, _______, _______, _______, _________________ADJUST_R3_________________, TG_MODS, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +/* Keymap template + + [SYMB] = LAYOUT_gergo_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + */ diff --git a/keyboards/gergo/keymaps/drashna/rules.mk b/keyboards/gergo/keymaps/drashna/rules.mk new file mode 100644 index 000000000000..ec81d11e9c5f --- /dev/null +++ b/keyboards/gergo/keymaps/drashna/rules.mk @@ -0,0 +1,2 @@ +CONSOLE_ENABLE = no +COMMAND_ENABLE = no diff --git a/keyboards/gergo/keymaps/germ/config.h b/keyboards/gergo/keymaps/germ/config.h new file mode 100644 index 000000000000..6393d46f14bf --- /dev/null +++ b/keyboards/gergo/keymaps/germ/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/gergo/keymaps/germ/keymap.c b/keyboards/gergo/keymaps/germ/keymap.c new file mode 100644 index 000000000000..8e26223f17d5 --- /dev/null +++ b/keyboards/gergo/keymaps/germ/keymap.c @@ -0,0 +1,128 @@ +/* Good on you for modifying your layout! if you don't have + * time to read the QMK docs, a list of keycodes can be found at + * + * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md + * + * There's also a template for adding new layers at the bottom of this file! + */ + +#include QMK_KEYBOARD_H + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define NUMB 2 // numbers/motion + +// Blank template at the bottom + +enum customKeycodes { + URL = 1 +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | L1/ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * |Ctrl/BS | A | S | D | F | G | RMB | | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | LMB | | | N | M | , < | . > | / ? | - _ | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .----------. .-------. .------. .-----. + * | Super/Del| |Ent/ALT| | Tab | |BKSP | + * '----------' '-------' `------. '-----' + * ,-------. ,-------. + * | MMB | | PgDn | + * ,------|-------| |-------|------. + * | SYMB | NUMB | | SYMB | NUMB | + * | Space| Escape| | Mod |Space | + * | | | | | | + * `--------------' `--------------' + */ +[BASE] = LAYOUT_gergo( + LT(NUMB, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BTN2, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BTN3, KC_PGDN, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + MT(MOD_LGUI, KC_DEL), MT(MOD_LALT, KC_ENT), LT(SYMB, KC_SPC), LT(NUMB, KC_ESC), LT(SYMB, KC_ENT), LT(NUMB, KC_SPC), KC_TAB, KC_BSPC + ), +/* Keymap 1: Symbols layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | ! | @ | { | } | | | | | | | | | \ | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` | | | | + | - | / | * | % | ' " | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | = | , | . | / ? | - _ | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | | | DEL | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | PgUp | + * ,------|-------| |-------|------. + * | | | | | | + * | ; | = | | = | ; | + * | | | | | | + * `--------------' `--------------' + */ +[SYMB] = LAYOUT_gergo( + KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, + KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, + KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + KC_TRNS, KC_TRNS, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_PGUP, KC_DEL + ), +/* Keymap 2: Pad/Function layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | F1 | F2 | F3 | F4 | F5 | F6 | BTN1 | | | LEFT | DOWN | UP | RIGHT|VolDn | VolUp | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | F7 | F8 | F9 | F10 | F11 | F12 | BTN2 | | | MLFT | MDWN | MUP | MRGHT|Ply/Pa| Skip | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | | | | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | PgUp | + * ,------|-------| |-------|------. + * | | | | | | + * | | | | | | + * | | | | | | + * `--------------' `--------------' + */ +[NUMB] = LAYOUT_gergo( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_MPLY, KC_MNXT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; + +/* Keymap template + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | | | | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | | + * ,------|-------| |-------|------. + * | | | | | | + * | | | | | | + * | | | | | | + * `--------------' `--------------' +[SYMB] = LAYOUT_gergo( + 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 + ) + */ diff --git a/keyboards/gergo/keymaps/germ/readme.md b/keyboards/gergo/keymaps/germ/readme.md new file mode 100644 index 000000000000..471a20fbdff2 --- /dev/null +++ b/keyboards/gergo/keymaps/germ/readme.md @@ -0,0 +1,10 @@ +# [Gergo! By g Heavy Industries](http://gboards.ca) + +![Gergo image](https://4.bp.blogspot.com/-889nMXxgSM0/XCNxwnO5kUI/AAAAAAAA6mI/tZbWgZVCBW0dyZOCGJDkjN06DVax7j8XwCLcBGAs/s1600/48422820_967732713413298_485744639215665152_n.jpg) + +This is the default keymap for Gergo, it's based heavily off of the naps62 ErgoDox layout and is aimed at a programmer friendly keymap. + +## Settings +To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/gergo/keymaps/default/rules.mk + +Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR! diff --git a/keyboards/gergo/keymaps/germ/rules.mk b/keyboards/gergo/keymaps/germ/rules.mk new file mode 100644 index 000000000000..badfe7bb9988 --- /dev/null +++ b/keyboards/gergo/keymaps/germ/rules.mk @@ -0,0 +1,37 @@ +#---------------------------------------------------------------------------- +# make gergo:germ:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- +# Firmware options +BALLER = yes # Enable to ball out +BALLSTEP = 20 # Multiple in px to move, multiplied by layer number +SCROLLSTEP = 1 # Lines to scroll with ball +MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller + +#Debug options +VERBOSE = yes +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_BALLER = no +DEBUG_MATRIX = no + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +SRC += matrix.c i2c_master.c +ifneq ($(strip $(BALLSTEP)),) + OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP)) +endif +ifneq ($(strip $(SCROLLSTEP)),) + OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP)) +endif +ifeq ($(strip $(BALLER)), yes) + OPT_DEFS += -DBALLER + POINTING_DEVICE_ENABLE = yes +endif +ifeq ($(strip $(DEBUG_BALLER)), yes) + OPT_DEFS += -DDEBUG_BALLER +endif +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif diff --git a/keyboards/gergo/matrix.c b/keyboards/gergo/matrix.c index 29fe48ccb317..9ef1f6b5cfa9 100644 --- a/keyboards/gergo/matrix.c +++ b/keyboards/gergo/matrix.c @@ -1,8 +1,4 @@ /* -Note for ErgoDox EZ customizers: Here be dragons! -This is not a file you want to be messing with. -All of the interesting stuff for you is under keymaps/ :) -Love, Erez Copyright 2013 Oleg Kostyuk @@ -29,14 +25,15 @@ along with this program. If not, see . #include "print.h" #include "debug.h" #include "util.h" -#include "pointing_device.h" +#include "debounce.h" #include QMK_KEYBOARD_H #ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" +# include "timer.h" #endif #ifdef BALLER #include +#include "pointing_device.h" #endif #ifndef DEBOUNCE @@ -72,14 +69,14 @@ along with this program. If not, see . //Trackball pin defs #define TRKUP (1<<4) #define TRKDN (1<<5) -#define TRKLT (1<<6) +#define TRKLT (1<<6) #define TRKRT (1<<7) #define TRKBTN (1<<6) // Multiple for mouse moves #ifndef TRKSTEP -#define TRKSTEP 20 +#define TRKSTEP 20 #endif // multiple for mouse scroll @@ -98,13 +95,13 @@ along with this program. If not, see . // Trackball interrupts accumulate over here. Processed on scan // Stores prev state of mouse, high bits store direction -uint8_t trkState = 0; -uint8_t trkBtnState = 0; +uint8_t trkState = 0; +uint8_t trkBtnState = 0; -volatile uint8_t tbUpCnt = 0; -volatile uint8_t tbDnCnt = 0; -volatile uint8_t tbLtCnt = 0; -volatile uint8_t tbRtCnt = 0; +volatile uint8_t tbUpCnt = 0; +volatile uint8_t tbDnCnt = 0; +volatile uint8_t tbLtCnt = 0; +volatile uint8_t tbRtCnt = 0; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -117,12 +114,11 @@ static matrix_row_t raw_matrix[MATRIX_ROWS]; // Debouncing: store for each key the number of scans until it's eligible to // change. When scanning the matrix, ignore any changes in keys that have // already changed in the last DEBOUNCE scans. -static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; static matrix_row_t read_cols(uint8_t row); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); static void enableInterrupts(void); static uint8_t mcp23018_reset_loop; @@ -134,11 +130,9 @@ uint32_t matrix_scan_count; #endif -__attribute__ ((weak)) -void matrix_init_user(void) {} +__attribute__ ((weak)) void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) {} +__attribute__ ((weak)) void matrix_scan_user(void) {} __attribute__ ((weak)) void matrix_init_kb(void) { @@ -150,39 +144,28 @@ void matrix_scan_kb(void) { matrix_scan_user(); } -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } -void matrix_init(void) -{ +void matrix_init(void) { // initialize row and col mcp23018_status = init_mcp23018(); unselect_rows(); init_cols(); - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - raw_matrix[i] = 0; - for (uint8_t j=0; j < MATRIX_COLS; ++j) { - debounce_matrix[i * MATRIX_COLS + j] = 0; - } - } + // initialize matrix state: all keys off + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + raw_matrix[i] = 0; + } #ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); + matrix_timer = timer_read32(); matrix_scan_count = 0; #endif + debounce_init(MATRIX_ROWS); matrix_init_quantum(); } @@ -198,135 +181,125 @@ void matrix_power_up(void) { } #ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); + matrix_timer = timer_read32(); matrix_scan_count = 0; #endif } -// Returns a matrix_row_t whose bits are set if the corresponding key should be -// eligible to change in this scan. -matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) { - matrix_row_t result = 0; - matrix_row_t change = rawcols ^ raw_matrix[row]; - raw_matrix[row] = rawcols; - for (uint8_t i = 0; i < MATRIX_COLS; ++i) { - if (debounce_matrix[row * MATRIX_COLS + i]) { - --debounce_matrix[row * MATRIX_COLS + i]; - } else { - result |= (1 << i); - } - if (change & (1 << i)) { - debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE; - } +// Reads and stores a row, returning +// whether a change occurred. +static inline bool store_raw_matrix_row(uint8_t index) { + matrix_row_t temp = read_cols(index); + if (raw_matrix[index] != temp) { + raw_matrix[index] = temp; + return true; } - return result; + return false; } -matrix_row_t debounce_read_cols(uint8_t row) { - // Read the row without debouncing filtering and store it for later usage. - matrix_row_t cols = read_cols(row); - // Get the Debounce mask. - matrix_row_t mask = debounce_mask(cols, row); - // debounce the row and return the result. - return (cols & mask) | (matrix[row] & ~mask);; -} -uint8_t matrix_scan(void) -{ - // TODO: Find what is trashing interrupts - enableInterrupts(); - - // First we handle the mouse inputs - #ifdef BALLER - uint8_t pBtn = PINE & TRKBTN; - - #ifdef DEBUG_BALLER - // Compare to previous, mod report - if (tbUpCnt + tbDnCnt + tbLtCnt + tbRtCnt != 0) - xprintf("U: %d D: %d L: %d R: %d B: %d\n", tbUpCnt, tbDnCnt, tbLtCnt, tbRtCnt, (trkBtnState >> 6)); - #endif - - // Modify the report - report_mouse_t pRprt = pointing_device_get_report(); - - // Scroll by default, move on layer - if (layer_state == 0) { + +uint8_t matrix_scan(void) { + // TODO: Find what is trashing interrupts + enableInterrupts(); + + // First we handle the mouse inputs +#ifdef BALLER + uint8_t pBtn = PINE & TRKBTN; + + #ifdef DEBUG_BALLER + // Compare to previous, mod report + if (tbUpCnt + tbDnCnt + tbLtCnt + tbRtCnt != 0) + xprintf("U: %d D: %d L: %d R: %d B: %d\n", tbUpCnt, tbDnCnt, tbLtCnt, tbRtCnt, (trkBtnState >> 6)); + #endif + + // Modify the report + report_mouse_t pRprt = pointing_device_get_report(); + + // Scroll by default, move on layer + if (layer_state == 0) { pRprt.h += tbLtCnt * SCROLLSTEP; tbLtCnt = 0; pRprt.h -= tbRtCnt * SCROLLSTEP; tbRtCnt = 0; pRprt.v -= tbUpCnt * SCROLLSTEP; tbUpCnt = 0; pRprt.v += tbDnCnt * SCROLLSTEP; tbDnCnt = 0; - } else { + } else { pRprt.x -= tbLtCnt * TRKSTEP * (layer_state - 1); tbLtCnt = 0; pRprt.x += tbRtCnt * TRKSTEP * (layer_state - 1); tbRtCnt = 0; pRprt.y -= tbUpCnt * TRKSTEP * (layer_state - 1); tbUpCnt = 0; pRprt.y += tbDnCnt * TRKSTEP * (layer_state - 1); tbDnCnt = 0; - } + } - #ifdef DEBUG_BALLER - if (pRprt.x != 0 || pRprt.y != 0) - xprintf("X: %d Y: %d\n", pRprt.x, pRprt.y); - #endif - - if ((pBtn != trkBtnState) && ((pBtn >> 6) == 0)) pRprt.buttons |= MOUSE_BTN1; - if ((pBtn != trkBtnState) && ((pBtn >> 6) == 1)) pRprt.buttons &= ~MOUSE_BTN1; - - // Save state, push update - if (pRprt.x != 0 || pRprt.y != 0 || pRprt.h != 0 || pRprt.v != 0 || (trkBtnState != pBtn)) - pointing_device_set_report(pRprt); - - trkBtnState = pBtn; - #endif - - // Then the keyboard - if (mcp23018_status) { // if there was an error - if (++mcp23018_reset_loop == 0) { - // if (++mcp23018_reset_loop >= 1300) { - // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans - // this will be approx bit more frequent than once per second - print("trying to reset mcp23018\n"); - mcp23018_status = init_mcp23018(); - if (mcp23018_status) { - print("left side not responding\n"); - } else { - print("left side attached\n"); - } - } - } +#ifdef DEBUG_BALLER + if (pRprt.x != 0 || pRprt.y != 0) + xprintf("X: %d Y: %d\n", pRprt.x, pRprt.y); +#endif + + if ((pBtn != trkBtnState) && ((pBtn >> 6) == 0)) pRprt.buttons |= MOUSE_BTN1; + if ((pBtn != trkBtnState) && ((pBtn >> 6) == 1)) pRprt.buttons &= ~MOUSE_BTN1; + + // Save state, push update + if (pRprt.x != 0 || pRprt.y != 0 || pRprt.h != 0 || pRprt.v != 0 || (trkBtnState != pBtn)) + pointing_device_set_report(pRprt); + + trkBtnState = pBtn; +#endif + + // Then the keyboard + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + // if (++mcp23018_reset_loop >= 1300) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + } + } + } #ifdef DEBUG_MATRIX_SCAN_RATE matrix_scan_count++; + uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { + if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) { print("matrix scan frequency: "); pdec(matrix_scan_count); print("\n"); - matrix_timer = timer_now; + matrix_timer = timer_now; matrix_scan_count = 0; } #endif + + bool changed = false; for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) { - select_row(i); - // and select on left hand - select_row(i + MATRIX_ROWS_PER_SIDE); + // select rows from left and right hands + uint8_t left_index = i; + uint8_t right_index = i + MATRIX_ROWS_PER_SIDE; + select_row(left_index); + select_row(right_index); + // we don't need a 30us delay anymore, because selecting a // left-hand row requires more than 30us for i2c. - // grab cols from left hand - matrix[i] = debounce_read_cols(i); - // grab cols from right hand - matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE); + changed |= store_raw_matrix_row(left_index); + changed |= store_raw_matrix_row(right_index); unselect_rows(); } + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); matrix_scan_quantum(); + enableInterrupts(); #ifdef DEBUG_MATRIX - for (uint8_t c = 0; c < MATRIX_COLS; c++) - for (uint8_t r = 0; r < MATRIX_ROWS; r++) + for (uint8_t c = 0; c < MATRIX_COLS; c++) + for (uint8_t r = 0; r < MATRIX_ROWS; r++) if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c); #endif @@ -338,20 +311,11 @@ bool matrix_is_modified(void) // deprecated and evidently not called. return true; } -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<. #define MATRIX_COL_PINS { D7, F7, F6, F5, F4, F1, F0, E6, B0, B7, D0, D1, D2, D3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN D4 diff --git a/keyboards/ps2avrGB/config.h b/keyboards/gray_studio/hb85/config.h similarity index 72% rename from keyboards/ps2avrGB/config.h rename to keyboards/gray_studio/hb85/config.h index c0de5a2116b9..da230f7e8d5e 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/gray_studio/hb85/config.h @@ -15,24 +15,20 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D -// TODO: share these strings with usbconfig.h -// Edit usbconfig.h to change these. -#define MANUFACTURER winkeyless.kr -#define PRODUCT ps2avrGB +#define PRODUCT_ID 0x422F +#define MANUFACTURER Gray Studio +#define PRODUCT HB85 /* matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 15 -#define RGBLED_NUM 16 -#define RGBLIGHT_ANIMATIONS - -#define NO_UART 1 -#define BOOTLOADHID_BOOTLOADER 1 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define DIODE_DIRECTION COL2ROW -#endif +#define RGBLED_NUM 5 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/gray_studio/hb85/hb85.c b/keyboards/gray_studio/hb85/hb85.c new file mode 100644 index 000000000000..3e4202358786 --- /dev/null +++ b/keyboards/gray_studio/hb85/hb85.c @@ -0,0 +1,75 @@ +/* +Copyright 2017 Luiz Ribeiro , + 2019 fcoury + +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 . +*/ + +#include + +#include "rgblight.h" + +#include "i2c_master.h" +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} +#endif + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn RGB LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn RGB LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} diff --git a/keyboards/gray_studio/hb85/hb85.h b/keyboards/gray_studio/hb85/hb85.h new file mode 100644 index 000000000000..48808105f438 --- /dev/null +++ b/keyboards/gray_studio/hb85/hb85.h @@ -0,0 +1,100 @@ +/* +Copyright 2019 fcoury , MechMerlin + +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 . +*/ + +#pragma once + +#include "quantum.h" + +// Generic layout enabling splits, and all positions available in STT, Basic, and AOP. + +#define LAYOUT_all( \ + K0C, K0B, K0A, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0E, \ + K1E, K1D, K1C, K1B, K1A, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K59, K58, K57, \ + K2E, K2D, K2C, K2B, K2A, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K56, K55, \ + K3E, K3D, K3C, K3B, K3A, K30, K31, K32, K33, K34, K35, K36, K37, K39, K76, K75, \ + K4E, K4D, K4C, K4B, K4A, K40, K41, K42, K43, K44, K45, K48, K46, K47, K49, K78, K77, \ + K6D, K6C, K61, K64, K65, K66, K67, K68, K69, K79 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, KC_NO, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K55, K56, K57, K58, K59, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, K67, K68, K69, KC_NO, KC_NO, K6C, K6D, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K75, K76, K77, K78, K79, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ +} + +// Layout with blocker + +#define LAYOUT_stt( \ + K0C, K0B, K0A, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0E, \ + K1E, K1D, K1C, K1B, K1A, K10, K11, K12, K13, K14, K15, K16, K17, K18, K59, K58, K57, \ + K2E, K2D, K2C, K2B, K2A, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K56, K55, \ + K3E, K3D, K3C, K3B, K3A, K30, K31, K32, K33, K34, K35, K36, K37, K39, K76, K75, \ + K4E, K4C, K4B, K4A, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K78, K77, \ + K6D, K6C, K61, K64, K65, K67, K68, K69, K79 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, KC_NO, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, KC_NO, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K55, K56, K57, K58, K59, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, K61, KC_NO, KC_NO, K64, K65, KC_NO, K67, K68, K69, KC_NO, KC_NO, K6C, K6D, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K75, K76, K77, K78, K79, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +} + +#define LAYOUT_basic( \ + K0C, K0B, K0A, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0E, \ + K1E, K1D, K1C, K1B, K1A, K10, K11, K12, K13, K14, K15, K16, K17, K18, K59, K58, K57, \ + K2E, K2D, K2C, K2B, K2A, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K56, K55, \ + K3E, K3D, K3C, K3B, K3A, K30, K31, K32, K33, K34, K35, K36, K37, K39, K76, K75, \ + K4E, K4C, K4B, K4A, K40, K41, K42, K43, K44, K45, K46, K47, K49, K77, \ + K6D, K6C, K61, K64, K65 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, KC_NO, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, KC_NO, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K4A, K4B, K4C, KC_NO, K4E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K55, K56, K57, K58, K59, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, K61, KC_NO, KC_NO, K64, K65, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K6C, K6D, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K75, K76, K77, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +} + +#define LAYOUT_aop( \ + K0C, K0B, K0A, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0E, \ + K1E, K1D, K1C, K1B, K1A, K10, K11, K12, K13, K14, K15, K16, K17, K18, K59, K58, K57, \ + K2E, K2D, K2C, K2B, K2A, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K56, K55, \ + K3E, K3D, K3C, K3B, K3A, K30, K31, K32, K33, K34, K35, K36, K37, K39, K76, K75, \ + K4E, K4C, K4B, K4A, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K78, K77, \ + K6D, K6C, K61, K64, K65, K66, K67, K68, K69, K79 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, KC_NO, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, KC_NO, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K55, K56, K57, K58, K59, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, K67, K68, K69, KC_NO, KC_NO, K6C, K6D, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K75, K76, K77, K78, K79, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +} diff --git a/keyboards/gray_studio/hb85/info.json b/keyboards/gray_studio/hb85/info.json new file mode 100644 index 000000000000..3c7ac9c43cc1 --- /dev/null +++ b/keyboards/gray_studio/hb85/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "Gray Studio HB85", + "url": "", + "maintainer": "qmk", + "width": 18, + "height": 6.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":1.5, "y":0}, {"x":2.75, "y":0}, {"x":3.75, "y":0}, {"x":4.75, "y":0}, {"x":5.75, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25}, {"x":14, "y":1.25}, {"x":15, "y":1.25}, {"x":16, "y":1.25}, {"x":17, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15, "y":2.25}, {"x":16, "y":2.25}, {"x":17, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25}, {"x":17, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13, "y":5.25}, {"x":14, "y":5.25}, {"x":15, "y":5.25}, {"x":16, "y":5.25}] + }, + + "LAYOUT_stt": { + "layout": [{"x":1.5, "y":0}, {"x":2.75, "y":0}, {"x":3.75, "y":0}, {"x":4.75, "y":0}, {"x":5.75, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15, "y":1.25}, {"x":16, "y":1.25}, {"x":17, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15, "y":2.25}, {"x":16, "y":2.25}, {"x":17, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25}, {"x":17, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25, "w":1.25}, {"x":11.25, "y":5.25, "w":1.25}, {"x":13, "y":5.25}, {"x":14, "y":5.25}, {"x":15, "y":5.25}, {"x":16, "y":5.25}] + }, + + "LAYOUT_basic": { + "layout": [{"x":1.5, "y":0}, {"x":2.75, "y":0}, {"x":3.75, "y":0}, {"x":4.75, "y":0}, {"x":5.75, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15, "y":1.25}, {"x":16, "y":1.25}, {"x":17, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15, "y":2.25}, {"x":16, "y":2.25}, {"x":17, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25}, {"x":17, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":2.75}, {"x":15, "y":4.25, "w":2}, {"x":17, "y":4.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25, "w":1.25}, {"x":11.25, "y":5.25, "w":1.25}] + }, + + "LAYOUT_aop": { + "layout": [{"x":1.5, "y":0}, {"x":2.75, "y":0}, {"x":3.75, "y":0}, {"x":4.75, "y":0}, {"x":5.75, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}, {"x":3, "y":1.25}, {"x":4, "y":1.25}, {"x":5, "y":1.25}, {"x":6, "y":1.25}, {"x":7, "y":1.25}, {"x":8, "y":1.25}, {"x":9, "y":1.25}, {"x":10, "y":1.25}, {"x":11, "y":1.25}, {"x":12, "y":1.25}, {"x":13, "y":1.25, "w":2}, {"x":15, "y":1.25}, {"x":16, "y":1.25}, {"x":17, "y":1.25}, {"x":0, "y":2.25, "w":1.5}, {"x":1.5, "y":2.25}, {"x":2.5, "y":2.25}, {"x":3.5, "y":2.25}, {"x":4.5, "y":2.25}, {"x":5.5, "y":2.25}, {"x":6.5, "y":2.25}, {"x":7.5, "y":2.25}, {"x":8.5, "y":2.25}, {"x":9.5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.25}, {"x":12.5, "y":2.25}, {"x":13.5, "y":2.25, "w":1.5}, {"x":15, "y":2.25}, {"x":16, "y":2.25}, {"x":17, "y":2.25}, {"x":0, "y":3.25, "w":1.75}, {"x":1.75, "y":3.25}, {"x":2.75, "y":3.25}, {"x":3.75, "y":3.25}, {"x":4.75, "y":3.25}, {"x":5.75, "y":3.25}, {"x":6.75, "y":3.25}, {"x":7.75, "y":3.25}, {"x":8.75, "y":3.25}, {"x":9.75, "y":3.25}, {"x":10.75, "y":3.25}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3.25, "w":2.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25}, {"x":17, "y":3.25}, {"x":0, "y":4.25, "w":2.25}, {"x":2.25, "y":4.25}, {"x":3.25, "y":4.25}, {"x":4.25, "y":4.25}, {"x":5.25, "y":4.25}, {"x":6.25, "y":4.25}, {"x":7.25, "y":4.25}, {"x":8.25, "y":4.25}, {"x":9.25, "y":4.25}, {"x":10.25, "y":4.25}, {"x":11.25, "y":4.25}, {"x":12.25, "y":4.25, "w":1.75}, {"x":14, "y":4.25}, {"x":15, "y":4.25}, {"x":16, "y":4.25}, {"x":17, "y":4.25}, {"x":1.25, "y":5.25, "w":1.25}, {"x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"x":10, "y":5.25}, {"x":11, "y":5.25}, {"x":12, "y":5.25}, {"x":13, "y":5.25}, {"x":14, "y":5.25}, {"x":15, "y":5.25}, {"x":16, "y":5.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/gray_studio/hb85/keymaps/default/keymap.c b/keyboards/gray_studio/hb85/keymaps/default/keymap.c new file mode 100644 index 000000000000..be89cbbf6a81 --- /dev/null +++ b/keyboards/gray_studio/hb85/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* +Copyright 2019 Felipe Coury + +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 . +*/ + +#include QMK_KEYBOARD_H + +// Layer shorthand +enum layers { + _BASE = 0, // Base + _CTRL // Multimedia and RGB +}; + +#define KC_TGCT MO(_CTRL) // Toggles CTRL layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_ESC , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_TGCT, \ +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_BSPC, KC_PSLS, KC_PAST, KC_PMNS, \ +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_P7 , KC_P8 , KC_P9 , \ +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_P4 , KC_P5 , KC_P6 , \ +KC_LSFT, KC_NO , KC_Z , KC_Z , KC_X , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_P1 , KC_P2 , KC_P3 , \ + KC_LCTL, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT \ + ), + + [_CTRL] = LAYOUT_all( + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ +_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, \ +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; diff --git a/keyboards/gray_studio/hb85/keymaps/stt/keymap.c b/keyboards/gray_studio/hb85/keymaps/stt/keymap.c new file mode 100644 index 000000000000..5665e2f0e1f4 --- /dev/null +++ b/keyboards/gray_studio/hb85/keymaps/stt/keymap.c @@ -0,0 +1,38 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_stt( + 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, MO(1), \ + 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_PSLS, KC_PAST, KC_PMNS, \ + 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_P7, KC_P8, KC_P9, \ + 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_P4, KC_P5, KC_P6, \ + 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_P1, KC_P2, KC_P3, \ + KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 \ + ), + + [1] = LAYOUT_stt( + RESET, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + BL_TOGG, BL_STEP, BL_INC, BL_DEC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, 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 \ + ), +}; diff --git a/keyboards/gray_studio/hb85/readme.md b/keyboards/gray_studio/hb85/readme.md new file mode 100644 index 000000000000..c0c2fdf37104 --- /dev/null +++ b/keyboards/gray_studio/hb85/readme.md @@ -0,0 +1,48 @@ +# Gray Studio HB85 + +![Gray Studio HB85](https://i.imgur.com/Sk3cupR.jpg) + +A Sony HitBit MSX Computer inspired Keyboard. + +Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury) +Hardware Supported: Gray Studio HB85 +Hardware Availability: [Group buy](https://en.zfrontier.com/products/gray-hb85) finished + +Make example for this keyboard (after setting up your build environment): + + make gray_studio/hb85:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`, commonly programmed as F3 while plugging in the keyboard. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +**Please Note:** You will need to use the `EEP_RST` keycode first, followed by unplugging/replugging the board to get RGB underglow effects to work. + +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). diff --git a/keyboards/gray_studio/hb85/rules.mk b/keyboards/gray_studio/hb85/rules.mk new file mode 100644 index 000000000000..c3e17e4932d3 --- /dev/null +++ b/keyboards/gray_studio/hb85/rules.mk @@ -0,0 +1,48 @@ +# Copyright 2019 fcoury +# +# 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 . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +SRC += i2c_master.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/gray_studio/hb85/usbconfig.h b/keyboards/gray_studio/hb85/usbconfig.h new file mode 100644 index 000000000000..c52c90ce8a5a --- /dev/null +++ b/keyboards/gray_studio/hb85/usbconfig.h @@ -0,0 +1,393 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#pragma once + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'G', 'r', 'a', 'y', ' ', 'S', 't', 'u', 'd', 'i', 'o' +#define USB_CFG_VENDOR_NAME_LEN 11 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'H', 'B', '8', '5' +#define USB_CFG_DEVICE_NAME_LEN 4 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h index 356e6a8cd809..e6d9f235d813 100644 --- a/keyboards/gray_studio/space65/config.h +++ b/keyboards/gray_studio/space65/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B0, B3, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* @@ -66,7 +66,7 @@ along with this program. If not, see . #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ // /*== all animations enable ==*/ -// #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_ANIMATIONS // /*== or choose animations ==*/ // #define RGBLIGHT_EFFECT_BREATHING // #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/gray_studio/space65/rules.mk b/keyboards/gray_studio/space65/rules.mk index 0ede67719f76..10bd7cf03563 100644 --- a/keyboards/gray_studio/space65/rules.mk +++ b/keyboards/gray_studio/space65/rules.mk @@ -64,8 +64,8 @@ BOOTLOADER = atmel-dfu BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work diff --git a/keyboards/h87a/h87a.h b/keyboards/h87a/h87a.h deleted file mode 100644 index 8aa3e160e67c..000000000000 --- a/keyboards/h87a/h87a.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright 2018 Josh Hinnebusch - * - * 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 . - */ -#ifndef H87A_H -#define H87A_H - -#include "quantum.h" - -// This a shortcut to help you visually see your layout. -// The following is an example using the Planck MIT layout -// The first section contains all of the arguments -// The second converts the arguments into a two-dimensional array -#define LAYOUT_all(\ - K000, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \ - K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \ - K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \ - K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K076, \ - K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K088, \ - K100, K110, K101, K113, K105, K115, K106, K116, K117, K108, K118 \ -) { \ - { K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \ - { KC_NO, K011, K012, K013, K014, K015, K016, K017, K018 }, \ - { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ - { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ - { K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \ - { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ - { K060, K061, K062, K063, K064, K065, K066, KC_NO, KC_NO }, \ - { K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \ - { K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \ - { K090, K091, K092, K093, K094, K095, K096, KC_NO, KC_NO }, \ - { K100, K101, KC_NO, KC_NO, KC_NO, K105, K106, KC_NO, K108 }, \ - { K110, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \ -} - -#endif diff --git a/keyboards/h87a/info.json b/keyboards/h87a/info.json deleted file mode 100644 index cf3e81dd3a40..000000000000 --- a/keyboards/h87a/info.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keyboard_name": "h87a", - "url": "", - "maintainer": "hineybush", - "width": 18.25, - "height": 6.5, - "layouts": { - "LAYOUT_all": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"x":13, "y":1.5}, {"x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] - } - } -} \ No newline at end of file diff --git a/keyboards/hadron/ver2/keymaps/default/keymap.c b/keyboards/hadron/ver2/keymaps/default/keymap.c index cc79f52671ce..9d96abd8db5c 100644 --- a/keyboards/hadron/ver2/keymaps/default/keymap.c +++ b/keyboards/hadron/ver2/keymaps/default/keymap.c @@ -1,7 +1,4 @@ #include QMK_KEYBOARD_H -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif #ifdef USE_I2C #include "i2c.h" #endif @@ -46,9 +43,6 @@ enum macro_keycodes { KC_DEMOMACRO, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl @@ -445,4 +439,4 @@ void iota_gfx_task_user(void) { matrix_update(&display, &matrix); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/hadron/ver2/keymaps/readme.md b/keyboards/hadron/ver2/keymaps/readme.md index 54fb5f6d9e07..2f7641d185f5 100644 --- a/keyboards/hadron/ver2/keymaps/readme.md +++ b/keyboards/hadron/ver2/keymaps/readme.md @@ -20,4 +20,3 @@ When adding your keymap to this list, keep it organised alphabetically (select l # List of Planck keymaps * **default** default Planck layout -* **cbbrowne** cbbrowne's Planck layout \ No newline at end of file diff --git a/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c index 248bb7ca6638..0e5ab74533f0 100644 --- a/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c +++ b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c @@ -47,9 +47,6 @@ enum macro_keycodes { KC_DEMOMACRO, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl diff --git a/keyboards/hadron/ver3/chconf.h b/keyboards/hadron/ver3/chconf.h index 1d9f12ff1f8b..ce44925f3c72 100644 --- a/keyboards/hadron/ver3/chconf.h +++ b/keyboards/hadron/ver3/chconf.h @@ -48,7 +48,7 @@ * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ -#define CH_CFG_ST_FREQUENCY 100000 +#define CH_CFG_ST_FREQUENCY 1000 /** * @brief Time delta constant for the tick-less mode. @@ -58,7 +58,7 @@ * The value one is not valid, timeouts are rounded up to * this value. */ -#define CH_CFG_ST_TIMEDELTA 2 +#define CH_CFG_ST_TIMEDELTA 0 /** @} */ diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index d6c3830dfd42..82081ba4370b 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -27,6 +27,28 @@ #define MATRIX_ROWS 5 #define MATRIX_COLS 15 +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS + +#define MATRIX_ROW_PINS { C15, C14, A10, A9, A8 } +#define MATRIX_COL_PINS { B8, B2, B10, A0, A1, A2, B0, A3, B1, A6, A7, B12, C13, B11, B9 } +#define UNUSED_PINS + +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { B13 } +#define ENCODERS_PAD_B { B14 } + + //Audio #undef AUDIO_VOICES #undef C6_AUDIO @@ -55,16 +77,6 @@ #define micro_oled_rotate_180 #endif -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 6 @@ -185,11 +197,14 @@ #define ZC_DET_TIME 0 #define AUTO_CAL_TIME 3 -//#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_ANIMATIONS + +#define RGBLED_NUM 10 +#define RGB_DI_PIN B5 +#define DRIVER_LED_TOTAL RGBLED_NUM + +// #define RGB_MATRIX_KEYPRESSES -//#define RGBLED_NUM 10 -//#define RGB_DI_PIN B5 -//#define DRIVER_LED_TOTAL RGBLED_NUM +#define SOLENOID_PIN A14 -//#define RGB_MATRIX_KEYPRESSES #endif diff --git a/keyboards/hadron/ver3/halconf.h b/keyboards/hadron/ver3/halconf.h index c3e0cbb728c7..a14ace02b4b0 100644 --- a/keyboards/hadron/ver3/halconf.h +++ b/keyboards/hadron/ver3/halconf.h @@ -111,7 +111,7 @@ * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM TRUE #endif /** diff --git a/keyboards/hadron/ver3/keymaps/default/keymap.c b/keyboards/hadron/ver3/keymaps/default/keymap.c index 11761b3210bd..9afddba26a99 100644 --- a/keyboards/hadron/ver3/keymaps/default/keymap.c +++ b/keyboards/hadron/ver3/keymaps/default/keymap.c @@ -33,9 +33,6 @@ enum macro_keycodes { KC_DEMOMACRO, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl @@ -178,20 +175,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust (Lower + Raise) * ,------+------+------+------+------+------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * | Reset|HPT TG|HPT FB|HPT M+|HPT M-|HPT RS| | | | | |EEP RS| * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. - * | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del | + * | |RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk| | | | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | BL + |BL ST |BL TG | + * | |Voice-|Voice+|Mus on|Musoff| | | | | | |BL - | BL + |BL ST |BL TG | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | + * | | | | | | | | | | | |CK RS |CK - |CK + |CK TG | * `--------------------------------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \ + RESET, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST , _______, _______, _______, _______, _______, EEP_RST, \ + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG\ diff --git a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c index 641c0162473f..51062acc2277 100644 --- a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c +++ b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c @@ -153,19 +153,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust (Lower + Raise) * ,------+------+------+------+------+------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + * | Reset|HPT TG|HPT FB|HPT M+|HPT M-|HPT RS| | | | | |EEP RS| * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. - * | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del | + * | |RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| * | | | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk| | | | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff| | | | | | | | BL + |BL ST |BL TG | + * | |Voice-|Voice+|Mus on|Musoff| | | | | | |BL - | BL + |BL ST |BL TG | * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | + * | | | | | | | | | | | |CK RS |CK - |CK + |CK TG | * `--------------------------------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_wrapper( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST, _______, _______, _______, _______, _______, EEP_RST, \ RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \ _______, MAGIC_TOGGLE_NKRO, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \ diff --git a/keyboards/hadron/ver3/keymaps/readme.md b/keyboards/hadron/ver3/keymaps/readme.md index 54fb5f6d9e07..66bf06b7111e 100644 --- a/keyboards/hadron/ver3/keymaps/readme.md +++ b/keyboards/hadron/ver3/keymaps/readme.md @@ -17,7 +17,8 @@ When adding your keymap to this list, keep it organised alphabetically (select l * **folder_name** description -# List of Planck keymaps +# List of Hadron keymaps -* **default** default Planck layout -* **cbbrowne** cbbrowne's Planck layout \ No newline at end of file +* **default** default Hadron layout +* **ishtob** ishtob's Hadron layout +* **sebaslayout** sebaslayout's Hadron layout \ No newline at end of file diff --git a/keyboards/hadron/ver3/matrix.c b/keyboards/hadron/ver3/matrix.c deleted file mode 100644 index 329d1328aba0..000000000000 --- a/keyboards/hadron/ver3/matrix.c +++ /dev/null @@ -1,195 +0,0 @@ -#include -#include "hal.h" -#include "timer.h" -#include "wait.h" -#include "printf.h" -#include "backlight.h" -#include "matrix.h" -#include "action.h" -#include "keycode.h" - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_COLS]; -static bool debouncing = false; -static uint16_t debouncing_time = 0; - -static uint8_t encoder_state = 0; -static int8_t encoder_value = 0; -static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 }; - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -void matrix_init(void) { - printf("matrix init\n"); - //debug_matrix = true; - - // encoder setup - palSetPadMode(GPIOB, 13, PAL_MODE_INPUT_PULLUP); - palSetPadMode(GPIOB, 14, PAL_MODE_INPUT_PULLUP); - - encoder_state = (palReadPad(GPIOB, 13) << 0) | (palReadPad(GPIOB, 14) << 1); - - // actual matrix setup - palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 0, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 1, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 2, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 3, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 6, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 12, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 13, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 9, PAL_MODE_OUTPUT_PUSHPULL); - - palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 9, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 8, PAL_MODE_INPUT_PULLDOWN); - - - memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t)); - - - matrix_init_quantum(); -} - -__attribute__ ((weak)) -void encoder_update(bool clockwise) { } - -#ifndef ENCODER_RESOLUTION - #define ENCODER_RESOLUTION 4 -#endif - -uint8_t matrix_scan(void) { - // encoder on B13 and B14 - encoder_state <<= 2; - encoder_state |= (palReadPad(GPIOB, 13) << 0) | (palReadPad(GPIOB, 14) << 1); - encoder_value += encoder_LUT[encoder_state & 0xF]; - if (encoder_value >= ENCODER_RESOLUTION) { - encoder_update(0); - } - if (encoder_value <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise - encoder_update(1); - } - encoder_value %= ENCODER_RESOLUTION; - - // actual matrix - for (int col = 0; col < MATRIX_COLS; col++) { - matrix_row_t data = 0; - - // strobe col { PB8, PB2, PB10, PA0, PA1, PA2, PB0, PA3, PB1, PA6, PA7, PB1, PA6, PA7, PB12, PC3, PB11, } - switch (col) { - case 0: palSetPad(GPIOB, 8); break; - case 1: palSetPad(GPIOB, 2); break; - case 2: palSetPad(GPIOB, 10); break; - case 3: palSetPad(GPIOA, 0); break; - case 4: palSetPad(GPIOA, 1); break; - case 5: palSetPad(GPIOA, 2); break; - case 6: palSetPad(GPIOB, 0); break; - case 7: palSetPad(GPIOA, 3); break; - case 8: palSetPad(GPIOB, 1); break; - case 9: palSetPad(GPIOA, 6); break; - case 10: palSetPad(GPIOA, 7); break; - case 11: palSetPad(GPIOB, 12); break; - case 12: palSetPad(GPIOC, 13); break; - case 13: palSetPad(GPIOB, 11); break; - case 14: palSetPad(GPIOB, 9); break; - } - - // need wait to settle pin state - wait_us(20); - - // read row data { PC15, PC14, PA10, PA9, PA8 } - data = ( - (palReadPad(GPIOC, 15) << 0 ) | - (palReadPad(GPIOC, 14) << 1 ) | - (palReadPad(GPIOA, 10) << 2 ) | - (palReadPad(GPIOA, 9) << 3 ) | - (palReadPad(GPIOA, 8) << 4 ) - ); - - // unstrobe col { PB8, PB2, PB10, PA0, PA1, PA2, PB0, PA3, PB1, PA6, PA7, PB1, PA6, PA7, PB12, PC3, PB11, } - switch (col) { - case 0: palClearPad(GPIOB, 8); break; - case 1: palClearPad(GPIOB, 2); break; - case 2: palClearPad(GPIOB, 10); break; - case 3: palClearPad(GPIOA, 0); break; - case 4: palClearPad(GPIOA, 1); break; - case 5: palClearPad(GPIOA, 2); break; - case 6: palClearPad(GPIOB, 0); break; - case 7: palClearPad(GPIOA, 3); break; - case 8: palClearPad(GPIOB, 1); break; - case 9: palClearPad(GPIOA, 6); break; - case 10: palClearPad(GPIOA, 7); break; - case 11: palClearPad(GPIOB, 12); break; - case 12: palClearPad(GPIOC, 13); break; - case 13: palClearPad(GPIOB, 11); break; - case 14: palClearPad(GPIOB, 9); break; - } - - if (matrix_debouncing[col] != data) { - matrix_debouncing[col] = data; - debouncing = true; - debouncing_time = timer_read(); - } - } - - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int row = 0; row < MATRIX_ROWS; row++) { - matrix[row] = 0; - for (int col = 0; col < MATRIX_COLS; col++) { - matrix[row] |= ((matrix_debouncing[col] & (1 << row) ? 1 : 0) << col); - } - } - debouncing = false; - } - - matrix_scan_quantum(); - - return 1; -} - -bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & (1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in /os/hal/boards/ -# or /boards -BOARD = GENERIC_STM32_F303XC +# projecct specific files # Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 -OPT_DEFS = - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +MCU = STM32F303 # Build Options # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration +COMMAND_ENABLE = yes # Commands for debug and configuration #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover -CUSTOM_MATRIX = yes # Custom matrix file +CUSTOM_MATRIX = no # Custom matrix file AUDIO_ENABLE = yes RGBLIGHT_ENABLE = no -HAPTIC_ENABLE = DRV2605L +RGB_MATRIX_ENABLE = no #WS2812 once arm_rgb is implemented +HAPTIC_ENABLE += DRV2605L QWIIC_ENABLE += MICRO_OLED +ENCODER_ENABLER = yes # SERIAL_LINK_ENABLE = yes diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c index 5e5e3e009f83..1491caba43f6 100644 --- a/keyboards/hadron/ver3/ver3.c +++ b/keyboards/hadron/ver3/ver3.c @@ -16,8 +16,30 @@ #include "ver3.h" #include "qwiic.h" #include "action_layer.h" -#include "matrix.h" -#include "DRV2605L.h" +#include "haptic.h" + +#ifdef RGB_MATRIX_ENABLE +#include "rgb_matrix.h" + +led_config_t g_led_config = { { + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, 6, NO_LED, NO_LED, 7, NO_LED, NO_LED, 8, NO_LED, NO_LED, 9, NO_LED, NO_LED, 0, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, 5, NO_LED, NO_LED, 4, NO_LED, NO_LED, 3, NO_LED, NO_LED, 2, NO_LED, NO_LED, 1, NO_LED } +}, { + { 195, 3 }, { 195, 16 }, { 150, 16 }, { 105, 16 }, { 60, 16 }, { 15, 16 }, { 15, 3 }, { 60, 3 }, { 105, 3 }, { 150, 3 } +}, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 +} }; + +#endif + +uint8_t *o_fb; + +uint16_t counterst = 0; + + #ifdef QWIIC_MICRO_OLED_ENABLE @@ -26,12 +48,12 @@ #define ScreenOffInterval 60000 /* milliseconds */ static uint16_t last_flush; -volatile uint8_t led_numlock = false; -volatile uint8_t led_capslock = false; +volatile uint8_t led_numlock = false; +volatile uint8_t led_capslock = false; volatile uint8_t led_scrolllock = false; static uint8_t layer; -static bool queue_for_send = false; +static bool queue_for_send = false; static uint8_t encoder_value = 32; __attribute__ ((weak)) @@ -41,22 +63,22 @@ void draw_ui(void) { send_command(DISPLAYON); /* Layer indicator is 41 x 10 pixels */ -#define LAYER_INDICATOR_X 0 -#define LAYER_INDICATOR_Y 0 +#define LAYER_INDICATOR_X 5 +#define LAYER_INDICATOR_Y 0 draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0); draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM); draw_char(LAYER_INDICATOR_X + 34, LAYER_INDICATOR_Y + 2, layer + 0x30, PIXEL_ON, XOR, 0); /* Matrix display is 19 x 9 pixels */ -#define MATRIX_DISPLAY_X 0 +#define MATRIX_DISPLAY_X 5 #define MATRIX_DISPLAY_Y 18 for (uint8_t x = 0; x < MATRIX_ROWS; x++) { for (uint8_t y = 0; y < MATRIX_COLS; y++) { draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); } - } + } draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM); /* hadron oled location on thumbnail */ draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM); @@ -135,7 +157,7 @@ void read_host_led_state(void) { if (led_capslock == false){ led_capslock = true;} } else { - if (led_capslock == true){ + if (led_capslock == true){ led_capslock = false;} } if (leds & (1 << USB_LED_SCROLL_LOCK)) { @@ -167,20 +189,12 @@ void encoder_update_kb(uint8_t index, bool clockwise) { #endif void matrix_init_kb(void) { -#ifdef DRV2605L - DRV_init(); -#endif queue_for_send = true; matrix_init_user(); } - -void matrix_scan_kb(void) { +void matrix_scan_kb(void) { if (queue_for_send) { - #ifdef DRV2605L - DRV_EFFECT play_eff = strong_click; - DRV_pulse(play_eff); - #endif #ifdef QWIIC_MICRO_OLED_ENABLE read_host_led_state(); draw_ui(); @@ -192,5 +206,10 @@ if (queue_for_send) { send_command(DISPLAYOFF); /* 0xAE */ } #endif + if (counterst == 0) { + //testPatternFB(o_fb); + } + counterst = (counterst + 1) % 1024; + //rgblight_task(); matrix_scan_user(); } diff --git a/keyboards/hadron/ver3/ver3.h b/keyboards/hadron/ver3/ver3.h index 516f7b9a1b9b..95926469bf8e 100644 --- a/keyboards/hadron/ver3/ver3.h +++ b/keyboards/hadron/ver3/ver3.h @@ -1,4 +1,4 @@ -/* Copyright 2018 Jack Humbert +/* Copyright 2018 ishtob * * 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 @@ -13,9 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef VER3_H -#define VER3_H +#pragma once -#include "hadron.h" - -#endif \ No newline at end of file +#include "hadron.h" \ No newline at end of file diff --git a/keyboards/halberd/config.h b/keyboards/halberd/config.h new file mode 100644 index 000000000000..ab46c4d8a0cf --- /dev/null +++ b/keyboards/halberd/config.h @@ -0,0 +1,232 @@ +/* Copyright 2019 ENDO Katsuhiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kagizaraya +#define PRODUCT Halberd +#define DESCRIPTION 40% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D6, D4, D5, E6 } +#define MATRIX_COL_PINS { D7, B4, C7, C6, B6, B5, F7, F6, F5, F4, F1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN F0 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 40 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) +*/ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +#define TAPPING_TERM 100 + + diff --git a/keyboards/halberd/halberd.c b/keyboards/halberd/halberd.c new file mode 100644 index 000000000000..8b59310a7fc5 --- /dev/null +++ b/keyboards/halberd/halberd.c @@ -0,0 +1,43 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#include "halberd.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/halberd/halberd.h b/keyboards/halberd/halberd.h new file mode 100644 index 000000000000..d2adb4a15cb6 --- /dev/null +++ b/keyboards/halberd/halberd.h @@ -0,0 +1,40 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + 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 \ +) \ +{ \ + { 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 }, \ + { KC_NO, KC_NO, K33, K34, K35, K36, K37, K38, K39, KC_NO, KC_NO } \ +} + diff --git a/keyboards/halberd/info.json b/keyboards/halberd/info.json new file mode 100644 index 000000000000..5e2a57f216d4 --- /dev/null +++ b/keyboards/halberd/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Halberd", + "url": "", + "maintainer": "ka2hiro", + "width": 11, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"!", "x":0, "y":0}, {"label":"@", "x":1, "y":0}, {"label":"#", "x":2, "y":0}, {"label":"$", "x":3, "y":0}, {"label":"%", "x":4, "y":0}, {"label":"Tab", "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":"Tab", "x":0, "y":1}, {"label":"_", "x":1, "y":1}, {"label":"+", "x":2, "y":1}, {"label":"|", "x":3, "y":1}, {"label":"~", "x":4, "y":1}, {"label":"BkSp", "x":5, "y":1}, {"label":":", "x":6, "y":1}, {"label":"\"", "x":7, "y":1}, {"label":">", "x":8, "y":1}, {"label":"{", "x":9, "y":1}, {"label":"}", "x":10, "y":1}, {"label":"Caps", "x":0, "y":2}, {"label":"-", "x":1, "y":2}, {"label":"=", "x":2, "y":2}, {"label":"\\", "x":3, "y":2}, {"label":"`", "x":4, "y":2}, {"label":"Enter", "x":5, "y":2}, {"label":";", "x":6, "y":2}, {"label":"'", "x":7, "y":2}, {"label":"<", "x":8, "y":2}, {"label":"[", "x":9, "y":2}, {"label":"]", "x":10, "y":2}, {"label":"GUI", "x":2, "y":3}, {"label":"Lower", "x":3, "y":3}, {"label":"Esc", "x":4, "y":3}, {"x":5, "y":3}, {"label":"Shift", "x":6, "y":3}, {"label":"Raise", "x":7, "y":3}, {"label":"Alt", "x":8, "y":3}] + } + } +} + diff --git a/keyboards/halberd/keymaps/default/config.h b/keyboards/halberd/keymaps/default/config.h new file mode 100644 index 000000000000..cea12f905cd2 --- /dev/null +++ b/keyboards/halberd/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/halberd/keymaps/default/keymap.c b/keyboards/halberd/keymaps/default/keymap.c new file mode 100644 index 000000000000..c79a81deff60 --- /dev/null +++ b/keyboards/halberd/keymaps/default/keymap.c @@ -0,0 +1,160 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * + * ,----------------------------------------------------------------------------. + * | Q | W | E | R | T | Tab | Y | U | I | O | P | + * |------+------+------+------+------|------|------+------+------+------+------| + * | A | S | D | F | G | BkSp | H | J | K | L | ; | + * |------+------+------+------+------|------|------+------+------+------+------| + * | Z | X | C | V | B | Enter| N | M | , | . | / | + * `-------------+------+------+------|------|------+------+------+------+------' + * | GUI | LOWER|Ctrl/Esc|Space|Shift| RAISE| Alt | + * `------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_LGUI, LOWER, MT(MOD_LCTL, KC_ESC), KC_SPC, KC_LSFT, RAISE, KC_LALT +), + +/* Raise + * + * ,----------------------------------------------------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+------+------|------|------+------+------+------+------| + * | Tab | _ | + | | | ~ | | : | " | > | { | } | + * |------+------+------+------+------|------|------+------+------+------+------| + * | Caps| - | = | \ | ` | | ; | ' | < | [ | ] | + * `-------------+------+------+------|------|------+------+------+------+------' + * | | LOWER| | | Esc | RAISE| | + * `------------------------------------------------' + */ +[_RAISE] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_TAB, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, _______, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR, + KC_CAPS, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, _______, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC, + _______, _______, _______, _______, _______, _______, _______ +), + +/* Lower + * + * ,----------------------------------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------|------|------+------+------+------+------| + * | Tab | | | |Enter | | Left | Down | Up | Right| Enter| + * |------+------+------+------+------|------|------+------+------+------+------| + * | Ctrl| | GUI | Alt | Del | | BkSp | PgUp | PgDn | | | + * `-------------+------+------+------|------|------+------+------+------+------' + * | | LOWER| | | | RAISE| | + * `------------------------------------------------' + */ +[_LOWER] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_TAB, _______, _______, _______, KC_ENT, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, + KC_LCTL, _______, KC_LGUI, KC_LALT, KC_DEL, _______, KC_BSPC, KC_PGUP, KC_PGDN, _______, _______, + _______, _______, _______, _______, _______, _______, _______ +), + + +/* Adjust (Lower + Raise) + * + * ,----------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------|------|------+------+------+------+------| + * | F11 | F12 | |RGBSAI|RGBSAD| |RGBVAI|RGBVAD| | | | + * |------+------+------+------+------|------|------+------+------+------+------| + * | Reset|RGBTOG|RGBMOD|RGBHUI|RGBHUD| | Prev | Next | Vol- | Vol+ | Play | + * `-------------+------+------+------|------|------+------+------+------+------' + * | | LOWER| | | | RAISE| | + * `------------------------------------------------' + */ +[_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F11, KC_F12, RGB_RMOD, RGB_SAI, RGB_SAD, _______, RGB_VAI, RGB_VAD, _______, _______, _______, + RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______ +) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + // persistant_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/halberd/keymaps/default/readme.md b/keyboards/halberd/keymaps/default/readme.md new file mode 100644 index 000000000000..567b45c47470 --- /dev/null +++ b/keyboards/halberd/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for halberd diff --git a/keyboards/halberd/keymaps/right_modifiers/config.h b/keyboards/halberd/keymaps/right_modifiers/config.h new file mode 100644 index 000000000000..cea12f905cd2 --- /dev/null +++ b/keyboards/halberd/keymaps/right_modifiers/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/halberd/keymaps/right_modifiers/keymap.c b/keyboards/halberd/keymaps/right_modifiers/keymap.c new file mode 100644 index 000000000000..f74eef454130 --- /dev/null +++ b/keyboards/halberd/keymaps/right_modifiers/keymap.c @@ -0,0 +1,160 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum layer_names { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * + * ,----------------------------------------------------------------------------. + * | Q | W | E | R | T | Y | U | I | O | P | BkSp | + * |------+------+------+------+------|------+------+------+------+------|------| + * | A | S | D | F | G | H | J | K | L | ; | Enter| + * |------+------+------+------+------|------+------+------+------+------|------| + * | Z | X | C | V | B | N | M | , | . | / | Shift| + * `-------------+------+------+------|------+------+------+------+------+------' + * | GUI | LOWER|Ctrl/Esc|Space| RAISE| Alt | Tab | + * `------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, + KC_LGUI, LOWER, MT(MOD_LCTL, KC_ESC), KC_SPC, RAISE, KC_LALT, KC_TAB +), + +/* Raise + * + * ,----------------------------------------------------------------------------. + * | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |------+------+------+------+------|------+------+------+------+------|------| + * | Tab | _ | + | | | ~ | : | " | > | { | } | | + * |------+------+------+------+------|------+------+------+------+------|------| + * | Caps| - | = | \ | ` | ; | ' | < | [ | ] | | + * `-------------+------+------+------|------+------+------+------+------+------' + * | | | | | | | | + * `------------------------------------------------' + */ +[_RAISE] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_TAB, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR, _______, + KC_CAPS, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, _______, _______ +), + +/* Lower + * + * ,----------------------------------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------|------+------+------+------+------|------| + * | Tab | | | |Enter | Left | Down | Up | Right| Enter| | + * |------+------+------+------+------|------+------+------+------+------|------| + * | Ctrl| | GUI | Alt | Del | BkSp | PgUp | PgDn | | | | + * `-------------+------+------+------|------+------+------+------+------+------' + * | | | | | | | | + * `------------------------------------------------' + */ +[_LOWER] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_TAB, _______, _______, _______, KC_ENT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, _______, + KC_LCTL, _______, KC_LGUI, KC_LALT, KC_DEL, KC_BSPC, KC_PGUP, KC_PGDN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ +), + + +/* Adjust (Lower + Raise) + * + * ,----------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------|------+------+------+------+------|------| + * | F11 | F12 | |RGBSAI|RGBSAD|RGBVAI|RGBVAD| | | | | + * |------+------+------+------+------|------+------+------+------+------|------| + * | Reset|RGBTOG|RGBMOD|RGBHUI|RGBHUD| Prev | Next | Vol- | Vol+ | Play | | + * `-------------+------+------+------|------+------+------+------+------+------' + * | | | | | | | | + * `------------------------------------------------' + */ +[_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + KC_F11, KC_F12, RGB_RMOD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, + _______, _______, _______, _______, _______, _______, _______ +) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + // persistant_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/halberd/keymaps/right_modifiers/readme.md b/keyboards/halberd/keymaps/right_modifiers/readme.md new file mode 100644 index 000000000000..2479922bdc17 --- /dev/null +++ b/keyboards/halberd/keymaps/right_modifiers/readme.md @@ -0,0 +1,2 @@ +# Modifiers on the right side. + diff --git a/keyboards/halberd/readme.md b/keyboards/halberd/readme.md new file mode 100644 index 000000000000..7fa0388fdaae --- /dev/null +++ b/keyboards/halberd/readme.md @@ -0,0 +1,15 @@ +# Halberd + +![Halberd](https://i.imgur.com/QabQNPQ.jpg) + +40% keyboard. + +Keyboard Maintainer: [ka2hiro](https://github.com/ka2hiro) [@ka2hiro](https://twitter.com/ka2hiro) +Hardware Supported: Halberd PCB, ATMEGA32U4 +Hardware Availability: [@kagizaraya](https://twitter.com/kagizaraya) + +Make example for this keyboard (after setting up your build environment): + + make halberd:default:dfu + +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). diff --git a/keyboards/halberd/rules.mk b/keyboards/halberd/rules.mk new file mode 100644 index 000000000000..ed4e6bde3259 --- /dev/null +++ b/keyboards/halberd/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/412_64/412_64.c b/keyboards/handwired/412_64/412_64.c similarity index 100% rename from keyboards/412_64/412_64.c rename to keyboards/handwired/412_64/412_64.c diff --git a/keyboards/412_64/412_64.h b/keyboards/handwired/412_64/412_64.h similarity index 100% rename from keyboards/412_64/412_64.h rename to keyboards/handwired/412_64/412_64.h diff --git a/keyboards/412_64/config.h b/keyboards/handwired/412_64/config.h similarity index 99% rename from keyboards/412_64/config.h rename to keyboards/handwired/412_64/config.h index 948ae743abfe..9cdb3fac8166 100644 --- a/keyboards/412_64/config.h +++ b/keyboards/handwired/412_64/config.h @@ -30,7 +30,7 @@ #define MATRIX_COL_PINS { B0, D2, D0, D1, D4, C6, D7, E6 } #define UNUSED_PINS { B4, B5, B6, B7, C7, F0, F1 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN C7 diff --git a/keyboards/412_64/keymaps/default/config.h b/keyboards/handwired/412_64/keymaps/default/config.h similarity index 100% rename from keyboards/412_64/keymaps/default/config.h rename to keyboards/handwired/412_64/keymaps/default/config.h diff --git a/keyboards/412_64/keymaps/default/keymap.c b/keyboards/handwired/412_64/keymaps/default/keymap.c similarity index 100% rename from keyboards/412_64/keymaps/default/keymap.c rename to keyboards/handwired/412_64/keymaps/default/keymap.c diff --git a/keyboards/412_64/keymaps/default/rules.mk b/keyboards/handwired/412_64/keymaps/default/rules.mk similarity index 100% rename from keyboards/412_64/keymaps/default/rules.mk rename to keyboards/handwired/412_64/keymaps/default/rules.mk diff --git a/keyboards/412_64/readme.md b/keyboards/handwired/412_64/readme.md similarity index 67% rename from keyboards/412_64/readme.md rename to keyboards/handwired/412_64/readme.md index 08110310750b..042bacfaf1b0 100644 --- a/keyboards/412_64/readme.md +++ b/keyboards/handwired/412_64/readme.md @@ -1,15 +1,15 @@ # 412-64 -![412-64](image_here) +![412-64](https://i.imgur.com/ixuv3OM.jpg) A compact 60% keyboard designed by Fate Everywhere and sold on a limited basis. Born out of the desire for a Planck with a numpad for technical work. Keyboard Maintainer: [Fate Everywhere](https://github.com/fateeverywhere) -Hardware Supported: 4x16 T&E Prototype, 412-64 Mk. 0, Mk. 1. -Hardware Availability: Highly limited, contact /u/FateEverywhere on reddit for availability. +Hardware Supported: 4x16 T&E Prototype, Mark Zero Stand Aside. +Hardware Availability: No longer available, was a tester for Stand Aside. Build definitions are in handwired because two units are in the wild. Make example for this keyboard (after setting up your build environment): - make 412-64:default + make handwired/412_64: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). \ No newline at end of file diff --git a/keyboards/412_64/rules.mk b/keyboards/handwired/412_64/rules.mk similarity index 100% rename from keyboards/412_64/rules.mk rename to keyboards/handwired/412_64/rules.mk diff --git a/keyboards/handwired/ck4x4/bootloader_defs.h b/keyboards/handwired/ck4x4/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/handwired/ck4x4/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/handwired/ck4x4/chconf.h b/keyboards/handwired/ck4x4/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/handwired/ck4x4/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/handwired/ck4x4/ck4x4.c b/keyboards/handwired/ck4x4/ck4x4.c new file mode 100644 index 000000000000..3091ce9c0153 --- /dev/null +++ b/keyboards/handwired/ck4x4/ck4x4.c @@ -0,0 +1 @@ +#include "ck4x4.h" diff --git a/keyboards/handwired/ck4x4/ck4x4.h b/keyboards/handwired/ck4x4/ck4x4.h new file mode 100644 index 000000000000..33c1b8dd9940 --- /dev/null +++ b/keyboards/handwired/ck4x4/ck4x4.h @@ -0,0 +1,15 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33 \ +) {\ +{ k00, k01, k02, k03 }, \ +{ k10, k11, k12, k13 }, \ +{ k20, k21, k22, k23 }, \ +{ k30, k31, k32, k33 }, \ +} diff --git a/keyboards/handwired/ck4x4/config.h b/keyboards/handwired/ck4x4/config.h new file mode 100644 index 000000000000..4ee5e8f4a83f --- /dev/null +++ b/keyboards/handwired/ck4x4/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6464 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER QMK +#define PRODUCT CK4x4 +#define DESCRIPTION Cannon Keys 4x4 MacroPad + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +#define MATRIX_COL_PINS { B7, B8, B9, B10 } +#define MATRIX_ROW_PINS { B3, B4, B5, B6 } +#define DIODE_DIRECTION COL2ROW + +//LEDS A6, RGB B15 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + + +/* Set 0 if debouncing isn't 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 + + +/* + * 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 + diff --git a/keyboards/handwired/ck4x4/halconf.h b/keyboards/handwired/ck4x4/halconf.h new file mode 100644 index 000000000000..8b9724b1a30e --- /dev/null +++ b/keyboards/handwired/ck4x4/halconf.h @@ -0,0 +1,353 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/jj4x4/i2c.h b/keyboards/handwired/ck4x4/keymaps/default/keymap.c similarity index 63% rename from keyboards/jj4x4/i2c.h rename to keyboards/handwired/ck4x4/keymaps/default/keymap.c index 27c9d3d050d1..d3717754d89d 100644 --- a/keyboards/jj4x4/i2c.h +++ b/keyboards/handwired/ck4x4/keymaps/default/keymap.c @@ -1,5 +1,5 @@ /* -Copyright 2016 Luiz Ribeiro +Copyright 2012,2013 Jun Wako 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 @@ -15,11 +15,15 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef __I2C_H__ -#define __I2C_H__ +#include QMK_KEYBOARD_H -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_7, KC_8, KC_9, KC_MINUS, \ + KC_4, KC_5, KC_6, KC_PLUS, \ + KC_1, KC_2, KC_3, KC_ENTER, \ + RESET, KC_NO, KC_NO, KC_NO \ + ), // test with KC_CAPS, KC_A, RESET +}; -#endif +const uint16_t fn_actions[] = { +}; diff --git a/keyboards/handwired/ck4x4/mcuconf.h b/keyboards/handwired/ck4x4/mcuconf.h new file mode 100644 index 000000000000..faca3defdf0e --- /dev/null +++ b/keyboards/handwired/ck4x4/mcuconf.h @@ -0,0 +1,171 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/handwired/ck4x4/readme.md b/keyboards/handwired/ck4x4/readme.md new file mode 100644 index 000000000000..d25a9c4df3e6 --- /dev/null +++ b/keyboards/handwired/ck4x4/readme.md @@ -0,0 +1,3 @@ +# CK4x4 + +Cannon Keys 4x4 Macro Pad diff --git a/keyboards/handwired/ck4x4/rules.mk b/keyboards/handwired/ck4x4/rules.mk new file mode 100644 index 000000000000..7ed9022e656d --- /dev/null +++ b/keyboards/handwired/ck4x4/rules.mk @@ -0,0 +1,49 @@ +# project specific files +# SRC = matrix.c \ +# led.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +#BOOTMAGIC_ENABLE = yes # 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 +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file + +DEFAULT_FOLDER = handwired/ck4x4 diff --git a/keyboards/handwired/dactyl/keymaps/default/keymap.c b/keyboards/handwired/dactyl/keymaps/default/keymap.c index c4a638c2a461..db666f43feb1 100644 --- a/keyboards/handwired/dactyl/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl/keymaps/default/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_RALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_TAB, KC_ENT @@ -137,10 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c b/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c index 56762d1b67c2..7c44f78a656b 100644 --- a/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c +++ b/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, KC_D, KC_H, KC_T, KC_N, LT(MDIA, KC_S), GUI_T(KC_SLSH), KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_RALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_TAB, KC_ENT @@ -137,10 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h index 682c7a868b07..6b0ddbfe8e39 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h @@ -20,8 +20,6 @@ along with this program. If not, see . #pragma once -#include "../../config.h" - /* Use I2C or Serial, not both */ #define USE_SERIAL diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c index 24c02215ee50..2e5cfd7cedd8 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c @@ -1,6 +1,4 @@ -#include "dactyl_manuform.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -126,4 +124,3 @@ void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); } - diff --git a/keyboards/handwired/dactyl_manuform/5x6/5x6.h b/keyboards/handwired/dactyl_manuform/5x6/5x6.h index 72045cc29189..5292ca0972ee 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/5x6.h +++ b/keyboards/handwired/dactyl_manuform/5x6/5x6.h @@ -6,35 +6,33 @@ #ifdef USE_I2C #include #ifdef __AVR__ - #include - #include + #include + #include #endif #endif #define LAYOUT_5x6(\ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ - L42, L43, R42, R43, \ - L44, L45, R40, R41, \ - L54, L55, R50, R51, \ - L52, L53, R52, R53 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { KC_NO, KC_NO, L42, L43, L44, L45 }, \ - { KC_NO, KC_NO, L52, L53, L54, L55 }, \ -\ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 }, \ - { R40, R41, R42, R43, KC_NO, KC_NO },\ - { R50, R51, R52, R53, KC_NO, KC_NO }, \ - } - - + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L42, L43, R42, R43, \ + L44, L45, R40, R41, \ + L54, L55, R50, R51, \ + L52, L53, R52, R53 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { KC_NO, KC_NO, L42, L43, L44, L45 }, \ + { KC_NO, KC_NO, L52, L53, L54, L55 }, \ + \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, KC_NO, KC_NO }, \ + { R50, R51, R52, R53, KC_NO, KC_NO } \ +} diff --git a/keyboards/handwired/dactyl_manuform/5x6/info.json b/keyboards/handwired/dactyl_manuform/5x6/info.json index d7aa3acee399..14afc704cd2e 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/info.json +++ b/keyboards/handwired/dactyl_manuform/5x6/info.json @@ -5,7 +5,7 @@ "width": 17, "height": 8, "layouts": { - "LAYOUT": { + "LAYOUT_5x6": { "layout": [ {"label":"L00", "x":0, "y":0}, {"label":"L01", "x":1, "y":0}, diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c index c37009f24d82..4f6151a51274 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/keymap.c @@ -10,14 +10,14 @@ enum custom_macros { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_5x6( - 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), - KC_F4, KC_F5, TG(CODEFLOW), KC_EQL, - KC_LALT, KC_BSPC, KC_SPC, OSL(VIM), - KC_TAB, TD(TD_SYM_VIM), KC_ENT, KC_RGUI, - KC_LCTL, KC_DEL, KC_UP, KC_DOWN + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), + KC_F4, KC_F5, TG(CODEFLOW), KC_EQL, + KC_LALT, KC_BSPC, KC_SPC, OSL(VIM), + TD(TD_COPY_PASTE), TD(TD_SYM_VIM), KC_ENT, KC_RGUI, + KC_LCTL, KC_DEL, KC_UP, KC_DOWN ), [CODEFLOW] = LAYOUT_5x6( diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c index 7be6a5bc71ee..0d1efde33bb3 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c @@ -11,10 +11,6 @@ extern keymap_config_t keymap_config; #define RAISE MO(_RAISE) #define LOWER MO(_LOWER) -#define _______ KC_TRNS - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_5x6( diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/impstyle/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/impstyle/keymap.c index 9a89212fec56..179b4486648f 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/impstyle/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/impstyle/keymap.c @@ -12,10 +12,6 @@ extern keymap_config_t keymap_config; #define RAISE MO(_RAISE) #define LOWER MO(_LOWER) -#define _______ KC_TRNS - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/handwired/dactyl_manuform/5x7/5x7.h b/keyboards/handwired/dactyl_manuform/5x7/5x7.h index 95fd5bb10244..88b68b31e660 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/5x7.h +++ b/keyboards/handwired/dactyl_manuform/5x7/5x7.h @@ -6,40 +6,40 @@ #ifdef USE_I2C #include #ifdef __AVR__ - #include - #include + #include + #include #endif #endif #define LAYOUT_5x7( \ - L11, L12, L13, L14, L15, L16, L17, \ - L21, L22, L23, L24, L25, L26, L27, \ - L31, L32, L33, L34, L35, L36, L37, \ - L41, L42, L43, L44, L45, L46, \ - L51, L52, L53, L54, \ - L55, L56, \ - L65, L66, \ - L63, L64, \ - R11, R12, R13, R14, R15, R16, R17, \ - R21, R22, R23, R24, R25, R26, R27, \ - R31, R32, R33, R34, R35, R36, R37, \ - R42, R43, R44, R45, R46, R47, \ - R54, R55, R56, R57, \ - R52, R53, \ - R62, R63, \ - R64, R65 \ - ) \ - { \ - { L11, L12, L13, L14, L15, L16, L17 }, \ - { L21, L22, L23, L24, L25, L26, L27 }, \ - { L31, L32, L33, L34, L35, L36, L37 }, \ - { L41, L42, L43, L44, L45, L46, KC_NO }, \ - { L51, L52, L53, L54, L55, L56, KC_NO }, \ - { KC_NO, KC_NO, L63, L64, L65, L66, KC_NO }, \ - { R11, R12, R13, R14, R15, R16, R17 }, \ - { R21, R22, R23, R24, R25, R26, R27 }, \ - { R31, R32, R33, R34, R35, R36, R37 }, \ - { KC_NO, R42, R43, R44, R45, R46, R47 }, \ - { KC_NO, R52, R53, R54, R55, R56, R57 }, \ - { KC_NO, R62, R63, R64, R65, KC_NO, KC_NO } \ - } + L11, L12, L13, L14, L15, L16, L17, \ + L21, L22, L23, L24, L25, L26, L27, \ + L31, L32, L33, L34, L35, L36, L37, \ + L41, L42, L43, L44, L45, L46, \ + L51, L52, L53, L54, \ + L55, L56, \ + L65, L66, \ + L63, L64, \ + R11, R12, R13, R14, R15, R16, R17, \ + R21, R22, R23, R24, R25, R26, R27, \ + R31, R32, R33, R34, R35, R36, R37, \ + R42, R43, R44, R45, R46, R47, \ + R54, R55, R56, R57, \ + R52, R53, \ + R62, R63, \ + R64, R65 \ + ) \ + { \ + { L11, L12, L13, L14, L15, L16, L17 }, \ + { L21, L22, L23, L24, L25, L26, L27 }, \ + { L31, L32, L33, L34, L35, L36, L37 }, \ + { L41, L42, L43, L44, L45, L46, KC_NO }, \ + { L51, L52, L53, L54, L55, L56, KC_NO }, \ + { KC_NO, KC_NO, L63, L64, L65, L66, KC_NO }, \ + { R11, R12, R13, R14, R15, R16, R17 }, \ + { R21, R22, R23, R24, R25, R26, R27 }, \ + { R31, R32, R33, R34, R35, R36, R37 }, \ + { KC_NO, R42, R43, R44, R45, R46, R47 }, \ + { KC_NO, R52, R53, R54, R55, R56, R57 }, \ + { KC_NO, R62, R63, R64, R65, KC_NO, KC_NO } \ +} diff --git a/keyboards/handwired/dactyl_manuform/5x7/info.json b/keyboards/handwired/dactyl_manuform/5x7/info.json index b4b2c7b797f9..33ba1b0e796b 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/info.json +++ b/keyboards/handwired/dactyl_manuform/5x7/info.json @@ -3,9 +3,9 @@ "url": "", "maintainer": "qmk", "width": 17, - "height": 16, + "height": 8, "layouts": { - "LAYOUT": { + "LAYOUT_5x7": { "layout": [ {"label":"L11", "x":0, "y":0}, {"label":"L12", "x":1, "y":0}, diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c index 8b83b538fee5..1378f8723247 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c @@ -10,10 +10,6 @@ extern keymap_config_t keymap_config; #define _FN 1 #define _NUMPAD 2 - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO // Some basic macros #define TASK LCTL(LSFT(KC_ESC)) #define TAB_R LCTL(KC_TAB) diff --git a/keyboards/handwired/dactyl_manuform/6x6/6x6.h b/keyboards/handwired/dactyl_manuform/6x6/6x6.h index c2980b3d318c..039e6b40dfb0 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/6x6.h +++ b/keyboards/handwired/dactyl_manuform/6x6/6x6.h @@ -7,38 +7,36 @@ #ifdef USE_I2C #include #ifdef __AVR__ - #include - #include + #include + #include #endif #endif #define LAYOUT_6x6(\ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ - L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45, \ - L52, L53, R52, R53, \ - L54, L55, R50, R51, \ - L64, L65, R60, R61, \ - L62, L63, R62, R63 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { L40, L41, L42, L43, L44, L45 }, \ - { KC_NO, KC_NO, L52, L53, L54, L55 }, \ - { KC_NO, KC_NO, L62, L63, L64, L65 }, \ -\ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 }, \ - { R40, R41, R42, R43, R44, R45 }, \ - { R50, R51, R52, R53, KC_NO, KC_NO },\ - { R60, R61, R62, R63, KC_NO, KC_NO }, \ - } - - + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45, \ + L52, L53, R52, R53, \ + L54, L55, R50, R51, \ + L64, L65, R60, R61, \ + L62, L63, R62, R63 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45 }, \ + { KC_NO, KC_NO, L52, L53, L54, L55 }, \ + { KC_NO, KC_NO, L62, L63, L64, L65 }, \ + \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45 }, \ + { R50, R51, R52, R53, KC_NO, KC_NO }, \ + { R60, R61, R62, R63, KC_NO, KC_NO } \ +} diff --git a/keyboards/handwired/dactyl_manuform/6x6/info.json b/keyboards/handwired/dactyl_manuform/6x6/info.json index 2ae91d4694bd..e617b39a82db 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/info.json +++ b/keyboards/handwired/dactyl_manuform/6x6/info.json @@ -5,7 +5,7 @@ "width": 17, "height": 9, "layouts": { - "LAYOUT": { + "LAYOUT_6x6": { "layout": [ {"label":"L00", "x":0, "y":0}, {"label":"L01", "x":1, "y":0}, diff --git a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c index 1b1cbd4aea2f..b78a56008677 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c @@ -9,8 +9,6 @@ extern keymap_config_t keymap_config; #define RAISE MO(_RAISE) #define LOWER MO(_LOWER) -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_6x6( diff --git a/keyboards/handwired/dactyl_manuform/readme.md b/keyboards/handwired/dactyl_manuform/readme.md index 0d08c67a08da..3221da0e9db4 100644 --- a/keyboards/handwired/dactyl_manuform/readme.md +++ b/keyboards/handwired/dactyl_manuform/readme.md @@ -131,17 +131,9 @@ file will run on both hands instead of having to flash left and right handed versions of the firmware to each half. To flash the EEPROM file for the left half run: ``` -avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:"./quantum/split_common/eeprom-lefthand.eep" -// or the equivalent in dfu-programmer - -``` -and similarly for right half +make handwired/dactyl_promicro:default:dfu-split-left +make handwired/dactyl_promicro:default:dfu-split-right ``` -avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:"./quantum/split_common/eeprom-righthand.eep" -// or the equivalent in dfu-programmer -``` - -NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. @@ -162,6 +154,6 @@ Also, if the slave board is producing weird characters in certain columns, update the following line in `matrix.c` to the following: ``` -// _delay_us(30); // without this wait read unstable value. -_delay_us(300); // without this wait read unstable value. +// wait_us(30); // without this wait read unstable value. +wait_us(300); // without this wait read unstable value. ``` diff --git a/keyboards/handwired/dactyl_promicro/config.h b/keyboards/handwired/dactyl_promicro/config.h new file mode 100644 index 000000000000..f81b3de51959 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/config.h @@ -0,0 +1,83 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +#include "config_common.h" +#define PRODUCT Dactyl Ergo(6x6) + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +//#define MANUFACTURER tshort +// defined in subfolder +#define DESCRIPTION A split keyboard + +/* mouse config */ +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* 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 + +/* Enables This makes it easier for fast typists to use dual-function keys */ +#define PERMISSIVE_HOLD + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 12 // Number of LEDs + +/* + * 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 diff --git a/keyboards/viterbi/rev1/rev1.c b/keyboards/handwired/dactyl_promicro/dactyl_promicro.c similarity index 56% rename from keyboards/viterbi/rev1/rev1.c rename to keyboards/handwired/dactyl_promicro/dactyl_promicro.c index 5848375331e8..5d708cf4805a 100644 --- a/keyboards/viterbi/rev1/rev1.c +++ b/keyboards/handwired/dactyl_promicro/dactyl_promicro.c @@ -1,5 +1,4 @@ -#include "viterbi.h" - +#include "dactyl_promicro.h" #ifdef SSD1306OLED void led_set_kb(uint8_t usb_led) { @@ -9,14 +8,5 @@ void led_set_kb(uint8_t usb_led) { #endif void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - matrix_init_user(); -}; +}; \ No newline at end of file diff --git a/keyboards/handwired/dactyl_promicro/dactyl_promicro.h b/keyboards/handwired/dactyl_promicro/dactyl_promicro.h new file mode 100644 index 000000000000..5dfc42f2a94c --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/dactyl_promicro.h @@ -0,0 +1,39 @@ +#pragma once + +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + + +#define LAYOUT_6x6(\ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45, \ + L55, L51, L52, R53, R54, R50, \ + L53, R52, \ + L54, R51 \ + )\ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45 }, \ + { KC_NO, L51, L52, L53, L54, L55 }, \ +\ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45 }, \ + { R50, R51, R52, R53, R54, KC_NO }, \ +} diff --git a/keyboards/handwired/dactyl_promicro/keymaps/default/config.h b/keyboards/handwired/dactyl_promicro/keymaps/default/config.h new file mode 100644 index 000000000000..ce8f3501ada5 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/keymaps/default/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#define USE_SERIAL + +#define MASTER_RIGHT +// #define MASTER_RIGHT +//#define EE_HANDS +// Rows are doubled-up diff --git a/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c b/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c new file mode 100644 index 000000000000..d396e4676289 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c @@ -0,0 +1,47 @@ + +/* A QWERTY 3 Layer layout for the Dactyl Manuform 6x6 Keyboard */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + [_QWERTY] = LAYOUT_6x6( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,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_MINS, + KC_LSFT , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, + KC_LCTL , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM , KC_DOT ,KC_SLSH,KC_BSLASH, + KC_PLUS , KC_LEFT,KC_UP ,KC_DOWN, KC_RGHT, RAISE , LOWER , KC_HOME, KC_PGUP, KC_PGDN,KC_END ,KC_EQL, + _______,KC_LALT,KC_PSCR, KC_LGUI, KC_SPC, KC_ENT,KC_GRAVE, KC_AT ,KC_PSCR ,_______ + + ), + + + [_LOWER] = LAYOUT_6x6( + KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS, + _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, + _______,_______,_______,_______,_______,KC_PSCR, KC_P0 , KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ +), + + [_RAISE] = LAYOUT_6x6( + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 , + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, + _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ + ), + + }; diff --git a/keyboards/handwired/dactyl_promicro/keymaps/impstyle/config.h b/keyboards/handwired/dactyl_promicro/keymaps/impstyle/config.h new file mode 100644 index 000000000000..ce8f3501ada5 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/keymaps/impstyle/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#define USE_SERIAL + +#define MASTER_RIGHT +// #define MASTER_RIGHT +//#define EE_HANDS +// Rows are doubled-up diff --git a/keyboards/handwired/dactyl_promicro/keymaps/impstyle/keymap.c b/keyboards/handwired/dactyl_promicro/keymaps/impstyle/keymap.c new file mode 100644 index 000000000000..d396e4676289 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/keymaps/impstyle/keymap.c @@ -0,0 +1,47 @@ + +/* A QWERTY 3 Layer layout for the Dactyl Manuform 6x6 Keyboard */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + [_QWERTY] = LAYOUT_6x6( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,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_MINS, + KC_LSFT , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, + KC_LCTL , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM , KC_DOT ,KC_SLSH,KC_BSLASH, + KC_PLUS , KC_LEFT,KC_UP ,KC_DOWN, KC_RGHT, RAISE , LOWER , KC_HOME, KC_PGUP, KC_PGDN,KC_END ,KC_EQL, + _______,KC_LALT,KC_PSCR, KC_LGUI, KC_SPC, KC_ENT,KC_GRAVE, KC_AT ,KC_PSCR ,_______ + + ), + + + [_LOWER] = LAYOUT_6x6( + KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS, + _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, + _______,_______,_______,_______,_______,KC_PSCR, KC_P0 , KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ +), + + [_RAISE] = LAYOUT_6x6( + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 , + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, + _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______, _______,_______,_______,_______,_______ + ), + + }; diff --git a/keyboards/handwired/dactyl_promicro/readme.md b/keyboards/handwired/dactyl_promicro/readme.md new file mode 100644 index 000000000000..a426319b4e56 --- /dev/null +++ b/keyboards/handwired/dactyl_promicro/readme.md @@ -0,0 +1,93 @@ +# Dactyl with Arduino Pro Micro + +See https://github.com/adereth/dactyl-keyboard for the original Version. + +This Dactyl uses the Arduino Pro Mirco (2x). +Wiring is a 6x6 Matrix like the [Dactyl Manuform](https://github.com/qmk/qmk_firmware/tree/master/keyboards/handwired/dactyl_manuform) + + +## Build the Firmware: + + - Build the firmware with `make handwired/dactyl_promicro:`, for example `make handwired/dactyl:default` + - This will result in a hex file called `handwired_dactyl_promicro_.hex`, e.g. + `handwired_dactyl_promicro_default.hex` + +How to setup your build enviroment can be found here: [Installing Build Tools](https://docs.qmk.fm/#/getting_started_build_tools) + +## Required Hardware + +Apart from diodes and key switches for the keyboard matrix in each half, you +will need: + +* 2 Arduino Pro Micros. You can find these on AliExpress for ≈3.50USD each. +* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable + +Alternatively, you can use any sort of cable and socket that has at least 3 +wires. If you want to use I2C to communicate between halves, you will need a +cable with at least 4 wires and 2x 4.7kΩ pull-up resistors + +## Optional Hardware +A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`. + +## Wiring + +The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. +PD0 on the ATmega32u4) between the two Pro Micros. + +Next, wire your key matrix to any of the remaining 17 IO pins of the pro micro +and modify the `matrix.c` accordingly. + +The wiring for serial: + +![serial wiring](https://i.imgur.com/C3D1GAQ.png) + +The wiring for i2c: + +![i2c wiring](https://i.imgur.com/Hbzhc6E.png) + +The pull-up resistors may be placed on either half. It is also possible +to use 4 resistors and have the pull-ups in both halves, but this is +unnecessary in simple use cases. + +You can change your configuration between serial and i2c by modifying your `config.h` file. + +## Notes on Software Configuration + +the keymaps in here are for the 4x5 layout of the keyboard only. + +## Flashing + +To flash your firmware take a look at: [Flashing Instructions and Bootloader Information](https://docs.qmk.fm/#/flashing). + +Under Windows the most convenient way is installing the [QMK Drivers](https://github.com/qmk/qmk_driver_installer/releases) and use the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases). + + +## Choosing which board to plug the USB cable into (choosing Master) + +### Setting the right or left hand as master + +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define MASTER_RIGHT +``` + +OR + +``` + #define MASTER_LEFT +``` + + +Notes on Using Pro Micro 3.3V +----------------------------- + +Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects +the frequency on the 3.3V board. + +Also, if the slave board is producing weird characters in certain columns, +update the following line in `matrix.c` to the following: + +``` +// _delay_us(30); // without this wait read unstable value. +_delay_us(300); // without this wait read unstable value. +``` diff --git a/keyboards/zen/rules.mk b/keyboards/handwired/dactyl_promicro/rules.mk similarity index 91% rename from keyboards/zen/rules.mk rename to keyboards/handwired/dactyl_promicro/rules.mk index 4e82689111d3..a93de3685876 100644 --- a/keyboards/zen/rules.mk +++ b/keyboards/handwired/dactyl_promicro/rules.mk @@ -1,7 +1,3 @@ -SRC += matrix.c \ - split_util.c \ - serial.c - # MCU name #MCU = at90usb1287 MCU = atmega32u4 @@ -40,7 +36,7 @@ F_USB = $(F_CPU) # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = caterina @@ -57,17 +53,14 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) 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 -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = yes -USE_I2C = no +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = yes - -DEFAULT_FOLDER = zen/rev1 +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/daishi/config.h b/keyboards/handwired/daishi/config.h new file mode 100644 index 000000000000..020b486a98b4 --- /dev/null +++ b/keyboards/handwired/daishi/config.h @@ -0,0 +1,61 @@ +/* +Copyright 2019 Crokto + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6D6D +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MetaMechs +#define PRODUCT Daishi +#define DESCRIPTION Compact Battlecruiser + +/* key matrix size */ +#define MATRIX_ROWS 7 +#define MATRIX_COLS 18 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D6, D7, E0, E1, C0, C1, C2 } +#define MATRIX_COL_PINS { E6, E7, E3, B0, B1, B2, A6, A5, A4, A3, A2, A1, A0, F7, F6, F5, F4, F3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* Set up rotary encoder */ +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { F1 } +#define ENCODERS_PAD_B { F0 } +#define ENCODER_RESOLUTION 2 + +/* Set delay for tap_code on rotary encoder */ +#define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/handwired/daishi/daishi.c b/keyboards/handwired/daishi/daishi.c new file mode 100644 index 000000000000..dcd2cd0d153b --- /dev/null +++ b/keyboards/handwired/daishi/daishi.c @@ -0,0 +1,22 @@ +#include "daishi.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} \ No newline at end of file diff --git a/keyboards/handwired/daishi/daishi.h b/keyboards/handwired/daishi/daishi.h new file mode 100644 index 000000000000..49e377589728 --- /dev/null +++ b/keyboards/handwired/daishi/daishi.h @@ -0,0 +1,25 @@ +#pragma once + +#include "quantum.h" + +#define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise) + +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4E, K4F, K4G, K4H, \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5D, K5E, K5F, K5G, K5H, \ + K60, K61, K62, K65, K69, K6A, K6C, K6D, K6E, K6F, K6G \ +){ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, K4E, K4F, K4G, K4H }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, KC_NO, K5D, K5E, K5F, K5G, K5H }, \ + { K60, K61, K62, KC_NO, KC_NO, K65, KC_NO, KC_NO, KC_NO, K69, K6A, KC_NO, K6C, K6D, K6E, K6F, K6G, KC_NO } \ +} diff --git a/keyboards/handwired/daishi/keymaps/default/keymap.c b/keyboards/handwired/daishi/keymaps/default/keymap.c new file mode 100644 index 000000000000..c0baf7006b93 --- /dev/null +++ b/keyboards/handwired/daishi/keymaps/default/keymap.c @@ -0,0 +1,124 @@ +#include QMK_KEYBOARD_H + +// Layer shorthand +#define _QW 0 +#define _FN 1 + +enum custom_keycodes { + M_EXAMPLE1 = SAFE_RANGE, + M_EXAMPLE2, + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .-----------------------------------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | | | | | | | | | | DM1 | DM2 | DMSTOP | PRINT | SCROLL | PAUSE | FN | VOL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | HOME | PGUP | END | INS | NUM | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACK | PGDN | / | * | - | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | 7 | 8 | 9 | + | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | | 4 | 5 | 6 | = | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | | UP | 1 | 2 | 3 | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | LCTRL | LGUI | LALT | | | SPACE | | | | RALT | RCTRL | | LEFT | DOWN | RIGHT | 0 | . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------' + */ + + [_QW] = LAYOUT( /* QWERTY */ + KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______,DYN_MACRO_PLAY1,DYN_MACRO_PLAY2,DYN_REC_STOP, KC_PSCR, KC_SLCK, KC_PAUS, MO(_FN), KC_MUTE, + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_DEL , KC_HOME, KC_PGUP, KC_END , KC_INS , KC_NLCK, + 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_PGDN, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7 , KC_P8 , KC_P9 , KC_PPLS, + 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_P4 , KC_P5 , KC_P6 , KC_EQL , + 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_P1 , KC_P2 , KC_P3 , KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0 , KC_PDOT + ), + +/* FN + * .-----------------------------------------------------------------------------------------------------------------------------------------------------------------. + * | RESET | F13 | F14 | F15 | f16 | f17 | f18 | F19 | F20 | F21 | DM1 R | DM2 R | DMSTOP | | | | FN | DEBUG | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------| + * | | | | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------------------------' + */ + + [_FN] = LAYOUT( /* Function */ + RESET , KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_F21 ,DYN_REC_START1,DYN_REC_START2,DYN_REC_STOP, _______, _______, _______, MO(_FN), DEBUG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + if (record->event.pressed) { + switch(keycode) { + case M_EXAMPLE1: + SEND_STRING("This is an example macro!"SS_TAP(X_ENTER)); //prints "This is an example macro!" and hits Enter + return false; + case M_EXAMPLE2: + SEND_STRING("This is a another example!"SS_TAP(X_ENTER)); //prints "This is a another example!" and hits Enter + return false; + } + } + return true; +}; + +void encoder_update(bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } +} + +void matrix_init_user(void) { + // Call the keymap level matrix init. + + // Set our LED pins as output + setPinOutput(C4); + setPinOutput(C5); + setPinOutput(C6); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_OFF(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(C4); + } else { + writePinHigh(C4); + } + if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(C5); + } else { + writePinHigh(C5); + } + if (IS_LED_OFF(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(C6); + } else { + writePinHigh(C6); + } +} \ No newline at end of file diff --git a/keyboards/handwired/daishi/keymaps/default/readme.md b/keyboards/handwired/daishi/keymaps/default/readme.md new file mode 100644 index 000000000000..bed7fcb237bd --- /dev/null +++ b/keyboards/handwired/daishi/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default Daishi Layout + +![Daishi Layout Image](https://i.imgur.com/fuJZGmw.png) + +This is the default layout that comes on the Daishi. For more information on the design of this layout, check out [kb.metamechs.com](http://kb.metamechs.com/daishi/). diff --git a/keyboards/handwired/daishi/readme.md b/keyboards/handwired/daishi/readme.md new file mode 100644 index 000000000000..88ac8ea79d0c --- /dev/null +++ b/keyboards/handwired/daishi/readme.md @@ -0,0 +1,15 @@ +# Daishi + +![Daishi](http://kb.metamechs.com/wp-content/uploads/2019/03/IMG_20190325_113405-e1553610532162-1024x709.jpg) + +A compact battlecruiser using the CBC1 PCB. [More info on kb.metamechs.com](http://kb.metamechs.com/daishi/) + +Keyboard Maintainer: [Crokto](https://github.com/Croktopus/) +Hardware Supported: CBC1 PCB +Hardware Availability: [kb.metamechs.com](http://kb.metamechs.com/daishi/get-your-own-daishi/) + +Make example for this keyboard (after setting up your build environment): + + make handwired/daishi: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). diff --git a/keyboards/handwired/daishi/rules.mk b/keyboards/handwired/daishi/rules.mk new file mode 100644 index 000000000000..ece1eaaac3a1 --- /dev/null +++ b/keyboards/handwired/daishi/rules.mk @@ -0,0 +1,66 @@ +# MCU name +MCU = at90usb1286 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = atmel-dfu + +# QMK 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +ENCODER_ENABLE = yes # Add rotary encoder support \ No newline at end of file diff --git a/keyboards/handwired/datahand/config.h b/keyboards/handwired/datahand/config.h index 75d8372bf709..a269775f35ee 100644 --- a/keyboards/handwired/datahand/config.h +++ b/keyboards/handwired/datahand/config.h @@ -30,7 +30,7 @@ #define MATRIX_ROWS 13 #define MATRIX_COLS 4 -#define DIODE_DIRECTION CUSTOM_MATRIX +//#define DIODE_DIRECTION /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 0 diff --git a/keyboards/handwired/downbubble/config.h b/keyboards/handwired/downbubble/config.h index 77e34ceab7fc..4b2bd92e4dc6 100644 --- a/keyboards/handwired/downbubble/config.h +++ b/keyboards/handwired/downbubble/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F7, C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, D6, D5, D4, D3, D2, D1, D0, B7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/handwired/frenchdev/config.h b/keyboards/handwired/frenchdev/config.h index b01eec7aa08c..eca669090524 100644 --- a/keyboards/handwired/frenchdev/config.h +++ b/keyboards/handwired/frenchdev/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef FRENCHDEV_V1_CONFIG_H -#define FRENCHDEV_V1_CONFIG_H +#pragma once #include "config_common.h" @@ -81,5 +80,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION //#define DEBUG_MATRIX_SCAN_RATE - -#endif //FRENCHDEV_V1_CONFIG_H diff --git a/keyboards/handwired/frenchdev/frenchdev.c b/keyboards/handwired/frenchdev/frenchdev.c index 6d5883a3a826..6eed4de5ff0a 100644 --- a/keyboards/handwired/frenchdev/frenchdev.c +++ b/keyboards/handwired/frenchdev/frenchdev.c @@ -1,5 +1,26 @@ #include "frenchdev.h" -#include "i2cmaster.h" + +extern inline void frenchdev_board_led_on(void); +extern inline void frenchdev_led_1_on(void); +extern inline void frenchdev_led_2_on(void); +extern inline void frenchdev_led_3_on(void); +extern inline void frenchdev_led_on(uint8_t led); + +extern inline void frenchdev_board_led_off(void); +extern inline void frenchdev_led_1_off(void); +extern inline void frenchdev_led_2_off(void); +extern inline void frenchdev_led_3_off(void); +extern inline void frenchdev_led_off(uint8_t led); + +extern inline void frenchdev_led_all_on(void); +extern inline void frenchdev_led_all_off(void); + +extern inline void frenchdev_led_1_set(uint8_t n); +extern inline void frenchdev_led_2_set(uint8_t n); +extern inline void frenchdev_led_3_set(uint8_t n); +extern inline void frenchdev_led_set(uint8_t led, uint8_t n); + +extern inline void frenchdev_led_all_set(uint8_t n); bool i2c_initialized = 0; uint8_t mcp23018_status = 0x20; @@ -31,15 +52,15 @@ void frenchdev_blink_all_leds(void) frenchdev_led_all_off(); frenchdev_led_all_set(LED_BRIGHTNESS_HI); frenchdev_led_1_on(); - _delay_ms(50); + wait_ms(50); frenchdev_led_2_on(); - _delay_ms(50); + wait_ms(50); frenchdev_led_3_on(); - _delay_ms(50); + wait_ms(50); frenchdev_led_1_off(); - _delay_ms(50); + wait_ms(50); frenchdev_led_2_off(); - _delay_ms(50); + wait_ms(50); frenchdev_led_3_off(); frenchdev_led_all_off(); } @@ -54,28 +75,28 @@ uint8_t init_mcp23018(void) { // cli(); if (i2c_initialized == 0) { i2c_init(); // on pins D(1,0) - i2c_initialized++; - _delay_ms(1000); + i2c_initialized = true;; + wait_ms(1000); } // set pin direction // - unused : input : 1 // - input : input : 1 // - driving : output : 0 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; + mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(IODIRA, I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000, I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00111111, I2C_TIMEOUT); if (mcp23018_status) goto out; i2c_stop(); // set pull-up // - unused : on : 1 // - input : on : 1 // - driving : off : 0 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; + mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPPUA, I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000, I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00111111, I2C_TIMEOUT); if (mcp23018_status) goto out; out: i2c_stop(); @@ -84,4 +105,3 @@ uint8_t init_mcp23018(void) { return mcp23018_status; } - diff --git a/keyboards/handwired/frenchdev/frenchdev.h b/keyboards/handwired/frenchdev/frenchdev.h index 82dbe18b89f4..1df399088791 100644 --- a/keyboards/handwired/frenchdev/frenchdev.h +++ b/keyboards/handwired/frenchdev/frenchdev.h @@ -1,10 +1,9 @@ -#ifndef FRENCHDEV_V1_H -#define FRENCHDEV_V1_H +#pragma once #include "quantum.h" #include #include -#include "i2cmaster.h" +#include "i2c_master.h" #include #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) @@ -24,6 +23,7 @@ #define OLATB 0x15 extern uint8_t mcp23018_status; +#define I2C_TIMEOUT 100 void init_frenchdev(void); void frenchdev_blink_all_leds(void); @@ -111,5 +111,3 @@ inline void frenchdev_led_all_set(uint8_t n) { k51, k41, k31, k21, k11, k01 }, \ { k50, k40, k30, k20, k10, KC_NO } \ } - -#endif diff --git a/keyboards/handwired/frenchdev/i2cmaster.h b/keyboards/handwired/frenchdev/i2cmaster.h deleted file mode 100644 index 3917b9e6c006..000000000000 --- a/keyboards/handwired/frenchdev/i2cmaster.h +++ /dev/null @@ -1,178 +0,0 @@ -#ifndef _I2CMASTER_H -#define _I2CMASTER_H 1 -/************************************************************************* -* Title: C include file for the I2C master interface -* (i2cmaster.S or twimaster.c) -* Author: Peter Fleury http://jump.to/fleury -* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $ -* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 -* Target: any AVR device -* Usage: see Doxygen manual -**************************************************************************/ - -#ifdef DOXYGEN -/** - @defgroup pfleury_ic2master I2C Master library - @code #include @endcode - - @brief I2C (TWI) Master Software Library - - Basic routines for communicating with I2C slave devices. This single master - implementation is limited to one bus master on the I2C bus. - - This I2c library is implemented as a compact assembler software implementation of the I2C protocol - which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c). - Since the API for these two implementations is exactly the same, an application can be linked either against the - software I2C implementation or the hardware I2C implementation. - - Use 4.7k pull-up resistor on the SDA and SCL pin. - - Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module - i2cmaster.S to your target when using the software I2C implementation ! - - Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion. - - @note - The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted - to GNU assembler and AVR-GCC C call interface. - Replaced the incorrect quarter period delays found in AVR300 with - half period delays. - - @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury - - @par API Usage Example - The following code shows typical usage of this library, see example test_i2cmaster.c - - @code - - #include - - - #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet - - int main(void) - { - unsigned char ret; - - i2c_init(); // initialize I2C library - - // write 0x75 to EEPROM address 5 (Byte Write) - i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode - i2c_write(0x05); // write address = 5 - i2c_write(0x75); // write value 0x75 to EEPROM - i2c_stop(); // set stop conditon = release bus - - - // read previously written value back from EEPROM address 5 - i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode - - i2c_write(0x05); // write address = 5 - i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode - - ret = i2c_readNak(); // read one byte from EEPROM - i2c_stop(); - - for(;;); - } - @endcode - -*/ -#endif /* DOXYGEN */ - -/**@{*/ - -#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304 -#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !" -#endif - -#include - -/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */ -#define I2C_READ 1 - -/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */ -#define I2C_WRITE 0 - - -/** - @brief initialize the I2C master interace. Need to be called only once - @param void - @return none - */ -extern void i2c_init(void); - - -/** - @brief Terminates the data transfer and releases the I2C bus - @param void - @return none - */ -extern void i2c_stop(void); - - -/** - @brief Issues a start condition and sends address and transfer direction - - @param addr address and transfer direction of I2C device - @retval 0 device accessible - @retval 1 failed to access device - */ -extern unsigned char i2c_start(unsigned char addr); - - -/** - @brief Issues a repeated start condition and sends address and transfer direction - - @param addr address and transfer direction of I2C device - @retval 0 device accessible - @retval 1 failed to access device - */ -extern unsigned char i2c_rep_start(unsigned char addr); - - -/** - @brief Issues a start condition and sends address and transfer direction - - If device is busy, use ack polling to wait until device ready - @param addr address and transfer direction of I2C device - @return none - */ -extern void i2c_start_wait(unsigned char addr); - - -/** - @brief Send one byte to I2C device - @param data byte to be transfered - @retval 0 write successful - @retval 1 write failed - */ -extern unsigned char i2c_write(unsigned char data); - - -/** - @brief read one byte from the I2C device, request more data from device - @return byte read from I2C device - */ -extern unsigned char i2c_readAck(void); - -/** - @brief read one byte from the I2C device, read is followed by a stop condition - @return byte read from I2C device - */ -extern unsigned char i2c_readNak(void); - -/** - @brief read one byte from the I2C device - - Implemented as a macro, which calls either i2c_readAck or i2c_readNak - - @param ack 1 send ack, request more data from device
- 0 send nak, read is followed by a stop condition - @return byte read from I2C device - */ -extern unsigned char i2c_read(unsigned char ack); -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - - -/**@}*/ -#endif diff --git a/keyboards/handwired/frenchdev/info.json b/keyboards/handwired/frenchdev/info.json index 0f3c0a94fd3b..28f09a3aa112 100644 --- a/keyboards/handwired/frenchdev/info.json +++ b/keyboards/handwired/frenchdev/info.json @@ -4,7 +4,7 @@ "maintainer": "qmk", "bootloader": "", "width": 20, - "height": 8, + "height": 9.5, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/handwired/frenchdev/keymaps/default/keymap.c b/keyboards/handwired/frenchdev/keymaps/default/keymap.c index 3d0f1fbfb864..7b82f36e360d 100644 --- a/keyboards/handwired/frenchdev/keymaps/default/keymap.c +++ b/keyboards/handwired/frenchdev/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "mousekey.h" #include "keymap_bepo.h" @@ -14,7 +13,7 @@ #define KEY_DELAY 130 enum macros { - M_LP, // left pedal + M_LP = SAFE_RANGE, // left pedal M_RP, // right pedal M_SF, // shift M_SFS, // shift and space @@ -63,19 +62,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------| / |------| , | space|------|------|------ .. ------|------|------| L1/sp| LEFT |------| UP |------+------| * * | CTRL | win |------/ \-------------| L1 | alt | .. | CAPS | L1 |-------------/ \------| : | CTRL | * * `-------------/ \-------------/ .. \-------------/ \-------------/ * - *M(M_LP) */ [_BASE] = LAYOUT( 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_ESC, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_DTRM, BP_DCRC, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, KC_BSPC, \ KC_TAB, BP_B, BP_ECUT, BP_O, BP_P, BP_EGRV, BP_UNDS, BP_EQL, BP_K, BP_V, BP_D, BP_L, BP_J, KC_ENT, \ BP_GRV, BP_A, BP_U, BP_E, BP_I, BP_F, BP_SCLN, BP_EXLM, BP_C, BP_T, BP_S, BP_R, BP_N, BP_APOS, \ - M(M_SF), BP_Z, BP_AGRV, BP_Y, BP_X, KC_RBRACKET, M(M_SFS), BP_CBSP, M(L2INS), M(L2LOC), BP_CDEL, M(M_SFS),BP_M, BP_G, KC_UP, BP_H, BP_Q, M(M_SF), \ - KC_LCTL, KC_LGUI, KC_PSLS, BP_DOT, BP_COMM, KC_SPACE,M(M_L1E), KC_LALT, KC_CAPS, M(M_L1E),KC_SPACE,KC_LEFT, KC_DOWN, KC_RIGHT,BP_COLN, KC_RCTL, \ + M_SF, BP_Z, BP_AGRV, BP_Y, BP_X, KC_RBRC, M_SFS, BP_CBSP, L2INS, L2LOC, BP_CDEL, M_SFS, BP_M, BP_G, KC_UP, BP_H, BP_Q, M_SF, \ + KC_LCTL, KC_LGUI, KC_PSLS, BP_DOT, BP_COMM, KC_SPACE,M_L1E, KC_LALT, KC_CAPS, M_L1E, KC_SPACE, KC_LEFT, KC_DOWN, KC_RIGHT,BP_COLN, KC_RCTL, \ //left pedals - M(M_LP), M(M_RP), KC_TRNS, \ + M_LP, M_RP, KC_TRNS, \ //right pedals - M(M_LP), M(M_RP), KC_TRNS \ + M_LP, M_RP, KC_TRNS \ ), /* Larer 1 for symbols. @@ -102,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, BP_DCUR, BP_PARG, BP_SECT, BP_DGRK, KC_TRNS, BP_TILD, BP_DCAR, BP_LEQL, BP_GEQL, BP_PSMS, BP_OBEL, BP_TIMS, KC_TRNS, \ KC_TRNS, BP_BSLS, BP_ASTR, BP_LCBR, BP_RCBR, BP_GRV, KC_TRNS, BP_DIFF, BP_HASH, BP_LBRC, BP_RBRC, BP_PERC, BP_PMIL, KC_TRNS, \ KC_TRNS, BP_EQL, BP_UGRV, BP_LPRN, BP_RPRN, BP_PLUS, BP_COLN, BP_QEST, BP_CCED, BP_LESS, BP_GRTR, BP_AMPR, BP_UNDS, KC_TRNS, \ - KC_TRNS, M(M_UN), M(M_CUT),M(M_CP), M(M_PS), M(M_SE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BP_DLR, BP_EQL, KC_PGUP, BP_PIPE, BP_SLSH, KC_TRNS, \ + KC_TRNS, M_UN, M_CUT, M_CP, M_PS, M_SE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BP_DLR, BP_EQL, KC_PGUP, BP_PIPE, BP_SLSH, KC_TRNS, \ KC_TRNS, KC_TRNS, BP_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, \ //left pedals KC_TRNS, KC_BTN1, KC_TRNS, \ @@ -134,12 +132,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_MPRV, KC_MNXT, KC_MPLY, KC_MPLY, KC_MPRV, KC_MNXT, KC_MSTP, KC_TRNS, KC_PMNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS, KC_BTN4, KC_BTN5, KC_BTN4, KC_BTN5, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_BTN3, KC_BTN2, KC_BTN1, KC_BTN1, KC_BTN2, KC_KP_4, KC_KP_5, KC_KP_6, KC_PAST, KC_TRNS, \ - KC_TRNS, M(M_UN), M(M_CUT),M(M_CP), M(M_PS), KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_KP_1, KC_KP_2, KC_KP_3, KC_PSLS, KC_TRNS, \ + KC_TRNS, M_UN, M_CUT, M_CP, M_PS, KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_KP_1, KC_KP_2, KC_KP_3, KC_PSLS, 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_KP_0, KC_PDOT, BP_DOT, BP_COMM, KC_TRNS, \ //left pedals - KC_BTN3, M(M_RP), KC_TRNS, \ + KC_BTN3, M_RP, KC_TRNS, \ //right pedals - KC_BTN3, M(M_RP), KC_TRNS \ + KC_BTN3, M_RP, KC_TRNS \ ), /* TRNS - skeleton for laters @@ -169,9 +167,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, \ //left pedals - KC_BTN3, M(M_RP), KC_TRNS, \ + KC_BTN3, M_RP, KC_TRNS, \ //right pedals - KC_BTN3, M(M_RP), KC_TRNS \ + KC_BTN3, M_RP, KC_TRNS \ ), }; @@ -191,28 +189,52 @@ void release_shift(void) { void press_space(void) { if(shift_count > 0) unregister_code (KC_LSHIFT); - register_code (KC_SPACE); - unregister_code (KC_SPACE); + tap_code(KC_SPACE); if(shift_count > 0) register_code (KC_LSHIFT); } void press_enter(void) { if(shift_count > 0) unregister_code (KC_LSHIFT); - register_code (KC_ENT); - unregister_code (KC_ENT); + tap_code (KC_ENT); if(shift_count > 0) register_code (KC_LSHIFT); } void press_underscore(void) { if(shift_count > 0) unregister_code (KC_LSHIFT); - register_code ((unsigned char) BP_UNDS); - unregister_code ((unsigned char) BP_UNDS); + tap_code ((unsigned char) BP_UNDS); if(shift_count > 0) register_code (KC_LSHIFT); } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { +void matrix_init_user(void) { +} + +// Bleah globals need to be initialized. +uint8_t old_layer=_BASE; + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + frenchdev_led_1_off(); + frenchdev_led_2_off(); + switch (layer) { + case _BASE: + frenchdev_led_2_on(); + break; + case _SYMBOLS: + frenchdev_led_1_on(); + break; + case _MEDIA: + frenchdev_led_1_on(); + frenchdev_led_2_on(); + default: + // none + break; + } +} + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { case M_LP: //left pedal if (record->event.pressed) { layer_on(1); @@ -220,25 +242,19 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) key_timer_left_pedal = timer_read(); // if the key is being pressed, we start the timer. } else { if (timer_elapsed(key_timer_left_pedal) < KEY_DELAY) { - mousekey_on (KC_BTN2); - mousekey_send(); - mousekey_off (KC_BTN2); - mousekey_send(); + tap_code (KC_BTN2); } unregister_code (KC_SLCK); layer_off(1); } - break; + break; case M_RP: //right pedal if (record->event.pressed) { layer_on(2); key_timer_right_pedal = timer_read(); // if the key is being pressed, we start the timer. } else { if (timer_elapsed(key_timer_right_pedal) < PEDAL_DELAY) { - mousekey_on (KC_BTN1); - mousekey_send(); - mousekey_off (KC_BTN1); - mousekey_send(); + tap_code (KC_BTN1); } layer_off(2); } @@ -289,13 +305,12 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) key_timer_2 = timer_read(); // if the key is being pressed, we start the timer. } else { if (timer_elapsed(key_timer_2) < KEY_DELAY) { - register_code (KC_INS); - unregister_code (KC_INS); + tap_code (KC_INS); } l2_locked = 0; layer_off(2); } - break; + break; case L2LOC: //lock L2 if (record->event.pressed) { key_timer_2 = timer_read(); // if the key is being pressed, we start the timer. @@ -309,80 +324,33 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) layer_off(2); } } - break; + break; case M_UN: // undo if (record->event.pressed) { - register_code(KC_LCTL); - register_code(BP_Z); - unregister_code(BP_Z); - unregister_code(KC_LCTL); + tap_code16(C(BP_Z)); } - break; + break; case M_CUT: // cut if (record->event.pressed) { - register_code(KC_LCTL); - register_code(BP_X); - unregister_code(BP_X); - unregister_code(KC_LCTL); + tap_code16(C(BP_X)); } - break; + break; case M_CP: // copy if (record->event.pressed) { - register_code(KC_LCTL); - register_code(BP_C); - unregister_code(BP_C); - unregister_code(KC_LCTL); + tap_code16(C(BP_C)); } - break; + break; case M_PS: // paste if (record->event.pressed) { - register_code(KC_LCTL); - register_code(BP_V); - unregister_code(BP_V); - unregister_code(KC_LCTL); + tap_code16(C(BP_V)); } - break; + break; case M_SE: // search if (record->event.pressed) { - register_code(KC_LCTL); - register_code(BP_F); - unregister_code(BP_F); - unregister_code(KC_LCTL); + tap_code16(C(BP_F)); } - break; + break; } - return MACRO_NONE; -}; - -void matrix_init_user(void) { -} - -// Bleah globals need to be initialized. -uint8_t old_layer=_BASE; - -void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - - frenchdev_led_1_off(); - frenchdev_led_2_off(); - switch (layer) { - case _BASE: - frenchdev_led_2_on(); - break; - case _SYMBOLS: - frenchdev_led_1_on(); - break; - case _MEDIA: - frenchdev_led_1_on(); - frenchdev_led_2_on(); - default: - // none - break; - } -} - - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } @@ -394,5 +362,3 @@ void led_set_user(uint8_t usb_led) { } return ; } - - diff --git a/keyboards/handwired/frenchdev/matrix.c b/keyboards/handwired/frenchdev/matrix.c index 7fe3d0bbf245..26c2b312609e 100644 --- a/keyboards/handwired/frenchdev/matrix.c +++ b/keyboards/handwired/frenchdev/matrix.c @@ -5,11 +5,6 @@ The "column" and "row" in here actually refers to the opposite on the keyboard see definition of KEYMAP in v1.h, the grid is transposed so that a "row" in here is actually a "column" on the physical keyboard Nicolas -Note for ErgoDox EZ customizers: Here be dragons! -This is not a file you want to be messing with. -All of the interesting stuff for you is under keymaps/ :) -Love, Erez - Copyright 2013 Oleg Kostyuk Copyright 2013 Nicolas Poirey @@ -40,7 +35,6 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" #include "frenchdev.h" -#include "i2cmaster.h" #ifdef DEBUG_MATRIX_SCAN_RATE #include "timer.h" #endif @@ -280,11 +274,12 @@ static matrix_row_t read_cols(uint8_t row) return 0; } else { uint8_t data = 0; - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPIOB); if (mcp23018_status) goto out; - mcp23018_status = i2c_start(I2C_ADDR_READ); if (mcp23018_status) goto out; - data = i2c_readNak(); - data = ~data; + mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOB, I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_start(I2C_ADDR_READ, I2C_TIMEOUT); if (mcp23018_status) goto out; + data = i2c_read_nack(I2C_TIMEOUT); if (mcp23018_status < 0) goto out; + data = ~((uint8_t)mcp23018_status); + mcp23018_status = I2C_STATUS_SUCCESS; out: i2c_stop(); return data; @@ -318,11 +313,9 @@ static void unselect_rows(void) // do nothing } else { // set all rows hi-Z : 1 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPIOA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write( 0xFF - & ~(0<<8) - ); if (mcp23018_status) goto out; + mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOA, I2C_TIMEOUT); if (mcp23018_status) goto out; + mcp23018_status = i2c_write( 0xFF & ~(0<<8), I2C_TIMEOUT); if (mcp23018_status) goto out; out: i2c_stop(); } @@ -346,11 +339,9 @@ static void select_row(uint8_t row) } else { // set active row low : 0 // set other rows hi-Z : 1 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPIOA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write( 0xFF & ~(1< http://jump.to/fleury -* File: $Id: twimaster.c,v 1.3 2005/07/02 11:14:21 Peter Exp $ -* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 -* Target: any AVR device with hardware TWI -* Usage: API compatible with I2C Software Library i2cmaster.h -**************************************************************************/ -#include -#include - -#include - - -/* define CPU frequency in Mhz here if not defined in Makefile */ -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -/* I2C clock in Hz */ -#define SCL_CLOCK 400000L - - -/************************************************************************* - Initialization of the I2C bus interface. Need to be called only once -*************************************************************************/ -void i2c_init(void) -{ - /* initialize TWI clock - * minimal values in Bit Rate Register (TWBR) and minimal Prescaler - * bits in the TWI Status Register should give us maximal possible - * I2C bus speed - about 444 kHz - * - * for more details, see 20.5.2 in ATmega16/32 secification - */ - - TWSR = 0; /* no prescaler */ - TWBR = 10; /* must be >= 10 for stable operation */ - -}/* i2c_init */ - - -/************************************************************************* - Issues a start condition and sends address and transfer direction. - return 0 = device accessible, 1= failed to access device -*************************************************************************/ -unsigned char i2c_start(unsigned char address) -{ - uint8_t twst; - - // send START condition - TWCR = (1<event.pressed) { - PORTC |= (1 << 6); // PC6 goes high - } - break; - case KC_FN1: - if (record->event.pressed) { - PORTC &= ~(1 << 6); // PC6 goes high - PORTD |= (1<<4); - } - break; - case KC_FN2: - if (record->event.pressed) { - PORTD &= ~(1 << 4); // PC6 goes high - } - break; + case TO(HDN): + if (record->event.pressed) { + PORTC |= (1 << 6); // PC6 goes high + } + + return true; + + case TO(OSY): + if (record->event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes high + PORTD |= (1<<4); + } + + return true; + + case TO(DEF): + if (record->event.pressed) { + PORTD &= ~(1 << 4); // PC6 goes high + } + + return true; + + default: + return true; } - return true; } diff --git a/keyboards/handwired/hacked_motospeed/config.h b/keyboards/handwired/hacked_motospeed/config.h new file mode 100644 index 000000000000..59300e0d27ef --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/config.h @@ -0,0 +1,249 @@ +/* +Copyright 2019 Vladislav Opara + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0690 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MMO_Corp +#define PRODUCT hacked_motospeed +#define DESCRIPTION Motospeed Numpads wired to Teensy++2.0 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + +// WR XR YR ZR VR ZL YL XL WL VL +#define MATRIX_ROW_PINS { B3, B5, F1, B4, B6, D5, D4, D6, D7, C4} + +// ER DR CR BR AR FR FL AL BL CL DL EL +#define MATRIX_COL_PINS { F7, F6, F5, F4, F3, F2, E0, E1, C0, C1, C2, C3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +//#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/hacked_motospeed.c b/keyboards/handwired/hacked_motospeed/hacked_motospeed.c new file mode 100644 index 000000000000..21643895d75b --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/hacked_motospeed.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Vladislav Opara + * + * 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 . + */ +#include "hacked_motospeed.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/hacked_motospeed.h b/keyboards/handwired/hacked_motospeed/hacked_motospeed.h new file mode 100644 index 000000000000..1063fd2e6231 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/hacked_motospeed.h @@ -0,0 +1,46 @@ +/* Copyright 2019 Vladislav Opara + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + EWR, DWR, CWR, BWR, AWR, FXR, FYL, AZL, BZL, CZL, DZL, \ + DXR, CXR, BXR, AXR, FZR, DVL, AYL, BYL, CYL, DYL, EZL, \ + EZR, DYR, CYR, BYR, AYR, DVR, FZL, AXL, BXL, CXL, DXL, \ + DZR, CZR, BZR, AZR, FYR, FXL, AWL, BWL, CWL, DWL, EWL \ +) \ +{ \ + { EWR, DWR, CWR, BWR, AWR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, DXR, CXR, BXR, AXR, FXR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, DYR, CYR, BYR, AYR, FYR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { EZR, DZR, CZR, AZR, BZR, FZR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, DVR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FZL, BZL, AZL, CZL, DZL, EZL }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FYL, AYL, BYL, CYL, DYL, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, FXL, AXL, BXL, CXL, DXL, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, AWL, BWL, CWL, DWL, EWL }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, DVL, KC_NO } \ +} diff --git a/keyboards/handwired/hacked_motospeed/info.json b/keyboards/handwired/hacked_motospeed/info.json new file mode 100644 index 000000000000..7ca92785ebd8 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Hacked Motospeed", + "url": "", + "maintainer": "Deckweiss", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"ESC", "x":0, "y":0, "h":2}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Z", "x":7, "y":0}, {"label":"U", "x":8, "y":0}, {"label":"I", "x":9, "y":0}, {"label":"O", "x":10, "y":0}, {"label":"P", "x":11, "y":0, "w":2}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":7, "y":1}, {"label":"J", "x":8, "y":1}, {"label":"K", "x":9, "y":1}, {"label":"L", "x":10, "y":1}, {"label":"(", "x":11, "y":1}, {"label":")", "x":12, "y":1}, {"label":"=", "x":0, "y":2}, {"label":"Y", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":7, "y":2}, {"label":"M", "x":8, "y":2}, {"label":",", "x":9, "y":2}, {"label":".", "x":10, "y":2}, {"label":"?", "x":11, "y":2}, {"label":"Fn", "x":0, "y":3, "w":2}, {"label":"Num", "x":2, "y":3}, {"label":"Bksp", "x":3, "y":3}, {"label":"Enter", "x":4, "y":3}, {"label":"Spc", "x":5, "y":3}, {"label":"LShift", "x":7, "y":3}, {"label":"LCtrl", "x":8, "y":3}, {"label":"LAlt", "x":9, "y":3}, {"label":"RAlt", "x":10, "y":3}, {"label":"Meta", "x":11, "y":3}, {"label":"Fn", "x":12, "y":2, "h":2}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/keymaps/default/config.h b/keyboards/handwired/hacked_motospeed/keymaps/default/config.h new file mode 100644 index 000000000000..72de214ba723 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Vladislav Opara + * + * 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 . + */ + +#pragma once + +// place overrides here \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c b/keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c new file mode 100644 index 000000000000..bdec8f246154 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2019 Vladislav Opara + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_LPRN, KC_RPRN, \ + KC_PEQL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_QUES, \ + XXXXXXX, XXXXXXX, KC_BSPC, KC_ENT, KC_SPC, KC_LSFT, KC_LCTRL, KC_LALT, KC_ALGR, KC_LWIN, XXXXXXX \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/keymaps/default/readme.md b/keyboards/handwired/hacked_motospeed/keymaps/default/readme.md new file mode 100644 index 000000000000..4c740bd9a550 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hacked_motospeed \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/readme.md b/keyboards/handwired/hacked_motospeed/readme.md new file mode 100644 index 000000000000..ac2d4afc28a5 --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/readme.md @@ -0,0 +1,23 @@ +# hacked_motospeed + +This is a + - tiny (44key), + - budget (~50€ total expense), + - portable (HID bluetooth & 5aH battery) + - easy to diy (little wiring & soldering needed), + +mechanical keyboard. +It is made by wiring two Motospeed K22 numpads to a Teensy++ 2.0, while reusing as much of the original PCB as possible. +The numpads come with Outemu red linear switches. +(A detailed guide will be posted and linked later) + + +Keyboard Maintainer: [Deckweiss](https://github.com/Deckweiss) +Hardware Supported: Motospeed K22 numpads wired to Teensy++ 2.0 according to my guide (upcoming). +Hardware Availability: Ebay, AliExpress + +Make example for this keyboard (after setting up your build environment): + + make handwired/hacked_motospeed: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). \ No newline at end of file diff --git a/keyboards/handwired/hacked_motospeed/rules.mk b/keyboards/handwired/hacked_motospeed/rules.mk new file mode 100644 index 000000000000..1dc955718fbd --- /dev/null +++ b/keyboards/handwired/hacked_motospeed/rules.mk @@ -0,0 +1,81 @@ +# MCU name +MCU = at90usb1286 +#MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = halfkay + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=1024 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file diff --git a/keyboards/handwired/hexon38/keymaps/default/keymap.c b/keyboards/handwired/hexon38/keymaps/default/keymap.c index c3805991f0f0..65dfb4ca04ff 100644 --- a/keyboards/handwired/hexon38/keymaps/default/keymap.c +++ b/keyboards/handwired/hexon38/keymaps/default/keymap.c @@ -1,6 +1,6 @@ // see https://github.com/pepaslabs/hexon38 -#include "hexon38.h" +#include QMK_KEYBOARD_H #define A_ KC_A #define B_ KC_B diff --git a/keyboards/handwired/ibm122m/config.h b/keyboards/handwired/ibm122m/config.h index 3986f0ded6fd..1ef7be78de80 100644 --- a/keyboards/handwired/ibm122m/config.h +++ b/keyboards/handwired/ibm122m/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F0, B5, B4, B3, B2, B1, B0, E7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/handwired/jn68m/config.h b/keyboards/handwired/jn68m/config.h index 9cb00172376d..f6ab4056ba17 100644 --- a/keyboards/handwired/jn68m/config.h +++ b/keyboards/handwired/jn68m/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, E6, D1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/handwired/jot50/config.h b/keyboards/handwired/jot50/config.h new file mode 100644 index 000000000000..2dfcfd2d2808 --- /dev/null +++ b/keyboards/handwired/jot50/config.h @@ -0,0 +1,38 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jotix +#define PRODUCT Jot50 +#define DESCRIPTION A 5x12 compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* pro_micro pin-out */ +#define MATRIX_ROW_PINS { D7, E6, B4, B6, B2 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, D3, D2, D1, D0, D4, C6 } +#define UNUSED_PINS + +/* leds */ +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 5 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 diff --git a/keyboards/fourier/rev1/rev1.c b/keyboards/handwired/jot50/jot50.c similarity index 67% rename from keyboards/fourier/rev1/rev1.c rename to keyboards/handwired/jot50/jot50.c index 1e662e7b8d0f..a1d2258a5814 100644 --- a/keyboards/fourier/rev1/rev1.c +++ b/keyboards/handwired/jot50/jot50.c @@ -1,5 +1,6 @@ -#include "fourier.h" +#include "jot50.h" void matrix_init_kb(void) { + matrix_init_user(); -}; +} diff --git a/keyboards/handwired/jot50/jot50.h b/keyboards/handwired/jot50/jot50.h new file mode 100644 index 000000000000..b7e67ae61ff5 --- /dev/null +++ b/keyboards/handwired/jot50/jot50.h @@ -0,0 +1,19 @@ +#pragma once + +#include "quantum.h" + + +#define LAYOUT_ortho_5x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \ +} diff --git a/keyboards/handwired/jot50/keymaps/default/keymap.c b/keyboards/handwired/jot50/keymaps/default/keymap.c new file mode 100644 index 000000000000..4ec535c31df5 --- /dev/null +++ b/keyboards/handwired/jot50/keymaps/default/keymap.c @@ -0,0 +1,84 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +/* Funct + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | caps | F11 | F12 | | | | | - | = | [ | ] | \ | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | vol- | mute | vol+ | | | | _ | + | { | } | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | prev | play | next | | | | | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | home | pgdn | pgup | end | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +#define _FUNCT LAYOUT_ortho_5x12 (\ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,\ + KC_CAPS, KC_F11, KC_F12, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,\ + _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,\ + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END\ +) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | bspc | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | ` | Q | W | E | R | T | Y | U | I | O | P | del | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | tab | A | S | D | F | G | H | J | K | L | ; | ' | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | lctrl | lgui | lalt | ralt | lower | space | space | raise | left | down | up | right | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_QWERTY] = LAYOUT_ortho_5x12 ( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_LOWER] = _FUNCT, + +[_RAISE] = _FUNCT, + +[_ADJUST] = LAYOUT_ortho_5x12 ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void matrix_init_user(void) { +} + diff --git a/keyboards/handwired/jot50/readme.md b/keyboards/handwired/jot50/readme.md new file mode 100644 index 000000000000..4c22b953d7ef --- /dev/null +++ b/keyboards/handwired/jot50/readme.md @@ -0,0 +1,35 @@ +# Jot50 + +A compact 50% (12x5) ortholinear keyboard kit inspired in the Preonic made by jotix. + +Keyboard Maintainer: [jotix](https://github.com/jotix) +Hardware Supported: Arduino Pro Micro + +### Arduino Pro Micro Pinout + +| Rows | 0 | 1 | 2 | 3 | 4 | +|-------------|----|----|----|----|----| +| Arduino pin | 6 | 7 | 8 | 10 | 16 | +| QMK pin | D7 | E6 | B4 | B6 | B2 | + +| Columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | +|-------------|----|----|----|----|----|----|-----|-----|----|----|----|----| +| Arduino pin | A3 | A2 | A1 | A0 | 15 | 14 | TX0 | RXI | 2 | 3 | 4 | 5 | +| QMK pin | F4 | F5 | F6 | F7 | B1 | B3 | D3 | D2 | D1 | D0 | D4 | C6 | + +| | Backlight | +|-------------|-----------| +| Arduino pin | 9 | +| QMK pin | B5 | + +### Compiling the Firmware + +Make example for this keyboard (after setting up your build environment): + + make handwired/jot50:default + +### The Defaukt Keymap + +![Default Keymap](https://i.imgur.com/g85V8K6.png) + +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). diff --git a/keyboards/preonic/rules.mk b/keyboards/handwired/jot50/rules.mk similarity index 85% rename from keyboards/preonic/rules.mk rename to keyboards/handwired/jot50/rules.mk index d5b21388af52..36a100c9631f 100644 --- a/keyboards/preonic/rules.mk +++ b/keyboards/handwired/jot50/rules.mk @@ -1,7 +1,4 @@ - - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. @@ -40,29 +37,25 @@ F_USB = $(F_CPU) # This definition is optional, and if your keyboard supports multiple bootloaders of # different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. -ifeq ($(strip $(KEYBOARD)), preonic/rev1) - BOOTLOADER = atmel-dfu -endif -ifeq ($(strip $(KEYBOARD)), preonic/rev2) - BOOTLOADER = qmk-dfu -endif +BOOTLOADER = caterina # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Build Options -# 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 # + BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = no # 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 = yes # 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 MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. @@ -70,7 +63,4 @@ API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -LAYOUTS = ortho_5x12 - -DEFAULT_FOLDER = preonic/rev2 \ No newline at end of file +LAYOUTS = ortho_5x12 diff --git a/keyboards/handwired/jotanck/config.h b/keyboards/handwired/jotanck/config.h new file mode 100644 index 000000000000..38b77586ecd4 --- /dev/null +++ b/keyboards/handwired/jotanck/config.h @@ -0,0 +1,39 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jotix +#define PRODUCT Jotanck +#define DESCRIPTION A Jotantastic compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* pro_micro pin-out */ +#define MATRIX_ROW_PINS { D7, E6, B6, B2 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, D3, D2, D1, D0, D4, C6 } +#define UNUSED_PINS + +/* leds */ +#define QMK_LED B4 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 5 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 diff --git a/keyboards/handwired/jotanck/jotanck.c b/keyboards/handwired/jotanck/jotanck.c new file mode 100644 index 000000000000..7744570b23a4 --- /dev/null +++ b/keyboards/handwired/jotanck/jotanck.c @@ -0,0 +1,6 @@ +#include "jotanck.h" + +void matrix_init_kb(void) { + + matrix_init_user(); +} diff --git a/keyboards/handwired/jotanck/jotanck.h b/keyboards/handwired/jotanck/jotanck.h new file mode 100644 index 000000000000..e253940ddc93 --- /dev/null +++ b/keyboards/handwired/jotanck/jotanck.h @@ -0,0 +1,17 @@ +#pragma once + +#include "quantum.h" + + +#define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} diff --git a/keyboards/handwired/jotanck/keymaps/default/keymap.c b/keyboards/handwired/jotanck/keymaps/default/keymap.c new file mode 100644 index 000000000000..2e9f4a39f2a4 --- /dev/null +++ b/keyboards/handwired/jotanck/keymaps/default/keymap.c @@ -0,0 +1,92 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | esc | Q | W | E | R | T | Y | U | I | O | P | bksp | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | tab | A | S | D | F | G | H | J | K | L | ; | ' | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | lshift | Z | X | C | V | B | N | M | , | . | / | enter | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | lctrl | lgui | lalt | ralt | lower | space | space | raise | left | down | up | right | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_QWERTY] = LAYOUT_ortho_4x12 ( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_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_CAPS, 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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Raise + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | del | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + * | | | | | | | | | home | home | pgdn | end | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+ + */ +[_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_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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* Adjust */ +[_ADJUST] = LAYOUT_ortho_4x12 ( + _______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +void matrix_init_user(void) { +} + diff --git a/keyboards/handwired/jotanck/readme.md b/keyboards/handwired/jotanck/readme.md new file mode 100644 index 000000000000..28bbab86bdfd --- /dev/null +++ b/keyboards/handwired/jotanck/readme.md @@ -0,0 +1,38 @@ +# Jotanck + +![Jotanck](https://i.imgur.com/bBfO4L2.jpg) + +A compact 40% (12x4) ortholinear keyboard kit inspired in the Planck made by jotix. + +Keyboard Maintainer: [jotix](https://github.com/jotix) +Hardware Supported: Arduino Pro Micro +Hardware Availability: [Mercado Libre](https://articulo.mercadolibre.com.ar/MLA-771696548-teclado-mecanico-handwired-black-switchs-pbt-keycaps-_JM) + +### Arduino Pro Micro Pinout + +| Rows | 0 | 1 | 2 | 3 | +|-------------|----|----|----|----| +| Arduino pin | 6 | 7 | 10 | 16 | +| QMK pin | D7 | E6 | B6 | B2 | + +| Columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | +|-------------|----|----|----|----|----|----|-----|-----|----|----|----|----| +| Arduino pin | A3 | A2 | A1 | A0 | 15 | 14 | TX0 | RXI | 2 | 3 | 4 | 5 | +| QMK pin | F4 | F5 | F6 | F7 | B1 | B3 | D3 | D2 | D1 | D0 | D4 | C6 | + +| | QMK led | Backlight | +|-------------|-----------|-----------| +| Arduino pin | 8 | 9 | +| QMK pin | B4 | B5 | + +### Compiling the Firmware + +Make example for this keyboard (after setting up your build environment): + + make handwired/jotanck:default + +### The Defaukt Keymap + +![Default Keymap](https://i.imgur.com/xh7Dmd7.png) + +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). diff --git a/keyboards/handwired/jotanck/rules.mk b/keyboards/handwired/jotanck/rules.mk new file mode 100644 index 000000000000..6b39b7cc1abe --- /dev/null +++ b/keyboards/handwired/jotanck/rules.mk @@ -0,0 +1,66 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +LAYOUTS = ortho_4x12 diff --git a/keyboards/handwired/jotpad16/config.h b/keyboards/handwired/jotpad16/config.h new file mode 100644 index 000000000000..e113597dc280 --- /dev/null +++ b/keyboards/handwired/jotpad16/config.h @@ -0,0 +1,38 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jotix +#define PRODUCT JotPad16 +#define DESCRIPTION A Jotantastic compact NumPad + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* pro_micro pin-out */ +#define MATRIX_ROW_PINS { B6, B2, D2, D3 } +#define MATRIX_COL_PINS { B5, B4, B3, B1 } +#define UNUSED_PINS + +/* leds */ +#define QMK_LED E6 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_PIN D7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 0 + +/* 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 + diff --git a/keyboards/handwired/jotpad16/jotpad16.c b/keyboards/handwired/jotpad16/jotpad16.c new file mode 100644 index 000000000000..512234b91772 --- /dev/null +++ b/keyboards/handwired/jotpad16/jotpad16.c @@ -0,0 +1,6 @@ +#include "jotpad16.h" + +void matrix_init_kb(void) { + + matrix_init_user(); +} diff --git a/keyboards/handwired/jotpad16/jotpad16.h b/keyboards/handwired/jotpad16/jotpad16.h new file mode 100644 index 000000000000..012c9290ddfe --- /dev/null +++ b/keyboards/handwired/jotpad16/jotpad16.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_ortho_4x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 } \ +} + diff --git a/keyboards/handwired/jotpad16/keymaps/default/keymap.c b/keyboards/handwired/jotpad16/keymaps/default/keymap.c new file mode 100644 index 000000000000..fb5dc71e2344 --- /dev/null +++ b/keyboards/handwired/jotpad16/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. + +#define _NUMPAD 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Numpad + * +-------+-------+-------+-------+ + * | 7 | 8 | 9 | - | + * +-------+-------+-------+-------+ + * | 4 | 5 | 6 | + | + * +-------+-------+-------+-------+ + * | 1 | 2 | 3 | enter | + * +-------+-------+-------+-------+ + * | 0 | . | / | * | + * +-------+-------+-------+-------+ + */ +[_NUMPAD] = LAYOUT_ortho_4x4( + KC_P7, KC_P8, KC_P9, KC_MINS, + KC_P4, KC_P5, KC_P6, KC_PLUS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_PDOT,KC_PSLS,KC_ASTR +), +}; diff --git a/keyboards/handwired/jotpad16/readme.md b/keyboards/handwired/jotpad16/readme.md new file mode 100644 index 000000000000..3d971a51548c --- /dev/null +++ b/keyboards/handwired/jotpad16/readme.md @@ -0,0 +1,39 @@ +# JotPad16 + +![JotPad16](https://i.imgur.com/RwmqWuS.jpg) + +A ortholinear keypad (4x4) made by jotix. + +Keyboard Maintainer: [jotix](https://github.com/jotix) +Hardware Supported: Arduino Pro Micro + +### Arduino Pro Micro Pinout + +| rows | 0 | 1 | 2 | 3 | +|-------------|----|----|-----|-----| +| arduino pin | 10 | 16 | RXI | TX0 | +| qmk pin | B6 | B2 | D2 | D3 | + +| columns | 0 | 1 | 2 | 3 | +|-------------|----|----|----|----| +| arduino pin | 9 | 8 | 14 | 15 | +| qmk pin | B5 | B4 | B3 | C3 | + +| | QMK led | Backlight | +|-------------|-----------|-----------| +| Arduino pin | 7 | 6 | +| qmk pin | E6 | D7 | + +### Compiling the Firmware + +Make example for this keyboard (after setting up your build environment): + + make handwired/jotpad16:default + +### The Default Keymap + +![Default Keymap](https://i.imgur.com/VJZcFRN.jpg) + +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). + + diff --git a/keyboards/handwired/jotpad16/rules.mk b/keyboards/handwired/jotpad16/rules.mk new file mode 100644 index 000000000000..8105f800cb9a --- /dev/null +++ b/keyboards/handwired/jotpad16/rules.mk @@ -0,0 +1,66 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +LAYOUTS = ortho_4x4 diff --git a/keyboards/handwired/kbod/config.h b/keyboards/handwired/kbod/config.h index 8772ead3a2c9..5f02c71721e2 100644 --- a/keyboards/handwired/kbod/config.h +++ b/keyboards/handwired/kbod/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D0, D1, F0, F1, F4, F5, F6, F7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 063a94b4d2a3..49083820ad2f 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -2,6 +2,11 @@ #define MODS_PRESSED(btn) (get_mods() & (MOD_BIT(KC_L##btn)|MOD_BIT(KC_R##btn))) +enum custom_keycodes { + SFT_ESC = SAFE_RANGE, + ALT_F4 +}; + #define SET_WHETHER(mask, btn1, btn2) \ if (record->event.pressed) { \ if (mask) { \ @@ -24,7 +29,7 @@ if (record->event.pressed) { \ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( /* Base */ - F(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + SFT_ESC, KC_1, KC_2, KC_3, ALT_F4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ @@ -38,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT \ ), LAYOUT( /* Keypad layer */ - TO(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC, \ + TO(0), KC_1, KC_2, KC_3, ALT_F4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC, \ _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_BTN1, KC_MS_U, KC_BTN2, \ @@ -53,24 +58,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), - [1] = ACTION_FUNCTION(1), -}; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: + SET_WHETHER(MODS_PRESSED(SHIFT), KC_ESC, KC_GRAVE); + + return false; + + case ALT_F4: + SET_WHETHER(MODS_PRESSED(ALT), KC_4, KC_F4); + return false; -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_mask; - static uint8_t alt_mask; - switch (id) { - case 0: - shift_esc_mask = MODS_PRESSED(SHIFT); - SET_WHETHER(shift_esc_mask, KC_ESC, KC_GRAVE); - break; - case 1: - alt_mask = MODS_PRESSED(ALT); - SET_WHETHER(alt_mask, KC_4, KC_F4); - break; + default: + return true; } } diff --git a/keyboards/handwired/lovelive9/config.h b/keyboards/handwired/lovelive9/config.h new file mode 100644 index 000000000000..c11a25df6006 --- /dev/null +++ b/keyboards/handwired/lovelive9/config.h @@ -0,0 +1,39 @@ + + +#pragma once +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0007 +#define DEVICE_VER 0x0001 +#define MANUFACTURER numazu Keyboards +#define PRODUCT lovelive9 +#define DESCRIPTION lovelive sunshine Keyboards 9Key + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 9 + +/* default pin-out */ +#define MATRIX_ROW_PINS { NO_PIN } +#define MATRIX_COL_PINS { B4, B6, B2, D7, B1, F7, F6, F5, F4 } + +#define UNUSED_PINS + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 + +#define RGBLED_NUM 9 // Number of LEDs + +#define RGBLIGHT_ANIMATIONS +#define BACKLIGHT_LEVELS 5 +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 +#define BREATHING_PERIOD 2 +#define RGBLIGHT_LIMIT_VAL 255 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +#define USB_MAX_POWER_CONSUMPTION 400 + +#define TAPPING_TERM 200 diff --git a/keyboards/handwired/lovelive9/info.json b/keyboards/handwired/lovelive9/info.json new file mode 100644 index 000000000000..4f81d321d9e9 --- /dev/null +++ b/keyboards/handwired/lovelive9/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "lovelive9", + "url": "https://github.com/ginjake", + "maintainer": "ginjake", + "width": 9, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0}, {"label":"k05", "x":5, "y":0}, {"label":"k06", "x":6, "y":0}, {"label":"k07", "x":7, "y":0}, {"label":"k08", "x":8, "y":0}] + } + } +} diff --git a/keyboards/handwired/lovelive9/keymaps/default/keymap.c b/keyboards/handwired/lovelive9/keymaps/default/keymap.c new file mode 100644 index 000000000000..605f722f444e --- /dev/null +++ b/keyboards/handwired/lovelive9/keymaps/default/keymap.c @@ -0,0 +1,338 @@ +#include QMK_KEYBOARD_H + +//#include "v1.h" + +//Following line allows macro to read current RGB settings + +rgblight_config_t RGB_current_config; + +#define KC_KANJI KC_GRV + + +enum Layer +{ + _QWERTY, + _DIA, + _YOU, + _CHIKA, + _ZURA, + _RUBY, + _YOHANE, + _RIKO, + _MARI, + _KANAN, + _RUBY_SUB1, + _RUBY_SUB2, + _RUBY_SUB3, + _SCHOOL_IDOL_FESTIVAL +}; + +#define SEND_DIA 100 +#define SEND_YOU 101 +#define SEND_CHIKA 102 +#define SEND_ZURA 103 +#define SEND_RUBY 104 +#define SEND_YOHANE 105 +#define SEND_RIKO 106 +#define SEND_MARI 107 +#define SEND_KANAN 108 + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + DIA, + YOU, + CHIKA, + ZURA, + RUBY, + RUBY_SUB1, + RUBY_SUB2, + RUBY_SUB3, + YOHANE, + RIKO, + MARI, + KANAN, + TO_SCHOOL_IDOL_FESTIVAL, + RETURN_SCHOOL_IDOL_FESTIVAL +}; + + +int long_tap_timer; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + DIA, YOU, CHIKA, ZURA, RUBY, YOHANE, RIKO, MARI, KANAN + ), + [_DIA] = LAYOUT( + DIA, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_LSFT + ), + + [_YOU] = LAYOUT( + KC_H, YOU, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_LSFT + ), + + [_CHIKA] = LAYOUT( + KC_O, KC_P, CHIKA, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_LSFT + ), + + [_ZURA] = LAYOUT( + KC_V, KC_W, KC_X, ZURA, KC_Y, KC_Z, KC_M, KC_N, KC_LSFT + ), + + //推しをたくさん押せるようにルビーちゃんには複数のレイヤー設定 + [_RUBY] = LAYOUT( + KC_CIRC, KC_LPRN, KC_QUOT, RUBY_SUB1, RUBY, RUBY_SUB2, KC_LCBR, KC_EXLM, KC_LSFT + ), + [_RUBY_SUB1] = LAYOUT( + KC_RCBR, KC_AT, KC_PIPE, RUBY_SUB1, RUBY, RUBY_SUB2, KC_HASH, KC_EQL, KC_LSFT + ), + [_RUBY_SUB2] = LAYOUT( + KC_TILD, KC_DLR, KC_LBRC, RUBY_SUB1, RUBY, RUBY_SUB2, KC_PERC, KC_RBRC, KC_LSFT + ), + [_RUBY_SUB3] = LAYOUT( + TO_SCHOOL_IDOL_FESTIVAL, KC_DLR, KC_LBRC, RUBY_SUB1, RUBY, RUBY_SUB2, KC_PERC, KC_RBRC, RETURN_SCHOOL_IDOL_FESTIVAL + ), + + [_YOHANE] = LAYOUT( + KC_0, KC_1, KC_2, KC_3, KC_4, YOHANE, KC_5, KC_6, KC_LSFT + ), + + [_RIKO] = LAYOUT( + KC_7, KC_8, KC_9, KC_PLUS, KC_MINS, KC_ASTR, RIKO, KC_SLSH, KC_LSFT + ), + + [_MARI] = LAYOUT( + KC_TAB, KC_DEL, KC_COMM, KC_SPC, KC_ENT, KC_BSPC, KC_DOT, MARI, KC_LSFT + ), + + [_KANAN] = LAYOUT( + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ENT, KC_BSPC, KC_AMPR, KC_KANJI, KANAN + ), + [_SCHOOL_IDOL_FESTIVAL] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9 + ), +}; + +void check_tap_and_send_key(int MEMBER) { + if (long_tap_timer < 500) { + switch (MEMBER) { + case SEND_DIA: + SEND_STRING("KUROSAWA DIA"); + break; + case SEND_YOU: + SEND_STRING("WATANABE YOU"); + break; + case SEND_CHIKA: + SEND_STRING("TAKAMI CHIKA"); + break; + case SEND_ZURA: + SEND_STRING("KUNIKIDA HANAMARU"); + break; + case SEND_RUBY: + SEND_STRING("KUROSAWA RUBY"); + break; + case SEND_YOHANE: + SEND_STRING("TSUSHIMA YOSHIKO"); + break; + case SEND_RIKO: + SEND_STRING("SAKURAUCHI RIKO"); + break; + case SEND_MARI: + SEND_STRING("OHARA MARI"); + break; + case SEND_KANAN: + SEND_STRING("MATSUURA KANAN"); + break; + } + } + long_tap_timer = 0; +} + +int aqours_color_h[] = { 26, 340, 150, 0, 199, 220, 53, 265, 322}; +int aqours_color_s[] = {255, 165, 255, 255, 255, 350, 255, 255, 255}; +int aqours_color_v[] = {255, 255, 255, 255, 255, 255, 200, 255, 255}; + +void LED_default_set(void) { + + sethsv(aqours_color_h[2], aqours_color_s[2], aqours_color_v[2], (LED_TYPE *)&led[0]); + sethsv(aqours_color_h[7], aqours_color_s[7], aqours_color_v[7], (LED_TYPE *)&led[1]); + sethsv(aqours_color_h[1], aqours_color_s[1], aqours_color_v[1], (LED_TYPE *)&led[2]); + sethsv(aqours_color_h[5], aqours_color_s[5], aqours_color_v[5], (LED_TYPE *)&led[3]); + sethsv(aqours_color_h[8], aqours_color_s[8], aqours_color_v[8], (LED_TYPE *)&led[4]); + sethsv(aqours_color_h[6], aqours_color_s[6], aqours_color_v[6], (LED_TYPE *)&led[5]); + sethsv(aqours_color_h[0], aqours_color_s[0], aqours_color_v[0], (LED_TYPE *)&led[6]); + sethsv(aqours_color_h[4], aqours_color_s[4], aqours_color_v[4], (LED_TYPE *)&led[7]); + sethsv(aqours_color_h[3], aqours_color_s[3], aqours_color_v[3], (LED_TYPE *)&led[8]); + + rgblight_set(); + +} + + +void LED_layer_set(int aqours_index) { + for (int c = 0; c < 9; c++) { + sethsv(aqours_color_h[aqours_index], aqours_color_s[aqours_index], aqours_color_v[aqours_index], (LED_TYPE *)&led[c]); + } + rgblight_set(); +} + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + + case DIA: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_DIA); + LED_layer_set(3); + } else { + check_tap_and_send_key(SEND_DIA); + layer_off(_DIA); + LED_default_set(); + } + break; + + case YOU: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_YOU); + LED_layer_set(4); + } else { + check_tap_and_send_key(SEND_YOU); + layer_off(_YOU); + LED_default_set(); + } + break; + + case CHIKA: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_CHIKA); + LED_layer_set(0); + } else { + check_tap_and_send_key(SEND_CHIKA); + layer_off(_CHIKA); + LED_default_set(); + } + break; + + case ZURA: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_ZURA); + LED_layer_set(6); + } else { + check_tap_and_send_key(SEND_ZURA); + layer_off(_ZURA); + LED_default_set(); + } + break; + + case RUBY: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_RUBY); + LED_layer_set(8); + } else { + check_tap_and_send_key(SEND_RUBY); + layer_off(_RUBY); + LED_default_set(); + } + break; + case RUBY_SUB1: + if (record->event.pressed) { + layer_on(_RUBY_SUB1); + if (IS_LAYER_ON(_RUBY_SUB1) && IS_LAYER_ON(_RUBY_SUB2)) { + layer_on(_RUBY_SUB3); + } else { + layer_off(_RUBY_SUB3); + } + } else { + layer_off(_RUBY_SUB1); + } + break; + case RUBY_SUB2: + if (record->event.pressed) { + layer_on(_RUBY_SUB2); + if (IS_LAYER_ON(_RUBY_SUB1) && IS_LAYER_ON(_RUBY_SUB2)) { + layer_on(_RUBY_SUB3); + } else { + layer_off(_RUBY_SUB3); + } + } else { + layer_off(_RUBY_SUB2); + } + break; + + case YOHANE: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_YOHANE); + LED_layer_set(5); + } else { + check_tap_and_send_key(SEND_YOHANE); + layer_off(_YOHANE); + LED_default_set(); + } + break; + + case RIKO: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_RIKO); + LED_layer_set(1); + } else { + check_tap_and_send_key(SEND_RIKO); + layer_off(_RIKO); + LED_default_set(); + } + break; + + case MARI: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_MARI); + LED_layer_set(7); + } else { + check_tap_and_send_key(SEND_MARI); + layer_off(_MARI); + LED_default_set(); + } + break; + + case KANAN: + if (record->event.pressed) { + long_tap_timer = 1; + layer_on(_KANAN); + LED_layer_set(2); + } else { + check_tap_and_send_key(SEND_KANAN); + layer_off(_KANAN); + LED_default_set(); + } + break; + + case TO_SCHOOL_IDOL_FESTIVAL: + if (record->event.pressed) { + LED_default_set(); + layer_on(_SCHOOL_IDOL_FESTIVAL); + } + break; + case RETURN_SCHOOL_IDOL_FESTIVAL: + if (record->event.pressed) { + layer_off(_SCHOOL_IDOL_FESTIVAL); + } + break; + } + + return true; +} + + +void matrix_scan_user(void) { + + if (long_tap_timer > 0) { + long_tap_timer++; + } +} diff --git a/keyboards/handwired/lovelive9/lovelive9.c b/keyboards/handwired/lovelive9/lovelive9.c new file mode 100644 index 000000000000..1ec8ae0527ca --- /dev/null +++ b/keyboards/handwired/lovelive9/lovelive9.c @@ -0,0 +1,7 @@ +#include "lovelive9.h" + + + +void matrix_init_kb(void) { + matrix_init_user(); +} diff --git a/keyboards/handwired/lovelive9/lovelive9.h b/keyboards/handwired/lovelive9/lovelive9.h new file mode 100644 index 000000000000..f6fb1f94cc09 --- /dev/null +++ b/keyboards/handwired/lovelive9/lovelive9.h @@ -0,0 +1,9 @@ +#pragma once + +#include "quantum.h" +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08 } \ +} diff --git a/keyboards/handwired/lovelive9/readme.md b/keyboards/handwired/lovelive9/readme.md new file mode 100644 index 000000000000..2046472773c3 --- /dev/null +++ b/keyboards/handwired/lovelive9/readme.md @@ -0,0 +1,14 @@ +# lovelive9 + +lovelive9 is 9keys keyboard. + +![lovelive9](https://user-images.githubusercontent.com/16838187/53496102-a6fc0700-3ae4-11e9-85e4-1e6cd981b410.jpg) + +Keyboard Maintainer: [ginjake](https://github.com/ginjake) [Twitter:@sirojake](https://twitter.com/sirojake) +Hardware Supported: Pro Micro, handwired (LED used [CherryMXLEDBitBoard](https://github.com/swanmatch/MxLEDBitPCB) with handwired) + +Make example for this keyboard (after setting up your build environment): + + make handwired/lovelive9: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/#/n diff --git a/keyboards/handwired/lovelive9/rules.mk b/keyboards/handwired/lovelive9/rules.mk new file mode 100644 index 000000000000..99a531a63843 --- /dev/null +++ b/keyboards/handwired/lovelive9/rules.mk @@ -0,0 +1,67 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = caterina + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/maartenwut/keymaps/default/keymap.c b/keyboards/handwired/maartenwut/keymaps/default/keymap.c index 9152d8ca220c..54276d4b20d0 100755 --- a/keyboards/handwired/maartenwut/keymaps/default/keymap.c +++ b/keyboards/handwired/maartenwut/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "maartenwut.h" +#include QMK_KEYBOARD_H #define _MA 0 #define _NU 1 @@ -6,9 +6,6 @@ #define _GA 3 #define _AR 4 -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define LSHIFT OSM(MOD_LSFT) #define SPACE LT(_AR, KC_SPC) @@ -43,4 +40,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) -}; \ No newline at end of file +}; diff --git a/keyboards/handwired/magicforce61/README.md b/keyboards/handwired/magicforce61/README.md deleted file mode 100644 index cc86732627c8..000000000000 --- a/keyboards/handwired/magicforce61/README.md +++ /dev/null @@ -1,24 +0,0 @@ -Magicforce "61" Handwired -======================= - -Basically I cut 7 keys off the magicforce68 and handwired everything to a -teensy++ 2.0 to make it a ~60% board. - -## Wiring Layout - -![Wiring Layout](https://imgur.com/gallery/RxYyA) - -## Pinout - -The following pins are used: - - ``` - #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 } - #define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 } - ``` - -## Compiling and loading the firmware - -To build the firmware, run `make handwired/magicforce61`. - -Flash the firmware using the teensy loader or avrdude. diff --git a/keyboards/handwired/magicforce61/config.h b/keyboards/handwired/magicforce61/config.h index c6c689ab6c5d..3dc74f83e7dd 100644 --- a/keyboards/handwired/magicforce61/config.h +++ b/keyboards/handwired/magicforce61/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -43,7 +42,7 @@ along with this program. If not, see . * */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 } -#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 } +#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 } #define UNUSED_PINS /* COL2ROW or ROW2COL */ @@ -152,5 +151,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/magicforce61/info.json b/keyboards/handwired/magicforce61/info.json new file mode 100644 index 000000000000..22ffccd3cedd --- /dev/null +++ b/keyboards/handwired/magicforce61/info.json @@ -0,0 +1,74 @@ +{ + "keyboard_name": "Magicforce \"61\"", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"`", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"GUI", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/handwired/magicforce61/keymaps/default/keymap.c b/keyboards/handwired/magicforce61/keymaps/default/keymap.c index 9559be5d21b5..12252c978ab1 100644 --- a/keyboards/handwired/magicforce61/keymaps/default/keymap.c +++ b/keyboards/handwired/magicforce61/keymaps/default/keymap.c @@ -1,69 +1,54 @@ -#include "magicforce61.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _FN1 1 #define _FN2 2 -#define KC_ KC_TRNS + #define KC_X0 LT(_FN2, KC_GRV) #define KC_X1 MO(_FN1) -#define KC_NAV_ESC LT(_FN1, KC_ESC) +#define NAV_ESC LT(_FN1, KC_ESC) #define KC_GUI MAGIC_UNNO_GUI const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KEYMAP( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */ - GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , - /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| */ - TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , - /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| */ - NAV_ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , - /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| */ - LSPO , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSPC , - /*|---------`----`----`----`----`----`----`----`----`----`----`-------------. */ - LCTL , RGUI ,LALT , SPACE , X1 ,RALT ,RCTL , X1 - /*`-----+-----+-----+------------------------------+------+-----+-----' ANY */ + [_QWERTY] = LAYOUT( + /*,--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------. */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + /*|esc-----`-1------`-2------`-3------`-4------`-5------`-6------`-7------`-8------`-9------`-0------`mnus----`plus----`--bksp--| */ + 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, \ + /*|tab-----`-q------`-w------`-e------`-r------`-t------`-y------`-u------`-i------`-o------`-p------`-{------`-}------`--|-----| */ + NAV_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + /*|caps----`-a------`-s------`-d------`-f------`-g------`-h------`-j------`-k------`-l------`-;------`-'------`-----------enter-| */ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ + /*|shift---`-z------`-x------`-c------`-v------`-b------`-n------`-m------`-,------`-.------`-/------`--------------------shift-| */ + KC_LCTL, KC_RGUI, KC_LALT, KC_SPC, KC_X1, KC_RALT, KC_RCTL, KC_X1 \ + /*`ctrl----`-gui----`-alt----`------------------space---------------------------------------`-fn-----`-alt----`ctrl----' ANY */ ), - [_FN1] = KEYMAP( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */ - GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , - /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| */ - , , UP , , , , , ,INS ,PSCR, , , , , - /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| */ - ,LEFT,DOWN,RGHT, , , , PGDN , PGUP , , , , , - /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| */ - , , , , , ,VOLD,VOLU,MUTE, , , , - /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-. */ - , , , , , , , MPLY - /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' ANY */ + [_FN1] = LAYOUT( + /*,--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------. */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, \ + /*|esc-----`-1------`-2------`-3------`-4------`-5------`-6------`-7------`-8------`-9------`-0------`mnus----`plus----`--bksp--| */ + _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, _______, _______, _______, _______, \ + /*|tab-----`-q------`-w------`-e------`-r------`-t------`-y------`-u------`-i------`-o------`-p------`-{------`-}------`--|-----| */ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, \ + /*|caps----`-a------`-s------`-d------`-f------`-g------`-h------`-j------`-k------`-l------`-;------`-'------`-----------enter-| */ + _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, \ + /*|shift---`-z------`-x------`-c------`-v------`-b------`-n------`-m------`-,------`-.------`-/------`--------------------shift-| */ + _______, _______, _______, _______, _______, _______, _______, KC_MPLY \ + /*`ctrl----`-gui----`-alt----`------------------space---------------------------------------`-fn-----`-alt----`ctrl----' ANY */ ), - [_FN2] = KEYMAP( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. */ - GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , - /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| */ - , , , , , , , 7 , 8 , 9 , , , , , - /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| */ - , , , , , , , 4 , 5 , 6 , , , , - /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| */ - , , , , , , 0 , 1 , 2 , 3 , , , - /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-. */ - , , , , , , , - /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' ANY */ + [_FN2] = LAYOUT( + /*,--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------. */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, \ + /*|esc-----`-1------`-2------`-3------`-4------`-5------`-6------`-7------`-8------`-9------`-0------`mnus----`plus----`--bksp--| */ + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, \ + /*|tab-----`-q------`-w------`-e------`-r------`-t------`-y------`-u------`-i------`-o------`-p------`-{------`-}------`--|-----| */ + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ + /*|caps----`-a------`-s------`-d------`-f------`-g------`-h------`-j------`-k------`-l------`-;------`-'------`-----------enter-| */ + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, \ + /*|shift---`-z------`-x------`-c------`-v------`-b------`-n------`-m------`-,------`-.------`-/------`--------------------shift-| */ + _______, _______, _______, _______, _______, _______, _______, _______ \ + /*`ctrl----`-gui----`-alt----`------------------space---------------------------------------`-fn-----`-alt----`ctrl----' ANY */ ) }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/handwired/magicforce61/magicforce61.h b/keyboards/handwired/magicforce61/magicforce61.h index 784f2b2c8023..37a32ed7839c 100644 --- a/keyboards/handwired/magicforce61/magicforce61.h +++ b/keyboards/handwired/magicforce61/magicforce61.h @@ -1,20 +1,17 @@ -#ifndef MAGICFORCE61_H -#define MAGICFORCE61_H +#pragma once #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, \ K40, K41, K42, K45, K49, K4A, K4C, K4D \ ) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D }, \ - { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D }, \ - { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_NO, KC_##K2D }, \ - { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_NO, KC_##K3D }, \ - { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_NO, KC_##K4C, KC_##K4D }, \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D }, \ } - -#endif diff --git a/keyboards/handwired/magicforce61/readme.md b/keyboards/handwired/magicforce61/readme.md new file mode 100644 index 000000000000..081992aa8412 --- /dev/null +++ b/keyboards/handwired/magicforce61/readme.md @@ -0,0 +1,31 @@ +# Magicforce "61" Handwired + +Basically I cut 7 keys off the magicforce68 and handwired everything to a teensy++ 2.0 to make it a ~60% board. + +Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +Hardware Supported: magicforce61, teensy++ 2.0 + +Make example for this keyboard (after setting up your build environment): + + make handwired/magicforce61:default + +Flash the firmware using the teensy loader or avrdude. + +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). + +## Wiring Layout / Pinout + +| | B5 | B4 | B3 | B2 | B1 | B0 | E7 | E6 | F0 | F1 | F2 | F3 | F4 | F5 | +| -----: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | :--: | +| **D0** | Esc | 1! | 2@ | 3# | 4$ | 5% | 6^ | 7& | 8* | 9( | 0) | -_ | =+ | Bspc | +| **D1** | Tab | Q | W | E | R | T | Y | U | I | O | P | [{ | ]} | \\\| | +| **D2** | Caps | A | S | D | F | G | H | J | K | L | ;: | '" | | Ent | +| **D3** | LSft | Z | X | C | V | B | N | M | , | . | / | | | RSft | +| **D4** | LCtl | LGUI | LAlt | | | Spc | | | | RAlt | RGUI | | App | RCtl | + +The following pins are used: + +``` +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4 } +#define MATRIX_COL_PINS { B5, B4, B3, B2, B1, B0, E7, E6, F0, F1, F2, F3, F4, F5 } +``` diff --git a/keyboards/handwired/magicforce68/README.md b/keyboards/handwired/magicforce68/README.md deleted file mode 100644 index a0de66069db5..000000000000 --- a/keyboards/handwired/magicforce68/README.md +++ /dev/null @@ -1,20 +0,0 @@ -Magicforce 68 Handwired -======================= - -This firmware is for a Magicforce 68 that's had its PCB removed and is handwired with an Arduino Micro. NOTE: The Arduino Micro is different than the Arduino *Pro* Micro. - -## Wiring Layout - -![Wiring Layout](http://i.imgur.com/NmTCv5u.png) - -## Pinout - -The following pins are used: -- Columns 1-15: B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 -- Rows 1-5: F0, F1, F4, F5, F6 - -## Compiling and loading the firmware - -To build the firmware, run `make`. - -To flash the firemware onto the microcontroller, run `make avrdude`, and press the reset button. diff --git a/keyboards/handwired/magicforce68/info.json b/keyboards/handwired/magicforce68/info.json new file mode 100644 index 000000000000..a3905336ab88 --- /dev/null +++ b/keyboards/handwired/magicforce68/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "Magicforce 68 Handwired", + "url": "", + "maintainer": "qmk", + "width": 17.25, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"`", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Insert", "x":15.25, "y":0}, + {"label":"Page Up", "x":16.25, "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":"Delete", "x":15.25, "y":1}, + {"label":"Page Down", "x":16.25, "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.75}, + {"label":"Up", "x":15.25, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Fn", "x":10, "y":4, "w":1.25}, + {"label":"Alt", "x":11.25, "y":4, "w":1.25}, + {"label":"Ctrl", "x":12.5, "y":4, "w":1.25}, + {"label":"Left", "x":14.25, "y":4}, + {"label":"Down", "x":15.25, "y":4}, + {"label":"Right", "x":16.25, "y":4} + ] + } + } +} diff --git a/keyboards/handwired/magicforce68/keymaps/default/keymap.c b/keyboards/handwired/magicforce68/keymaps/default/keymap.c index 22553f714c30..e44cfefdb156 100644 --- a/keyboards/handwired/magicforce68/keymaps/default/keymap.c +++ b/keyboards/handwired/magicforce68/keymaps/default/keymap.c @@ -1,67 +1,34 @@ -#include "magicforce68.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _FN1 1 #define _FN2 2 -#define KC_ KC_TRNS + #define KC_X0 LT(_FN2, KC_GRV) #define KC_X1 MO(_FN1) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KEYMAP( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ - ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP, - /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */ - TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN, - /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */ - X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER , - /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */ - LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP , - /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */ - LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT - /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */ + [_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, 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_PGDN, \ + KC_X0, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_X1, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), - [_FN1] = KEYMAP( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ - GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, - /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ - , , , UP , , , , , , , , , , , VOLD,END, - /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ - , ,LEFT,DOWN,RGHT, , , , , , , , , - /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ - , , , , , , ,MUTE, , , , , MUTE, - /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ - , , , , , , , MPRV,MPLY,MNXT - /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + [_FN1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_VOLU, KC_HOME, \ + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_END, \ + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT \ ), - [_FN2] = KEYMAP( - /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */ - GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME, - /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */ - , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END, - /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */ - , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , , - /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */ - , , , , , , 0 , 1 , 2 , 3 , , , MUTE, - /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */ - , , , , , , , MPRV,MPLY,MNXT - /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */ + [_FN2] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_VOLU, KC_HOME, \ + _______, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, KC_VOLD, KC_END, \ + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT \ ) }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/handwired/magicforce68/magicforce68.h b/keyboards/handwired/magicforce68/magicforce68.h index cfcdce38d572..949507fef791 100644 --- a/keyboards/handwired/magicforce68/magicforce68.h +++ b/keyboards/handwired/magicforce68/magicforce68.h @@ -3,18 +3,18 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K2E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K3E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, \ K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D, K4E \ ) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E }, \ - { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \ - { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_NO, KC_##K2E }, \ - { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_##K3C, KC_##K3D, KC_##K3E }, \ - { KC_##K40, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_##K45, KC_NO, KC_NO, KC_NO, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D, K4E } \ } -#endif \ No newline at end of file +#endif diff --git a/keyboards/handwired/magicforce68/readme.md b/keyboards/handwired/magicforce68/readme.md new file mode 100644 index 000000000000..5b5ade3b7f38 --- /dev/null +++ b/keyboards/handwired/magicforce68/readme.md @@ -0,0 +1,24 @@ +# Magicforce 68 Handwired + +This firmware is for a Magicforce 68 that's had its PCB removed and is handwired with an Arduino Micro. NOTE: The Arduino Micro is different than the Arduino *Pro* Micro. + +Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +Hardware Supported: magicforce68, Arduino Micro + +## Wiring Layout + +![Wiring Layout](http://i.imgur.com/NmTCv5u.png) + +## Pinout + +The following pins are used: +- Columns 1-15: B2, B0, D3, D2, D1, D0, D4, C6, D7, E6, B4, B5, B6, B7, D6 +- Rows 1-5: F0, F1, F4, F5, F6 + +Make example for this keyboard (after setting up your build environment): + + make handwired/magicforce68:default + +To flash the firmware onto the microcontroller, run `make handwired/magicforce68:default:avrdude`, and press the reset button. + +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). diff --git a/keyboards/handwired/mechboards_micropad/config.h b/keyboards/handwired/mechboards_micropad/config.h new file mode 100644 index 000000000000..01a0bdd909a2 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar +#define PRODUCT Mechboards Micropad +#define DESCRIPTION Enjoy your freebie! + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6 } +#define MATRIX_COL_PINS { B2, B3, B1, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/mechboards_micropad/info.json b/keyboards/handwired/mechboards_micropad/info.json new file mode 100644 index 000000000000..f8908d9fcf05 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Mechboards Micropad", + "url": "", + "maintainer": "yiancar", + "width": 4, + "height": 1, + "layouts": { + "LAYOUT": { + "layout": [{"label":"1", "x":0, "y":0}, {"label":"2", "x":1, "y":0}, {"label":"3", "x":2, "y":0}, {"label":"4", "x":3, "y":0}] + } + } +} \ No newline at end of file diff --git a/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c b/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c new file mode 100644 index 000000000000..41784c5204c4 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/keymaps/default/keymap.c @@ -0,0 +1,84 @@ +/* Copyright 2019 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +uint8_t led_state = 1; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + MECHBOARDURL = SAFE_RANGE, + QMKURL, + MKUK, + LEDCHANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + MECHBOARDURL, QMKURL, MKUK, LEDCHANGE \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MECHBOARDURL: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("https://mechboards.co.uk/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + case MKUK: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("MKUK4 was amazing!"); + } else { + // when keycode QMKURL is released + } + break; + case LEDCHANGE: + if (record->event.pressed) { + // when keycode QMKURL is pressed + led_state = !led_state; + writePin(F6, led_state); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + setPinOutput(F6); + writePinLow(F6); +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/mechboards_micropad/keymaps/default/readme.md b/keyboards/handwired/mechboards_micropad/keymaps/default/readme.md new file mode 100644 index 000000000000..92d37ad8b921 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/keymaps/default/readme.md @@ -0,0 +1,4 @@ +# The default keymap for mechboards_micropad + +This is a 4 key micropad freebie from Mechboards and Yiancar-Designs. +Press the keys to find out the secrets:) \ No newline at end of file diff --git a/keyboards/handwired/mechboards_micropad/mechboards_micropad.c b/keyboards/handwired/mechboards_micropad/mechboards_micropad.c new file mode 100644 index 000000000000..d4c8fa9b9286 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/mechboards_micropad.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mechboards_micropad.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/handwired/mechboards_micropad/mechboards_micropad.h b/keyboards/handwired/mechboards_micropad/mechboards_micropad.h new file mode 100644 index 000000000000..983908486230 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/mechboards_micropad.h @@ -0,0 +1,33 @@ +/* Copyright 2019 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03 \ +) \ +{ \ + { k00, k01, k02, k03 } \ +} diff --git a/keyboards/handwired/mechboards_micropad/readme.md b/keyboards/handwired/mechboards_micropad/readme.md new file mode 100644 index 000000000000..36230b1281b2 --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/readme.md @@ -0,0 +1,14 @@ +Mechboards Micropad +=================== + +This was a freebie, use me and find out more about me :) + +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Hardware Supported: ATMega32u4 +Hardware Availability: Random mechboards.co.uk order and UK meetups! + +Make example for this keyboard (after setting up your build environment): + + make handwired/mechboards_micropad: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). diff --git a/keyboards/handwired/mechboards_micropad/rules.mk b/keyboards/handwired/mechboards_micropad/rules.mk new file mode 100644 index 000000000000..8ac2297e466a --- /dev/null +++ b/keyboards/handwired/mechboards_micropad/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/minorca/keymaps/default/config.h b/keyboards/handwired/minorca/keymaps/default/config.h index bf40376c19bf..c19ad7372418 100644 --- a/keyboards/handwired/minorca/keymaps/default/config.h +++ b/keyboards/handwired/minorca/keymaps/default/config.h @@ -1,12 +1,10 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once + +// place overrides here -#include "../../config.h" /* bootmagic salt key */ #define BOOTMAGIC_KEY_SALT KC_ESC /* skip bootmagic and eeconfig */ #define BOOTMAGIC_KEY_SKIP KC_SPACE - -#endif diff --git a/keyboards/handwired/not_so_minidox/info.json b/keyboards/handwired/not_so_minidox/info.json index 0222095024bb..9c286eb1f9ba 100644 --- a/keyboards/handwired/not_so_minidox/info.json +++ b/keyboards/handwired/not_so_minidox/info.json @@ -2,7 +2,7 @@ "keyboard_name": "Not So MiniDox", "url": "", "maintainer": "qmk", - "width": 12, + "width": 14, "height": 5.75, "layouts": { "LAYOUT": { diff --git a/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c b/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c index 8ea36198a1c6..9e89611631d4 100644 --- a/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c +++ b/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c @@ -18,10 +18,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define KC_LOWR LOWER #define KC_RASE RAISE #define KC_RST RESET diff --git a/keyboards/handwired/ortho5x13/info.json b/keyboards/handwired/ortho5x13/info.json index 15a65081a166..886bfe02893a 100644 --- a/keyboards/handwired/ortho5x13/info.json +++ b/keyboards/handwired/ortho5x13/info.json @@ -3,7 +3,7 @@ "url": "", "maintainer": "qmk", "width": 13, - "height": 6, + "height": 5, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/handwired/prime_exl/config.h b/keyboards/handwired/prime_exl/config.h index c5395dab4272..3201a8247ae2 100644 --- a/keyboards/handwired/prime_exl/config.h +++ b/keyboards/handwired/prime_exl/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x4024 +#define VENDOR_ID 0x5052 +#define PRODUCT_ID 0x6578 #define DEVICE_VER 0x0001 #define MANUFACTURER PrimeKB #define PRODUCT Prime_EXL @@ -36,7 +36,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D0, B3, B2, D1, D2, D3, F7, F6, F5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 @@ -49,3 +49,23 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*10*9*2)) = (35+720) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 755 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 269 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file diff --git a/keyboards/handwired/prime_exl/info.json b/keyboards/handwired/prime_exl/info.json index edab78860791..65b08d615179 100644 --- a/keyboards/handwired/prime_exl/info.json +++ b/keyboards/handwired/prime_exl/info.json @@ -2,8 +2,8 @@ "keyboard_name": "Prime_EXL", "url": "https://www.primekb.com", "maintainer": "holtenc", - "width": 18, - "height": 5, + "width": 20.75, + "height": 6, "layouts": { "LAYOUT": { "layout": [{"x":0,"y":0,"w":1,"h":1}, {"x":1,"y":0,"w":1,"h":1}, {"x":2,"y":0,"w":1,"h":1}, {"x":3,"y":0,"w":1,"h":1}, {"x":4,"y":0,"w":1,"h":1}, {"x":5,"y":0,"w":1,"h":1}, {"x":6.5,"y":0,"w":1,"h":1}, {"x":7.5,"y":0,"w":1,"h":1}, {"x":8.5,"y":0,"w":1,"h":1}, {"x":9.5,"y":0,"w":1,"h":1}, {"x":10.5,"y":0,"w":1,"h":1}, {"x":11.5,"y":0,"w":1,"h":1}, {"x":13.75,"y":0,"w":1,"h":1}, {"x":14.75,"y":0,"w":1,"h":1}, {"x":15.75,"y":0,"w":1,"h":1}, {"x":16.75,"y":0,"w":1,"h":1}, {"x":17.75,"y":0,"w":1,"h":1}, {"x":18.75,"y":0,"w":2,"h":1}, {"x":0,"y":1,"w":1,"h":1}, {"x":1,"y":1,"w":1,"h":1}, {"x":2,"y":1,"w":1,"h":1}, {"x":3,"y":1,"w":1,"h":1}, {"x":4,"y":1,"w":1,"h":1}, {"x":5,"y":1,"w":1,"h":1}, {"x":6.5,"y":1,"w":1.26,"h":1}, {"x":7.75,"y":1,"w":1,"h":1}, {"x":8.75,"y":1,"w":1,"h":1}, {"x":9.75,"y":1,"w":1,"h":1}, {"x":10.75,"y":1,"w":1,"h":1}, {"x":11.75,"y":1,"w":1,"h":1}, {"x":14,"y":1,"w":1,"h":1}, {"x":15,"y":1,"w":1,"h":1}, {"x":16,"y":1,"w":1,"h":1}, {"x":17,"y":1,"w":1,"h":1}, {"x":18,"y":1,"w":1,"h":1}, {"x":19,"y":1,"w":1.75,"h":1}, {"x":0,"y":2,"w":1,"h":1}, {"x":1,"y":2,"w":1,"h":1}, {"x":2,"y":2,"w":1,"h":1}, {"x":3,"y":2,"w":1,"h":1}, {"x":4,"y":2,"w":1,"h":1}, {"x":5,"y":2,"w":1,"h":1}, {"x":6.5,"y":2,"w":1.75,"h":1}, {"x":8.25,"y":2,"w":1,"h":1}, {"x":9.25,"y":2,"w":1,"h":1}, {"x":10.25,"y":2,"w":1,"h":1}, {"x":11.25,"y":2,"w":1,"h":1}, {"x":12.25,"y":2,"w":1,"h":1}, {"x":13.5,"y":2,"w":1,"h":1}, {"x":14.5,"y":2,"w":1,"h":1}, {"x":15.5,"y":2,"w":1,"h":1}, {"x":16.5,"y":2,"w":1,"h":1}, {"x":17.5,"y":2,"w":1,"h":1}, {"x":18.5,"y":2,"w":1,"h":1}, {"x":19.5,"y":2,"w":1.25,"h":1}, {"x":0,"y":3,"w":1,"h":1}, {"x":1,"y":3,"w":1,"h":1}, {"x":2,"y":3,"w":1,"h":1}, {"x":3,"y":3,"w":1,"h":1}, {"x":4,"y":3,"w":1,"h":1}, {"x":5,"y":3,"w":1,"h":1}, {"x":6.5,"y":3,"w":1.25,"h":1}, {"x":7.75,"y":3,"w":1.25,"h":1}, {"x":9,"y":3,"w":1,"h":1}, {"x":10,"y":3,"w":1,"h":1}, {"x":11,"y":3,"w":2,"h":1}, {"x":13.5,"y":3,"w":2,"h":1}, {"x":15.5,"y":3,"w":1,"h":1}, {"x":16.5,"y":3,"w":1,"h":1}, {"x":17.5,"y":3,"w":1.5,"h":1}, {"x":19,"y":3,"w":1.5,"h":1}, {"x":0,"y":4,"w":1,"h":1}, {"x":1,"y":4,"w":1,"h":1}, {"x":2,"y":4,"w":1,"h":1}, {"x":3,"y":4,"w":1,"h":1}, {"x":4,"y":4,"w":1,"h":1}, {"x":5,"y":4,"w":1,"h":1}] diff --git a/keyboards/handwired/prime_exl/keymaps/default/keymap.c b/keyboards/handwired/prime_exl/keymaps/default/keymap.c index 0e1c60d4aafb..1dac7825e4be 100644 --- a/keyboards/handwired/prime_exl/keymaps/default/keymap.c +++ b/keyboards/handwired/prime_exl/keymaps/default/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - + [2] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_F9, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_LALT, KC_LBRC, KC_RBRC, MO(5), KC_SPC, KC_MINS, KC_EQL, KC_LGUI, MO(4), KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC ), - + [3] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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, @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 ), - + [4] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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, @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 ), - + [5] = LAYOUT( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_SCLN, KC_BSLS, @@ -96,14 +96,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_init_user(void) { // set CapsLock LED to output and low - DDRC |= (1 << 6); - PORTC &= ~(1 << 6); + setPinOutput(C6); + writePinHigh(C6); // set NumLock LED to output and low - DDRB |= (1 << 6); - PORTB &= ~(1 << 6); + setPinOutput(B6); + writePinHigh(B6); // set ScrollLock LED to output and low - DDRB |= (1 << 5); - PORTB &= ~(1 << 5); + setPinOutput(B5); + writePinHigh(B5); } void matrix_scan_user(void) { @@ -112,21 +112,21 @@ void matrix_scan_user(void) { void led_set_user(uint8_t usb_led) { - if (usb_led & (1<. + */ +#include QMK_KEYBOARD_H + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( + KC_NLCK, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_BSPC, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_F1, KC_F2, KC_P7, KC_P8, KC_P9, KC_DEL, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_F3, KC_F4, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(3), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, + KC_F5, KC_F6, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_LCTL, KC_LALT, KC_LBRC, KC_RBRC, MO(2), KC_SPC, KC_MINS, KC_EQL, KC_LGUI, MO(3), + KC_F7, KC_F8, MO(1), KC_PDOT, KC_P0, KC_PENT + ), + + LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_F9, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(3), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCTL, KC_LALT, KC_LBRC, KC_RBRC, MO(2), KC_SPC, KC_MINS, KC_EQL, KC_LGUI, MO(3), + KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC + ), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_DEL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_SCLN, KC_BSLS, + 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_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, + BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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 + ) +}; + + +void matrix_init_user(void) { + // set CapsLock LED to output and low + setPinOutput(C6); + writePinHigh(C6); + // set NumLock LED to output and low + setPinOutput(B6); + writePinHigh(B6); + // set ScrollLock LED to output and low + setPinOutput(B5); + writePinHigh(B5); +} + +void matrix_scan_user(void) { + +} + + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(B6); + } else { + writePinLow(B6); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(B5); + } else { + writePinLow(B5); + } + /* + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(C6); + } else { + writePinLow(C6); + } + */ +} + +//function for layer indicator LED +uint32_t layer_state_set_user(uint32_t state) +{ + if (biton32(state) == 2) { + writePinHigh(C6); + } else { + writePinLow(C6); + } + return state; +} diff --git a/keyboards/handwired/prime_exl/keymaps/via/readme.md b/keyboards/handwired/prime_exl/keymaps/via/readme.md new file mode 100644 index 000000000000..c2278bd4600f --- /dev/null +++ b/keyboards/handwired/prime_exl/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default keymap for prime_exl \ No newline at end of file diff --git a/keyboards/handwired/prime_exl/keymaps/via/rules.mk b/keyboards/handwired/prime_exl/keymaps/via/rules.mk new file mode 100644 index 000000000000..e726a8a0e075 --- /dev/null +++ b/keyboards/handwired/prime_exl/keymaps/via/rules.mk @@ -0,0 +1,86 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +# This is the VIA magic +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +SRC += keyboards/wilba_tech/wt_main.c + diff --git a/keyboards/handwired/prime_exl/prime_exl.c b/keyboards/handwired/prime_exl/prime_exl.c index d088f6ad11ea..bae606ffbf5e 100644 --- a/keyboards/handwired/prime_exl/prime_exl.c +++ b/keyboards/handwired/prime_exl/prime_exl.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ #include "prime_exl.h" - +/* void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up @@ -41,3 +41,4 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } +*/ \ No newline at end of file diff --git a/keyboards/handwired/prime_exl/prime_exl.h b/keyboards/handwired/prime_exl/prime_exl.h index 727db5db8da7..03524da3c2a6 100644 --- a/keyboards/handwired/prime_exl/prime_exl.h +++ b/keyboards/handwired/prime_exl/prime_exl.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef PRIME_EXL_H -#define PRIME_EXL_H +//#ifndef PRIME_EXL_H +//#define PRIME_EXL_H #include "quantum.h" @@ -37,4 +37,4 @@ { K090, K091, K092, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ } -#endif \ No newline at end of file +//#endif \ No newline at end of file diff --git a/keyboards/handwired/promethium/info.json b/keyboards/handwired/promethium/info.json index 2742ffa641b6..7b2d43d6142f 100644 --- a/keyboards/handwired/promethium/info.json +++ b/keyboards/handwired/promethium/info.json @@ -3,7 +3,7 @@ "url": "", "maintainer": "qmk", "width": 16, - "height": 5, + "height": 4.5, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c index faae89f935d7..b09e30457cce 100644 --- a/keyboards/handwired/promethium/keymaps/default/keymap.c +++ b/keyboards/handwired/promethium/keymaps/default/keymap.c @@ -57,9 +57,6 @@ along with this program. If not, see . #include "led.h" #define COUNT(x) (sizeof (x) / sizeof (*(x))) -// Fillers to make layering clearer -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_WWWB KC_WWW_BACK #define KC_WWWF KC_WWW_FORWARD @@ -1280,7 +1277,7 @@ void set_output_user(uint8_t output) { } void matrix_init_user() { - _delay_ms(500); // give time for usb to initialize + wait_ms(500); // give time for usb to initialize set_unicode_input_mode(UC_LNX); diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index faae89f935d7..fbb1ae1d69f8 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -53,13 +53,12 @@ along with this program. If not, see . } while (0) #endif #endif +#ifdef __AVR__ #include "outputselect.h" +#endif #include "led.h" #define COUNT(x) (sizeof (x) / sizeof (*(x))) -// Fillers to make layering clearer -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_WWWB KC_WWW_BACK #define KC_WWWF KC_WWW_FORWARD @@ -1280,7 +1279,7 @@ void set_output_user(uint8_t output) { } void matrix_init_user() { - _delay_ms(500); // give time for usb to initialize + wait_ms(500); // give time for usb to initialize set_unicode_input_mode(UC_LNX); diff --git a/keyboards/handwired/space_oddity/keymaps/default/keymap.c b/keyboards/handwired/space_oddity/keymaps/default/keymap.c index 6e42a2815154..e7836353ecb6 100644 --- a/keyboards/handwired/space_oddity/keymaps/default/keymap.c +++ b/keyboards/handwired/space_oddity/keymaps/default/keymap.c @@ -38,8 +38,6 @@ enum { #include "dynamic_macro.h" -#define MOUSE_LAYER 2 - // Tap dance actions - double tap for Caps Lock. qk_tap_dance_action_t tap_dance_actions[] = { diff --git a/keyboards/handwired/splittest/config.h b/keyboards/handwired/splittest/config.h new file mode 100644 index 000000000000..9e4fb38ca0af --- /dev/null +++ b/keyboards/handwired/splittest/config.h @@ -0,0 +1,75 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1111 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT Split Tester +#define DESCRIPTION Split keyboard testing unit + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 2 +#define MATRIX_COLS 1 + +// wiring of each half +#define MATRIX_ROW_PINS { B3 } +#define MATRIX_COL_PINS { B6 } +#define SPLIT_HAND_PIN F6 +#define SOFT_SERIAL_PIN D1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLED_SPLIT { 6, 6 } + +/* + * 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 diff --git a/keyboards/handwired/splittest/keymaps/default/config.h b/keyboards/handwired/splittest/keymaps/default/config.h new file mode 100644 index 000000000000..ecebd3658916 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/default/config.h @@ -0,0 +1,23 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +#define USE_I2C diff --git a/keyboards/handwired/splittest/keymaps/default/keymap.c b/keyboards/handwired/splittest/keymaps/default/keymap.c new file mode 100644 index 000000000000..1c15f6f1dfa0 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/default/keymap.c @@ -0,0 +1,5 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(RGB_MOD, RESET) +}; diff --git a/keyboards/handwired/splittest/readme.md b/keyboards/handwired/splittest/readme.md new file mode 100644 index 000000000000..3dbff32ed405 --- /dev/null +++ b/keyboards/handwired/splittest/readme.md @@ -0,0 +1,26 @@ +Split Tester +============ + +A two-switch tester built using two Pro Micros, mainly intended to test RGB on split keyboards. Seen here: https://www.instagram.com/p/BvCPNzynwrV/ + +Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +Hardware Supported: Pro Micro + +Make example for this keyboard (after setting up your build environment): + + make handwired/splittest:default + +Example of flashing this keyboard: + + make handwired/splittest:default:avrdude + +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). + +Wiring +------ +- Add switches to both Pro Micros across B3 and B6 pins +- Add pull-up resistor to left side between VCC and F6 +- Add pull-down resistors to right side between GND and F6 +- Connect the following pins on both sides together: D0, D1, GND, VCC +- Add I2C 4.7kOhm resistors between D0 and VCC, and D1 and VCC +- Wire Di of RGB strip for each half to D2 diff --git a/keyboards/fourier/rules.mk b/keyboards/handwired/splittest/rules.mk similarity index 98% rename from keyboards/fourier/rules.mk rename to keyboards/handwired/splittest/rules.mk index 93935e02eb41..9512c0f64827 100644 --- a/keyboards/fourier/rules.mk +++ b/keyboards/handwired/splittest/rules.mk @@ -58,11 +58,8 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes - -DEFAULT_FOLDER = fourier/rev1 diff --git a/keyboards/handwired/splittest/splittest.c b/keyboards/handwired/splittest/splittest.c new file mode 100644 index 000000000000..3c919a565dbf --- /dev/null +++ b/keyboards/handwired/splittest/splittest.c @@ -0,0 +1 @@ +#include "splittest.h" diff --git a/keyboards/handwired/splittest/splittest.h b/keyboards/handwired/splittest/splittest.h new file mode 100644 index 000000000000..17b7081a0275 --- /dev/null +++ b/keyboards/handwired/splittest/splittest.h @@ -0,0 +1,5 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT(L1, R1) {{L1}, {R1}} diff --git a/keyboards/handwired/tennie/config.h b/keyboards/handwired/tennie/config.h new file mode 100644 index 000000000000..b50886cdc807 --- /dev/null +++ b/keyboards/handwired/tennie/config.h @@ -0,0 +1,240 @@ +/* +Copyright 2018 Jack Hildebrandt + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1EEE +#define PRODUCT_ID 0x1313 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jsck +#define PRODUCT Tennie +#define DESCRIPTION Ten key macropad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C6, D4, D0} +#define MATRIX_COL_PINS { D7, E6, B4, B5 } +#define UNUSED_PINS { B1, B2, B3, B6, F4, F5, F6, F7 D1} + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 +#define RGBW +#define RGB_DI_PIN D1 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 1 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* 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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/tennie/info.json b/keyboards/handwired/tennie/info.json new file mode 100644 index 000000000000..c0369979291f --- /dev/null +++ b/keyboards/handwired/tennie/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Tennie", + "url": "https://github.com/StoutIEEE/macropad-workshop", + "maintainer": "UW Stout IEEE, Jack Hildebrandt (onemorebyte)", + "width": 4, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [{"x":0.5, "y":0}, {"x":1.5, "y":0}, {"x":2.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0.5, "y":2}, {"x":1.5, "y":2}, {"x":2.5, "y":2}] + } + } +} diff --git a/keyboards/handwired/tennie/keymaps/default/config.h b/keyboards/handwired/tennie/keymaps/default/config.h new file mode 100644 index 000000000000..4496c5910061 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 REPLACE_WITH_YOUR_NAME + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/tennie/keymaps/default/keymap.c b/keyboards/handwired/tennie/keymaps/default/keymap.c new file mode 100644 index 000000000000..3736841cbb9a --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/default/keymap.c @@ -0,0 +1,95 @@ +/* Copyright 2018 Jack H. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define TAPPING_TOGGLE 2 + + +// Layer names +#define base 0 +#define shrek 1 +#define ogre 2 +#define tcp 3 + +// Layer Switches +#define KC_SHRK TT(shrek) +#define KC_OGRE TT(ogre) +#define KC_TCP TT(tcp) + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [base] = LAYOUT( + // ┌────────┬────────┬────────┐ + + KC_DEL, KC_SPC, KC_ENT, + + // ├────────┼────────┼────────┼────────┼ + + KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, + + // ├────────┼────────┼────────┼────────┼ + + KC_SHRK, KC_OGRE, KC_TCP + + // └────────┴────────┴────────┘ + ), + [shrek] = LAYOUT( + // ┌────────┬────────┬────────┐ + + KC_MPRV, KC_MPLY, KC_MNXT, + + // ├────────┼────────┼────────┼────────┼ + + KC_BRID, KC_VOLD, KC_VOLU, KC_BRIU, + + // ├────────┼────────┼────────┼────────┼ + + _______, _______, _______ + + // └────────┴────────┴────────┘ + ), + [ogre] = LAYOUT( + // ┌────────┬────────┬────────┐ + + RGB_MOD, RGB_TOG, RGB_RMOD, + + // ├────────┼────────┼────────┼────────┼ + + KC_F13, KC_F14, KC_F15, KC_F16, + + // ├────────┼────────┼────────┼────────┼ + + _______, _______, _______ + + // └────────┴────────┴────────┘ + ), + [tcp] = LAYOUT( + // ┌────────┬────────┬────────┐ + + KC_WBAK, KC_WREF, KC_WFWD, + + // ├────────┼────────┼────────┼────────┼ + + XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, + + // ├────────┼────────┼────────┼────────┼ + + _______, _______, _______ + + // └────────┴────────┴────────┘ + ), +}; diff --git a/keyboards/handwired/tennie/keymaps/default/readme.md b/keyboards/handwired/tennie/keymaps/default/readme.md new file mode 100644 index 000000000000..1fbaa7f46354 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/default/readme.md @@ -0,0 +1,68 @@ +# Default keymap + +This keymap is to serve as an example of how you could make a multi-layer keymap. + +#### keymap + +``` +[base] = LAYOUT_kc( +// ┌────────┬────────┬────────┐ + + DEL , SPC , ENT , + +// ├────────┼────────┼────────┼────────┼ + + LEFT , DOWN , UP , RGHT , + +// ├────────┼────────┼────────┼────────┼ + + SHRK , OGRE , TCP + +// └────────┴────────┴────────┘ +), +[shrek] = LAYOUT_kc( +// ┌────────┬────────┬────────┐ + + MPRV , MPLY , MNXT , + +// ├────────┼────────┼────────┼────────┼ + + BRID , VOLD , VOLU , BRIU , + +// ├────────┼────────┼────────┼────────┼ + + _______, _______, _______ + +// └────────┴────────┴────────┘ +), +[ogre] = LAYOUT_kc( +// ┌────────┬────────┬────────┐ + + RGB_MOD, RGB_TOG, RGB_RMOD + +// ├────────┼────────┼────────┼────────┼ + + F13 , F14 , F15 , F16 , + +// ├────────┼────────┼────────┼────────┼ + + _______, _______, _______ + +// └────────┴────────┴────────┘ +), +[tcp] = LAYOUT_kc( +// ┌────────┬────────┬────────┐ + + WBAK , WREF , WFWD , + +// ├────────┼────────┼────────┼────────┼ + + XXXXXXX , PGDN , PGUP , XXXXXXX , + +// ├────────┼────────┼────────┼────────┼ + + _______, _______, _______ + +// └────────┴────────┴────────┘ +), +``` diff --git a/keyboards/handwired/tennie/keymaps/simple-numbpad/config.h b/keyboards/handwired/tennie/keymaps/simple-numbpad/config.h new file mode 100644 index 000000000000..a3c309bb290e --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/simple-numbpad/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 Jack Hildebrandt + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c b/keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c new file mode 100644 index 000000000000..7cf29b118894 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/simple-numbpad/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2018 Jack Hildebrandt + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Layer names +#define base 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [base] = LAYOUT( + // ┌────────┬────────┬────────┐ + + KC_1 , KC_2 , KC_3 , + + // ├────────┼────────┼────────┼────────┼ + + KC_4 , KC_5 , KC_6 , KC_7 , + + // ├────────┼────────┼────────┼────────┼ + + KC_8 , KC_9 , KC_0 + + // └────────┴────────┴────────┘ + ), +}; diff --git a/keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md b/keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md new file mode 100644 index 000000000000..0b3f30750164 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/simple-numbpad/readme.md @@ -0,0 +1,18 @@ +# Simple numberpad keymap + +This keymap is to test the soldering work of workshop participants. It can also be used as a simple base for a macropad keymap. +``` +// ┌────────┬────────┬────────┐ + + 1 , 2 , 3 , + +// ├────────┼────────┼────────┼────────┼ + + 4 , 5 , 6 , 7 , + +// ├────────┼────────┼────────┼────────┼ + + 8 , 9 , 0 + +// └────────┴────────┴────────┘ +``` diff --git a/keyboards/handwired/tennie/keymaps/soundboard/config.h b/keyboards/handwired/tennie/keymaps/soundboard/config.h new file mode 100644 index 000000000000..5a1cba7b4044 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/soundboard/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 Jacob Hillebrand + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/tennie/keymaps/soundboard/keymap.c b/keyboards/handwired/tennie/keymaps/soundboard/keymap.c new file mode 100644 index 000000000000..3bceb1feac98 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/soundboard/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2018 Jacob Hillebrand + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Layer names +#define base 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [base] = LAYOUT( + // ┌────────┬────────┬────────┐ + + KC_F13 , KC_F14 , KC_F15 , + + // ├────────┼────────┼────────┼────────┼ + + KC_F16 , KC_F17 , KC_F18 , KC_F19 , + + // ├────────┼────────┼────────┼────────┼ + + KC_F20, KC_F21 , KC_F22 + + // └────────┴────────┴────────┘ + ), +}; diff --git a/keyboards/handwired/tennie/keymaps/soundboard/readme.md b/keyboards/handwired/tennie/keymaps/soundboard/readme.md new file mode 100644 index 000000000000..d05b7117c161 --- /dev/null +++ b/keyboards/handwired/tennie/keymaps/soundboard/readme.md @@ -0,0 +1,19 @@ +# Soundboard keymap + +This keymap binds all keys to function keys 13-22 for something like a +soundboard (ie:[Resanance](https://www.reddit.com/r/discordapp/comments/44ldc1/soundboard_for_discord/)) +``` +// ┌────────┬────────┬────────┐ + + F13 , F14 , F15 , + +// ├────────┼────────┼────────┼────────┼ + + F16 , F17 , F18 , F19 , + +// ├────────┼────────┼────────┼────────┼ + + F20 , F21 , F22 + +// └────────┴────────┴────────┘ +``` diff --git a/keyboards/handwired/tennie/readme.md b/keyboards/handwired/tennie/readme.md new file mode 100644 index 000000000000..bbdbc2b6011e --- /dev/null +++ b/keyboards/handwired/tennie/readme.md @@ -0,0 +1,15 @@ +# Tennie + +![tennie](https://raw.githubusercontent.com/StoutIEEE/macropad-workshop/master/images/macropad.jpg) + +A ten key macropad for a club workshop! More information, and build instructions can be found [here](https://github.com/StoutIEEE/macropad-workshop) + +Keyboard Maintainer: [Jack Hildebrandt](https://github.com/onemorebyte), [UW Stout IEEE](https://github.com/StoutIEEE) + +Hardware Supported: ProMicro + +Make example for this keyboard (after setting up your build environment): + + make handwired/tennie: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). diff --git a/keyboards/handwired/tennie/rules.mk b/keyboards/handwired/tennie/rules.mk new file mode 100644 index 000000000000..0119dc6fb2fd --- /dev/null +++ b/keyboards/handwired/tennie/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/handwired/tennie/tennie.c b/keyboards/handwired/tennie/tennie.c new file mode 100644 index 000000000000..e1ceaf153d77 --- /dev/null +++ b/keyboards/handwired/tennie/tennie.c @@ -0,0 +1,45 @@ +/* Copyright 2018 Jack Hildebrandt + * + * 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 . + */ +#include "tennie.h" + +void matrix_init_kb(void) { + matrix_init_user(); +} + +void matrix_post_init(void) { + rgblight_enable_noeeprom(); + keyboard_post_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +//void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + +// led_set_user(usb_led); +//} diff --git a/keyboards/handwired/tennie/tennie.h b/keyboards/handwired/tennie/tennie.h new file mode 100644 index 000000000000..8ab0d04c5287 --- /dev/null +++ b/keyboards/handwired/tennie/tennie.h @@ -0,0 +1,37 @@ +/* Copyright 2018 Jack Hildebrandt + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, \ + K10, K11, K12, K13, \ + K20, K21, K22 \ +) \ +{ \ + { K00, K01, K02, KC_NO }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, KC_NO }, \ +} diff --git a/keyboards/handwired/terminus_mini/config.h b/keyboards/handwired/terminus_mini/config.h index de146b225b87..e1b5daccd725 100644 --- a/keyboards/handwired/terminus_mini/config.h +++ b/keyboards/handwired/terminus_mini/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B0, D0, D5, B6, D4, C7, F7, F6, F5, F4, F1, F0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/handwired/terminus_mini/info.json b/keyboards/handwired/terminus_mini/info.json new file mode 100644 index 000000000000..9271b413eb79 --- /dev/null +++ b/keyboards/handwired/terminus_mini/info.json @@ -0,0 +1,59 @@ +{ + "keyboard_name": "handwired/terminus_mini", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Tab", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"Del", "x":11, "y":0}, + {"label":"Backspace", "x":0, "y":1}, + {"label":"A", "x":1, "y":1}, + {"label":"S", "x":2, "y":1}, + {"label":"D", "x":3, "y":1}, + {"label":"F", "x":4, "y":1}, + {"label":"G", "x":5, "y":1}, + {"label":"H", "x":6, "y":1}, + {"label":"J", "x":7, "y":1}, + {"label":"K", "x":8, "y":1}, + {"label":"L", "x":9, "y":1}, + {"label":";", "x":10, "y":1}, + {"label":"'", "x":11, "y":1}, + {"label":"Left Shift / (", "x":0, "y":2}, + {"label":"Z", "x":1, "y":2}, + {"label":"X", "x":2, "y":2}, + {"label":"C", "x":3, "y":2}, + {"label":"V", "x":4, "y":2}, + {"label":"B", "x":5, "y":2}, + {"label":"N", "x":6, "y":2}, + {"label":"M", "x":7, "y":2}, + {"label":",", "x":8, "y":2}, + {"label":".", "x":9, "y":2}, + {"label":"/", "x":10, "y":2}, + {"label":"Right Shift / )", "x":11, "y":2}, + {"label":"LCtrl", "x":0, "y":3}, + {"label":"GUI", "x":1, "y":3}, + {"label":"Lower", "x":2, "y":3}, + {"label":"LAlt", "x":3, "y":3}, + {"label":"Space / Lower", "x":4, "y":3, "w":2}, + {"label":"Enter / Raise", "x":6, "y":3, "w":2}, + {"label":"MO(_FUNCTION)", "x":8, "y":3}, + {"label":"MO(_MOUSE)", "x":9, "y":3}, + {"label":"App", "x":10, "y":3}, + {"label":"RCtrl", "x":11, "y":3} + ] + } + } +} diff --git a/keyboards/handwired/terminus_mini/keymaps/default/config.h b/keyboards/handwired/terminus_mini/keymaps/default/config.h index 34ef6720746d..4817be252756 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/config.h +++ b/keyboards/handwired/terminus_mini/keymaps/default/config.h @@ -14,13 +14,8 @@ * along with this program. If not, see . */ -#define TAPPING_TERM 150 //reduce time required to register a held key - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here -#endif +#define TAPPING_TERM 150 //reduce time required to register a held key diff --git a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c index 1c4af5f46a52..276475873ae8 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c +++ b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c @@ -13,12 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "terminus_mini.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -45,32 +40,14 @@ enum terminus_mini_keycodes { LOWER, RAISE, FUNCTION, - MOUSE -}; - -enum custom_macros { + MOUSE, + // Custom Macros R_PIPE, R_POINT }; - // Enable these functions using FUNC(n) macro. - const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, - [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_ENT), //Hold for momentary Mouse layer, Tap for Enter, - [2] = ACTION_LAYER_MOMENTARY(_FUNCTION), //Hold for momentary Function - [3] = ACTION_LAYER_MOMENTARY(_MOUSE) //Hold for momentary MOUSE - }; -#define SPC_LW FUNC(0) -#define ENT_RS FUNC(1) -#define FNC FUNC(2) -#define MSE FUNC(3) -#define PIPE M(R_PIPE) -#define POINT M(R_POINT) - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - +#define SPC_LW LT(_LOWER, KC_SPC) +#define ENT_RS LT(_RAISE, KC_ENT) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak - @@ -85,10 +62,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `----------------------------------------------------------------------------------' */ [_COLEMAK] = LAYOUT( - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL , \ - KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ - KC_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ + KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ + KC_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, MO(5), MO(6), KC_APP, KC_RCTL \ ), /* QWERTY - @@ -103,10 +80,10 @@ 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_DEL , \ - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ - KC_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ + KC_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, MO(5), MO(6), KC_APP, KC_RCTL \ ), /* Dvorak @@ -121,10 +98,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_DVORAK] = LAYOUT( - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, \ - KC_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \ + KC_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, MO(5), MO(6), KC_APP, KC_RCTL \ ), /* Lower @@ -141,10 +118,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = LAYOUT( - KC_TAB, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_PSLS, KC_7, KC_8, KC_9, KC_PAST, XXXXXXX, _______, \ - _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_MINS, KC_4, KC_5, KC_6, KC_PPLS, XXXXXXX, _______, \ - _______, _______, _______, _______, _______, KC_EQL, KC_1, KC_2, KC_3, KC_PENT, XXXXXXX, _______, \ - _______, _______, _______, _______, _______, KC_0, KC_DOT, FNC, RAISE, _______ \ + KC_TAB, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_PSLS, KC_7, KC_8, KC_9, KC_PAST, XXXXXXX, _______, \ + _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_MINS, KC_4, KC_5, KC_6, KC_PPLS, XXXXXXX, _______, \ + _______, _______, _______, _______, _______, KC_EQL, KC_1, KC_2, KC_3, KC_PENT, XXXXXXX, _______, \ + _______, _______, _______, _______, _______, KC_0, KC_DOT, MO(5), RAISE, _______ \ ), /* Raise @@ -160,10 +137,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = LAYOUT( - KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, _______, \ - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - _______, POINT, PIPE, KC_LCBR, KC_LBRC, KC_GRV, KC_BSLS, KC_RBRC, KC_RCBR, KC_DOT, KC_SLSH, _______, \ - _______, _______, XXXXXXX, _______, SPC_LW, ENT_RS, FNC, MSE, _______, _______ \ + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, _______, \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, R_POINT, R_PIPE, KC_LCBR, KC_LBRC, KC_GRV, KC_BSLS, KC_RBRC, KC_RCBR, KC_DOT, KC_SLSH, _______, \ + _______, _______, XXXXXXX, _______, SPC_LW, ENT_RS, MO(5), MO(6), _______, _______ \ ), /*Function @@ -178,11 +155,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_FUNCTION] = LAYOUT( - _______, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS , \ - KC_CAPS, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_SLCK, \ - _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_PAUS \ +[_FUNCTION] = LAYOUT( + _______, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, \ + KC_CAPS, KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_PSCR, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_SLCK, \ + _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, KC_PAUS \ ), /* MOUSE @@ -198,10 +175,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_MOUSE] = LAYOUT( - KC_ESC, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN4, KC_BTN5, XXXXXXX, XXXXXXX, \ - KC_BSPC, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSPC, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL2, KC_ACL0, XXXXXXX, MSE, XXXXXXX, KC_RCTL \ + KC_ESC, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN4, KC_BTN5, XXXXXXX, XXXXXXX, \ + KC_BSPC, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSPC, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL2, KC_ACL0, XXXXXXX, MO(6), XXXXXXX, KC_RCTL \ ), /* Adjust (Lower + Raise) @@ -217,10 +194,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT( - _______, _______, _______, _______, _______, RESET, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ - _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, _______, _______, _______, _______, RESET, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; @@ -230,27 +207,6 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } -// Macros to send R pointer & dplyr pipe -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - //R Pointer: <- - case R_POINT: - if (record->event.pressed) { // pointer - SEND_STRING("<- "); -// return MACRO(D(LSFT), T(COMM), U(LSFT), T(MINS), END); - } - break; - //dplyr pipe: %>% - case R_PIPE: - if (record->event.pressed) { // dplyr pipe - SEND_STRING("%>% "); -// return MACRO(D(LSFT), T(5), T(DOT), T(5), U(LSFT), END); - } - break; - } - return MACRO_NONE; -} - // Cases to switch default layer to QWERTY, COLEMAK or DVORAK and to access ADJUST layer bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { @@ -265,13 +221,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { set_single_persistent_default_layer(_COLEMAK); } return false; - break; + break; case DVORAK: if (record->event.pressed) { set_single_persistent_default_layer(_DVORAK); } return false; - break; + break; case LOWER: if (record->event.pressed) { layer_on(_LOWER); @@ -292,6 +248,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + // Macros to send R pointer & dplyr pipe + //R Pointer: <- + case R_POINT: + if (record->event.pressed) { // pointer + SEND_STRING("<- "); + //return MACRO(D(LSFT), T(COMM), U(LSFT), T(MINS), END); + } + break; + //dplyr pipe: %>% + case R_PIPE: + if (record->event.pressed) { // dplyr pipe + SEND_STRING("%>% "); + //return MACRO(D(LSFT), T(5), T(DOT), T(5), U(LSFT), END); + } + break; } return true; } diff --git a/keyboards/handwired/terminus_mini/readme.md b/keyboards/handwired/terminus_mini/readme.md index 5f0271bb40b1..a5fc8eee61f0 100644 --- a/keyboards/handwired/terminus_mini/readme.md +++ b/keyboards/handwired/terminus_mini/readme.md @@ -1,13 +1,12 @@ # terminus_mini handwired -Custom handwired keyboard. +Custom handwired keyboard inspired by the UniKeyboard Terminus Mini 2. Keyboard Maintainer: [James Morgan](https://github.com/mogranjm) -Hardware Supported: Custom handwired keyboard -Hardware Availability: +Hardware Supported: Custom handwired keyboard Make example for this keyboard (after setting up your build environment): make handwired/terminus_mini: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. \ No newline at end of file +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). diff --git a/keyboards/handwired/terminus_mini/terminus_mini.h b/keyboards/handwired/terminus_mini/terminus_mini.h index 846c98e2c087..27fb45098150 100644 --- a/keyboards/handwired/terminus_mini/terminus_mini.h +++ b/keyboards/handwired/terminus_mini/terminus_mini.h @@ -23,16 +23,16 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k35, k37, k38, k39, k3a, k3b \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k35, k37, k38, k39, k3a, k3b \ ) \ { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b } \ } #define KC_ KC_TRNS diff --git a/keyboards/handwired/trackpoint/README.md b/keyboards/handwired/trackpoint/README.md deleted file mode 100644 index bbfcaab0c3c4..000000000000 --- a/keyboards/handwired/trackpoint/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# IBM Trackpoint demonstration - -This is just a simple demo to show how to integrate IBM Trackpoint in QMK. - -Wiring used in the demonstration: -![Wiring example](http://imgur.com/8ghG2U8) - -Some documentation: -* [How to wire IBM Trackpoint](https://github.com/alonswartz/trackpoint) -* [QMK documentation](https://docs.qmk.fm/) diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h index 22ec75f761d4..cecb6a509459 100644 --- a/keyboards/handwired/trackpoint/config.h +++ b/keyboards/handwired/trackpoint/config.h @@ -1,70 +1,67 @@ -#ifndef CONFIG_H - #define CONFIG_H +#pragma once - #include "config_common.h" +#include "config_common.h" - #define VENDOR_ID 0x1234 - #define PRODUCT_ID 0x5678 - #define DEVICE_VER 0x0001 - #define MANUFACTURER QMK - #define PRODUCT TRACKPOINT-DEMO - #define DESCRIPTION Simple demonstration for IBM Trackpoint integration +#define VENDOR_ID 0x1234 +#define PRODUCT_ID 0x5678 +#define DEVICE_VER 0x0001 +#define MANUFACTURER QMK +#define PRODUCT TRACKPOINT-DEMO +#define DESCRIPTION Simple demonstration for IBM Trackpoint integration - #define MATRIX_ROWS 1 - #define MATRIX_COLS 3 +#define MATRIX_ROWS 1 +#define MATRIX_COLS 3 - #ifdef PS2_USE_USART - #define PS2_CLOCK_PORT PORTD - #define PS2_CLOCK_PIN PIND - #define PS2_CLOCK_DDR DDRD - #define PS2_CLOCK_BIT 5 - #define PS2_DATA_PORT PORTD - #define PS2_DATA_PIN PIND - #define PS2_DATA_DDR DDRD - #define PS2_DATA_BIT 2 +#ifdef PS2_USE_USART + #define PS2_CLOCK_PORT PORTD + #define PS2_CLOCK_PIN PIND + #define PS2_CLOCK_DDR DDRD + #define PS2_CLOCK_BIT 5 + #define PS2_DATA_PORT PORTD + #define PS2_DATA_PIN PIND + #define PS2_DATA_DDR DDRD + #define PS2_DATA_BIT 2 - /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ - /* set DDR of CLOCK as input to be slave */ - #define PS2_USART_INIT() do { \ - PS2_CLOCK_DDR &= ~(1< | | MwU | MS_UL| MS_U |MS_UR | |Ms Norm| @@ -102,8 +101,8 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key * `------------------------------------------------------------------------------------------' */ -[_NAV] = KEYMAP( - F(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2, +[_NAV] = KEYMAP( + TG(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2, KC_TRNS, RGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_BTN3, KC_MS_L, KC_MS_U, KC_MS_R, KC_NO, KC_ACL1, KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M(MDL), KC_MS_D, M(MDR), KC_UP, KC_ACL0, KC_TRNS, RGUI(KC_Z), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN1, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT @@ -111,7 +110,7 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key /* FKEYS - Funtion keys & mac stuff * ,-----------------------------------------. .-----------------------------------------. - * | FKEYS| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | Ctrl | + * | FKEYS| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | Ctrl | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | F11 | F12 | F13 | F14 | F15 | Alt | * |------+------+------+------+------+------|------+------+------+------+------+------+------| @@ -120,13 +119,13 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key * | . |RGBTog| . | | LO | Bspc |/ | | HI | | | | | * `------------------------------------------------------------------------------------------' * - */ - -[_FKEYS] = KEYMAP( - F(_FKEYS), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT , - F(_QW), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, - KC_TRNS, F(RGBLED_TOGGLE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + */ + +[_FKEYS] = KEYMAP( + TG(_FKEYS),KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT , + TO(_QW), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, + KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -140,31 +139,19 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key * |------+------+------+------+------+------+ // +------+------+------+------+------+------| * | . | . | . | GUI | LO | . |/ | Spc | HI | GUI | M0 | / |LSFT | * `------------------------------------------------------------------------------------------' - * + * */ [_TRNS] = { {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, 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_NO, 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_NO, 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} } }; - -const uint16_t PROGMEM fn_actions[] = { - [_QW] = ACTION_LAYER_ON(_QW,ON_RELEASE), // return to QWERTY layer - [_LW] = ACTION_LAYER_TAP_TOGGLE(_LW), // Turn on LW when holding, or tap 3 times to switch - [_NAV] = ACTION_LAYER_TOGGLE(_NAV), - [_FKEYS] = ACTION_LAYER_TOGGLE(_FKEYS), - - // Functions - [RGBLED_TOGGLE] = ACTION_FUNCTION(RGBLED_TOGGLE), - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -230,21 +217,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; - - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGBLED_TOGGLE: - //led operations - if (record->event.pressed) { - rgblight_toggle(); - } - break; - } -} - - - void LayerLEDSet(uint8_t layr) { switch (layr) { @@ -253,12 +225,12 @@ void LayerLEDSet(uint8_t layr) { break; case _LW: // deep purple - rgblight_setrgb(20,0,35); - break; + rgblight_setrgb(20,0,35); + break; case _HI: // light blue - rgblight_setrgb(0,20,20); - break; + rgblight_setrgb(0,20,20); + break; case _NAV: // Yellowy orange rgblight_setrgb(25,20,0); // brighter @@ -266,14 +238,14 @@ void LayerLEDSet(uint8_t layr) { case _FKEYS: // RED rgblight_setrgb(20,0,0); // brighter - break; + break; default: rgblight_setrgb(20,2,20);//error break; } - + return; - + } void matrix_init_user(void) { @@ -298,5 +270,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void led_set_user(uint8_t usb_led) { } - - diff --git a/keyboards/handwired/woodpad/config.h b/keyboards/handwired/woodpad/config.h index f4d005307b53..77be4a0d9f9b 100644 --- a/keyboards/handwired/woodpad/config.h +++ b/keyboards/handwired/woodpad/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B1, B3, B2, B6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/handwired/woodpad/keymaps/default/config.h b/keyboards/handwired/woodpad/keymaps/default/config.h index f52a97bbc865..a72596783dd1 100644 --- a/keyboards/handwired/woodpad/keymaps/default/config.h +++ b/keyboards/handwired/woodpad/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/handwired/woodpad/keymaps/default/keymap.c b/keyboards/handwired/woodpad/keymaps/default/keymap.c index 70c05fc27162..838c14ead553 100644 --- a/keyboards/handwired/woodpad/keymaps/default/keymap.c +++ b/keyboards/handwired/woodpad/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "woodpad.h" +#include QMK_KEYBOARD_H // 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. @@ -24,10 +24,6 @@ #define _ALT 2 #define _ADJUST 3 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMLOCK] = KEYMAP( /* Base */ KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\ @@ -90,7 +86,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off(_ADJUST); } numlock_down = false; - } + } return false; break; case KC_LALT: diff --git a/keyboards/handwired/woodpad/keymaps/drashna/README.md b/keyboards/handwired/woodpad/keymaps/drashna/README.md deleted file mode 100644 index f24d2c48f6c4..000000000000 --- a/keyboards/handwired/woodpad/keymaps/drashna/README.md +++ /dev/null @@ -1,25 +0,0 @@ -Overview -======== - -This is my personal Numpad (Woodpad) configuration, and my daily driver. - -Most of the code resides in my userspace, rather than here, as I have multiple keyboards. - -How to build ------------- -make handwired/woodpad:drashna:avrdude - -Layers ------- -* NUMLOCK: Num pad, locked to NUM LOCK enabled. -* NAV: Navigation codes without needing to enable numlock. -* DIABLO: This contains a Diablo 3 layout, that requires much less reaching or shifting. If Tap Dance is enabled, then it has a "spam" feature. See Userspace for details. -* MACROS: This layer contains a bunch of macros for spamming chat, with a toggle on what key to open up chat with. -* MEDIA: Media and RGB commands - -All layers have RGB specific indicators, so you can see what layer you're on by the underglow. - -Woodpad Specific Code ---------------------- - -Aside from my userspace code, this includes LED indications for numlock and macro mode. It also forces NUMLOCK to be enabled. diff --git a/keyboards/handwired/woodpad/keymaps/drashna/keymap.c b/keyboards/handwired/woodpad/keymaps/drashna/keymap.c deleted file mode 100644 index f7df5eac7929..000000000000 --- a/keyboards/handwired/woodpad/keymaps/drashna/keymap.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME - * - * 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 . - */ -#include QMK_KEYBOARD_H -#include "drashna.h" - - // 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. - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - - - - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_NUMLOCK] = KEYMAP( /* Base */ - TG(_NAV), TG(_DIABLO), TG(_MACROS), KC_PSLS,\ - KC_P7, KC_P8, KC_P9, KC_PAST, \ - KC_P4, KC_P5, KC_P6, KC_PMNS, \ - KC_P1, KC_P2, KC_P3, KC_PPLS, \ - LT(_MEDIA,KC_P0), KC_PDOT, KC_COLN, KC_PENT \ -), -[_NAV] = KEYMAP( /* Base */ - _______, _______, _______, _______,\ - KC_HOME, KC_UP, KC_PGUP, _______, \ - KC_LEFT, XXXXXXX, KC_RIGHT, _______, \ - KC_END, KC_DOWN, KC_PGDN, _______, \ - KC_INS, KC_DEL, _______, _______ \ -), -[_DIABLO] = KEYMAP( /* Base */ - KC_ESC, _______, XXXXXXX, _______,\ - KC_S, KC_I, KC_F, KC_M, \ - KC_1, KC_2, KC_3, KC_4, \ - KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, \ - XXXXXXX, KC_DIABLO_CLEAR, KC_Q, SFT_T(KC_SPACE) \ -), - -[_MACROS] = KEYMAP( /* Base */ - KC_OVERWATCH, XXXXXXX, _______, XXXXXXX,\ - KC_JUSTGAME, XXXXXXX, XXXXXXX, KC_C9, \ - XXXXXXX, XXXXXXX, KC_AIM, KC_GGEZ, \ - KC_SYMM, KC_TORB, XXXXXXX, KC_GOODGAME, \ - KC_SALT, KC_MORESALT, KC_SALTHARD, KC_GLHF \ -), -[_MEDIA] = KEYMAP( /* Base */ - KC_RESET, KC_MUTE, KC_VOLD, KC_VOLU,\ - KC_MAKE, _______, RGB_HUI, RGB_HUD, \ - KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, \ - RGB_TOG, RGB_MOD, RGB_SAI, RGB_VAI, \ - _______, KC_RGB_T, RGB_SAD, RGB_VAD \ -), - -}; - - -void numlock_led_on(void) { - PORTF |= (1 << 7); -} - -void numlock_led_off(void) { - PORTF &= ~(1 << 7); -} - - - -void matrix_init_keymap(void) { - // set Numlock LED to output and low - DDRF |= (1 << 7); - PORTF &= ~(1 << 7); -} - -void matrix_scan_keymap(void) { - numlock_led_off(); - if ((is_overwatch && biton32(layer_state) == _MACROS) || (biton32(layer_state) == _NUMLOCK)) { - numlock_led_on(); - } - - // Run Diablo 3 macro checking code. -} - -void led_set_keymap(uint8_t usb_led) { - if (!(usb_led & (1<. #include "config_common.h" /* Use I2C or Serial, not both */ - #define USE_I2C -#define SCL_CLOCK 400000UL - -// #define USE_SERIAL -/* serial.c configuration for split keyboard */ -// #define SOFT_SERIAL_PIN D0 +#define SCL_CLOCK 800000UL /* Select hand configuration */ - #define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - //#define DEBUG_MATRIX_SCAN_RATE //Use this to determine scan-rate. #define FORCE_NKRO @@ -41,6 +32,7 @@ along with this program. If not, see . #define QMK_KEYS_PER_SCAN 4 //if we press four keys simultaneously, lets process them simultaneously... #define DIODE_DIRECTION COL2ROW + #ifdef AUDIO_ENABLE #define C6_AUDIO #define STARTUP_SONG SONG(STARTUP_SOUND) diff --git a/keyboards/handwired/xealous/debounce.c b/keyboards/handwired/xealous/debounce.c deleted file mode 100644 index 65a99f27f261..000000000000 --- a/keyboards/handwired/xealous/debounce.c +++ /dev/null @@ -1,63 +0,0 @@ -#include -#include "config.h" -#include "matrix.h" -#include "timer.h" -#include "quantum.h" - -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 -#endif - -//Debouncing counters -typedef uint8_t debounce_counter_t; -#define DEBOUNCE_COUNTER_MODULO 250 -#define DEBOUNCE_COUNTER_INACTIVE 251 - -static debounce_counter_t *debounce_counters; - -void debounce_init(uint8_t num_rows) -{ - debounce_counters = malloc(num_rows*MATRIX_COLS); - memset(debounce_counters, DEBOUNCE_COUNTER_INACTIVE, num_rows*MATRIX_COLS); -} - -void update_debounce_counters(uint8_t num_rows, uint8_t current_time) -{ - for (uint8_t row = 0; row < num_rows; row++) - { - for (uint8_t col = 0; col < MATRIX_COLS; col++) - { - if (debounce_counters[row*MATRIX_COLS + col] != DEBOUNCE_COUNTER_INACTIVE) - { - if (TIMER_DIFF(current_time, debounce_counters[row*MATRIX_COLS + col], DEBOUNCE_COUNTER_MODULO) >= DEBOUNCING_DELAY) { - debounce_counters[row*MATRIX_COLS + col] = DEBOUNCE_COUNTER_INACTIVE; - } - } - } - } -} - -void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) -{ - for (uint8_t row = 0; row < num_rows; row++) - { - matrix_row_t delta = raw[row] ^ cooked[row]; - - for (uint8_t col = 0; col < MATRIX_COLS; col++) - { - if (debounce_counters[row*MATRIX_COLS + col] == DEBOUNCE_COUNTER_INACTIVE && (delta & (1<. #include "matrix_scanrate.h" #endif - - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# error "only i2c supported" -#endif - -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 -#endif - - -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#else -# error "Currently only supports 8 COLS" -#endif - -#define ERROR_DISCONNECT_COUNT 5 - -#define ROWS_PER_HAND (MATRIX_ROWS/2) - -static uint8_t error_count = 0; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static matrix_row_t* debouncing_matrix_hand_offsetted; //pointer to matrix_debouncing for our hand -static matrix_row_t* matrix_hand_offsetted; // pointer to matrix for our hand - -//Debouncing counters -typedef uint8_t debounce_counter_t; -#define DEBOUNCE_COUNTER_MODULO 250 -#define DEBOUNCE_COUNTER_INACTIVE 251 -static debounce_counter_t debounce_counters[MATRIX_ROWS * MATRIX_COLS]; -static debounce_counter_t *debounce_counters_hand_offsetted; - - -#if (DIODE_DIRECTION == ROW2COL) - error "Only Col2Row supported"; -#endif -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); -static void unselect_row(uint8_t row); -static matrix_row_t optimized_col_reader(void); - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -__attribute__ ((weak)) -void matrix_slave_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ -#ifdef DISABLE_JTAG - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<= (b) ? (a) - (b) : (max) - (b) + (a)) -void update_debounce_counters(uint8_t current_time) -{ - debounce_counter_t *debounce_pointer = debounce_counters_hand_offsetted; - for (uint8_t row = 0; row < ROWS_PER_HAND; row++) - { - for (uint8_t col = 0; col < MATRIX_COLS; col++) - { - if (*debounce_pointer != DEBOUNCE_COUNTER_INACTIVE) - { - if (TIMER_DIFF(current_time, *debounce_pointer, DEBOUNCE_COUNTER_MODULO) >= - DEBOUNCING_DELAY) { - *debounce_pointer = DEBOUNCE_COUNTER_INACTIVE; - } - } - debounce_pointer++; - } - } -} - -void transfer_matrix_values(uint8_t current_time) -{ - //upload from debounce_matrix to final matrix; - debounce_counter_t *debounce_pointer = debounce_counters_hand_offsetted; - for (uint8_t row = 0; row < ROWS_PER_HAND; row++) - { - matrix_row_t row_value = matrix_hand_offsetted[row]; - matrix_row_t debounce_value = debouncing_matrix_hand_offsetted[row]; - - for (uint8_t col = 0; col < MATRIX_COLS; col++) - { - bool final_value = debounce_value & (1 << col); - bool current_value = row_value & (1 << col); - if (*debounce_pointer == DEBOUNCE_COUNTER_INACTIVE - && (current_value != final_value)) - { - *debounce_pointer = current_time; - row_value ^= (1 << col); - } - debounce_pointer++; - } - matrix_hand_offsetted[row] = row_value; - } -} - -uint8_t _matrix_scan(void) -{ - uint8_t current_time = timer_read() % DEBOUNCE_COUNTER_MODULO; - - // Set row, read cols - for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { - select_row(current_row); - asm volatile ("nop"); asm volatile("nop"); - - debouncing_matrix_hand_offsetted[current_row] = optimized_col_reader(); - // Unselect row - unselect_row(current_row); - } - - update_debounce_counters(current_time); - transfer_matrix_values(current_time); - - return 1; -} - - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(I2C_KEYMAP_START); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -uint8_t matrix_scan(void) +void matrix_scan_user(void) { #ifdef DEBUG_MATRIX_SCAN_RATE matrix_check_scan_rate(); matrix_time_between_scans(); #endif - uint8_t ret = _matrix_scan(); - - if( i2c_transaction() ) { - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[I2C_KEYMAP_START+i] = matrix[offset+i]; - } - - matrix_slave_scan_user(); -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } + } -inline -static matrix_row_t optimized_col_reader(void) { +// Copy this code to split_common/matrix.c, +// and call it instead of the unoptimized col_reader. Scan-rate jumps from 1200->1920 +// Also remove the sleep_us(30), not necessary for this keyboard. +// In usb_descriptor.c, set .PollingIntervalMS = 0x01 +#define ROW_SHIFTER ((uint8_t)1) +inline static matrix_row_t optimized_col_reader(void) { //MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } return (PINB & (1 << 6) ? 0 : (ROW_SHIFTER << 0)) | (PINB & (1 << 2) ? 0 : (ROW_SHIFTER << 1)) | @@ -351,26 +61,3 @@ static matrix_row_t optimized_col_reader(void) { } -static void select_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk index 07e1c875e603..ef3357982ea4 100644 --- a/keyboards/handwired/xealous/rules.mk +++ b/keyboards/handwired/xealous/rules.mk @@ -1,5 +1,4 @@ -#SRC += matrix_scanrate.c matrix.c -SRC += debounce.c +SRC += matrix_scanrate.c matrix.c # MCU name MCU = atmega32u4 @@ -67,8 +66,7 @@ SUBPROJECT_rev1 = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = no -CUSTOM_DEBOUNCE = yes +DEBOUNCE_TYPE = eager_pk LAYOUTS = split60 diff --git a/keyboards/hecomi/alpha/config.h b/keyboards/hecomi/alpha/config.h new file mode 100644 index 000000000000..8a65f146b009 --- /dev/null +++ b/keyboards/hecomi/alpha/config.h @@ -0,0 +1,247 @@ +/* +Copyright 2018 takashiski + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER takashiski +#define PRODUCT hecomi_alpha +#define DESCRIPTION asymmetric split keyboard + +/* key matrix size */ +//#define MATRIX_ROWS 5 +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C6,D7,E6,B4,B5 } +#define MATRIX_COL_PINS { F4,F5,F6,F7,B1,B3,B2,B6 } +#define UNUSED_PINS +#define SOFT_SERIAL_PIN D1 // or D1, D2, D3, E6 +//#define USE_I2C + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, an3 define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + #define RGB_DI_PIN D4 + #ifdef RGB_DI_PIN + #define RGBLED_NUM 16 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING + #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + + +/* 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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 +// +/* +#define USE_I2C +#define MASTER_LEFT +#define EEHANDS +*/ +#define RGBLED_SPLIT {8,8} diff --git a/keyboards/hecomi/alpha/info.json b/keyboards/hecomi/alpha/info.json new file mode 100644 index 000000000000..49c8d4c467bf --- /dev/null +++ b/keyboards/hecomi/alpha/info.json @@ -0,0 +1,364 @@ +{ + "keyboard_name": "hecomi/alpha", + "url": "https://skyhigh-works.hatenablog.com/entry/2019/02/25/221959", + "maintainer": "takashiski", + "width": 16.25, + "height": 5, + "key_count": 69, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "Esc", + "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": 8.25, + "y": 0 + }, + { + "label": "*", + "x": 9.25, + "y": 0 + }, + { + "label": "(", + "x": 10.25, + "y": 0 + }, + { + "label": ")", + "x": 11.25, + "y": 0 + }, + { + "label": "_", + "x": 12.25, + "y": 0 + }, + { + "label": "+", + "x": 13.25, + "y": 0 + }, + { + "label": "|", + "x": 14.25, + "y": 0 + }, + { + "label": "~", + "x": 15.25, + "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": "Y", + "x": 7.75, + "y": 1 + }, + { + "label": "U", + "x": 8.75, + "y": 1 + }, + { + "label": "I", + "x": 9.75, + "y": 1 + }, + { + "label": "O", + "x": 10.75, + "y": 1 + }, + { + "label": "P", + "x": 11.75, + "y": 1 + }, + { + "label": "{", + "x": 12.75, + "y": 1 + }, + { + "label": "}", + "x": 13.75, + "y": 1 + }, + { + "label": "Delete", + "x": 14.75, + "y": 1, + "w": 1.5 + }, + { + "label": "Control", + "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": 8, + "y": 2 + }, + { + "label": "J", + "x": 9, + "y": 2 + }, + { + "label": "K", + "x": 10, + "y": 2 + }, + { + "label": "L", + "x": 11, + "y": 2 + }, + { + "label": ":", + "x": 12, + "y": 2 + }, + { + "label": "\"", + "x": 13, + "y": 2 + }, + { + "label": "Return", + "x": 14, + "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": "B", + "x": 7.5, + "y": 3 + }, + { + "label": "N", + "x": 8.5, + "y": 3 + }, + { + "label": "M", + "x": 9.5, + "y": 3 + }, + { + "label": "<", + "x": 10.5, + "y": 3 + }, + { + "label": ">", + "x": 11.5, + "y": 3 + }, + { + "label": "?", + "x": 12.5, + "y": 3 + }, + { + "label": "Shift", + "x": 13.5, + "y": 3, + "w": 1.75 + }, + { + "label": "Fn", + "x": 15.25, + "y": 3 + }, + { + "x": 0, + "y": 4, + "w": 1.5 + }, + { + "label": "", + "x": 1.5, + "y": 4 + }, + { + "label": "GUI", + "x": 2.5, + "y": 4 + }, + { + "label": "無変換", + "x": 3.5, + "y": 4 + }, + { + "label": "tab", + "x": 4.5, + "y": 4 + }, + { + "x": 5.5, + "y": 4 + }, + { + "label": "Enter", + "x": 7.75, + "y": 4 + }, + { + "label": "BS", + "x": 8.75, + "y": 4 + }, + { + "label": "変換", + "x": 9.75, + "y": 4 + }, + { + "label": "GUI", + "x": 10.75, + "y": 4 + }, + { + "label": "Menu", + "x": 11.75, + "y": 4 + }, + { + "label": "", + "x": 12.75, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/hecomi/alpha/readme.md b/keyboards/hecomi/alpha/readme.md new file mode 100644 index 000000000000..5b316245c304 --- /dev/null +++ b/keyboards/hecomi/alpha/readme.md @@ -0,0 +1,21 @@ +# hecomi_alpha + +![hecomi_alpha](https://imgur.com/a/5AwQw0r) + +This keyboard based on HHKB pro 2 and physical layout designed by @hecomi and @takashiski. + +This keyboard use 2 pro micro's, but you can use USB type-c. There are a bit tricky implementation. + +Keyboard Maintainer: [takashiski](https://github.com/takashiski) +Hardware Supported: hecomi_alpha, promicro +Hardware Availability: booth(@skyhigh_works) + +Make example for this keyboard (after setting up your build environment): + + make hecomi/alpha:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +and build guide is here. + +[build guide](https://skyhigh-works.hatenablog.com/entry/2019/02/25/221959) diff --git a/keyboards/hecomi/alpha/rules.mk b/keyboards/hecomi/alpha/rules.mk new file mode 100644 index 000000000000..3e726f1d6c59 --- /dev/null +++ b/keyboards/hecomi/alpha/rules.mk @@ -0,0 +1,82 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +SPLIT_KEYBOARD = yes diff --git a/keyboards/hecomi/hecomi.c b/keyboards/hecomi/hecomi.c new file mode 100644 index 000000000000..9d0d93fa173e --- /dev/null +++ b/keyboards/hecomi/hecomi.c @@ -0,0 +1,44 @@ +/* Copyright 2018 takashiski + * + * 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 . + */ +#include "hecomi.h" +#include "split_util.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/hecomi/hecomi.h b/keyboards/hecomi/hecomi.h new file mode 100644 index 000000000000..ef90a8ead904 --- /dev/null +++ b/keyboards/hecomi/hecomi.h @@ -0,0 +1,89 @@ +/* Copyright 2018 takashiski + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + + + +/* +Left hand : +7 +7 +6 +6 +6 + +32 + +Right hand: + +8 +8 +7 +8 +6 + +37 +*/ + +#define LAYOUT(\ + K00, K01, K02, K03, K04, K05, K06, K50, K51, K52, K53, K54, K55, K56, K57, \ + K10, K11, K12, K13, K14, K15, K16, K60, K61, K62, K63, K64, K65, K66, K67, \ + K20, K21, K22, K23, K24, K25, K71, K72, K73, K74, K75, K76, K77,\ + K30, K31, K32, K33, K34, K35, K80, K81, K82, K83, K84, K85, K86, K87, \ + K40, K41, K42, K43, K44, K45, K92, K93, K94, K95, K96, K97\ +) {\ + {K00, K01, K02, K03, K04, K05, K06, KC_NO},\ + {K10, K11, K12, K13, K14, K15, K16, KC_NO},\ + {K20, K21, K22, K23, K24, K25, KC_NO, KC_NO},\ + {K30, K31, K32, K33, K34, K35, KC_NO, KC_NO},\ + {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO},\ + {K50, K51, K52, K53, K54, K55, K56, K57},\ + {K60, K61, K62, K63, K64, K65, K66, K67},\ + {KC_NO, K71, K72, K73, K74, K75, K76, K77},\ + {K80, K81, K82, K83, K84, K85, K86, K87},\ + {KC_NO, KC_NO, K92, K93, K94, K95, K96, K97}\ +} + +#define LAYOUT_kc(\ +K00, K01, K02, K03, K04, K05, K06, K50, K51, K52, K53, K54, K55, K56, K57, \ +K10, K11, K12, K13, K14, K15, K16, K60, K61, K62, K63, K64, K65, K66, K67, \ +K20, K21, K22, K23, K24, K25, K71, K72, K73, K74, K75, K76, K77,\ +K30, K31, K32, K33, K34, K35, K80, K81, K82, K83, K84, K85, K86, K87, \ + K40, K41, K42, K43, K44, K45, K92, K93, K94, K95, K96, K97\ +) {\ +{KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_NO},\ +{KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_NO},\ +{KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_NO, KC_NO},\ +{KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_NO, KC_NO},\ +{KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_NO, KC_NO},\ +{KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57},\ +{KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67},\ +{KC_NO, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77},\ +{KC_##K80, KC_##K81, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_##K86, KC_##K87},\ +{KC_NO, KC_NO, KC_##K92, KC_##K93, KC_##K94, KC_##K95, KC_##K96, KC_##K97}\ +} + diff --git a/keyboards/hecomi/keymaps/default/config.h b/keyboards/hecomi/keymaps/default/config.h new file mode 100644 index 000000000000..4496c5910061 --- /dev/null +++ b/keyboards/hecomi/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 REPLACE_WITH_YOUR_NAME + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/hecomi/keymaps/default/keymap.c b/keyboards/hecomi/keymaps/default/keymap.c new file mode 100644 index 000000000000..505966fbeb88 --- /dev/null +++ b/keyboards/hecomi/keymaps/default/keymap.c @@ -0,0 +1,105 @@ +/* Copyright 2018 takashiski + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +//R1:7 + 8 = 15 +//R2:7 + 8 = 15 +//R3:6 + 7 = 13 +//R4:6 + 8 = 14 +//R5:6 + 6 = 12 +//total : 69 keys +// +enum layers{ + DF, + FN +}; + +#define KC_FN MO(FN) +#define KC_SFT(XXX) LSFT(XXX) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DF]=LAYOUT(\ + KC_ESC,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6, KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_NUHS,KC_GRV,\ + KC_TAB ,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y, KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSPC,\ + KC_LCTRL ,KC_A,KC_S,KC_D,KC_F,KC_G, KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_ENT,\ + KC_LSFT ,KC_Z,KC_X,KC_C,KC_V,KC_B, KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,KC_FN,\ + KC_LCTRL,KC_LGUI,KC_LALT,KC_MHEN,KC_BSPC,KC_SPC, KC_ENT,KC_ESC,KC_HENK,KC_RALT,KC_RGUI,KC_RCTRL\ + ), + [FN]=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_INS,KC_DEL,\ + KC_TAB ,KC_9,KC_7,KC_5,KC_3,KC_1,KC_Y, KC_Y,KC_U,KC_PSCR,KC_SLCK,KC_PAUSE,KC_UP,KC_RBRC,KC_BSPC,\ + KC_CAPS ,KC_8,KC_6,KC_4,KC_2,KC_0, KC_SFT(KC_8),KC_SLSH,KC_HOME,KC_PGUP,KC_LEFT,KC_RIGHT,KC_ENT,\ + KC_LSFT ,KC_Z,KC_X,KC_C,KC_V,KC_B, KC_B,KC_SFT(KC_EQL),KC_MINS,KC_END,KC_PGDN,KC_DOWN,KC_RSFT,KC_TRNS,\ + KC_LCTRL,KC_LGUI,KC_LALT,KC_MHEN,KC_BSPC,KC_SPC, KC_ENT,KC_ESC,KC_HENK,KC_RALT,KC_RGUI,KC_RCTRL\ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +uint32_t layer_state_set_user(uint32_t state) +{ + uint8_t layer=biton32(state); + switch(layer) + { + case DF: + rgblight_sethsv_noeeprom(180,255,255); + break; + case FN: + rgblight_sethsv_noeeprom(0,255,255); + break; + default: + break; + } + return state; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/hecomi/keymaps/default/readme.md b/keyboards/hecomi/keymaps/default/readme.md new file mode 100644 index 000000000000..e44f3d6f6118 --- /dev/null +++ b/keyboards/hecomi/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hecomi_alpha \ No newline at end of file diff --git a/keyboards/hecomi/readme.md b/keyboards/hecomi/readme.md new file mode 100644 index 000000000000..79a80f35e53f --- /dev/null +++ b/keyboards/hecomi/readme.md @@ -0,0 +1,17 @@ +# hecomi + +![hecomi](https://imgur.com/a/5AwQw0r) + +This keyboard based on HHKB pro 2 and physical layout designed by @hecomi and @takashiski. + +This keyboard use 2 pro micro's, but you can use USB type-c. There are hand wiring . + +Keyboard Maintainer: [takashiski](https://github.com/takashiski) +Hardware Supported: hecomi_alpha, promicro +Hardware Availability: booth(@skyhigh_works) + +Make example for this keyboard (after setting up your build environment): + + make hecomi/alpha:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/hecomi/rules.mk b/keyboards/hecomi/rules.mk new file mode 100644 index 000000000000..19b763d43556 --- /dev/null +++ b/keyboards/hecomi/rules.mk @@ -0,0 +1,85 @@ +DEFAULT_FOLDER=hecomi/alpha +# +# +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +SPLIT_KEYBOARD = yes diff --git a/keyboards/helix/pico/keymaps/biacco/keymap.c b/keyboards/helix/pico/keymaps/biacco/keymap.c index b4ee4fcaa9db..36ef4394dd83 100644 --- a/keyboards/helix/pico/keymaps/biacco/keymap.c +++ b/keyboards/helix/pico/keymaps/biacco/keymap.c @@ -31,9 +31,6 @@ enum layer_number { GAME }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/helix/pico/keymaps/default/config.h b/keyboards/helix/pico/keymaps/default/config.h index 20dfc9f9858c..7653185198bc 100644 --- a/keyboards/helix/pico/keymaps/default/config.h +++ b/keyboards/helix/pico/keymaps/default/config.h @@ -18,8 +18,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once // place overrides here @@ -42,5 +41,3 @@ along with this program. If not, see . //#define RGBLIGHT_EFFECT_RGB_TEST //#define RGBLIGHT_EFFECT_ALTERNATING #endif - -#endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/pico/keymaps/default/keymap.c b/keyboards/helix/pico/keymaps/default/keymap.c index 5273bb4a0170..c5ab84abe89c 100644 --- a/keyboards/helix/pico/keymaps/default/keymap.c +++ b/keyboards/helix/pico/keymaps/default/keymap.c @@ -50,10 +50,6 @@ enum macro_keycodes { KC_SAMPLEMACRO, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c index 9b81979ff426..637f1d169578 100644 --- a/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c +++ b/keyboards/helix/rev1/keymaps/OLED_sample/keymap.c @@ -47,10 +47,6 @@ enum macro_keycodes { KC_SAMPLEMACRO, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) diff --git a/keyboards/helix/rev1/keymaps/default/config.h b/keyboards/helix/rev1/keymaps/default/config.h index d95925d4e45a..0f81f5f7bea3 100644 --- a/keyboards/helix/rev1/keymaps/default/config.h +++ b/keyboards/helix/rev1/keymaps/default/config.h @@ -18,8 +18,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once + +// place overrides here /* Use I2C or Serial, not both */ @@ -31,5 +32,3 @@ along with this program. If not, see . #define MASTER_LEFT // #define _MASTER_RIGHT // #define EE_HANDS - -#endif diff --git a/keyboards/helix/rev1/keymaps/default/keymap.c b/keyboards/helix/rev1/keymaps/default/keymap.c index 7288cd752f63..43928a4185b3 100644 --- a/keyboards/helix/rev1/keymaps/default/keymap.c +++ b/keyboards/helix/rev1/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #if HELIX_ROWS == 5 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/helix/rev2/keymaps/default/config.h b/keyboards/helix/rev2/keymaps/default/config.h index ed376757942f..b8c1041cdc7b 100644 --- a/keyboards/helix/rev2/keymaps/default/config.h +++ b/keyboards/helix/rev2/keymaps/default/config.h @@ -18,8 +18,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once // place overrides here @@ -37,5 +36,3 @@ along with this program. If not, see . //#define RGBLIGHT_EFFECT_RGB_TEST //#define RGBLIGHT_EFFECT_ALTERNATING #endif - -#endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c index 0fb821affbd4..a64eed3e72cb 100644 --- a/keyboards/helix/rev2/keymaps/default/keymap.c +++ b/keyboards/helix/rev2/keymaps/default/keymap.c @@ -50,10 +50,6 @@ enum macro_keycodes { KC_SAMPLEMACRO, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) @@ -510,14 +506,7 @@ void music_scale_user(void) //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h #ifdef SSD1306OLED -// hook point for 'led_test' keymap -// 'default' keymap's led_test_init() is empty function, do nothing -// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(RGBLIGHT_MODE_RGB_TEST); -__attribute__ ((weak)) -void led_test_init(void) {} - void matrix_scan_user(void) { - led_test_init(); iota_gfx_task(); // this is what updates the display continuously } diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/config.h b/keyboards/helix/rev2/keymaps/edvorakjp/config.h index 769988cdb580..cd0568f61e39 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/config.h +++ b/keyboards/helix/rev2/keymaps/edvorakjp/config.h @@ -1,21 +1,23 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H +#define SWAP_SCLN + #undef TAPPING_FORCE_HOLD #undef TAPPING_TERM -#define TAPPING_TERM 120 -#define SWAP_SCLN +#define TAPPING_TERM 300 +#define IGNORE_MOD_TAP_INTERRUPT // 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_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 diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c b/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c index fd324a859ae5..9fba5072c40e 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap.c @@ -7,21 +7,6 @@ // keymaps definitions are moved to keymap_Xrows.c. -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case KC_LOCK: - if (record->event.pressed) { - if (get_enable_kc_lang()) { - SEND_STRING( SS_LCTRL(SS_LSFT(SS_TAP(X_POWER))) ); - } else { - SEND_STRING( SS_LGUI("l") ); - } - } - return false; - } - return true; -} - #ifdef SSD1306OLED void matrix_init_keymap(void) { //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h @@ -37,23 +22,15 @@ void matrix_scan_user(void) { uint32_t layer_state_set_keymap(uint32_t state) { rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); switch (biton32(state)) { - case _EDVORAKJ1: - case _EDVORAKJ2: - // _EDVORAKJ1 & J2 are same colored - rgblight_sethsv_noeeprom_white(); - break; case _LOWER: rgblight_sethsv_noeeprom_red(); break; case _RAISE: rgblight_sethsv_noeeprom_blue(); break; - case _ADJUST: - rgblight_sethsv_noeeprom_green(); - break; default: // for any other layers, or the default layer - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3); - rgblight_sethsv_noeeprom_red(); + rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3); + rgblight_sethsv_red(); break; } return state; diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c index 805e6b17b752..f2befc03b584 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_4rows.c @@ -4,86 +4,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_EDVORAK] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - LBRC,RBRC,COMM,DOT , Y , P , F , G , R , W , Q ,BSLS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - EQL , A , O , E , I , U , D , T , N , S , M ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - QUOT,SCLN, X , C , V , Z , B , H , J , K , L ,SLSH, - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - LEFT,DOWN, UP ,RGHT,TMB1,TMB2,TMB3, TMB6,TMB7,TMB8,LEFT,DOWN, UP ,RGHT - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_EDVORAKJ1] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , Y , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_EDVORAKJ2] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , Y , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_QWERTY] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - EQL , Q , W , E , R , T , Y , U , I , O , P ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LBRC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - RBRC, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,BSLS, - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + //,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----. + GRV ,QUOT,COMM , DOT , Y , Q , F , G , R , W , P ,BSLS, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + EQL , A ,LA(O),LG(E),LC(I), U , D ,RS(T),RG(N),RA(S), M ,MINS, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + ESC ,SCLN, X , C , V , Z , H , J , K , L , B ,SLSH, + //|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----| + HOME,PGDN,PGUP , END ,TMB1 ,TMB2,TMB3, TMB4,TMB5,TMB6 ,LEFT ,DOWN , UP ,RGHT + //`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----' ), [_LOWER] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - F1 , F2 , F3 , F4 , F5 ,LCBR, RCBR, 7 , 8 , 9 ,MINS,SLSH, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F6 , F7 , F8 , F9 ,F10 ,LPRN, RPRN, 4 , 5 , 6 ,PLUS,ASTR, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F11 ,F12 ,PSCR,SLCK,PAUS,LBRC, RBRC, 1 , 2 , 3 , NO , NO , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - HOME,PGDN,PGUP,END , , , , ,ESC , 0 ,HOME,PGDN,PGUP,END - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + //,----+----+------+------+------+----. ,----+------+------+-------+----+----. + , , LCBR , LBRC , LPRN , , , RPRN , RBRC , RCBR , , , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + F1 , F2 ,LA(F3),LG(F4),LC(F5), F6 , F7 ,RS(F8),RG(F9),RA(F10),F11 ,F12 , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + PSCR, , HOME , PGDN , PGUP ,END , LEFT, DOWN , UP , RGHT , , , + //|----+----+------+------+------+----+----. ,----+----+------+------+-------+----+----| + , , , , , , NO , MAC ,TMB7, , , , , + //`----+----+------+------+------+----+----/ \----+----+------+------+-------+----+----' ), [_RAISE] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, NO , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , NO , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - HOME,PGDN,PGUP,END ,TMB9,ESC , , , , ,HOME,PGDN,PGUP,END - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_ADJUST] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , ,EXTOFF, , ,EXTON, , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,RST ,DBUG,RTOG,WIN , , ,MAC ,QWER,EDJP, , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , , , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + //,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----. + , ,EXLM , AT ,HASH ,DLR , PERC,CIRC ,AMPR ,ASTR , , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + , 1 ,LA(2),LG(3),LC(4), 5 , 6 ,RS(7),RG(8),RA(9), 0 , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + PSCR, ,HOME ,PGDN ,PGUP ,END , LEFT,DOWN , UP ,RGHT , , , + //|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----| + , , , , , ,WIN , NO , , , , , , + //`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----' ) }; diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c index ef1b9d358c6a..642ba8c635b4 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_5rows.c @@ -4,100 +4,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_EDVORAK] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LBRC,RBRC,COMM,DOT , Y , P , F , G , R , W , Q ,BSLS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - EQL , A , O , E , I , U , D , T , N , S , M ,MINS, - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - QUOT,SCLN, X , C , V , Z ,TMB4, TMB5, B , H , J , K , L ,SLSH, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - LEFT,DOWN, UP ,RGHT,TMB1,TMB2,TMB3, TMB6,TMB7,TMB8,LEFT,DOWN, UP ,RGHT - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_EDVORAKJ1] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , Y , , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_EDVORAKJ2] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , Y , , , , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_QWERTY] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - EQL , Q , W , E , R , T , Y , U , I , O , P ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LBRC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - RBRC, Z , X , C , V , B , , , N , M ,COMM,DOT ,SLSH,BSLS, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + //,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----. + ESC ,EXLM, AT ,HASH , DLR ,PERC, CIRC,AMPR ,ASTR ,LPRN ,RPRN,BSPC, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + GRV ,QUOT,COMM , DOT , Y , Q , F , G , R , W , P ,BSLS, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + EQL , A ,LA(O),LG(E),LC(I), U , D ,RS(T),RG(N),RA(S), M ,MINS, + //|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----| + TAB ,SCLN, X , C , V , Z , NO , NO , H , J , K , L , B ,SLSH, + //|----+----+-----+-----+-----+----+----| |----+----+-----+-----+-----+----+----| + HOME,PGDN,PGUP , END ,TMB1 ,TMB2,TMB3, TMB4,TMB5,TMB6 ,LEFT ,DOWN , UP ,RGHT + //`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----' ), [_LOWER] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , ,SLSH,ASTR, , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F1 , F2 , F3 , F4 , F5 ,LCBR, RCBR, 7 , 8 , 9 ,MINS, , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F6 , F7 , F8 , F9 ,F10 ,LPRN, RPRN, 4 , 5 , 6 ,PLUS, , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - F11 ,F12 ,PSCR,SLCK,PAUS,LBRC,LOCK, ,RBRC, 1 , 2 , 3 , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - HOME,PGDN,PGUP,END ,TMB9, , , , , 0 ,HOME,PGDN,PGUP,END - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + //,----+----+------+------+------+----. ,----+------+------+-------+----+----. + PSCR, , , , , , , , , , , , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + , , LCBR , LBRC , LPRN , , , RPRN , RBRC , RCBR , , , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + F1 , F2 ,LA(F3),LG(F4),LC(F5), F6 , F7 ,RS(F8),RG(F9),RA(F10),F11 ,F12 , + //|----+----+------+------+------+----+----. ,----+----+------+------+-------+----+----| + , , HOME , PGDN , PGUP ,END , , ,LEFT, DOWN , UP , RGHT , , , + //|----+----+------+------+------+----+----| |----+----+------+------+-------+----+----| + , , , , , , NO , MAC ,TMB7, , , , , + //`----+----+------+------+------+----+----/ \----+----+------+------+-------+----+----' ), [_RAISE] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , ,SLSH,ASTR, , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F1 , F2 , F3 , F4 , F5 ,LCBR, RCBR, 7 , 8 , 9 ,MINS, , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F6 , F7 , F8 , F9 ,F10 ,LPRN, RPRN, 4 , 5 , 6 ,PLUS, , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - F11 ,F12 ,PSCR,SLCK,PAUS,LBRC,LOCK, ,RBRC, 1 , 2 , 3 , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - HOME,PGDN,PGUP,END ,TMB9, , , , , 0 ,HOME,PGDN,PGUP,END - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - ), - - [_ADJUST] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , ,EXTOFF, , ,EXTON, , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,RST ,DBUG,RTOG,WIN , , ,MAC ,QWER,EDJP, , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + //,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----. + PSCR, , , , , , , , , , , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + , ,EXLM , AT ,HASH ,DLR , PERC,CIRC ,AMPR ,ASTR , , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + , 1 ,LA(2),LG(3),LC(4), 5 , 6 ,RS(7),RG(8),RA(9), 0 , , + //|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----| + , ,HOME ,PGDN ,PGUP ,END , , ,LEFT,DOWN , UP ,RGHT , , , + //|----+----+-----+-----+-----+----+----| |----+----+-----+-----+-----+----+----| + , , , , , ,WIN , NO , , , , , , + //`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----' ) }; diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_xrows.h b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_xrows.h index 6a0e581024fb..d9561d0b707f 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/keymap_xrows.h +++ b/keyboards/helix/rev2/keymaps/edvorakjp/keymap_xrows.h @@ -2,27 +2,20 @@ #define KEYMAP_XROWS_H #include "edvorakjp.h" - -enum custom_keycodes { - KC_LOCK = NEW_SAFE_RANGE, -}; +/* + * enum custom_keycodes { + * KC_LOCK = NEW_SAFE_RANGE, + * }; + */ #define KC_ KC_TRNS -#define KC_TMB1 LGUI_T(KC_TAB) -#define KC_TMB2 LSFT_T(KC_SPC) -#define KC_TMB3 LOWER // act as LOWER when hold, as KC_LANG2(=English) when tapped -#define KC_TMB4 LCTL_T(KC_ESC) -#define KC_TMB5 RSFT_T(KC_DEL) -#define KC_TMB6 RAISE // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped -#define KC_TMB7 RCTL_T(KC_BSPC) -#define KC_TMB8 RALT_T(KC_ENT) -#define KC_TMB9 LGUI(KC_TAB) - -#define KC_RST RESET -#define KC_DBUG DEBUG -#define KC_RTOG RGB_TOG -#define KC_EDJP EDVORAK -#define KC_QWER QWERTY +#define KC_TMB1 KC_LA(TAB) +#define KC_TMB2 KC_LS(SPC) +#define KC_TMB3 TD(TD_LOWER) // act as LOWER when hold, as KC_LANG2(=English) when tapped +#define KC_TMB4 TD(TD_RAISE) // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped +#define KC_TMB5 KC_RC(BSPC) +#define KC_TMB6 KC_RG(ENT) +#define KC_TMB7 KC_RC(DEL) #endif diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c index 227e2c56f82f..b931b72b7ccb 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c @@ -34,13 +34,7 @@ void render_status(struct CharacterMatrix *matrix) { matrix_write_P(matrix, PSTR("\nLayer: ")); switch (biton32(layer_state)) { case L_BASE: - matrix_write_P(matrix, - default_layer_state == 1UL<<_EDVORAK ? PSTR("EDVORAK") : PSTR("QWERTY") - ); - break; - case _EDVORAKJ1: - case _EDVORAKJ2: - matrix_write_P(matrix, PSTR("JP_EXT")); + matrix_write_P(matrix, PSTR("Default")); break; case _RAISE: matrix_write_P(matrix, PSTR("Raise")); @@ -48,17 +42,13 @@ void render_status(struct CharacterMatrix *matrix) { case _LOWER: matrix_write_P(matrix, PSTR("Lower")); break; - case _ADJUST: - matrix_write_P(matrix, PSTR("Adjust")); - break; default: matrix_write(matrix, buf); } // Host Keyboard LED Status char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s %s", - get_enable_jp_extra_layer() && get_japanese_mode() ? "EXT" : " ", + snprintf(led, sizeof(led), "\n%s %s %s", (host_keyboard_leds() & (1<. */ -#include "hid_liber.h" - -// Helpful defines -#define _______ KC_TRNS +#include QMK_KEYBOARD_H // 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. diff --git a/keyboards/hifumi/config.h b/keyboards/hifumi/config.h new file mode 100644 index 000000000000..dccb0352df70 --- /dev/null +++ b/keyboards/hifumi/config.h @@ -0,0 +1,56 @@ +/* +Copyright 2019 zk-phi + +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 . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER riconken +#define PRODUCT hifumi +#define DESCRIPTION A macropad with 6 keys + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6 } +#define MATRIX_COL_PINS { F4, F5, F6 } +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLED_NUM 6 +#define RGBLIGHT_LIMIT_VAL 255 +#define RGBLIGHT_HUE_STEP 5 +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/hifumi/hifumi.h b/keyboards/hifumi/hifumi.h new file mode 100644 index 000000000000..389ce206e0ad --- /dev/null +++ b/keyboards/hifumi/hifumi.h @@ -0,0 +1,31 @@ +/* Copyright 2019 zk-phi + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11, k12 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 } \ +} diff --git a/keyboards/hifumi/info.json b/keyboards/hifumi/info.json new file mode 100644 index 000000000000..2466838a0485 --- /dev/null +++ b/keyboards/hifumi/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "hifumi", + "url": "https://github.com/zk-phi/1x2x3-keyboard", + "maintainer": "riconken", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT": { + "layout": [{"label":"F5", "x":0, "y":0}, {"label":"Up", "x":1, "y":0}, {"label":"PrSc", "x":2, "y":0}, {"label":"Left", "x":0, "y":1}, {"label":"Down", "x":1, "y":1}, {"label":"Right", "x":2, "y":1}] + } + } +} diff --git a/keyboards/hifumi/keymaps/default/keymap.c b/keyboards/hifumi/keymaps/default/keymap.c new file mode 100644 index 000000000000..9a4330398fc2 --- /dev/null +++ b/keyboards/hifumi/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2019 zk-phi + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +enum layers { + DEFAULT, + RAISE, + LOWER, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT] = LAYOUT( + LT(RAISE, KC_F5), KC_UP, LT(LOWER, KC_PSCR), + KC_LEFT, KC_DOWN, KC_RIGHT + ), + [RAISE] = LAYOUT( + _______, KC_PGUP, MO(ADJUST), + KC_HOME, KC_PGDN, KC_END + ), + [LOWER] = LAYOUT( + MO(ADJUST), _______, _______, + _______, _______, _______ + ), + [ADJUST] = LAYOUT( + _______, RGB_TOG, _______, + RGB_MODE_SNAKE, RGB_MODE_PLAIN, RGB_HUI + ) +}; diff --git a/keyboards/handwired/woodpad/keymaps/drashna/config.h b/keyboards/hifumi/keymaps/test/keymap.c similarity index 52% rename from keyboards/handwired/woodpad/keymaps/drashna/config.h rename to keyboards/hifumi/keymaps/test/keymap.c index c4f28034c875..7aec009ebf71 100644 --- a/keyboards/handwired/woodpad/keymaps/drashna/config.h +++ b/keyboards/hifumi/keymaps/test/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 zk-phi * * 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 @@ -13,33 +13,20 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H - -#if (defined(TAP_DANCE_ENABLE) && !defined(TAPPING_TERM)) -#define TAPPING_TERM 200 -#endif // TAP_DANCE_ENABLE - - -#define B5_AUDIO - +#include QMK_KEYBOARD_H #ifdef RGBLIGHT_ENABLE -#define RGB_DI_PIN D3 -#define RGBLED_NUM 14 // Number of LEDs -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_HUE_STEP 12 -#define RGBLIGHT_SAT_STEP 12 -#define RGBLIGHT_VAL_STEP 12 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4 -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 -#define RGBLIGHT_SLEEP -#endif // RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif -#define FORCE_NKRO +enum layers { + DEFAULT +}; -#endif +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DEFAULT] = LAYOUT( + KC_1, KC_2, KC_3, + KC_A, KC_B, KC_C + ) +}; diff --git a/keyboards/hifumi/readme.md b/keyboards/hifumi/readme.md new file mode 100644 index 000000000000..2911c124443d --- /dev/null +++ b/keyboards/hifumi/readme.md @@ -0,0 +1,13 @@ +# hifumi + +A macro pad with 6 keys. + +Keyboard Maintainer: riconken, [zk-phi](https://github.com/zk-phi) +Hardware Supported: hifumi PCB, Pro Micro +Hardware Availability: [PCB & Case Data](https://github.com/zk-phi/1x2x3-keyboard) + +Make example for this keyboard (after setting up your build environment): + + make hifumi: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). diff --git a/keyboards/hifumi/rules.mk b/keyboards/hifumi/rules.mk new file mode 100644 index 000000000000..98560f058032 --- /dev/null +++ b/keyboards/hifumi/rules.mk @@ -0,0 +1,62 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/keyboards/h87a/config.h b/keyboards/hineybush/h87a/config.h similarity index 96% rename from keyboards/h87a/config.h rename to keyboards/hineybush/h87a/config.h index a7a94a0bc9c0..2e6c37e33fd7 100644 --- a/keyboards/h87a/config.h +++ b/keyboards/hineybush/h87a/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, D2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 @@ -72,4 +72,5 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_SLEEP // RGB will turn off when PC is put to sleep #endif diff --git a/keyboards/h87a/h87a.c b/keyboards/hineybush/h87a/h87a.c similarity index 100% rename from keyboards/h87a/h87a.c rename to keyboards/hineybush/h87a/h87a.c diff --git a/keyboards/hineybush/h87a/h87a.h b/keyboards/hineybush/h87a/h87a.h new file mode 100644 index 000000000000..437199b23ed7 --- /dev/null +++ b/keyboards/hineybush/h87a/h87a.h @@ -0,0 +1,90 @@ +/* Copyright 2018 Josh Hinnebusch + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_all(\ + K000, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K036, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K066, K076, \ + K080, K090, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K096, K088, \ + K100, K110, K101, K113, K105, K115, K106, K116, K117, K108, K118 \ +) { \ + { K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \ + { KC_NO, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, K065, K066, KC_NO, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \ + { K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \ + { K090, K091, K092, K093, K094, K095, K096, KC_NO, KC_NO }, \ + { K100, K101, KC_NO, KC_NO, KC_NO, K105, K106, KC_NO, K108 }, \ + { K110, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \ +} + + +#define LAYOUT_tkl_ansi(\ + K000, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K076, \ + K080, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K088, \ + K100, K110, K101, K113, K105, K115, K106, K116, K117, K108, K118 \ +) { \ + { K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \ + { KC_NO, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, KC_NO, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, K065, KC_NO, KC_NO, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \ + { K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \ + {KC_NO, K091, K092, K093, K094, K095, KC_NO, KC_NO, KC_NO }, \ + { K100, K101, KC_NO, KC_NO, KC_NO, K105, K106, KC_NO, K108 }, \ + { K110, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \ +} + +#define LAYOUT_tkl_ansi_wkl(\ + K000, K001, K011, K002, K012, K003, K013, K004, K014, K015, K006, K016, K007, K017, K008, K018, \ + K020, K030, K021, K031, K022, K032, K023, K033, K024, K034, K025, K035, K026, K027, K037, K028, K038, \ + K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K057, K048, K058, \ + K060, K070, K061, K071, K062, K072, K063, K073, K064, K074, K065, K075, K076, \ + K080, K081, K091, K082, K092, K083, K093, K084, K094, K085, K095, K086, K088, \ + K100, K101, K113, K115, K116, K117, K108, K118 \ +) { \ + { K000, K001, K002, K003, K004, KC_NO, K006, K007, K008 }, \ + { KC_NO, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, KC_NO, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, KC_NO, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, K065, KC_NO, KC_NO, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, KC_NO, KC_NO }, \ + { K080, K081, K082, K083, K084, K085, K086, KC_NO, K088 }, \ + {KC_NO, K091, K092, K093, K094, K095, KC_NO, KC_NO, KC_NO }, \ + { K100, K101, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, K108 }, \ + {KC_NO, KC_NO, KC_NO, K113, KC_NO, K115, K116, K117, K118 } \ +} + diff --git a/keyboards/hineybush/h87a/info.json b/keyboards/hineybush/h87a/info.json new file mode 100644 index 000000000000..57f68db0b7ae --- /dev/null +++ b/keyboards/hineybush/h87a/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "h87a", + "url": "", + "maintainer": "hineybush", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"x":13, "y":1.5}, {"label":"Bksp", "x":14, "y":1.5}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Bksp", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + }, + "LAYOUT_tkl_ansi_wkl": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":2, "y":0}, {"label":"F2", "x":3, "y":0}, {"label":"F3", "x":4, "y":0}, {"label":"F4", "x":5, "y":0}, {"label":"F5", "x":6.5, "y":0}, {"label":"F6", "x":7.5, "y":0}, {"label":"F7", "x":8.5, "y":0}, {"label":"F8", "x":9.5, "y":0}, {"label":"F9", "x":11, "y":0}, {"label":"F10", "x":12, "y":0}, {"label":"F11", "x":13, "y":0}, {"label":"F12", "x":14, "y":0}, {"label":"PrtSc", "x":15.25, "y":0}, {"label":"Scroll Lock", "x":16.25, "y":0}, {"label":"Pause", "x":17.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Bksp", "x":13, "y":1.5, "w":2}, {"label":"Insert", "x":15.25, "y":1.5}, {"label":"Home", "x":16.25, "y":1.5}, {"label":"PgUp", "x":17.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"|", "x":13.5, "y":2.5, "w":1.5}, {"label":"Delete", "x":15.25, "y":2.5}, {"label":"End", "x":16.25, "y":2.5}, {"label":"PgDn", "x":17.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, {"label":"\u2191", "x":16.25, "y":4.5}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"label":"Alt", "x":11, "y":5.5, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":15.25, "y":5.5}, {"label":"\u2193", "x":16.25, "y":5.5}, {"label":"\u2192", "x":17.25, "y":5.5}] + } + } +} + diff --git a/keyboards/hineybush/h87a/keymaps/default/config.h b/keyboards/hineybush/h87a/keymaps/default/config.h new file mode 100644 index 000000000000..cef67bd48802 --- /dev/null +++ b/keyboards/hineybush/h87a/keymaps/default/config.h @@ -0,0 +1,21 @@ +/* Copyright 2018 Josh Hinnebusch + * + * 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 . + */ + +#pragma once + + +// place overrides here + diff --git a/keyboards/h87a/keymaps/default/keymap.c b/keyboards/hineybush/h87a/keymaps/default/keymap.c similarity index 98% rename from keyboards/h87a/keymaps/default/keymap.c rename to keyboards/hineybush/h87a/keymaps/default/keymap.c index 89178453d58d..6382af1eec06 100644 --- a/keyboards/h87a/keymaps/default/keymap.c +++ b/keyboards/hineybush/h87a/keymaps/default/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_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_NUHS, 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_LSFT, KC_TRNS, KC_UP, + 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_TRNS, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [1] = LAYOUT_all( diff --git a/keyboards/hineybush/h87a/keymaps/default/readme.md b/keyboards/hineybush/h87a/keymaps/default/readme.md new file mode 100644 index 000000000000..da22afc6ad36 --- /dev/null +++ b/keyboards/hineybush/h87a/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for h87a \ No newline at end of file diff --git a/keyboards/h87a/keymaps/gam3cat/config.h b/keyboards/hineybush/h87a/keymaps/gam3cat/config.h similarity index 100% rename from keyboards/h87a/keymaps/gam3cat/config.h rename to keyboards/hineybush/h87a/keymaps/gam3cat/config.h diff --git a/keyboards/h87a/keymaps/gam3cat/keymap.c b/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c similarity index 100% rename from keyboards/h87a/keymaps/gam3cat/keymap.c rename to keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c diff --git a/keyboards/h87a/keymaps/gam3cat/readme.md b/keyboards/hineybush/h87a/keymaps/gam3cat/readme.md similarity index 100% rename from keyboards/h87a/keymaps/gam3cat/readme.md rename to keyboards/hineybush/h87a/keymaps/gam3cat/readme.md diff --git a/keyboards/h87a/keymaps/gam3cat/rules.mk b/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk similarity index 100% rename from keyboards/h87a/keymaps/gam3cat/rules.mk rename to keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk diff --git a/keyboards/hineybush/h87a/keymaps/wkl/config.h b/keyboards/hineybush/h87a/keymaps/wkl/config.h new file mode 100644 index 000000000000..cef67bd48802 --- /dev/null +++ b/keyboards/hineybush/h87a/keymaps/wkl/config.h @@ -0,0 +1,21 @@ +/* Copyright 2018 Josh Hinnebusch + * + * 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 . + */ + +#pragma once + + +// place overrides here + diff --git a/keyboards/hineybush/h87a/keymaps/wkl/keymap.c b/keyboards/hineybush/h87a/keymaps/wkl/keymap.c new file mode 100644 index 000000000000..72b4d4e44da4 --- /dev/null +++ b/keyboards/hineybush/h87a/keymaps/wkl/keymap.c @@ -0,0 +1,73 @@ +/* Copyright 2018 Josh Hinnebusch + + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_tkl_ansi_wkl( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_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_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_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_tkl_ansi_wkl( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC, + 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_VOLU, + 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_MPLY, KC_MNXT, KC_VOLD, + 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 ), + +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_init_ports(void) { + setPinOutput(D5); + setPinOutput(E6); +} + +void led_set_user(uint8_t usb_led) { + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + setPinOutput(D5); + writePinLow(D5); + } else { + setPinInput(D5); + writePinLow(D5); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + setPinOutput(E6); + writePinLow(E6); + } else { + setPinInput(E6); + writePinLow(E6); + } + +} diff --git a/keyboards/hineybush/h87a/keymaps/wkl/readme.md b/keyboards/hineybush/h87a/keymaps/wkl/readme.md new file mode 100644 index 000000000000..da22afc6ad36 --- /dev/null +++ b/keyboards/hineybush/h87a/keymaps/wkl/readme.md @@ -0,0 +1 @@ +# The default keymap for h87a \ No newline at end of file diff --git a/keyboards/h87a/readme.md b/keyboards/hineybush/h87a/readme.md similarity index 67% rename from keyboards/h87a/readme.md rename to keyboards/hineybush/h87a/readme.md index d7185db522c7..90f513c45d1f 100644 --- a/keyboards/h87a/readme.md +++ b/keyboards/hineybush/h87a/readme.md @@ -3,16 +3,16 @@ h87a A QMK-powered replacement PCB for custom TKL keyboards. This PCB has the same size of the b.87 PCB, while using the USB port placement and spacebar stabilizer orientation as the a.87 PCB. -Keyboard Maintainer: hineybush (Josh Hinnebusch) - -Hardware Supported: h87a Rev 1 - -Hardware Availability: Currently prototyped, group buy TBD +Keyboard Maintainer: [hineybush](https://github.com/hineybush) +Hardware Supported: h87a ver. 1.5, ver. 1.6 (normal and thin), h87alps +Hardware Availability: hineybush.com Make example for this keyboard (after setting up your build environment): - make h87a:default + make hineybush/h87a: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). + ## h87a hardware information Controller: Atmega32u4 @@ -35,8 +35,11 @@ The H87a PCB utilizes duplex matrix organization. Backlight Pin: B7 RGB Data Pin: D3 + + +For ver 1.5 in-switch indicators: To connect the Caps Lock LED to the main backlight matrix, jump the middle pad and the left pad on J1. To use the Caps Lock LED as an indicator, jump the middle pad and the right pad on J1. To connect the Scroll Lock LED to the main backlight matrix, jump the middle pad and the right pad on J2. To use the Scroll Lock LED as an indicator, jump the middle pad and the left pad on J2. -Note: The different orientations of J1 and J2 will be fixed with Rev 2. +Note: The different orientations of J1 and J2 was fixed with ver. 1.6. diff --git a/keyboards/h87a/rules.mk b/keyboards/hineybush/h87a/rules.mk similarity index 100% rename from keyboards/h87a/rules.mk rename to keyboards/hineybush/h87a/rules.mk diff --git a/keyboards/hineybush/hineyg80/config.h b/keyboards/hineybush/hineyg80/config.h new file mode 100644 index 000000000000..7e75c62b341a --- /dev/null +++ b/keyboards/hineybush/hineyg80/config.h @@ -0,0 +1,47 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER hineybush +#define PRODUCT hineyG80 +#define DESCRIPTION QMK-powered PCB for Cherry G80/81-1800 Boards + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B2, B3, D0, B1, D2, D1, D5, D3, D6, D4, B4, D7 } +#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, B7, B0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + diff --git a/keyboards/hineybush/hineyg80/hineyg80.c b/keyboards/hineybush/hineyg80/hineyg80.c new file mode 100644 index 000000000000..236c646be759 --- /dev/null +++ b/keyboards/hineybush/hineyg80/hineyg80.c @@ -0,0 +1,63 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#include "hineyg80.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + // Turn numlock on + writePinHigh(C6); + } else { + // Turn numlock off + writePinLow(C6); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + // Turn capslock on + writePinHigh(B6); + } else { + // Turn capslock off + writePinLow(B6); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + // Turn scrolllock on + writePinHigh(B5); + } else { + // Turn scrolllock off + writePinLow(B5); + } + led_set_user(usb_led); +} diff --git a/keyboards/hineybush/hineyg80/hineyg80.h b/keyboards/hineybush/hineyg80/hineyg80.h new file mode 100644 index 000000000000..617c5166a949 --- /dev/null +++ b/keyboards/hineybush/hineyg80/hineyg80.h @@ -0,0 +1,89 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K000,K010,K001,K011,K002,K012,K003,K013,K004,K014,K005,K015,K006, K007,K017,K008,K018, \ + K027,K016,K028,K038, \ + K020,K030,K021,K031,K022,K032,K023,K033,K024,K034,K025,K035,K026,K036,K037,K047,K057,K048,K058, \ + K040,K050,K041,K051,K042,K052,K043,K053,K044,K054,K045,K055,K046,K056, K067,K077,K068,K078, \ + K060,K070,K061,K071,K062,K072,K063,K073,K064,K074,K065,K075,K066,K076, K087,K097,K088,K098, \ + K080,K090,K081,K091,K082,K092,K083,K093,K084,K094,K085,K095,K086,K096, K106,K116,K108,K118, \ + K100,K110,K101, K102, K112,K103,K113,K104,K114, K105,K115,K117,K107 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, K065, K066, K067, K068 }, \ + { K070, K071, K072, K073, K074, K075, K076, K077, K078 }, \ + { K080, K081, K082, K083, K084, K085, K086, K087, K088 }, \ + { K090, K091, K092, K093, K094, K095, K096, K097, K098 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108 }, \ + { K110, KC_NO, K112, K113, K114, K115, K116, K117, K118 } \ +} + +/* 6U spacebar, 1U mods */ +#define LAYOUT_ansi_100u_mods( \ + K000,K010,K001,K011,K002,K012,K003,K013,K004,K014,K005,K015,K006, K007,K017,K008,K018, \ + K027,K016,K028,K038, \ + K020,K030,K021,K031,K022,K032,K023,K033,K024,K034,K025,K035,K026,K036,K047,K057,K048,K058, \ + K040,K050,K041,K051,K042,K052,K043,K053,K044,K054,K045,K055,K046,K056,K067,K077,K068,K078, \ + K060,K070,K061,K071,K062,K072,K063,K073,K064,K074,K065,K075, K076,K087,K097,K088,K098, \ + K080 ,K081,K091,K082,K092,K083,K093,K084,K094,K085,K095,K086,K096,K106,K116,K108,K118, \ + K100,K110,K101, K102, K112,K103,K113,K104,K114,K105,K115,K117,K107 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, KC_NO, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, K065, KC_NO, K067, K068 }, \ + { K070, K071, K072, K073, K074, K075, K076, K077, K078 }, \ + { K080, K081, K082, K083, K084, K085, K086, K087, K088 }, \ + {KC_NO, K091, K092, K093, K094, K095, K096, K097, K098 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108 }, \ + { K110, KC_NO, K112, K113, K114, K115, K116, K117, K118 } \ +} + +/* 7U spacebar, 1.5U mods */ +#define LAYOUT_ansi_150u_mods( \ + K000,K010,K001,K011,K002,K012,K003,K013,K004,K014,K005,K015,K006, K007,K017,K008,K018, \ + K027,K016,K028,K038, \ + K020,K030,K021,K031,K022,K032,K023,K033,K024,K034,K025,K035,K026,K036,K047,K057,K048,K058, \ + K040,K050,K041,K051,K042,K052,K043,K053,K044,K054,K045,K055,K046,K056,K067,K077,K068,K078, \ + K060,K070,K061,K071,K062,K072,K063,K073,K064,K074,K065,K075 ,K076,K087,K097,K088,K098, \ + K080 ,K081,K091,K082,K092,K083,K093,K084,K094,K085,K095,K086,K096,K106,K116,K108,K118, \ + K100, K101, K102, K103, K104,K114,K105,K115,K117,K107 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, KC_NO, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, K065, KC_NO, K067, K068 }, \ + { K070, K071, K072, K073, K074, K075, K076, K077, K078 }, \ + { K080, K081, K082, K083, K084, K085, K086, K087, K088 }, \ + {KC_NO, K091, K092, K093, K094, K095, K096, K097, K098 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K114, K115, K116, K117, K118 } \ +} diff --git a/keyboards/hineybush/hineyg80/info.json b/keyboards/hineybush/hineyg80/info.json new file mode 100644 index 000000000000..07498b9bbdd1 --- /dev/null +++ b/keyboards/hineybush/hineyg80/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "hineyg80", + "url": "", + "maintainer": "hineybush", + "width": 19.5, + "height": 7.25, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Pause", "x":15.5, "y":0}, {"label":"Insert", "x":16.5, "y":0}, {"label":"Home", "x":17.5, "y":0}, {"label":"PgUp", "x":18.5, "y":0}, {"label":"Scroll Lock", "x":15.5, "y":1}, {"label":"Delete", "x":16.5, "y":1}, {"label":"End", "x":17.5, "y":1}, {"label":"PgDn", "x":18.5, "y":1}, {"label":"~", "x":0, "y":2}, {"label":"!", "x":1, "y":2}, {"label":"@", "x":2, "y":2}, {"label":"#", "x":3, "y":2}, {"label":"$", "x":4, "y":2}, {"label":"%", "x":5, "y":2}, {"label":"^", "x":6, "y":2}, {"label":"&", "x":7, "y":2}, {"label":"*", "x":8, "y":2}, {"label":"(", "x":9, "y":2}, {"label":")", "x":10, "y":2}, {"label":"_", "x":11, "y":2}, {"label":"+", "x":12, "y":2}, {"label":"Bksp", "x":13, "y":2}, {"x":14, "y":2}, {"label":"Num Lock", "x":15.5, "y":2}, {"label":"/", "x":16.5, "y":2}, {"label":"*", "x":17.5, "y":2}, {"label":"-", "x":18.5, "y":2}, {"label":"Tab", "x":0, "y":3, "w":1.5}, {"label":"Q", "x":1.5, "y":3}, {"label":"W", "x":2.5, "y":3}, {"label":"E", "x":3.5, "y":3}, {"label":"R", "x":4.5, "y":3}, {"label":"T", "x":5.5, "y":3}, {"label":"Y", "x":6.5, "y":3}, {"label":"U", "x":7.5, "y":3}, {"label":"I", "x":8.5, "y":3}, {"label":"O", "x":9.5, "y":3}, {"label":"P", "x":10.5, "y":3}, {"label":"{", "x":11.5, "y":3}, {"label":"}", "x":12.5, "y":3}, {"label":"|", "x":13.5, "y":3, "w":1.5}, {"label":"7", "x":15.5, "y":3}, {"label":"8", "x":16.5, "y":3}, {"label":"9", "x":17.5, "y":3}, {"label":"+", "x":18.5, "y":3}, {"label":"Caps Lock", "x":0, "y":4, "w":1.75}, {"label":"A", "x":1.75, "y":4}, {"label":"S", "x":2.75, "y":4}, {"label":"D", "x":3.75, "y":4}, {"label":"F", "x":4.75, "y":4}, {"label":"G", "x":5.75, "y":4}, {"label":"H", "x":6.75, "y":4}, {"label":"J", "x":7.75, "y":4}, {"label":"K", "x":8.75, "y":4}, {"label":"L", "x":9.75, "y":4}, {"label":":", "x":10.75, "y":4}, {"label":"\"", "x":11.75, "y":4}, {"x":12.75, "y":4}, {"label":"Enter", "x":13.75, "y":4, "w":1.25}, {"label":"4", "x":15.5, "y":4}, {"label":"5", "x":16.5, "y":4}, {"label":"6", "x":17.5, "y":4}, {"x":18.5, "y":4}, {"label":"Shift", "x":0, "y":5, "w":1.25}, {"x":1.25, "y":5}, {"label":"Z", "x":2.25, "y":5}, {"label":"X", "x":3.25, "y":5}, {"label":"C", "x":4.25, "y":5}, {"label":"V", "x":5.25, "y":5}, {"label":"B", "x":6.25, "y":5}, {"label":"N", "x":7.25, "y":5}, {"label":"M", "x":8.25, "y":5}, {"label":"<", "x":9.25, "y":5}, {"label":">", "x":10.25, "y":5}, {"label":"?", "x":11.25, "y":5}, {"label":"Shift", "x":12.25, "y":5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":5.25}, {"label":"1", "x":15.5, "y":5}, {"label":"2", "x":16.5, "y":5}, {"label":"3", "x":17.5, "y":5}, {"label":"Enter", "x":18.5, "y":5, "h":2}, {"label":"Ctrl", "x":0, "y":6}, {"label":"Win", "x":1, "y":6}, {"label":"Alt", "x":2, "y":6}, {"x":3, "y":6, "w":6}, {"label":"Alt", "x":9, "y":6}, {"label":"Win", "x":10, "y":6}, {"label":"Menu", "x":11, "y":6}, {"label":"Ctrl", "x":12, "y":6}, {"label":"\u2190", "x":13.25, "y":6.25}, {"label":"\u2193", "x":14.25, "y":6.25}, {"label":"\u2192", "x":15.25, "y":6.25}, {"label":"0", "x":16.5, "y":6}, {"label":".", "x":17.5, "y":6}] + }, + "LAYOUT_ansi_100u_mods": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Insert", "x":15.5, "y":0}, {"label":"Home", "x":16.5, "y":0}, {"label":"PgUp", "x":17.5, "y":0}, {"label":"Prt Sc", "x":18.5, "y":0}, {"label":"Delete", "x":15.5, "y":1}, {"label":"End", "x":16.5, "y":1}, {"label":"PgDn", "x":17.5, "y":1}, {"label":"Scroll", "x":18.5, "y":1}, {"label":"~", "x":0, "y":2}, {"label":"!", "x":1, "y":2}, {"label":"@", "x":2, "y":2}, {"label":"#", "x":3, "y":2}, {"label":"$", "x":4, "y":2}, {"label":"%", "x":5, "y":2}, {"label":"^", "x":6, "y":2}, {"label":"&", "x":7, "y":2}, {"label":"*", "x":8, "y":2}, {"label":"(", "x":9, "y":2}, {"label":")", "x":10, "y":2}, {"label":"_", "x":11, "y":2}, {"label":"+", "x":12, "y":2}, {"label":"Backspace", "x":13, "y":2, "w":2}, {"label":"Num Lock", "x":15.5, "y":2}, {"label":"/", "x":16.5, "y":2}, {"label":"*", "x":17.5, "y":2}, {"label":"Pause", "x":18.5, "y":2}, {"label":"Tab", "x":0, "y":3, "w":1.5}, {"label":"Q", "x":1.5, "y":3}, {"label":"W", "x":2.5, "y":3}, {"label":"E", "x":3.5, "y":3}, {"label":"R", "x":4.5, "y":3}, {"label":"T", "x":5.5, "y":3}, {"label":"Y", "x":6.5, "y":3}, {"label":"U", "x":7.5, "y":3}, {"label":"I", "x":8.5, "y":3}, {"label":"O", "x":9.5, "y":3}, {"label":"P", "x":10.5, "y":3}, {"label":"{", "x":11.5, "y":3}, {"label":"}", "x":12.5, "y":3}, {"label":"|", "x":13.5, "y":3, "w":1.5}, {"label":"7", "x":15.5, "y":3}, {"label":"8", "x":16.5, "y":3}, {"label":"9", "x":17.5, "y":3}, {"label":"-", "x":18.5, "y":3}, {"label":"Caps Lock", "x":0, "y":4, "w":1.75}, {"label":"A", "x":1.75, "y":4}, {"label":"S", "x":2.75, "y":4}, {"label":"D", "x":3.75, "y":4}, {"label":"F", "x":4.75, "y":4}, {"label":"G", "x":5.75, "y":4}, {"label":"H", "x":6.75, "y":4}, {"label":"J", "x":7.75, "y":4}, {"label":"K", "x":8.75, "y":4}, {"label":"L", "x":9.75, "y":4}, {"label":":", "x":10.75, "y":4}, {"label":"\"", "x":11.75, "y":4}, {"label":"Enter", "x":12.75, "y":4, "w":2.25}, {"label":"4", "x":15.5, "y":4}, {"label":"5", "x":16.5, "y":4}, {"label":"6", "x":17.5, "y":4}, {"label":"+", "x":18.5, "y":4}, {"label":"Shift", "x":0, "y":5, "w":2.25}, {"label":"Z", "x":2.25, "y":5}, {"label":"X", "x":3.25, "y":5}, {"label":"C", "x":4.25, "y":5}, {"label":"V", "x":5.25, "y":5}, {"label":"B", "x":6.25, "y":5}, {"label":"N", "x":7.25, "y":5}, {"label":"M", "x":8.25, "y":5}, {"label":"<", "x":9.25, "y":5}, {"label":">", "x":10.25, "y":5}, {"label":"?", "x":11.25, "y":5}, {"label":"Shift", "x":12.25, "y":5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":5.25}, {"label":"1", "x":15.5, "y":5}, {"label":"2", "x":16.5, "y":5}, {"label":"3", "x":17.5, "y":5}, {"label":"Enter", "x":18.5, "y":5, "h":2}, {"label":"Ctrl", "x":0, "y":6}, {"label":"Win", "x":1, "y":6}, {"label":"Alt", "x":2, "y":6}, {"x":3, "y":6, "w":6}, {"label":"Alt", "x":9, "y":6}, {"label":"Win", "x":10, "y":6}, {"label":"Menu", "x":11, "y":6}, {"label":"Ctrl", "x":12, "y":6}, {"label":"\u2190", "x":13.25, "y":6.25}, {"label":"\u2193", "x":14.25, "y":6.25}, {"label":"\u2192", "x":15.25, "y":6.25}, {"label":"0", "x":16.5, "y":6}, {"label":".", "x":17.5, "y":6}] + }, + "LAYOUT_ansi_150u_mods": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Insert", "x":15.5, "y":0}, {"label":"Home", "x":16.5, "y":0}, {"label":"PgUp", "x":17.5, "y":0}, {"label":"Prt Sc", "x":18.5, "y":0}, {"label":"Delete", "x":15.5, "y":1}, {"label":"End", "x":16.5, "y":1}, {"label":"PgDn", "x":17.5, "y":1}, {"label":"Scroll", "x":18.5, "y":1}, {"label":"~", "x":0, "y":2}, {"label":"!", "x":1, "y":2}, {"label":"@", "x":2, "y":2}, {"label":"#", "x":3, "y":2}, {"label":"$", "x":4, "y":2}, {"label":"%", "x":5, "y":2}, {"label":"^", "x":6, "y":2}, {"label":"&", "x":7, "y":2}, {"label":"*", "x":8, "y":2}, {"label":"(", "x":9, "y":2}, {"label":")", "x":10, "y":2}, {"label":"_", "x":11, "y":2}, {"label":"+", "x":12, "y":2}, {"label":"Backspace", "x":13, "y":2, "w":2}, {"label":"Num Lock", "x":15.5, "y":2}, {"label":"/", "x":16.5, "y":2}, {"label":"*", "x":17.5, "y":2}, {"label":"Pause", "x":18.5, "y":2}, {"label":"Tab", "x":0, "y":3, "w":1.5}, {"label":"Q", "x":1.5, "y":3}, {"label":"W", "x":2.5, "y":3}, {"label":"E", "x":3.5, "y":3}, {"label":"R", "x":4.5, "y":3}, {"label":"T", "x":5.5, "y":3}, {"label":"Y", "x":6.5, "y":3}, {"label":"U", "x":7.5, "y":3}, {"label":"I", "x":8.5, "y":3}, {"label":"O", "x":9.5, "y":3}, {"label":"P", "x":10.5, "y":3}, {"label":"{", "x":11.5, "y":3}, {"label":"}", "x":12.5, "y":3}, {"label":"|", "x":13.5, "y":3, "w":1.5}, {"label":"7", "x":15.5, "y":3}, {"label":"8", "x":16.5, "y":3}, {"label":"9", "x":17.5, "y":3}, {"label":"-", "x":18.5, "y":3}, {"label":"Caps Lock", "x":0, "y":4, "w":1.75}, {"label":"A", "x":1.75, "y":4}, {"label":"S", "x":2.75, "y":4}, {"label":"D", "x":3.75, "y":4}, {"label":"F", "x":4.75, "y":4}, {"label":"G", "x":5.75, "y":4}, {"label":"H", "x":6.75, "y":4}, {"label":"J", "x":7.75, "y":4}, {"label":"K", "x":8.75, "y":4}, {"label":"L", "x":9.75, "y":4}, {"label":":", "x":10.75, "y":4}, {"label":"\"", "x":11.75, "y":4}, {"label":"Enter", "x":12.75, "y":4, "w":2.25}, {"label":"4", "x":15.5, "y":4}, {"label":"5", "x":16.5, "y":4}, {"label":"6", "x":17.5, "y":4}, {"label":"+", "x":18.5, "y":4}, {"label":"Shift", "x":0, "y":5, "w":2.25}, {"label":"Z", "x":2.25, "y":5}, {"label":"X", "x":3.25, "y":5}, {"label":"C", "x":4.25, "y":5}, {"label":"V", "x":5.25, "y":5}, {"label":"B", "x":6.25, "y":5}, {"label":"N", "x":7.25, "y":5}, {"label":"M", "x":8.25, "y":5}, {"label":"<", "x":9.25, "y":5}, {"label":">", "x":10.25, "y":5}, {"label":"?", "x":11.25, "y":5}, {"label":"Shift", "x":12.25, "y":5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":5.25}, {"label":"1", "x":15.5, "y":5}, {"label":"2", "x":16.5, "y":5}, {"label":"3", "x":17.5, "y":5}, {"label":"Enter", "x":18.5, "y":5, "h":2}, {"label":"Ctrl", "x":0, "y":6, "w":1.5}, {"label":"Alt", "x":1.5, "y":6, "w":1.5}, {"x":3, "y":6, "w":7}, {"label":"Menu", "x":10, "y":6, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":6, "w":1.5}, {"label":"\u2190", "x":13.25, "y":6.25}, {"label":"\u2193", "x":14.25, "y":6.25}, {"label":"\u2192", "x":15.25, "y":6.25}, {"label":"0", "x":16.5, "y":6}, {"label":".", "x":17.5, "y":6}] + } + } +} + diff --git a/keyboards/hineybush/hineyg80/keymaps/default/config.h b/keyboards/hineybush/hineyg80/keymaps/default/config.h new file mode 100644 index 000000000000..16e640d30608 --- /dev/null +++ b/keyboards/hineybush/hineyg80/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/hineybush/hineyg80/keymaps/default/keymap.c b/keyboards/hineybush/hineyg80/keymaps/default/keymap.c new file mode 100644 index 000000000000..13d0c8955788 --- /dev/null +++ b/keyboards/hineybush/hineyg80/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi_100u_mods( /* Base */ + 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_INS, KC_HOME, KC_PGUP, KC_PSCR, + KC_DEL, KC_END, KC_PGDN, KC_SLCK, + 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_NLCK, KC_PSLS, KC_PAST, KC_PAUS, + 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_P7, KC_P8, KC_P9, KC_PMNS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT_ansi_100u_mods( /* Fn */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_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, + 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_DEL, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, + KC_CAPS, 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 + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/hineybush/hineyg80/keymaps/default/readme.md b/keyboards/hineybush/hineyg80/keymaps/default/readme.md new file mode 100644 index 000000000000..3e0d8343c7f9 --- /dev/null +++ b/keyboards/hineybush/hineyg80/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hineyg80 \ No newline at end of file diff --git a/keyboards/hineybush/hineyg80/keymaps/wkl/config.h b/keyboards/hineybush/hineyg80/keymaps/wkl/config.h new file mode 100644 index 000000000000..16e640d30608 --- /dev/null +++ b/keyboards/hineybush/hineyg80/keymaps/wkl/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Josh Hinnebusch + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/hineybush/hineyg80/keymaps/wkl/keymap.c b/keyboards/hineybush/hineyg80/keymaps/wkl/keymap.c new file mode 100644 index 000000000000..a1255e9cc737 --- /dev/null +++ b/keyboards/hineybush/hineyg80/keymaps/wkl/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2019 %YOUR_NAME% + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL, + ______ = KC_TRNS, + XXXXXX = KC_NO +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi_150u_mods( /* Base */ + 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_INS, KC_HOME, KC_PGUP, KC_PSCR, + KC_DEL, KC_END, KC_PGDN, KC_SLCK, + 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_NLCK, KC_PSLS, KC_PAST, KC_PAUS, + 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_P7, KC_P8, KC_P9, KC_PMNS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + [1] = LAYOUT_ansi_150u_mods( /* Fn */______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, + ______, ______, ______, KC_VOLD, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_DEL, ______, ______, ______, ______, + ______, ______, ______, ______, RESET , ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + KC_CAPS, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} \ No newline at end of file diff --git a/keyboards/hineybush/hineyg80/keymaps/wkl/readme.md b/keyboards/hineybush/hineyg80/keymaps/wkl/readme.md new file mode 100644 index 000000000000..3e0d8343c7f9 --- /dev/null +++ b/keyboards/hineybush/hineyg80/keymaps/wkl/readme.md @@ -0,0 +1 @@ +# The default keymap for hineyg80 \ No newline at end of file diff --git a/keyboards/hineybush/hineyg80/readme.md b/keyboards/hineybush/hineyg80/readme.md new file mode 100644 index 000000000000..b305049d6496 --- /dev/null +++ b/keyboards/hineybush/hineyg80/readme.md @@ -0,0 +1,16 @@ +# hineyg80 + + +A small-batch PCB design to be a drop-in replacement for G80-1800 and G81-1800 boards. + +Keyboard Maintainer: [hineybush](https://github.com/hineybush) + +Hardware Supported: hiney g80 rev 2 + +Hardware Availability: https://geekhack.org/index.php?topic=92389.0 + +Make example for this keyboard (after setting up your build environment): + + make hineybush/hineyg80: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). diff --git a/keyboards/hineybush/hineyg80/rules.mk b/keyboards/hineybush/hineyg80/rules.mk new file mode 100644 index 000000000000..383a3594b474 --- /dev/null +++ b/keyboards/hineybush/hineyg80/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/hotdox/config.h b/keyboards/hotdox/config.h new file mode 100644 index 000000000000..ed15f4bb4a49 --- /dev/null +++ b/keyboards/hotdox/config.h @@ -0,0 +1,78 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xE11D + +#define DEVICE_VER 0x0001 +#define MANUFACTURER Z.P.Z.O. +#define PRODUCT HotDox +#define DESCRIPTION QMK keyboard firmware for HotDox + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 14 + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_WHEEL_DELAY 0 + +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* 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 + +/* key combination for command */ +#ifndef IS_COMMAND +#define IS_COMMAND() ( \ + get_mods() == MOD_MASK_CTRL || \ + get_mods() == MOD_MASK_SHIFT \ +) +#endif + +#define BACKLIGHT_PIN B7 +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +#define LED_BRIGHTNESS_LO 15 +#define LED_BRIGHTNESS_HI 255 + +/* fix space cadet rollover issue */ +#define DISABLE_SPACE_CADET_ROLLOVER + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define USB_MAX_POWER_CONSUMPTION 500 + +/* + * 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 +//#define DEBUG_MATRIX_SCAN_RATE + diff --git a/keyboards/hotdox/hotdox.c b/keyboards/hotdox/hotdox.c new file mode 100644 index 000000000000..00af9efb1e59 --- /dev/null +++ b/keyboards/hotdox/hotdox.c @@ -0,0 +1,44 @@ +#include "hotdox.h" +#include "backlight.h" +#include "quantum.h" + +extern inline void ergodox_board_led_on(void); +extern inline void ergodox_right_led_1_on(void); +extern inline void ergodox_right_led_2_on(void); +extern inline void ergodox_right_led_3_on(void); + +extern inline void ergodox_board_led_off(void); +extern inline void ergodox_right_led_1_off(void); +extern inline void ergodox_right_led_2_off(void); +extern inline void ergodox_right_led_3_off(void); + +extern inline void ergodox_led_all_on(void); +extern inline void ergodox_led_all_off(void); + +void ergodox_led_init(void); +void ergodox_blink_all_leds(void); + +void matrix_init_kb(void) { + ergodox_blink_all_leds(); + matrix_init_user(); +} + +void ergodox_blink_all_leds(void) +{ + ergodox_led_all_off(); + ergodox_led_all_set(LED_BRIGHTNESS_HI); + ergodox_right_led_1_on(); + _delay_ms(50); + ergodox_right_led_2_on(); + _delay_ms(50); + ergodox_right_led_3_on(); + _delay_ms(50); + ergodox_right_led_1_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_3_off(); + ergodox_led_all_on(); + _delay_ms(333); + ergodox_led_all_off(); +} diff --git a/keyboards/hotdox/hotdox.h b/keyboards/hotdox/hotdox.h new file mode 100644 index 000000000000..0eef4ea7905c --- /dev/null +++ b/keyboards/hotdox/hotdox.h @@ -0,0 +1,187 @@ +#pragma once + +#include "quantum.h" +#include +#include + +#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) +#define CPU_16MHz 0x00 + +void init_ergodox(void); + +inline void ergodox_board_led_on(void) { DDRB |= (1<event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } +}; diff --git a/keyboards/hotdox/keymaps/eozaki/keymap.c b/keyboards/hotdox/keymaps/eozaki/keymap.c new file mode 100644 index 000000000000..dc80e7a34e0c --- /dev/null +++ b/keyboards/hotdox/keymaps/eozaki/keymap.c @@ -0,0 +1,192 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | ~ | | ' | 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | ~ | | " | Y | U | I | O | P | - | + * |--------+------+------+------+------+------| ` | | |------+------+------+------+------+--------| + * | Ctrl | A | S | D | F | G |------| |------| H | J | K | L | ; | \ | + * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| + * | LAlt | Z | X | C | V | B | [ | | ] | N | M | , | . | / | LShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LT-1 | F4 | F5 | F6 | F11 | | Left | Down | Up | Right| RAlt | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | L1 | Prev | | Vol+ | L2 | + * ,------|------|------| |------+--------+------. + * | | | Play | | Vol- | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | Next | | Mute | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_GRV), + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_GRV, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, + LT(SYMB, KC_F2), KC_F4, KC_F5, KC_F6, KC_F11, + TG(SYMB), KC_MPRV, + KC_MPLY, + KC_SPC,KC_BSPC,KC_MNXT, + // right hand + KC_QUOT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + LSFT(KC_QUOT), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_BSLS, + KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_LSFT, + KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_RALT, + KC_VOLU, TG(MDIA), + KC_VOLD, + KC_MUTE,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | EEP_RST | | | | | | | . | 0 | = | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Animat| | |Toggle|Solid | + * ,------|------|------| |------+------+------. + * |Bright|Bright| | | |Hue- |Hue+ | + * |ness- |ness+ |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + EEP_RST,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + RGB_MOD,KC_TRNS, + KC_TRNS, + RGB_VAD,RGB_VAI,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + RGB_TOG, RGB_SLD, + KC_TRNS, + KC_TRNS, RGB_HUD, RGB_HUI +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + 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_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/hotdox/keymaps/kloki/keymap.c b/keyboards/hotdox/keymaps/kloki/keymap.c new file mode 100644 index 000000000000..f858effd540a --- /dev/null +++ b/keyboards/hotdox/keymaps/kloki/keymap.c @@ -0,0 +1,210 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +#define BASE 0 // default layer +#define QW 1 // qwerty +#define SYMB 2 // symbols +#define NUM 3 // media keys + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | SHIFT| | SYM | 6 | 7 | 8 | 9 | 0 | Bck | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | D | R | W | B | `~ | | "' | J | F | U | P | : | \ | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Ctr/Es | A | S | H | T | G |------| |------| Y | N | E | O | I | Enter | + * |--------+------+------+------+------+------| = + | | -_ |------+------+------+------+------+--------| + * | LShift | Z | X | M | C | V | | | | K | L | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |MEH | Gui |AltShf| Left | Right| | DOWN | UP | [ | ] | ~SYM | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | ESC |Home | | PgUp | QW | + * ,------|------|------| |------+--------+------. + * | | ENT | End | | PgDn | | | + * | Space| WIN |------| |------| Tab |Back | + * | SYM | | SCTR | | SALT | SYM | | + * `--------------------' `----------------------' + */ + +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LSFT, + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_GRV, + CTL_T(KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_EQL, + KC_MEH, KC_LGUI, KC_LALT, KC_LEFT,KC_RGHT, + KC_ESC, KC_HOME, + KC_END, + LT(SYMB, KC_SPC), LGUI_T(KC_ENT), S(KC_LGUI), + // right hand + TG(NUM), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_QUOT, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS, + KC_Y, KC_N, KC_E, KC_O, KC_I , KC_ENT, + KC_MINS, KC_K, KC_L, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_DOWN,KC_UP, KC_LBRC,KC_RBRC, MO(SYMB), + KC_PGUP, TG(QW), + KC_PGDN, + S(KC_LALT),LT(SYMB, KC_TAB), KC_BSPC + ), + +[QW] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, + _______, KC_A, KC_S, KC_D, KC_F, KC_G, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_Y, KC_U, KC_I , KC_O, KC_P, _______, + KC_H, KC_J, KC_K , KC_L, KC_SCLN, _______, + _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +/* Keymap 1: Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | DEL | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | * | | | | < | H | U | PU | * | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| > | L | D | R | + | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | E | D | PD | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox( + // left hand + _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_ASTR,_______, + _______,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + _______,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,_______, + _______,_______,_______,_______,_______, + _______,_______, + _______, + _______,_______,_______, + // right hand + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, KC_LABK, KC_HOME, KC_UP, KC_PGUP, KC_ASTR, _______, + KC_RABK, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PLUS, _______, + _______, KC_AMPR, KC_END, KC_DOWN, KC_PGDN, KC_BSLS, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | L | MsUp | R | | | | | | 4 | 5 | 6 | | TAB | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | 1 | 2 | 3 | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | 0 | 0 | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NUM] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_4, KC_5 , KC_6, _______, KC_TAB, + _______, KC_1, KC_2 , KC_3, _______, _______, + _______, _______, _______, KC_0, KC_0, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 1: + ergodox_board_led_on(); + break; + case 3: + ergodox_board_led_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/hotdox/left.c b/keyboards/hotdox/left.c new file mode 100644 index 000000000000..970d36f1b561 --- /dev/null +++ b/keyboards/hotdox/left.c @@ -0,0 +1,130 @@ +#include "action.h" +#include "left.h" +#include "wait.h" + +bool i2c_initialized = false; + +void left_config(void); +uint8_t left_write(uint8_t reg, uint8_t data); +uint8_t left_read(uint8_t reg, uint8_t *data); + +uint8_t init_mcp23017(void) +{ + i2c_initialized = false; + + if (i2c_initialized == 0) + { + i2c_init(); // on pins D(1,0) + _delay_ms(1000); + } + + return 0; +} +void left_init(void) +{ + init_mcp23017(); + left_scan(); +#if 0 + while (1) + { + print("wait\n"); + wait_us(1000000); + } +#endif +} + +void left_scan(void) +{ + uint8_t ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT); + + if (ret == 0) + { + i2c_stop(); + + if (!i2c_initialized) + { + i2c_initialized = true; + left_config(); + clear_keyboard(); + print("mcp23017 attached!!!\n"); + } + } + else + { + if (i2c_initialized) + { + i2c_initialized = false; + clear_keyboard(); + print("mcp23017 deattached!!!\n"); + } + } + + return; +} + +uint8_t left_read_cols(void) +{ + uint8_t data = 0; + + left_read(MCP23017_B0_GPIOA, &data); + + return data; +} + +void left_unselect_rows(void) +{ + left_write(MCP23017_B0_IODIRB, 0x3F); +} + +void left_select_row(uint8_t row) +{ + left_write(MCP23017_B0_IODIRB, ~(1 << row)); +} + +void left_config(void) +{ + left_write(MCP23017_B0_IODIRA, 0x7F); + left_write(MCP23017_B0_IPOLA, 0x7F); + left_write(MCP23017_B0_GPPUA, 0x7F); + + left_write(MCP23017_B0_IODIRB, 0xFF); + left_write(MCP23017_B0_GPIOB, 0xC0); +} + +uint8_t left_write(uint8_t reg, uint8_t data) +{ + if (!i2c_initialized) + { + return 0; + } + + uint8_t ret; + + ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT); if (ret) goto out; + ret = i2c_write(reg, HOTDOX_I2C_TIMEOUT); if (ret) goto out; + ret = i2c_write(data, HOTDOX_I2C_TIMEOUT); + +out: + i2c_stop(); + return ret; +} + +uint8_t left_read(uint8_t reg, uint8_t *data) +{ + if (!i2c_initialized) + { + return 0; + } + + uint8_t ret = 0; + + ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT); if (ret) goto out; + ret = i2c_write(reg, HOTDOX_I2C_TIMEOUT); if (ret) goto out; + ret = i2c_start(I2C_ADDR_READ, HOTDOX_I2C_TIMEOUT); if (ret) goto out; + + *data = i2c_read_nack(HOTDOX_I2C_TIMEOUT); + +out: + i2c_stop(); + return ret; +} diff --git a/keyboards/hotdox/left.h b/keyboards/hotdox/left.h new file mode 100644 index 000000000000..3d8b5a6ead8c --- /dev/null +++ b/keyboards/hotdox/left.h @@ -0,0 +1,57 @@ +#pragma once + +#include "quantum.h" +#include +#include "i2c_master.h" +#include + +#define MCP23017 +#define MCP23017_A0 0 +#define MCP23017_A1 0 +#define MCP23017_A2 0 + +#define I2C_ADDR (0x20) +#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE) +#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ) + + +#define MCP23017_B0_IODIRA 0x00 +#define MCP23017_B0_IODIRB 0x01 +#define MCP23017_B0_IPOLA 0x02 +#define MCP23017_B0_IPOLB 0x03 +#define MCP23017_B0_GPINTENA 0x04 +#define MCP23017_B0_GPINTENB 0x05 +#define MCP23017_B0_DEFVALA 0x06 +#define MCP23017_B0_DEFVALB 0x07 +#define MCP23017_B0_INTCONA 0x08 +#define MCP23017_B0_INTCONB 0x09 +#define MCP23017_B0_IOCONA 0x0A +#define MCP23017_B0_IOCONB 0x0B +#define MCP23017_B0_GPPUA 0x0C +#define MCP23017_B0_GPPUB 0x0D +#define MCP23017_B0_INTFA 0x0E +#define MCP23017_B0_INTFB 0x0F +#define MCP23017_B0_INTCAPA 0x10 +#define MCP23017_B0_INTCAPB 0x11 +#define MCP23017_B0_GPIOA 0x12 +#define MCP23017_B0_GPIOB 0x13 +#define MCP23017_B0_OLATA 0x14 +#define MCP23017_B0_OLATB 0x15 + +#define HOTDOX_I2C_TIMEOUT 100 + +typedef int16_t i2c_status_t; + +void left_init(void); +void left_scan(void); + +uint8_t left_read_cols(void); +uint8_t left_get_col(uint8_t col); + +matrix_row_t left_read_row(void); + +void left_unselect_rows(void); +void left_select_row(uint8_t row); + +uint8_t init_mcp23017(void); + diff --git a/keyboards/hotdox/matrix.c b/keyboards/hotdox/matrix.c new file mode 100644 index 000000000000..9d3a98db21af --- /dev/null +++ b/keyboards/hotdox/matrix.c @@ -0,0 +1,283 @@ +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "hotdox.h" +#include "left.h" +#ifdef DEBUG_MATRIX_SCAN_RATE +#include "timer.h" +#endif + +/* + * This constant define not debouncing time in msecs, but amount of matrix + * scan loops which should be made to get stable debounced results. + * + * On Ergodox matrix scan rate is relatively low, because of slow I2C. + * Now it's only 317 scans/second, or about 3.15 msec/scan. + * According to Cherry specs, debouncing time is 5 msec. + * + * And so, there is no sense to have DEBOUNCE higher than 2. + */ + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + +// Debouncing: store for each key the number of scans until it's eligible to +// change. When scanning the matrix, ignore any changes in keys that have +// already changed in the last DEBOUNCE scans. +static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS]; + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +#ifdef DEBUG_MATRIX_SCAN_RATE +uint32_t matrix_timer; +uint32_t matrix_scan_count; +#endif + + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + // disable JTAG + MCUCR = (1<1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); + matrix_print(); + + matrix_timer = timer_now; + matrix_scan_count = 0; + } +#endif + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + select_row(i); + wait_us(30); // without this wait read unstable value. + matrix_row_t mask = debounce_mask(i); + matrix_row_t cols = (read_cols(i) & mask) | (matrix[i] & ~mask); + debounce_report(cols ^ matrix[i], i); + matrix[i] = cols; + + unselect_rows(); + } + + matrix_scan_quantum(); + + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<. #define QMK_ESC_OUTPUT B5 // usually COL #define QMK_ESC_INPUT B2 // usually ROW -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ @@ -120,7 +120,6 @@ along with this program. If not, see . #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended -#define RGB_MATRIX_SKIP_FRAMES 0 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 215 #define DRIVER_ADDR_1 0b1110100 @@ -135,4 +134,4 @@ along with this program. If not, see . #define DRIVER_2_LED_TOTAL 32 #endif -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/hs60/v1/v1.c b/keyboards/hs60/v1/v1.c index 882611030b62..5267c94576e1 100644 --- a/keyboards/hs60/v1/v1.c +++ b/keyboards/hs60/v1/v1.c @@ -165,83 +165,37 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {1, C9_16, C7_15, C6_15} //D16 }; -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { -// -// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1, -// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, A15, -// D4, D5, D6, D7, D8, C16, C15, B5, B6, B7, B8, A16, ---, A14, -// D3, ---, D1, D9, D10, D11, D12, B4, B3, B2, B1, B9, ---, B10, -// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11 -/* {row | col << 4} - * | {x=0..224, y=0..64} - * | | modifier - * | | | */ - {{0|(13<<4)}, {224, 0}, 1}, //A1-A16 - {{0|(12<<4)}, {204, 0}, 0}, - {{0|(11<<4)}, {187, 0}, 0}, - {{0|(10<<4)}, {170, 0}, 0}, - {{0|(9<<4)}, {153, 0}, 0}, - {{0|(8<<4)}, {136, 0}, 0}, - {{0|(7<<4)}, {119, 0}, 0}, - {{1|(7<<4)}, {119, 16}, 0}, - {{1|(8<<4)}, {136, 16}, 0}, - {{1|(9<<4)}, {153, 16}, 0}, - {{1|(10<<4)}, {170, 16}, 0}, - {{1|(11<<4)}, {187, 16}, 0}, - {{1|(12<<4)}, {204, 16}, 0}, - {{2|(13<<4)}, {224, 32}, 1}, - {{2|(12<<4)}, {224, 16}, 0}, - {{2|(11<<4)}, {197, 32}, 0}, - - {{3|(10<<4)}, {170, 48}, 0}, //B1-B14 - {{3|(9<<4)}, {153, 48}, 0}, - {{3|(8<<4)}, {136, 48}, 0}, - {{3|(7<<4)}, {119, 48}, 0}, - {{2|(7<<4)}, {119, 32}, 0}, - {{2|(8<<4)}, {136, 32}, 0}, - {{2|(9<<4)}, {153, 32}, 0}, - {{2|(10<<4)}, {170, 32}, 0}, - {{3|(11<<4)}, {187, 48}, 0}, - {{3|(13<<4)}, {214, 48}, 1}, - {{4|(13<<4)}, {224, 64}, 1}, - {{4|(12<<4)}, {204, 64}, 1}, - {{4|(11<<4)}, {187, 64}, 1}, - {{4|(10<<4)}, {170, 64}, 1}, - - {{0|(6<<4)}, {102, 0}, 0}, //C1-C16 - {{0|(5<<4)}, { 85, 0}, 0}, - {{0|(4<<4)}, { 68, 0}, 0}, - {{0|(3<<4)}, { 51, 0}, 0}, - {{0|(2<<4)}, { 34, 0}, 0}, - {{0|(1<<4)}, { 17, 0}, 0}, - {{0|(0<<4)}, { 0, 0}, 1}, - {{1|(0<<4)}, { 0, 16}, 1}, - {{1|(1<<4)}, { 17, 16}, 0}, - {{1|(2<<4)}, { 34, 16}, 0}, - {{1|(3<<4)}, { 51, 16}, 0}, - {{1|(4<<4)}, { 68, 16}, 0}, - {{1|(5<<4)}, { 85, 16}, 0}, - {{1|(6<<4)}, {102, 16}, 0}, - {{2|(6<<4)}, {102, 32}, 0}, - {{2|(5<<4)}, { 85, 32}, 0}, - - {{3|(2<<4)}, { 32, 48}, 0}, //D1-D16 - //D2 - {{3|(0<<4)}, { 10, 48}, 1}, - {{2|(0<<4)}, { 0, 32}, 1}, - {{2|(1<<4)}, { 17, 32}, 0}, - {{2|(2<<4)}, { 34, 32}, 0}, - {{2|(3<<4)}, { 51, 32}, 0}, - {{2|(4<<4)}, { 68, 32}, 0}, - {{3|(3<<4)}, { 51, 48}, 0}, - {{3|(4<<4)}, { 68, 48}, 0}, - {{3|(5<<4)}, { 85, 48}, 0}, - {{3|(6<<4)}, {102, 48}, 0}, - {{4|(3<<4)}, {102, 64}, 0}, - {{4|(2<<4)}, { 34, 68}, 1}, - {{4|(1<<4)}, { 17, 68}, 1}, - {{4|(0<<4)}, { 0, 68}, 1} -}; +led_config_t g_led_config = { { + { 36, 35, 34, 33, 32, 31, 30, 6, 5, 4, 3, 2, 1, 0 }, + { 37, 38, 39, 40, 41, 42, 43, 7, 8, 9, 10, 11, 12, NO_LED }, + { 48, 49, 50, 51, 52, 45, 44, 20, 21, 22, 23, 15, 14, 13 }, + { 47, NO_LED, 46, 53, 54, 55, 56, 19, 18, 17, 16, 24, NO_LED, 25 }, + { 60, 59, 58, 57, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 29, 28, 27, 26 } +}, { + //A1-A16 + { 224, 0 }, { 204, 0 }, { 187, 0 }, { 170, 0 }, { 153, 0 }, { 136, 0 }, { 119, 0 }, { 119, 16 }, { 136, 16 }, { 153, 16 }, { 170, 16 }, { 187, 16 }, { 204, 16 }, { 224, 32 }, + { 224, 16 }, { 197, 32 }, + //B1-B14 + { 170, 48 }, { 153, 48 }, { 136, 48 }, { 119, 48 }, { 119, 32 }, { 136, 32 }, { 153, 32 }, { 170, 32 }, { 187, 48 }, { 214, 48 }, { 224, 64 }, { 204, 64 }, { 187, 64 }, { 170, 64 }, + //C1-C16 + { 102, 0 }, { 85, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, { 0, 16 }, { 17, 16 }, { 34, 16 }, { 51, 16 }, { 68, 16 }, { 85, 16 }, { 102, 16 }, + { 102, 32 }, { 85, 32 }, + //D1-D16 + { 32, 48 }, { 10, 48 }, { 0, 32 }, { 17, 32 }, { 34, 32 }, { 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 }, { 85, 48 }, { 102, 48 }, { 102, 64 }, { 34, 68 }, { 17, 68 }, + { 0, 68 } +}, { + //A1-A16 + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 4, 4, + //B1-B14 + 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, + //C1-C16 + 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, + 4, 4, + //D1-D16 + 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1 +} }; #else @@ -319,83 +273,37 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {1, C9_16, C7_15, C6_15} //D16 }; -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { -// -// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1, -// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, ---, -// D4, D5, D6, D7, D8, C16, C15, B5, B6, B7, B8, A16, A15, A14, -// D3, D2, D1, D9, D10, D11, D12, B4, B3, B2, B1, B9, ---, B10, -// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11 -/* {row | col << 4} - * | {x=0..224, y=0..64} - * | | modifier - * | | | */ - {{0|(13<<4)}, {224, 0}, 1}, //A1-A16 - {{0|(12<<4)}, {204, 0}, 0}, - {{0|(11<<4)}, {187, 0}, 0}, - {{0|(10<<4)}, {170, 0}, 0}, - {{0|(9<<4)}, {153, 0}, 0}, - {{0|(8<<4)}, {136, 0}, 0}, - {{0|(7<<4)}, {119, 0}, 0}, - {{1|(7<<4)}, {119, 16}, 0}, - {{1|(8<<4)}, {136, 16}, 0}, - {{1|(9<<4)}, {153, 16}, 0}, - {{1|(10<<4)}, {170, 16}, 0}, - {{1|(11<<4)}, {187, 16}, 0}, - {{1|(12<<4)}, {204, 16}, 0}, - {{2|(13<<4)}, {224, 8}, 1}, - {{2|(12<<4)}, {204, 32}, 0}, - {{2|(11<<4)}, {187, 32}, 0}, - - {{3|(10<<4)}, {170, 48}, 0}, //B1-B14 - {{3|(9<<4)}, {153, 48}, 0}, - {{3|(8<<4)}, {136, 48}, 0}, - {{3|(7<<4)}, {119, 48}, 0}, - {{2|(7<<4)}, {119, 32}, 0}, - {{2|(8<<4)}, {136, 32}, 0}, - {{2|(9<<4)}, {153, 32}, 0}, - {{2|(10<<4)}, {170, 32}, 0}, - {{3|(11<<4)}, {187, 48}, 0}, - {{3|(13<<4)}, {214, 48}, 1}, - {{4|(13<<4)}, {224, 64}, 1}, - {{4|(12<<4)}, {204, 64}, 1}, - {{4|(11<<4)}, {187, 64}, 1}, - {{4|(10<<4)}, {170, 64}, 1}, - - {{0|(6<<4)}, {102, 0}, 0}, //C1-C16 - {{0|(5<<4)}, { 85, 0}, 0}, - {{0|(4<<4)}, { 68, 0}, 0}, - {{0|(3<<4)}, { 51, 0}, 0}, - {{0|(2<<4)}, { 34, 0}, 0}, - {{0|(1<<4)}, { 17, 0}, 0}, - {{0|(0<<4)}, { 0, 0}, 1}, - {{1|(0<<4)}, { 0, 16}, 1}, - {{1|(1<<4)}, { 17, 16}, 0}, - {{1|(2<<4)}, { 34, 16}, 0}, - {{1|(3<<4)}, { 51, 16}, 0}, - {{1|(4<<4)}, { 68, 16}, 0}, - {{1|(5<<4)}, { 85, 16}, 0}, - {{1|(6<<4)}, {102, 16}, 0}, - {{2|(6<<4)}, {102, 32}, 0}, - {{2|(5<<4)}, { 85, 32}, 0}, - - {{3|(2<<4)}, { 32, 48}, 0}, //D1-D16 - {{3|(1<<4)}, { 17, 48}, 0}, - {{3|(0<<4)}, { 0, 48}, 1}, - {{2|(0<<4)}, { 0, 32}, 1}, - {{2|(1<<4)}, { 17, 32}, 0}, - {{2|(2<<4)}, { 34, 32}, 0}, - {{2|(3<<4)}, { 51, 32}, 0}, - {{2|(4<<4)}, { 68, 32}, 0}, - {{3|(3<<4)}, { 51, 48}, 0}, - {{3|(4<<4)}, { 68, 48}, 0}, - {{3|(5<<4)}, { 85, 48}, 0}, - {{3|(6<<4)}, {102, 48}, 0}, - {{4|(3<<4)}, {102, 64}, 0}, - {{4|(2<<4)}, { 34, 68}, 1}, - {{4|(1<<4)}, { 17, 68}, 1}, - {{4|(0<<4)}, { 0, 68}, 1} -}; +led_config_t g_led_config = { { + { 36, 35, 34, 33, 32, 31, 30, 6, 5, 4, 3, 2, 1, 0 }, + { 37, 38, 39, 40, 41, 42, 43, 7, 8, 9, 10, 11, 12, NO_LED }, + { 49, 50, 51, 52, 53, 45, 44, 20, 21, 22, 23, 15, 14, 13 }, + { 48, 47, 46, 54, 55, 56, 57, 19, 18, 17, 16, 24, NO_LED, 25 }, + { 61, 60, 59, 58, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 29, 28, 27, 26 } +}, { + //A1-A16 + { 224, 0 }, { 204, 0 }, { 187, 0 }, { 170, 0 }, { 153, 0 }, { 136, 0 }, { 119, 0 }, { 119, 16 }, { 136, 16 }, { 153, 16 }, { 170, 16 }, { 187, 16 }, { 204, 16 }, { 224, 8 }, + { 204, 32 }, { 187, 32 }, + //B1-B14 + { 170, 48 }, { 153, 48 }, { 136, 48 }, { 119, 48 }, { 119, 32 }, { 136, 32 }, { 153, 32 }, { 170, 32 }, { 187, 48 }, { 214, 48 }, { 224, 64 }, { 204, 64 }, { 187, 64 }, { 170, 64 }, + //C1-C16 + { 102, 0 }, { 85, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, { 0, 16 }, { 17, 16 }, { 34, 16 }, { 51, 16 }, { 68, 16 }, { 85, 16 }, { 102, 16 }, + { 102, 32 }, { 85, 32 }, + //D1-D16 + { 32, 48 }, { 17, 48 }, { 0, 48 }, { 0, 32 }, { 17, 32 }, { 34, 32 }, { 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 }, { 85, 48 }, { 102, 48 }, { 102, 64 }, { 34, 68 }, + { 17, 68 }, { 0, 68 } +}, { + //A1-A16 + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 4, 4, + //B1-B14 + 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, + //C1-C16 + 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, + 4, 4, + //D1-D16 + 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1 +} }; #endif @@ -492,4 +400,4 @@ void suspend_power_down_kb(void) void suspend_wakeup_init_kb(void) { rgb_matrix_set_suspend_state(false); -} \ No newline at end of file +} diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index 6f5e0012c3e3..05255d133104 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -35,7 +35,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3 } // To enable debugger set A13 A14 -> A5 A6 -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ @@ -102,9 +102,19 @@ along with this program. If not, see . // disable backlight after timeout in minutes, 0 = no timeout #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + // the default effect (RGB test) #define RGB_BACKLIGHT_EFFECT 255 +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + #define DRIVER_COUNT 2 #define DRIVER_LED_TOTAL 64 @@ -119,6 +129,11 @@ along with this program. If not, see . #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + // TODO: refactor with new user EEPROM code (coming soon) #define EEPROM_MAGIC 0x451F #define EEPROM_MAGIC_ADDR 32 @@ -130,10 +145,10 @@ along with this program. If not, see . // Backlight config starts after EEPROM version #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 -// Dynamic keymap starts after backlight config (35+31) -#define DYNAMIC_KEYMAP_EEPROM_ADDR 66 +// Dynamic keymap starts after backlight config (35+32) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 67 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 -// Dynamic macro starts after dynamic keymaps (66+(4*5*14*2)) = (66+560) -#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 626 +// Dynamic macro starts after dynamic keymaps (67+(4*5*14*2)) = (67+560) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 627 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/hs60/v2/info.json b/keyboards/hs60/v2/info.json index abafb69f99e7..c42e9e9418f4 100644 --- a/keyboards/hs60/v2/info.json +++ b/keyboards/hs60/v2/info.json @@ -1,6 +1,6 @@ { - "keyboard_name": "clueboard/60", - "maintainer": "skullydazed", + "keyboard_name": "HS60v2", + "maintainer": "yiancar", "url": "", "width": 15, "height": 5, diff --git a/keyboards/hs60/v2/keymaps/ansi/readme.md b/keyboards/hs60/v2/keymaps/ansi/readme.md index 650871a5e689..3afd8afb33d6 100644 --- a/keyboards/hs60/v2/keymaps/ansi/readme.md +++ b/keyboards/hs60/v2/keymaps/ansi/readme.md @@ -1,6 +1,6 @@ -The default keymap for ANSI HS60 V2 -=================================== +The default keymap for ANSI HS60 V2. VIA support disabled. +========================================================== ![Layout image](https://i.imgur.com/m8t5CfE.png) -Default layer is normal ANSI and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file +Default layer is normal ANSI and Fn layer is used for RGB functions, Volume control and arrow cluster. \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/ansi_via/config.h b/keyboards/hs60/v2/keymaps/ansi_via/config.h new file mode 100644 index 000000000000..96adaf56884e --- /dev/null +++ b/keyboards/hs60/v2/keymaps/ansi_via/config.h @@ -0,0 +1,23 @@ +/* +Copyright 2018 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +/* Include overwrites for specific keymap */ + +#define HS60_ANSI +#undef PRODUCT_ID +#define PRODUCT_ID 0x4854 diff --git a/keyboards/hs60/v2/keymaps/ansi_via/keymap.c b/keyboards/hs60/v2/keymaps/ansi_via/keymap.c new file mode 100644 index 000000000000..ba649470b41d --- /dev/null +++ b/keyboards/hs60/v2/keymaps/ansi_via/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +//This is the ANSI version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_ansi( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,\ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_ansi( /* FN */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_60_ansi( /* Empty for dynamic keymaps */ + 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), + +[3] = LAYOUT_60_ansi( /* Empty for dynamic keymaps */ + 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), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/ansi_via/readme.md b/keyboards/hs60/v2/keymaps/ansi_via/readme.md new file mode 100644 index 000000000000..a462da6619ed --- /dev/null +++ b/keyboards/hs60/v2/keymaps/ansi_via/readme.md @@ -0,0 +1,6 @@ +The default keymap for ANSI HS60 V2. VIA support enabled. +========================================================= + +![Layout image](https://i.imgur.com/m8t5CfE.png) + +Default layer is normal ANSI and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/ansi_via/rules.mk b/keyboards/hs60/v2/keymaps/ansi_via/rules.mk new file mode 100644 index 000000000000..deb4fc889b9c --- /dev/null +++ b/keyboards/hs60/v2/keymaps/ansi_via/rules.mk @@ -0,0 +1,67 @@ +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes diff --git a/keyboards/hs60/v2/keymaps/default/readme.md b/keyboards/hs60/v2/keymaps/default/readme.md index f0b29900e6bf..9aa0a3a2b5a2 100644 --- a/keyboards/hs60/v2/keymaps/default/readme.md +++ b/keyboards/hs60/v2/keymaps/default/readme.md @@ -1,5 +1,5 @@ -The default keymap for ISO HS60 V2 -================================== +The default keymap for ISO HS60 V2. VIA support disabled. +========================================================= ![Layout image](https://imgur.com/6go4vQV.png) diff --git a/keyboards/hs60/v2/keymaps/default_via/keymap.c b/keyboards/hs60/v2/keymaps/default_via/keymap.c new file mode 100644 index 000000000000..c1e575769fea --- /dev/null +++ b/keyboards/hs60/v2/keymaps/default_via/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +//This is the ISO version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_iso( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_iso( /* FN */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_60_iso( /* Empty for dynamic keymaps */ + 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), + +[3] = LAYOUT_60_iso( /* Empty for dynamic keymaps */ + 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), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/default_via/readme.md b/keyboards/hs60/v2/keymaps/default_via/readme.md new file mode 100644 index 000000000000..2a440f708c1f --- /dev/null +++ b/keyboards/hs60/v2/keymaps/default_via/readme.md @@ -0,0 +1,6 @@ +The default keymap for ISO HS60 V2. VIA support enabled. +======================================================== + +![Layout image](https://imgur.com/6go4vQV.png) + +Default layer is normal ISO and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/default_via/rules.mk b/keyboards/hs60/v2/keymaps/default_via/rules.mk new file mode 100644 index 000000000000..deb4fc889b9c --- /dev/null +++ b/keyboards/hs60/v2/keymaps/default_via/rules.mk @@ -0,0 +1,67 @@ +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes diff --git a/keyboards/hs60/v2/keymaps/goatmaster/config.h b/keyboards/hs60/v2/keymaps/goatmaster/config.h new file mode 100644 index 000000000000..f63c9035567d --- /dev/null +++ b/keyboards/hs60/v2/keymaps/goatmaster/config.h @@ -0,0 +1,37 @@ +/* +Copyright 2018 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +/* Include overwrites for specific keymap */ + +#define HS60_HHKB +#undef PRODUCT_ID +#define PRODUCT_ID 0x4855 + +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 + +#undef RGB_BACKLIGHT_CAPS_LOCK_INDICATOR +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 255 }, .index = 3-1 } //red diff --git a/keyboards/hs60/v2/keymaps/goatmaster/keymap.c b/keyboards/hs60/v2/keymaps/goatmaster/keymap.c new file mode 100644 index 000000000000..6273dbc646e4 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/goatmaster/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +//This is the HHKB version of the PCB + +enum macro_keys { + KC_EML = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_hhkb( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,\ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), + +[1] = LAYOUT_60_hhkb( /* FN */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,\ + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_UP, KC_TRNS, KC_DEL, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + +[2] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */ + 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 ), + +[3] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */ + 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 ), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_EML: //use "KC_EML" as keycode in layers above to call macro + if (!record->event.pressed) { + send_string_with_delay_P(PSTR("example@email.com"), 10); //change email value here + } + break; + } + return true; +} diff --git a/keyboards/hs60/v2/keymaps/goatmaster/readme.md b/keyboards/hs60/v2/keymaps/goatmaster/readme.md new file mode 100644 index 000000000000..ea9803cc0bbb --- /dev/null +++ b/keyboards/hs60/v2/keymaps/goatmaster/readme.md @@ -0,0 +1,6 @@ +The default keymap for HHKB HS60 V2. VIA support enabled. +========================================================= + +![Layout image](https://imgur.com/usbrQWL.png) + +Default layer is normal HHKB with 7U space. Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/goatmaster/rules.mk b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk new file mode 100644 index 000000000000..deb4fc889b9c --- /dev/null +++ b/keyboards/hs60/v2/keymaps/goatmaster/rules.mk @@ -0,0 +1,67 @@ +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes diff --git a/keyboards/hs60/v2/keymaps/hhkb/readme.md b/keyboards/hs60/v2/keymaps/hhkb/readme.md index 69b812c60724..5259a584d201 100644 --- a/keyboards/hs60/v2/keymaps/hhkb/readme.md +++ b/keyboards/hs60/v2/keymaps/hhkb/readme.md @@ -1,5 +1,5 @@ -The default keymap for HHKB HS60 V2 -=================================== +The default keymap for HHKB HS60 V2. VIA support disabled. +========================================================== ![Layout image](https://imgur.com/usbrQWL.png) diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/config.h b/keyboards/hs60/v2/keymaps/hhkb_via/config.h new file mode 100644 index 000000000000..fc1b6d8f47bb --- /dev/null +++ b/keyboards/hs60/v2/keymaps/hhkb_via/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2018 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +/* Include overwrites for specific keymap */ + +#define HS60_HHKB +#undef PRODUCT_ID +#define PRODUCT_ID 0x4855 + +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/keymap.c b/keyboards/hs60/v2/keymaps/hhkb_via/keymap.c new file mode 100644 index 000000000000..9641eedb4929 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/hhkb_via/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +//This is the HHKB version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_hhkb( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,\ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), + +[1] = LAYOUT_60_hhkb( /* FN */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,\ + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_UP, KC_TRNS, KC_DEL, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + +[2] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */ + 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 ), + +[3] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */ + 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 ), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/readme.md b/keyboards/hs60/v2/keymaps/hhkb_via/readme.md new file mode 100644 index 000000000000..ea9803cc0bbb --- /dev/null +++ b/keyboards/hs60/v2/keymaps/hhkb_via/readme.md @@ -0,0 +1,6 @@ +The default keymap for HHKB HS60 V2. VIA support enabled. +========================================================= + +![Layout image](https://imgur.com/usbrQWL.png) + +Default layer is normal HHKB with 7U space. Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk b/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk new file mode 100644 index 000000000000..deb4fc889b9c --- /dev/null +++ b/keyboards/hs60/v2/keymaps/hhkb_via/rules.mk @@ -0,0 +1,67 @@ +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes diff --git a/keyboards/hs60/v2/keymaps/iso_andys8/keymap.c b/keyboards/hs60/v2/keymaps/iso_andys8/keymap.c new file mode 100644 index 000000000000..12272ee79805 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/iso_andys8/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// This is the ISO version of the PCB. With modifications by andys8 and an additional function layer. + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_60_iso( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_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, \ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(2) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_iso( /* FN */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_NO, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PSCR, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_DEL, KC_NO, KC_NO, \ + KC_LSFT, KC_NO, KC_APP, KC_PAUS, KC_INS, KC_NO, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_RSFT,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + +[2] = LAYOUT_60_iso( /* Light (Default FN) */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_60_iso( /* Empty for dynamic keymaps */ + 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), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/iso_andys8/readme.md b/keyboards/hs60/v2/keymaps/iso_andys8/readme.md new file mode 100644 index 000000000000..1b843feb92e6 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/iso_andys8/readme.md @@ -0,0 +1,4 @@ +The andys8 keymap for ISO HS60 V2 +================================== + +Default iso layout with minor modifications and additional function layer. \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk b/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk new file mode 100644 index 000000000000..deb4fc889b9c --- /dev/null +++ b/keyboards/hs60/v2/keymaps/iso_andys8/rules.mk @@ -0,0 +1,67 @@ +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes diff --git a/keyboards/hs60/v2/keymaps/stanrc85/config.h b/keyboards/hs60/v2/keymaps/stanrc85/config.h new file mode 100644 index 000000000000..5aab3098c7df --- /dev/null +++ b/keyboards/hs60/v2/keymaps/stanrc85/config.h @@ -0,0 +1,41 @@ +#pragma once + +// Include overwrites for specific keymap +#define HS60_ANSI +#undef PRODUCT_ID +#define PRODUCT_ID 0x4854 + +// disable backlight after timeout in minutes, 0 = no timeout +#undef RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 10 + +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 + +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 //Setting \ key to "MOD" instead of "ALPHA" for lighting +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 + +#undef RGB_BACKLIGHT_CAPS_LOCK_INDICATOR +#undef RGB_BACKLIGHT_LAYER_1_INDICATOR +#undef RGB_BACKLIGHT_LAYER_2_INDICATOR +#undef RGB_BACKLIGHT_LAYER_3_INDICATOR + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 200, .s = 255 }, .index = 3-1 } //purple +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 100, .s = 255 }, .index = 60-1 } //green +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 150, .s = 255 }, .index = 60-1 } //blue +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 60-1 } //white + +#undef RGB_BACKLIGHT_BRIGHTNESS +#define RGB_BACKLIGHT_BRIGHTNESS 175 + +#undef RGB_BACKLIGHT_COLOR_1 +#undef RGB_BACKLIGHT_COLOR_2 + +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 150, .s = 255 } diff --git a/keyboards/hs60/v2/keymaps/stanrc85/keymap.c b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c new file mode 100644 index 000000000000..2e6a70483991 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/stanrc85/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2018 Stanrc85 + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "stanrc85.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_60_ansi( + TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(_FN2_60), TD_TCTL), + + [_DEFAULT] = LAYOUT_60_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1_60), MO(_FN2_60), KC_RCTL), + + [_FN1_60] = LAYOUT_60_ansi( + KC_TILD, 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, + _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2_60] = LAYOUT_60_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, + _______, EF_INC, ES_INC, S1_INC, H1_INC, S2_INC, H2_INC, BR_INC, _______, _______, _______, _______, _______, RESET, + _______, EF_DEC, ES_DEC, S1_DEC, H1_DEC, S2_DEC, H2_DEC, BR_DEC, _______, _______, _______, _______, KC_MAKE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, TG(_DEFAULT)) +}; + +// Backlight specific keys: +// EF_INC, EF_DEC, // next/previous backlight effect +// H1_INC, H1_DEC, // Color 1 hue increase/decrease +// S1_INC, S1_DEC, // Color 1 saturation increase/decrease +// H2_INC, H2_DEC, // Color 2 hue increase/decrease +// S2_INC, S2_DEC, // Color 2 saturation increase/decrease +// BR_INC, BR_DEC, // backlight brightness increase/decrease + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/hs60/v2/keymaps/stanrc85/readme.md b/keyboards/hs60/v2/keymaps/stanrc85/readme.md new file mode 100644 index 000000000000..430d363f3762 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/stanrc85/readme.md @@ -0,0 +1,48 @@ + + +# Stanrc85's Standard ANSI 60% Layout + +## Keymap Notes +- Layer 0 is default QWERTY layout with additional custom features: + - SpaceFN to function layer 2 on `Space` + - `CTRL` when held and `ESC` when tapped on `CAPS LOCK` + - Tap Dance on `Fn1` for `CTRL+ALT+DEL` and `WIN+L` + - Tap Dance on `ESC` for `ESC` and ` ` ` + +![Base QWERTY Layer](https://imgur.com/lGcyLJx.png) + +- Layer 1 is default QWERTY with no custom features used mostly for gaming + - Enabled by `Fn2+CAPS` from base layer + +![Default ANSI Layer](https://imgur.com/M7T9PNT.png) + +- Layer 2 is Function layer: + - F keys + - Arrows + - Volume and Media controls + - AutoHotkey shortcuts based on [Speaker Control](https://github.com/stanrc85/Speaker-Control) script + - AHK Mic is used to mute/unmute microphone + - AHK Speaker switches audio output between headphones and speakers + +![Function Layer](https://imgur.com/YPl0JrU.png) + +- Layer 3 is Backlight control and RESET + - `Fn2+CAPS` used to toggle Default QWERTY layer on and off + +![RGB and RESET Layer](https://imgur.com/mMHoJPa.png) + +### Build +To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85`. diff --git a/keyboards/hs60/v2/keymaps/stanrc85/rules.mk b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk new file mode 100644 index 000000000000..8d9939169183 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/stanrc85/rules.mk @@ -0,0 +1,67 @@ +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/keymap.c b/keyboards/hs60/v2/keymaps/win_osx_dual/keymap.c new file mode 100644 index 000000000000..31d7ec1ed8e1 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/win_osx_dual/keymap.c @@ -0,0 +1,97 @@ +/* Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + + +#define _QWERTY 0 +#define _OSX 1 +#define _RAISE 2 +#define _SHIFTER 3 +#define _ADJUST 16 + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + OSX, + RAISE, + SHIFTER, +}; + +#define RAISE MO(_RAISE) + +#define OSX_SHIFT LM(_SHIFTER, MOD_LSFT) +#define OSX_ALT LM(_SHIFTER, MOD_LALT) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QWERTY] = LAYOUT_60_iso( /* Windows ISO layout */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_CAPS, 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_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, RAISE , KC_RCTL), + +[_OSX] = LAYOUT_60_iso( /* OSX ISO layout */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ + KC_CAPS, 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_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, A(KC_3), KC_ENT, \ + OSX_SHIFT, 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_LCTL, OSX_ALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, RAISE , KC_RCTL), + +[_RAISE] = LAYOUT_60_iso( /* Configuration */ + RESET, 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, QWERTY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, OSX, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, EF_INC, H1_INC, S1_INC, H2_INC, S2_INC, BR_INC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_UP, EF_DEC, H1_DEC, S2_DEC, H2_DEC, S2_DEC, BR_DEC, ES_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[_SHIFTER] = LAYOUT_60_iso( /* Shift Mods makes a keyboard with windows key layout work on OSX*/ + KC_TRNS, S(KC_1), S(KC_QUOT),S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), S(KC_EQL), KC_DEL,\ + KC_TRNS, S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P), S(KC_LBRC), S(KC_RBRC), \ + KC_TRNS, S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), S(KC_H), S(KC_J), S(KC_K), S(KC_L), S(KC_SCLN), S(KC_2), S(KC_NUBS), KC_TRNS, \ + KC_TRNS, S(KC_NUHS), S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), S(KC_N), S(KC_M), S(KC_COMM), S(KC_DOT), S(KC_SLSH), KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + + +}; + +void matrix_init_user(void) { + //user initialization +} + + +void matrix_scan_user(void) { + //user matrix +} + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case OSX: + if (record->event.pressed) { + set_single_persistent_default_layer(_OSX); + } + return false; + + } + return true; +} diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/readme.md b/keyboards/hs60/v2/keymaps/win_osx_dual/readme.md new file mode 100644 index 000000000000..c2e58bf6868d --- /dev/null +++ b/keyboards/hs60/v2/keymaps/win_osx_dual/readme.md @@ -0,0 +1,6 @@ +The default keymap for ISO HS60 V2 +================================== + +![Layout image](https://i.imgur.com/NEtFQcV.png) + +Default layer is normal ISO for windows. Second layout is Windows ISO layout but for OSX, but with the keys corrected so you will get the correct shifted and alt'd keys on OSX (keyboard keys match OSX keys without having to change your keyboard type in system preferences). Layer three is configuration and other functions, and layer four is where the shifting magic happens. Also tab and caps lock have been swapped around. diff --git a/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk new file mode 100644 index 000000000000..05193af4bbc5 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/win_osx_dual/rules.mk @@ -0,0 +1,67 @@ +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes diff --git a/keyboards/hs60/v2/readme.md b/keyboards/hs60/v2/readme.md index e6658ced9a30..e838426a2d97 100644 --- a/keyboards/hs60/v2/readme.md +++ b/keyboards/hs60/v2/readme.md @@ -11,8 +11,27 @@ Hardware Availability: http://groupbuys.mechboards.co.uk/shop/hs60-hotswap-60-pc Due to the RGB implementation, the HS60 is currently not compatible with community layouts. +## Instructions + +### Build + Make example for this keyboard (after setting up your build environment): make hs60/v2: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. \ No newline at end of file +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. + +### Reset + +- Unplug +- Hold Escape +- Plug In +- Unplug +- Release Escape + +### Flash + +- Unplug +- Hold Escape +- Plug In +- Flash using QMK Toolbox or dfu-util (`make hs60/v2::dfu-util`) diff --git a/keyboards/hs60/v2/rules.mk b/keyboards/hs60/v2/rules.mk index a2850a83057d..64948c2e9a71 100644 --- a/keyboards/hs60/v2/rules.mk +++ b/keyboards/hs60/v2/rules.mk @@ -45,6 +45,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Options to pass to dfu-util when flashing DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 # Build Options # comment out to disable the options. @@ -61,6 +62,6 @@ AUDIO_ENABLE = no # Audio output on port C6 NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in #SERIAL_LINK_ENABLE = yes -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes +RAW_ENABLE = no +DYNAMIC_KEYMAP_ENABLE = no CIE1931_CURVE = yes diff --git a/keyboards/idobo/config.h b/keyboards/idobo/config.h index 70b6a48063b5..122180780eb8 100644 --- a/keyboards/idobo/config.h +++ b/keyboards/idobo/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F6, F5, F4, F1, E6, D5, D3, D2, D1, D0, D4, D6, D7, B4, B5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json b/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json new file mode 100644 index 000000000000..95122075bdc3 --- /dev/null +++ b/keyboards/idobo/keymaps/greenshadowmaker/keyboard-layout-editor-gsm-idobo.json @@ -0,0 +1,190 @@ +[ + { + "name": "gsm-idobo", + "notes": "Massdrop xd75\n\nFront Legend = \"Adust\" layer (both lower and Raise)" + }, + [ + { + "a": 3 + }, + "Esc\n\n\n\nreset", + { + "t": "#0000ff\n#ff0000", + "a": 4 + }, + "\nF1\n\n\n\n\n\n\n\n1 !", + "\nF2\n\n\n\n\n\n\n\n2 @", + "\nF3\n\n\n\n\n\n\n\n3 #", + "\nF4\n\n\n\n\n\n\n\n4 $", + "\nF5\n\n\n\n\n\n\n\n5 %", + { + "t": "#000000", + "a": 7 + }, + "= +", + "", + "- _", + { + "t": "#0000ff\n#ff0000", + "a": 0 + }, + "\nF6\n\n\nrgbplain\n\n\n\n\n6 ^", + "\nF7\n\n\nrgbtest\n\n\n\n\n7 &", + "\nF8\n\n\nrgbmode\n\n\n\n\n8 *", + { + "a": 4 + }, + "\nF9\n\n\n\n\n\n\n\n9 (", + "\nF10\n\n\n\n\n\n\n\n0 )", + { + "t": "#000000", + "a": 7 + }, + "Bksp" + ], + [ + "Tab", + "Q", + { + "t": "#0000ff\n#ff0000", + "a": 4 + }, + "PgUp\nUP\n\n\n\n\n\n\n\nW", + { + "t": "#000000", + "a": 7 + }, + "E", + { + "a": 3 + }, + "R\n\n\n\nrgb_tog", + "T\n\n\n\nbl_tog", + { + "a": 7 + }, + "", + "", + "[ {", + "T", + "Y", + "I", + "O", + "P", + "]" + ], + [ + { + "c": "#0000ff", + "t": "#ffffff" + }, + "Raise", + { + "c": "#cccccc", + "t": "#0000ff\n#ff0000", + "a": 4 + }, + "Home\nLEFT\n\n\n\n\n\n\n\nA", + { + "a": 0 + }, + "PgDwn\nDOWN\n\n\nrgb_hai\n\n\n\n\nS", + "End\nRIGHT\n\n\nrgb_sai\n\n\n\n\nD", + { + "t": "#000000", + "a": 3 + }, + "F\n\n\n\nrgb_vai", + "G\n\n\n\nbl_inc", + { + "a": 7 + }, + "", + "UP", + "", + "H", + "J", + "K", + "L", + "; :", + "' \"" + ], + [ + { + "a": 3 + }, + "Shift\n\n\n\neep_rst", + { + "a": 7 + }, + "Z", + { + "a": 3 + }, + "X\n\n\n\nrgb_hud", + "C\n\n\n\nrgb_sad", + "V\n\n\n\nrgb_vad", + "B\n\n\n\nbl_dec", + { + "a": 7 + }, + "LEFT", + "DOWN", + "RIGHT", + "N", + "M", + ", <", + ". >", + "/ ?", + { + "a": 6 + }, + "Shift" + ], + [ + { + "a": 7 + }, + "` ~", + "\\ |", + "Alt", + "Ctrl", + { + "c": "#ff0000" + }, + "Lower", + { + "c": "#eb7c15" + }, + "Space", + { + "c": "#cccccc", + "t": "#0000ff\n#ff0000", + "a": 4 + }, + "\nApp\n\n\n\n\n\n\n\nOS", + { + "t": "#000000", + "a": 7 + }, + "Del", + "Enter", + { + "c": "#eb7c15" + }, + "Space", + { + "c": "#0000ff", + "t": "#ffffff" + }, + "Raise", + { + "c": "#cccccc", + "t": "#000000" + }, + "", + "", + "", + "PrtScr" + ] +] \ No newline at end of file diff --git a/keyboards/idobo/keymaps/greenshadowmaker/keymap.c b/keyboards/idobo/keymaps/greenshadowmaker/keymap.c new file mode 100644 index 000000000000..e96459da54fd --- /dev/null +++ b/keyboards/idobo/keymaps/greenshadowmaker/keymap.c @@ -0,0 +1,152 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | | | [ | Y | U | I | O | P | ] | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | RAISE | A | S | D | F | G | | UP | | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | LEFT | DOWN | RIGHT | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | ` | \ | LALT | LCTRL | LOWER | SPACE | LGUI | DEL | ENTER | SPACE | RAISE | | | | PrtScr | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x15( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, XXXXXXX, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, \ + RAISE, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, KC_UP, XXXXXXX, 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_LEFT, KC_DOWN, KC_RGHT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_GRAVE, KC_GRAVE, KC_LALT, KC_LCTL, LOWER, KC_SPC, KC_LGUI, KC_DEL, KC_ENT, KC_SPC, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR \ +), + + +/* LOWER + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | UP | | | | | | | | | | PR SCR | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RAISE | LEFT | DOWN | RIGHT | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | LOWER | | APP | | | | RAISE | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x15( \ + XXXXXXX, KC_F1, KC_F2, KC_F3, XXXXXXX, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RAISE, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, KC_APP, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +), + + /* RAISE + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | pgup | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RAISE | home | pgdn | end | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | LOWER | | | | | | RAISE | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x15( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RAISE, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +), + + + /* ADJUST + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | RESET | | | | | | | | |rgbplain|rgbtest | rgbmode| | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | |rgb tog | bl_tog | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RAISE | | rgb hi | rgb sai|rgb vai | bl inc | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | EEP Rst| | rgb hd | rgb sad|rgb vad | bl dec | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | LOWER | | | | | | RAISE | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x15( \ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_M_P, RGB_M_T, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, BL_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + RAISE, XXXXXXX, RGB_HUI, RGB_SAI, RGB_VAI, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + EEP_RST, XXXXXXX, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RAISE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +), + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/idobo/keymaps/greenshadowmaker/readme.md b/keyboards/idobo/keymaps/greenshadowmaker/readme.md new file mode 100644 index 000000000000..bdd28d4ffe35 --- /dev/null +++ b/keyboards/idobo/keymaps/greenshadowmaker/readme.md @@ -0,0 +1,3 @@ +# GreenShadowMaker keymap for idobo + +Note: keyboard-layout-editor-gsm-idobo.json shoudl be the matching layout for http://www.keyboard-layout-editor.com diff --git a/keyboards/idobo/keymaps/greenshadowmaker/rules.mk b/keyboards/idobo/keymaps/greenshadowmaker/rules.mk new file mode 100644 index 000000000000..f6587a835e35 --- /dev/null +++ b/keyboards/idobo/keymaps/greenshadowmaker/rules.mk @@ -0,0 +1,3 @@ +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +COMMAND_ENABLE = no # Commands for debug and configuration +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/infinity60/rules.mk b/keyboards/infinity60/rules.mk index 8cb2b3755951..1f02e05c84cd 100644 --- a/keyboards/infinity60/rules.mk +++ b/keyboards/infinity60/rules.mk @@ -58,6 +58,7 @@ OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 # DFU_ARGS = -d 1c11:b007 +DFU_SUFFIX_ARGS = -p b007 -v 1c11 BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) diff --git a/keyboards/iris/keymaps/davidrambo/readme.md b/keyboards/iris/keymaps/davidrambo/readme.md deleted file mode 100644 index 4d21f37c0914..000000000000 --- a/keyboards/iris/keymaps/davidrambo/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Colemak layout for Iris rev2.1 with Mac and Windows layers and a Gaming Layer. -# Symbol layer is based on my Planck layout, so it provides numbers, symbols, and volume controls. -# Two Navigation layers, for Mac and Windows Colemak layers respectively. \ No newline at end of file diff --git a/keyboards/iris/keymaps/edvorakjp/keymap.c b/keyboards/iris/keymaps/edvorakjp/keymap.c deleted file mode 100644 index f5d305f7f49d..000000000000 --- a/keyboards/iris/keymaps/edvorakjp/keymap.c +++ /dev/null @@ -1,166 +0,0 @@ -#include QMK_KEYBOARD_H -#include "edvorakjp.h" - -enum custom_keycodes { - KC_LOCK = NEW_SAFE_RANGE, -}; - -#define KC_ KC_TRNS - -#define KC_TMB1 LGUI_T(KC_TAB) -#define KC_TMB2 LSFT_T(KC_SPC) -#define KC_TMB3 LOWER // act as LOWER when hold, as KC_LANG2(=English) when tapped -#define KC_TMB4 LCTL_T(KC_ESC) -#define KC_TMB5 RSFT_T(KC_DEL) -#define KC_TMB6 RAISE // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped -#define KC_TMB7 RCTL_T(KC_BSPC) -#define KC_TMB8 RALT_T(KC_ENT) -#define KC_TMB9 LGUI(KC_TAB) - -#define KC_RST RESET -#define KC_DBUG DEBUG -#define KC_RTOG RGB_TOG -#define KC_EDJP EDVORAK -#define KC_QWER QWERTY - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_EDVORAK] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LBRC,RBRC,COMM,DOT , Y , P , F , G , R , W , Q ,BSLS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - EQL , A , O , E , I , U , D , T , N , S , M ,MINS, - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - QUOT,SCLN, X , C , V , Z ,TMB4, TMB5, B , H , J , K , L ,SLSH, - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - TMB1,TMB2,TMB3, TMB6,TMB7,TMB8 - // `----+----+----' `----+----+----' - ), - - [_EDVORAKJ1] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , , , Y , , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - , , , , , - // `----+----+----' `----+----+----' - ), - - [_EDVORAKJ2] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , AI , OU , EI , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , , Y , , , , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - , , , , , - // `----+----+----' `----+----+----' - ), - - [_QWERTY] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - EQL , Q , W , E , R , T , Y , U , I , O , P ,MINS, - //|----+----+----+----+----+----| |----+----+----+----+----+----| - LBRC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - RBRC, Z , X , C , V , B , , , N , M ,COMM,DOT ,SLSH,BSLS, - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - , , , , , - // `----+----+----' `----+----+----' - ), - - [_LOWER] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , ,SLSH,ASTR, , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , ,BTN4,WH_U,BTN5, , , 7 , 8 , 9 ,MINS, , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , ,WH_L,WH_D,WH_R, , , 4 , 5 , 6 ,PLUS, , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , ,BTN1,BTN3,BTN2, , , , , 1 , 2 , 3 , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - , , , , 0 , - // `----+----+----' `----+----+----' - ), - - [_RAISE] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F1 , F2 , F3 , F4 , F5 ,LCBR, RCBR, , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - F6 , F7 , F8 , F9 ,F10 ,LPRN, RPRN,HOME,PGDN,PGUP,END , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - F11 ,F12 ,PSCR,SLCK,PAUS,LBRC,LOCK, ,RBRC,LEFT,DOWN, UP ,RGHT, , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - TMB9, , , , , - // `----+----+----' `----+----+----' - ), - - [_ADJUST] = LAYOUT_kc( - //,----+----+----+----+----+----. ,----+----+----+----+----+----. - , , , , , , , , , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , ,EXTOFF, , ,EXTON, , , , , - //|----+----+----+----+----+----| |----+----+----+----+----+----| - ,RST ,DBUG,RTOG,WIN , , ,MAC ,QWER,EDJP, , , - //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , , , , , , , , , , - //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' - , , , , , - // `----+----+----' `----+----+----' - ) -}; - -void matrix_init_keymap() { -} - -bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case KC_LOCK: - if (record->event.pressed) { - if (get_enable_kc_lang()) { - SEND_STRING( SS_LCTRL(SS_LSFT(SS_TAP(X_POWER))) ); - } else { - SEND_STRING( SS_LGUI("l") ); - } - } - return false; - } - return true; -} - -uint32_t layer_state_set_keymap(uint32_t state) { - switch (biton32(state)) { - case _EDVORAKJ1: - case _EDVORAKJ2: - // _EDVORAKJ1 & J2 are same colored - rgblight_setrgb (0xFF, 0xFF, 0xFF); - break; - case _LOWER: - rgblight_setrgb (0xFF, 0x00, 0x00); - break; - case _RAISE: - rgblight_setrgb (0x00, 0x00, 0xFF); - break; - case _ADJUST: - rgblight_setrgb (0x00, 0xFF, 0x00); - break; - default: // for any other layers, or the default layer - rgblight_mode(28); - break; - } - return state; -} diff --git a/keyboards/iris/keymaps/edvorakjp/rules.mk b/keyboards/iris/keymaps/edvorakjp/rules.mk deleted file mode 100644 index 58d244c38954..000000000000 --- a/keyboards/iris/keymaps/edvorakjp/rules.mk +++ /dev/null @@ -1,16 +0,0 @@ -# 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 -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # 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 -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/iris/keymaps/rs/readme.md b/keyboards/iris/keymaps/rs/readme.md deleted file mode 100644 index bdf44121e4b5..000000000000 --- a/keyboards/iris/keymaps/rs/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -# Code friendly 60% keymap - -I developped this keymap to make a better use of 60% ortho keyboards I use like the preonic of the iris. Instead of trying to mimic the Planck layout like the default preonic keymap, this keymap removes the raise and lower layers and offers a simpler hyper layer concept for a few missing sign keys and cursors / media keys. - -The important part for coders is that most important signs needed to code are available at their usual position on a full keyboard, without complex layer gymnastic. Access to [] and {} are available on the hyper layer at their usual emplacement. - -The right thumb is used for both backspace and hyper layer switching. On the hyper layer, in addition to some coding signs, you get the cursor keys arranged in cross, just under your right fingers, so you don't have to move your hand when navigating in code or command line. Other hand gets the home/end page up/down in a similar layout. - -Because you sometime have to use your internal keyboard when you use a macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the hyper layer / backspace on right command key etc. - -This keymap is also available for other keyboards: -- [ortho_5x12/rs](../../../../layouts/community/ortho_5x12/rs/keymap.c) -- [ErgoTravel/rs](../../../ergotravel/keymaps/rs/keymap.c) diff --git a/keyboards/jc65/v32u4/keymaps/dead_encryption/keymap.c b/keyboards/jc65/v32u4/keymaps/dead_encryption/keymap.c index 61386395a82e..528bde8852a1 100644 --- a/keyboards/jc65/v32u4/keymaps/dead_encryption/keymap.c +++ b/keyboards/jc65/v32u4/keymaps/dead_encryption/keymap.c @@ -15,7 +15,7 @@ const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31}; // These control which colors are selected for the gradient mode -const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; +const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( diff --git a/keyboards/jc65/v32u4/keymaps/default/config.h b/keyboards/jc65/v32u4/keymaps/default/config.h index a5568e400def..271f48d0011b 100644 --- a/keyboards/jc65/v32u4/keymaps/default/config.h +++ b/keyboards/jc65/v32u4/keymaps/default/config.h @@ -1 +1,3 @@ -#include "../../config.h" +#pragma once + +// place overrides here diff --git a/keyboards/jd45/keymaps/mjt/keymap.c b/keyboards/jd45/keymaps/mjt/keymap.c index f806de65d962..63563d6aaab6 100644 --- a/keyboards/jd45/keymaps/mjt/keymap.c +++ b/keyboards/jd45/keymaps/mjt/keymap.c @@ -3,12 +3,14 @@ /* Mike's Layout for JD45 with backlight LEDs acting as layer indicator */ +#define KC_TT2 TT(2) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_kc( TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, BSLS, FN1, A, S, D, F, G, H, J, K, L, QUOT, ENT, FN0, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, - NO, LCTL, LALT, LGUI, SPC, BSPC, APP, FN2, ESC, NO), + NO, LCTL, LALT, LGUI, SPC, BSPC, APP, TT2, ESC, NO), [1] = LAYOUT_kc( GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC, TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS, @@ -35,9 +37,7 @@ enum macro_id const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_MODS_TAP_TOGGLE(MOD_LSFT), - // [1] = ACTION_LAYER_TAP_TOGGLE(1), [1] = ACTION_MACRO(M_LAYER1), - [2] = ACTION_LAYER_TAP_TOGGLE(2), [3] = ACTION_BACKLIGHT_STEP(), [4] = ACTION_BACKLIGHT_TOGGLE()}; diff --git a/keyboards/jj40/README.md b/keyboards/jj40/README.md index ed1ea90fe7c4..7d3612554bc7 100644 --- a/keyboards/jj40/README.md +++ b/keyboards/jj40/README.md @@ -36,7 +36,7 @@ $ make $ sudo cp bootloadHID /usr/bin ``` -In order to use the `./program` script, which can reboot the board into +In order to use the `././util/atmega32a_program.py` script, which can reboot the board into the bootloader, you'll need Python 2 with PyUSB installed: ``` diff --git a/keyboards/jj40/backlight.c b/keyboards/jj40/backlight.c deleted file mode 100644 index fbd241fa9dee..000000000000 --- a/keyboards/jj40/backlight.c +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#include "backlight.h" -#include "quantum.h" - -#include -#include - -#include "backlight_custom.h" -#include "breathing_custom.h" - -// DEBUG -#include -#include - -// Port D: digital pins of the AVR chipset -#define NUMLOCK_PORT (1 << 0) // D0 -#define CAPSLOCK_PORT (1 << 1) // D1 -#define BACKLIGHT_PORT (1 << 4) // D4 -#define SCROLLLOCK_PORT (1 << 6) // D6 - -#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 -#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default - -#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask - -#define PWM_MAX 0xFF -#define TIMER_TOP 255 // 8 bit PWM - -extern backlight_config_t backlight_config; - -/** - * References - * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation - * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b - * Timers: http://www.avrbeginners.net/architecture/timers/timers.html - * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ - * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware - */ - -// @Override -// turn LEDs on and off depending on USB caps/num/scroll lock states. -__attribute__ ((weak)) -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - // turn on - DDRD |= NUMLOCK_PORT; - PORTD |= NUMLOCK_PORT; - } else { - // turn off - DDRD &= ~NUMLOCK_PORT; - PORTD &= ~NUMLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRD |= CAPSLOCK_PORT; - PORTD |= CAPSLOCK_PORT; - } else { - DDRD &= ~CAPSLOCK_PORT; - PORTD &= ~CAPSLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRD |= SCROLLLOCK_PORT; - PORTD |= SCROLLLOCK_PORT; - } else { - DDRD &= ~SCROLLLOCK_PORT; - PORTD &= ~SCROLLLOCK_PORT; - } -} - -#ifdef BACKLIGHT_ENABLE - -// sets up Timer 1 for 8-bit PWM -void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE - // default 8 bit mode - TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH - TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW - - // clear output compare value A - // outb(OCR1AH, 0); - // outb(OCR1AL, 0); - - // clear output comparator registers for B - OCR1BH = 0; // outb(OCR1BH, 0); - OCR1BL = 0; // outb(OCR1BL, 0); -} - -bool is_init = false; -void timer1Init(void) { - // timer1SetPrescaler(TIMER1PRESCALE) - // set to DIV/64 - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; - - // reset TCNT1 - TCNT1H = 0; // outb(TCNT1H, 0); - TCNT1L = 0; // outb(TCNT1L, 0); - - // TOIE1: Timer Overflow Interrupt Enable (Timer 1); - TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); - - is_init = true; -} - -void timer1UnInit(void) { - // set prescaler back to NONE - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP - - // disable timer overflow interrupt - TIMSK &= ~_BV(TOIE1); // overflow bit? - - setPWM(0); - - is_init = false; -} - - -// handle TCNT1 overflow -//! Interrupt handler for tcnt1 overflow interrupt -ISR(TIMER1_OVF_vect, ISR_NOBLOCK) -{ - // sei(); - // handle breathing here - #ifdef BACKLIGHT_BREATHING - if (is_breathing()) { - custom_breathing_handler(); - } - #endif - - // TODO call user defined function -} - -// enable timer 1 PWM -// timer1PWMBOn() -void timer1PWMBEnable(void) { - // turn on channel B (OC1B) PWM output - // set OC1B as non-inverted PWM - TCCR1A |= _BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -// disable timer 1 PWM -// timer1PWMBOff() -void timer1PWMBDisable(void) { - TCCR1A &= ~_BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -void enableBacklight(void) { - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high -} - -void disableBacklight(void) { - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low -} - -void startPWM(void) { - timer1Init(); - timer1PWMBEnable(); - enableBacklight(); -} - -void stopPWM(void) { - timer1UnInit(); - disableBacklight(); - timer1PWMBDisable(); -} - -void b_led_init_ports(void) { - /* turn backlight on/off depending on user preference */ - #if BACKLIGHT_ON_STATE == 0 - // DDRx register: sets the direction of Port D - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low - #else - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high - #endif - - timer1PWMSetup(); - startPWM(); - - #ifdef BACKLIGHT_BREATHING - breathing_enable(); - #endif -} - -void b_led_set(uint8_t level) { - if (level > BACKLIGHT_LEVELS) { - level = BACKLIGHT_LEVELS; - } - - setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); -} - -// called every matrix scan -void b_led_task(void) { - // do nothing for now -} - -void setPWM(uint16_t xValue) { - if (xValue > TIMER_TOP) { - xValue = TIMER_TOP; - } - OCR1B = xValue; // timer1PWMBSet(xValue); -} - -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/jj40/backlight_custom.h b/keyboards/jj40/backlight_custom.h deleted file mode 100644 index 7210be840e09..000000000000 --- a/keyboards/jj40/backlight_custom.h +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifndef BACKLIGHT_CUSTOM_H -#define BACKLIGHT_CUSTOM_H - -#include -void b_led_init_ports(void); -void b_led_set(uint8_t level); -void b_led_task(void); -void setPWM(uint16_t xValue); - -#endif // BACKLIGHT_CUSTOM_H diff --git a/keyboards/jj40/breathing_custom.h b/keyboards/jj40/breathing_custom.h deleted file mode 100644 index 71416b1b45da..000000000000 --- a/keyboards/jj40/breathing_custom.h +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Breathing effect code for PS2AVRGB boards (ATMEGA32A) - * Works in conjunction with `backlight.c`. - * - * Code adapted from `quantum.c` to register with the existing TIMER1 overflow - * handler in `backlight.c` instead of setting up its own timer. - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifdef BACKLIGHT_ENABLE -#ifdef BACKLIGHT_BREATHING - -#include "backlight_custom.h" - -#ifndef BREATHING_PERIOD -#define BREATHING_PERIOD 6 -#endif - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) - -// TODO make this share code with quantum.c - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -static bool breathing = false; - -bool is_breathing(void) { - return breathing; -} - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t) y; - } -} - -void breathing_enable(void) { - breathing = true; - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - // interrupt already registered -} - -void breathing_pulse(void) { - if (get_backlight_level() == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - // breathing_interrupt_enable(); - breathing = true; -} - -void breathing_disable(void) { - breathing = false; - // backlight_set(get_backlight_level()); - b_led_set(get_backlight_level()); // custom implementation of backlight_set() -} - -void breathing_self_disable(void) -{ - if (get_backlight_level() == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()) - breathing_disable(); - else - breathing_enable(); -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * get_backlight_level(); -} - -void custom_breathing_handler(void) { - uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 244); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - // breathing_interrupt_disable(); - } - - setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); -} - -#endif // BACKLIGHT_BREATHING -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/jj40/config.h b/keyboards/jj40/config.h index 67561b0b28b9..e88147ac85c9 100644 --- a/keyboards/jj40/config.h +++ b/keyboards/jj40/config.h @@ -1,51 +1,55 @@ /* Copyright 2017 Luiz Ribeiro - 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 . */ -#include "config_common.h" +#pragma once -#ifndef CONFIG_H -#define CONFIG_H +#include "config_common.h" #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D // TODO: share these strings with usbconfig.h // Edit usbconfig.h to change these. -#define MANUFACTURER winkeyless.kr +#define MANUFACTURER Kprepublic #define PRODUCT jj40 /* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 15 +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 +#define MATRIX_ROW_PINS { B0, B1, B3, B4 } +#define MATRIX_COL_PINS { C4, C5, C6, C7, A4, A5, A6, A7, A3, A2, A1, A0 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 -// #define BACKLIGHT_BREATHING // works, but BL_TOGG might not work - -#define TAPPING_TOGGLE 3 - -#define NO_UART 1 +// #define BACKLIGHT_BREATHING // Requires #4324 to enable hardware pwm for atmega32a /* RGB underglow */ -// The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards. -// The same pin is used on the JJ40, at least. +// NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. #define RGBLED_NUM 5 -#define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. #define RGBLIGHT_ANIMATIONS -#endif +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +#define NO_UART 1 + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/jj40/i2c.c b/keyboards/jj40/i2c.c deleted file mode 100644 index c27f3e3d17e1..000000000000 --- a/keyboards/jj40/i2c.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/jj40/jj40.c b/keyboards/jj40/jj40.c index 51f5295f465d..26cfa6c067e9 100644 --- a/keyboards/jj40/jj40.c +++ b/keyboards/jj40/jj40.c @@ -18,53 +18,26 @@ along with this program. If not, see . #include "jj40.h" -#include - -#include "action_layer.h" -#include "quantum.h" +#ifdef RGBLIGHT_ENABLE -#include "i2c.h" +#include +#include "i2c_master.h" +#include "rgblight.h" -#include "backlight.h" -#include "backlight_custom.h" +extern rgblight_config_t rgblight_config; -// for keyboard subdirectory level init functions -// @Override void matrix_init_kb(void) { + i2c_init(); // call user level keymaps, if any matrix_init_user(); } - -#ifdef BACKLIGHT_ENABLE -/// Overrides functions in `quantum.c` -void backlight_init_ports(void) { - b_led_init_ports(); -} - -void backlight_task(void) { - b_led_task(); -} - -void backlight_set(uint8_t level) { - b_led_set(level); -} -#endif - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - // custom RGB driver void rgblight_set(void) { if (!rgblight_config.enable) { - for (uint8_t i=0; i. */ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H +#pragma once #include "quantum.h" -#include "quantum_keycodes.h" -#include "keycode.h" -#include "action.h" - -void matrix_init_user(void); // TODO port this to other PS2AVRGB boards - -#define XXX KC_NO +#define ___ KC_NO #define LAYOUT_ortho_4x12( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312 \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B \ ) \ { \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K36, K37, K38, K34, K33, K32, K31 } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B } \ } #define LAYOUT_planck_mit( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K3X, K38, K39, K310, K311, K312 \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K3X, K37, K38, K39, K3A, K3B \ ) \ { \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K3X, XXX, K38, K34, K33, K32, K31 } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, K3X, ___, K37, K38, K39, K3A, K3B } \ } #define LAYOUT_planck_1x2uR( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ - K31, K32, K33, K34, K35, K36, K3X, K39, K310, K311, K312 \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K35, K3X, K38, K39, K3A, K3B \ ) \ { \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K36, K3X, XXX, K34, K33, K32, K31 } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, K33, K34, K35, K3X, ___, K38, K39, K3A, K3B } \ } #define LAYOUT_kc( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ - ) \ - LAYOUT_ortho_4x12( \ - KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ - KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ - KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ - KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +LAYOUT_ortho_4x12( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ ) #define LAYOUT LAYOUT_planck_mit - #define LAYOUT_kc_ortho_4x12 LAYOUT_kc - -#endif +#define KC_LAYOUT_ortho_4x12 LAYOUT_kc diff --git a/keyboards/jj40/keymaps/ajp10304/keymap.c b/keyboards/jj40/keymaps/ajp10304/keymap.c index c0d0062c7bd5..c34a7c292999 100644 --- a/keyboards/jj40/keymaps/ajp10304/keymap.c +++ b/keyboards/jj40/keymaps/ajp10304/keymap.c @@ -35,10 +35,6 @@ enum jj40_keycodes { #include "dynamic_macro.h" -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/jj40/keymaps/default/keymap.c b/keyboards/jj40/keymaps/default/keymap.c index d84b01b15a46..47c6bada6891 100644 --- a/keyboards/jj40/keymaps/default/keymap.c +++ b/keyboards/jj40/keymaps/default/keymap.c @@ -1,16 +1,30 @@ +/* Copyright 2019 + * + * 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 . + */ #include QMK_KEYBOARD_H - -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, +enum layers { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, }; +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------. @@ -27,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower @@ -64,10 +78,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; -// Loop -void matrix_scan_user(void) { - // Empty -}; +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/jj40/keymaps/waples/keymap.c b/keyboards/jj40/keymaps/waples/keymap.c index 81416f982086..79acada28c01 100644 --- a/keyboards/jj40/keymaps/waples/keymap.c +++ b/keyboards/jj40/keymaps/waples/keymap.c @@ -21,8 +21,6 @@ enum jj40_keycodes { #define TG_NKRO MAGIC_TOGGLE_NKRO // Toggle NKRO #define CTLESC MT(MOD_LCTL, KC_ESC) // Hold for left Ctrl, tap for Esc #define SHFTENT MT(MOD_RSFT, KC_ENT) // Hold for right Shift, tap for Enter -#define _______ KC_TRNS -#define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/jj40/matrix.c b/keyboards/jj40/matrix.c deleted file mode 100644 index 245813dfd2de..000000000000 --- a/keyboards/jj40/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk index 697e17a0141f..3e496f97e959 100644 --- a/keyboards/jj40/rules.mk +++ b/keyboards/jj40/rules.mk @@ -30,29 +30,29 @@ F_CPU = 12000000 # automatically (+60). See bootloader.mk for all options. BOOTLOADER = bootloadHID -# build options -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = yes - -BACKLIGHT_ENABLE = yes -BACKLIGHT_CUSTOM_DRIVER = yes - -RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes - -KEY_LOCK_ENABLE = yes - +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -OPT_DEFS = -DDEBUG_LEVEL=0 - -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c backlight.c +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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_CUSTOM_DRIVER = yes +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +SRC += i2c_master.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/jj40/tools/usb_detach.c b/keyboards/jj40/tools/usb_detach.c deleted file mode 100644 index c21e47a7a439..000000000000 --- a/keyboards/jj40/tools/usb_detach.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Found at https://www.linuxquestions.org/questions/linux-hardware-18/how-to-unclaim-usb-device-558138/#post3406986 */ -#include -#include -#include -#include -#include -#include - -int main(int argc, char**argv) -{ - struct usbdevfs_ioctl command; - int ret; - int fd; - int i; - if (argc>1) { - fd = open(argv[1],O_RDWR); - if (fd<1){ - perror("unable to open file"); - return 1; - } - for (i=0;i<255;i++){ // hack: should fetch how many interface there is. - command.ifno = i; - command.ioctl_code = USBDEVFS_DISCONNECT; - command.data = NULL; - ret = ioctl(fd, USBDEVFS_IOCTL, &command); - if(ret!=-1) - printf("un claimed interface %d %d\n",i,ret); - } - } else { - printf ("usage: %s /dev/bus/usb/BUS/DEVICE\n",argv[0]); - printf("Release all interfaces of this usb device for usage in virtualisation\n"); - } -} \ No newline at end of file diff --git a/keyboards/jj4x4/README.md b/keyboards/jj4x4/README.md index 09684bd82563..29dc2605de05 100644 --- a/keyboards/jj4x4/README.md +++ b/keyboards/jj4x4/README.md @@ -36,7 +36,7 @@ $ make $ sudo cp bootloadHID /usr/bin ``` -In order to use the `./program` script, which can reboot the board into +In order to use the `./util/atmega32a_program.py` script, which can reboot the board into the bootloader, you'll need Python 2 with PyUSB installed: ``` diff --git a/keyboards/jj4x4/backlight.c b/keyboards/jj4x4/backlight.c deleted file mode 100644 index fbd241fa9dee..000000000000 --- a/keyboards/jj4x4/backlight.c +++ /dev/null @@ -1,213 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#include "backlight.h" -#include "quantum.h" - -#include -#include - -#include "backlight_custom.h" -#include "breathing_custom.h" - -// DEBUG -#include -#include - -// Port D: digital pins of the AVR chipset -#define NUMLOCK_PORT (1 << 0) // D0 -#define CAPSLOCK_PORT (1 << 1) // D1 -#define BACKLIGHT_PORT (1 << 4) // D4 -#define SCROLLLOCK_PORT (1 << 6) // D6 - -#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 -#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default - -#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask - -#define PWM_MAX 0xFF -#define TIMER_TOP 255 // 8 bit PWM - -extern backlight_config_t backlight_config; - -/** - * References - * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation - * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b - * Timers: http://www.avrbeginners.net/architecture/timers/timers.html - * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ - * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware - */ - -// @Override -// turn LEDs on and off depending on USB caps/num/scroll lock states. -__attribute__ ((weak)) -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - // turn on - DDRD |= NUMLOCK_PORT; - PORTD |= NUMLOCK_PORT; - } else { - // turn off - DDRD &= ~NUMLOCK_PORT; - PORTD &= ~NUMLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRD |= CAPSLOCK_PORT; - PORTD |= CAPSLOCK_PORT; - } else { - DDRD &= ~CAPSLOCK_PORT; - PORTD &= ~CAPSLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRD |= SCROLLLOCK_PORT; - PORTD |= SCROLLLOCK_PORT; - } else { - DDRD &= ~SCROLLLOCK_PORT; - PORTD &= ~SCROLLLOCK_PORT; - } -} - -#ifdef BACKLIGHT_ENABLE - -// sets up Timer 1 for 8-bit PWM -void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE - // default 8 bit mode - TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH - TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW - - // clear output compare value A - // outb(OCR1AH, 0); - // outb(OCR1AL, 0); - - // clear output comparator registers for B - OCR1BH = 0; // outb(OCR1BH, 0); - OCR1BL = 0; // outb(OCR1BL, 0); -} - -bool is_init = false; -void timer1Init(void) { - // timer1SetPrescaler(TIMER1PRESCALE) - // set to DIV/64 - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; - - // reset TCNT1 - TCNT1H = 0; // outb(TCNT1H, 0); - TCNT1L = 0; // outb(TCNT1L, 0); - - // TOIE1: Timer Overflow Interrupt Enable (Timer 1); - TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); - - is_init = true; -} - -void timer1UnInit(void) { - // set prescaler back to NONE - (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP - - // disable timer overflow interrupt - TIMSK &= ~_BV(TOIE1); // overflow bit? - - setPWM(0); - - is_init = false; -} - - -// handle TCNT1 overflow -//! Interrupt handler for tcnt1 overflow interrupt -ISR(TIMER1_OVF_vect, ISR_NOBLOCK) -{ - // sei(); - // handle breathing here - #ifdef BACKLIGHT_BREATHING - if (is_breathing()) { - custom_breathing_handler(); - } - #endif - - // TODO call user defined function -} - -// enable timer 1 PWM -// timer1PWMBOn() -void timer1PWMBEnable(void) { - // turn on channel B (OC1B) PWM output - // set OC1B as non-inverted PWM - TCCR1A |= _BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -// disable timer 1 PWM -// timer1PWMBOff() -void timer1PWMBDisable(void) { - TCCR1A &= ~_BV(COM1B1); - TCCR1A &= ~_BV(COM1B0); -} - -void enableBacklight(void) { - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high -} - -void disableBacklight(void) { - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low -} - -void startPWM(void) { - timer1Init(); - timer1PWMBEnable(); - enableBacklight(); -} - -void stopPWM(void) { - timer1UnInit(); - disableBacklight(); - timer1PWMBDisable(); -} - -void b_led_init_ports(void) { - /* turn backlight on/off depending on user preference */ - #if BACKLIGHT_ON_STATE == 0 - // DDRx register: sets the direction of Port D - // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input - PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low - #else - DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output - PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high - #endif - - timer1PWMSetup(); - startPWM(); - - #ifdef BACKLIGHT_BREATHING - breathing_enable(); - #endif -} - -void b_led_set(uint8_t level) { - if (level > BACKLIGHT_LEVELS) { - level = BACKLIGHT_LEVELS; - } - - setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); -} - -// called every matrix scan -void b_led_task(void) { - // do nothing for now -} - -void setPWM(uint16_t xValue) { - if (xValue > TIMER_TOP) { - xValue = TIMER_TOP; - } - OCR1B = xValue; // timer1PWMBSet(xValue); -} - -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/jj4x4/backlight_custom.h b/keyboards/jj4x4/backlight_custom.h deleted file mode 100644 index 7210be840e09..000000000000 --- a/keyboards/jj4x4/backlight_custom.h +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifndef BACKLIGHT_CUSTOM_H -#define BACKLIGHT_CUSTOM_H - -#include -void b_led_init_ports(void); -void b_led_set(uint8_t level); -void b_led_task(void); -void setPWM(uint16_t xValue); - -#endif // BACKLIGHT_CUSTOM_H diff --git a/keyboards/jj4x4/breathing_custom.h b/keyboards/jj4x4/breathing_custom.h deleted file mode 100644 index 71416b1b45da..000000000000 --- a/keyboards/jj4x4/breathing_custom.h +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Breathing effect code for PS2AVRGB boards (ATMEGA32A) - * Works in conjunction with `backlight.c`. - * - * Code adapted from `quantum.c` to register with the existing TIMER1 overflow - * handler in `backlight.c` instead of setting up its own timer. - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#ifdef BACKLIGHT_ENABLE -#ifdef BACKLIGHT_BREATHING - -#include "backlight_custom.h" - -#ifndef BREATHING_PERIOD -#define BREATHING_PERIOD 6 -#endif - -#define breathing_min() do {breathing_counter = 0;} while (0) -#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) - -// TODO make this share code with quantum.c - -#define BREATHING_NO_HALT 0 -#define BREATHING_HALT_OFF 1 -#define BREATHING_HALT_ON 2 -#define BREATHING_STEPS 128 - -static uint8_t breathing_period = BREATHING_PERIOD; -static uint8_t breathing_halt = BREATHING_NO_HALT; -static uint16_t breathing_counter = 0; - -static bool breathing = false; - -bool is_breathing(void) { - return breathing; -} - -// See http://jared.geek.nz/2013/feb/linear-led-pwm -static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t) y; - } -} - -void breathing_enable(void) { - breathing = true; - breathing_counter = 0; - breathing_halt = BREATHING_NO_HALT; - // interrupt already registered -} - -void breathing_pulse(void) { - if (get_backlight_level() == 0) - breathing_min(); - else - breathing_max(); - breathing_halt = BREATHING_HALT_ON; - // breathing_interrupt_enable(); - breathing = true; -} - -void breathing_disable(void) { - breathing = false; - // backlight_set(get_backlight_level()); - b_led_set(get_backlight_level()); // custom implementation of backlight_set() -} - -void breathing_self_disable(void) -{ - if (get_backlight_level() == 0) - breathing_halt = BREATHING_HALT_OFF; - else - breathing_halt = BREATHING_HALT_ON; -} - -void breathing_toggle(void) { - if (is_breathing()) - breathing_disable(); - else - breathing_enable(); -} - -void breathing_period_set(uint8_t value) -{ - if (!value) - value = 1; - breathing_period = value; -} - -void breathing_period_default(void) { - breathing_period_set(BREATHING_PERIOD); -} - -void breathing_period_inc(void) -{ - breathing_period_set(breathing_period+1); -} - -void breathing_period_dec(void) -{ - breathing_period_set(breathing_period-1); -} - -/* To generate breathing curve in python: - * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] - */ -static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -// Use this before the cie_lightness function. -static inline uint16_t scale_backlight(uint16_t v) { - return v / BACKLIGHT_LEVELS * get_backlight_level(); -} - -void custom_breathing_handler(void) { - uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; - // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 244); - uint8_t index = breathing_counter / interval % BREATHING_STEPS; - - if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || - ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) - { - // breathing_interrupt_disable(); - } - - setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); -} - -#endif // BACKLIGHT_BREATHING -#endif // BACKLIGHT_ENABLE diff --git a/keyboards/jj4x4/config.h b/keyboards/jj4x4/config.h index d48df5f1dbbe..a8df46f016e9 100644 --- a/keyboards/jj4x4/config.h +++ b/keyboards/jj4x4/config.h @@ -15,10 +15,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "config_common.h" +#pragma once -#ifndef CONFIG_H -#define CONFIG_H +#include "config_common.h" #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D @@ -36,18 +35,24 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 12 -// #define BACKLIGHT_BREATHING // works, but BL_TOGG might not work +// #define BACKLIGHT_BREATHING // Requires #4324 to enable hardware pwm for atmega32a -#define TAPPING_TOGGLE 3 +/* RGB underglow */ +// NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. +#define RGBLED_NUM 4 +#define RGBLIGHT_ANIMATIONS + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 #define NO_UART 1 -/* RGB underglow */ -// The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards. -// The same pin is used on the JJ40, at least. -#define RGBLED_NUM 5 -#define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. -#define RGBLIGHT_ANIMATIONS +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) -#endif +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/jj4x4/i2c.c b/keyboards/jj4x4/i2c.c deleted file mode 100644 index c27f3e3d17e1..000000000000 --- a/keyboards/jj4x4/i2c.c +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1<. #include "jj4x4.h" -#include - -#include "action_layer.h" -#include "quantum.h" +#ifdef RGBLIGHT_ENABLE -#include "i2c.h" +#include +#include "i2c_master.h" +#include "rgblight.h" -#include "backlight.h" -#include "backlight_custom.h" +extern rgblight_config_t rgblight_config; -// for keyboard subdirectory level init functions -// @Override void matrix_init_kb(void) { + i2c_init(); // call user level keymaps, if any matrix_init_user(); } - -#ifdef BACKLIGHT_ENABLE -/// Overrides functions in `quantum.c` -void backlight_init_ports(void) { - b_led_init_ports(); -} - -void backlight_task(void) { - b_led_task(); -} - -void backlight_set(uint8_t level) { - b_led_set(level); -} -#endif - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - // custom RGB driver void rgblight_set(void) { if (!rgblight_config.enable) { - for (uint8_t i=0; i. */ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H +#pragma once #include "quantum.h" -#include "quantum_keycodes.h" -#include "keycode.h" -#include "action.h" -void matrix_init_user(void); // TODO port this to other PS2AVRGB boards - -#define XXX KC_NO - - -#define LAYOUT( \ +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_4x4( \ K01, K02, K03, K04, \ K11, K12, K13, K14, \ K21, K22, K23, K24, \ @@ -40,7 +39,3 @@ void matrix_init_user(void); // TODO port this to other PS2AVRGB boards { K21, K22, K23, K24 }, \ { K31, K32, K33, K34 } \ } - - - -#endif diff --git a/keyboards/jj4x4/keymaps/default/keymap.c b/keyboards/jj4x4/keymaps/default/keymap.c index d4130e809063..a0b06ee92a38 100644 --- a/keyboards/jj4x4/keymaps/default/keymap.c +++ b/keyboards/jj4x4/keymaps/default/keymap.c @@ -1,34 +1,73 @@ +/* Copyright 2019 + * + * 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 . + */ #include QMK_KEYBOARD_H +enum layers { + _BASE = 0, + _FN1, + _FN2, +}; -#define _QWERTY 0 - - +// Defines the keycodes used by our macros in process_record_user enum custom_keycodes { - QWERTY = SAFE_RANGE, + QMKBEST = SAFE_RANGE, + QMKURL }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,---------------------------. - * | A | B | C | D | - * +------+------+------+------| - * | E | F | G | H | - * +------+------+------+------| - * | I | J | K | L | - * +------+------+------+------| - * | M | N | O | P | - * ----------------------------' - */ -[_QWERTY] = LAYOUT( \ - KC_A, KC_B, KC_C, KC_D, \ - KC_E, KC_F, KC_G, KC_H, \ - KC_I, KC_J, KC_K, KC_L, \ - KC_M, KC_N, KC_O, KC_P \ -), -}; -// Loop -void matrix_scan_user(void) { - // Empty + [_BASE] = LAYOUT_ortho_4x4( + KC_PGUP, KC_HOME, KC_UP, KC_END , \ + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, \ + MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, \ + MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT \ + ), + [_FN1] = LAYOUT_ortho_4x4( + KC_ESC, KC_P7, KC_P8, KC_P9, \ + KC_TAB, KC_P4, KC_P5, KC_P6, \ + KC_ENT, KC_P1, KC_P2, KC_P3, \ + _______, KC_P0, KC_P0, KC_DOT \ + ), + [_FN2] = LAYOUT_ortho_4x4( + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \ + _______, _______, _______, RESET, \ + BL_STEP, _______, QMKBEST, QMKURL \ + ) + }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} diff --git a/keyboards/jj4x4/rules.mk b/keyboards/jj4x4/rules.mk index 3e222c620da6..3ac2cc04329d 100644 --- a/keyboards/jj4x4/rules.mk +++ b/keyboards/jj4x4/rules.mk @@ -30,29 +30,31 @@ F_CPU = 12000000 # automatically (+60). See bootloader.mk for all options. BOOTLOADER = bootloadHID -# build options -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = yes - -BACKLIGHT_ENABLE = yes -BACKLIGHT_CUSTOM_DRIVER = yes - -RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes - -KEY_LOCK_ENABLE = yes - +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -OPT_DEFS = -DDEBUG_LEVEL=0 +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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_CUSTOM_DRIVER = yes +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) -SRC = i2c.c backlight.c +SRC += i2c_master.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex - +LAYOUTS = ortho_4x4 diff --git a/keyboards/jj4x4/tools/README.md b/keyboards/jj4x4/tools/README.md deleted file mode 100644 index 081984ed44bc..000000000000 --- a/keyboards/jj4x4/tools/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# JJ40 Tools - -## usb_detach.c - -When trying to flash on Linux, you may encounter a "Resource Unavailable" error. This means that Linux's HID driver has taken exclusive control of the keyboard, and the program script can't flash it. -This program can force Linux to give up a device, so that the programming script can reset it. - -### To compile: -``` -gcc usb_detach.c -o usb_detach -``` - -### To run: -1. Use `lsusb` to discover the Bus and Device numbers for your keyboard. -2. Run the program: `sudo ./usb_detach /dev/bus/usb//`. -3. Build and program the firmware as normal. diff --git a/keyboards/jj4x4/usbconfig.h b/keyboards/jj4x4/usbconfig.h index ad97e7f0a382..a7653bde86e3 100644 --- a/keyboards/jj4x4/usbconfig.h +++ b/keyboards/jj4x4/usbconfig.h @@ -252,8 +252,8 @@ section at the end of this file). * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for * details. */ -#define USB_CFG_DEVICE_NAME 'j', 'j', '4', '0' -#define USB_CFG_DEVICE_NAME_LEN 4 +#define USB_CFG_DEVICE_NAME 'j', 'j', '4', 'x', '4' +#define USB_CFG_DEVICE_NAME_LEN 5 /* Same as above for the device name. If you don't want a device name, undefine * the macros. See the file USB-IDs-for-free.txt before you assign a name if * you use a shared VID/PID. diff --git a/keyboards/jj50/README.md b/keyboards/jj50/README.md index 397889535e52..f7b8acc641b2 100644 --- a/keyboards/jj50/README.md +++ b/keyboards/jj50/README.md @@ -37,7 +37,7 @@ $ brew cask install crosspack-avr $ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb ``` -In order to use the `./program` script, which can reboot the board into +In order to use the `././util/atmega32a_program.py` script, which can reboot the board into the bootloader, you'll need Python 2 with PyUSB installed: ``` diff --git a/keyboards/jj50/keymaps/abstractkb/keymap.c b/keyboards/jj50/keymaps/abstractkb/keymap.c new file mode 100644 index 000000000000..456adeee4b29 --- /dev/null +++ b/keyboards/jj50/keymaps/abstractkb/keymap.c @@ -0,0 +1,135 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) +Modified 2019 AbstractKB + +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 LicensezZZ +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +enum layers { + _DEFLT, + _RAISE, + _LOWER, + _FN +}; + +enum custom_keycodes { + MYRGB_TG = SAFE_RANGE +}; + +bool rgbinit = true; +bool rgbon = true; + +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + led_set_user(host_keyboard_leds()); +} + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _RAISE: + rgblight_sethsv_noeeprom(240,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _LOWER: + rgblight_sethsv_noeeprom(0,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _FN: + rgblight_sethsv_noeeprom(0,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + break; + default: //_DEFLT + rgblight_sethsv_noeeprom(0,0,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + } + + return state; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<event.pressed) { + myrgb_toggle(); + } + return false; + default: + return true; + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DEFLT] = 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, \ + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + MO(_FN), KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + + [_RAISE] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LGUI(KC_LEFT)), LGUI(KC_L), LCTL(LGUI(KC_RGHT)), _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_CAPS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + + [_LOWER] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_BSLS, _______, \ + _______, _______, _______, KC_LBRC, KC_RBRC, S(KC_9),S(KC_0),S(KC_LBRC),S(KC_RBRC),_______,_______,_______, \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + + [_FN] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MYRGB_TG \ + ) +}; diff --git a/keyboards/jj50/keymaps/abstractkb/readme.md b/keyboards/jj50/keymaps/abstractkb/readme.md new file mode 100644 index 000000000000..7ff7e0268a15 --- /dev/null +++ b/keyboards/jj50/keymaps/abstractkb/readme.md @@ -0,0 +1,6 @@ +# My personal layout for the JJ50 + +It is an approximation of a 60% layout with the alternate layers set up for programming, +with brackets and parenthesis on the homerow +Other things I changed were swapping around delete, backspace, and capslock around +It also uses layer based rgb underglow, and the underglow flashes when capslock is enabled \ No newline at end of file diff --git a/keyboards/jj50/keymaps/archetype/README.md b/keyboards/jj50/keymaps/archetype/README.md new file mode 100644 index 000000000000..a2ae4e9123fe --- /dev/null +++ b/keyboards/jj50/keymaps/archetype/README.md @@ -0,0 +1,22 @@ +# archetype keymap for jj50 keyboards +A keymap that can be used with the jj50 ortholinear keyboard. + +## Features + +- `QWERTY` layout (Default) +- `COLEMAK` layout +- `FN` layout (various keys that are rarely needed) +- `FX` layout (Control lighting and audio) +- Use `Left Ctrl` and `Left Alt` to output `()`, `[]` and `{}` by tapping once, twice or thrice respectively. Hold them down for the regular keycode (LCtrl or LAlt) +- `Right Shift` when held or Enter when tapped +- Auto-Shift enabled (long press on alphas and numeric keys outputs shifted character) +- Full arrow keys available + + +## Feedback + +I made this keymap based on the existing default one. If you happen to use this keymap [drop me a line](mailto://idimitrakopoulos@gmail.com) about what could be improved etc + +Enjoy! + +Iason Dimitrakopoulos diff --git a/keyboards/jj50/keymaps/archetype/config.h b/keyboards/jj50/keymaps/archetype/config.h new file mode 100644 index 000000000000..a12e070b4fad --- /dev/null +++ b/keyboards/jj50/keymaps/archetype/config.h @@ -0,0 +1,9 @@ +#pragma once + +#undef AUTO_SHIFT_TIMEOUT +#undef TAPPING_TERM + +#define AUTO_SHIFT_TIMEOUT 150 +#define NO_AUTO_SHIFT_ALPHA +#define TAPPING_TERM 150 +//#define BOOTMAGIC_KEY_SALT KC_LCTL diff --git a/keyboards/jj50/keymaps/archetype/keymap.c b/keyboards/jj50/keymaps/archetype/keymap.c new file mode 100644 index 000000000000..82c615f135a1 --- /dev/null +++ b/keyboards/jj50/keymaps/archetype/keymap.c @@ -0,0 +1,277 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) +Modified 2019 Iason Dimitrakopoulos (idimitrakopoulos) + +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 LicensezZZ +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "rgblight.h" +#include "quantum.h" + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _FN 2 +#define _FX 3 + +enum { + TD_BSPC_DEL = 0, + TD_LCTL_LBRC = 1, + TD_LALT_RBRC = 2, + TD_ESC_LAYER = 3, +}; + + +void left_brackets(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + if (!state->pressed) { + register_code16(KC_LPRN); + } else { + register_code(KC_LCTL); + } + } else if (state->count == 2) { + register_code16(KC_LBRC); + } else if (state->count == 3) { + register_code16(KC_LCBR); + } +} + +void left_brackets_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code16(KC_LPRN); + } else if (state->count == 2) { + unregister_code16(KC_LBRC); + } else if (state->count == 3) { + unregister_code16(KC_LCBR); + } + + unregister_code(KC_LCTL); +} + +void right_brackets(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + if (!state->pressed) { + register_code16(KC_RPRN); + } else { + register_code(KC_LALT); + } + } else if (state->count == 2) { + register_code16(KC_RBRC); + } else if (state->count == 3) { + register_code16(KC_RCBR); + } +} + +void right_brackets_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code16(KC_RPRN); + } else if (state->count == 2) { + unregister_code16(KC_RBRC); + } else if (state->count == 3) { + unregister_code16(KC_RCBR); + } + + unregister_code(KC_LALT); +} + +typedef struct { + bool is_press_action; + int state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, //send two single taps + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7, + TRIPLE_SINGLE_TAP = 8, //send three single taps +}; + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + else if (state->count == 2) { + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + + if (state->count == 3) { + if (state->interrupted) return TRIPLE_SINGLE_TAP; + else if (state->pressed) return TRIPLE_HOLD; + else return TRIPLE_TAP; + } + else return 9; //magic number. At some point this method will expand to work for more presses +} + +static tap tap_state = { + .is_press_action = true, + .state = 0 +}; + +void layer_switcher (qk_tap_dance_state_t *state, void *user_data) { + tap_state.state = cur_dance(state); + switch (tap_state.state) { + case SINGLE_TAP: register_code(KC_ESC); break; + case SINGLE_HOLD: register_code(KC_ESC); break; + case DOUBLE_TAP: register_code(KC_ESC); break; + case DOUBLE_HOLD: layer_on(_COLEMAK); break; + case DOUBLE_SINGLE_TAP: register_code(KC_ESC); unregister_code(KC_ESC); register_code(KC_ESC); break; + case TRIPLE_TAP: register_code(KC_ESC); break; + case TRIPLE_HOLD: layer_on(_FX); break; + case TRIPLE_SINGLE_TAP: register_code(KC_ESC); unregister_code(KC_ESC); register_code(KC_ESC); unregister_code(KC_ESC); register_code(KC_ESC); break; + //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`. + //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. + } +} + +void layer_switcher_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (tap_state.state) { + case SINGLE_TAP: unregister_code(KC_ESC); break; + case SINGLE_HOLD: unregister_code(KC_ESC); break; + case DOUBLE_TAP: unregister_code(KC_ESC); break; + case DOUBLE_HOLD: break; + case DOUBLE_SINGLE_TAP: unregister_code(KC_ESC); break; + case TRIPLE_TAP: unregister_code(KC_ESC); break; + case TRIPLE_HOLD: break; + case TRIPLE_SINGLE_TAP: unregister_code(KC_ESC); break; + } + tap_state.state = 0; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + // Single tap = Backspace | Double tap = Delete + [TD_BSPC_DEL] = ACTION_TAP_DANCE_DOUBLE(KC_BSPC, KC_DEL), + // Single tap = ( | Double tap = [ | Triple tap = { | Single hold = KC_LCTL + [TD_LCTL_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, left_brackets, left_brackets_reset), + // Single tap = ) | Double tap = ] | Triple tap = } | Single hold = KC_LALT + [TD_LALT_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, right_brackets, right_brackets_reset), + // Layer Switcher ESC + [TD_ESC_LAYER] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, layer_switcher, layer_switcher_reset, 100), +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( \ + + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+. + //| | | | | | | | | | | | | + TD(TD_ESC_LAYER), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSLS, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_SLSH, KC_UP, SFT_T(KC_ENT), \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + TD(TD_LCTL_LBRC), KC_LGUI, TD(TD_LALT_RBRC), _______, _______, LT(_FN, KC_SPC), _______, LT(_FX, KC_SPC), KC_COMM, KC_LEFT, KC_DOWN, KC_RGHT \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+' + ), + + [_COLEMAK] = LAYOUT( \ + + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+. + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, KC_R, KC_S, KC_T, KC_D, _______, KC_N, KC_E, KC_I, KC_O, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, KC_K, _______, _______, _______, _______, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+' + ), + + [_FN] = LAYOUT( \ + + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+. + //| | | | | | | | | | | | | + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_EQUAL, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINUS, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+' + ), + + [_FX] = LAYOUT( \ + + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+. + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, _______, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_HUI, RGB_TOG, \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+| + //| | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_HUD, RGB_SAD \ + //| | | | | | | | | | | | | + //,----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+-----------------+' + ), + + +}; diff --git a/keyboards/jj50/keymaps/archetype/rules.mk b/keyboards/jj50/keymaps/archetype/rules.mk new file mode 100644 index 000000000000..e32e8ce741ec --- /dev/null +++ b/keyboards/jj50/keymaps/archetype/rules.mk @@ -0,0 +1,65 @@ +# Copyright 2017 Luiz Ribeiro +# Modified 2018 Wayne Jones (WarmCatUK) + +# 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 . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes +NKRO_ENABLE = no +# Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +TAP_DANCE_ENABLE = yes +AUTO_SHIFT_ENABLE = yes + + +DISABLE_WS2812 = no + +KEY_LOCK_ENABLE = yes +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + + +#OPT_DEFS = -DDEBUG_LEVEL=0 + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c i2c.c backlight.c + +# programming options +PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex + +LAYOUTS = ortho_5x12 diff --git a/keyboards/jj50/keymaps/default/keymap.c b/keyboards/jj50/keymaps/default/keymap.c index 9d753eb8e6ea..d5334d4956b9 100644 --- a/keyboards/jj50/keymaps/default/keymap.c +++ b/keyboards/jj50/keymaps/default/keymap.c @@ -18,8 +18,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "rgblight.h" #define ______ KC_TRNS #define _DEFLT 0 @@ -113,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______,S(KC_NUHS),S(KC_NUBS),KC_HOME, KC_END, _______, \ BL_STEP, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), - + /* Fn * ,-----------------------------------------------------------------------------------. * | | | £ | | | | | | | | | | diff --git a/keyboards/jj50/program b/keyboards/jj50/program deleted file mode 100644 index a88d9cd9b042..000000000000 --- a/keyboards/jj50/program +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Luiz Ribeiro -# -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -print('Searching for ps2avrGB... ', end='') - -dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D) -if dev is None: - raise ValueError('Device not found') - -print('Found', end='\n\n') - -print('Device Information:') -print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) -print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) -print('Manufacturer: %s' % (dev.iManufacturer)) -print('Serial: %s' % (dev.iSerialNumber)) -print('Product: %s' % (dev.iProduct), end='\n\n') - -print('Transferring control to bootloader... ', end='') - -dev.set_configuration() - -request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - -USBRQ_HID_SET_REPORT = 0x09 -HID_REPORT_OPTION = 0x0301 - - -try: - dev.ctrl_transfer( - request_type, - USBRQ_HID_SET_REPORT, - HID_REPORT_OPTION, - 0, - [0, 0, 0xFF] + [0] * 5 - ) -except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - -# wait a bit until bootloader starts up -time.sleep(2) - -print('OK') -print('Programming...') -if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0: - print('\nDone!') diff --git a/keyboards/jj50/rules.mk b/keyboards/jj50/rules.mk index 1a18ec4fe4fa..4ee5719185ea 100644 --- a/keyboards/jj50/rules.mk +++ b/keyboards/jj50/rules.mk @@ -58,6 +58,6 @@ CUSTOM_MATRIX = yes SRC = matrix.c i2c.c backlight.c # programming options -PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex LAYOUTS = ortho_5x12 diff --git a/keyboards/jm60/keymaps/default/keymap.c b/keyboards/jm60/keymaps/default/keymap.c index 091a214f5b1b..6ca04c505674 100644 --- a/keyboards/jm60/keymaps/default/keymap.c +++ b/keyboards/jm60/keymaps/default/keymap.c @@ -11,8 +11,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/jm60/keymaps/poker3/keymap.c b/keyboards/jm60/keymaps/poker3/keymap.c index 422ab3023670..07f432dcd883 100644 --- a/keyboards/jm60/keymaps/poker3/keymap.c +++ b/keyboards/jm60/keymaps/poker3/keymap.c @@ -10,8 +10,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer */ diff --git a/keyboards/k_type/keymaps/belak/keymap.c b/keyboards/k_type/keymaps/belak/keymap.c index 1f59630b1e2b..ed9392a2a594 100644 --- a/keyboards/k_type/keymaps/belak/keymap.c +++ b/keyboards/k_type/keymaps/belak/keymap.c @@ -1,7 +1,5 @@ #include "k_type.h" -#define _______ KC_TRNS - #define _QW 0 #define _L1 1 diff --git a/keyboards/k_type/keymaps/default/keymap.c b/keyboards/k_type/keymaps/default/keymap.c index 29d93c107223..331d33155279 100644 --- a/keyboards/k_type/keymaps/default/keymap.c +++ b/keyboards/k_type/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "k_type.h" +#include QMK_KEYBOARD_H const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( diff --git a/keyboards/k_type/rules.mk b/keyboards/k_type/rules.mk index a1c56903b5c6..7762f1868204 100644 --- a/keyboards/k_type/rules.mk +++ b/keyboards/k_type/rules.mk @@ -57,6 +57,7 @@ ARMV = 7 OPT_DEFS = DFU_ARGS = -d 1c11:b007 +DFU_SUFFIX_ARGS = -p b007 -v 1c11 # Build Options # comment out to disable the options. diff --git a/keyboards/kagamidget/config.h b/keyboards/kagamidget/config.h new file mode 100644 index 000000000000..fc9463aee018 --- /dev/null +++ b/keyboards/kagamidget/config.h @@ -0,0 +1,222 @@ +/* +Copyright 2019 yynmt + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yynmt +#define PRODUCT KagaMidget +#define DESCRIPTION 48 keys tiny keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D1, D0, F4, F5 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + + +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 4 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/*#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +)*/ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kagamidget/info.json b/keyboards/kagamidget/info.json new file mode 100644 index 000000000000..a9e0dd1b8fea --- /dev/null +++ b/keyboards/kagamidget/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "KagaMidget", + "url": "http://yynmt.com", + "maintainer": "yynmt", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 48, + "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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3} + ] + } + } +} diff --git a/keyboards/kagamidget/kagamidget.c b/keyboards/kagamidget/kagamidget.c new file mode 100644 index 000000000000..1f790c9e7779 --- /dev/null +++ b/keyboards/kagamidget/kagamidget.c @@ -0,0 +1,43 @@ +/* Copyright 2019 yynmt + * + * 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 . + */ +#include "kagamidget.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/kagamidget/kagamidget.h b/keyboards/kagamidget/kagamidget.h new file mode 100644 index 000000000000..e0655a4e989d --- /dev/null +++ b/keyboards/kagamidget/kagamidget.h @@ -0,0 +1,39 @@ +/* Copyright 2019 yynmt + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K01, K05, K09, K13, K17, K21, K25, K29, K33, K37, K41, K45, \ + K02, K06, K10, K14, K18, K22, K26, K30, K34, K38, K42, K46, \ + K03, K07, K11, K15, K19, K23, K27, K31, K35, K39, K43, K47, \ + K04, K08, K12, K16, K20, K24, K28, K32, K36, K40, K44, K48 \ +) \ +{ \ + { K01, K05, K09, K13, K17, K21, K25, K29, K33, K37, K41, K45 }, \ + { K02, K06, K10, K14, K18, K22, K26, K30, K34, K38, K42, K46 }, \ + { K03, K07, K11, K15, K19, K23, K27, K31, K35, K39, K43, K47 }, \ + { K04, K08, K12, K16, K20, K24, K28, K32, K36, K40, K44, K48 }, \ +} diff --git a/keyboards/kagamidget/keymaps/default/config.h b/keyboards/kagamidget/keymaps/default/config.h new file mode 100644 index 000000000000..bab59c67e07a --- /dev/null +++ b/keyboards/kagamidget/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 yynmt + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/kagamidget/keymaps/default/keymap.c b/keyboards/kagamidget/keymaps/default/keymap.c new file mode 100644 index 000000000000..3d9a95470087 --- /dev/null +++ b/keyboards/kagamidget/keymaps/default/keymap.c @@ -0,0 +1,118 @@ +/* Copyright 2019 yynmt + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_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_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_RSFT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( + 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 + ), +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| Debug|RGBTog|RGBMod|RGBHuI|RGBHuD|RGBSaI|RGBSaD|RGBVaI|RGBVaD| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kagamidget/keymaps/default/readme.md b/keyboards/kagamidget/keymaps/default/readme.md new file mode 100644 index 000000000000..9ce02fb09d36 --- /dev/null +++ b/keyboards/kagamidget/keymaps/default/readme.md @@ -0,0 +1,49 @@ +# The default keymap for KagaMidget +## Qwerty +``` +,-----------------------------------------------------------------------------------. +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Esc | A | S | D | F | G | H | J | K | L | ; | " | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Shift| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` +## Lower +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' + ``` +## Raise +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` +## Adjust (Lower + Raise) +``` +,-----------------------------------------------------------------------------------. +| | Reset| Debug|RGBTog|RGBMod|RGBHuI|RGBHuD|RGBSaI|RGBSaD|RGBVaI|RGBVaD| Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/kagamidget/readme.md b/keyboards/kagamidget/readme.md new file mode 100644 index 000000000000..af38fdd8589d --- /dev/null +++ b/keyboards/kagamidget/readme.md @@ -0,0 +1,14 @@ +# KagaMidget + +![KagaMidget](https://raw.githubusercontent.com/yynmt/KagaMidget/master/images/main_image.jpg) + +KagaMidget is 40% tiny keyboard. + +Keyboard Maintainer: [yynmt](https://github.com/yynmt) +Hardware Supported: KagaMidget PCBs, ProMicro supported + +Make example for this keyboard (after setting up your build environment): + + make kagamidget: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). diff --git a/keyboards/kagamidget/rules.mk b/keyboards/kagamidget/rules.mk new file mode 100644 index 000000000000..50608d9857c4 --- /dev/null +++ b/keyboards/kagamidget/rules.mk @@ -0,0 +1,83 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/katana60/config.h b/keyboards/katana60/config.h index 177a09ff4507..eb67c0b214eb 100644 --- a/keyboards/katana60/config.h +++ b/keyboards/katana60/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B7, B3, B2, B1, B0, C7, D1, D2, C6, B6, B5, B4, D4, D6, D7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/katana60/keymaps/colemak/keymap.c b/keyboards/katana60/keymaps/colemak/keymap.c index 63768f9372a8..b0ed04185435 100644 --- a/keyboards/katana60/keymaps/colemak/keymap.c +++ b/keyboards/katana60/keymaps/colemak/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Windows based definitions. #define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer #define K_PRVWD LCTL(KC_LEFT) // Previous word diff --git a/keyboards/katana60/keymaps/default/config.h b/keyboards/katana60/keymaps/default/config.h index 08c51f6cb50c..c4bea7eb0318 100644 --- a/keyboards/katana60/keymaps/default/config.h +++ b/keyboards/katana60/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/katana60/keymaps/default/keymap.c b/keyboards/katana60/keymaps/default/keymap.c index d4e77e26da17..04ea6fbc6e2f 100644 --- a/keyboards/katana60/keymaps/default/keymap.c +++ b/keyboards/katana60/keymaps/default/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Windows based definitions. #define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer #define K_PRVWD LCTL(KC_LEFT) // Previous word diff --git a/keyboards/katana60/keymaps/msiu/config.h b/keyboards/katana60/keymaps/msiu/config.h new file mode 100644 index 000000000000..b57cc482ec70 --- /dev/null +++ b/keyboards/katana60/keymaps/msiu/config.h @@ -0,0 +1,21 @@ +/* Copyright 2017 Baris Tosun + * + * 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 . + */ + +#pragma once + + +// place overrides here + diff --git a/keyboards/katana60/keymaps/msiu/keymap.c b/keyboards/katana60/keymaps/msiu/keymap.c new file mode 100644 index 000000000000..72b795baa599 --- /dev/null +++ b/keyboards/katana60/keymaps/msiu/keymap.c @@ -0,0 +1,70 @@ +#include QMK_KEYBOARD_H + +// Mod-Tap keys for cleaner code +#define ESC_CTL LCTL_T(KC_ESC) +#define SPC_LW LT(2, KC_SPC) +#define ENT_FN LT(4, KC_ENT) + +#define _QW 0 +#define _DV 1 +#define _LW 2 +#define _RS 3 +#define _FN 4 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QW] = LAYOUT( /* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, TG(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + ESC_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, 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_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_HYPR, KC_LALT, KC_LGUI, SPC_LW, ENT_FN, KC_SPC, MO(3), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), +[_DV] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, _______, KC_F, KC_G, KC_C, KC_R, KC_L, _______, + _______, KC_A, KC_O, KC_E, KC_U, KC_I, _______, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, _______, _______, _______, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +[_LW] = LAYOUT( + _______, _______, 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_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, 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, _______, _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +[_RS] = LAYOUT( + _______, _______, 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_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT + ), +[_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + + + + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/katana60/keymaps/msiu/readme.md b/keyboards/katana60/keymaps/msiu/readme.md new file mode 100644 index 000000000000..e4f0ebdb6ec3 --- /dev/null +++ b/keyboards/katana60/keymaps/msiu/readme.md @@ -0,0 +1,3 @@ +# msiu's keymap for katana: standard QWERTY layout with planck like layers + +This layout take a standard QWERTY default layer, with raise and lower layers similar to planck. It is for me to easily transition between keyboards. I put a few nav keys in the 'tree' middle, but I have come to realise I rarely use them as I am used to the planck layering. Top of the tree is a toggle for Dvorak layer. diff --git a/keyboards/katana60/keymaps/rominronin/keymap.c b/keyboards/katana60/keymaps/rominronin/keymap.c index cb8427f10c89..7af9ab87f333 100644 --- a/keyboards/katana60/keymaps/rominronin/keymap.c +++ b/keyboards/katana60/keymaps/rominronin/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // MacOS based definitions. #define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer #define K_PRVWD LALT(KC_LEFT) // Previous word diff --git a/keyboards/kbdfans/kbd19x/config.h b/keyboards/kbdfans/kbd19x/config.h index 03b701b1cc98..9c5f2ba38e3f 100644 --- a/keyboards/kbdfans/kbd19x/config.h +++ b/keyboards/kbdfans/kbd19x/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C6, F1, F4, F5, F6, F7, D7, B4, B5, D0, D1, D2, D3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/kbdfans/kbd19x/info.json b/keyboards/kbdfans/kbd19x/info.json index 31f2f9cf57eb..c24ed9caa5cf 100644 --- a/keyboards/kbdfans/kbd19x/info.json +++ b/keyboards/kbdfans/kbd19x/info.json @@ -1,218 +1,221 @@ { "keyboard_name": "KBD19x", - "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbd19x", + "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/kbdfans/kbd19x", "maintainer": "qmk", "width": 19.5, "height": 6.75, "layouts": { "LAYOUT_ansi": { - "key_count": 99, - "layout": [{"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":1.25, "y":0}, - {"label":"F2", "x":2.25, "y":0}, - {"label":"F3", "x":3.25, "y":0}, - {"label":"F4", "x":4.25, "y":0}, - {"label":"F5", "x":5.5, "y":0}, - {"label":"F6", "x":6.5, "y":0}, - {"label":"F7", "x":7.5, "y":0}, - {"label":"F8", "x":8.5, "y":0}, - {"label":"F9", "x":9.75, "y":0}, - {"label":"F10", "x":10.75, "y":0}, - {"label":"F11", "x":11.75, "y":0}, - {"label":"F12", "x":12.75, "y":0}, - {"label":"BkLgt Step", "x":14, "y":0}, - {"label":"Print Screen", "x":15.5, "y":0}, - {"label":"Scroll Lock", "x":16.5, "y":0}, - {"label":"Pause Break", "x":17.5, "y":0}, - {"label":"PgDn", "x":18.5, "y":0}, - {"label":"~", "x":0, "y":1.5}, - {"label":"!", "x":1, "y":1.5}, - {"label":"@", "x":2, "y":1.5}, - {"label":"#", "x":3, "y":1.5}, - {"label":"$", "x":4, "y":1.5}, - {"label":"%", "x":5, "y":1.5}, - {"label":"^", "x":6, "y":1.5}, - {"label":"&", "x":7, "y":1.5}, - {"label":"*", "x":8, "y":1.5}, - {"label":"(", "x":9, "y":1.5}, - {"label":")", "x":10, "y":1.5}, - {"label":"_", "x":11, "y":1.5}, - {"label":"+", "x":12, "y":1.5}, - {"label":"Backspace", "x":13, "y":1.5, "w":2}, - {"label":"Num Lock", "x":15.5, "y":1.5}, - {"label":"/", "x":16.5, "y":1.5}, - {"label":"*", "x":17.5, "y":1.5}, - {"label":"-", "x":18.5, "y":1.5}, - {"label":"Tab", "x":0, "y":2.5, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.5}, - {"label":"W", "x":2.5, "y":2.5}, - {"label":"E", "x":3.5, "y":2.5}, - {"label":"R", "x":4.5, "y":2.5}, - {"label":"T", "x":5.5, "y":2.5}, - {"label":"Y", "x":6.5, "y":2.5}, - {"label":"U", "x":7.5, "y":2.5}, - {"label":"I", "x":8.5, "y":2.5}, - {"label":"O", "x":9.5, "y":2.5}, - {"label":"P", "x":10.5, "y":2.5}, - {"label":"{", "x":11.5, "y":2.5}, - {"label":"}", "x":12.5, "y":2.5}, - {"label":"|", "x":13.5, "y":2.5, "w":1.5}, - {"label":"7", "x":15.5, "y":2.5}, - {"label":"8", "x":16.5, "y":2.5}, - {"label":"9", "x":17.5, "y":2.5}, - {"label":"+", "x":18.5, "y":2.5, "h":2}, - {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, - {"label":"A", "x":1.75, "y":3.5}, - {"label":"S", "x":2.75, "y":3.5}, - {"label":"D", "x":3.75, "y":3.5}, - {"label":"F", "x":4.75, "y":3.5}, - {"label":"G", "x":5.75, "y":3.5}, - {"label":"H", "x":6.75, "y":3.5}, - {"label":"J", "x":7.75, "y":3.5}, - {"label":"K", "x":8.75, "y":3.5}, - {"label":"L", "x":9.75, "y":3.5}, - {"label":":", "x":10.75, "y":3.5}, - {"label":"\"", "x":11.75, "y":3.5}, - {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, - {"label":"4", "x":15.5, "y":3.5}, - {"label":"5", "x":16.5, "y":3.5}, - {"label":"6", "x":17.5, "y":3.5}, - {"label":"Shift", "x":0, "y":4.5, "w":2.25}, - {"label":"Z", "x":2.25, "y":4.5}, - {"label":"X", "x":3.25, "y":4.5}, - {"label":"C", "x":4.25, "y":4.5}, - {"label":"V", "x":5.25, "y":4.5}, - {"label":"B", "x":6.25, "y":4.5}, - {"label":"N", "x":7.25, "y":4.5}, - {"label":"M", "x":8.25, "y":4.5}, - {"label":"<", "x":9.25, "y":4.5}, - {"label":">", "x":10.25, "y":4.5}, - {"label":"?", "x":11.25, "y":4.5}, - {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, - {"label":"1", "x":15.5, "y":4.5}, - {"label":"2", "x":16.5, "y":4.5}, - {"label":"3", "x":17.5, "y":4.5}, - {"label":"Enter", "x":18.5, "y":4.5, "h":2}, - {"label":"\u2191", "x":14.25, "y":4.75}, - {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, - {"label":"Win", "x":1.25, "y":5.5}, - {"label":"Alt", "x":2.25, "y":5.5, "w":1.25}, - {"x":3.5, "y":5.5, "w":6.25}, - {"label":"Alt", "x":9.75, "y":5.5}, - {"label":"MO(1)", "x":10.75, "y":5.5}, - {"label":"Ctrl", "x":11.75, "y":5.5, "w":1.25}, - {"label":"0", "x":16.5, "y":5.5}, - {"label":".", "x":17.5, "y":5.5}, - {"label":"\u2190", "x":13.25, "y":5.75}, - {"label":"\u2193", "x":14.25, "y":5.75}, - {"label":"\u2192", "x":15.25, "y":5.75}] + "key_count": 99, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":6.5, "y":0}, + {"label":"F7", "x":7.5, "y":0}, + {"label":"F8", "x":8.5, "y":0}, + {"label":"F9", "x":9.75, "y":0}, + {"label":"F10", "x":10.75, "y":0}, + {"label":"F11", "x":11.75, "y":0}, + {"label":"F12", "x":12.75, "y":0}, + {"label":"Extra Esc", "x":14, "y":0}, + {"label":"PrtSc", "x":15.5, "y":0}, + {"label":"Pause", "x":16.5, "y":0}, + {"label":"Insert", "x":17.5, "y":0}, + {"label":"Home", "x":18.5, "y":0}, + {"label":"`~", "x":0, "y":1.5}, + {"label":"1!", "x":1, "y":1.5}, + {"label":"2@", "x":2, "y":1.5}, + {"label":"3#", "x":3, "y":1.5}, + {"label":"4$", "x":4, "y":1.5}, + {"label":"5%", "x":5, "y":1.5}, + {"label":"6^", "x":6, "y":1.5}, + {"label":"7&", "x":7, "y":1.5}, + {"label":"8*", "x":8, "y":1.5}, + {"label":"9(", "x":9, "y":1.5}, + {"label":"0)", "x":10, "y":1.5}, + {"label":"-_", "x":11, "y":1.5}, + {"label":"=+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Num Lock", "x":15.5, "y":1.5}, + {"label":"/", "x":16.5, "y":1.5}, + {"label":"*", "x":17.5, "y":1.5}, + {"label":"-", "x":18.5, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"[{", "x":11.5, "y":2.5}, + {"label":"]}", "x":12.5, "y":2.5}, + {"label":"\\|", "x":13.5, "y":2.5, "w":1.5}, + {"label":"7", "x":15.5, "y":2.5}, + {"label":"8", "x":16.5, "y":2.5}, + {"label":"9", "x":17.5, "y":2.5}, + {"label":"+", "x":18.5, "y":2.5, "h":2}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":";:", "x":10.75, "y":3.5}, + {"label":"'\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + {"label":"4", "x":15.5, "y":3.5}, + {"label":"5", "x":16.5, "y":3.5}, + {"label":"6", "x":17.5, "y":3.5}, + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":",<", "x":9.25, "y":4.5}, + {"label":".>", "x":10.25, "y":4.5}, + {"label":"/?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, + {"label":"Up", "x":14.25, "y":4.75}, + {"label":"1", "x":15.5, "y":4.5}, + {"label":"2", "x":16.5, "y":4.5}, + {"label":"3", "x":17.5, "y":4.5}, + {"label":"Enter", "x":18.5, "y":4.5, "h":2}, + {"label":"Control", "x":0, "y":5.5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5.5}, + {"label":"Alt", "x":2.25, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.5, "y":5.5, "w":6.25}, + {"label":"Alt", "x":9.75, "y":5.5}, + {"label":"Fn", "x":10.75, "y":5.5}, + {"label":"Control", "x":11.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":13.25, "y":5.75}, + {"label":"Right", "x":14.25, "y":5.75}, + {"label":"Down", "x":15.25, "y":5.75}, + {"label":"0", "x":16.5, "y":5.5}, + {"label":".", "x":17.5, "y":5.5} + ] }, "LAYOUT_all": { - "key_count": 103, - "layout": [{"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":1.25, "y":0}, - {"label":"F2", "x":2.25, "y":0}, - {"label":"F3", "x":3.25, "y":0}, - {"label":"F4", "x":4.25, "y":0}, - {"label":"F5", "x":5.5, "y":0}, - {"label":"F6", "x":6.5, "y":0}, - {"label":"F7", "x":7.5, "y":0}, - {"label":"F8", "x":8.5, "y":0}, - {"label":"F9", "x":9.75, "y":0}, - {"label":"F10", "x":10.75, "y":0}, - {"label":"F11", "x":11.75, "y":0}, - {"label":"F12", "x":12.75, "y":0}, - {"label":"BkLgt Step", "x":14, "y":0}, - {"label":"Print Screen", "x":15.5, "y":0}, - {"label":"Scroll Lock", "x":16.5, "y":0}, - {"label":"Pause Break", "x":17.5, "y":0}, - {"label":"PgDn", "x":18.5, "y":0}, - {"label":"~", "x":0, "y":1.5}, - {"label":"!", "x":1, "y":1.5}, - {"label":"@", "x":2, "y":1.5}, - {"label":"#", "x":3, "y":1.5}, - {"label":"$", "x":4, "y":1.5}, - {"label":"%", "x":5, "y":1.5}, - {"label":"^", "x":6, "y":1.5}, - {"label":"&", "x":7, "y":1.5}, - {"label":"*", "x":8, "y":1.5}, - {"label":"(", "x":9, "y":1.5}, - {"label":")", "x":10, "y":1.5}, - {"label":"_", "x":11, "y":1.5}, - {"label":"+", "x":12, "y":1.5}, - {"x":13, "y":1.5}, - {"label":"BS", "x":14, "y":1.5}, - {"label":"Num Lock", "x":15.5, "y":1.5}, - {"label":"/", "x":16.5, "y":1.5}, - {"label":"*", "x":17.5, "y":1.5}, - {"label":"-", "x":18.5, "y":1.5}, - {"label":"Tab", "x":0, "y":2.5, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.5}, - {"label":"W", "x":2.5, "y":2.5}, - {"label":"E", "x":3.5, "y":2.5}, - {"label":"R", "x":4.5, "y":2.5}, - {"label":"T", "x":5.5, "y":2.5}, - {"label":"Y", "x":6.5, "y":2.5}, - {"label":"U", "x":7.5, "y":2.5}, - {"label":"I", "x":8.5, "y":2.5}, - {"label":"O", "x":9.5, "y":2.5}, - {"label":"P", "x":10.5, "y":2.5}, - {"label":"{", "x":11.5, "y":2.5}, - {"label":"}", "x":12.5, "y":2.5}, - {"label":"|", "x":13.5, "y":2.5, "w":1.5}, - {"label":"7", "x":15.5, "y":2.5}, - {"label":"8", "x":16.5, "y":2.5}, - {"label":"9", "x":17.5, "y":2.5}, - {"label":"+", "x":18.5, "y":2.5}, - {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, - {"label":"A", "x":1.75, "y":3.5}, - {"label":"S", "x":2.75, "y":3.5}, - {"label":"D", "x":3.75, "y":3.5}, - {"label":"F", "x":4.75, "y":3.5}, - {"label":"G", "x":5.75, "y":3.5}, - {"label":"H", "x":6.75, "y":3.5}, - {"label":"J", "x":7.75, "y":3.5}, - {"label":"K", "x":8.75, "y":3.5}, - {"label":"L", "x":9.75, "y":3.5}, - {"label":":", "x":10.75, "y":3.5}, - {"label":"\"", "x":11.75, "y":3.5}, - {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, - {"label":"4", "x":15.5, "y":3.5}, - {"label":"5", "x":16.5, "y":3.5}, - {"label":"6", "x":17.5, "y":3.5}, - {"x":18.5, "y":3.5}, - {"label":"Shift", "x":0, "y":4.5, "w":1.25}, - {"x":1.25, "y":4.5}, - {"label":"Z", "x":2.25, "y":4.5}, - {"label":"X", "x":3.25, "y":4.5}, - {"label":"C", "x":4.25, "y":4.5}, - {"label":"V", "x":5.25, "y":4.5}, - {"label":"B", "x":6.25, "y":4.5}, - {"label":"N", "x":7.25, "y":4.5}, - {"label":"M", "x":8.25, "y":4.5}, - {"label":"<", "x":9.25, "y":4.5}, - {"label":">", "x":10.25, "y":4.5}, - {"label":"?", "x":11.25, "y":4.5}, - {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, - {"label":"1", "x":15.5, "y":4.5}, - {"label":"2", "x":16.5, "y":4.5}, - {"label":"3", "x":17.5, "y":4.5}, - {"label":"Enter", "x":18.5, "y":4.5}, - {"label":"\u2191", "x":14.25, "y":4.75}, - {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, - {"label":"Win", "x":1.25, "y":5.5}, - {"label":"Alt", "x":2.25, "y":5.5, "w":1.25}, - {"x":3.5, "y":5.5, "w":6.25}, - {"label":"Alt", "x":9.75, "y":5.5}, - {"label":"Menu", "x":10.75, "y":5.5}, - {"label":"Ctrl", "x":11.75, "y":5.5, "w":1.25}, - {"label":"0", "x":16.5, "y":5.5}, - {"label":".", "x":17.5, "y":5.5}, - {"x":18.5, "y":5.5}, - {"label":"\u2190", "x":13.25, "y":5.75}, - {"label":"\u2193", "x":14.25, "y":5.75}, - {"label":"\u2192", "x":15.25, "y":5.75}] + "key_count": 103, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":6.5, "y":0}, + {"label":"F7", "x":7.5, "y":0}, + {"label":"F8", "x":8.5, "y":0}, + {"label":"F9", "x":9.75, "y":0}, + {"label":"F10", "x":10.75, "y":0}, + {"label":"F11", "x":11.75, "y":0}, + {"label":"F12", "x":12.75, "y":0}, + {"label":"Extra Esc", "x":14, "y":0}, + {"label":"PrtSc", "x":15.5, "y":0}, + {"label":"Pause", "x":16.5, "y":0}, + {"label":"Insert", "x":17.5, "y":0}, + {"label":"Home", "x":18.5, "y":0}, + {"label":"`~", "x":0, "y":1.5}, + {"label":"1!", "x":1, "y":1.5}, + {"label":"2@", "x":2, "y":1.5}, + {"label":"3#", "x":3, "y":1.5}, + {"label":"4$", "x":4, "y":1.5}, + {"label":"5%", "x":5, "y":1.5}, + {"label":"6^", "x":6, "y":1.5}, + {"label":"7&", "x":7, "y":1.5}, + {"label":"8*", "x":8, "y":1.5}, + {"label":"9(", "x":9, "y":1.5}, + {"label":"0)", "x":10, "y":1.5}, + {"label":"-_", "x":11, "y":1.5}, + {"label":"=+", "x":12, "y":1.5}, + {"label":"Split Backspace (Left)", "x":13, "y":1.5}, + {"label":"Split Backspace (Right)", "x":14, "y":1.5}, + {"label":"Num Lock", "x":15.5, "y":1.5}, + {"label":"/", "x":16.5, "y":1.5}, + {"label":"*", "x":17.5, "y":1.5}, + {"label":"-", "x":18.5, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"[{", "x":11.5, "y":2.5}, + {"label":"]}", "x":12.5, "y":2.5}, + {"label":"\\|", "x":13.5, "y":2.5, "w":1.5}, + {"label":"7", "x":15.5, "y":2.5}, + {"label":"8", "x":16.5, "y":2.5}, + {"label":"9", "x":17.5, "y":2.5}, + {"label":"Split + (Top)", "x":18.5, "y":2.5}, + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":";:", "x":10.75, "y":3.5}, + {"label":"'\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + {"label":"4", "x":15.5, "y":3.5}, + {"label":"5", "x":16.5, "y":3.5}, + {"label":"6", "x":17.5, "y":3.5}, + {"label":"Split + (Bottom)", "x":18.5, "y":3.5}, + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"ISO Backslash", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":",<", "x":9.25, "y":4.5}, + {"label":".>", "x":10.25, "y":4.5}, + {"label":"/?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, + {"label":"Up", "x":14.25, "y":4.75}, + {"label":"1", "x":15.5, "y":4.5}, + {"label":"2", "x":16.5, "y":4.5}, + {"label":"3", "x":17.5, "y":4.5}, + {"label":"Split Enter (Top)", "x":18.5, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5.5}, + {"label":"Alt", "x":2.25, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.5, "y":5.5, "w":6.25}, + {"label":"Alt", "x":9.75, "y":5.5}, + {"label":"Fn", "x":10.75, "y":5.5}, + {"label":"Ctrl", "x":11.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":13.25, "y":5.75}, + {"label":"Down", "x":14.25, "y":5.75}, + {"label":"Right", "x":15.25, "y":5.75}, + {"label":"0", "x":16.5, "y":5.5}, + {"label":".", "x":17.5, "y":5.5}, + {"label":"Split Enter (Bottom)", "x":18.5, "y":5.5} + ] } } } - diff --git a/keyboards/kbdfans/kbd19x/kbd19x.c b/keyboards/kbdfans/kbd19x/kbd19x.c index 360345600d02..e6cd77d656bf 100644 --- a/keyboards/kbdfans/kbd19x/kbd19x.c +++ b/keyboards/kbdfans/kbd19x/kbd19x.c @@ -17,6 +17,15 @@ along with this program. If not, see . #include "kbd19x.h" +extern inline void kbd19x_caps_led_on(void); +extern inline void kbd19x_caps_led_off(void); + +extern inline void kbd19x_sclk_led_on(void); +extern inline void kbd19x_sclk_led_off(void); + +extern inline void kbd19x_nmlk_led_on(void); +extern inline void kbd19x_nmlk_led_off(void); + void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up diff --git a/keyboards/kbdfans/kbd19x/kbd19x.h b/keyboards/kbdfans/kbd19x/kbd19x.h index 728c7ca5ca8b..73f3cbe16c84 100644 --- a/keyboards/kbdfans/kbd19x/kbd19x.h +++ b/keyboards/kbdfans/kbd19x/kbd19x.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef KBD19X_H -#define KBD19X_H +#pragma once #include "quantum.h" #include "led.h" @@ -100,4 +99,3 @@ inline void kbd19x_nmlk_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } {k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\ {XXX, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\ } -#endif diff --git a/keyboards/kbdfans/kbd19x/readme.md b/keyboards/kbdfans/kbd19x/readme.md index 80b84b5f75f5..50adfb77f0a1 100644 --- a/keyboards/kbdfans/kbd19x/readme.md +++ b/keyboards/kbdfans/kbd19x/readme.md @@ -8,6 +8,8 @@ The KBD19x is a compact-1800 keyboard kit produced by KBDfans, offering a number of layout options. +**Reset Sequence:** Using this firmware sets `BOOTLOADER_ENABLE` to `lite`. While plugging in, hold the top left key, commonly programmed as `Esc` to put your board into bootloader mode. + Keyboard Maintainer: [jshuf](https://github.com/jshuf) Hardware Supported: KBD19x PCB Hardware Availability: [KBDfans](https://kbdfans.cn) diff --git a/keyboards/kbdfans/kbd19x/rules.mk b/keyboards/kbdfans/kbd19x/rules.mk index 8e50962afafb..b7a08f241c86 100644 --- a/keyboards/kbdfans/kbd19x/rules.mk +++ b/keyboards/kbdfans/kbd19x/rules.mk @@ -61,8 +61,8 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboards/kbdfans/kbd4x/config.h b/keyboards/kbdfans/kbd4x/config.h index cac4ed95d11d..c99fcc73fa7a 100644 --- a/keyboards/kbdfans/kbd4x/config.h +++ b/keyboards/kbdfans/kbd4x/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B3, B1, B0, D5, B7, C7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/kbdfans/kbd4x/info.json b/keyboards/kbdfans/kbd4x/info.json index f9952e790311..28883b265a0d 100644 --- a/keyboards/kbdfans/kbd4x/info.json +++ b/keyboards/kbdfans/kbd4x/info.json @@ -2,7 +2,7 @@ "keyboard_name": "kbd4x", "url": "", "maintainer": "qmk", - "width": 14, + "width": 12, "height": 4, "layouts": { "LAYOUT_planck_mit": { diff --git a/keyboards/kbdfans/kbd4x/kbd4x.h b/keyboards/kbdfans/kbd4x/kbd4x.h index d7a851e3ebd0..ab31d3657f8b 100644 --- a/keyboards/kbdfans/kbd4x/kbd4x.h +++ b/keyboards/kbdfans/kbd4x/kbd4x.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KBD4X_H -#define KBD4X_H +#pragma once #include "quantum.h" @@ -22,13 +21,13 @@ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ ) \ { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \ + { k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \ } // The PCB does support a grid layout, but the case does not. @@ -36,13 +35,24 @@ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ ) \ { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ } -#endif +#define LAYOUT_kc_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \ + { KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \ + { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \ + { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b } \ +} diff --git a/keyboards/kbdfans/kbd4x/rules.mk b/keyboards/kbdfans/kbd4x/rules.mk index 6cfd92bc63b1..639546d6c234 100644 --- a/keyboards/kbdfans/kbd4x/rules.mk +++ b/keyboards/kbdfans/kbd4x/rules.mk @@ -62,10 +62,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = no # Console for debug(+400) 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 @@ -79,3 +79,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/kbdfans/kbd66/config.h b/keyboards/kbdfans/kbd66/config.h index f9990c0e4fee..730df130778a 100644 --- a/keyboards/kbdfans/kbd66/config.h +++ b/keyboards/kbdfans/kbd66/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C6, C7, E2, F5, F6, F4, D3, D2, D5, D0, D1, B4, D7, D6, E6, B3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 @@ -182,4 +181,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#endif diff --git a/keyboards/kbdfans/kbd66/kbd66.h b/keyboards/kbdfans/kbd66/kbd66.h index 6a4b99ec4259..797b331b0d72 100644 --- a/keyboards/kbdfans/kbd66/kbd66.h +++ b/keyboards/kbdfans/kbd66/kbd66.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KBD66_H -#define KBD66_H +#pragma once #include "quantum.h" @@ -33,4 +32,3 @@ { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, k48, KC_NO, k4A, k4B, k4C, k4D, k4E, k4F}, \ } -#endif diff --git a/keyboards/kbdfans/kbd66/keymaps/default/config.h b/keyboards/kbdfans/kbd66/keymaps/default/config.h index c7b3d6ecc333..6d42fc568a1a 100644 --- a/keyboards/kbdfans/kbd66/keymaps/default/config.h +++ b/keyboards/kbdfans/kbd66/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h b/keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h old mode 100755 new mode 100644 diff --git a/keyboards/kbdfans/kbd66/rules.mk b/keyboards/kbdfans/kbd66/rules.mk index dcc9b5bbd65f..764bdf424f91 100644 --- a/keyboards/kbdfans/kbd66/rules.mk +++ b/keyboards/kbdfans/kbd66/rules.mk @@ -51,7 +51,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/kbdfans/kbd67/hotswap/config.h b/keyboards/kbdfans/kbd67/hotswap/config.h index f54ffa1cac17..8822b213e3c6 100644 --- a/keyboards/kbdfans/kbd67/hotswap/config.h +++ b/keyboards/kbdfans/kbd67/hotswap/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, E6, D1, D0, D2, D3, D5, D6, D7, C6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* @@ -66,7 +66,7 @@ along with this program. If not, see . #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ // /*== all animations enable ==*/ -// #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_ANIMATIONS // /*== or choose animations ==*/ // #define RGBLIGHT_EFFECT_BREATHING // #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c new file mode 100644 index 000000000000..6cb6afaea668 --- /dev/null +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +enum layer { + LAYER_DEFAULT, + LAYER_FUNCTION, +}; + +/* Switch to function layer when held. */ +#define LY_FUNC MO(LAYER_FUNCTION) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default layer: http://www.keyboard-layout-editor.com/#/gists/dd675b40cc4df2c7bb78847ac29f5988 */ + [LAYER_DEFAULT] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, LY_FUNC, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Function layer: http://www.keyboard-layout-editor.com/#/gists/f29128427f674c43777f045e363d1b44 */ + [LAYER_FUNCTION] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, _______, + _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, + KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_APP, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md new file mode 100644 index 000000000000..d1779152f8c3 --- /dev/null +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/bcat/readme.md @@ -0,0 +1,13 @@ +# bcat's Quefrency 65% layout + +This is pretty much a stock 65% split keyboard layout, with an HHKB-style +(split) backspace and media keys in the function layer centered around the WASD +cluster. + +## Default layer + +![Default layer layout](https://i.imgur.com/stwELz3.png) + +## Function layer + +![Function layer layout](https://i.imgur.com/urDnuTC.png) diff --git a/keyboards/kbdfans/kbd67/hotswap/readme.md b/keyboards/kbdfans/kbd67/hotswap/readme.md index 6b4070593280..bb64c03e3c17 100644 --- a/keyboards/kbdfans/kbd67/hotswap/readme.md +++ b/keyboards/kbdfans/kbd67/hotswap/readme.md @@ -1,4 +1,4 @@ -# hotswap +# KBD67 hotswap A 65% hot swap board with blocker and USB Type C port. @@ -8,6 +8,6 @@ Hardware Availability: [KBDFans](https://kbdfans.cn/products/coming-soon-kbd67-m Make example for this keyboard (after setting up your build environment): - make kbd67/hotswap:default + make kbdfans/kbd67/hotswap: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). diff --git a/keyboards/kbdfans/kbd67/readme.md b/keyboards/kbdfans/kbd67/readme.md index 7ee3c6adbb13..1fa2458817b0 100644 --- a/keyboards/kbdfans/kbd67/readme.md +++ b/keyboards/kbdfans/kbd67/readme.md @@ -1,15 +1,22 @@ # KBD67 -A 65% keyboard sold in two variants. Rev1 was a typical keyboard that had to be soldered together, supporting multiple layouts. -Months later, a new version with hotswap was sold. **Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board. +A 65% keyboard sold in three variants. +1. Rev1: Typical keyboard that had to be soldered together, supporting multiple layouts. +2. HotSwap: Released in late 2018, Hotswap single layout keyboard. +3. Rev2: Released in April/May 2019, the Rev2 also needs to be soldered together and supports multiple layouts. + + **Firmware files are SPECIFIC to each board. Firmware files from one, will not work on the other.** Please use the `.hex` appropriate for your board. + +The rev1 PCB is sold under the name "KBD65". Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: KBD67 -Hardware Availability: KBDFans +Hardware Supported: KBD67 rev1, rev2, hotswap +Hardware Availability: KBDFans -Make example for this keyboard (after setting up your build environment): +Make examples for this keyboard (after setting up your build environment): make kbdfans/kbd67/rev1:default + make kbdfans/kbd67/rev2:default make kbdfans/kbd67/hotswap: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). diff --git a/keyboards/kbdfans/kbd67/rev1/config.h b/keyboards/kbdfans/kbd67/rev1/config.h index 2a1e558ab324..a98687569c67 100644 --- a/keyboards/kbdfans/kbd67/rev1/config.h +++ b/keyboards/kbdfans/kbd67/rev1/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4, F5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/rev1/keymaps/default/keymap.c index 89fa9a534d33..13a8a420d2fa 100644 --- a/keyboards/kbdfans/kbd67/rev1/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/default/keymap.c @@ -24,13 +24,13 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap (Base Layer) Default Layer * ,----------------------------------------------------------------. - * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` | + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| * |----------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp| * |----------------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn| * |----------------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End | * |----------------------------------------------------------------| * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | * `----------------------------------------------------------------' @@ -44,15 +44,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap Fn Layer * ,----------------------------------------------------------------. - * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | * |----------------------------------------------------------------| - * | | |Up | | | | | | | | | | | |Hme | + * |Caps | |Up | | | | | |PSc|SLk|Pau|Up | | | | * |----------------------------------------------------------------| - * | |<- |Dn | ->| | | | | | | | | |End | + * | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | | * |----------------------------------------------------------------| - * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR | + * | | | | | | | | |End|PDn|Dow| |PUp| | * |----------------------------------------------------------------| - * | | | | | | | |MsL|MsD|MsR | + * | | | | | | | |Hom|PDn|End | * `----------------------------------------------------------------' */ [1] = LAYOUT_65_ansi( diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/default/readme.md b/keyboards/kbdfans/kbd67/rev1/keymaps/default/readme.md index 2cb43c5e1a3f..391ea3b41012 100644 --- a/keyboards/kbdfans/kbd67/rev1/keymaps/default/readme.md +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/default/readme.md @@ -1 +1,33 @@ # The default keymap for kbd67 + +``` +/* Keymap (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp| + * |----------------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End | + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +``` + +``` + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * |Caps | |Up | | | | | |PSc|SLk|Pau|Up | | | | + * |----------------------------------------------------------------| + * | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | | + * |----------------------------------------------------------------| + * | | | | | | | | |End|PDn|Dow| |PUp| | + * |----------------------------------------------------------------| + * | | | | | | | |Hom|PDn|End | + * `----------------------------------------------------------------' + */ +``` diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/koba/config.h b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/config.h new file mode 100644 index 000000000000..f4d7de06e5aa --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Daisuke Kobayashi + * + * 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 . + */ + +#pragma once diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c new file mode 100644 index 000000000000..b00805e9e793 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2019 Daisuke Kobayashi + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +#define RGB_RMO RGB_RMOD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^| \|BS |Del | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Ent |PgUp| + * |------------------------------------------------------. |----| + * |H/Z | A| S| D| F| G| H| J| K| L| ;| :| ]| |PgDn| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PScr| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Fn | Space |Alt |Ctrl| |Lef|Dow|Rig | + * `------------------------------------------------' `------------' + */ +[0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, KC_JYEN, KC_BSPC, KC_DELT, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, JP_RBRC, KC_PGUP, \ + KC_ZKHK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, KC_PGDN, \ + KC_LSFT, XXXXXXX, 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_PSCR, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * |Rst| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |Ins | + * |----------------------------------------------------------------| + * | |M- |M+ |RGB|H- |H+ | | |Prt|SLk|Pau| | | | | + * |------------------------------------------------------. |----| + * |Caps |Vo-|Vo+|Mut|S- |S+ | *| /|Hom|PUp| | | | | | + * |----------------------------------------------------------------| + * | |BL-|BL+|BL |V- |V+ | +| -|End|PDn| _| |PUp| | + * |----------------------------------------------------------------| + * | | | | Muhenkan | | Henkan |Kana|Menu| |Hom|PDn|End | + * `------------------------------------------------' `------------' + */ +[1] = LAYOUT_all( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,_______,KC_INS, \ + _______, RGB_RMO,RGB_MOD,RGB_TOG,RGB_HUD,RGB_HUI,XXXXXXX,XXXXXXX,KC_PSCR,KC_SLCK,KC_PAUS,XXXXXXX,XXXXXXX,XXXXXXX, _______, \ + KC_CAPS, KC_VOLD,KC_VOLU,KC_MUTE,RGB_SAD,RGB_SAI,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,XXXXXXX,XXXXXXX, KC_PENT, _______, \ + _______,_______,BL_DEC, BL_INC, BL_TOGG,RGB_VAD,RGB_VAI,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,JP_UNDS,_______, KC_PGUP,_______, \ + _______,_______,_______, KC_MHEN, _______, KC_HENK, KC_KANA,KC_APP, _______,KC_HOME,KC_PGDN,KC_END), +}; diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/koba/readme.md b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/readme.md new file mode 100644 index 000000000000..b432436d405f --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/koba/readme.md @@ -0,0 +1,7 @@ +# Koba's keymap for KBD67 + +![keyboard-layout](https://user-images.githubusercontent.com/1042121/54736578-244ffe80-4bef-11e9-9882-37611b4efdf4.png) + +- JIS layout. +- Fn layer is arranged like HHKB. +- 3 splitted space bar. (Space-Fn-Space) diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/martinffx/config.h b/keyboards/kbdfans/kbd67/rev1/keymaps/martinffx/config.h new file mode 100644 index 000000000000..a3ed4f762a6e --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/martinffx/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/martinffx/keymap.c b/keyboards/kbdfans/kbd67/rev1/keymaps/martinffx/keymap.c new file mode 100644 index 000000000000..839e28fae135 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/martinffx/keymap.c @@ -0,0 +1,99 @@ +/* Copyright 2018 'mechmerlin' + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | ~| + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Del| + * |----------------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[0] = LAYOUT_65_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRAVE, \ + 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_DELETE,\ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ + 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_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * |Caps | |Up | | | | | |PSc|SLk|Pau|Up | | | | + * |----------------------------------------------------------------| + * | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | | + * |----------------------------------------------------------------| + * | | | | | | | | |End|PDn|Dow| |PUp| | + * |----------------------------------------------------------------| + * | | | | | | | |Hom|PDn|End | + * `----------------------------------------------------------------' + */ +[1] = LAYOUT_65_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,KC_INS, \ + KC_CAPS,_______, KC_UP,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP,_______, _______,_______, \ + _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,_______,_______,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT, _______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______, KC_END,KC_PGDN,KC_DOWN, _______,KC_PGUP,_______, \ + _______, _______, _______, _______, _______,_______,_______,KC_HOME,KC_PGDN, KC_END), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/martinffx/readme.md b/keyboards/kbdfans/kbd67/rev1/keymaps/martinffx/readme.md new file mode 100644 index 000000000000..dfa800d17c28 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/martinffx/readme.md @@ -0,0 +1,33 @@ +# The default keymap for kbd67 + +``` +/* Keymap (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | ~| + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Del| + * |----------------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +``` + +``` + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * |Caps | |Up | | | | | |PSc|SLk|Pau|Up | | | | + * |----------------------------------------------------------------| + * | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | | + * |----------------------------------------------------------------| + * | | | | | | | | |End|PDn|Dow| |PUp| | + * |----------------------------------------------------------------| + * | | | | | | | |Hom|PDn|End | + * `----------------------------------------------------------------' + */ +``` diff --git a/keyboards/kbdfans/kbd67/rev1/readme.md b/keyboards/kbdfans/kbd67/rev1/readme.md index ab5209646f6c..1d92a41f7c4a 100644 --- a/keyboards/kbdfans/kbd67/rev1/readme.md +++ b/keyboards/kbdfans/kbd67/rev1/readme.md @@ -1,13 +1,13 @@ -# kbd67 +# KBD67 rev1 65% keyboard with blocker. Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: KBD67 PCB -Hardware Availability: [KBDFans](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit) +Hardware Supported: KBD67 PCB (Sometimes sold under the name "KBD65") +Hardware Availability: KBDFans [Keyboard Kit](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit), [PCB](https://kbdfans.cn/collections/65/products/kbd65-65-custom-mechanical-keyboard-pcb) Make example for this keyboard (after setting up your build environment): - make kbd67/rev1:default + make kbdfans/kbd67/rev1:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kbdfans/kbd67/rev1/rev1.h b/keyboards/kbdfans/kbd67/rev1/rev1.h index 4ee136393a72..f27a00191a2b 100644 --- a/keyboards/kbdfans/kbd67/rev1/rev1.h +++ b/keyboards/kbdfans/kbd67/rev1/rev1.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef REV1_H -#define REV1_H +#pragma once #include "quantum.h" @@ -56,4 +55,3 @@ { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \ } -#endif diff --git a/keyboards/sentraq/s60_x/config.h b/keyboards/kbdfans/kbd67/rev2/config.h similarity index 56% rename from keyboards/sentraq/s60_x/config.h rename to keyboards/kbdfans/kbd67/rev2/config.h index bb2602dcabc3..1c8385f7d5e9 100644 --- a/keyboards/sentraq/s60_x/config.h +++ b/keyboards/kbdfans/kbd67/rev2/config.h @@ -1,7 +1,5 @@ /* -Copyright 2012 Jun Wako -Copyright 2016 Julien Pecqueur -Copyright 2016 Felix Uhl +Copyright 2019 Vorror 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 @@ -17,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -26,29 +23,42 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 -#define MANUFACTURER Massdrop +#define MANUFACTURER KBDFans +#define PRODUCT KBD67v2 +#define DESCRIPTION 65% Keyboard /* key matrix size */ #define MATRIX_ROWS 5 -#define MATRIX_COLS 15 +#define MATRIX_COLS 16 + +#define MATRIX_ROW_PINS { B7, D0, F0, F1, F4 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D1, D2, D3, D6, D7, B4, B6, C6, C7, F7, F6, F5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW /* number of backlight levels */ -#define BACKLIGHT_PIN B7 +#define BACKLIGHT_PIN B5 #ifdef BACKLIGHT_PIN #define BACKLIGHT_LEVELS 3 #endif -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +/* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 -#ifdef SUBPROJECT_default - #include "default/config.h" -#endif -#ifdef SUBPROJECT_rgb - #include "rgb/config.h" -#endif +/* 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 +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 18 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 240 #endif diff --git a/keyboards/kbdfans/kbd67/rev2/info.json b/keyboards/kbdfans/kbd67/rev2/info.json new file mode 100644 index 000000000000..4b7b5e8b3f74 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "kbd67v2", + "url": "", + "maintainer": "qmk", + "width": 16, + "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}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":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, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + }, + + "LAYOUT_65_ansi": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/default/config.h b/keyboards/kbdfans/kbd67/rev2/keymaps/default/config.h new file mode 100644 index 000000000000..a3ed4f762a6e --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/rev2/keymaps/default/keymap.c new file mode 100644 index 000000000000..13a8a420d2fa --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/default/keymap.c @@ -0,0 +1,99 @@ +/* Copyright 2018 'mechmerlin' + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |PgUp| + * |----------------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|End | + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[0] = LAYOUT_65_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * |~ `|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * |Caps | |Up | | | | | |PSc|SLk|Pau|Up | | | | + * |----------------------------------------------------------------| + * | |Lef|Dow|Rig| | | | |Hom|PUp|Lef|Rig| | | + * |----------------------------------------------------------------| + * | | | | | | | | |End|PDn|Dow| |PUp| | + * |----------------------------------------------------------------| + * | | | | | | | |Hom|PDn|End | + * `----------------------------------------------------------------' + */ +[1] = LAYOUT_65_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,KC_INS, \ + KC_CAPS,_______, KC_UP,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP,_______, _______,_______, \ + _______,KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,_______,_______,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT, _______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______, KC_END,KC_PGDN,KC_DOWN, _______,KC_PGUP,_______, \ + _______, _______, _______, _______, _______,_______,_______,KC_HOME,KC_PGDN, KC_END), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/default/readme.md b/keyboards/kbdfans/kbd67/rev2/keymaps/default/readme.md new file mode 100644 index 000000000000..2cb43c5e1a3f --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for kbd67 diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/koba/config.h b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/config.h new file mode 100644 index 000000000000..f4d7de06e5aa --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/config.h @@ -0,0 +1,17 @@ +/* Copyright 2019 Daisuke Kobayashi + * + * 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 . + */ + +#pragma once diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c new file mode 100644 index 000000000000..b00805e9e793 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2019 Daisuke Kobayashi + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +#define RGB_RMO RGB_RMOD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| ^| \|BS |Del | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| @| [| Ent |PgUp| + * |------------------------------------------------------. |----| + * |H/Z | A| S| D| F| G| H| J| K| L| ;| :| ]| |PgDn| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PScr| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Fn | Space |Alt |Ctrl| |Lef|Dow|Rig | + * `------------------------------------------------' `------------' + */ +[0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, KC_JYEN, KC_BSPC, KC_DELT, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, JP_RBRC, KC_PGUP, \ + KC_ZKHK, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, KC_ENT, KC_PGDN, \ + KC_LSFT, XXXXXXX, 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_PSCR, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap Fn Layer + * ,----------------------------------------------------------------. + * |Rst| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | |Ins | + * |----------------------------------------------------------------| + * | |M- |M+ |RGB|H- |H+ | | |Prt|SLk|Pau| | | | | + * |------------------------------------------------------. |----| + * |Caps |Vo-|Vo+|Mut|S- |S+ | *| /|Hom|PUp| | | | | | + * |----------------------------------------------------------------| + * | |BL-|BL+|BL |V- |V+ | +| -|End|PDn| _| |PUp| | + * |----------------------------------------------------------------| + * | | | | Muhenkan | | Henkan |Kana|Menu| |Hom|PDn|End | + * `------------------------------------------------' `------------' + */ +[1] = LAYOUT_all( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX,_______,KC_INS, \ + _______, RGB_RMO,RGB_MOD,RGB_TOG,RGB_HUD,RGB_HUI,XXXXXXX,XXXXXXX,KC_PSCR,KC_SLCK,KC_PAUS,XXXXXXX,XXXXXXX,XXXXXXX, _______, \ + KC_CAPS, KC_VOLD,KC_VOLU,KC_MUTE,RGB_SAD,RGB_SAI,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,XXXXXXX,XXXXXXX, KC_PENT, _______, \ + _______,_______,BL_DEC, BL_INC, BL_TOGG,RGB_VAD,RGB_VAI,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,JP_UNDS,_______, KC_PGUP,_______, \ + _______,_______,_______, KC_MHEN, _______, KC_HENK, KC_KANA,KC_APP, _______,KC_HOME,KC_PGDN,KC_END), +}; diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/koba/readme.md b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/readme.md new file mode 100644 index 000000000000..b432436d405f --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/koba/readme.md @@ -0,0 +1,7 @@ +# Koba's keymap for KBD67 + +![keyboard-layout](https://user-images.githubusercontent.com/1042121/54736578-244ffe80-4bef-11e9-9882-37611b4efdf4.png) + +- JIS layout. +- Fn layer is arranged like HHKB. +- 3 splitted space bar. (Space-Fn-Space) diff --git a/keyboards/kbdfans/kbd67/rev2/readme.md b/keyboards/kbdfans/kbd67/rev2/readme.md new file mode 100644 index 000000000000..0909f781d06f --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/readme.md @@ -0,0 +1,13 @@ +# KBD67 rev2 + +65% pcb with blocker. Revision 2 (Manufactured after 05/01/19). + +Keyboard Maintainer: [Vorror](https://github.com/vorror) +Hardware Supported: KBD67v2 PCB (Sometimes sold under the name "KBD65") +Hardware Availability: KBDFans [Keyboard Kit](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit), [PCB](https://kbdfans.cn/collections/65/products/kbd65-65-custom-mechanical-keyboard-pcb) + +Make example for this keyboard (after setting up your build environment): + + make kbdfans/kbd67/rev2: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). diff --git a/keyboards/kbdfans/kbd67/rev2/rev2.c b/keyboards/kbdfans/kbd67/rev2/rev2.c new file mode 100644 index 000000000000..8aa83f58614d --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/rev2.c @@ -0,0 +1,42 @@ +/* Copyright 2019 Vorror + * + * 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 . + */ +#include "rev2.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} diff --git a/keyboards/kbdfans/kbd67/rev2/rev2.h b/keyboards/kbdfans/kbd67/rev2/rev2.h new file mode 100644 index 000000000000..f27a00191a2b --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/rev2.h @@ -0,0 +1,57 @@ +/* Copyright 2018 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K44, K46, K48, K4A, K4B, K4C, K4D, K4E, K4F \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \ +} + +#define LAYOUT_65_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0F, \ + K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ + K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E, K4F \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ + { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F }, \ +} + diff --git a/keyboards/kbdfans/kbd67/rev2/rules.mk b/keyboards/kbdfans/kbd67/rev2/rules.mk new file mode 100644 index 000000000000..5e874a041a38 --- /dev/null +++ b/keyboards/kbdfans/kbd67/rev2/rules.mk @@ -0,0 +1,82 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = 65_ansi diff --git a/keyboards/kbdfans/kbd6x/config.h b/keyboards/kbdfans/kbd6x/config.h index 4a3fb881bf67..d3f1ee82cdf3 100644 --- a/keyboards/kbdfans/kbd6x/config.h +++ b/keyboards/kbdfans/kbd6x/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F6, F5, F4, F1, E6, D0, D1, D2, D3, D5, D6, D7, B4, B5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/kbdfans/kbd6x/kbd6x.h b/keyboards/kbdfans/kbd6x/kbd6x.h index 3d0c70f77ab8..46e3c2460736 100644 --- a/keyboards/kbdfans/kbd6x/kbd6x.h +++ b/keyboards/kbdfans/kbd6x/kbd6x.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KBD6X_H -#define KBD6X_H +#pragma once #include "quantum.h" @@ -32,5 +31,3 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D }, \ } - -#endif diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c index fa324be9a116..bb8ab6b9b3e3 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c @@ -2,91 +2,95 @@ #include "konstantin.h" enum keycodes_keymap { - RCTRL = RANGE_KEYMAP, + RCTRL = RANGE_KEYMAP, }; enum layers_keymap { - L_RCTRL = L_RANGE_KEYMAP, + L_RCTRL = L_RANGE_KEYMAP, }; +void eeconfig_init_keymap(void) { + rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL); +} + bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case RCTRL: - if (record->event.pressed) { - layer_on(L_RCTRL); - register_code(KC_RCTRL); - } else { - layer_off(L_RCTRL); - unregister_code(KC_RCTRL); - } - return false; + switch (keycode) { + case RCTRL: + if (record->event.pressed) { + register_code(KC_RCTRL); + layer_on(L_RCTRL); + } else { + unregister_code(KC_RCTRL); + layer_off(L_RCTRL); + } + return false; - default: - return true; - } + default: + return true; + } } const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │LCtCps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │LShiftFn│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│FnL│ - * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ - * │LGu│LAlt │ Space │RAlGu│RCt│ - * └───┴─────┴───────────────────────────┴─────┴───┘ - */ - [L_BASE] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, - LCT_CPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - LSFT_FN, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_FNLK, - XXXXXXX, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, RCTRL, XXXXXXX - ), + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │LCtCps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │LShiftFn│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│FnL│ + * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ + * │LGu│LAlt │ Space │RAlGu│RCt│ + * └───┴─────┴───────────────────────────┴─────┴───┘ + */ + [L_BASE] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + LCT_CPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + LSFT_FN, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_FNLK, + XXXXXXX, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, RCTRL, XXXXXXX + ), - /* Function layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │ │Hom│ ↑ │End│PgU│ │ │ │ │M1 │M↑ │M2 │M3 │ Del │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │ ← │ ↓ │ → │PgD│ │ │ │MW↑│M← │M↓ │M→ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │ │Mut│VoD│VoU│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │ - * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ - * │ │ │ MW↓ │MAcl2│ │ - * └───┴─────┴───────────────────────────┴─────┴───┘ - */ - [L_FN] = LAYOUT( - _______, 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_INS, - _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_DEL, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, _______, - _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_WH_L, KC_WH_R, KC_BTN4, KC_BTN5, _______, _______, - XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX - ), + /* Function layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ │Hom│ ↑ │End│PgU│ │ │ │ │M1 │M↑ │M3 │M2 │ Del │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ ← │ ↓ │ → │PgD│ │ │ │MW↑│M← │M↓ │M→ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │ │Mut│Vo-│Vo+│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │ + * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ + * │ │ │ MW↓ │MAcl2│ │ + * └───┴─────┴───────────────────────────┴─────┴───┘ + */ + [L_FN] = LAYOUT( + _______, 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_INS, + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN3, KC_BTN2, KC_DEL, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_WH_L, KC_WH_R, KC_BTN4, KC_BTN5, _______, _______, + XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX + ), - /* RCtrl layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ - * │ │Top│Mv↑│Btm│PrT│ │ │ │ │ │ │ │ │Clear│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ - * │ │Mv←│Mv↓│Mv→│NxT│ │ │ │ │ │ │ │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ - * │Dst│Dstp←│ │Dstp→│ │ - * └───┴─────┴───────────────────────────┴─────┴───┘ - */ - [L_RCTRL] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, TOP, MV_UP, BOTTOM, PRV_TAB, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR, - _______, MV_LEFT, MV_DOWN, MV_RGHT, NXT_TAB, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - XXXXXXX, DESKTOP, DSKTP_L, _______, DSKTP_R, _______, XXXXXXX - ), + /* RCtrl layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Clr│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ │Top│Mv↑│Btm│TPr│ │ │ │ │ │ │ │ │DelNx│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │Mv←│Mv↓│Mv→│TNx│ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │ │RTg│RV-│RV+│ │ │ │ │ │ │ │ │ │ + * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ + * │DPR│DstNA│ │ │ │ + * └───┴─────┴───────────────────────────┴─────┴───┘ + */ + [L_RCTRL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR, + _______, TOP, MV_UP, BOTTOM, TAB_PRV, _______, _______, _______, _______, _______, _______, _______, _______, DEL_NXT, + _______, MV_LEFT, MV_DOWN, MV_RGHT, TAB_NXT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + XXXXXXX, DST_P_R, DST_N_A, _______, _______, _______, XXXXXXX + ), }; diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk index a45a631dc04a..f7cf0758b78e 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk @@ -1,2 +1,11 @@ -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = no + +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes diff --git a/keyboards/kbdfans/kbd6x/keymaps/wanleg/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/wanleg/keymap.c new file mode 100644 index 000000000000..f3aa991f316a --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/wanleg/keymap.c @@ -0,0 +1,82 @@ +/* Copyright 2018 wanleg + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "wanleg.h" + + +#define LAYOUT_kbd6x_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_wrapper( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ + KC_TAB, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, KC_ENT, \ + KC_LSFT, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_LSFT, FUNCTION, \ + KC_LCTL, KC_LGUI, KC_LALT, LT(gDIR,KC_SPC), KC_RALT, KC_RGUI, KC_RCTL \ + ) +#define LAYOUT_kbd6x_base_wrapper(...) LAYOUT_kbd6x_base(__VA_ARGS__) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[gGK] = LAYOUT_kbd6x_base_wrapper( + _______________Gherkin_Row_0_______________, + _______________Gherkin_Row_1_______________, + _______________Gherkin_Row_2_______________ +), + +[gNUM] = LAYOUT_kbd6x_base_wrapper( + _______________Gherkin_NUM_0_______________, + _______________Gherkin_NUM_1_______________, + _______________Gherkin_NUM_2_______________ +), + +[gDIR] = LAYOUT_kbd6x_base_wrapper( + _______________Gherkin_DIR_0_______________, + _______________Gherkin_DIR_1_______________, + _______________Gherkin_DIR_2_______________ +), + +[gETC] = LAYOUT_kbd6x_base_wrapper( + _______________Gherkin_ETC_0_______________, + _______________Gherkin_ETC_1_______________, + _______________Gherkin_ETC_2_______________ +), + +[_FN] = LAYOUT_kbd6x_base_wrapper( + _______________Gherkin_FN_0________________, + _______________Gherkin_FN_1________________, + _______________Gherkin_FN_2________________ +), + +//mac layout +[_QW] = LAYOUT_wrapper( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(ONE), + KC_LCTL, MO(ONE), KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT, KC_RCTL + ), + +[ONE] = LAYOUT_wrapper( + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, BL_BRTG, BL_DEC, BL_INC, BL_TOGG, BL_STEP, BL_ON, KC_PGUP, KC_HOME, _______, _______, _______, _______, _______, + _______, RGB_M_B, RGB_VAD, RGB_VAI, RGB_TOG, RGB_MOD, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, + _______, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______, _______, KC_PGDN, KC_END, _______, gGHERKIN,_______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/kbdfans/kbd6x/keymaps/wanleg/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/wanleg/rules.mk new file mode 100644 index 000000000000..92cc41e21296 --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/wanleg/rules.mk @@ -0,0 +1,3 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) \ No newline at end of file diff --git a/keyboards/kbdfans/kbd75/kbd75.h b/keyboards/kbdfans/kbd75/kbd75.h index 8e6f094500bf..ad8706ba97e8 100644 --- a/keyboards/kbdfans/kbd75/kbd75.h +++ b/keyboards/kbdfans/kbd75/kbd75.h @@ -1,5 +1,4 @@ -#ifndef KBD75_H -#define KBD75_H +#pragma once #include "quantum.h" @@ -12,4 +11,3 @@ #include "rev2.h" #endif -#endif diff --git a/keyboards/kbdfans/kbd75/keymaps/digital/keymap.c b/keyboards/kbdfans/kbd75/keymaps/digital/keymap.c new file mode 100644 index 000000000000..cb43052c2293 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/digital/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = 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_MPRV, KC_MNXT, KC_MPLY, + 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_DEL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + MO(1), 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_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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_INS, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, BL_TOGG, BL_INC, BL_DEC, _______, _______, _______ + ) +}; diff --git a/keyboards/kbdfans/kbd75/keymaps/digital/readme.md b/keyboards/kbdfans/kbd75/keymaps/digital/readme.md new file mode 100644 index 000000000000..99c95a00ff94 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/digital/readme.md @@ -0,0 +1,5 @@ +# digital KBD75 Keymap + +ISO KBD75 keymap. + +![KBD75 digital keymap](https://i.imgur.com/IMb7eML.png) diff --git a/keyboards/kbdfans/kbd75/keymaps/edulpn/README.md b/keyboards/kbdfans/kbd75/keymaps/edulpn/README.md index 57989ff9b66b..e35eb983f376 100644 --- a/keyboards/kbdfans/kbd75/keymaps/edulpn/README.md +++ b/keyboards/kbdfans/kbd75/keymaps/edulpn/README.md @@ -10,4 +10,4 @@ ![Edulpn Keymap for the KBD75 PCB Mac Mode](https://i.imgur.com/t7oTjjc.png) ## Build -To build the default keymap, simply run `make kbd75/rev2:edulpn`. +To build the default keymap, simply run `make kbdfans/kbd75/rev2:edulpn`. diff --git a/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c index 78a501ec4ece..7e715a767c8f 100644 --- a/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [MAC_LAYER] = 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, TG(MAC_LAYER), KC_DEL, + 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, TG(WINDOWS_LAYER), KC_DEL, 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_BSPC, KC_HOME, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, 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_PGUP, diff --git a/keyboards/kbdfans/kbd75/keymaps/kingwangwong/keymap.c b/keyboards/kbdfans/kbd75/keymaps/kingwangwong/keymap.c new file mode 100644 index 000000000000..fb074e121043 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/kingwangwong/keymap.c @@ -0,0 +1,145 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QW, + _FO, + _FL, + _CL, + _DL +}; + + + + +// Custom macros +#define SPC_FUN LT(_FL, KC_SPC) +#define BSC_CON LT(_CL, KC_BSPC) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: Qwerty layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ ESC │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │PRSCR│ INS │HOME │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │BSLS │ DEL │ END │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤ + * │TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │BSPC │PGUP │ + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │CAPS │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ENTER │PGDN │ + * ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │LSHFT │LSHFT│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSHFT │ UP │MO_CL│ + * ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤ + * │LCTRL │L_GUI │L_ALT │SPC │MO(_FL│BSPC │R_ALT│R_GUI│R_CTR│LEFT │DOWN │RIGHT│ + * └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + /* 0: QWERTY */ + [_QW] = 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_INS, KC_HOME, + 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_BSLS, KC_DEL, KC_END, + 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_CLCK, 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, MO(_CL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_BSPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* 1: forty: this layer emulates a forty percent keyboard so I can transition to a forty percent :) + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤ + * │ESC │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ENT │ │ │ │ + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │TAB │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ │ │ + * ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │LSHFT │LSHFT│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSHFT │ │MO_CL│ + * ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤ + * │LCTRL │L_ALT │MO(DL)│SPCFUN │BSPC │MO(_CL) │R_ALT│R_GUI│R_CTR│ │ │ │ + * └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + /* 1: FORTY */ + [_FO] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX, + 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, XXXXXXX, MO(_CL), + KC_LCTL, KC_LALT, MO(_DL), SPC_FUN, KC_BSPC, MO(_CL), KC_RALT, KC_RGUI, KC_RCTL, XXXXXXX, XXXXXXX, XXXXXXX), + + + /* 2: Function layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤ + * │ │ │HOME │ UP │END │ │ │ │ │ │ │ │ │ │VOLUP│ + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │ │ │LEFT │DOWN │RIGHT│ │ │ │ │ │ │ │ │VOLDN│ + * ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │ │ │ │ │PGDN │PGUP │ │ │ │ │ │ │ │ │ │ + * ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤ + * │ │ │ │ │ │ │VOLDN│VOLUP│ │ │ │ │ + * └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + /* 2: ANSI Fn layer */ + [_FL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + _______, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______), + + /* 3: Control layer + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │RESET│QWERT│FORTY│ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤ + * │ ` │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ DEL │ │ │ │ + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ \ │ │ │ + * ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + /* 3: Control layer */ + [_CL] = LAYOUT( + RESET, TO(_QW), TO(_FO), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, _______, _______, KC_VOLU, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, _______, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, RGB_HUD, RGB_SAD, RGB_HUI), + + /* 4: Another layer for ease + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┼─────┤ + * │ │ │ │ │ │ │ │ _ │ + │ { │ } │ | │ │ │ │ + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┼─────┤ + * │ │ │ │ │ │ │ │ - │ = │ [ │ ] │ \ │ │ │ + * ├──────┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┼─────┴─┬───┴──┬──┴─────┴────┬┴─────┼─────┴─────┴────┬┴────┬┴────┬┴────┬─────┼─────┼─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * └──────┴───────┴──────┴─────────────┴──────┴────────────────┴─────┴─────┴─────┴─────┴─────┴─────┘ + */ + + /* 3: D control layer */ + [_DL] = LAYOUT( + RESET, TO(_QW), TO(_FO), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, RGB_HUD, RGB_SAD, RGB_HUI) +}; diff --git a/keyboards/kbdfans/kbd75/rev1/rev1.c b/keyboards/kbdfans/kbd75/rev1/rev1.c index 9ed08602a477..151e395e3c4b 100644 --- a/keyboards/kbdfans/kbd75/rev1/rev1.c +++ b/keyboards/kbdfans/kbd75/rev1/rev1.c @@ -1,12 +1,17 @@ #include "rev1.h" void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(B2); - } else { writePinLow(B2); + } else { + writePinHigh(B2); } - led_set_user(usb_led); + led_set_user(usb_led); +} + +void matrix_init_kb(void) { + setPinOutput(B2); + matrix_init_user(); } diff --git a/keyboards/kbdfans/kbd75/rev2/rev2.c b/keyboards/kbdfans/kbd75/rev2/rev2.c index bec65d6a6c30..bf91d4009218 100644 --- a/keyboards/kbdfans/kbd75/rev2/rev2.c +++ b/keyboards/kbdfans/kbd75/rev2/rev2.c @@ -1,12 +1,17 @@ #include "rev2.h" void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - writePinHigh(B2); - } else { writePinLow(B2); + } else { + writePinHigh(B2); } - led_set_user(usb_led); + led_set_user(usb_led); +} + +void matrix_init_kb(void) { + setPinOutput(B2); + matrix_init_user(); } diff --git a/keyboards/kbdfans/kbd8x/config.h b/keyboards/kbdfans/kbd8x/config.h index dca9b40ee052..2cae29626769 100644 --- a/keyboards/kbdfans/kbd8x/config.h +++ b/keyboards/kbdfans/kbd8x/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D1, D0, F7, F6, F5, D5, D3, D2, C7, C6, B5, F4, F1, B4, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/kc60/keymaps/dbroqua/keymap.c b/keyboards/kc60/keymaps/dbroqua/keymap.c index f28e441b0af2..a70e1017e260 100644 --- a/keyboards/kc60/keymaps/dbroqua/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua/keymap.c @@ -7,7 +7,6 @@ // Fillers to make layering more clear #define ______ KC_TRNS -#define XXXXXXX KC_NO // Func macro definitions. #define S_LED FUNC(0) diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c index 10e00650d1bb..af758ae16ad0 100644 --- a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c @@ -6,7 +6,6 @@ // Fillers to make layering more clear #define ______ KC_TRNS -#define XXXXXXX KC_NO // Func macro definitions. #define S_LED FUNC(0) diff --git a/keyboards/kc60/keymaps/noroadsleft/keymap.c b/keyboards/kc60/keymaps/noroadsleft/keymap.c index f28f2144f0c6..98d73535687c 100644 --- a/keyboards/kc60/keymaps/noroadsleft/keymap.c +++ b/keyboards/kc60/keymaps/noroadsleft/keymap.c @@ -1,4 +1,5 @@ #include QMK_KEYBOARD_H +#include "version.h" #include //#include #include @@ -8,24 +9,24 @@ ** LAYER DEFINITIONS ** **********************/ enum layers_keymap { - // BASE LAYERS - _QWERTY = 0, - _DVORAK, - _COLEMAK, - _MAC, - _QUAKE2, - _QUAKE2_DVORAK, - _QUAKE2_CONSOLE, - - // FUNCTION LAYERS - _FUNCWIN, - _FUNCMAC, - _FUNCQ2, - - // OTHER LAYERS - _NUMPAD, - _MACROS, - _SYSTEM + // BASE LAYERS + _QWERTY = 0, + _DVORAK, + _COLEMAK, + _MAC, + _QUAKE2, + _QUAKE2_DVORAK, + _QUAKE2_CONSOLE, + + // FUNCTION LAYERS + _FUNCWIN, + _FUNCMAC, + _FUNCQ2, + + // OTHER LAYERS + _NUMPAD, + _MACROS, + _SYSTEM }; // LAYER SHORT CODES @@ -69,325 +70,342 @@ enum layers_keymap { // MACRO DEFINITIONS enum custom_keycodes { - F_CAPS = SAFE_RANGE, - T_L3DED, - G_PUSH, - G_FTCH, - G_COMM, - G_RST, - G_C10R, - G_BRCH, - SIGNA, - GO_Q2, - Q2_ON, - Q2_OFF, - Q2_ESC, - Q2_GRV, - MC_UNDO, - MC_PSTE + F_CAPS = SAFE_RANGE, + T_L3DED, + G_PUSH, + G_FTCH, + G_COMM, + G_RST, + G_C10R, + G_BRCH, + SIGNA, + GO_Q2, + Q2_ON, + Q2_OFF, + Q2_ESC, + Q2_GRV, + MC_UNDO, + MC_PSTE, + NUBS_Z, + VRSN }; -// define modifiers -#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) -#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) -#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +/******************* +** MODIFIER MASKS ** +*******************/ +#define MOD_MASK_RALT (MOD_BIT(KC_RALT)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { - uint8_t modifiers = get_mods(); - switch(keycode) { - // these are our macros! - case F_CAPS: - /* - Objective: write a macro that checks the current layers that are - enabled, and activates the appropriate function layer. - */ - if ( biton32(layer_state) == _MAC ) { - if (record->event.pressed) { - layer_on(_FUNCMAC); - } else { - layer_off(_FUNCMAC); - } - } else { - if (record->event.pressed) { - layer_on(_FUNCWIN); - } else { - layer_off(_FUNCWIN); - } - }; - return false; - break; - case T_L3DED: - if (record->event.pressed) { - SEND_STRING("lavak3DED "); - }; - return false; - break; - case G_PUSH: - if (record->event.pressed) { - SEND_STRING("git push origin "); - }; - return false; - break; - case G_FTCH: - if (record->event.pressed) { - SEND_STRING("git fetch upstream"); - }; - return false; - break; - case G_COMM: - if (record->event.pressed) { - SEND_STRING("git commit -m \"\"" SS_TAP(X_LEFT)); - layer_off(_MACROS); - }; - return false; - break; - case G_RST: - if (record->event.pressed) { - SEND_STRING("git histt -n 10" SS_TAP(X_ENTER) "git reset --soft "); - layer_off(_MACROS); - }; - return false; - break; - case G_C10R: - if (record->event.pressed) { - SEND_STRING("cf/"); - layer_off(_MACROS); - }; - return false; - break; - case G_BRCH: - if (record->event.pressed) { - SEND_STRING("$(git branch-name)"); - layer_off(_MACROS); - }; - return false; - break; - case SIGNA: - if (record->event.pressed) { - SEND_STRING("\\- @noroadsleft" SS_TAP(X_ENTER)); - layer_off(_MACROS); - }; - return false; - break; - case GO_Q2: - if (record->event.pressed) { - //default_layer_set(_QWERTY); - layer_move(_QWERTY); // TO(_QWERTY); - layer_on(_QUAKE2); - //layer_off(_SYSTEM); - }; - return false; - break; - case Q2_ON: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_ENTER)); - layer_on(_DVORAK); - layer_on(_QUAKE2_DVORAK); - }; - return false; - break; - case Q2_OFF: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_ENTER)); - layer_move(_QWERTY); // TO(_QWERTY); - layer_on(_QUAKE2); - }; - return false; - break; - case Q2_ESC: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_ESCAPE)); - layer_move(_QWERTY); // TO(_QWERTY); - layer_on(_QUAKE2); - }; - return false; - break; - case Q2_GRV: - if (record->event.pressed) { - SEND_STRING(SS_TAP(X_GRAVE)); - layer_on(_DVORAK); - layer_on(_QUAKE2_DVORAK); - layer_on(_QUAKE2_CONSOLE); - }; - return false; - break; - case MC_UNDO: - if (record->event.pressed) { - if ( modifiers & MODS_SHIFT_MASK ) { - SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) SS_UP(X_LSHIFT) ); - } else { - SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) ); - } - }; - return false; - break; - case MC_PSTE: - if (record->event.pressed) { - if ( modifiers & MODS_SHIFT_MASK ) { - SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_DOWN(X_LALT) SS_TAP(X_V) SS_UP(X_LALT) SS_UP(X_LGUI) SS_UP(X_LSHIFT) ); - } else { - SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_V) SS_UP(X_LGUI) ); - } - }; - return false; - break; - } // switch() - return true; + switch(keycode) { + // these are our macros! + case F_CAPS: + /* + * Objective: write a macro that checks the current layers that are + * enabled, and activates the appropriate function layer. + */ + if ( biton32(layer_state) == _MAC ) { + if (record->event.pressed) { + layer_on(_FUNCMAC); + } else { + layer_off(_FUNCMAC); + } + } else { + if (record->event.pressed) { + layer_on(_FUNCWIN); + } else { + layer_off(_FUNCWIN); + } + }; + return false; + case T_L3DED: + if (record->event.pressed) { + SEND_STRING("lavak3DED "); + }; + return false; + case G_PUSH: + if (record->event.pressed) { + SEND_STRING("git push origin "); + }; + return false; + case G_FTCH: + if (record->event.pressed) { + if ( get_mods() & MOD_MASK_SHIFT ) { + clear_mods(); + SEND_STRING("git pull upstream "); + } else { + SEND_STRING("git fetch upstream "); + } + }; + return false; + case G_COMM: + if (record->event.pressed) { + SEND_STRING("git commit -m \"\"" SS_TAP(X_LEFT)); + layer_off(_MACROS); + }; + return false; + case G_BRCH: + if (record->event.pressed) { + if ( get_mods() & MOD_MASK_SHIFT ) { + clear_mods(); + SEND_STRING("master"); + } else { + SEND_STRING("$(git branch-name)"); + } + layer_off(_MACROS); + }; + return false; + case SIGNA: + if (record->event.pressed) { + SEND_STRING("\\- @noroadsleft" SS_TAP(X_ENTER)); + layer_off(_MACROS); + }; + return false; + case GO_Q2: + if (record->event.pressed) { + //default_layer_set(_QWERTY); + layer_move(_QWERTY); // TO(_QWERTY); + layer_on(_QUAKE2); + //layer_off(_SYSTEM); + }; + return false; + case Q2_ON: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_ENTER)); + layer_on(_DVORAK); + layer_on(_QUAKE2_DVORAK); + }; + return false; + case Q2_OFF: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_ENTER)); + layer_move(_QWERTY); // TO(_QWERTY); + layer_on(_QUAKE2); + }; + return false; + case Q2_ESC: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_ESCAPE)); + layer_move(_QWERTY); // TO(_QWERTY); + layer_on(_QUAKE2); + }; + return false; + case Q2_GRV: + if (record->event.pressed) { + SEND_STRING(SS_TAP(X_GRAVE)); + layer_on(_DVORAK); + layer_on(_QUAKE2_DVORAK); + layer_on(_QUAKE2_CONSOLE); + }; + return false; + case MC_UNDO: + if (record->event.pressed) { + if ( get_mods() & MOD_MASK_SHIFT ) { + SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) SS_UP(X_LSHIFT) ); + } else { + SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) ); + } + }; + return false; + case MC_PSTE: + if (record->event.pressed) { + if ( get_mods() & MOD_MASK_SHIFT ) { + SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_DOWN(X_LALT) SS_TAP(X_V) SS_UP(X_LALT) SS_UP(X_LGUI) SS_UP(X_LSHIFT) ); + } else { + SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_V) SS_UP(X_LGUI) ); + } + }; + return false; + case NUBS_Z: + if (record->event.pressed) { + if ( get_mods() & MOD_MASK_RALT ) { + SEND_STRING( SS_DOWN(X_NONUS_BSLASH) ); + } else { + SEND_STRING( SS_DOWN(X_Z) ); + } + } else { + if ( get_mods() & MOD_MASK_RALT ) { + SEND_STRING( SS_UP(X_NONUS_BSLASH) ); + } else { + SEND_STRING( SS_UP(X_Z) ); + } + }; + return false; + case VRSN: + if (record->event.pressed) { + SEND_STRING( QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ); + } + return false; + case KC_1 ... KC_0: + if (record->event.pressed) { + if ( get_mods() & MOD_MASK_RALT ) { + register_code( keycode + 0x3b ); + } else { + register_code( keycode ); + } + } else { + if ( get_mods() & MOD_MASK_RALT ) { + unregister_code( keycode + 0x3b ); + } else { + unregister_code( keycode ); + } + } + return false; + } // switch() + return true; }; // KEYMAPS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /**************** - ** BASE LAYERS ** - ****************/ - - /* QWERTY */ - [_QWERTY] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ - FW_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ - ), - - /* Dvorak */ - [_DVORAK] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \ - FW_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ - ), - - /* Colemak */ - [_COLEMAK] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \ - FW_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ - ), - - /**************** - ** OS OVERLAYS ** - ****************/ - - /* Mac */ - [_MAC] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - FM_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, MO(_FM), _______ \ - ), - - /********************* - ** QUAKE 2 OVERLAYS ** - *********************/ - - /* Quake 2 */ - [_QUAKE2] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_ON, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \ - ), - - [_QUAKE2_DVORAK] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_OFF, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \ - ), - - [_QUAKE2_CONSOLE] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \ - ), - - /******************** - ** FUNCTION LAYERS ** - ********************/ - - /* Windows Fn layer */ - [_FUNCWIN] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - _______, KC_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \ - NO_CHNG, WN_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PENT, \ - _______, WN_UNDO, WN_CUT, WN_COPY, WN_PSTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TG(_SY), _______, \ - _______, _______, _______, TG(_NP), _______, TG(_MA), NO_CHNG, _______ \ - ), - - /* MacOS Fn layer */ - [_FUNCMAC] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - _______, _______, _______, _______, _______, _______, KC_INS, MC_HOME, KC_UP, MC_END, KC_PGUP, MC_PSCR, _______, _______, \ - NO_CHNG, MC_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, \ - _______, MC_UNDO, MC_CUT, MC_COPY, MC_PSTE, _______, _______, _______, _______, _______, TG(_SY), _______, \ - _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \ - ), - - /* Quake 2 Fn layer */ - [_FUNCQ2] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - Q2_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \ - NO_CHNG, _______, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_ENT, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_SY), _______, \ - _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \ - ), - - /***************** - ** OTHER LAYERS ** - *****************/ - - /* Numpad layer */ - [_NUMPAD] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, \ - _______, _______, _______, _______, KC_E, KC_F, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, KC_PEQL, _______, \ - _______, _______, _______, _______, KC_C, KC_D, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, KC_PENT, \ - _______, _______, _______, _______, KC_A, KC_B, _______, KC_P0, _______, KC_PDOT, _______, _______, \ - _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \ - ), - - /* Macro layer */ - [_MACROS] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, G_RST, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \ - _______, _______, _______, G_C10R, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \ - ), - - /* System layer */ - [_SYSTEM] = LAYOUT_60_ansi( - // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, TG(_MC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_CHNG, XXXXXXX \ - ), + /**************** + ** BASE LAYERS ** + ****************/ + + /* QWERTY */ + [_QWERTY] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + FW_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, NUBS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ + ), + + /* Dvorak */ + [_DVORAK] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \ + FW_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ + ), + + /* Colemak */ + [_COLEMAK] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \ + FW_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ + ), + + /**************** + ** OS OVERLAYS ** + ****************/ + + /* Mac */ + [_MAC] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + FM_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, MO(_FM), _______ \ + ), + + /********************* + ** QUAKE 2 OVERLAYS ** + *********************/ + + /* Quake 2 */ + [_QUAKE2] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_ON, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \ + ), + + [_QUAKE2_DVORAK] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_OFF, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \ + ), + + [_QUAKE2_CONSOLE] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, MO(_FQ), _______ \ + ), + + /******************** + ** FUNCTION LAYERS ** + ********************/ + + /* Windows Fn layer */ + [_FUNCWIN] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + _______, KC_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \ + NO_CHNG, WN_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PENT, \ + _______, WN_UNDO, WN_CUT, WN_COPY, WN_PSTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TG(_SY), _______, \ + _______, _______, _______, TG(_NP), _______, TG(_MA), NO_CHNG, _______ \ + ), + + /* MacOS Fn layer */ + [_FUNCMAC] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + _______, _______, _______, _______, _______, _______, KC_INS, MC_HOME, KC_UP, MC_END, KC_PGUP, MC_PSCR, _______, _______, \ + NO_CHNG, MC_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, \ + _______, MC_UNDO, MC_CUT, MC_COPY, MC_PSTE, _______, _______, _______, _______, _______, TG(_SY), _______, \ + _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \ + ), + + /* Quake 2 Fn layer */ + [_FUNCQ2] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + Q2_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \ + NO_CHNG, _______, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_ENT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_SY), _______, \ + _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \ + ), + + /***************** + ** OTHER LAYERS ** + *****************/ + + /* Numpad layer */ + [_NUMPAD] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_E, KC_F, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, KC_PEQL, _______, \ + _______, _______, _______, _______, KC_C, KC_D, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, KC_PENT, \ + _______, _______, _______, _______, KC_A, KC_B, _______, KC_P0, _______, KC_PDOT, _______, _______, \ + _______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \ + ), + + /* Macro layer */ + [_MACROS] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \ + _______, _______, _______, _______, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \ + ), + + /* System layer */ + [_SYSTEM] = LAYOUT_60_ansi( + // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, VRSN, XXXXXXX, \ + XXXXXXX, XXXXXXX, TG(_MC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_CHNG, XXXXXXX \ + ), }; diff --git a/keyboards/kc60/keymaps/noroadsleft/readme.md b/keyboards/kc60/keymaps/noroadsleft/readme.md index 737fdc06bbed..c9db4f8de208 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme.md @@ -1,6 +1,6 @@ # @noroadsleft's KC60 keymap -### Last updated: September 2, 2018, 1:03 PM UTC-0700 +### Last updated: April 7, 2019, 2:26 AM UTC-0700 ![](https://i.imgur.com/tzhXQYI.jpg) diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md index bee0709f4880..fff80760e5be 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md @@ -7,8 +7,6 @@ 4. [Function Layers](./readme_ch4.md) 5. [Other Layers](./readme_ch5.md) -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md index 75a4fc524496..142fe302fda8 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md @@ -7,8 +7,6 @@ 4. [Function Layers](./readme_ch4.md) 5. [Other Layers](./readme_ch5.md) -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md index 80549ba5ce69..b9dc556e4e3b 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md @@ -7,8 +7,6 @@ 4. [Function Layers](./readme_ch4.md) 5. [Other Layers](./readme_ch5.md) -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- @@ -18,9 +16,9 @@ These layers were born out of the confusion I have had trying to use the in-game chat and the console in [Quake 2](https://en.wikipedia.org/wiki/Quake_II). When Quake 2 came out, alternate keyboard layouts weren't really a thing. As a result, all in-game text input is hard-locked to US QWERTY, regardless of what the operating system is using for its input method. -I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L386), is a [macro](./keymap.c#L175-183) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching. +I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L404), is a [macro](./keymap.c#L165-L172) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching. -When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L184-L191) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L192-L199) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L200-L207) that cancels the sending of the message, and undoes the layers. +When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L173-L179) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L180-L186) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L187-L193) that cancels the sending of the message, and undoes the layers. I have been testing this configuration for a few months. Sometimes I end up still in Dvorak mode without any text input systems (in-game chat or the console) running, but it pretty much always happens when I'm focused on the game, so I don't know the cause yet. diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md index f1b50846d9a1..00e6b781b47f 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md @@ -7,8 +7,6 @@ 4. **Function Layers** 5. [Other Layers](./readme_ch5.md) -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- @@ -44,7 +42,7 @@ Based on the Windows function layer, but removes some functions that are pointle Keycode(s) Sent | Notes :-------------------------------- | :---- -[`Q2_GRV`](./keymap.c#L208-L216) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers. +[`Q2_GRV`](./keymap.c#L194-L201) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers. diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md index 64102eb88d2a..a65b3acbeb44 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md @@ -7,8 +7,6 @@ 4. [Function Layers](./readme_ch4.md) 5. **Other Layers** -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- @@ -36,37 +34,83 @@ Tapping `Esc` exits the Macro layer, if the macro used doesn't do it automatical ### Macros -[![lavak3DED](https://static-cdn.jtvnw.net/emoticons/v1/821796/1.0)](./keymap.c#L122-L127) -Inputs: `lavak3DED ` -Twitch emote for [a streamer I watch a lot](https://www.twitch.tv/lavak3_). +#### [T_L3DED](./keymap.c#L122-L126) + +Output: `lavak3DED ` + +Twitch emote for [a streamer I watch a lot](https://www.twitch.tv/lavak3_). +![lavak3DED](https://static-cdn.jtvnw.net/emoticons/v1/821796/1.0) + +#### [G_PUSH](./keymap.c#L127-L131) + +Output: `git push origin ` -[G_PUSH](./keymap.c#L128-L133) -Inputs: `git push origin ` Everything from here down is related to Git or GitHub. -[G_FTCH](./keymap.c#L134-L139) -Inputs: `git fetch upstream` +#### [G_FTCH](./keymap.c#L132-L141) + +| Condition | Output | +| :-------- | :----- | +| If Shift is active | `git pull upstream ` | +| Otherwise | `git fetch upstream ` | + +#### [G_COMM](./keymap.c#L142-L147) + +Output: `git commit -m ""` Left -[G_COMM](./keymap.c#L140-L146) -Inputs: `git commit -m ""` `[Left]` Readies a `git commit` command, moves the cursor between the quotation marks, then disables the Macro layer. -[G_RST](./keymap.c#L147-L153) -Inputs: `git histt -n 10`, Enter, `git reset --soft ` -Runs a [git alias](./readme_git.md) that shows my last ten commits, then readies a `git reset --soft`. For when I commit something too soon. Disables the Macro layer when complete. +#### [G_BRCH](./keymap.c#L148-L158) + +| Condition | Output | +| :-------- | :----- | +| If Shift is active | `master` | +| Otherwise | `$(git branch-name)` | -[G_C10R](./keymap.c#L154-L160) -Inputs: `cf/` -A branch prefix I use for my current work in QMK. Disables the Macro layer when finished. +`$(git branch-name)` is a [git alias](./readme_git.md) that returns the name of the current branch. This macro disables the Macro layer when finished. -[G_BRCH](./keymap.c#L161-L167) -Inputs: `$(git branch-name)` -A [git alias](./readme_git.md) that returns the name of the current branch. Disables the Macro layer when finished. +#### [SIGNA](./keymap.c#L159-L164) + +Output: `\- @noroadsleft` Enter -[SIGNA](./keymap.c#L168-L174) -Inputs: `\- @noroadsleft` `[Enter]` Sometimes on GitHub, I sign my comments. Types my GitHub name in Markdown syntax, and then taps the `Enter` key. Disables the Macro layer when finished. +#### [MC_UNDO](./keymap.c#L202-L210) + +| Condition | Output | +| :-------- | :----- | +| If Shift is active | Shift + Command + Z | +| Otherwise | Command + Z | + +An Undo shortcut that turns to Redo if Shift is being held. I'm not sure that part is required to get that behavior, but it works as desired, so I'm not messing with it. + +#### [MC_PSTE](./keymap.c#L211-L219) + +| Condition | Output | +| :-------- | :----- | +| If Shift is active | Shift + Command + Option + V | +| Otherwise | Command + V | + +The program I use this in uses Shift + Command + Option + V to paste while maintaining formatting (typeface, text size, etc.). Sometimes I want this and sometimes I don't. Using Shift changes the behavior. + +#### [NUBS_Z](./keymap.c#L220-L234) + +| Condition | Output | +| :-------- | :----- | +| If Right Alt is active | `KC_NUBS` | +| Otherwise | `KC_Z` | + +Sometimes I type in languages from countries that use ISO layout, but my keyboard is ANSI, so I have one key fewer. This macro simulates the Non-US Backslash key if I use Right Alt + Z. + +#### [VRSN](./keymap.c#L235-L239) + +Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like: + + kc60/noroadsleft @ 0.6.326-6-gae6d7b-dirty + +#### [Emulated Numeric Keypad](./keymap.c#L240-L254) + +If I hold the Right Alt key, the number row (`KC_1` through `KC_0`) will output numpad keycodes instead of number row keycodes, enabling quicker access to characters like ™ and °. ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_git.md b/keyboards/kc60/keymaps/noroadsleft/readme_git.md index 585d9c8909c8..b81bb9409dc5 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_git.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_git.md @@ -4,46 +4,55 @@ ``` [alias] - # change branches + # Change branches co = checkout cob = checkout -b - # sync master - sync = "!f() { if [ $(git branch-name) != "master" ]; then git checkout master; fi; git pull upstream master; git push origin master; }; f" + # Cherry Pick + cp = cherry-pick + + # Check out a Pull Request + cop = "!f() { git fetch upstream pull/$1/head:pr/$1; git checkout pr/$1; }; f" + + # Sync master branch + sync = !git checkout master && git fetch upstream 2> /dev/null && git pull -n upstream master && git push origin master + + # Return the abbreviated SHA-1 of the last three commits, oldest to newest + rl = rev-list -n 3 --abbrev-commit --reverse HEAD + + # Add remote repo (for sending PRs to other forks, or checking out someone else's developments) + ar = "!f() { git remote add $1 https://github.com/$2/qmk_firmware.git; }; f" # Return the last five commits on the branch, in a more compact format - hist = log --pretty=format:\"%C(yellow)%h%Creset %Cgreen%ad%Creset%n %w(100,0,3)%s%d [%an]%n\" --graph --date=iso-local -n 5 - histm = log --pretty=format:\"%C(yellow)%h%Creset %w(100,0,3)%s%d [%an]\" --graph --date=iso-local -n 5 - histt = log --pretty=format:\"%C(yellow)%h%Creset %<(88,trunc)%s [%an]\" --graph --date=iso-local -n 5 - histb = log --reverse --pretty=format:\"- %<(98,trunc)%s [%an]\" --date=iso-local -n 5 + hist = log --pretty=format:\"%C(yellow)%h%Creset %Cgreen%ad%Creset %Cblue[%an%Cgreen% GK%Cblue]%C(yellow)%d%Creset%n %w(100,0,2)%s%n\" --graph --date=iso-local -n 5 + histt = log --pretty=format:\"* %C(yellow)%h%Creset %<(58,trunc)%s %Cblue%>(18,trunc)%an%Cgreen% G?%Creset @ %Cgreen%ad%Creset\" --date=iso-local -n 5 + histb = log --reverse --pretty=format:\"- %Cblue%>(20,trunc)%an %Creset%<(97,trunc)%s\" --date=iso-local -n 5 + + # Follow a file's filename history + follow = log --follow --name-only --pretty=format:\"%C(yellow)commit %H%Creset%d\nAuthor: %an <%ae>\nDate: %ad%n%n %s%n\" --date=iso-local # compact diff df = "diff --compact-summary" + # List all the files changed in a commit + dt = "diff-tree --no-commit-id --name-only -r" + # Short-form status - st = "!git status --short" + st = "!git status --short --untracked-files=no" # Returns the name of the current branch branch-name = "!git rev-parse --abbrev-ref HEAD" + bn = "!git branch-name" # short-form of the above - # short-form of the above - bn = "!git branch-name" + # Compare commit counts between current branch and QMK master + cc = "!f() { git fetch upstream; echo \"$(git branch-name) vs. upstream/master\"; git rev-list --left-right --count $(git branch-name)...upstream/master; }; f" - po = "push origin ($(git branch-name))" + # Push to origin repo + po = "push origin $(git branch-name)" # List the stashes sl = "stash list" - # Show the contents of a numbered stash - # Syntax: - # git st-show - st-show = "!f() { git stash show stash@{$1} -p; }; f" - - # Apply a stash, without deleting it from the list of stashes - # Syntax: - # git st-copy - st-copy = "!f() { git stash apply stash@{$1}; }; f" - # Unstage a file unstage = "reset HEAD" @@ -53,4 +62,15 @@ # Compare local master repo to its upstream branch. If anything is returned, local branch has diverged from upstream. cm = "!f() { git fetch upstream master; git diff $(git branch-name) upstream/master --compact-summary; }; f" cml = "!f() { git fetch upstream master; git diff $(git branch-name) upstream/master; }; f" + + # Delete a branch from local and remote + del-branch = "!f() { git branch -d $1; git push origin :$1; git fetch -p origin; }; f" + + # Rebase with signatures + rbv = rebase --exec 'git commit --amend --no-edit -n -S' -i + + # Force push without overwriting established history + pushf = push --force-with-lease + + ``` diff --git a/keyboards/kc60/keymaps/stanleylai/readme.md b/keyboards/kc60/keymaps/stanleylai/readme.md index 815649d987a7..6f5953ded74a 100644 --- a/keyboards/kc60/keymaps/stanleylai/readme.md +++ b/keyboards/kc60/keymaps/stanleylai/readme.md @@ -1,8 +1,6 @@ Stanley Lai's Split Right Shift with Dedicated Arrow Keys ====================== -![Image of KC60 with RGB Underglow](../ws2812/ws2812_example.jpg) - ## Quantum MK Firmware For the full Quantum feature list, see [the parent readme.md](/readme.md). @@ -20,7 +18,7 @@ For the full Quantum feature list, see [the parent readme.md](/readme.md). ![RGB Layer](http://imgur.com/ZWIfuPM) ## WS2812 Support -By default, it is now setup for 16 LEDs on the PF5 breakout pin. See [included image](../ws2812/ws2812_wiring.jpg) for wiring reference. +By default, it is now setup for 16 LEDs on the PF5 breakout pin. ### Build To build this keymap, simply run `make KEYMAP=stanleylai`. diff --git a/keyboards/kc60/readme.md b/keyboards/kc60/readme.md index da84f6159afe..e152824ccfc0 100644 --- a/keyboards/kc60/readme.md +++ b/keyboards/kc60/readme.md @@ -24,7 +24,6 @@ $ make [default|jack|] Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. ## WS2812 Support -![Image of KC60 with RGB Underglow](keymaps/ws2812/ws2812_example.jpg) Build with WS2812 Support by running `make ws2812`. diff --git a/keyboards/kc60se/config.h b/keyboards/kc60se/config.h index 54e66cb31da5..66a4aa0cbe28 100644 --- a/keyboards/kc60se/config.h +++ b/keyboards/kc60se/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . #define UNUSED_PINS #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN F5 diff --git a/keyboards/kc60se/keymaps/default/config.h b/keyboards/kc60se/keymaps/default/config.h index 0f756350514c..4496c5910061 100644 --- a/keyboards/kc60se/keymaps/default/config.h +++ b/keyboards/kc60se/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/bdn9/bdn9.c b/keyboards/keebio/bdn9/bdn9.c similarity index 100% rename from keyboards/bdn9/bdn9.c rename to keyboards/keebio/bdn9/bdn9.c diff --git a/keyboards/bdn9/bdn9.h b/keyboards/keebio/bdn9/bdn9.h similarity index 93% rename from keyboards/bdn9/bdn9.h rename to keyboards/keebio/bdn9/bdn9.h index 26b043560501..8a4511326476 100644 --- a/keyboards/bdn9/bdn9.h +++ b/keyboards/keebio/bdn9/bdn9.h @@ -31,5 +31,7 @@ KC1, KC2, KC3 \ ) \ { \ - { KA1, KA2, KA3, KB1, KB2, KB3, KC1, KC2, KC3 } \ + { KA1, KA2, KA3 }, \ + { KB1, KB2, KB3 }, \ + { KC1, KC2, KC3 } \ } diff --git a/keyboards/bdn9/config.h b/keyboards/keebio/bdn9/config.h similarity index 88% rename from keyboards/bdn9/config.h rename to keyboards/keebio/bdn9/config.h index 1d0062375227..1637ce45f1c7 100644 --- a/keyboards/bdn9/config.h +++ b/keyboards/keebio/bdn9/config.h @@ -28,16 +28,15 @@ along with this program. If not, see . #define DESCRIPTION 3x3 Macropad with Rotary Encoders /* key matrix size */ -#define MATRIX_ROWS 1 -#define MATRIX_COLS 9 +#define MATRIX_ROWS 3 +#define MATRIX_COLS 3 /* Keyboard Matrix Assignments */ -#define NO_PIN (~0) -#define MATRIX_ROW_PINS { NO_PIN } -#define MATRIX_COL_PINS { D2, D4, F4, D7, B1, B3, E6, B4, B2 } - -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -#define DIODE_DIRECTION COL2ROW +#define DIRECT_PINS { \ + { D2, D4, F4 }, \ + { D7, B1, B3 }, \ + { E6, B4, B2 } \ +} #define NUMBER_OF_ENCODERS 2 #define ENCODERS_PAD_A { D1, F5 } diff --git a/keyboards/bdn9/info.json b/keyboards/keebio/bdn9/info.json similarity index 100% rename from keyboards/bdn9/info.json rename to keyboards/keebio/bdn9/info.json diff --git a/keyboards/keebio/bdn9/keymaps/bcat/keymap.c b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c new file mode 100644 index 000000000000..3507aaedec40 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/bcat/keymap.c @@ -0,0 +1,43 @@ +#include QMK_KEYBOARD_H + +enum layer { + LAYER_FIRST, + LAYER_SECOND, +}; + +/* Switch to second layer when held. */ +#define LY_SECND MO(LAYER_SECOND) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* First layer (F1-F6) */ + [LAYER_FIRST] = LAYOUT( + KC_MUTE, LY_SECND, BL_TOGG, + KC_F4, KC_F5, KC_F6, + KC_F1, KC_F2, KC_F3 + ), + + /* Second layer (F7-F12) */ + [LAYER_SECOND] = LAYOUT( + _______, _______, _______, + KC_F10, KC_F11, KC_F12, + KC_F7, KC_F8, KC_F9 + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + switch (index) { + /* Top-left encoder (volume): */ + case 0: + tap_code(clockwise ? KC_VOLU : KC_VOLD); + break; + + /* Top-right encoder (backlight brightness): */ + case 1: + if (clockwise) { + backlight_increase(); + } else { + backlight_decrease(); + } + break; + } +} diff --git a/keyboards/keebio/bdn9/keymaps/bcat/readme.md b/keyboards/keebio/bdn9/keymaps/bcat/readme.md new file mode 100644 index 000000000000..277d9bfb18d5 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/bcat/readme.md @@ -0,0 +1,7 @@ +# bcat's BDN9 layout + +This is a simple macropad with seven keys and two rotary encoders. We use one +encoder for volume and the other for backlight brightness. Six of the keys are +F keys (for gaming, since I use keyboards without function keys normally), with +the remaining key a layer toggle that switches the function keys between F1-F6 +and F7-F12. diff --git a/keyboards/bdn9/keymaps/default/keymap.c b/keyboards/keebio/bdn9/keymaps/default/keymap.c similarity index 66% rename from keyboards/bdn9/keymaps/default/keymap.c rename to keyboards/keebio/bdn9/keymaps/default/keymap.c index 3bab86ae5468..c700019dc069 100644 --- a/keyboards/bdn9/keymaps/default/keymap.c +++ b/keyboards/keebio/bdn9/keymaps/default/keymap.c @@ -16,15 +16,26 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + | Knob 1: Vol Dn/Up | | Knob 2: Page Dn/Up | + | Press: Mute | Home | Press: Play/Pause | + | Hold: Layer 2 | Up | RGB Mode | + | Left | Down | Right | + */ [0] = LAYOUT( - KC_MUTE, KC_HOME, KC_MPLY, \ - MO(1), KC_UP, RGB_MOD, \ - KC_LEFT, KC_DOWN, KC_RGHT \ + KC_MUTE, KC_HOME, KC_MPLY, + MO(1) , KC_UP , RGB_MOD, + KC_LEFT, KC_DOWN, KC_RGHT ), + /* + | RESET | N/A | Media Stop | + | Held: Layer 2 | Home | RGB Mode | + | Media Previous | End | Media Next | + */ [1] = LAYOUT( - RESET, BL_STEP, KC_STOP, \ - _______, KC_HOME, RGB_MOD, \ - KC_MPRV, KC_END, KC_MNXT \ + RESET , BL_STEP, KC_STOP, + _______, KC_HOME, RGB_MOD, + KC_MPRV, KC_END , KC_MNXT ), }; diff --git a/keyboards/keebio/bdn9/keymaps/mousepad/config.h b/keyboards/keebio/bdn9/keymaps/mousepad/config.h new file mode 100644 index 000000000000..a2eb1a95f007 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/mousepad/config.h @@ -0,0 +1,3 @@ +#define MK_3_SPEED +#define TERMINAL_HELP + diff --git a/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c b/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c new file mode 100644 index 000000000000..79ae56fd2ee4 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/mousepad/keymap.c @@ -0,0 +1,81 @@ +/* Copyright 2019 Danny Nguyen + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +bool is_alt_tab_active = false; // ADD this near the begining of keymap.c +uint16_t alt_tab_timer = 0; // we will be using them soon. + +enum custom_keycodes { // Make sure have the awesome keycode ready + ALT_TAB = SAFE_RANGE, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, + KC_WH_U, ALT_TAB, KC_WH_L, + KC_WH_D, TT(1), KC_WH_R + ), + [1] = LAYOUT( + RESET, KC_ACL0, KC_ACL1, + KC_VOLU, KC_ACL2, KC_BRIU, + KC_VOLD, TO(1), KC_BRID + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_MS_LEFT); + } else { + tap_code(KC_MS_RIGHT); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_MS_U); + } else { + tap_code(KC_MS_D); + } + } +} +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { // This will do most of the grunt work with the keycodes. + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + return true; +} + +void matrix_scan_user(void) { // The very important timer. + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } + } +} diff --git a/keyboards/keebio/bdn9/keymaps/mousepad/readme.md b/keyboards/keebio/bdn9/keymaps/mousepad/readme.md new file mode 100644 index 000000000000..fc843929dbd9 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/mousepad/readme.md @@ -0,0 +1,16 @@ +# Mousepad layout for BDN9 +##### 2 encoders required +Why use a movable mouse when you can "Etech-a-sketch" style mousepad. +The left encoder will move the X axis; leaving the right to handle the Y axis + +| | | | +|:-:|:-:|:-:| +| Left Click | Middle Click | Right Click | +| Scroll Up | Super ALT↯TAB | Scroll Left | +| Scroll Down | ADJUSTMENT Layer | Scroll Right| + +| | | | +|:-:|:-:|:-:| +| RESET | Mouse ACL0 | Mouse ACL1 | +| VOL UP | Mouse ACL2 | Brightness UP | +| VOL Down | Adjustment Layer OFF | Brightness Down | diff --git a/keyboards/keebio/bdn9/keymaps/mousepad/rule.mk b/keyboards/keebio/bdn9/keymaps/mousepad/rule.mk new file mode 100644 index 000000000000..ff752ab42cec --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/mousepad/rule.mk @@ -0,0 +1,2 @@ +MOUSEKEY_ENABLE = yes +TAPDANCE_ENABLE = yes diff --git a/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c b/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c new file mode 100644 index 000000000000..ca8679d5749a --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c @@ -0,0 +1,57 @@ +#include QMK_KEYBOARD_H + +// Macro keys for some apps +#define SLACKUP LALT(LSFT(KC_UP)) +#define SLACKDN LALT(LSFT(KC_DOWN)) +#define RELOAD LGUI(KC_R) + +enum custom_keycodes { + PAWFIVE = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + RESET , PAWFIVE, RELOAD , + SLACKUP, KC_UP , KC_PGUP, + SLACKDN, KC_DOWN, KC_PGDN + ), +}; + +void keyboard_post_init_user(void) { + // Call the post init code. + rgblight_enable_noeeprom(); // enables Rgb, without saving settings + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); // sets mode to Slow breathing without saving +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case PAWFIVE: + if (record->event.pressed) { + SEND_STRING("+:pawfive:\n"); + return false; + } + } + + return true; +} + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + // Tab right + tap_code16(LSFT(LGUI(KC_RBRC))); + } else { + // Tab left + tap_code16(LSFT(LGUI(KC_LBRC))); + } + } + else if (index == 1) { + if (clockwise) { + // History forward + tap_code16(LGUI(KC_RBRC)); + } else { + // History back + tap_code16(LGUI(KC_LBRC)); + } + } +} diff --git a/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c b/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c new file mode 100644 index 000000000000..7687ea2bfb52 --- /dev/null +++ b/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c @@ -0,0 +1,172 @@ +/* Copyright 2019 Chuck Lauer Vose + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// // Debugging +// #include + +#define BASE TO(_BASE) +#define PANIC TO(_PANIC) +#define FLIGHT TO(_FLIGHT) +#define RCS TO(_RCS) + +enum my_layers { + _BASE = 0, + _PANIC, + _FLIGHT, + _RCS +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_MUTE, PANIC , XXXXXXX, + FLIGHT , XXXXXXX, RCS , + XXXXXXX, XXXXXXX, XXXXXXX + ), + [_PANIC] = LAYOUT( + RESET , BASE , XXXXXXX, + _______, XXXXXXX, _______, + KC_F2 , KC_F5 , KC_F9 + ), + [_FLIGHT] = LAYOUT( + XXXXXXX, _______, KC_M , + BASE , KC_W , _______, + KC_A , KC_S , KC_D + ), + [_RCS] = LAYOUT( + XXXXXXX, _______, XXXXXXX, + _______, KC_I , BASE , + KC_J , KC_K , KC_L + ) +}; + +bool base_mode = false; +bool panic_mode = false; +bool flight_mode = false; +bool rcs_mode = false; + +uint32_t layer_state_set_user(uint32_t state) { + base_mode = false; + panic_mode = false; + flight_mode = false; + rcs_mode = false; + + switch (biton32(state)) { + case _PANIC: + panic_mode = true; // For use in encoder evaluation + rgblight_sethsv_noeeprom(HSV_RED); + break; + case _FLIGHT: + flight_mode = true; // For use in encoder evaluation + rgblight_sethsv_noeeprom(HSV_CYAN); + break; + case _RCS: + rcs_mode = true; // For use in encoder evaluation + rgblight_sethsv_noeeprom(HSV_BLUE); + break; + default: // for any other layers, or the default layer + base_mode = true; + rgblight_sethsv_noeeprom(HSV_SPRINGGREEN); + break; + } + return state; +} + +void keyboard_post_init_user(void) { + // Call the post init code. + rgblight_enable_noeeprom(); // enables Rgb, without saving settings + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 1); // sets mode to Slow breathing without saving + rgblight_sethsv_noeeprom(HSV_SPRINGGREEN); +} + +// bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// uprintf("Keycode: %s\n", keycode); +// if (record->event.pressed) { +// print("pressed"); +// // Do something when pressed +// } else { +// print("unpressed"); +// // Do something else when release +// } +// } +// return true; +// } + +void encoder_update_user(uint8_t index, bool clockwise) { + if(base_mode == true) { + if (index == 0) { + if (clockwise) { + // Volume up + tap_code(KC_VOLU); + } else { + // Volume down + tap_code(KC_VOLD); + } + } + else if (index == 1) { + if (clockwise) { + // Time warp faster + tap_code(KC_DOT); + } else { + // Time warp slower + tap_code(KC_COMM); + } + } + } + + if(rcs_mode == true) { + if (index == 0) { + if (clockwise) { + // RCS Forward + tap_code(KC_H); + } else { + // RCS Backward + tap_code(KC_N); + } + } + else if (index == 1) { + if (clockwise) { + // RCS Rotate Left + tap_code(KC_Q); + } else { + // RCS Rotate Right + tap_code(KC_E); + } + } + } + + if(flight_mode == true) { + if (index == 0) { + if (clockwise) { + // Throttle up + tap_code(KC_LSFT); + } else { + // Throttle down + tap_code(KC_LCTL); + } + } + else if (index == 1) { + if (clockwise) { + // Trim left + tap_code16(LALT(KC_A)); + } else { + // Trim right + tap_code16(LALT(KC_D)); + } + } + } +} diff --git a/keyboards/bdn9/readme.md b/keyboards/keebio/bdn9/readme.md similarity index 96% rename from keyboards/bdn9/readme.md rename to keyboards/keebio/bdn9/readme.md index c9d5ed0b3567..ddbe7f144b65 100644 --- a/keyboards/bdn9/readme.md +++ b/keyboards/keebio/bdn9/readme.md @@ -10,6 +10,6 @@ Hardware Availability: [Keebio - BDN9](https://keeb.io/products/bdn9-3x3-9-key-m Make example for this keyboard (after setting up your build environment): - make bdn9:default + make keebio/bdn9: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). diff --git a/keyboards/bdn9/rules.mk b/keyboards/keebio/bdn9/rules.mk similarity index 100% rename from keyboards/bdn9/rules.mk rename to keyboards/keebio/bdn9/rules.mk diff --git a/keyboards/bfo9000/bfo9000.c b/keyboards/keebio/bfo9000/bfo9000.c similarity index 100% rename from keyboards/bfo9000/bfo9000.c rename to keyboards/keebio/bfo9000/bfo9000.c diff --git a/keyboards/bfo9000/bfo9000.h b/keyboards/keebio/bfo9000/bfo9000.h similarity index 89% rename from keyboards/bfo9000/bfo9000.h rename to keyboards/keebio/bfo9000/bfo9000.h index c3bd2236cefd..985c7f67f137 100644 --- a/keyboards/bfo9000/bfo9000.h +++ b/keyboards/keebio/bfo9000/bfo9000.h @@ -1,16 +1,7 @@ -#ifndef BFO9000_H -#define BFO9000_H +#pragma once #include "quantum.h" -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif - #define LAYOUT( \ L00, L01, L02, L03, L04, L05, L06, L07, L08, R00, R01, R02, R03, R04, R05, R06, R07, R08, \ L10, L11, L12, L13, L14, L15, L16, L17, L18, R10, R11, R12, R13, R14, R15, R16, R17, R18, \ @@ -33,5 +24,3 @@ { R40, R41, R42, R43, R44, R45, R46, R47, R48 }, \ { R50, R51, R52, R53, R54, R55, R56, R57, R58 } \ } - -#endif diff --git a/keyboards/bfo9000/config.h b/keyboards/keebio/bfo9000/config.h similarity index 93% rename from keyboards/bfo9000/config.h rename to keyboards/keebio/bfo9000/config.h index 8098428d66cc..c5afb265f3c3 100644 --- a/keyboards/bfo9000/config.h +++ b/keyboards/keebio/bfo9000/config.h @@ -16,13 +16,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1169 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -46,9 +45,11 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + /* ws2812 RGB LED */ #define RGB_DI_PIN B4 - #define RGBLED_NUM 20 // Number of LEDs /* @@ -68,5 +69,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h b/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h new file mode 100644 index 000000000000..67c64fd8e879 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +(Modified) Copyright 2019 AbstractKB + +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 . +*/ + +#pragma once + +//my block------------ +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c b/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c new file mode 100644 index 000000000000..a8348ecfb56b --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, + _LIST +}; + +enum my_keycodes { + MYRGB_TG = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_BASE] = LAYOUT( \ + KC_MPLY, KC_PSLS, KC_PAST, 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, MYRGB_TG, KC_PGUP, \ + KC_MUTE, KC_PPLS, KC_PMNS, 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_DEL, KC_PGDN, \ + KC_P7, KC_P8, KC_P9, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, \ + KC_P4, KC_P5, KC_P6, KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_CAPS, KC_PSCR, \ + KC_P1, KC_P2, KC_P3, 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, XXXXXXX, KC_INS, \ + KC_P0, KC_PDOT, KC_PENT, TO(_LIST), KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX \ +), + +[_LIST] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, TO(_BASE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +bool rgbinit = true; +bool rgbon = true; + +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one + +void matrix_post_init_user(void) { + rgblight_enable_noeeprom(); + led_set_user(host_keyboard_leds()); +} + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _LIST: + rgblight_sethsv_noeeprom(0,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + break; + default: //_BASE + rgblight_sethsv_noeeprom(0,0,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + } + + return state; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<event.pressed) { + myrgb_toggle(); + } + return false; + default: + return true; + } +} + + + diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md b/keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md new file mode 100644 index 000000000000..3ba56571fea2 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/readme.md @@ -0,0 +1,5 @@ +# My personal layout for the BFO-9000 + +It is an approximation of a 96% layout with a left-hand number pad +Other things I changed were swapping around delete, backspace, and capslock +It also uses layer based rgb underglow, and the underglow flashes when capslock is enabled \ No newline at end of file diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk b/keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk new file mode 100644 index 000000000000..7ad666d1a383 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes \ No newline at end of file diff --git a/keyboards/bfo9000/keymaps/andylikescandy6x18/config.h b/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/config.h similarity index 100% rename from keyboards/bfo9000/keymaps/andylikescandy6x18/config.h rename to keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/config.h diff --git a/keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c b/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/keymap.c similarity index 98% rename from keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c rename to keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/keymap.c index 24208e2a890a..0aa1e780a74c 100644 --- a/keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c +++ b/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/keymap.c @@ -9,11 +9,6 @@ #define _RAISE 2 #define _NAVIGATION 3 - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - //Switch Layouts #define SWBASE M(_BASE) #define SWQWERTY M(_QWERTY) diff --git a/keyboards/keebio/bfo9000/keymaps/default/config.h b/keyboards/keebio/bfo9000/keymaps/default/config.h new file mode 100644 index 000000000000..a9ae6791103c --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/default/config.h @@ -0,0 +1,27 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/bfo9000/keymaps/default/keymap.c b/keyboards/keebio/bfo9000/keymaps/default/keymap.c similarity index 93% rename from keyboards/bfo9000/keymaps/default/keymap.c rename to keyboards/keebio/bfo9000/keymaps/default/keymap.c index 5de5e123e509..956e7b9efa70 100644 --- a/keyboards/bfo9000/keymaps/default/keymap.c +++ b/keyboards/keebio/bfo9000/keymaps/default/keymap.c @@ -2,10 +2,6 @@ #define _BASE 0 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( \ diff --git a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/config.h b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/config.h new file mode 100644 index 000000000000..344634063c70 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/config.h @@ -0,0 +1,42 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +// #define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 150 +#define TAPPING_TOGGLE 2 + +// #undef RGBLED_NUM +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 12 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 \ No newline at end of file diff --git a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/keymap.c b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/keymap.c new file mode 100644 index 000000000000..d15569ee9648 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/keymap.c @@ -0,0 +1,381 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum bfo9000_layers { + _COLEMAK, // Colemak (default layer) + _QWERTY, // Qwerty + _COLEMAKGM, // Colemak gaming/vanilla (limited dual-role keys with layer access) + _QWERTYGM, // QWERTY gaming/vanilla (limited dual-role keys with layer access) + _NUMBERS, // Numbers & Symbols + _NUMBERS2, // Numbers & Symbols 2 (identical as _NUMBERS; basically used for tri-layer access to _ADJUST) + _FUNCTION, // Function + _FUNCTION2, // Function 2 (identical as _FUNCTION; used to allow for easier use of space and backspace while using function layer arrows) + _NUMPAD, // Numpad + _ADJUST, // Adjust layer (accessed via tri-layer feature) + _ADJUST2 // Second Adjust layer (accessed outside of tri-layer feature) +}; + +enum bfo9000_keycodes { + COLEMAK = SAFE_RANGE, + QWERTY, + COLEMAKGM, + QWERTYGM, + NUMPAD = TG(_NUMPAD), + ADJUST = MO(_ADJUST2), + SPCFN = LT(_FUNCTION, KC_SPC), + BSPCFN = LT(_FUNCTION2, KC_BSPC), + ENTNS = LT(_NUMBERS, KC_ENT), + DELNS = LT(_NUMBERS2, KC_DEL), + CTLESC = CTL_T(KC_ESC), + ALTAPP = ALT_T(KC_APP), + NKROTG = MAGIC_TOGGLE_NKRO +}; + +//Tap Dance Declarations +enum { + ADJ = 0, + LBCB, + RBCB, + EQPL, + PLEQ, + MNUN, + SLAS, + GVTL, + PPLEQ, + PMNUN, + PSLPAS +}; + +void dance_LAYER_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_on(_ADJUST2); + set_oneshot_layer(_ADJUST2, ONESHOT_START); + } +} +void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_off(_ADJUST2); + clear_oneshot_layer_state(ONESHOT_PRESSED); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap +[RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap +[EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap +[PLEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PLUS, KC_EQL), // Equal sign on a single-tap, plus sign on a double-tap +[MNUN] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS), // Minus sign on a single-tap, underscore on a double-tap +[SLAS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_ASTR), // Slash in a single-tap, asterisk in a double-tap +[GVTL] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), // Grave on a single-tap, tilde on a double-tap +[PPLEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PPLS, KC_EQL), // Numpad plus sign on a single-tap, equal sign on a double-tap +[PMNUN] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_UNDS), // Numpad minus sign on a single-tap, underscore on a double-tap +[PSLPAS] = ACTION_TAP_DANCE_DOUBLE(KC_PSLS, KC_PAST) // Numpad slash on a single-tap, numpad asterisk on a double-tap +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Colemak + (Default layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + | ESC | F1 | F2 | F3 | F4 | F5 | | | | | Adjust| | F12 | F6 | F7 | F8 | F9 | F10 | F11 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | = | 1 | 2 | 3 | 4 | 5 | | | | | Numpad| | | 6 | 7 | 8 | 9 | 0 | - | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Tab | Q | W | F | P | G | | | Home | | Pause | | | J | L | U | Y | ; | \ | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + |Esc/Ctl| A | R | S | T | D | | | PgUp | | ScrLck| | | H | N | E | I | O | ' | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + |SCShift| Z | X | C | V | B |Esc/Ctl|App/Alt| PgDn | | PrtScr| RAlt | RCtl | K | M | , | . | / |SCShift| + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Ins | ` | [ | ] |App/Alt| Spc/Fn| Ent/NS| Bspc | End | | | Enter |Del/NS2|Bsp/Fn2| RGUI | Left | Down | Up | Right | + `-----------------------------------------------------------------------' `-----------------------------------------------------------------------' +*/ +[_COLEMAK] = LAYOUT( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_HOME, KC_PAUS, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* QWERTY + (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + | ESC | F1 | F2 | F3 | F4 | F5 | | | | | Adjust| | F12 | F6 | F7 | F8 | F9 | F10 | F11 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | = | 1 | 2 | 3 | 4 | 5 | | | | | Numpad| | | 6 | 7 | 8 | 9 | 0 | - | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Tab | Q | W | E | R | T | | | Home | | Pause | | | Y | U | I | O | P | \ | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + |Esc/Ctl| A | S | D | F | G | | | PgUp | | ScrLck| | | H | J | K | L | ; | ' | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + |SCShift| Z | X | C | V | B |Esc/Ctl|App/Alt| PgDn | | PrtScr| RAlt | RCtl | N | M | , | . | / |SCShift| + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Ins | ` | [ | ] |App/Alt| Spc/Fn| Ent/NS| Bspc | End | | | Enter |Del/NS2|Bsp/Fn2| RGUI | Left | Down | Up | Right | + `-----------------------------------------------------------------------' `-----------------------------------------------------------------------' +*/ +[_QWERTY] = LAYOUT( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_HOME, KC_PAUS, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Numbers/Symbols layer + (Multiple characters: single-tap for first, double-tap for second) + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | F12 | F1 | F2 | F3 | F4 | F5 | | | | | | | | F6 | F7 | F8 | F9 | F10 | F12 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | 6 | 7 | 8 | 9 | 0 | | | | | | | | ^ | & | * | ( | ) | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | 1 | 2 | 3 | 4 | 5 | | | | | | | | ! | @ | # | $ | % | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | | . | / * | - _ | + = | | | | | | | | ` ~ | [ { | ] } | | | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | ( | ) | [ { | ] } | | | | | | | | | | | | | | | | + `-----------------------------------------------------------------------' `-----------------------------------------------------------------------' +*/ +[_NUMBERS] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), _______, _______, _______, _______, _______, _______, TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______, + KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_NUMBERS2] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), _______, _______, _______, _______, _______, _______, TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______, + KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Function layer + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | F12 | F1 | F2 | F3 | F4 | F5 | | | | | | | | F6 | F7 | F8 | F9 | F10 | F12 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | | | Up | | | | | | | | | | | | Up | Ctrl+Y| | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | Ctrl+A| Left | Down | Right | C+A+Tb| | | | | | | | PgUp | Right | Down | Left | Home | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | Ctrl+Z| Ctrl+X| Ctrl+C| Ctrl+V| Bspc | | | | | | | | PgDn | Mute | Vol- | Vol+ | End | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | | | | | | | | | | | | | | | Prev | Play | Next | Stop | + `-----------------------------------------------------------------------' `-----------------------------------------------------------------------' +*/ +[_FUNCTION] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, + _______, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, LCA(KC_TAB), _______, _______, _______, _______, _______, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP +), + +[_FUNCTION2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, + _______, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, LCA(KC_TAB), _______, _______, _______, _______, _______, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP +), + +/* Numpad layer + (Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | NumLk | | | | | | | | | | | Tab | NumLk | KP / | KP * | KP - | | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | | | | | | KP 7 | KP 8 | KP 9 | KP + | | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | | | | | | | KP 4 | KP 5 | KP 6 | = | | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | | KP . |KP/ KP*| KP- _ | KP+ = | | | | | | | | KP 1 | KP 2 | KP 3 | KP Ent| | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | ( | ) | [ { | ] } | | | | | | | | | | | KP 0 | KP . | KP Ent| | | + `-----------------------------------------------------------------------' `-----------------------------------------------------------------------' +*/ +[_NUMPAD] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_NLCK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TAB, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______, + _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, + _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_EQL, _______, + _______, _______, KC_PDOT, TD(PSLPAS), TD(PMNUN), TD(PPLEQ), _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______ +), + +/* Colemak gaming/vanilla + (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Del/NS2 on right side to access Adjust layer) + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | Adjust| | F12 | F6 | F7 | F8 | F9 | F10 | F11 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | Numpad| | | 6 | 7 | 8 | 9 | 0 | - | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Tab | Q | W | F | P | G | J | L | Home | | Pause | | | J | L | U | Y | ; | \ | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | LCtl | A | R | S | T | D | H | N | PgUp | | ScrLck| | | H | N | E | I | O | ' | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Shift | Z | X | C | V | B | Esc | LAlt | PgDn | | PrtScr| RAlt | RCtl | K | M | , | . | / | Shift | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Ins | ` | [ | ] | LAlt | Space | Enter | Bspc | End | | | Ent/NS|Del/NS2|Bsp/Fn2| RGUI | Left | Down | Up | Right | + `-----------------------------------------------------------------------' `-----------------------------------------------------------------------' +*/ +[_COLEMAKGM] = LAYOUT( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_HOME, KC_PAUS, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, KC_LALT, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_END, _______, ENTNS, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* QWERTY gaming/vanilla + (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Del/NS2 on right side to access Adjust layer) + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | Adjust| | F12 | F6 | F7 | F8 | F9 | F10 | F11 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | Numpad| | | 6 | 7 | 8 | 9 | 0 | - | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Tab | Q | W | E | T | Y | U | I | Home | | Pause | | | Y | U | I | O | P | \ | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | LCtl | A | S | D | F | G | H | J | PgUp | | ScrLck| | | H | J | K | L | ; | ' | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Shift | Z | X | C | V | B | Esc | LAlt | PgDn | | PrtScr| RAlt | RCtl | N | M | , | . | / | Shift | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Ins | ` | [ | ] | LAlt | Space | Enter | Bspc | End | | | Ent/NS|Del/NS2|Bsp/Fn2| RGUI | Left | Down | Up | Right | + `-----------------------------------------------------------------------' `-----------------------------------------------------------------------' +*/ +[_QWERTYGM] = LAYOUT( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_HOME, KC_PAUS, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_PGUP, KC_SLCK, _______, _______, 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_ESC, KC_LALT, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_END, _______, ENTNS, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Adjust layer + (Enter/Number + Delete/Number2 under non-gaming/vanilla layers or press & hold Adjust key on function row; Numpad is a toggle) + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | |Colemak| Qwerty| |ColmkGM| QWGM | | | | | | | | Numpad| | | | | RESET | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | | | | | | | | | | | | | | | | | | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | | | | | | | | | | | | | | NKROTG| | | | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | | | | | | | | | | | | | | | | | | | + |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| + | | | | | | | | | | | | | | | | | | | | + `-----------------------------------------------------------------------' `-----------------------------------------------------------------------' +*/ +[_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, COLEMAKGM, QWERTYGM, _______, _______, _______, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_ADJUST2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, COLEMAKGM, QWERTYGM, _______, _______, _______, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if (record->event.pressed) { + default_layer_set(1UL << _COLEMAK); +// persistent_default_layer_set(1UL << _COLEMAK); + layer_off ( _QWERTY); + layer_off ( _NUMBERS); + layer_off ( _NUMBERS2); + layer_off ( _FUNCTION); + layer_off ( _FUNCTION2); + layer_off ( _NUMPAD); + layer_off ( _COLEMAKGM); + layer_off ( _QWERTYGM); + layer_off ( _ADJUST); + layer_off ( _ADJUST2); + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + default_layer_set(1UL << _QWERTY); +// persistent_default_layer_set(1UL << _QWERTY); + layer_off ( _COLEMAK); + layer_off ( _NUMBERS); + layer_off ( _NUMBERS2); + layer_off ( _FUNCTION); + layer_off ( _FUNCTION2); + layer_off ( _NUMPAD); + layer_off ( _COLEMAKGM); + layer_off ( _QWERTYGM); + layer_off ( _ADJUST); + layer_off ( _ADJUST2); + } + return false; + break; + case COLEMAKGM: + if (record->event.pressed) { + default_layer_set(1UL << _COLEMAKGM); + layer_off ( _QWERTY); + layer_off ( _COLEMAK); + layer_off ( _NUMBERS); + layer_off ( _NUMBERS2); + layer_off ( _FUNCTION); + layer_off ( _FUNCTION2); + layer_off ( _NUMPAD); + layer_off ( _QWERTYGM); + layer_off ( _ADJUST); + layer_off ( _ADJUST2); + } + return false; + break; + case QWERTYGM: + if (record->event.pressed) { + default_layer_set(1UL << _QWERTYGM); + layer_off ( _QWERTY); + layer_off ( _COLEMAK); + layer_off ( _NUMBERS); + layer_off ( _NUMBERS2); + layer_off ( _FUNCTION); + layer_off ( _FUNCTION2); + layer_off ( _NUMPAD); + layer_off ( _COLEMAKGM); + layer_off ( _ADJUST); + layer_off ( _ADJUST2); + } + return false; + break; + } + return true; +} diff --git a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/readme.md b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/readme.md new file mode 100644 index 000000000000..0a3bdc45fd18 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/readme.md @@ -0,0 +1 @@ +## I've changed my folder name to match my GitHub username. Please see https://github.com/qmk/qmk_firmware/tree/master/keyboards/keebio/bfo9000/keymaps/tuesdayjohn for my current keymap files. diff --git a/keyboards/rorschach/keymaps/insertsnideremarks/rules.mk b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/rules.mk similarity index 95% rename from keyboards/rorschach/keymaps/insertsnideremarks/rules.mk rename to keyboards/keebio/bfo9000/keymaps/insertsnideremarks/rules.mk index b9e39c05393e..cf63c44f4f0d 100644 --- a/keyboards/rorschach/keymaps/insertsnideremarks/rules.mk +++ b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/rules.mk @@ -4,7 +4,7 @@ # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h new file mode 100644 index 000000000000..344634063c70 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h @@ -0,0 +1,42 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +// #define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 150 +#define TAPPING_TOGGLE 2 + +// #undef RGBLED_NUM +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 12 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 \ No newline at end of file diff --git a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/keymap.c b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/keymap.c new file mode 100644 index 000000000000..e42f6797e705 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/keymap.c @@ -0,0 +1,341 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum bfo9000_layers { + _COLEMAK, // Colemak (default layer) + _QWERTY, // Qwerty + _GAMING, // Gaming/vanilla toggle layer (limited dual-role keys and layer access) + _NUMBERS, // Numbers & Symbols + _NUMBERS2, // Numbers & Symbols 2 (identical as _NUMBERS; basically used for tri-layer access to _ADJUST) + _FUNCTION, // Function + _FUNCTION2, // Function 2 (identical as _FUNCTION; used to allow for easier use of space and backspace while using function layer arrows) + _NUMPAD, // Numpad + _ADJUST, // Adjust layer (accessed via tri-layer feature) + _ADJUST2 // Second Adjust layer (accessed outside of tri-layer feature) +}; + +enum bfo9000_keycodes { + COLEMAK = SAFE_RANGE, + QWERTY, + GAMING +}; + +//Tap Dance Declarations +enum { + ADJ = 0, + LBCB, + RBCB, + EQPL, + PLEQ, + MNUN, + SLAS, + GVTL, + PPEQ, + PMUN, + PSPA +}; + +void dance_LAYER_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_on(_ADJUST2); + set_oneshot_layer(_ADJUST2, ONESHOT_START); + } +} +void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_off(_ADJUST2); + clear_oneshot_layer_state(ONESHOT_PRESSED); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap +[RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap +[EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap +[PLEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PLUS, KC_EQL), // Equal sign on a single-tap, plus sign on a double-tap +[MNUN] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS), // Minus sign on a single-tap, underscore on a double-tap +[SLAS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_ASTR), // Slash in a single-tap, asterisk in a double-tap +[GVTL] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), // Grave on a single-tap, tilde on a double-tap +[PPEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PPLS, KC_EQL), // Numpad plus sign on a single-tap, equal sign on a double-tap +[PMUN] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_UNDS), // Numpad minus sign on a single-tap, underscore on a double-tap +[PSPA] = ACTION_TAP_DANCE_DOUBLE(KC_PSLS, KC_PAST) // Numpad slash on a single-tap, numpad asterisk on a double-tap +}; + +//Aliases for longer keycodes +#define NUMPAD TG(_NUMPAD) +#define ADJUST MO(_ADJUST2) +#define SPCFN LT(_FUNCTION, KC_SPC) +#define BSPCFN LT(_FUNCTION2, KC_BSPC) +#define ENTNS LT(_NUMBERS, KC_ENT) +#define DELNS LT(_NUMBERS2, KC_DEL) +#define CTLESC CTL_T(KC_ESC) +#define ALTAPP ALT_T(KC_APP) +#define CTL_A LCTL(KC_A) +#define CTL_C LCTL(KC_C) +#define CTL_V LCTL(KC_V) +#define CTL_X LCTL(KC_X) +#define CTL_Z LCTL(KC_Z) +#define CTL_Y LCTL(KC_Y) +#define CA_TAB LCA(KC_TAB) +#define HYPER ALL_T(KC_NO) +#define TD_ADJ TD(ADJ) +#define TD_LBCB TD(LBCB) +#define TD_RBCB TD(RBCB) +#define TD_EQPL TD(EQPL) +#define TD_PLEQ TD(PLEQ) +#define TD_MNUN TD(MNUN) +#define TD_SLAS TD(SLAS) +#define TD_GVTL TD(GVTL) +#define TD_PPEQ TD(PPEQ) +#define TD_PMUN TD(PMUN) +#define TD_PSPA TD(PSPA) +#define NKROTG MAGIC_TOGGLE_NKRO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +Colemak +(Default layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | ESC | F1 | F2 | F3 | F4 | F5 | | | | | Adjust | | F12 | F6 | F7 | F8 | F9 | F10 | F11 | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | = | 1 | 2 | 3 | 4 | 5 | | | | | Numpad | | | 6 | 7 | 8 | 9 | 0 | - | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Tab | Q | W | F | P | G | | | Home | | Pause | | | J | L | U | Y | ; | \ | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Esc/Ctl| A | R | S | T | D | | | PgUp | | ScrLck | | | H | N | E | I | O | ' | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | SCShift| Z | X | C | V | B | Esc/Ctl| App/Alt| PgDn | | PrtScr | RAlt | RCtl | K | M | , | . | / | SCShift| + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ins | ` | [ | ] | App/Alt| Spc/Fn | Ent/NS | Bspc | End | | | Enter | Del/NS2| Bsp/Fn2| RGUI | Left | Down | Up | Right | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_COLEMAK] = LAYOUT( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_HOME, KC_PAUS, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* +QWERTY +(Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | ESC | F1 | F2 | F3 | F4 | F5 | | | | | Adjust | | F12 | F6 | F7 | F8 | F9 | F10 | F11 | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | = | 1 | 2 | 3 | 4 | 5 | | | | | Numpad | | | 6 | 7 | 8 | 9 | 0 | - | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Tab | Q | W | E | R | T | | | Home | | Pause | | | Y | U | I | O | P | \ | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Esc/Ctl| A | S | D | F | G | | | PgUp | | ScrLck | | | H | J | K | L | ; | ' | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | SCShift| Z | X | C | V | B | Esc/Ctl| App/Alt| PgDn | | PrtScr | RAlt | RCtl | N | M | , | . | / | SCShift| + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Ins | ` | [ | ] | App/Alt| Spc/Fn | Ent/NS | Bspc | End | | | Enter | Del/NS2| Bsp/Fn2| RGUI | Left | Down | Up | Right | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_QWERTY] = LAYOUT( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_HOME, KC_PAUS, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* +Numbers/Symbols layer +(Multiple characters: single-tap for first, double-tap for second) + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | F12 | F1 | F2 | F3 | F4 | F5 | | | | | | | | F6 | F7 | F8 | F9 | F10 | F12 | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | 6 | 7 | 8 | 9 | 0 | | | | | | | | ^ | & | * | ( | ) | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | 1 | 2 | 3 | 4 | 5 | | | | | | | | ! | @ | # | $ | % | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | . | / * | - _ | + = | | | | | | | | ` ~ | [ { | ] } | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ( | ) | [ { | ] } | | | | | | | | | | | | | | | | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_NUMBERS] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, _______, _______, _______, _______, _______, _______, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_NUMBERS2] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, _______, _______, _______, _______, _______, _______, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* +Function layer + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | F12 | F1 | F2 | F3 | F4 | F5 | | | | | | | | F6 | F7 | F8 | F9 | F10 | F12 | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | Up | | | | | | | | | | | | Up | Ctrl+Y | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | Ctrl+A | Left | Down | Right | C+A+Tb | | | | | | | | PgUp | Right | Down | Left | Home | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | Ctrl+Z | Ctrl+X | Ctrl+C | Ctrl+V | Bspc | | | | | | | | PgDn | Mute | Vol- | Vol+ | End | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | | | Prev | Play | Next | Stop | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_FUNCTION] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, CTL_Y, _______, _______, + _______, CTL_A, KC_LEFT, KC_DOWN, KC_RGHT, CA_TAB, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + _______, CTL_Z, CTL_X, CTL_C, CTL_V, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP +), + +[_FUNCTION2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, CTL_Y, _______, _______, + _______, CTL_A, KC_LEFT, KC_DOWN, KC_RGHT, CA_TAB, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + _______, CTL_Z, CTL_X, CTL_C, CTL_V, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP +), + +/* +Numpad layer +(Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | NumLk | | | | | | | | | | | Tab | NumLk | KP / | KP * | KP - | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | | | | | | KP 7 | KP 8 | KP 9 | KP + | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | | | | | | | KP 4 | KP 5 | KP 6 | = | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | KP . | KP/ KP*| KP- _ | KP+ = | | | | | | | | KP 1 | KP 2 | KP 3 | KP Ent | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ( | ) | [ { | ] } | | | | | | | | | | | KP 0 | KP . | KP Ent | | | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_NUMPAD] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_NLCK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TAB, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______, + _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, + _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_EQL, _______, + _______, _______, KC_PDOT, TD_PSPA, TD_PMUN, TD_PPEQ, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______ +), + +/* +Gaming +(Toggle gaming layer with limited dual-role keys and layer access; NKRO turned on by default; Ent/NS + Delete/Numbers2 to access Adjust layer) + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | | | | | | | F6 | F7 | F8 | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | 6 | 7 | 8 | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | J | L | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LCtl | | | | | | H | N | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | Shift | | | | | | Esc | LAlt | | | | RAlt | RCtl | | | | | | Shift | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | LAlt | Space | Enter | Bspc | | | | Ent/NS | Del/NS2| Bsp/Fn2| RGUI | | | | | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_GAMING] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_6, KC_7, KC_8, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_J, KC_L, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, _______, _______, _______, _______, _______, KC_H, KC_N, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, KC_ESC, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, _______, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, _______, _______, ENTNS, _______, _______, _______, _______, _______, _______, _______ +), + +/* +Adjust layer +(Press and hold Adjust key on the function row or Enter/Number + Delete/Number2 to access; Numpad and NKRO are on toggle) + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + | | | | | | | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | Colemak| Qwerty | | Gaming | | | | | | | | | Numpad | | | | | RESET | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | | NKROTG | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | | | | | | | + |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| + | | | | | | | | | | | | | | | | | | | | + `--------------------------------------------------------------------------------' `--------------------------------------------------------------------------------' +*/ +[_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, GAMING, _______, _______, _______, _______, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_ADJUST2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, GAMING, _______, _______, _______, _______, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if (record->event.pressed) { +// persistent_default_layer_set(1UL << _COLEMAK); + default_layer_set(1UL << _COLEMAK); + layer_move (_COLEMAK); + keymap_config.nkro = 0; + } + return false; + break; + case QWERTY: + if (record->event.pressed) { +// persistent_default_layer_set(1UL << _QWERTY); + default_layer_set(1UL << _QWERTY); + layer_move (_QWERTY); + keymap_config.nkro = 0; + } + return false; + break; + case GAMING: + if (record->event.pressed) { + layer_invert (_GAMING); + layer_off (_NUMPAD); + keymap_config.nkro = 1; + } + return false; + break; + } + return true; +} diff --git a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/rules.mk b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/rules.mk new file mode 100644 index 000000000000..cf63c44f4f0d --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/rules.mk @@ -0,0 +1,19 @@ +# 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 +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes # Enable Tap Dancing function diff --git a/keyboards/bfo9000/readme.md b/keyboards/keebio/bfo9000/readme.md similarity index 91% rename from keyboards/bfo9000/readme.md rename to keyboards/keebio/bfo9000/readme.md index d2175af23606..059f2800a235 100644 --- a/keyboards/bfo9000/readme.md +++ b/keyboards/keebio/bfo9000/readme.md @@ -9,10 +9,10 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make bfo9000:default + make keebio/bfo9000:default Example of flashing this keyboard: - make bfo9000:default:avrdude + make keebio/bfo9000:default:avrdude 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. diff --git a/keyboards/bfo9000/rules.mk b/keyboards/keebio/bfo9000/rules.mk similarity index 94% rename from keyboards/bfo9000/rules.mk rename to keyboards/keebio/bfo9000/rules.mk index d11f9a54e7cb..3ebe39a902f7 100644 --- a/keyboards/bfo9000/rules.mk +++ b/keyboards/keebio/bfo9000/rules.mk @@ -1,8 +1,3 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c - # MCU name #MCU = at90usb1287 MCU = atmega32u4 @@ -41,7 +36,7 @@ F_USB = $(F_CPU) # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = caterina @@ -63,8 +58,8 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode 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. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = yes +SPLIT_KEYBOARD = yes diff --git a/keyboards/chocopad/README.md b/keyboards/keebio/chocopad/README.md similarity index 93% rename from keyboards/chocopad/README.md rename to keyboards/keebio/chocopad/README.md index ae28009c3c16..3cdb3b3b9c8a 100644 --- a/keyboards/chocopad/README.md +++ b/keyboards/keebio/chocopad/README.md @@ -9,6 +9,6 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make chocopad:default + make keebio/chocopad: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. diff --git a/keyboards/chocopad/chocopad.c b/keyboards/keebio/chocopad/chocopad.c similarity index 100% rename from keyboards/chocopad/chocopad.c rename to keyboards/keebio/chocopad/chocopad.c diff --git a/keyboards/chocopad/chocopad.h b/keyboards/keebio/chocopad/chocopad.h similarity index 93% rename from keyboards/chocopad/chocopad.h rename to keyboards/keebio/chocopad/chocopad.h index ec73b1465bcf..d37aefc57e12 100644 --- a/keyboards/chocopad/chocopad.h +++ b/keyboards/keebio/chocopad/chocopad.h @@ -1,5 +1,4 @@ -#ifndef CHOCOPAD_H -#define CHOCOPAD_H +#pragma once #include "quantum.h" @@ -28,5 +27,3 @@ KC_##C1, KC_##C2, KC_##C3, KC_##C4, \ KC_##D1, KC_##D2, KC_##D3, KC_##D4 \ ) - -#endif diff --git a/keyboards/chocopad/config.h b/keyboards/keebio/chocopad/config.h similarity index 97% rename from keyboards/chocopad/config.h rename to keyboards/keebio/chocopad/config.h index 62596a2ed752..fb00ae70ac1b 100644 --- a/keyboards/chocopad/config.h +++ b/keyboards/keebio/chocopad/config.h @@ -4,7 +4,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1144 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -42,7 +42,6 @@ #define RGBLIGHT_VAL_STEP 8 #endif #define RGB_DI_PIN D3 - #define RGBLED_NUM 4 #endif diff --git a/keyboards/chocopad/info.json b/keyboards/keebio/chocopad/info.json similarity index 100% rename from keyboards/chocopad/info.json rename to keyboards/keebio/chocopad/info.json diff --git a/keyboards/keebio/chocopad/keymaps/default/config.h b/keyboards/keebio/chocopad/keymaps/default/config.h new file mode 100644 index 000000000000..271f48d0011b --- /dev/null +++ b/keyboards/keebio/chocopad/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/chocopad/keymaps/default/keymap.c b/keyboards/keebio/chocopad/keymaps/default/keymap.c similarity index 96% rename from keyboards/chocopad/keymaps/default/keymap.c rename to keyboards/keebio/chocopad/keymaps/default/keymap.c index df22e8b1fb18..7b4b752c9ca9 100644 --- a/keyboards/chocopad/keymaps/default/keymap.c +++ b/keyboards/keebio/chocopad/keymaps/default/keymap.c @@ -4,8 +4,6 @@ #define _FN1 1 #define _FN2 2 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_ortho_4x4( diff --git a/keyboards/chocopad/keymaps/default/rules.mk b/keyboards/keebio/chocopad/keymaps/default/rules.mk similarity index 100% rename from keyboards/chocopad/keymaps/default/rules.mk rename to keyboards/keebio/chocopad/keymaps/default/rules.mk diff --git a/keyboards/chocopad/keymaps/default/config.h b/keyboards/keebio/chocopad/keymaps/khord/config.h similarity index 100% rename from keyboards/chocopad/keymaps/default/config.h rename to keyboards/keebio/chocopad/keymaps/khord/config.h diff --git a/keyboards/chocopad/keymaps/khord/keymap.c b/keyboards/keebio/chocopad/keymaps/khord/keymap.c similarity index 96% rename from keyboards/chocopad/keymaps/khord/keymap.c rename to keyboards/keebio/chocopad/keymaps/khord/keymap.c index ea36c6f6401f..2c871c4e820a 100644 --- a/keyboards/chocopad/keymaps/khord/keymap.c +++ b/keyboards/keebio/chocopad/keymaps/khord/keymap.c @@ -35,7 +35,7 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = KC_KEYMAP( + [_BASE] = LAYOUT_kc( //,----+----+----+----. P7 , P8 , P9 ,BSPC, //|----+----+----+----| @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----' ), - [_FN1] = KC_KEYMAP( + [_FN1] = LAYOUT_kc( //,----+----+----+----. ESC ,MAC1,MAC2,DEL , //|----+----+----+----| @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----' ), - [_FN2] = KC_KEYMAP( + [_FN2] = LAYOUT_kc( //,----+----+----+----. RST , XX , XX , XX , //|----+----+----+----| diff --git a/keyboards/chocopad/keymaps/khord/rules.mk b/keyboards/keebio/chocopad/keymaps/khord/rules.mk similarity index 100% rename from keyboards/chocopad/keymaps/khord/rules.mk rename to keyboards/keebio/chocopad/keymaps/khord/rules.mk diff --git a/keyboards/chocopad/rules.mk b/keyboards/keebio/chocopad/rules.mk similarity index 100% rename from keyboards/chocopad/rules.mk rename to keyboards/keebio/chocopad/rules.mk diff --git a/keyboards/dilly/README.md b/keyboards/keebio/dilly/README.md similarity index 94% rename from keyboards/dilly/README.md rename to keyboards/keebio/dilly/README.md index a676313f3e1b..74139eaeaeea 100644 --- a/keyboards/dilly/README.md +++ b/keyboards/keebio/dilly/README.md @@ -9,6 +9,6 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make dilly:default + make keebio/dilly: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. diff --git a/keyboards/dilly/config.h b/keyboards/keebio/dilly/config.h similarity index 100% rename from keyboards/dilly/config.h rename to keyboards/keebio/dilly/config.h diff --git a/keyboards/dilly/dilly.c b/keyboards/keebio/dilly/dilly.c similarity index 100% rename from keyboards/dilly/dilly.c rename to keyboards/keebio/dilly/dilly.c diff --git a/keyboards/dilly/dilly.h b/keyboards/keebio/dilly/dilly.h similarity index 100% rename from keyboards/dilly/dilly.h rename to keyboards/keebio/dilly/dilly.h diff --git a/keyboards/dilly/info.json b/keyboards/keebio/dilly/info.json similarity index 100% rename from keyboards/dilly/info.json rename to keyboards/keebio/dilly/info.json diff --git a/keyboards/keebio/dilly/keymaps/bakingpy/config.h b/keyboards/keebio/dilly/keymaps/bakingpy/config.h new file mode 100644 index 000000000000..d141283ea4af --- /dev/null +++ b/keyboards/keebio/dilly/keymaps/bakingpy/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define TAPPING_TERM 150 diff --git a/keyboards/keebio/dilly/keymaps/bakingpy/keymap.c b/keyboards/keebio/dilly/keymaps/bakingpy/keymap.c new file mode 100644 index 000000000000..7b52d5ff74b5 --- /dev/null +++ b/keyboards/keebio/dilly/keymaps/bakingpy/keymap.c @@ -0,0 +1,106 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _BASE 0 +#define _FN1 1 +#define _FN2 2 +#define _FN3 3 +#define _FN4 4 +#define _FN5 5 + +#define KC_ KC_TRNS + +// Tap-Hold keys +#define KC_ASFT MT(MOD_LSFT, KC_A) +#define KC_F_L3 LT(_FN3, KC_F) +#define KC_ZCTL MT(MOD_LCTL, KC_Z) +#define KC_XALT MT(MOD_LALT, KC_X) +#define KC_CGUI MT(MOD_LGUI, KC_C) +#define KC_V_L4 LT(_FN4, KC_V) +#define KC_SPL2 LT(_FN2, KC_SPC) +#define KC_B_L1 LT(_FN1, KC_B) +#define KC_N_L5 LT(_FN5, KC_N) +#define KC_MALT MT(MOD_RALT, KC_M) +#define KC_BSCT MT(MOD_RCTL, KC_BSPC) +#define KC_ENTS MT(MOD_RSFT, KC_ENT) +#define KC_ESCS MT(MOD_RSFT, KC_ESC) +#define KC_SCNS MT(MOD_RSFT, KC_SCLN) + +#define KC_GUIC LGUI(KC_C) + +#define KC_RST RESET +#define KC_BL_S BL_STEP +#define KC_DBUG DEBUG +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + Q , W , E , R , T , Y , U , I , O , P , + //|----+----+----+----+----+----+----+----+----+----| + ASFT, S , D ,F_L3, G , H , J , K , L ,ESCS, + //|----+----+----+----+----+----+----+----+----+----| + ZCTL,XALT,CGUI,V_L4,SPL2,B_L1,N_L5,MALT,BSCT,ENTS + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN1] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN, + //|----+----+----+----+----+----+----+----+----+----| + F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 , + //|----+----+----+----+----+----+----+----+----+----| + , , , ,BSPC, , , , , + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN2] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , + //|----+----+----+----+----+----+----+----+----+----| + F11 ,F12 , , , ,LEFT,DOWN, UP ,RGHT,GRV , + //|----+----+----+----+----+----+----+----+----+----| + , , , , ,DEL , , , , + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN3] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + , , , , ,MINS,EQL ,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----+----+----+----+----| + TAB , , , , ,COMM,DOT ,SLSH,SCLN,QUOT, + //|----+----+----+----+----+----+----+----+----+----| + , , , ,BSPC, ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN4] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + , , , , ,UNDS,PLUS,LCBR,RCBR,PIPE, + //|----+----+----+----+----+----+----+----+----+----| + TAB , , , , , LT , GT ,QUES,COLN,DQUO, + //|----+----+----+----+----+----+----+----+----+----| + , ,GUIC, ,BSPC, ,HOME,PGDN,PGUP,END + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN5] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + RTOG,RMOD, ,RST ,RHUI,RSAI,RVAI, , , , + //|----+----+----+----+----+----+----+----+----+----| + , ,DBUG, ,RHUD,RSAD,RVAD, , , , + //|----+----+----+----+----+----+----+----+----+----| + BL_S, ,GUIC, , , , , , , + //`----+----+----+----+----+----+----+----+----+----' + ) + +}; diff --git a/keyboards/dilly/keymaps/default/rules.mk b/keyboards/keebio/dilly/keymaps/bakingpy/rules.mk similarity index 100% rename from keyboards/dilly/keymaps/default/rules.mk rename to keyboards/keebio/dilly/keymaps/bakingpy/rules.mk diff --git a/keyboards/niu_mini/keymaps/spacebarracecar/config.h b/keyboards/keebio/dilly/keymaps/default/config.h similarity index 100% rename from keyboards/niu_mini/keymaps/spacebarracecar/config.h rename to keyboards/keebio/dilly/keymaps/default/config.h diff --git a/keyboards/dilly/keymaps/default/keymap.c b/keyboards/keebio/dilly/keymaps/default/keymap.c similarity index 99% rename from keyboards/dilly/keymaps/default/keymap.c rename to keyboards/keebio/dilly/keymaps/default/keymap.c index 03b539e3d80e..dc92afbd0da4 100644 --- a/keyboards/dilly/keymaps/default/keymap.c +++ b/keyboards/keebio/dilly/keymaps/default/keymap.c @@ -9,8 +9,6 @@ extern keymap_config_t keymap_config; #define _FN4 4 #define _FN5 5 -#define _______ KC_TRNS - // Tap-Hold keys #define KC_ASFT MT(MOD_LSFT, KC_A) #define KC_F_L3 LT(_FN3, KC_F) diff --git a/keyboards/dilly/keymaps/delmo/rules.mk b/keyboards/keebio/dilly/keymaps/default/rules.mk similarity index 100% rename from keyboards/dilly/keymaps/delmo/rules.mk rename to keyboards/keebio/dilly/keymaps/default/rules.mk diff --git a/keyboards/dilly/keymaps/delmo/config.h b/keyboards/keebio/dilly/keymaps/delmo/config.h similarity index 100% rename from keyboards/dilly/keymaps/delmo/config.h rename to keyboards/keebio/dilly/keymaps/delmo/config.h diff --git a/keyboards/dilly/keymaps/delmo/keymap.c b/keyboards/keebio/dilly/keymaps/delmo/keymap.c similarity index 99% rename from keyboards/dilly/keymaps/delmo/keymap.c rename to keyboards/keebio/dilly/keymaps/delmo/keymap.c index d3e8c5daf24d..9d6c900ff41a 100644 --- a/keyboards/dilly/keymaps/delmo/keymap.c +++ b/keyboards/keebio/dilly/keymaps/delmo/keymap.c @@ -10,7 +10,6 @@ extern keymap_config_t keymap_config; #define _FN5 5 #define KC_ KC_TRNS -#define _______ KC_TRNS // Tap-Hold keys //#define KC_ASFT MT(MOD_LSFT, KC_A) @@ -103,4 +102,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----+----+----+----+----' ) -}; \ No newline at end of file +}; diff --git a/keyboards/nyquist/keymaps/default/rules.mk b/keyboards/keebio/dilly/keymaps/delmo/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/default/rules.mk rename to keyboards/keebio/dilly/keymaps/delmo/rules.mk diff --git a/keyboards/dilly/keymaps/pletcher/config.h b/keyboards/keebio/dilly/keymaps/pletcher/config.h similarity index 100% rename from keyboards/dilly/keymaps/pletcher/config.h rename to keyboards/keebio/dilly/keymaps/pletcher/config.h diff --git a/keyboards/dilly/keymaps/pletcher/keymap.c b/keyboards/keebio/dilly/keymaps/pletcher/keymap.c similarity index 99% rename from keyboards/dilly/keymaps/pletcher/keymap.c rename to keyboards/keebio/dilly/keymaps/pletcher/keymap.c index 4e7a5c89d22a..8bad575d6b57 100644 --- a/keyboards/dilly/keymaps/pletcher/keymap.c +++ b/keyboards/keebio/dilly/keymaps/pletcher/keymap.c @@ -10,7 +10,6 @@ extern keymap_config_t keymap_config; #define _FN5 5 #define KC_ KC_TRNS -#define _______ KC_TRNS // Tap-Hold keys #define KC_F_L3 LT(_FN3, KC_F) diff --git a/keyboards/dilly/keymaps/pletcher/rules.mk b/keyboards/keebio/dilly/keymaps/pletcher/rules.mk similarity index 100% rename from keyboards/dilly/keymaps/pletcher/rules.mk rename to keyboards/keebio/dilly/keymaps/pletcher/rules.mk diff --git a/keyboards/dilly/rules.mk b/keyboards/keebio/dilly/rules.mk similarity index 100% rename from keyboards/dilly/rules.mk rename to keyboards/keebio/dilly/rules.mk diff --git a/keyboards/fourier/rev1/config.h b/keyboards/keebio/fourier/config.h similarity index 98% rename from keyboards/fourier/rev1/config.h rename to keyboards/keebio/fourier/config.h index 601d843e713f..70967a13f6c9 100644 --- a/keyboards/fourier/rev1/config.h +++ b/keyboards/keebio/fourier/config.h @@ -18,6 +18,8 @@ along with this program. If not, see . #pragma once +#include "config_common.h" + /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1247 diff --git a/keyboards/fourier/fourier.c b/keyboards/keebio/fourier/fourier.c similarity index 100% rename from keyboards/fourier/fourier.c rename to keyboards/keebio/fourier/fourier.c diff --git a/keyboards/fourier/fourier.h b/keyboards/keebio/fourier/fourier.h similarity index 58% rename from keyboards/fourier/fourier.h rename to keyboards/keebio/fourier/fourier.h index 1b4585c82164..7505ad8b3e17 100644 --- a/keyboards/fourier/fourier.h +++ b/keyboards/keebio/fourier/fourier.h @@ -6,6 +6,23 @@ #include "quantum.h" +#define LAYOUT( \ + LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \ + LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB7, \ + LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC3, RC4, RC5, RC6, RC7, \ + LD1, LD2, LD3, LD4, LD5, RD1, RD4, RD5, RD6, RD7 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, KC_NO}, \ + { LB1, LB2, LB3, LB4, LB5, LB6, KC_NO}, \ + { LC1, LC2, LC3, LC4, LC5, LC6, KC_NO}, \ + { LD1, LD2, LD3, LD4, LD5, KC_NO, KC_NO}, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7}, \ + { RB1, RB2, RB3, RB4, RB5, KC_NO, RB7}, \ + { RC1, KC_NO, RC3, RC4, RC5, RC6, RC7}, \ + { RD1, KC_NO, KC_NO, RD4, RD5, RD6, RD7} \ + } + // Used to create a keymap using only KC_ prefixed keys #define LAYOUT_kc( \ LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \ diff --git a/keyboards/fourier/info.json b/keyboards/keebio/fourier/info.json similarity index 100% rename from keyboards/fourier/info.json rename to keyboards/keebio/fourier/info.json diff --git a/keyboards/fourier/keymaps/default/config.h b/keyboards/keebio/fourier/keymaps/default/config.h similarity index 97% rename from keyboards/fourier/keymaps/default/config.h rename to keyboards/keebio/fourier/keymaps/default/config.h index 18f4c1f7ac4a..8cea39218168 100644 --- a/keyboards/fourier/keymaps/default/config.h +++ b/keyboards/keebio/fourier/keymaps/default/config.h @@ -21,5 +21,4 @@ along with this program. If not, see . #pragma once /* Use I2C or Serial, not both */ -#define USE_SERIAL // #define USE_I2C diff --git a/keyboards/fourier/keymaps/default/keymap.c b/keyboards/keebio/fourier/keymaps/default/keymap.c similarity index 91% rename from keyboards/fourier/keymaps/default/keymap.c rename to keyboards/keebio/fourier/keymaps/default/keymap.c index a08f27b7ce15..341bc99a7e83 100644 --- a/keyboards/fourier/keymaps/default/keymap.c +++ b/keyboards/keebio/fourier/keymaps/default/keymap.c @@ -14,15 +14,15 @@ enum custom_keycodes { #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) -#define KC_SPFN1 LT(_FN1, KC_SPACE) -#define KC_BSFN2 LT(_FN2, KC_BSPC) +#define SPFN1 LT(_FN1, KC_SPACE) +#define BSFN2 LT(_FN2, KC_BSPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, KC_FN1, KC_SPFN1, KC_BSFN2, KC_RGUI, KC_RALT, KC_FN2, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, KC_FN1, SPFN1, BSFN2, KC_RGUI, KC_RALT, KC_FN2, KC_RCTL ), [_FN1] = LAYOUT( diff --git a/keyboards/fourier/rev1/rules.mk b/keyboards/keebio/fourier/keymaps/default/rules.mk similarity index 100% rename from keyboards/fourier/rev1/rules.mk rename to keyboards/keebio/fourier/keymaps/default/rules.mk diff --git a/keyboards/fourier/keymaps/jennetters/config.h b/keyboards/keebio/fourier/keymaps/jennetters/config.h similarity index 100% rename from keyboards/fourier/keymaps/jennetters/config.h rename to keyboards/keebio/fourier/keymaps/jennetters/config.h diff --git a/keyboards/fourier/keymaps/jennetters/keymap.c b/keyboards/keebio/fourier/keymaps/jennetters/keymap.c similarity index 97% rename from keyboards/fourier/keymaps/jennetters/keymap.c rename to keyboards/keebio/fourier/keymaps/jennetters/keymap.c index 5037d3ddf5e9..a6ec95e1e3aa 100644 --- a/keyboards/fourier/keymaps/jennetters/keymap.c +++ b/keyboards/keebio/fourier/keymaps/jennetters/keymap.c @@ -15,8 +15,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) #define KC_SPFN1 LT(_FN1, KC_SPACE) @@ -53,7 +51,7 @@ enum { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_BASE] = LAYOUT( +[_BASE] = LAYOUT( // ,----+----+----+----+----+----|----+----+----+----+----+----+----. // |ESC | Q1 | W2 | E3 | R4 | T5 | Y6 | U7 | I8 | O9 | P0 | -[ | =] | // |----`----`----`----`----`----|----`----`----`----`----`----`----| @@ -63,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |-------`----`----`----`----`----|----`----`----`----`----`------| // | CTL | SYS| ALT | SP SPACE | SPACE | FN1 | CTL | \ | ENT | // `-----+----+-----+----+--------|--------+-----+------+----+------' - + TD(ESC_GR), TD(Q_1), TD(W_2), TD(E_3), TD(R_4), TD(T_5), TD(Y_6), TD(U_7), TD(I_8), TD(O_9), TD(P_0),TD(MIN_LB),TD(EQL_RB), \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD(SCL_QUO), KC_BSPC, \ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ @@ -80,11 +78,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |-------`----`----`----`----`----|----`----`----`----`----`------| // | | | | | | | | | | | // `-----+----+-----+----+--------|--------+-----+------+----+------' - + , , UP, , , , , , , , , , , \ , LEFT, DOWN, RIGHT, , , , , , , QUOT, DEL, \ , , , , , , , , , , NUBS, , \ - , , , , , , , , , + , , , , , , , , , ), [_FN2] = LAYOUT_kc( @@ -101,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { , , , , , , , , , , , , , \ , , , , , , , , , , , , \ , , , , , , , , , , , , \ - , , , , , , , , , + , , , , , , , , , ) }; @@ -145,4 +143,4 @@ qk_tap_dance_action_t tap_dance_actions[] = { [EQL_RB] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_RBRC), //Tap once for =, twice for ]/} [SCL_QUO] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT) //Tap once for ;, '/" // Other declarations would go here, separated by commas, if you have them -}; \ No newline at end of file +}; diff --git a/keyboards/fourier/keymaps/jennetters/rules.mk b/keyboards/keebio/fourier/keymaps/jennetters/rules.mk similarity index 100% rename from keyboards/fourier/keymaps/jennetters/rules.mk rename to keyboards/keebio/fourier/keymaps/jennetters/rules.mk diff --git a/keyboards/fourier/keymaps/maxim/config.h b/keyboards/keebio/fourier/keymaps/maxim/config.h similarity index 100% rename from keyboards/fourier/keymaps/maxim/config.h rename to keyboards/keebio/fourier/keymaps/maxim/config.h diff --git a/keyboards/fourier/keymaps/maxim/keymap.c b/keyboards/keebio/fourier/keymaps/maxim/keymap.c similarity index 100% rename from keyboards/fourier/keymaps/maxim/keymap.c rename to keyboards/keebio/fourier/keymaps/maxim/keymap.c diff --git a/keyboards/fourier/keymaps/valgrahf/config.h b/keyboards/keebio/fourier/keymaps/valgrahf/config.h similarity index 100% rename from keyboards/fourier/keymaps/valgrahf/config.h rename to keyboards/keebio/fourier/keymaps/valgrahf/config.h diff --git a/keyboards/fourier/keymaps/valgrahf/keymap.c b/keyboards/keebio/fourier/keymaps/valgrahf/keymap.c similarity index 98% rename from keyboards/fourier/keymaps/valgrahf/keymap.c rename to keyboards/keebio/fourier/keymaps/valgrahf/keymap.c index 4679d165c438..a31c884750c6 100644 --- a/keyboards/fourier/keymaps/valgrahf/keymap.c +++ b/keyboards/keebio/fourier/keymaps/valgrahf/keymap.c @@ -15,8 +15,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 LT(_FN1, KC_NO) #define KC_FN2 LT(_FN2, KC_NO) #define KC_SPFN LT(_FN1, KC_SPACE) diff --git a/keyboards/laplace/keymaps/bakingpy/rules.mk b/keyboards/keebio/fourier/keymaps/valgrahf/rules.mk similarity index 100% rename from keyboards/laplace/keymaps/bakingpy/rules.mk rename to keyboards/keebio/fourier/keymaps/valgrahf/rules.mk diff --git a/keyboards/fourier/keymaps/xyverz/config.h b/keyboards/keebio/fourier/keymaps/xyverz/config.h similarity index 100% rename from keyboards/fourier/keymaps/xyverz/config.h rename to keyboards/keebio/fourier/keymaps/xyverz/config.h diff --git a/keyboards/fourier/keymaps/xyverz/keymap.c b/keyboards/keebio/fourier/keymaps/xyverz/keymap.c similarity index 96% rename from keyboards/fourier/keymaps/xyverz/keymap.c rename to keyboards/keebio/fourier/keymaps/xyverz/keymap.c index 09aaa97f7def..4e864cdef7e5 100644 --- a/keyboards/fourier/keymaps/xyverz/keymap.c +++ b/keyboards/keebio/fourier/keymaps/xyverz/keymap.c @@ -17,8 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) #define KC_ESFN1 LT(_FN1, KC_ESC) @@ -46,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----|----`----`----`----`----`--------| LSFT ,SCLN, Q , J , K , X , B , M , W , V , Z , RSFT , //|-------`----`----`----`----`----|----`----`----`----`----`------| - LCTL ,LALT,LGUI ,FN2 , BSPC , SPC , FN1 ,RGUI ,RALT , RCTL + LCTL ,LALT,LGUI ,FN2 , BSPC , SPC , FN1 ,RGUI ,RALT , RCTL //`-----+----+-----+----+--------|--------+-----+-----+-----+------' ), @@ -58,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----|----`----`----`----`----`--------| RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, , , , UP , , //|-------`----`----`----`----`----|----`----`----`----`----`------| - RTOG , , , , DEL , INS , ,LEFT ,DOWN , RGHT + RTOG , , , , DEL , INS , ,LEFT ,DOWN , RGHT //`-----+----+-----+----+--------|--------+-----+-----+-----+------' ), @@ -70,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----|----`----`----`----`----`--------| , , ,DEL ,PGDN,END , F7 , F8 , F9 ,F10 ,F11 , F12 , //|-------`----`----`----`----`----|----`----`----`----`----`------| - , , , , DEL , INS , , , , + , , , , DEL , INS , , , , //`-----+----+-----+----+--------|--------+-----+-----+-----+------' ) diff --git a/keyboards/fourier/readme.md b/keyboards/keebio/fourier/readme.md similarity index 90% rename from keyboards/fourier/readme.md rename to keyboards/keebio/fourier/readme.md index ca29c7aba612..c18d1a7484a1 100644 --- a/keyboards/fourier/readme.md +++ b/keyboards/keebio/fourier/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io/collections/frontpage/products/f Make example for this keyboard (after setting up your build environment): - make fourier/rev1:default + make keebio/fourier:default Example of flashing this keyboard: - make fourier/rev1:default:avrdude + make keebio/fourier:default:avrdude 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. diff --git a/keyboards/keebio/fourier/rules.mk b/keyboards/keebio/fourier/rules.mk new file mode 100644 index 000000000000..9512c0f64827 --- /dev/null +++ b/keyboards/keebio/fourier/rules.mk @@ -0,0 +1,65 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes diff --git a/keyboards/iris/config.h b/keyboards/keebio/iris/config.h similarity index 100% rename from keyboards/iris/config.h rename to keyboards/keebio/iris/config.h diff --git a/keyboards/iris/info.json b/keyboards/keebio/iris/info.json similarity index 97% rename from keyboards/iris/info.json rename to keyboards/keebio/iris/info.json index f7b017b97acc..37806975f8ec 100644 --- a/keyboards/iris/info.json +++ b/keyboards/keebio/iris/info.json @@ -2,8 +2,8 @@ "keyboard_name": "Iris", "url": "https://keeb.io", "maintainer": "Keebio", - "width": 14.5, - "height": 5, + "width": 15, + "height": 5.75, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/iris/iris.c b/keyboards/keebio/iris/iris.c similarity index 100% rename from keyboards/iris/iris.c rename to keyboards/keebio/iris/iris.c diff --git a/keyboards/iris/iris.h b/keyboards/keebio/iris/iris.h similarity index 93% rename from keyboards/iris/iris.h rename to keyboards/keebio/iris/iris.h index 4212462c1584..ec78efc220db 100644 --- a/keyboards/iris/iris.h +++ b/keyboards/keebio/iris/iris.h @@ -1,10 +1,10 @@ #pragma once -#ifdef KEYBOARD_iris_rev1 +#ifdef KEYBOARD_keebio_iris_rev1 #include "rev1.h" -#elif KEYBOARD_iris_rev1_led +#elif KEYBOARD_keebio_iris_rev1_led #include "rev1_led.h" -#elif KEYBOARD_iris_rev2 +#elif KEYBOARD_keebio_iris_rev2 #include "rev2.h" #else #include "rev3.h" diff --git a/keyboards/iris/keymaps/ave-63/config.h b/keyboards/keebio/iris/keymaps/ave-63/config.h similarity index 100% rename from keyboards/iris/keymaps/ave-63/config.h rename to keyboards/keebio/iris/keymaps/ave-63/config.h diff --git a/keyboards/iris/keymaps/ave-63/keymap.c b/keyboards/keebio/iris/keymaps/ave-63/keymap.c similarity index 100% rename from keyboards/iris/keymaps/ave-63/keymap.c rename to keyboards/keebio/iris/keymaps/ave-63/keymap.c diff --git a/keyboards/iris/keymaps/bmoorey/config.h b/keyboards/keebio/iris/keymaps/bmoorey/config.h similarity index 100% rename from keyboards/iris/keymaps/bmoorey/config.h rename to keyboards/keebio/iris/keymaps/bmoorey/config.h diff --git a/keyboards/iris/keymaps/bmoorey/keymap.c b/keyboards/keebio/iris/keymaps/bmoorey/keymap.c similarity index 100% rename from keyboards/iris/keymaps/bmoorey/keymap.c rename to keyboards/keebio/iris/keymaps/bmoorey/keymap.c diff --git a/keyboards/iris/keymaps/bmoorey/readme.md b/keyboards/keebio/iris/keymaps/bmoorey/readme.md similarity index 100% rename from keyboards/iris/keymaps/bmoorey/readme.md rename to keyboards/keebio/iris/keymaps/bmoorey/readme.md diff --git a/keyboards/iris/keymaps/bmoorey/rules.mk b/keyboards/keebio/iris/keymaps/bmoorey/rules.mk similarity index 100% rename from keyboards/iris/keymaps/bmoorey/rules.mk rename to keyboards/keebio/iris/keymaps/bmoorey/rules.mk diff --git a/keyboards/iris/keymaps/broswen/config.h b/keyboards/keebio/iris/keymaps/broswen/config.h similarity index 100% rename from keyboards/iris/keymaps/broswen/config.h rename to keyboards/keebio/iris/keymaps/broswen/config.h diff --git a/keyboards/iris/keymaps/broswen/keymap.c b/keyboards/keebio/iris/keymaps/broswen/keymap.c similarity index 98% rename from keyboards/iris/keymaps/broswen/keymap.c rename to keyboards/keebio/iris/keymaps/broswen/keymap.c index 6d783142e40b..a64b03f57188 100644 --- a/keyboards/iris/keymaps/broswen/keymap.c +++ b/keyboards/keebio/iris/keymaps/broswen/keymap.c @@ -16,7 +16,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE @@ -51,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| , GRV,BSLS,UNDS, EQL, , , , , , , , , , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - , , , , , + , , , , , // `----+----+----' `----+----+----' ), diff --git a/keyboards/iris/keymaps/broswen/rules.mk b/keyboards/keebio/iris/keymaps/broswen/rules.mk similarity index 100% rename from keyboards/iris/keymaps/broswen/rules.mk rename to keyboards/keebio/iris/keymaps/broswen/rules.mk diff --git a/keyboards/iris/keymaps/davidrambo/config.h b/keyboards/keebio/iris/keymaps/davidrambo/config.h similarity index 90% rename from keyboards/iris/keymaps/davidrambo/config.h rename to keyboards/keebio/iris/keymaps/davidrambo/config.h index 2cdff4213bab..0c4bf8c8f4c5 100644 --- a/keyboards/iris/keymaps/davidrambo/config.h +++ b/keyboards/keebio/iris/keymaps/davidrambo/config.h @@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once /* Use I2C or Serial, not both */ @@ -39,6 +36,5 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 8 */ #define TAPPING_TERM 200 -#include "../../config.h" -#endif + diff --git a/keyboards/iris/keymaps/davidrambo/keymap.c b/keyboards/keebio/iris/keymaps/davidrambo/keymap.c similarity index 95% rename from keyboards/iris/keymaps/davidrambo/keymap.c rename to keyboards/keebio/iris/keymaps/davidrambo/keymap.c index 40f0d0145402..4d76d745d8d7 100644 --- a/keyboards/iris/keymaps/davidrambo/keymap.c +++ b/keyboards/keebio/iris/keymaps/davidrambo/keymap.c @@ -1,6 +1,4 @@ -#include "iris.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -85,13 +83,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_GAME] = LAYOUT_kc( ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ , - ___ , T , Q , W , E , R , ___ , ___ , ___ , ___ , ___ , ___ , + B , T , Q , W , E , R , ___ , ___ , ___ , ___ , ___ , ___ , TAB , LSFT, A , S , D , F , ___ , ___ , ___ , ___ , ___ , ___ , - I , LCTL, Z , X , C , V , M, P , ___, ___ , ___ , ___ , ___ , ___ , + LALT, LCTL, Z , X , C , V , M, P , ___, ___ , ___ , ___ , ___ , ___ , - LALT , LALT , SPC, BSPC, MAC, ___ + G , I , SPC, BSPC, MAC, ___ ), [_SYMBOL] = LAYOUT_kc( diff --git a/keyboards/keebio/iris/keymaps/davidrambo/readme.md b/keyboards/keebio/iris/keymaps/davidrambo/readme.md new file mode 100644 index 000000000000..181ff97f3646 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/davidrambo/readme.md @@ -0,0 +1,5 @@ +# Iris + +This is a simple Colemak layout for Iris rev2.1 with Mac and Windows layers and a Gaming Layer. +The Symbol layer is based on my Planck layout. It provides numbers, symbols, and volume controls. +There are two Navigation layers, for the Mac and Windows Colemak layers respectively. \ No newline at end of file diff --git a/keyboards/iris/keymaps/davidrambo/rules.mk b/keyboards/keebio/iris/keymaps/davidrambo/rules.mk similarity index 100% rename from keyboards/iris/keymaps/davidrambo/rules.mk rename to keyboards/keebio/iris/keymaps/davidrambo/rules.mk diff --git a/keyboards/iris/keymaps/dbroqua/config.h b/keyboards/keebio/iris/keymaps/dbroqua/config.h similarity index 100% rename from keyboards/iris/keymaps/dbroqua/config.h rename to keyboards/keebio/iris/keymaps/dbroqua/config.h diff --git a/keyboards/iris/keymaps/dbroqua/keymap.c b/keyboards/keebio/iris/keymaps/dbroqua/keymap.c similarity index 99% rename from keyboards/iris/keymaps/dbroqua/keymap.c rename to keyboards/keebio/iris/keymaps/dbroqua/keymap.c index 4cbb8af54055..fe19696e1bc7 100644 --- a/keyboards/iris/keymaps/dbroqua/keymap.c +++ b/keyboards/keebio/iris/keymaps/dbroqua/keymap.c @@ -14,7 +14,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/dbroqua/rules.mk b/keyboards/keebio/iris/keymaps/dbroqua/rules.mk similarity index 100% rename from keyboards/iris/keymaps/dbroqua/rules.mk rename to keyboards/keebio/iris/keymaps/dbroqua/rules.mk diff --git a/keyboards/keebio/iris/keymaps/default/config.h b/keyboards/keebio/iris/keymaps/default/config.h new file mode 100644 index 000000000000..01bb31a6e14a --- /dev/null +++ b/keyboards/keebio/iris/keymaps/default/config.h @@ -0,0 +1,28 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/default/keymap.c similarity index 97% rename from keyboards/iris/keymaps/default/keymap.c rename to keyboards/keebio/iris/keymaps/default/keymap.c index 4644c3d9b55d..f0e4d6f15b68 100644 --- a/keyboards/iris/keymaps/default/keymap.c +++ b/keyboards/keebio/iris/keymaps/default/keymap.c @@ -5,7 +5,7 @@ extern keymap_config_t keymap_config; #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 -#define _ADJUST 16 +#define _ADJUST 3 enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -20,25 +20,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_HOME, KC_END, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LALT + KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_RALT // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_LOWER] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PGUP, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PGDN, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_PIPE, + KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_HOME, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - BL_STEP, _______, _______, _______, KC_DOWN, KC_LCBR, KC_LPRN, KC_RPRN, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, _______, + BL_STEP, _______, _______, _______, KC_DOWN, KC_LCBR, KC_LPRN, KC_RPRN, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_END, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, KC_DEL, KC_DEL, _______, KC_P0 // └────────┴────────┴────────┘ └────────┴────────┴────────┘ @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ RGB_TOG, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - RGB_MOD, KC_MPRV, KC_MNXT, KC_VOLU, KC_PGUP, KC_UNDS, KC_EQL, KC_HOME, RGB_HUI, RGB_SAI, RGB_VAI, KC_BSLS, + RGB_MOD, KC_MPRV, KC_MNXT, KC_VOLU, KC_PGUP, KC_UNDS, KC_EQL, KC_HOME, RGB_HUI, RGB_SAI, RGB_VAI, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ KC_MUTE, KC_MSTP, KC_MPLY, KC_VOLD, KC_PGDN, KC_MINS, KC_LPRN, _______, KC_PLUS, KC_END, RGB_HUD, RGB_SAD, RGB_VAD, _______, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ diff --git a/keyboards/iris/keymaps/default/rules.mk b/keyboards/keebio/iris/keymaps/default/rules.mk similarity index 100% rename from keyboards/iris/keymaps/default/rules.mk rename to keyboards/keebio/iris/keymaps/default/rules.mk diff --git a/keyboards/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h similarity index 69% rename from keyboards/iris/keymaps/drashna/config.h rename to keyboards/keebio/iris/keymaps/drashna/config.h index dd247a42a7fe..1a937b4b7c91 100644 --- a/keyboards/iris/keymaps/drashna/config.h +++ b/keyboards/keebio/iris/keymaps/drashna/config.h @@ -19,8 +19,8 @@ along with this program. If not, see . /* Use I2C or Serial, not both */ -#define USE_SERIAL -#undef USE_I2C +// #define USE_SERIAL +#define USE_I2C /* Select hand configuration */ @@ -29,24 +29,23 @@ along with this program. If not, see . #define EE_HANDS #ifdef RGBLIGHT_ENABLE -#undef RGBLED_NUM -#define RGBLED_NUM 18 // Number of LEDs - -#define RGBLIGHT_HUE_STEP 12 -#define RGBLIGHT_SAT_STEP 12 -#define RGBLIGHT_VAL_STEP 12 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 - -#define RGBLIGHT_LIMIT_VAL 225 +# undef RGBLED_NUM +# define RGBLED_NUM 18 // Number of LEDs +# define RGBLED_SPLIT { 9, 9 } +# define RGBLIGHT_HUE_STEP 12 +# define RGBLIGHT_SAT_STEP 12 +# define RGBLIGHT_VAL_STEP 12 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 + +# define RGBLIGHT_LIMIT_VAL 225 #endif // RGBLIGHT_ENABLE #ifdef AUDIO_ENABLE -#define C6_AUDIO -#ifdef RGBLIGHT_ENABLE -#define NO_MUSIC_MODE -#endif //RGBLIGHT_ENABLE +# define C6_AUDIO +# ifdef RGBLIGHT_ENABLE +# define NO_MUSIC_MODE +# endif //RGBLIGHT_ENABLE #endif //AUDIO_ENABLE #define QMK_ESC_OUTPUT F6 // usually COL @@ -55,8 +54,8 @@ along with this program. If not, see . #define QMK_SPEAKER C6 #undef PRODUCT -#ifdef KEYBOARD_iris_rev2 -#define PRODUCT Drashna Hacked Iris Rev.2 +#ifdef KEYBOARD_keebio_iris_rev2 +# define PRODUCT Drashna Hacked Iris Rev.2 #endif #define SHFT_LED1 6 diff --git a/keyboards/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c similarity index 76% rename from keyboards/iris/keymaps/drashna/keymap.c rename to keyboards/keebio/iris/keymaps/drashna/keymap.c index d89656b7ea66..44ffb59f6a77 100644 --- a/keyboards/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c @@ -12,8 +12,8 @@ KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \ KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ - OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \ - LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ ) #define LAYOUT_iris_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__) @@ -44,6 +44,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ ), + [_NORMAN] = LAYOUT_iris_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_iris_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_iris_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_iris_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + [_MODS] = LAYOUT_wrapper( _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, @@ -89,11 +113,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_keymap(void) { - #ifndef CONVERT_TO_PROTON_C +#ifndef CONVERT_TO_PROTON_C setPinOutput(D5); writePinHigh(D5); setPinOutput(B0); writePinHigh(B0); - #endif +#endif +} + + +void keyboard_post_init_keymap(void) { +#if BACKLIGHT_ENABLE + backlight_enable(); + backlight_level(5); + #ifdef BACKLIGHT_BREATHING + breathing_enable(); + #endif +#endif } diff --git a/keyboards/iris/keymaps/drashna/rules.mk b/keyboards/keebio/iris/keymaps/drashna/rules.mk similarity index 83% rename from keyboards/iris/keymaps/drashna/rules.mk rename to keyboards/keebio/iris/keymaps/drashna/rules.mk index ccc33c06f3d0..a315e1a0b181 100644 --- a/keyboards/iris/keymaps/drashna/rules.mk +++ b/keyboards/keebio/iris/keymaps/drashna/rules.mk @@ -9,9 +9,11 @@ AUDIO_ENABLE = yes NKRO_ENABLE = yes BACKLIGHT_ENABLE = no SWAP_HANDS_ENABLE = no +SPACE_CADET_ENABLE = no -INDICATOR_LIGHTS = yes +INDICATOR_LIGHTS = no MACROS_ENABLED = no -RGBLIGHT_TWINKLE = yes +RGBLIGHT_TWINKLE = no +RGBLIGHT_STARTUP_ANIMATION = yes BOOTLOADER = qmk-dfu diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/config.h b/keyboards/keebio/iris/keymaps/drashna_lp/config.h new file mode 100644 index 000000000000..d59890b46a39 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/drashna_lp/config.h @@ -0,0 +1,48 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ +#include "../drashna/config.h" + +#ifdef RGBLIGHT_ENABLE +# undef RGBLED_NUM +# define RGBLED_NUM 16 // Number of LEDs +# undef RGBLED_SPLIT +# define RGBLED_SPLIT { 8, 8 } +#endif + +#undef PRODUCT +#ifdef KEYBOARD_keebio_iris_rev2 +# define PRODUCT Drashna Hacked Iris LP Rev.2 (Backlit) +#endif + +#undef SHFT_LED1 +#define SHFT_LED1 5 +#undef SHFT_LED2 +#define SHFT_LED2 10 + +#undef CTRL_LED1 +#define CTRL_LED1 6 +#undef CTRL_LED2 +#define CTRL_LED2 9 + +#undef ALT_LED1 +#define ALT_LED1 7 +#undef GUI_LED1 +#define GUI_LED1 8 diff --git a/keyboards/iris/keymaps/drashna_old/keymap.c b/keyboards/keebio/iris/keymaps/drashna_lp/keymap.c similarity index 100% rename from keyboards/iris/keymaps/drashna_old/keymap.c rename to keyboards/keebio/iris/keymaps/drashna_lp/keymap.c diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/rules.mk b/keyboards/keebio/iris/keymaps/drashna_lp/rules.mk new file mode 100644 index 000000000000..d3f6f5550f92 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/drashna_lp/rules.mk @@ -0,0 +1,7 @@ +USER_NAME := drashna +SRC += ../drashna/keymap.c + +include $(KEYBOARD_PATH_2)/keymaps/drashna/rules.mk + +AUDIO_ENABLE = no +BACKLIGHT_ENABLE = yes diff --git a/keyboards/iris/keymaps/drashna_old/config.h b/keyboards/keebio/iris/keymaps/drashna_old/config.h similarity index 82% rename from keyboards/iris/keymaps/drashna_old/config.h rename to keyboards/keebio/iris/keymaps/drashna_old/config.h index b985c4dfc12c..5adf014e356b 100644 --- a/keyboards/iris/keymaps/drashna_old/config.h +++ b/keyboards/keebio/iris/keymaps/drashna_old/config.h @@ -21,13 +21,15 @@ along with this program. If not, see . #include "../drashna/config.h" #ifdef RGBLIGHT_ENABLE -#undef RGBLED_NUM -#define RGBLED_NUM 16 // Number of LEDs +# undef RGBLED_NUM +# define RGBLED_NUM 16 // Number of LEDs +# undef RGBLED_SPLIT +# define RGBLED_SPLIT { 8, 8 } #endif #undef PRODUCT -#ifdef KEYBOARD_iris_rev2 -#define PRODUCT Drashna Hacked Iris Rev.2 (16 LED) +#ifdef KEYBOARD_keebio_iris_rev2 +# define PRODUCT Drashna Hacked Iris Rev.2 (16 LED) #endif #undef SHFT_LED1 diff --git a/keyboards/keebio/iris/keymaps/drashna_old/keymap.c b/keyboards/keebio/iris/keymaps/drashna_old/keymap.c new file mode 100644 index 000000000000..ff7bd09c0cf3 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/drashna_old/keymap.c @@ -0,0 +1 @@ +// placeholder diff --git a/keyboards/iris/keymaps/drashna_old/rules.mk b/keyboards/keebio/iris/keymaps/drashna_old/rules.mk similarity index 100% rename from keyboards/iris/keymaps/drashna_old/rules.mk rename to keyboards/keebio/iris/keymaps/drashna_old/rules.mk diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/config.h b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/config.h similarity index 100% rename from keyboards/iris/keymaps/dvp-zjpxshade/config.h rename to keyboards/keebio/iris/keymaps/dvp-zjpxshade/config.h diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/keymap.c b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/keymap.c similarity index 99% rename from keyboards/iris/keymaps/dvp-zjpxshade/keymap.c rename to keyboards/keebio/iris/keymaps/dvp-zjpxshade/keymap.c index 48402e964c42..12ac00cd7892 100644 --- a/keyboards/iris/keymaps/dvp-zjpxshade/keymap.c +++ b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/rules.mk similarity index 100% rename from keyboards/iris/keymaps/dvp-zjpxshade/rules.mk rename to keyboards/keebio/iris/keymaps/dvp-zjpxshade/rules.mk diff --git a/keyboards/iris/keymaps/edvorakjp/config.h b/keyboards/keebio/iris/keymaps/edvorakjp/config.h similarity index 70% rename from keyboards/iris/keymaps/edvorakjp/config.h rename to keyboards/keebio/iris/keymaps/edvorakjp/config.h index 1610c4b12426..954d0d3b99ae 100644 --- a/keyboards/iris/keymaps/edvorakjp/config.h +++ b/keyboards/keebio/iris/keymaps/edvorakjp/config.h @@ -1,10 +1,7 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "config_common.h" - /* Use I2C or Serial, not both */ - #define USE_SERIAL // #define USE_I2C @@ -14,18 +11,16 @@ // #define MASTER_RIGHT // #define EE_HANDS +#define SWAP_SCLN +#define TAPPING_TERM 300 +#define IGNORE_MOD_TAP_INTERRUPT + #undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT #define RGBLED_NUM 10 +#define RGBLIGHT_LIMIT_VAL 100 #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_LIMIT_VAL 100 - -#define MOUSEKEY_WHEEL_MAX_SPEED 10 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 20 - -#define TAPPING_TERM 120 -#define SWAP_SCLN -#endif +#endif // CONFIG_USER_H diff --git a/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c b/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c new file mode 100644 index 000000000000..be287390dd57 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c @@ -0,0 +1,85 @@ +#include QMK_KEYBOARD_H +#include "edvorakjp.h" + +/* + * enum custom_keycodes { + * KC_LOCK = NEW_SAFE_RANGE, + * }; + */ + +#define KC_ KC_TRNS + +#define KC_TMB1 KC_LA(TAB) +#define KC_TMB2 KC_LS(SPC) +#define KC_TMB3 TD(TD_LOWER) // act as LOWER when hold, as KC_LANG2(=English) when tapped +#define KC_TMB4 TD(TD_RAISE) // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped +#define KC_TMB5 KC_RC(BSPC) +#define KC_TMB6 KC_RG(ENT) +#define KC_TMB7 KC_RC(DEL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_EDVORAK] = LAYOUT_kc( + //,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----. + GRV ,EXLM, AT ,HASH , DLR ,PERC, CIRC,AMPR ,ASTR ,LPRN ,RPRN,BSPC, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + TAB ,QUOT,COMM , DOT , Y , Q , F , G , R , W , P ,BSLS, + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + EQL , A ,LA(O),LG(E),LC(I), U , D ,RS(T),RG(N),RA(S), M ,MINS, + //|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----| + ESC ,SCLN, X , C , V , Z , NO , NO , H , J , K , L , B ,SLSH, + //`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----' + TMB1,TMB2,TMB3, TMB4,TMB5,TMB6 + // `----+----+----' `----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+------+------+------+----. ,----+------+------+-------+----+----. + , , , , , , , , , , , , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + , , LCBR , LBRC , LPRN , , , RPRN , RBRC , RCBR , , , + //|----+----+------+------+------+----| |----+------+------+-------+----+----| + F1 , F2 ,LA(F3),LG(F4),LC(F5), F6 , F7 ,RS(F8),RG(F9),RA(F10),F11 ,F12 , + //|----+----+------+------+------+----+----. ,----+----+------+------+-------+----+----| + PSCR, , HOME , PGDN , PGUP ,END , , ,LEFT, DOWN , UP , RGHT , , , + //`----+----+------+------+------+----+----/ \----+----+------+------+-------+----+----' + , , NO , MAC ,TMB7, + // `----+----+----' `----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+-----+-----+-----+----. ,----+-----+-----+-----+----+----. + , , , , , , , , , , , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + , ,EXLM , AT ,HASH ,DLR , PERC,CIRC ,AMPR ,ASTR , , , + //|----+----+-----+-----+-----+----| |----+-----+-----+-----+----+----| + , 1 ,LA(2),LG(3),LC(4), 5 , 6 ,RS(7),RG(8),RA(9), 0 , , + //|----+----+-----+-----+-----+----+----. ,----+----+-----+-----+-----+----+----| + PSCR, ,HOME ,PGDN ,PGUP ,END , , ,LEFT,DOWN , UP ,RGHT , , , + //`----+----+-----+-----+-----+----+----/ \----+----+-----+-----+-----+----+----' + , ,WIN , NO , , + // `----+----+----' `----+----+----' + ) +}; + +void matrix_init_keymap() { +} + +#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT +uint32_t layer_state_set_keymap(uint32_t state) { + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + switch (biton32(state)) { + case _LOWER: + rgblight_sethsv_noeeprom_red(); + break; + case _RAISE: + rgblight_sethsv_noeeprom_blue(); + break; + default: // for any other layers, or the default layer + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_GRADIENT + 3); + get_japanese_mode() ? rgblight_sethsv_noeeprom_red() : rgblight_sethsv_noeeprom_green(); + break; + } + return state; +} +#endif diff --git a/keyboards/iris/keymaps/edvorakjp/readme.md b/keyboards/keebio/iris/keymaps/edvorakjp/readme.md similarity index 100% rename from keyboards/iris/keymaps/edvorakjp/readme.md rename to keyboards/keebio/iris/keymaps/edvorakjp/readme.md diff --git a/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk b/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk new file mode 100644 index 000000000000..4ee94a9832e5 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk @@ -0,0 +1,18 @@ +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +TAP_DANCE_ENABLE = yes diff --git a/keyboards/iris/keymaps/fabian/config.h b/keyboards/keebio/iris/keymaps/fabian/config.h similarity index 100% rename from keyboards/iris/keymaps/fabian/config.h rename to keyboards/keebio/iris/keymaps/fabian/config.h diff --git a/keyboards/iris/keymaps/fabian/keymap.c b/keyboards/keebio/iris/keymaps/fabian/keymap.c similarity index 99% rename from keyboards/iris/keymaps/fabian/keymap.c rename to keyboards/keebio/iris/keymaps/fabian/keymap.c index 383bacfa486b..d7d98fdc06b8 100644 --- a/keyboards/iris/keymaps/fabian/keymap.c +++ b/keyboards/keebio/iris/keymaps/fabian/keymap.c @@ -24,7 +24,6 @@ enum custom_keycodes { #include "dynamic_macro.h" #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_COLE COLEMAK #define KC_LOWR LOWER diff --git a/keyboards/iris/keymaps/fate/config.h b/keyboards/keebio/iris/keymaps/fate/config.h similarity index 100% rename from keyboards/iris/keymaps/fate/config.h rename to keyboards/keebio/iris/keymaps/fate/config.h diff --git a/keyboards/iris/keymaps/fate/keymap.c b/keyboards/keebio/iris/keymaps/fate/keymap.c similarity index 99% rename from keyboards/iris/keymaps/fate/keymap.c rename to keyboards/keebio/iris/keymaps/fate/keymap.c index ca92b597877b..0e21944c7972 100644 --- a/keyboards/iris/keymaps/fate/keymap.c +++ b/keyboards/keebio/iris/keymaps/fate/keymap.c @@ -17,7 +17,6 @@ enum { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR MO(_LOWER) #define KC_RASE MO(_RAISE) diff --git a/keyboards/iris/keymaps/fate/readme.md b/keyboards/keebio/iris/keymaps/fate/readme.md similarity index 100% rename from keyboards/iris/keymaps/fate/readme.md rename to keyboards/keebio/iris/keymaps/fate/readme.md diff --git a/keyboards/iris/keymaps/fate/rules.mk b/keyboards/keebio/iris/keymaps/fate/rules.mk similarity index 100% rename from keyboards/iris/keymaps/fate/rules.mk rename to keyboards/keebio/iris/keymaps/fate/rules.mk diff --git a/keyboards/iris/keymaps/gsigler/config.h b/keyboards/keebio/iris/keymaps/gsigler/config.h similarity index 100% rename from keyboards/iris/keymaps/gsigler/config.h rename to keyboards/keebio/iris/keymaps/gsigler/config.h diff --git a/keyboards/iris/keymaps/gsigler/keymap.c b/keyboards/keebio/iris/keymaps/gsigler/keymap.c similarity index 100% rename from keyboards/iris/keymaps/gsigler/keymap.c rename to keyboards/keebio/iris/keymaps/gsigler/keymap.c diff --git a/keyboards/iris/keymaps/gsigler/rules.mk b/keyboards/keebio/iris/keymaps/gsigler/rules.mk similarity index 100% rename from keyboards/iris/keymaps/gsigler/rules.mk rename to keyboards/keebio/iris/keymaps/gsigler/rules.mk diff --git a/keyboards/iris/keymaps/hag/config.h b/keyboards/keebio/iris/keymaps/hag/config.h similarity index 100% rename from keyboards/iris/keymaps/hag/config.h rename to keyboards/keebio/iris/keymaps/hag/config.h diff --git a/keyboards/iris/keymaps/hag/keymap.c b/keyboards/keebio/iris/keymaps/hag/keymap.c similarity index 99% rename from keyboards/iris/keymaps/hag/keymap.c rename to keyboards/keebio/iris/keymaps/hag/keymap.c index a690f8761a34..222b68208f77 100644 --- a/keyboards/iris/keymaps/hag/keymap.c +++ b/keyboards/keebio/iris/keymaps/hag/keymap.c @@ -36,8 +36,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS -#define KC_XXXX KC_NO #define KC_Sw2 RALT(KC_2) // Nordic @ #define KC_Sw3 RALT(KC_3) // Nordic something diff --git a/keyboards/iris/keymaps/hag/rules.mk b/keyboards/keebio/iris/keymaps/hag/rules.mk similarity index 100% rename from keyboards/iris/keymaps/hag/rules.mk rename to keyboards/keebio/iris/keymaps/hag/rules.mk diff --git a/keyboards/iris/keymaps/hexwire/config.h b/keyboards/keebio/iris/keymaps/hexwire/config.h similarity index 100% rename from keyboards/iris/keymaps/hexwire/config.h rename to keyboards/keebio/iris/keymaps/hexwire/config.h diff --git a/keyboards/iris/keymaps/hexwire/keymap.c b/keyboards/keebio/iris/keymaps/hexwire/keymap.c similarity index 99% rename from keyboards/iris/keymaps/hexwire/keymap.c rename to keyboards/keebio/iris/keymaps/hexwire/keymap.c index e9ab58bcda93..33105c1c86ab 100644 --- a/keyboards/iris/keymaps/hexwire/keymap.c +++ b/keyboards/keebio/iris/keymaps/hexwire/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/iris/keymaps/hexwire/rules.mk b/keyboards/keebio/iris/keymaps/hexwire/rules.mk similarity index 100% rename from keyboards/iris/keymaps/hexwire/rules.mk rename to keyboards/keebio/iris/keymaps/hexwire/rules.mk diff --git a/keyboards/iris/keymaps/impstyle/README.md b/keyboards/keebio/iris/keymaps/impstyle/README.md similarity index 100% rename from keyboards/iris/keymaps/impstyle/README.md rename to keyboards/keebio/iris/keymaps/impstyle/README.md diff --git a/keyboards/iris/keymaps/impstyle/config.h b/keyboards/keebio/iris/keymaps/impstyle/config.h similarity index 100% rename from keyboards/iris/keymaps/impstyle/config.h rename to keyboards/keebio/iris/keymaps/impstyle/config.h diff --git a/keyboards/iris/keymaps/impstyle/keymap.c b/keyboards/keebio/iris/keymaps/impstyle/keymap.c similarity index 98% rename from keyboards/iris/keymaps/impstyle/keymap.c rename to keyboards/keebio/iris/keymaps/impstyle/keymap.c index 30b4bf2d920d..c1964f5e1aee 100644 --- a/keyboards/iris/keymaps/impstyle/keymap.c +++ b/keyboards/keebio/iris/keymaps/impstyle/keymap.c @@ -18,7 +18,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR MO(_LOWER) // Lower layer #define KC_RASE MO(_RAISE) // Raise layer #define KC_TGLW TG(_LOWER) // toggle lower @@ -47,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_PLUS, KC_MOUS,KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH, KC_LGUI,KC_RASE,KC_SPC , KC_ENT ,KC_LOWR,KC_LALT ), - + // LOWER Layer //,----+----+----+----+----+----. ,----+----+----+----+----+----. // TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, @@ -59,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // , , , , , , , , , P1 , P2 , P3 ,EQL ,UNDS , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' // , ,DEL , BSPC , , P0 - // `----+----+----' `----+----+----' + // `----+----+----' `----+----+----' [_LOWER] = LAYOUT( KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, @@ -108,4 +107,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______, _______,_______,_______ ), -}; \ No newline at end of file +}; diff --git a/keyboards/iris/keymaps/impstyle/rules.mk b/keyboards/keebio/iris/keymaps/impstyle/rules.mk similarity index 100% rename from keyboards/iris/keymaps/impstyle/rules.mk rename to keyboards/keebio/iris/keymaps/impstyle/rules.mk diff --git a/keyboards/iris/keymaps/default/config.h b/keyboards/keebio/iris/keymaps/isolike/config.h similarity index 100% rename from keyboards/iris/keymaps/default/config.h rename to keyboards/keebio/iris/keymaps/isolike/config.h diff --git a/keyboards/keebio/iris/keymaps/isolike/keymap.c b/keyboards/keebio/iris/keymaps/isolike/keymap.c new file mode 100644 index 000000000000..912be5e39027 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/isolike/keymap.c @@ -0,0 +1,42 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _RAISE 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_DEL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_NUBS, 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_ENT, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LCTL, MO(_RAISE),KC_SPC, KC_SPC, MO(_RAISE),KC_LALT + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_RAISE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_INS, KC_HOME, KC_UP, KC_END, _______, KC_PGUP, KC_WH_U, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PGDN, KC_WH_D, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NUHS, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, KC_LCTL, KC_LALT, KC_RALT, KC_RGUI, KC_RCTL, KC_GRV, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LGUI, _______, _______, _______, _______, KC_APP + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/keebio/iris/keymaps/isolike/readme.md b/keyboards/keebio/iris/keymaps/isolike/readme.md new file mode 100644 index 000000000000..6e8244a0f255 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/isolike/readme.md @@ -0,0 +1,5 @@ +# isolike keymap + +Modelled on the ISO keyboard layout. Key positions should feel quite familiar to +ISO layout users. There is only two layers. The space, enter and raise keys are +mirrored on both hands to make it easier to remember and type on. diff --git a/keyboards/levinson/keymaps/treadwell/rules.mk b/keyboards/keebio/iris/keymaps/isolike/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/treadwell/rules.mk rename to keyboards/keebio/iris/keymaps/isolike/rules.mk diff --git a/keyboards/iris/keymaps/jennetters/config.h b/keyboards/keebio/iris/keymaps/jennetters/config.h similarity index 100% rename from keyboards/iris/keymaps/jennetters/config.h rename to keyboards/keebio/iris/keymaps/jennetters/config.h diff --git a/keyboards/iris/keymaps/jennetters/keymap.c b/keyboards/keebio/iris/keymaps/jennetters/keymap.c similarity index 98% rename from keyboards/iris/keymaps/jennetters/keymap.c rename to keyboards/keebio/iris/keymaps/jennetters/keymap.c index 287dc9712df6..c06079c92627 100644 --- a/keyboards/iris/keymaps/jennetters/keymap.c +++ b/keyboards/keebio/iris/keymaps/jennetters/keymap.c @@ -18,7 +18,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE @@ -45,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| // | SFT| Z | X | C | V | B | SPC| | SPC| N | M | , | . | / | ENT| // `----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - // \ GUI| ALT| CTL / \RASE\ CTL | SFT / + // \ GUI| ALT| CTL / \RASE\ CTL | SFT / // `----+----+----' `----+----+----' TD(ESC_GR), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \ @@ -56,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_LOWER] = LAYOUT_kc( - + // ,----+----+----+----+----+----. ,----+----+----+----+----+----. // | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | DEL| // |----+----+----+----+----+----| |----+----+----+----+----+----| @@ -66,14 +65,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| // | \ | | | | | [ | ( | | ) | ] | | | | - | | // `----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - // \ | | DEL / \ DEL\ | / + // \ | | DEL / \ DEL\ | / // `----+----+----' `----+----+----' TILD, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, DEL, \ , 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, , \ , , , , , , , , , , ,PIPE, \ BL_S, , , , , LCBR, LPRN, RPRN, RCBR, , , , MINS, , \ - , , DEL, DEL, , + , , DEL, DEL, , ), [_RAISE] = LAYOUT_kc( @@ -86,14 +85,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| // | | | | | | | | | | | | | | \ | | // `----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - // \ | | / \ \ | / + // \ | | / \ \ | / // `----+----+----' `----+----+----' , F1, F2, , , , , , , LBRC, RBRC, EQL, \ , , UP, , , , YUNO, NOVY, , LCBR, RCBR, DEL, \ , LEFT, DOWN, RIGHT, , , SHRG, , , , PIPE, , \ , , , , , , , , , , , , BSLS, , \ - , , , , , + , , , , , ), [_ADJUST] = LAYOUT( @@ -200,8 +199,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { SEND_STRING("ლ(ಠ_ಠლ)"); // YUNO?! return false; - } - */ + } + */ } return true; -} \ No newline at end of file +} diff --git a/keyboards/iris/keymaps/jennetters/readme.md b/keyboards/keebio/iris/keymaps/jennetters/readme.md similarity index 100% rename from keyboards/iris/keymaps/jennetters/readme.md rename to keyboards/keebio/iris/keymaps/jennetters/readme.md diff --git a/keyboards/iris/keymaps/jennetters/rules.mk b/keyboards/keebio/iris/keymaps/jennetters/rules.mk similarity index 100% rename from keyboards/iris/keymaps/jennetters/rules.mk rename to keyboards/keebio/iris/keymaps/jennetters/rules.mk diff --git a/keyboards/iris/keymaps/khord/config.h b/keyboards/keebio/iris/keymaps/khord/config.h similarity index 100% rename from keyboards/iris/keymaps/khord/config.h rename to keyboards/keebio/iris/keymaps/khord/config.h diff --git a/keyboards/iris/keymaps/khord/keymap.c b/keyboards/keebio/iris/keymaps/khord/keymap.c similarity index 100% rename from keyboards/iris/keymaps/khord/keymap.c rename to keyboards/keebio/iris/keymaps/khord/keymap.c diff --git a/keyboards/iris/keymaps/khord/rules.mk b/keyboards/keebio/iris/keymaps/khord/rules.mk similarity index 100% rename from keyboards/iris/keymaps/khord/rules.mk rename to keyboards/keebio/iris/keymaps/khord/rules.mk diff --git a/keyboards/iris/keymaps/krusli/README.md b/keyboards/keebio/iris/keymaps/krusli/README.md similarity index 100% rename from keyboards/iris/keymaps/krusli/README.md rename to keyboards/keebio/iris/keymaps/krusli/README.md diff --git a/keyboards/iris/keymaps/krusli/config.h b/keyboards/keebio/iris/keymaps/krusli/config.h similarity index 100% rename from keyboards/iris/keymaps/krusli/config.h rename to keyboards/keebio/iris/keymaps/krusli/config.h diff --git a/keyboards/iris/keymaps/krusli/keymap.c b/keyboards/keebio/iris/keymaps/krusli/keymap.c similarity index 99% rename from keyboards/iris/keymaps/krusli/keymap.c rename to keyboards/keebio/iris/keymaps/krusli/keymap.c index 4aa076ab16ad..095716621d14 100644 --- a/keyboards/iris/keymaps/krusli/keymap.c +++ b/keyboards/keebio/iris/keymaps/krusli/keymap.c @@ -16,8 +16,6 @@ enum custom_keycodes { ADJUST, }; -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, diff --git a/keyboards/iris/keymaps/krusli/rules.mk b/keyboards/keebio/iris/keymaps/krusli/rules.mk similarity index 100% rename from keyboards/iris/keymaps/krusli/rules.mk rename to keyboards/keebio/iris/keymaps/krusli/rules.mk diff --git a/keyboards/iris/keymaps/lewisridden/config.h b/keyboards/keebio/iris/keymaps/lewisridden/config.h similarity index 100% rename from keyboards/iris/keymaps/lewisridden/config.h rename to keyboards/keebio/iris/keymaps/lewisridden/config.h diff --git a/keyboards/iris/keymaps/lewisridden/keymap.c b/keyboards/keebio/iris/keymaps/lewisridden/keymap.c similarity index 99% rename from keyboards/iris/keymaps/lewisridden/keymap.c rename to keyboards/keebio/iris/keymaps/lewisridden/keymap.c index 331c0632ac43..e5d12ebd11a1 100644 --- a/keyboards/iris/keymaps/lewisridden/keymap.c +++ b/keyboards/keebio/iris/keymaps/lewisridden/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/lewisridden/rules.mk b/keyboards/keebio/iris/keymaps/lewisridden/rules.mk similarity index 100% rename from keyboards/iris/keymaps/lewisridden/rules.mk rename to keyboards/keebio/iris/keymaps/lewisridden/rules.mk diff --git a/keyboards/viterbi/keymaps/hexwire/config.h b/keyboards/keebio/iris/keymaps/moonfall/config.h similarity index 86% rename from keyboards/viterbi/keymaps/hexwire/config.h rename to keyboards/keebio/iris/keymaps/moonfall/config.h index 7acf84510e64..7986b504162a 100644 --- a/keyboards/viterbi/keymaps/hexwire/config.h +++ b/keyboards/keebio/iris/keymaps/moonfall/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Danny Nguyen +Copyright 2017 Danny Nguyen 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 @@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once /* Use I2C or Serial, not both */ @@ -31,13 +28,9 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define TAPPING_TERM 150 - #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/keebio/iris/keymaps/moonfall/keymap.c b/keyboards/keebio/iris/keymaps/moonfall/keymap.c new file mode 100644 index 000000000000..0b6cde45e8b3 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/moonfall/keymap.c @@ -0,0 +1,114 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + RAISE, 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_DEL, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + LOWER, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_LCTL + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_LOWER] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_EQL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, KC_UP, _______, _______, _______, _______, KC_PLUS, KC_EQL, KC_TILD, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_UP, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, KC_GRV, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_GRV, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, KC_END, KC_PGDN, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_RAISE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_EQL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_EQL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, KC_UP, _______, _______, _______, _______, KC_PLUS, KC_EQL, KC_TILD, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_UP, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, KC_GRV, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, KC_GRV, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, KC_END, KC_PGDN, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/keebio/iris/keymaps/moonfall/rules.mk b/keyboards/keebio/iris/keymaps/moonfall/rules.mk new file mode 100644 index 000000000000..db925dd2b6d2 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/moonfall/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no diff --git a/keyboards/iris/keymaps/mtdjr/config.h b/keyboards/keebio/iris/keymaps/mtdjr/config.h similarity index 100% rename from keyboards/iris/keymaps/mtdjr/config.h rename to keyboards/keebio/iris/keymaps/mtdjr/config.h diff --git a/keyboards/iris/keymaps/mtdjr/keymap.c b/keyboards/keebio/iris/keymaps/mtdjr/keymap.c similarity index 100% rename from keyboards/iris/keymaps/mtdjr/keymap.c rename to keyboards/keebio/iris/keymaps/mtdjr/keymap.c diff --git a/keyboards/iris/keymaps/mtdjr/rules.mk b/keyboards/keebio/iris/keymaps/mtdjr/rules.mk similarity index 100% rename from keyboards/iris/keymaps/mtdjr/rules.mk rename to keyboards/keebio/iris/keymaps/mtdjr/rules.mk diff --git a/keyboards/keebio/iris/keymaps/nstickney/README.md b/keyboards/keebio/iris/keymaps/nstickney/README.md new file mode 100644 index 000000000000..1cafce67f8d7 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/nstickney/README.md @@ -0,0 +1,46 @@ +# nstickney's Iris Layout + + > Familiar layout for users who regularly switch between Iris and more standard layouts. + +[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme) + +## Install + +For instructions on building and installing this keymap, see the [docs](https://docs.qmk.fm/#/getting_started_make_guide). Below is the command for me; it may be different for you. + +```sh +$ make keebio/iris/rev2:nstickney:avrdude +``` + +## Usage + +0. QWERTY `BASE` layer. + * `/`, `\\`, ` `, `[ENTER]`, `-`, and `=` on the thumb clusters. + * `CAPSLOCK` replaced by `ESC`; hold it down for `CTRL`. `'` can also be held for `CTRL`. + * [Space-Cadet Shift](/docs/docs/feature_space_cadet_shift.md) is enabled, so the `SHIFT` keys send `(` and `)` when tapped. + * Hold down `/` or `=` for `ALT`. + * Hold down `\\` or `-` to access the functions layer. + * Upper-center thumb keys are `GUI` and `MENU`. + * Tapping `GUI` 2, 3, or 4 times will toggle `NUMLOCK`, `CAPSLOCK`, or `SCROLLLOCK`, respectively. + * Tapping `MENU` 2, 3, or 4 times will toggle the `NUMP`, `SYMB`, and `SYSH` layers, respectively. +0. Unicode-input symbols on `SYMB` and `SYSH` layers. Based (loosely) on US-International layout. +0. `NUMP` layer has number pads on each hand. Number pad `7`-`8`-`9` align with QWERTY `7`-`8`-`9` on right hand. +0. Function, arrow, media, and miscellaneous keys on `FCTN` layer. + * `F1` through `F10` on `1`-`10`. `F11` is on `GUI` and `F12` is on `MENU`. + * Brackets (`[` and `]`) available on `U` and `I`; braces (`{` and `}`) on `O` and `P`. + * Arrow keys on `ESDF` and `HJKL`; familiar for both Vim users and FPS gamers. + * `W` is `HOME`; `R` is `END`. `T` is `PAGE UP` and `G` is `PAGE DOWN`. + * Music controls on lower row of left hand. + * Volume and screen brightness on lower row of right hand. + * `PRINT SCREEN`, `PAUSE`, `SYSREQ`, `INSERT`, and `CLEAR` also mapped, as intelligently as possible. + * `A` toggles the RGB underglow (which changes color to indicate active layer). + * `Q` toggles the Unicode input through Linux, WinCompose, and MacOS. + +## Contribute + +If you are using this layout and think you've found a better way to do something, I'd appreciate an [issue](https://github.com/nstickney/qmk_firmware/issues), or better yet a [pull request](https://github.com/nstickney/qmk_firmware/pulls). + + +## License + +Copyright © 2016-2019 @nstickney. Released under [GPL-2.0](/LICENSE). diff --git a/keyboards/keebio/iris/keymaps/nstickney/config.h b/keyboards/keebio/iris/keymaps/nstickney/config.h new file mode 100644 index 000000000000..0aeb87e6232a --- /dev/null +++ b/keyboards/keebio/iris/keymaps/nstickney/config.h @@ -0,0 +1,40 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +// #undef RGBLED_NUM +// #define RGBLIGHT_ANIMATIONS +// #define RGBLED_NUM 12 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 + +// Unicode input +#undef UNICODE_SELECTED_MODES +#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WINC diff --git a/keyboards/keebio/iris/keymaps/nstickney/keymap.c b/keyboards/keebio/iris/keymaps/nstickney/keymap.c new file mode 100644 index 000000000000..609139985850 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/nstickney/keymap.c @@ -0,0 +1,165 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// Layers +#define BASE 0 // Base layer +#define SYMB 1 // Symbols +#define SYSH 2 // Symbols, shifted +#define NUMP 4 // Numpad +#define FCTN 8 // Functions + +// Tap Dancing +void dance_lock (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count){ + case 1: // Press once for LGUI + tap_code(KC_LGUI); + break; + case 2: // Press twice for NUMLOCK + tap_code(KC_NLCK); + break; + case 3: // Press thrice for CAPSLOCK + tap_code(KC_CAPS); + break; + case 4: // Press four times for SCROLLOCK + tap_code(KC_SLCK); + break; + default: + break; + } +}; + +void dance_layer (qk_tap_dance_state_t *state, void *user_data) { + switch (state -> count) { + case 1: // Press once for MENU + tap_code(KC_APP); + break; + case 2: // Press twice for NUMPAD + layer_invert(NUMP); + break; + case 3: // Press thrice for SYMBOLS + layer_invert(SYMB); + break; + case 4: // Press four times for SYMBOLS, SHIFTED + layer_invert(SYSH); + break; + default: + break; + } +}; + +enum tap_dances {LOCKS = 0, LAYERS = 1}; +qk_tap_dance_action_t tap_dance_actions[] = { + [LOCKS] = ACTION_TAP_DANCE_FN(dance_lock), + [LAYERS] = ACTION_TAP_DANCE_FN(dance_layer) +}; + +// Make layering more clear +#define CC_ESC LCTL_T(KC_ESC) +#define CC_QUOT RCTL_T(KC_QUOT) +#define AC_SLSH LALT_T(KC_SLSH) +#define AC_EQL RALT_T(KC_EQL) +#define FC_BSLS LT(FCTN, KC_BSLS) +#define FC_MINS LT(FCTN, KC_MINS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = LAYOUT( +// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + CC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CC_QUOT, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, TD(LOCKS), TD(LAYERS),KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, +// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘ + AC_SLSH, FC_BSLS, KC_SPC, KC_ENT, FC_MINS, AC_EQL +// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘ + ), + + [SYMB] = LAYOUT( +// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + UC(0x00EF),UC(0x00A1),UC(0x00B2),UC(0x00B3),UC(0x00A4),UC(0x20AC), UC(0x00BC),UC(0x00BD),UC(0x00BE),UC(0x2018),UC(0x2019),_______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, UC(0x00E4),UC(0x00E5),UC(0x00E9),UC(0x00AE),UC(0x00FE), UC(0x00FC),UC(0x00FA),UC(0x00ED),UC(0x00F3),UC(0x00F6),_______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, UC(0x00E1),UC(0x00DF),UC(0x00F0),UC(0x00EC),UC(0x00ED), UC(0x00EE),UC(0x00E0),UC(0x00E2),UC(0x00F8),UC(0x00B6),UC(0x00B4), +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, UC(0x00E6),UC(0x00E8),UC(0x00A9),UC(0x00EA),UC(0x00EB),_______, _______, UC(0x00F1),UC(0x00FD),UC(0x00E7),UC(0x00F4),UC(0x00BF),_______, +// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘ + UC(0x00BF),UC(0x00AC),_______, _______, UC(0x00B1),UC(0x00D7) +// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘ + ), + + [SYSH] = LAYOUT( +// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + UC(0x00CF),UC(0x00B9),UC(0x2200),UC(0x2201),UC(0x00A3),UC(0x00A5), UC(0x00B5),UC(0x00AB),UC(0x00BB),UC(0x201C),UC(0x201D),_______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, UC(0x00C4),UC(0x00C5),UC(0x00C9),UC(0x2122),UC(0x00DE), UC(0x00DC),UC(0x00DA),UC(0x00CD),UC(0x00D3),UC(0x00D6),_______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, UC(0x00C1),UC(0x00A7),UC(0x00D0),UC(0x00CC),UC(0x00CD), UC(0x00CE),UC(0x00C1),UC(0x00C2),UC(0x00D8),UC(0x00B0),UC(0x00A8), +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, UC(0x00C6),UC(0x00C8),UC(0x00A2),UC(0x00CA),UC(0x00CB),_______, _______, UC(0x00D1),UC(0x00DD),UC(0x00C7),UC(0x00D4),UC(0x203D),_______, +// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘ + UC(0x203D),UC(0x00A6),_______, _______, UC(0x00AA),UC(0x00F7) +// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘ + ), + + [NUMP] = LAYOUT( +// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + _______, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, _______, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, _______, _______, _______, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, _______, +// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘ + _______, _______, _______, KC_PENT, _______, _______ +// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘ + ), + + [FCTN] = LAYOUT( +// ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ ┌──────────┬──────────┬──────────┬──────────┬──────────┬──────────┐ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_SYSREQ, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + KC_PSCR, UC_MOD, KC_HOME, KC_UP, KC_END, KC_PGUP, UC(0x2014),KC_LBRC, KC_RBRC, S(KC_LBRC),S(KC_RBRC),KC_INS, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + KC_PAUS, RGB_TOG, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BRIU, KC_CLR, +// ├──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┐ ┌──────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┤ + _______, KC_MPRV, KC_MRWD, KC_MPLY, KC_MFFD, KC_MNXT, KC_F11, KC_F12, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, _______, +// └──────────┴──────────┴──────────┴────┬─────┴────┬─────┴────┬─────┴────┬─────┘ └────┬─────┴────┬─────┴────┬─────┴────┬─────┴──────────┴──────────┴──────────┘ + _______, _______, _______, _______, _______, _______ +// └──────────┴──────────┴──────────┘ └──────────┴──────────┴──────────┘ + ) +}; + +// Initialize rgblight +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + for (int i = 360; i > 0; i--) { + rgblight_sethsv_noeeprom(i, 255, 255); + } + layer_state_set_user(layer_state); +}; + +// Turn on RGB underglow according to active layer +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case FCTN: + rgblight_sethsv_noeeprom(136, 255, 255); + break; + case NUMP: + rgblight_sethsv_noeeprom(228, 255, 255); + break; + case SYMB: + case SYSH: + rgblight_sethsv_noeeprom(320, 255, 255); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_noeeprom(19, 255, 255); + break; + } + return state; +}; diff --git a/keyboards/zen/rev1/rules.mk b/keyboards/keebio/iris/keymaps/nstickney/rules.mk similarity index 51% rename from keyboards/zen/rev1/rules.mk rename to keyboards/keebio/iris/keymaps/nstickney/rules.mk index d7463419b4fe..851fc924e8e0 100644 --- a/keyboards/zen/rev1/rules.mk +++ b/keyboards/keebio/iris/keymaps/nstickney/rules.mk @@ -1,2 +1,4 @@ -RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE=yes +UNICODE_ENABLE = yes diff --git a/keyboards/iris/keymaps/olligranlund_nordic/config.h b/keyboards/keebio/iris/keymaps/olligranlund_nordic/config.h similarity index 100% rename from keyboards/iris/keymaps/olligranlund_nordic/config.h rename to keyboards/keebio/iris/keymaps/olligranlund_nordic/config.h diff --git a/keyboards/iris/keymaps/olligranlund_nordic/keymap.c b/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c similarity index 100% rename from keyboards/iris/keymaps/olligranlund_nordic/keymap.c rename to keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c diff --git a/keyboards/iris/keymaps/olligranlund_nordic/readme.md b/keyboards/keebio/iris/keymaps/olligranlund_nordic/readme.md similarity index 100% rename from keyboards/iris/keymaps/olligranlund_nordic/readme.md rename to keyboards/keebio/iris/keymaps/olligranlund_nordic/readme.md diff --git a/keyboards/iris/keymaps/olligranlund_nordic/rules.mk b/keyboards/keebio/iris/keymaps/olligranlund_nordic/rules.mk similarity index 100% rename from keyboards/iris/keymaps/olligranlund_nordic/rules.mk rename to keyboards/keebio/iris/keymaps/olligranlund_nordic/rules.mk diff --git a/keyboards/iris/keymaps/omgvee/config.h b/keyboards/keebio/iris/keymaps/omgvee/config.h similarity index 100% rename from keyboards/iris/keymaps/omgvee/config.h rename to keyboards/keebio/iris/keymaps/omgvee/config.h diff --git a/keyboards/iris/keymaps/omgvee/keymap.c b/keyboards/keebio/iris/keymaps/omgvee/keymap.c similarity index 100% rename from keyboards/iris/keymaps/omgvee/keymap.c rename to keyboards/keebio/iris/keymaps/omgvee/keymap.c diff --git a/keyboards/iris/keymaps/omgvee/readme.md b/keyboards/keebio/iris/keymaps/omgvee/readme.md similarity index 100% rename from keyboards/iris/keymaps/omgvee/readme.md rename to keyboards/keebio/iris/keymaps/omgvee/readme.md diff --git a/keyboards/iris/keymaps/omgvee/rules.mk b/keyboards/keebio/iris/keymaps/omgvee/rules.mk similarity index 100% rename from keyboards/iris/keymaps/omgvee/rules.mk rename to keyboards/keebio/iris/keymaps/omgvee/rules.mk diff --git a/keyboards/keebio/iris/keymaps/pvinis/config.h b/keyboards/keebio/iris/keymaps/pvinis/config.h new file mode 100644 index 000000000000..b2fb43be9176 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/pvinis/config.h @@ -0,0 +1,24 @@ +#pragma once + + +#ifdef PRODUCT + #undef PRODUCT + #define PRODUCT Iris Keyboard - pvinis +#endif + + +// Use I2C or Serial, not both +#define USE_SERIAL +// #define USE_I2C + + +// Select hand configuration +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + + +// choose pin to use for audio. c6 is the one iris uses. +#ifdef AUDIO_ENABLE + #define C6_AUDIO +#endif diff --git a/keyboards/keebio/iris/keymaps/pvinis/keymap.c b/keyboards/keebio/iris/keymaps/pvinis/keymap.c new file mode 100644 index 000000000000..2f6d5a6b47ca --- /dev/null +++ b/keyboards/keebio/iris/keymaps/pvinis/keymap.c @@ -0,0 +1,120 @@ +// pvinis iris +// ,-----------------------------. ,-----------------------------. +// | | | | | | | | | | | | | | +// |----+----+----+----+----+----| |----+----+----+----+----+----| +// | | | | | | | | | | | | | | +// |----+----+----+----x----x----| |----x----x----+----+----+----| +// | | | | | | | | | | | | | | +// |----+----+----+----x----x----+----. ,----|----x----x----+----+----+----| +// | | | | | | | | | | | | | | | | +// `-------------------+----+----+----/ \----+----+----+-------------------' +// | | | | | | | | +// `----+---------' `--------------' + + +#include QMK_KEYBOARD_H +#include "pvinis.h" +//#include "iris.h" +//#include "action_layer.h" +//#include "eeconfig.h" + +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +#ifdef AUDIO_ENABLE + // #define STARTUP_SONG SONG(SONIC_RING) +#endif + +#ifdef AUDIO_ENABLE + float tone_sonic[][2] = SONG(IN_LIKE_FLINT); + float tone_1[][2] = SONG(QWERTY_SOUND); + float tone_2[][2] = SONG(OLD_SPICE); + float tone_3[][2] = SONG(OVERWATCH_THEME); + float tone_4[][2] = SONG(QWERTY_SOUND); +#endif + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // ,-----------------------------. ,-----------------------------. + // | | | | | |QWER| | | | | | | | + // |----+----+----+----+----+----| |----+----+----+----+----+----| + // |Tab | | | | |CARP| | | | | | |Del | + // |----+----+----+----x----x----| |----x----x----+----+----+----| + // |EscC| | | | | | | | | | | |Ent | + // |----+----+----+----x----x----+----. ,----|----x----x----+----+----+----| + // |LSft| | | | | |Home| |End | | | | | |Rsft| + // `-------------------+----+----+----/ \----+----+----+-------------------' + // |Cmd |LOWR|Bspc| |Spc |RASE|RAlt| + // `----+---------' `--------------' + [LR_BASE] = LAYOUT_wrapper( + _______, _______, _______, _______, _______, QWERTY , _______, _______, _______, _______, _______, _______, + KC_TAB , _______, _______, _______, _______, CARPALX, _______, _______, _______, _______, _______, KC_DEL , + PV_ESCC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT , + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + KC_LGUI, SYMBOL , KC_BSPC, KC_SPC , SYSCTL , KC_RALT + ), + + // ,-----------------------------. ,-----------------------------. + // | | NUMBERS_L | | NUMBERS_R | | + // |----+----+----+----+----+----| |----+----+----+----+----+----| + // | | | | | | + // |----+ | | +----| + // | | QWERTY_L | | QWERTY_R | | + // |----+ +----. ,----| +----| + // | | | | | | | | + // `-------------------+----+----+----/ \----+----+----+-------------------' + // | | | | | | | | + // `----+---------' `--------------' + [LR_QWERTY] = LAYOUT_wrapper( + _______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______, + _______, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _______, + _______, _____________MOD_QWERTY_L2_________________, _____________MOD_QWERTY_R2_________________, _______, + _______, _________________QWERTY_L3_________________, _______, _______, _________________QWERTY_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + // ,-----------------------------. ,-----------------------------. + // | | NUMBERS_L | | NUMBERS_R | | + // |----+----+----+----+----+----| |----+----+----+----+----+----| + // | | | | | | + // |----+ | | +----| + // | | CARPALX_L | | CARPALX_R | | + // |----+ +----. ,----| +----| + // | | | | | | | | + // `-------------------+----+----+----/ \----+----+----+-------------------' + // | | | | | | | | + // `----+---------' `--------------' + [LR_CARPALX] = LAYOUT_wrapper( + _______, ________________NUMBERS_L__________________, ________________NUMBERS_R__________________, _______, + _______, ________________CARPALX_L1_________________, ________________CARPALX_R1_________________, _______, + _______, ________________CARPALX_L2_________________, ________________CARPALX_R2_________________, _______, + _______, ________________CARPALX_L3_________________, _______, _______, ________________CARPALX_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [LR_SYMBOL] = LAYOUT_wrapper( + KC_F12 , ______________________F_L__________________, ______________________F_R__________________, KC_F11 , + _______, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, _______, + _______, _________________SYMBOL_L2_________________, _________________SYMBOL_R2_________________, _______, + _______, _________________SYMBOL_L3_________________, _______, _______, _________________SYMBOL_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [LR_SYSCTL] = LAYOUT_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _________________SYSCTL_R1_________________, _______, + _______, _______, _______, _______, _______, _______, _________________SYSCTL_R2_________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _________________SYSCTL_R3_________________, _______, + _______, _______, _______, _______, _______, _______ + ), + + [LR_KBCTL] = LAYOUT_wrapper( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, __________________KBCTL_L1_________________, __________________KBCTL_R1_________________, XXXXXXX, + XXXXXXX, __________________KBCTL_L2_________________, __________________KBCTL_R2_________________, XXXXXXX, + BASE , __________________KBCTL_L3_________________, XXXXXXX, XXXXXXX, __________________KBCTL_R3_________________, XXXXXXX, + XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX + ) +}; diff --git a/keyboards/keebio/iris/keymaps/pvinis/rules.mk b/keyboards/keebio/iris/keymaps/pvinis/rules.mk new file mode 100644 index 000000000000..899312894b05 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/pvinis/rules.mk @@ -0,0 +1,2 @@ +AUDIO_ENABLE = no # off for now +RGBLIGHT_ENABLE = no # off for now diff --git a/keyboards/iris/keymaps/rdhaene/config.h b/keyboards/keebio/iris/keymaps/rdhaene/config.h similarity index 100% rename from keyboards/iris/keymaps/rdhaene/config.h rename to keyboards/keebio/iris/keymaps/rdhaene/config.h diff --git a/keyboards/iris/keymaps/rdhaene/keymap.c b/keyboards/keebio/iris/keymaps/rdhaene/keymap.c similarity index 99% rename from keyboards/iris/keymaps/rdhaene/keymap.c rename to keyboards/keebio/iris/keymaps/rdhaene/keymap.c index 68b187aafb3b..7a153346c562 100644 --- a/keyboards/iris/keymaps/rdhaene/keymap.c +++ b/keyboards/keebio/iris/keymaps/rdhaene/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/rdhaene/rules.mk b/keyboards/keebio/iris/keymaps/rdhaene/rules.mk similarity index 100% rename from keyboards/iris/keymaps/rdhaene/rules.mk rename to keyboards/keebio/iris/keymaps/rdhaene/rules.mk diff --git a/keyboards/iris/keymaps/rs/config.h b/keyboards/keebio/iris/keymaps/rs/config.h similarity index 97% rename from keyboards/iris/keymaps/rs/config.h rename to keyboards/keebio/iris/keymaps/rs/config.h index 7c5b5ca43308..412862c8724a 100644 --- a/keyboards/iris/keymaps/rs/config.h +++ b/keyboards/keebio/iris/keymaps/rs/config.h @@ -35,4 +35,4 @@ along with this program. If not, see . #define RGBLIGHT_SLEEP #define RGBLIGHT_HUE_STEP 1 #define RGBLIGHT_SAT_STEP 1 -#define RGBLIGHT_VAL_STEP 1 \ No newline at end of file +#define RGBLIGHT_VAL_STEP 1 diff --git a/keyboards/iris/keymaps/rs/keymap.c b/keyboards/keebio/iris/keymaps/rs/keymap.c similarity index 50% rename from keyboards/iris/keymaps/rs/keymap.c rename to keyboards/keebio/iris/keymaps/rs/keymap.c index 43374e59f39f..0e254ea190b8 100644 --- a/keyboards/iris/keymaps/rs/keymap.c +++ b/keyboards/keebio/iris/keymaps/rs/keymap.c @@ -1,48 +1,45 @@ #include QMK_KEYBOARD_H - -enum layers { - _QWERTY, - _HYPER, -}; - -#define KC_ KC_TRNS - -#define KC_ESCC MT(MOD_LCTL, KC_ESC) -#define KC_ENTS MT(MOD_LSFT, KC_ENT) -#define KC_HYPE MO(_HYPER) -#define KC_RST RESET -// Brightness -#define KC_BRUP KC_PAUS -#define KC_BRDN KC_SLCK -#define KC_BLTG BL_TOGG +#include "rs.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, //|----+----+----+----+----+----| |----+----+----+----+----+----| - TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL, + TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL , //|----+----+----+----+----+----| |----+----+----+----+----+----| ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| LSFT, Z , X , C , V , B ,SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - LALT,LGUI,SPC, BSPC,HYPE,ENT + LALT,LGUI,SPC , BSPC,CODE,FN // `----+----+----' `+---+----+----' - ), // | - // | - [_HYPER] = LAYOUT_kc( // V + ), + [_CODE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + GRV ,EXLM, AT ,HASH, DLR,PERC, CIRC,LPLT,ASTR,RPGT,NEQL, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , 1 , 2 , 3 , 4 , 5 , MINS,LBRC, UP ,RBRC, ,BSLS, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , 6 , 7 , 8 , 9 , 0 , , ,AMPR,LEFT,DOWN,RGHT, ,PIPE, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , DOT, , , + // `----+----+----' `----+----+----' + ), + [_FN] = LAYOUT_kc( //,----+----+----+----+----+----. ,----+----+----+----+----+----. - RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 ,LBRC,RBRC, , + , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11, //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , ,PGUP, ,BRUP, , , UP ,LCBR,RCBR,BSLS, + , , , , , , , , , , , , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , ,HOME,PGDN,END ,BRDN, MINS,LEFT,DOWN,RGHT, ,PIPE, + BLTG,BLUP, , , ,BRMU, , ,PGUP, , , , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , , , , ,BLTG, VOLU, , , , , , , + ,BLDN, , ,RST ,BRMD, , VOLU, ,CTRA,PGDN,CTRE, , , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - , , , VOLD, ,MUTE + , , , VOLD,MUTE, // `----+----+----' `----+----+----' ), }; + diff --git a/keyboards/keebio/iris/keymaps/rs/readme.md b/keyboards/keebio/iris/keymaps/rs/readme.md new file mode 100644 index 000000000000..d23ab66877a5 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/rs/readme.md @@ -0,0 +1 @@ +See [rs readme](../../../../users/rs/readme.md). \ No newline at end of file diff --git a/keyboards/rorschach/rev1/rules.mk b/keyboards/keebio/iris/keymaps/rs/rules.mk similarity index 50% rename from keyboards/rorschach/rev1/rules.mk rename to keyboards/keebio/iris/keymaps/rs/rules.mk index bd518d8f273f..b4f058b4b90b 100644 --- a/keyboards/rorschach/rev1/rules.mk +++ b/keyboards/keebio/iris/keymaps/rs/rules.mk @@ -1 +1,2 @@ BACKLIGHT_ENABLE = yes +BOOTLOADER = atmel-dfu diff --git a/keyboards/iris/keymaps/s1carii/config.h b/keyboards/keebio/iris/keymaps/s1carii/config.h similarity index 100% rename from keyboards/iris/keymaps/s1carii/config.h rename to keyboards/keebio/iris/keymaps/s1carii/config.h diff --git a/keyboards/iris/keymaps/s1carii/keymap.c b/keyboards/keebio/iris/keymaps/s1carii/keymap.c similarity index 99% rename from keyboards/iris/keymaps/s1carii/keymap.c rename to keyboards/keebio/iris/keymaps/s1carii/keymap.c index dd993a9bc625..4655bb1ad954 100644 --- a/keyboards/iris/keymaps/s1carii/keymap.c +++ b/keyboards/keebio/iris/keymaps/s1carii/keymap.c @@ -15,7 +15,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE @@ -80,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { , , , , , // `----+----+----' `----+----+----' ) - + /* [_DEVLAYER] = LAYOUT_kc( //,----+----+----+--+-+----+----. ,----+----+-+--+----+----+----. @@ -95,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { , , , , , // `----+----+----' `----+----+----' ) -*/ +*/ }; diff --git a/keyboards/iris/keymaps/s1carii/readme.md b/keyboards/keebio/iris/keymaps/s1carii/readme.md similarity index 100% rename from keyboards/iris/keymaps/s1carii/readme.md rename to keyboards/keebio/iris/keymaps/s1carii/readme.md diff --git a/keyboards/iris/keymaps/s1carii/rules.mk b/keyboards/keebio/iris/keymaps/s1carii/rules.mk similarity index 100% rename from keyboards/iris/keymaps/s1carii/rules.mk rename to keyboards/keebio/iris/keymaps/s1carii/rules.mk diff --git a/keyboards/iris/keymaps/saviof/config.h b/keyboards/keebio/iris/keymaps/saviof/config.h similarity index 100% rename from keyboards/iris/keymaps/saviof/config.h rename to keyboards/keebio/iris/keymaps/saviof/config.h diff --git a/keyboards/iris/keymaps/saviof/keymap.c b/keyboards/keebio/iris/keymaps/saviof/keymap.c similarity index 100% rename from keyboards/iris/keymaps/saviof/keymap.c rename to keyboards/keebio/iris/keymaps/saviof/keymap.c diff --git a/keyboards/iris/keymaps/saviof/rules.mk b/keyboards/keebio/iris/keymaps/saviof/rules.mk similarity index 100% rename from keyboards/iris/keymaps/saviof/rules.mk rename to keyboards/keebio/iris/keymaps/saviof/rules.mk diff --git a/keyboards/iris/keymaps/swedish/config.h b/keyboards/keebio/iris/keymaps/swedish/config.h similarity index 100% rename from keyboards/iris/keymaps/swedish/config.h rename to keyboards/keebio/iris/keymaps/swedish/config.h diff --git a/keyboards/iris/keymaps/swedish/keymap.c b/keyboards/keebio/iris/keymaps/swedish/keymap.c similarity index 99% rename from keyboards/iris/keymaps/swedish/keymap.c rename to keyboards/keebio/iris/keymaps/swedish/keymap.c index 015e26aec9ef..26e28479e8df 100644 --- a/keyboards/iris/keymaps/swedish/keymap.c +++ b/keyboards/keebio/iris/keymaps/swedish/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/swedish/rules.mk b/keyboards/keebio/iris/keymaps/swedish/rules.mk similarity index 100% rename from keyboards/iris/keymaps/swedish/rules.mk rename to keyboards/keebio/iris/keymaps/swedish/rules.mk diff --git a/keyboards/iris/keymaps/transmogrified/Readme.md b/keyboards/keebio/iris/keymaps/transmogrified/Readme.md similarity index 100% rename from keyboards/iris/keymaps/transmogrified/Readme.md rename to keyboards/keebio/iris/keymaps/transmogrified/Readme.md diff --git a/keyboards/iris/keymaps/transmogrified/config.h b/keyboards/keebio/iris/keymaps/transmogrified/config.h similarity index 100% rename from keyboards/iris/keymaps/transmogrified/config.h rename to keyboards/keebio/iris/keymaps/transmogrified/config.h diff --git a/keyboards/iris/keymaps/transmogrified/keymap.c b/keyboards/keebio/iris/keymaps/transmogrified/keymap.c similarity index 100% rename from keyboards/iris/keymaps/transmogrified/keymap.c rename to keyboards/keebio/iris/keymaps/transmogrified/keymap.c diff --git a/keyboards/iris/keymaps/transmogrified/rules.mk b/keyboards/keebio/iris/keymaps/transmogrified/rules.mk similarity index 100% rename from keyboards/iris/keymaps/transmogrified/rules.mk rename to keyboards/keebio/iris/keymaps/transmogrified/rules.mk diff --git a/keyboards/iris/keymaps/via/config.h b/keyboards/keebio/iris/keymaps/via/config.h similarity index 100% rename from keyboards/iris/keymaps/via/config.h rename to keyboards/keebio/iris/keymaps/via/config.h diff --git a/keyboards/iris/keymaps/via/keymap.c b/keyboards/keebio/iris/keymaps/via/keymap.c similarity index 100% rename from keyboards/iris/keymaps/via/keymap.c rename to keyboards/keebio/iris/keymaps/via/keymap.c diff --git a/keyboards/iris/keymaps/via/rules.mk b/keyboards/keebio/iris/keymaps/via/rules.mk similarity index 100% rename from keyboards/iris/keymaps/via/rules.mk rename to keyboards/keebio/iris/keymaps/via/rules.mk diff --git a/keyboards/iris/keymaps/vyolle/config.h b/keyboards/keebio/iris/keymaps/vyolle/config.h similarity index 100% rename from keyboards/iris/keymaps/vyolle/config.h rename to keyboards/keebio/iris/keymaps/vyolle/config.h diff --git a/keyboards/iris/keymaps/vyolle/keymap.c b/keyboards/keebio/iris/keymaps/vyolle/keymap.c similarity index 98% rename from keyboards/iris/keymaps/vyolle/keymap.c rename to keyboards/keebio/iris/keymaps/vyolle/keymap.c index 33e17182117f..431def355ee9 100644 --- a/keyboards/iris/keymaps/vyolle/keymap.c +++ b/keyboards/keebio/iris/keymaps/vyolle/keymap.c @@ -22,9 +22,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT, + KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RGUI, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LGUI, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RGUI, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_RCTL // └────────┴────────┴────────┘ └────────┴────────┴────────┘ diff --git a/keyboards/iris/keymaps/vyolle/rules.mk b/keyboards/keebio/iris/keymaps/vyolle/rules.mk similarity index 100% rename from keyboards/iris/keymaps/vyolle/rules.mk rename to keyboards/keebio/iris/keymaps/vyolle/rules.mk diff --git a/keyboards/iris/keymaps/wanleg/config.h b/keyboards/keebio/iris/keymaps/wanleg/config.h similarity index 100% rename from keyboards/iris/keymaps/wanleg/config.h rename to keyboards/keebio/iris/keymaps/wanleg/config.h diff --git a/keyboards/iris/keymaps/wanleg/keymap.c b/keyboards/keebio/iris/keymaps/wanleg/keymap.c similarity index 100% rename from keyboards/iris/keymaps/wanleg/keymap.c rename to keyboards/keebio/iris/keymaps/wanleg/keymap.c diff --git a/keyboards/iris/keymaps/wanleg/rules.mk b/keyboards/keebio/iris/keymaps/wanleg/rules.mk similarity index 100% rename from keyboards/iris/keymaps/wanleg/rules.mk rename to keyboards/keebio/iris/keymaps/wanleg/rules.mk diff --git a/keyboards/iris/keymaps/xyverz/config.h b/keyboards/keebio/iris/keymaps/xyverz/config.h similarity index 100% rename from keyboards/iris/keymaps/xyverz/config.h rename to keyboards/keebio/iris/keymaps/xyverz/config.h diff --git a/keyboards/iris/keymaps/xyverz/keymap.c b/keyboards/keebio/iris/keymaps/xyverz/keymap.c similarity index 100% rename from keyboards/iris/keymaps/xyverz/keymap.c rename to keyboards/keebio/iris/keymaps/xyverz/keymap.c diff --git a/keyboards/iris/keymaps/xyverz/rules.mk b/keyboards/keebio/iris/keymaps/xyverz/rules.mk similarity index 100% rename from keyboards/iris/keymaps/xyverz/rules.mk rename to keyboards/keebio/iris/keymaps/xyverz/rules.mk diff --git a/keyboards/iris/keymaps/yanfali/config.h b/keyboards/keebio/iris/keymaps/yanfali/config.h similarity index 100% rename from keyboards/iris/keymaps/yanfali/config.h rename to keyboards/keebio/iris/keymaps/yanfali/config.h diff --git a/keyboards/iris/keymaps/yanfali/keymap.c b/keyboards/keebio/iris/keymaps/yanfali/keymap.c similarity index 99% rename from keyboards/iris/keymaps/yanfali/keymap.c rename to keyboards/keebio/iris/keymaps/yanfali/keymap.c index bae09a62eaf6..92117bd6dec9 100644 --- a/keyboards/iris/keymaps/yanfali/keymap.c +++ b/keyboards/keebio/iris/keymaps/yanfali/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/iris/keymaps/yanfali/readme.md b/keyboards/keebio/iris/keymaps/yanfali/readme.md similarity index 100% rename from keyboards/iris/keymaps/yanfali/readme.md rename to keyboards/keebio/iris/keymaps/yanfali/readme.md diff --git a/keyboards/iris/keymaps/yanfali/rules.mk b/keyboards/keebio/iris/keymaps/yanfali/rules.mk similarity index 100% rename from keyboards/iris/keymaps/yanfali/rules.mk rename to keyboards/keebio/iris/keymaps/yanfali/rules.mk diff --git a/keyboards/iris/readme.md b/keyboards/keebio/iris/readme.md similarity index 89% rename from keyboards/iris/readme.md rename to keyboards/keebio/iris/readme.md index 0a1eb1e17583..6d166e7564aa 100644 --- a/keyboards/iris/readme.md +++ b/keyboards/keebio/iris/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make iris/rev2:default + make keebio/iris/rev2:default Example of flashing this keyboard: - make iris/rev2:default:avrdude + make keebio/iris/rev2:default:avrdude See [build environment setup](https://docs.qmk.fm/#/newbs_getting_started) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/iris/rev1/config.h b/keyboards/keebio/iris/rev1/config.h similarity index 100% rename from keyboards/iris/rev1/config.h rename to keyboards/keebio/iris/rev1/config.h diff --git a/keyboards/iris/rev1/rev1.c b/keyboards/keebio/iris/rev1/rev1.c similarity index 100% rename from keyboards/iris/rev1/rev1.c rename to keyboards/keebio/iris/rev1/rev1.c diff --git a/keyboards/iris/rev1/rev1.h b/keyboards/keebio/iris/rev1/rev1.h similarity index 100% rename from keyboards/iris/rev1/rev1.h rename to keyboards/keebio/iris/rev1/rev1.h diff --git a/keyboards/iris/rev1/rules.mk b/keyboards/keebio/iris/rev1/rules.mk similarity index 100% rename from keyboards/iris/rev1/rules.mk rename to keyboards/keebio/iris/rev1/rules.mk diff --git a/keyboards/iris/rev1_led/config.h b/keyboards/keebio/iris/rev1_led/config.h similarity index 100% rename from keyboards/iris/rev1_led/config.h rename to keyboards/keebio/iris/rev1_led/config.h diff --git a/keyboards/iris/rev1_led/rev1_led.c b/keyboards/keebio/iris/rev1_led/rev1_led.c similarity index 100% rename from keyboards/iris/rev1_led/rev1_led.c rename to keyboards/keebio/iris/rev1_led/rev1_led.c diff --git a/keyboards/iris/rev1_led/rev1_led.h b/keyboards/keebio/iris/rev1_led/rev1_led.h similarity index 100% rename from keyboards/iris/rev1_led/rev1_led.h rename to keyboards/keebio/iris/rev1_led/rev1_led.h diff --git a/keyboards/iris/rev1_led/rules.mk b/keyboards/keebio/iris/rev1_led/rules.mk similarity index 100% rename from keyboards/iris/rev1_led/rules.mk rename to keyboards/keebio/iris/rev1_led/rules.mk diff --git a/keyboards/iris/rev2/config.h b/keyboards/keebio/iris/rev2/config.h similarity index 100% rename from keyboards/iris/rev2/config.h rename to keyboards/keebio/iris/rev2/config.h diff --git a/keyboards/iris/rev2/rev2.c b/keyboards/keebio/iris/rev2/rev2.c similarity index 100% rename from keyboards/iris/rev2/rev2.c rename to keyboards/keebio/iris/rev2/rev2.c diff --git a/keyboards/iris/rev2/rev2.h b/keyboards/keebio/iris/rev2/rev2.h similarity index 100% rename from keyboards/iris/rev2/rev2.h rename to keyboards/keebio/iris/rev2/rev2.h diff --git a/keyboards/iris/rev2/rules.mk b/keyboards/keebio/iris/rev2/rules.mk similarity index 100% rename from keyboards/iris/rev2/rules.mk rename to keyboards/keebio/iris/rev2/rules.mk diff --git a/keyboards/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h similarity index 98% rename from keyboards/iris/rev3/config.h rename to keyboards/keebio/iris/rev3/config.h index 70e5d6e2a5df..ff0d28c73ca6 100644 --- a/keyboards/iris/rev3/config.h +++ b/keyboards/keebio/iris/rev3/config.h @@ -71,6 +71,7 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN F7 #define RGBLED_NUM 12 // Number of LEDs +#define RGBLED_SPLIT { 6, 6 } #define DYNAMIC_KEYMAP_LAYER_COUNT 4 diff --git a/keyboards/iris/rev3/rev3.c b/keyboards/keebio/iris/rev3/rev3.c similarity index 100% rename from keyboards/iris/rev3/rev3.c rename to keyboards/keebio/iris/rev3/rev3.c diff --git a/keyboards/iris/rev3/rev3.h b/keyboards/keebio/iris/rev3/rev3.h similarity index 100% rename from keyboards/iris/rev3/rev3.h rename to keyboards/keebio/iris/rev3/rev3.h diff --git a/keyboards/iris/rev3/rules.mk b/keyboards/keebio/iris/rev3/rules.mk similarity index 100% rename from keyboards/iris/rev3/rules.mk rename to keyboards/keebio/iris/rev3/rules.mk diff --git a/keyboards/iris/rules.mk b/keyboards/keebio/iris/rules.mk similarity index 97% rename from keyboards/iris/rules.mk rename to keyboards/keebio/iris/rules.mk index 28ca5a8cb8e2..9745d5e3c1ae 100644 --- a/keyboards/iris/rules.mk +++ b/keyboards/keebio/iris/rules.mk @@ -38,4 +38,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = iris/rev2 +DEFAULT_FOLDER = keebio/iris/rev2 diff --git a/keyboards/laplace/config.h b/keyboards/keebio/laplace/config.h similarity index 96% rename from keyboards/laplace/config.h rename to keyboards/keebio/laplace/config.h index 45b89a97acb5..cce642526fa3 100644 --- a/keyboards/laplace/config.h +++ b/keyboards/keebio/laplace/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define TAPPING_TERM 200 - -#endif diff --git a/keyboards/laplace/info.json b/keyboards/keebio/laplace/info.json similarity index 100% rename from keyboards/laplace/info.json rename to keyboards/keebio/laplace/info.json diff --git a/keyboards/laplace/keymaps/bakingpy/keymap.c b/keyboards/keebio/laplace/keymaps/bakingpy/keymap.c similarity index 95% rename from keyboards/laplace/keymaps/bakingpy/keymap.c rename to keyboards/keebio/laplace/keymaps/bakingpy/keymap.c index 2cad24fa077f..97fb70af5e50 100644 --- a/keyboards/laplace/keymaps/bakingpy/keymap.c +++ b/keyboards/keebio/laplace/keymaps/bakingpy/keymap.c @@ -5,8 +5,6 @@ #define _FN2 2 #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) #define KC_SPFN1 LT(_FN1, KC_SPACE) @@ -33,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----`----`----`----`----`----`--------+ LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , //|-------`----`----`----`----`----`----`----`----`----`----`------+ - GRV ,LCTL,LALT ,LGUI, SPFN1 , BSFN2 , FN2 ,RALT ,RCTL , FN1 + GRV ,LCTL,LALT ,LGUI, SPFN1 , BSFN2 , FN2 ,RALT ,RCTL , FN1 //`-----+----+-----+----+--------+--------+-----+-----+-----+------' ), @@ -45,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----`----`----`----`----`----`--------+ RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, 1 , 2 , 3 , UP , , //|-------`----`----`----`----`----`----`----`----`----`----`------+ - RTOG , , , , , DEL , 0 ,LEFT ,DOWN , RGHT + RTOG , , , , , DEL , 0 ,LEFT ,DOWN , RGHT //`-----+----+-----+----+--------+--------+-----+-----+-----+------' ), @@ -57,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----`----`----`----`----`----`--------+ , , ,DEL ,PGDN,END , , , , , , , //|-------`----`----`----`----`----`----`----`----`----`----`------+ - , , , , DEL , , , , , + , , , , DEL , , , , , //`-----+----+-----+----+--------+--------+-----+-----+-----+------' ) }; diff --git a/keyboards/laplace/keymaps/default/rules.mk b/keyboards/keebio/laplace/keymaps/bakingpy/rules.mk similarity index 100% rename from keyboards/laplace/keymaps/default/rules.mk rename to keyboards/keebio/laplace/keymaps/bakingpy/rules.mk diff --git a/keyboards/laplace/keymaps/default/keymap.c b/keyboards/keebio/laplace/keymaps/default/keymap.c similarity index 97% rename from keyboards/laplace/keymaps/default/keymap.c rename to keyboards/keebio/laplace/keymaps/default/keymap.c index 03b7c9b15bd3..053bfb7ad61a 100644 --- a/keyboards/laplace/keymaps/default/keymap.c +++ b/keyboards/keebio/laplace/keymaps/default/keymap.c @@ -4,9 +4,6 @@ #define _FN1 1 #define _FN2 2 -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define FN1 MO(_FN1) #define FN2 MO(_FN2) #define SP_FN1 LT(_FN1, KC_SPACE) diff --git a/keyboards/quefrency/keymaps/default/rules.mk b/keyboards/keebio/laplace/keymaps/default/rules.mk similarity index 100% rename from keyboards/quefrency/keymaps/default/rules.mk rename to keyboards/keebio/laplace/keymaps/default/rules.mk diff --git a/keyboards/laplace/laplace.c b/keyboards/keebio/laplace/laplace.c similarity index 100% rename from keyboards/laplace/laplace.c rename to keyboards/keebio/laplace/laplace.c diff --git a/keyboards/laplace/laplace.h b/keyboards/keebio/laplace/laplace.h similarity index 97% rename from keyboards/laplace/laplace.h rename to keyboards/keebio/laplace/laplace.h index 17f928f344a8..fc0510fe5893 100644 --- a/keyboards/laplace/laplace.h +++ b/keyboards/keebio/laplace/laplace.h @@ -1,5 +1,4 @@ -#ifndef LAPLACE_H -#define LAPLACE_H +#pragma once #include "quantum.h" @@ -32,4 +31,3 @@ KC_##C1, KC_##C2, KC_##C3, KC_##C4, KC_##C5, KC_##C6, KC_##C7, KC_##C9, KC_##C10, KC_##C11, KC_##C12, KC_##C13, \ KC_##D1, KC_##D2, KC_##D3, KC_##D4, KC_##D5, KC_##D7, KC_##D10, KC_##D11, KC_##D12, KC_##D13 \ ) -#endif diff --git a/keyboards/laplace/readme.md b/keyboards/keebio/laplace/readme.md similarity index 90% rename from keyboards/laplace/readme.md rename to keyboards/keebio/laplace/readme.md index 7871992f76a5..4292483bc82d 100644 --- a/keyboards/laplace/readme.md +++ b/keyboards/keebio/laplace/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make laplace:default + make keebio/laplace:default Example of flashing this keyboard: - make laplace:default:avrdude + make keebio/laplace:default:avrdude 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. diff --git a/keyboards/laplace/rules.mk b/keyboards/keebio/laplace/rules.mk similarity index 100% rename from keyboards/laplace/rules.mk rename to keyboards/keebio/laplace/rules.mk diff --git a/keyboards/levinson/config.h b/keyboards/keebio/levinson/config.h similarity index 100% rename from keyboards/levinson/config.h rename to keyboards/keebio/levinson/config.h diff --git a/keyboards/levinson/info.json b/keyboards/keebio/levinson/info.json similarity index 100% rename from keyboards/levinson/info.json rename to keyboards/keebio/levinson/info.json diff --git a/keyboards/levinson/keymaps/atreus/config.h b/keyboards/keebio/levinson/keymaps/atreus/config.h similarity index 100% rename from keyboards/levinson/keymaps/atreus/config.h rename to keyboards/keebio/levinson/keymaps/atreus/config.h diff --git a/keyboards/levinson/keymaps/atreus/keymap.c b/keyboards/keebio/levinson/keymaps/atreus/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/atreus/keymap.c rename to keyboards/keebio/levinson/keymaps/atreus/keymap.c diff --git a/keyboards/levinson/keymaps/atreus/readme.md b/keyboards/keebio/levinson/keymaps/atreus/readme.md similarity index 100% rename from keyboards/levinson/keymaps/atreus/readme.md rename to keyboards/keebio/levinson/keymaps/atreus/readme.md diff --git a/keyboards/levinson/keymaps/bakingpy2u/config.h b/keyboards/keebio/levinson/keymaps/bakingpy2u/config.h similarity index 100% rename from keyboards/levinson/keymaps/bakingpy2u/config.h rename to keyboards/keebio/levinson/keymaps/bakingpy2u/config.h diff --git a/keyboards/levinson/keymaps/bakingpy2u/keymap.c b/keyboards/keebio/levinson/keymaps/bakingpy2u/keymap.c similarity index 99% rename from keyboards/levinson/keymaps/bakingpy2u/keymap.c rename to keyboards/keebio/levinson/keymaps/bakingpy2u/keymap.c index 219e3468fbc3..6a6ab496abcc 100644 --- a/keyboards/levinson/keymaps/bakingpy2u/keymap.c +++ b/keyboards/keebio/levinson/keymaps/bakingpy2u/keymap.c @@ -23,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/levinson/keymaps/bakingpy2u/rules.mk b/keyboards/keebio/levinson/keymaps/bakingpy2u/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/bakingpy2u/rules.mk rename to keyboards/keebio/levinson/keymaps/bakingpy2u/rules.mk diff --git a/keyboards/keebio/levinson/keymaps/dcompact/config.h b/keyboards/keebio/levinson/keymaps/dcompact/config.h new file mode 100644 index 000000000000..be2d71e8f02f --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/dcompact/config.h @@ -0,0 +1,28 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/keebio/levinson/keymaps/dcompact/keymap.c b/keyboards/keebio/levinson/keymaps/dcompact/keymap.c new file mode 100644 index 000000000000..a0556c09b4fc --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/dcompact/keymap.c @@ -0,0 +1,238 @@ +#include QMK_KEYBOARD_H + +#include "keymap_steno.h" + +// Custom Keycodes and Combinations Used +#define DEL_SHF SFT_T(KC_DEL) +#define QUAKE LCTL(KC_GRV) + +#define WKSP_L LALT(LCTL(KC_LEFT)) +#define WKSP_D LALT(LCTL(KC_DOWN)) +#define WKSP_U LALT(LCTL(KC_UP)) +#define WKSP_R LALT(LCTL(KC_RGHT)) + + +extern keymap_config_t keymap_config; + +enum planck_layers { + _BASE, + _LOWER, + _RAISE, + _FUNC, + _PLOVER, + _ADJUST, + _MOUSE +}; + +enum planck_keycodes { + BASE = SAFE_RANGE, + PLOVER, + LOWER, + RAISE, + FUNC, + MOUSE, + ADJUST, + EXT_PLV +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base + * ,-----------------------------------------------------------------------------------. + * | Tab | " ' | < , | > . | P | Y | F | G | C | R | L | ? / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | _ - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Del/Sf| : ; | Q | J | K | X | B | M | W | V | Z | Bspc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Plover| GUI | Alt |Lower |Shift |Space |Raise | Alt | GUI | Fn |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_BASE] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + DEL_SHF, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSPC, \ + KC_LCTL, PLOVER, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | Home |PgDwn | PgUp | End | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |PrScr | Menu | | | | | Left | Down | Up |Right | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |CapsLk|NumLck| Ins | | | |WkLeft|WkDown| WkUp |WkRigh| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |Raise | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, \ + XXXXXXX, KC_PSCR, KC_MENU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, \ + XXXXXXX, KC_CAPS, KC_LNUM, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX, \ + _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * |Quake | ` | ~ | \ | | | ( | ) | 7 | 8 | 9 | / | = | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | ! | @ | # | $ | { | } | 4 | 5 | 6 | * | + | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | % | ^ | & | * | [ | ] | 1 | 2 | 3 | - |Bkspc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | < | > | | 0 | . | , | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( \ + QUAKE, KC_GRV, KC_TILD, KC_BSLS, KC_PIPE, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_SLSH, KC_EQL, \ + XXXXXXX, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_4, KC_5, KC_6, KC_ASTR, KC_PLUS, \ + XXXXXXX, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_MINS, KC_BSPC, \ + _______, XXXXXXX, _______, _______, _______, KC_LABK, KC_RABK, _______, KC_0, KC_DOT, KC_COMM, XXXXXXX \ +), + +/* Func + * ,-----------------------------------------------------------------------------------. + * | |Sleep |Prev-W|Ply/Ps|Next-W| | | F9 | F10 | F11 | F12 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Wake | Mute | Vol- | Vol+ | | | F5 | F6 | F7 | F8 | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Power |Prev-M|Ply/Ps|Next-M| | | F1 | F2 | F3 | F4 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC] = LAYOUT_ortho_4x12( \ + XXXXXXX, KC_SLEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, \ + XXXXXXX, KC_WAKE, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, \ + XXXXXXX, KC_PWR, KC_MRWD, KC_MPLY, KC_MFFD, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, \ + _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX \ +), + +/* Mouse (Not Reachable on Planck) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |Click1|Click3|Click2| | |MouseL|MouseD|MouseU|MouseR| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | |Accel0|Accel1|Accel2| | |ScrllL|ScrllD|ScrllU|ScrllR| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_MOUSE] = LAYOUT_ortho_4x12( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX, \ + _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX \ +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FN | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | | E | U | PWR | RES1 | RES2 | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = LAYOUT_ortho_4x12( \ + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC , \ + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , \ + XXXXXXX, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , \ + EXT_PLV, XXXXXXX, XXXXXXX, STN_A, STN_O, XXXXXXX, XXXXXXX, STN_E, STN_U, STN_PWR, STN_RE1, STN_RE2 \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|RGBTog|RGBMod| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|Light-|Light+| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, RGB_TOG, RGB_MOD, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, RGB_VAD, RGB_VAI, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case FUNC: + if (record->event.pressed) { + layer_on(_FUNC); + } else { + layer_off(_FUNC); + } + return false; + break; + case PLOVER: + if (!record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_on(_PLOVER); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + case MOUSE: + if (record->event.pressed) { + layer_on(_MOUSE); + } else { + layer_off(_MOUSE); + } + return false; + break; + } + return true; +} + +void keyboard_post_init_user(void) { + steno_set_mode(STENO_MODE_GEMINI); +} diff --git a/keyboards/planck/keymaps/dcompact/README.md b/keyboards/keebio/levinson/keymaps/dcompact/readme.md similarity index 84% rename from keyboards/planck/keymaps/dcompact/README.md rename to keyboards/keebio/levinson/keymaps/dcompact/readme.md index d3e4c7a62d41..cd88c3fed34b 100644 --- a/keyboards/planck/keymaps/dcompact/README.md +++ b/keyboards/keebio/levinson/keymaps/dcompact/readme.md @@ -34,10 +34,10 @@ merge with those in the keyboard folder_ ## Relevant Links -- ![Online Dvorak Layout Trainer](https://learn.dvorak.nl/) -- ![Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) -- ![QMK Docs](https://docs.qmk.fm/#/) -- ![QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes) +- [Online Dvorak Layout Trainer](https://learn.dvorak.nl/) +- [Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) +- [QMK Docs](https://docs.qmk.fm/#/) +- [QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes) ## Contact diff --git a/keyboards/keebio/levinson/keymaps/dcompact/rules.mk b/keyboards/keebio/levinson/keymaps/dcompact/rules.mk new file mode 100644 index 000000000000..cd031e0d36af --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/dcompact/rules.mk @@ -0,0 +1,13 @@ +# https://beta.docs.qmk.fm/reference/config-options#feature-options +# Features Specifically Wanted +EXTRAKEY_ENABLE = yes +STENO_ENABLE = yes +NKRO_ENABLE = yes +AUDIO_ENABLE = yes + +# Features taking up space +MOUSEKEY_ENABLE = no +MIDI_ENABLE = no +CONSOLE_ENABLE = no +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no diff --git a/keyboards/keebio/levinson/keymaps/default/config.h b/keyboards/keebio/levinson/keymaps/default/config.h new file mode 100644 index 000000000000..be2d71e8f02f --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/default/config.h @@ -0,0 +1,28 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/wavelet/keymaps/default/keymap.c b/keyboards/keebio/levinson/keymaps/default/keymap.c similarity index 99% rename from keyboards/wavelet/keymaps/default/keymap.c rename to keyboards/keebio/levinson/keymaps/default/keymap.c index dac8068a42a3..abf253380b2e 100644 --- a/keyboards/wavelet/keymaps/default/keymap.c +++ b/keyboards/keebio/levinson/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/levinson/keymaps/default/rules.mk b/keyboards/keebio/levinson/keymaps/default/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/default/rules.mk rename to keyboards/keebio/levinson/keymaps/default/rules.mk diff --git a/keyboards/levinson/keymaps/drogglbecher/config.h b/keyboards/keebio/levinson/keymaps/drogglbecher/config.h similarity index 100% rename from keyboards/levinson/keymaps/drogglbecher/config.h rename to keyboards/keebio/levinson/keymaps/drogglbecher/config.h diff --git a/keyboards/levinson/keymaps/drogglbecher/keymap.c b/keyboards/keebio/levinson/keymaps/drogglbecher/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/drogglbecher/keymap.c rename to keyboards/keebio/levinson/keymaps/drogglbecher/keymap.c diff --git a/keyboards/levinson/keymaps/drogglbecher/rules.mk b/keyboards/keebio/levinson/keymaps/drogglbecher/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/drogglbecher/rules.mk rename to keyboards/keebio/levinson/keymaps/drogglbecher/rules.mk diff --git a/keyboards/levinson/keymaps/jyh/config.h b/keyboards/keebio/levinson/keymaps/jyh/config.h similarity index 100% rename from keyboards/levinson/keymaps/jyh/config.h rename to keyboards/keebio/levinson/keymaps/jyh/config.h diff --git a/keyboards/levinson/keymaps/jyh/keymap.c b/keyboards/keebio/levinson/keymaps/jyh/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/jyh/keymap.c rename to keyboards/keebio/levinson/keymaps/jyh/keymap.c diff --git a/keyboards/levinson/keymaps/jyh/readme.md b/keyboards/keebio/levinson/keymaps/jyh/readme.md similarity index 100% rename from keyboards/levinson/keymaps/jyh/readme.md rename to keyboards/keebio/levinson/keymaps/jyh/readme.md diff --git a/keyboards/levinson/keymaps/jyh/rules.mk b/keyboards/keebio/levinson/keymaps/jyh/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/jyh/rules.mk rename to keyboards/keebio/levinson/keymaps/jyh/rules.mk diff --git a/keyboards/levinson/keymaps/jyh2/config.h b/keyboards/keebio/levinson/keymaps/jyh2/config.h similarity index 100% rename from keyboards/levinson/keymaps/jyh2/config.h rename to keyboards/keebio/levinson/keymaps/jyh2/config.h diff --git a/keyboards/levinson/keymaps/jyh2/keymap.c b/keyboards/keebio/levinson/keymaps/jyh2/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/jyh2/keymap.c rename to keyboards/keebio/levinson/keymaps/jyh2/keymap.c diff --git a/keyboards/levinson/keymaps/jyh2/readme.md b/keyboards/keebio/levinson/keymaps/jyh2/readme.md similarity index 100% rename from keyboards/levinson/keymaps/jyh2/readme.md rename to keyboards/keebio/levinson/keymaps/jyh2/readme.md diff --git a/keyboards/levinson/keymaps/jyh2/rules.mk b/keyboards/keebio/levinson/keymaps/jyh2/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/jyh2/rules.mk rename to keyboards/keebio/levinson/keymaps/jyh2/rules.mk diff --git a/keyboards/levinson/keymaps/losinggeneration/README.md b/keyboards/keebio/levinson/keymaps/losinggeneration/README.md similarity index 100% rename from keyboards/levinson/keymaps/losinggeneration/README.md rename to keyboards/keebio/levinson/keymaps/losinggeneration/README.md diff --git a/keyboards/levinson/keymaps/losinggeneration/config.h b/keyboards/keebio/levinson/keymaps/losinggeneration/config.h similarity index 100% rename from keyboards/levinson/keymaps/losinggeneration/config.h rename to keyboards/keebio/levinson/keymaps/losinggeneration/config.h diff --git a/keyboards/levinson/keymaps/losinggeneration/keymap.c b/keyboards/keebio/levinson/keymaps/losinggeneration/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/losinggeneration/keymap.c rename to keyboards/keebio/levinson/keymaps/losinggeneration/keymap.c diff --git a/keyboards/levinson/keymaps/losinggeneration/rules.mk b/keyboards/keebio/levinson/keymaps/losinggeneration/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/losinggeneration/rules.mk rename to keyboards/keebio/levinson/keymaps/losinggeneration/rules.mk diff --git a/keyboards/levinson/keymaps/mmacdougall/README.md b/keyboards/keebio/levinson/keymaps/mmacdougall/README.md similarity index 100% rename from keyboards/levinson/keymaps/mmacdougall/README.md rename to keyboards/keebio/levinson/keymaps/mmacdougall/README.md diff --git a/keyboards/levinson/keymaps/mmacdougall/config.h b/keyboards/keebio/levinson/keymaps/mmacdougall/config.h similarity index 100% rename from keyboards/levinson/keymaps/mmacdougall/config.h rename to keyboards/keebio/levinson/keymaps/mmacdougall/config.h diff --git a/keyboards/levinson/keymaps/mmacdougall/keymap.c b/keyboards/keebio/levinson/keymaps/mmacdougall/keymap.c similarity index 99% rename from keyboards/levinson/keymaps/mmacdougall/keymap.c rename to keyboards/keebio/levinson/keymaps/mmacdougall/keymap.c index dec47a7616e0..76d9c729980b 100644 --- a/keyboards/levinson/keymaps/mmacdougall/keymap.c +++ b/keyboards/keebio/levinson/keymaps/mmacdougall/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/levinson/keymaps/mmacdougall/rules.mk b/keyboards/keebio/levinson/keymaps/mmacdougall/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/mmacdougall/rules.mk rename to keyboards/keebio/levinson/keymaps/mmacdougall/rules.mk diff --git a/keyboards/keebio/levinson/keymaps/omgvee/config.h b/keyboards/keebio/levinson/keymaps/omgvee/config.h new file mode 100644 index 000000000000..ba005c0b25b3 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/omgvee/config.h @@ -0,0 +1,26 @@ +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_TERM 150 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#undef PRODUCT +#define PRODUCT "Vee's hotswappable LEVINSON purely ortholinear keeb" + diff --git a/keyboards/keebio/levinson/keymaps/omgvee/keymap.c b/keyboards/keebio/levinson/keymaps/omgvee/keymap.c new file mode 100644 index 000000000000..8dab1c2745c4 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/omgvee/keymap.c @@ -0,0 +1,185 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _FN3 5 +#define _FN4 6 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + FN3, + FN4, + ADJUST, +}; + +#define KC_ KC_TRNS + +#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen +#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen +#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen +#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen +#define KC_X0 MT(MOD_LCTL, KC_ESC) +#define KC_SCAP SFT_T(KC_CAPS) +#define KC_LOW LOWER +#define KC_RAIS RAISE +#define KC_X3 LT(_FN3, KC_GRV) +#define KC_SENT MT(MOD_LSFT, KC_ENT) +#define KC_X5 BL_STEP +#define KC_CTB CTL_T(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GESC, Q , W , E , R , T , Y , U , I , O , P ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCAP, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CTB, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,SENT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI,LOW ,ENT , SPC,RAIS,RALT, , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCAP, NO ,HOME,PGDN,PGUP, END, LEFT,DOWN, UP ,RGHT, INS, DEL, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CTB , F1 , F2 , F3 , F4 , F5 , F6, F7 , F8 , F9 , F10, F11, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, LOW, ENT, SPC,RAIS,RALT, , , F12 + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB, EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, DEL, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCAP, , , , , , MINS, EQL, ,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CTB, , , , , , UNDS,PLUS,VOLD,VOLU,MUTE,SENT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, LOW, ENT, SPC,RAIS,RALT, , , NO + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_COLEMAK] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GESC, Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + SCAP, A , R , S , T , D , H , N , E , I , O ,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + CTB, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH,SENT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, LOW, ENT, SPC,RAIS,RALT, , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_DVORAK] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X0 , A , O , E , U , I , D , H , T , N , S ,SLSH, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT,SCLN, Q , J , K , X , B , M , W , V , Z ,SENT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + X3 ,LCTL,LALT,LGUI, LOW, ENT, SPC,RAIS,RALT, , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + + [_FN3] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + F12 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , MS_L,MS_D,MS_U,MS_R,WH_L,WH_R, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , BTN1,WH_D,WH_U,BTN2, , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , , , + //`----+----+----+----+----+----' `----+----+----+----+----+----' + ), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + RESET, QWERTY, COLEMAK, DVORAK, _______, EEP_RST, KC_MNXT, KC_MPRV, KC_MFFD, KC_MRWD, DVORAK, KC_EJCT, \ + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_PGUP, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CK_UP, CK_DOWN, \ + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_PGDN, KC_END, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, \ + BL_TOGG, BL_INC, BL_DEC, BL_BRTG, _______, _______, CK_RST, _______, CK_TOGG, MU_MOD, MU_TOG, AU_TOG \ + ) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/keebio/levinson/keymaps/omgvee/readme.md b/keyboards/keebio/levinson/keymaps/omgvee/readme.md new file mode 100644 index 000000000000..f882c98b0bfd --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/omgvee/readme.md @@ -0,0 +1,21 @@ +# What I want from my LEVINSON (Let's Split on steroids) keymap +==================================================================================================== + + +![My indigo Levinson keeb](https://i.imgur.com/sPfzSTk.jpg) + +- media keys and media controls, including Eject, for however rare those computers with OSX *and* bloody optical drives might be +- in-switch LED intensity controls (+/-) +- underglow RGB hue/color controls +- underglow RGB intensity controls +- familiar key arrangement with Enter and symbols on the usual keys (to the right hand side, on some layer, pref RAISE for one-handed operation) +- navigation keys should be the vim ones really; +- arrow keys on one layer(most likely on the ADJUST one, but also on LOWER, as per my usual other split keebs) +- mouse keys too +- hardware reset for the ProMicro to put it bootloader mode, sounds, eeprom reset, backlights and rgb controls reset, etc. + +See keymap.c for layouts +See config.h for various toggles and flags + + +P.S> this is my first fully and purely ortholinear keyboard, as opposed to my [Iris](https://github.com/qmk/qmk_firmware/tree/master/keyboards/keebio/iris/keymaps/omgvee "Vee's Iris keeb"), [Helidox](https://github.com/qmk/qmk_firmware/tree/master/keyboards/crkbd/keymaps/omgvee "Vee's beloved Helidox keeb"), MiniDox, etc., which are mildly staggered, but on the vertical side, which seems better imho than this... but we'll see how I get on with it over time... diff --git a/keyboards/keebio/levinson/keymaps/omgvee/rules.mk b/keyboards/keebio/levinson/keymaps/omgvee/rules.mk new file mode 100644 index 000000000000..3540947ac5ab --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/omgvee/rules.mk @@ -0,0 +1,11 @@ +EXTRAFLAGS += -flto +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes +MOUSEKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +TAP_DANCE_ENABLE = no +NKRO_ENABLE = yes +LEADER_ENABLE = no +UNICODE_ENABLE = yes +AUDIO_ENABLE = yes diff --git a/keyboards/levinson/keymaps/steno/config.h b/keyboards/keebio/levinson/keymaps/steno/config.h similarity index 100% rename from keyboards/levinson/keymaps/steno/config.h rename to keyboards/keebio/levinson/keymaps/steno/config.h diff --git a/keyboards/levinson/keymaps/steno/keymap.c b/keyboards/keebio/levinson/keymaps/steno/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/steno/keymap.c rename to keyboards/keebio/levinson/keymaps/steno/keymap.c diff --git a/keyboards/levinson/keymaps/steno/rules.mk b/keyboards/keebio/levinson/keymaps/steno/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/steno/rules.mk rename to keyboards/keebio/levinson/keymaps/steno/rules.mk diff --git a/keyboards/levinson/keymaps/treadwell/config.h b/keyboards/keebio/levinson/keymaps/treadwell/config.h similarity index 100% rename from keyboards/levinson/keymaps/treadwell/config.h rename to keyboards/keebio/levinson/keymaps/treadwell/config.h diff --git a/keyboards/levinson/keymaps/treadwell/keymap.c b/keyboards/keebio/levinson/keymaps/treadwell/keymap.c similarity index 99% rename from keyboards/levinson/keymaps/treadwell/keymap.c rename to keyboards/keebio/levinson/keymaps/treadwell/keymap.c index bcc744a6ddfd..2f0da0f525c9 100644 --- a/keyboards/levinson/keymaps/treadwell/keymap.c +++ b/keyboards/keebio/levinson/keymaps/treadwell/keymap.c @@ -23,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_X1 CODE #define KC_X2 NUMB diff --git a/keyboards/keebio/levinson/keymaps/treadwell/rules.mk b/keyboards/keebio/levinson/keymaps/treadwell/rules.mk new file mode 100644 index 000000000000..1d2d9e5a9c4b --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/treadwell/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no diff --git a/keyboards/levinson/keymaps/valgrahf/config.h b/keyboards/keebio/levinson/keymaps/valgrahf/config.h similarity index 100% rename from keyboards/levinson/keymaps/valgrahf/config.h rename to keyboards/keebio/levinson/keymaps/valgrahf/config.h diff --git a/keyboards/levinson/keymaps/valgrahf/keymap.c b/keyboards/keebio/levinson/keymaps/valgrahf/keymap.c similarity index 98% rename from keyboards/levinson/keymaps/valgrahf/keymap.c rename to keyboards/keebio/levinson/keymaps/valgrahf/keymap.c index 7b3df539dbbe..cbe86db37350 100644 --- a/keyboards/levinson/keymaps/valgrahf/keymap.c +++ b/keyboards/keebio/levinson/keymaps/valgrahf/keymap.c @@ -7,8 +7,6 @@ extern keymap_config_t keymap_config; #define _FN2 2 #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 LT(_FN1, KC_NO) #define KC_FN2 LT(_FN2, KC_NO) #define KC_SPFN LT(_FN1, KC_SPACE) diff --git a/keyboards/levinson/keymaps/valgrahf/rules.mk b/keyboards/keebio/levinson/keymaps/valgrahf/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/valgrahf/rules.mk rename to keyboards/keebio/levinson/keymaps/valgrahf/rules.mk diff --git a/keyboards/levinson/keymaps/xtonhasvim/config.h b/keyboards/keebio/levinson/keymaps/xtonhasvim/config.h similarity index 100% rename from keyboards/levinson/keymaps/xtonhasvim/config.h rename to keyboards/keebio/levinson/keymaps/xtonhasvim/config.h diff --git a/keyboards/levinson/keymaps/xtonhasvim/keymap.c b/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c similarity index 100% rename from keyboards/levinson/keymaps/xtonhasvim/keymap.c rename to keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c diff --git a/keyboards/levinson/keymaps/xtonhasvim/readme.md b/keyboards/keebio/levinson/keymaps/xtonhasvim/readme.md similarity index 100% rename from keyboards/levinson/keymaps/xtonhasvim/readme.md rename to keyboards/keebio/levinson/keymaps/xtonhasvim/readme.md diff --git a/keyboards/levinson/keymaps/xtonhasvim/rules.mk b/keyboards/keebio/levinson/keymaps/xtonhasvim/rules.mk similarity index 100% rename from keyboards/levinson/keymaps/xtonhasvim/rules.mk rename to keyboards/keebio/levinson/keymaps/xtonhasvim/rules.mk diff --git a/keyboards/levinson/levinson.c b/keyboards/keebio/levinson/levinson.c similarity index 100% rename from keyboards/levinson/levinson.c rename to keyboards/keebio/levinson/levinson.c diff --git a/keyboards/levinson/levinson.h b/keyboards/keebio/levinson/levinson.h similarity index 96% rename from keyboards/levinson/levinson.h rename to keyboards/keebio/levinson/levinson.h index 2106bc0e37c7..88c2361ad02a 100644 --- a/keyboards/levinson/levinson.h +++ b/keyboards/keebio/levinson/levinson.h @@ -2,7 +2,7 @@ #include "quantum.h" -#ifdef KEYBOARD_levinson_rev1 +#ifdef KEYBOARD_keebio_levinson_rev1 #include "rev1.h" #else #include "rev2.h" diff --git a/keyboards/levinson/readme.md b/keyboards/keebio/levinson/readme.md similarity index 100% rename from keyboards/levinson/readme.md rename to keyboards/keebio/levinson/readme.md diff --git a/keyboards/levinson/rev1/config.h b/keyboards/keebio/levinson/rev1/config.h similarity index 93% rename from keyboards/levinson/rev1/config.h rename to keyboards/keebio/levinson/rev1/config.h index 4d70a6af1682..eec95f7278b6 100644 --- a/keyboards/levinson/rev1/config.h +++ b/keyboards/keebio/levinson/rev1/config.h @@ -22,7 +22,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_CONFIG_H /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1146 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -36,7 +36,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D7, E6, B4, B5 } -#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, F4 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 @@ -55,5 +55,5 @@ along with this program. If not, see . #define RGBLED_NUM 12 // Number of LEDs /* Backlight LEDs */ -#define BACKLIGHT_PIN B6 +#define BACKLIGHT_PIN C6 #define BACKLIGHT_LEVELS 7 diff --git a/keyboards/levinson/rev1/rev1.c b/keyboards/keebio/levinson/rev1/rev1.c similarity index 100% rename from keyboards/levinson/rev1/rev1.c rename to keyboards/keebio/levinson/rev1/rev1.c diff --git a/keyboards/levinson/rev1/rev1.h b/keyboards/keebio/levinson/rev1/rev1.h similarity index 100% rename from keyboards/levinson/rev1/rev1.h rename to keyboards/keebio/levinson/rev1/rev1.h diff --git a/keyboards/iris/keymaps/rs/rules.mk b/keyboards/keebio/levinson/rev1/rules.mk similarity index 100% rename from keyboards/iris/keymaps/rs/rules.mk rename to keyboards/keebio/levinson/rev1/rules.mk diff --git a/keyboards/levinson/rev2/config.h b/keyboards/keebio/levinson/rev2/config.h similarity index 98% rename from keyboards/levinson/rev2/config.h rename to keyboards/keebio/levinson/rev2/config.h index 9bf11bee9b51..a9fe89586616 100644 --- a/keyboards/levinson/rev2/config.h +++ b/keyboards/keebio/levinson/rev2/config.h @@ -22,7 +22,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_CONFIG_H /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1146 #define DEVICE_VER 0x0200 #define MANUFACTURER Keebio diff --git a/keyboards/levinson/rev2/rev2.c b/keyboards/keebio/levinson/rev2/rev2.c similarity index 100% rename from keyboards/levinson/rev2/rev2.c rename to keyboards/keebio/levinson/rev2/rev2.c diff --git a/keyboards/levinson/rev2/rev2.h b/keyboards/keebio/levinson/rev2/rev2.h similarity index 100% rename from keyboards/levinson/rev2/rev2.h rename to keyboards/keebio/levinson/rev2/rev2.h diff --git a/keyboards/levinson/rev1/rules.mk b/keyboards/keebio/levinson/rev2/rules.mk similarity index 100% rename from keyboards/levinson/rev1/rules.mk rename to keyboards/keebio/levinson/rev2/rules.mk diff --git a/keyboards/levinson/rules.mk b/keyboards/keebio/levinson/rules.mk similarity index 92% rename from keyboards/levinson/rules.mk rename to keyboards/keebio/levinson/rules.mk index 8f1fa130fa62..cdaef48890f6 100644 --- a/keyboards/levinson/rules.mk +++ b/keyboards/keebio/levinson/rules.mk @@ -22,7 +22,7 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode 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. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -30,4 +30,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes LAYOUTS = ortho_4x12 -DEFAULT_FOLDER = levinson/rev2 +DEFAULT_FOLDER = keebio/levinson/rev2 diff --git a/keyboards/nyquist/config.h b/keyboards/keebio/nyquist/config.h similarity index 92% rename from keyboards/nyquist/config.h rename to keyboards/keebio/nyquist/config.h index 863722d7d04d..6868dc13541e 100644 --- a/keyboards/nyquist/config.h +++ b/keyboards/keebio/nyquist/config.h @@ -15,9 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif // CONFIG_H diff --git a/keyboards/nyquist/info.json b/keyboards/keebio/nyquist/info.json similarity index 100% rename from keyboards/nyquist/info.json rename to keyboards/keebio/nyquist/info.json diff --git a/keyboards/nyquist/keymaps/DivergeJM/README.md b/keyboards/keebio/nyquist/keymaps/DivergeJM/README.md similarity index 100% rename from keyboards/nyquist/keymaps/DivergeJM/README.md rename to keyboards/keebio/nyquist/keymaps/DivergeJM/README.md diff --git a/keyboards/nyquist/keymaps/DivergeJM/config.h b/keyboards/keebio/nyquist/keymaps/DivergeJM/config.h similarity index 100% rename from keyboards/nyquist/keymaps/DivergeJM/config.h rename to keyboards/keebio/nyquist/keymaps/DivergeJM/config.h diff --git a/keyboards/nyquist/keymaps/DivergeJM/keymap.c b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c similarity index 98% rename from keyboards/nyquist/keymaps/DivergeJM/keymap.c rename to keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c index db802280636a..c0c1760cd16c 100644 --- a/keyboards/nyquist/keymaps/DivergeJM/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c @@ -44,7 +44,7 @@ enum { }; */ // Enable these functions using FUNC(n) macro. - const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 + const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_ENT), //Hold for momentary Mouse layer, Tap for Enter, [2] = ACTION_LAYER_MOMENTARY(_FUNCTION), //Hold for momentary Function @@ -57,10 +57,6 @@ enum { #define PIPE M(R_PIPE) #define POINT M(R_POINT) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak diff --git a/keyboards/nyquist/keymaps/DivergeJM/rules.mk b/keyboards/keebio/nyquist/keymaps/DivergeJM/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/DivergeJM/rules.mk rename to keyboards/keebio/nyquist/keymaps/DivergeJM/rules.mk diff --git a/keyboards/nyquist/keymaps/hexwire/README.md b/keyboards/keebio/nyquist/keymaps/bakingpy/README.md similarity index 100% rename from keyboards/nyquist/keymaps/hexwire/README.md rename to keyboards/keebio/nyquist/keymaps/bakingpy/README.md diff --git a/keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md b/keyboards/keebio/nyquist/keymaps/bakingpy/Underglow Pinouts.md similarity index 100% rename from keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md rename to keyboards/keebio/nyquist/keymaps/bakingpy/Underglow Pinouts.md diff --git a/keyboards/nyquist/keymaps/hexwire/config.h b/keyboards/keebio/nyquist/keymaps/bakingpy/config.h similarity index 96% rename from keyboards/nyquist/keymaps/hexwire/config.h rename to keyboards/keebio/nyquist/keymaps/bakingpy/config.h index 4f1901b5dd20..eecff3dd51cb 100644 --- a/keyboards/nyquist/keymaps/hexwire/config.h +++ b/keyboards/keebio/nyquist/keymaps/bakingpy/config.h @@ -18,13 +18,9 @@ along with this program. If not, see . #pragma once /* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ - -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/nyquist/keymaps/hexwire/keymap.c b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c similarity index 99% rename from keyboards/nyquist/keymaps/hexwire/keymap.c rename to keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c index c030cd3b6af1..38c13f3baa67 100644 --- a/keyboards/nyquist/keymaps/hexwire/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c @@ -23,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/nyquist/keymaps/hexwire/keymap_converter.py b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py similarity index 100% rename from keyboards/nyquist/keymaps/hexwire/keymap_converter.py rename to keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py diff --git a/keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_to_readme.rb similarity index 100% rename from keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb rename to keyboards/keebio/nyquist/keymaps/bakingpy/keymap_to_readme.rb diff --git a/keyboards/nyquist/keymaps/hexwire/rules.mk b/keyboards/keebio/nyquist/keymaps/bakingpy/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/hexwire/rules.mk rename to keyboards/keebio/nyquist/keymaps/bakingpy/rules.mk diff --git a/keyboards/nyquist/keymaps/bramver/README.md b/keyboards/keebio/nyquist/keymaps/bramver/README.md similarity index 100% rename from keyboards/nyquist/keymaps/bramver/README.md rename to keyboards/keebio/nyquist/keymaps/bramver/README.md diff --git a/keyboards/nyquist/keymaps/bramver/config.h b/keyboards/keebio/nyquist/keymaps/bramver/config.h similarity index 100% rename from keyboards/nyquist/keymaps/bramver/config.h rename to keyboards/keebio/nyquist/keymaps/bramver/config.h diff --git a/keyboards/nyquist/keymaps/bramver/keymap.c b/keyboards/keebio/nyquist/keymaps/bramver/keymap.c similarity index 99% rename from keyboards/nyquist/keymaps/bramver/keymap.c rename to keyboards/keebio/nyquist/keymaps/bramver/keymap.c index f1562546791a..c671b7798c1c 100644 --- a/keyboards/nyquist/keymaps/bramver/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/bramver/keymap.c @@ -15,10 +15,6 @@ */ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // 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 diff --git a/keyboards/nyquist/keymaps/bramver/rules.mk b/keyboards/keebio/nyquist/keymaps/bramver/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/bramver/rules.mk rename to keyboards/keebio/nyquist/keymaps/bramver/rules.mk diff --git a/keyboards/nyquist/keymaps/danielhklein/config.h b/keyboards/keebio/nyquist/keymaps/danielhklein/config.h similarity index 100% rename from keyboards/nyquist/keymaps/danielhklein/config.h rename to keyboards/keebio/nyquist/keymaps/danielhklein/config.h diff --git a/keyboards/nyquist/keymaps/danielhklein/keymap.c b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c similarity index 97% rename from keyboards/nyquist/keymaps/danielhklein/keymap.c rename to keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c index e072527b1e87..14428812f2ba 100644 --- a/keyboards/nyquist/keymaps/danielhklein/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c @@ -31,7 +31,7 @@ enum custom_keycodes { }; // Enable these functions using FUNC(n) macro. - const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 + const uint16_t PROGMEM fn_actions[] = { [0] = LT(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Backspace, [1] = LT(_RAISE, KC_BSPC), //Hold for momentary Raise layer, Tap for Space, [2] = MO(_ARROW), //Hold for momentary Arrow @@ -41,10 +41,6 @@ enum custom_keycodes { #define BSP_RSE FUNC(1) #define ARW FUNC(2) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Underglow setup #define RGBLIGHT_SLEEP #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/nyquist/keymaps/danielhklein/rules.mk b/keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/danielhklein/rules.mk rename to keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk diff --git a/keyboards/keebio/nyquist/keymaps/default/config.h b/keyboards/keebio/nyquist/keymaps/default/config.h new file mode 100644 index 000000000000..ef1c4a51ab9b --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/default/config.h @@ -0,0 +1,31 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/nyquist/keymaps/default/keymap.c b/keyboards/keebio/nyquist/keymaps/default/keymap.c similarity index 99% rename from keyboards/nyquist/keymaps/default/keymap.c rename to keyboards/keebio/nyquist/keymaps/default/keymap.c index 0e3a1b9ab823..ecaad49bb2b6 100644 --- a/keyboards/nyquist/keymaps/default/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/viterbi/keymaps/default/rules.mk b/keyboards/keebio/nyquist/keymaps/default/rules.mk similarity index 100% rename from keyboards/viterbi/keymaps/default/rules.mk rename to keyboards/keebio/nyquist/keymaps/default/rules.mk diff --git a/keyboards/nyquist/keymaps/jojiichan/config.h b/keyboards/keebio/nyquist/keymaps/jojiichan/config.h similarity index 100% rename from keyboards/nyquist/keymaps/jojiichan/config.h rename to keyboards/keebio/nyquist/keymaps/jojiichan/config.h diff --git a/keyboards/nyquist/keymaps/jojiichan/keymap.c b/keyboards/keebio/nyquist/keymaps/jojiichan/keymap.c similarity index 97% rename from keyboards/nyquist/keymaps/jojiichan/keymap.c rename to keyboards/keebio/nyquist/keymaps/jojiichan/keymap.c index e8f92f37d744..a0d8c4647509 100644 --- a/keyboards/nyquist/keymaps/jojiichan/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/jojiichan/keymap.c @@ -2,11 +2,6 @@ extern keymap_config_t keymap_config; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( diff --git a/keyboards/nyquist/keymaps/jojiichan/rules.mk b/keyboards/keebio/nyquist/keymaps/jojiichan/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/jojiichan/rules.mk rename to keyboards/keebio/nyquist/keymaps/jojiichan/rules.mk diff --git a/keyboards/nyquist/keymaps/kim-kim/config.h b/keyboards/keebio/nyquist/keymaps/kim-kim/config.h similarity index 100% rename from keyboards/nyquist/keymaps/kim-kim/config.h rename to keyboards/keebio/nyquist/keymaps/kim-kim/config.h diff --git a/keyboards/nyquist/keymaps/kim-kim/keymap.c b/keyboards/keebio/nyquist/keymaps/kim-kim/keymap.c similarity index 98% rename from keyboards/nyquist/keymaps/kim-kim/keymap.c rename to keyboards/keebio/nyquist/keymaps/kim-kim/keymap.c index 4051f296ee24..79e485f003b2 100644 --- a/keyboards/nyquist/keymaps/kim-kim/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/kim-kim/keymap.c @@ -10,10 +10,6 @@ extern keymap_config_t keymap_config; #define _LW 1 #define _RS 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* SPLIT QWERTY diff --git a/keyboards/nyquist/keymaps/kim-kim/rules.mk b/keyboards/keebio/nyquist/keymaps/kim-kim/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/kim-kim/rules.mk rename to keyboards/keebio/nyquist/keymaps/kim-kim/rules.mk diff --git a/keyboards/nyquist/keymaps/losinggeneration/README.md b/keyboards/keebio/nyquist/keymaps/losinggeneration/README.md similarity index 100% rename from keyboards/nyquist/keymaps/losinggeneration/README.md rename to keyboards/keebio/nyquist/keymaps/losinggeneration/README.md diff --git a/keyboards/nyquist/keymaps/losinggeneration/config.h b/keyboards/keebio/nyquist/keymaps/losinggeneration/config.h similarity index 100% rename from keyboards/nyquist/keymaps/losinggeneration/config.h rename to keyboards/keebio/nyquist/keymaps/losinggeneration/config.h diff --git a/keyboards/nyquist/keymaps/losinggeneration/keymap.c b/keyboards/keebio/nyquist/keymaps/losinggeneration/keymap.c similarity index 100% rename from keyboards/nyquist/keymaps/losinggeneration/keymap.c rename to keyboards/keebio/nyquist/keymaps/losinggeneration/keymap.c diff --git a/keyboards/nyquist/keymaps/losinggeneration/rules.mk b/keyboards/keebio/nyquist/keymaps/losinggeneration/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/losinggeneration/rules.mk rename to keyboards/keebio/nyquist/keymaps/losinggeneration/rules.mk diff --git a/keyboards/nyquist/keymaps/default/config.h b/keyboards/keebio/nyquist/keymaps/mtdjr/config.h similarity index 100% rename from keyboards/nyquist/keymaps/default/config.h rename to keyboards/keebio/nyquist/keymaps/mtdjr/config.h diff --git a/keyboards/nyquist/keymaps/mtdjr/keymap.c b/keyboards/keebio/nyquist/keymaps/mtdjr/keymap.c similarity index 100% rename from keyboards/nyquist/keymaps/mtdjr/keymap.c rename to keyboards/keebio/nyquist/keymaps/mtdjr/keymap.c diff --git a/keyboards/nyquist/keymaps/mtdjr/rules.mk b/keyboards/keebio/nyquist/keymaps/mtdjr/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/mtdjr/rules.mk rename to keyboards/keebio/nyquist/keymaps/mtdjr/rules.mk diff --git a/keyboards/nyquist/keymaps/pitty/README.md b/keyboards/keebio/nyquist/keymaps/pitty/README.md similarity index 100% rename from keyboards/nyquist/keymaps/pitty/README.md rename to keyboards/keebio/nyquist/keymaps/pitty/README.md diff --git a/keyboards/nyquist/keymaps/pitty/config.h b/keyboards/keebio/nyquist/keymaps/pitty/config.h similarity index 100% rename from keyboards/nyquist/keymaps/pitty/config.h rename to keyboards/keebio/nyquist/keymaps/pitty/config.h diff --git a/keyboards/nyquist/keymaps/pitty/keymap.c b/keyboards/keebio/nyquist/keymaps/pitty/keymap.c similarity index 99% rename from keyboards/nyquist/keymaps/pitty/keymap.c rename to keyboards/keebio/nyquist/keymaps/pitty/keymap.c index dea317d2ae8d..4dec42b85370 100644 --- a/keyboards/nyquist/keymaps/pitty/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/pitty/keymap.c @@ -13,11 +13,6 @@ enum custom_macros { DRIGHT, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/nyquist/keymaps/pitty/rules.mk b/keyboards/keebio/nyquist/keymaps/pitty/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/pitty/rules.mk rename to keyboards/keebio/nyquist/keymaps/pitty/rules.mk diff --git a/keyboards/nyquist/keymaps/shovelpaw/config.h b/keyboards/keebio/nyquist/keymaps/shovelpaw/config.h similarity index 100% rename from keyboards/nyquist/keymaps/shovelpaw/config.h rename to keyboards/keebio/nyquist/keymaps/shovelpaw/config.h diff --git a/keyboards/nyquist/keymaps/shovelpaw/keymap.c b/keyboards/keebio/nyquist/keymaps/shovelpaw/keymap.c similarity index 100% rename from keyboards/nyquist/keymaps/shovelpaw/keymap.c rename to keyboards/keebio/nyquist/keymaps/shovelpaw/keymap.c diff --git a/keyboards/nyquist/keymaps/shovelpaw/rules.mk b/keyboards/keebio/nyquist/keymaps/shovelpaw/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/shovelpaw/rules.mk rename to keyboards/keebio/nyquist/keymaps/shovelpaw/rules.mk diff --git a/keyboards/nyquist/keymaps/skug/config.h b/keyboards/keebio/nyquist/keymaps/skug/config.h similarity index 100% rename from keyboards/nyquist/keymaps/skug/config.h rename to keyboards/keebio/nyquist/keymaps/skug/config.h diff --git a/keyboards/nyquist/keymaps/skug/keymap.c b/keyboards/keebio/nyquist/keymaps/skug/keymap.c similarity index 95% rename from keyboards/nyquist/keymaps/skug/keymap.c rename to keyboards/keebio/nyquist/keymaps/skug/keymap.c index fe3229966f6f..2d511fee3c77 100644 --- a/keyboards/nyquist/keymaps/skug/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/skug/keymap.c @@ -112,11 +112,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Arrow layer * ,-----------------------------------------. .-----------------------------------------. - * | | | | | | | | | | | | | PgUp | + * | §/½ | | | | | | | | | | Ins | Home | PgUp | * |------+------+------+------+------+------+ +------+------+------+------+------+------| - * | | | Up | | | | | | | | | | PgDn | + * | | | Up | | | | | | | | Del | End | PgDn | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | Left | Down | Right| | | | | | | | | | + * | | Left | Down | Right| | Back | | Fwd | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------+ +------+------+------+------+------+------| @@ -124,9 +124,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------' '-----------------------------------------' */ [ARRW] = LAYOUT( \ - NO_HALF, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, KC_PGUP, \ - _______, _______, KC_UP , _______ , _______, _______, _______, _______, _______, _______, _______, KC_PGDN, \ - _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, \ + NO_HALF, _______, _______, _______ , _______, _______, _______, _______, _______, KC_INS , KC_HOME, KC_PGUP, \ + _______, _______, KC_UP , _______ , _______, _______, _______, _______, _______, KC_DEL , KC_END , KC_PGDN, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, \ _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_DEL , _______, _______, _______, _______, _______, _______, _______, _______ \ ), diff --git a/keyboards/nyquist/keymaps/skug/rules.mk b/keyboards/keebio/nyquist/keymaps/skug/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/skug/rules.mk rename to keyboards/keebio/nyquist/keymaps/skug/rules.mk diff --git a/keyboards/keebio/nyquist/keymaps/tester/config.h b/keyboards/keebio/nyquist/keymaps/tester/config.h new file mode 100644 index 000000000000..4f5f10cebcfd --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/tester/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +#define USE_I2C diff --git a/keyboards/keebio/nyquist/keymaps/tester/keymap.c b/keyboards/keebio/nyquist/keymaps/tester/keymap.c new file mode 100644 index 000000000000..f1e193271076 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/tester/keymap.c @@ -0,0 +1,226 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + BL_STEP, KC_Q, KC_W, KC_E, KC_R, KC_T, BL_STEP, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + RGB_MOD, KC_A, KC_S, KC_D, KC_F, KC_G, RGB_MOD, 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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT( \ + 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT( \ + 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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT( \ + 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/viterbi/keymaps/dwallace/rules.mk b/keyboards/keebio/nyquist/keymaps/tester/rules.mk similarity index 100% rename from keyboards/viterbi/keymaps/dwallace/rules.mk rename to keyboards/keebio/nyquist/keymaps/tester/rules.mk diff --git a/keyboards/nyquist/keymaps/yshrsmz/config.h b/keyboards/keebio/nyquist/keymaps/yshrsmz/config.h similarity index 100% rename from keyboards/nyquist/keymaps/yshrsmz/config.h rename to keyboards/keebio/nyquist/keymaps/yshrsmz/config.h diff --git a/keyboards/nyquist/keymaps/yshrsmz/keymap.c b/keyboards/keebio/nyquist/keymaps/yshrsmz/keymap.c similarity index 99% rename from keyboards/nyquist/keymaps/yshrsmz/keymap.c rename to keyboards/keebio/nyquist/keymaps/yshrsmz/keymap.c index 78070279d1fc..d4c2d4ba233a 100644 --- a/keyboards/nyquist/keymaps/yshrsmz/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/yshrsmz/keymap.c @@ -20,10 +20,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/nyquist/keymaps/yshrsmz/rules.mk b/keyboards/keebio/nyquist/keymaps/yshrsmz/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/yshrsmz/rules.mk rename to keyboards/keebio/nyquist/keymaps/yshrsmz/rules.mk diff --git a/keyboards/nyquist/nyquist.c b/keyboards/keebio/nyquist/nyquist.c similarity index 100% rename from keyboards/nyquist/nyquist.c rename to keyboards/keebio/nyquist/nyquist.c diff --git a/keyboards/nyquist/nyquist.h b/keyboards/keebio/nyquist/nyquist.h similarity index 92% rename from keyboards/nyquist/nyquist.h rename to keyboards/keebio/nyquist/nyquist.h index 9a3e996476f4..7b0ecf54237b 100644 --- a/keyboards/nyquist/nyquist.h +++ b/keyboards/keebio/nyquist/nyquist.h @@ -1,12 +1,12 @@ #pragma once -#ifdef KEYBOARD_nyquist_rev1 +#ifdef KEYBOARD_keebio_nyquist_rev1 #include "rev1.h" #endif -#ifdef KEYBOARD_nyquist_rev2 +#ifdef KEYBOARD_keebio_nyquist_rev2 #include "rev2.h" #endif -#ifdef KEYBOARD_nyquist_rev3 +#ifdef KEYBOARD_keebio_nyquist_rev3 #include "rev3.h" #endif diff --git a/keyboards/nyquist/readme.md b/keyboards/keebio/nyquist/readme.md similarity index 89% rename from keyboards/nyquist/readme.md rename to keyboards/keebio/nyquist/readme.md index e3d75b448fef..9fa7259d8771 100644 --- a/keyboards/nyquist/readme.md +++ b/keyboards/keebio/nyquist/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make nyquist/rev1:default + make keebio/nyquist/rev2:default Example of flashing this keyboard: - make nyquist/rev1:default:avrdude + make keebio/nyquist/rev2:default:avrdude 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. diff --git a/keyboards/nyquist/rev1/config.h b/keyboards/keebio/nyquist/rev1/config.h similarity index 100% rename from keyboards/nyquist/rev1/config.h rename to keyboards/keebio/nyquist/rev1/config.h diff --git a/keyboards/nyquist/rev1/rev1.c b/keyboards/keebio/nyquist/rev1/rev1.c similarity index 100% rename from keyboards/nyquist/rev1/rev1.c rename to keyboards/keebio/nyquist/rev1/rev1.c diff --git a/keyboards/nyquist/rev1/rev1.h b/keyboards/keebio/nyquist/rev1/rev1.h similarity index 100% rename from keyboards/nyquist/rev1/rev1.h rename to keyboards/keebio/nyquist/rev1/rev1.h diff --git a/keyboards/nyquist/rev1/rules.mk b/keyboards/keebio/nyquist/rev1/rules.mk similarity index 100% rename from keyboards/nyquist/rev1/rules.mk rename to keyboards/keebio/nyquist/rev1/rules.mk diff --git a/keyboards/nyquist/rev2/config.h b/keyboards/keebio/nyquist/rev2/config.h similarity index 100% rename from keyboards/nyquist/rev2/config.h rename to keyboards/keebio/nyquist/rev2/config.h diff --git a/keyboards/nyquist/rev2/rev2.c b/keyboards/keebio/nyquist/rev2/rev2.c similarity index 100% rename from keyboards/nyquist/rev2/rev2.c rename to keyboards/keebio/nyquist/rev2/rev2.c diff --git a/keyboards/nyquist/rev2/rev2.h b/keyboards/keebio/nyquist/rev2/rev2.h similarity index 100% rename from keyboards/nyquist/rev2/rev2.h rename to keyboards/keebio/nyquist/rev2/rev2.h diff --git a/keyboards/levinson/rev2/rules.mk b/keyboards/keebio/nyquist/rev2/rules.mk similarity index 100% rename from keyboards/levinson/rev2/rules.mk rename to keyboards/keebio/nyquist/rev2/rules.mk diff --git a/keyboards/nyquist/rev3/config.h b/keyboards/keebio/nyquist/rev3/config.h similarity index 98% rename from keyboards/nyquist/rev3/config.h rename to keyboards/keebio/nyquist/rev3/config.h index 18b40ecec7ae..3c7822def033 100644 --- a/keyboards/nyquist/rev3/config.h +++ b/keyboards/keebio/nyquist/rev3/config.h @@ -56,6 +56,7 @@ along with this program. If not, see . #define RGB_DI_PIN B4 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 +#define RGBLED_SPLIT { 6, 6 } /* Backlight LEDs */ #define BACKLIGHT_PIN B5 diff --git a/keyboards/nyquist/rev3/rev3.c b/keyboards/keebio/nyquist/rev3/rev3.c similarity index 100% rename from keyboards/nyquist/rev3/rev3.c rename to keyboards/keebio/nyquist/rev3/rev3.c diff --git a/keyboards/nyquist/rev3/rev3.h b/keyboards/keebio/nyquist/rev3/rev3.h similarity index 100% rename from keyboards/nyquist/rev3/rev3.h rename to keyboards/keebio/nyquist/rev3/rev3.h diff --git a/keyboards/nyquist/rev3/rules.mk b/keyboards/keebio/nyquist/rev3/rules.mk similarity index 100% rename from keyboards/nyquist/rev3/rules.mk rename to keyboards/keebio/nyquist/rev3/rules.mk diff --git a/keyboards/nyquist/rules.mk b/keyboards/keebio/nyquist/rules.mk similarity index 98% rename from keyboards/nyquist/rules.mk rename to keyboards/keebio/nyquist/rules.mk index 5313b85022fb..51821a48241f 100644 --- a/keyboards/nyquist/rules.mk +++ b/keyboards/keebio/nyquist/rules.mk @@ -68,4 +68,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes LAYOUTS = ortho_5x12 -DEFAULT_FOLDER = nyquist/rev2 +DEFAULT_FOLDER = keebio/nyquist/rev2 diff --git a/keyboards/fourier/config.h b/keyboards/keebio/quefrency/config.h similarity index 100% rename from keyboards/fourier/config.h rename to keyboards/keebio/quefrency/config.h diff --git a/keyboards/keebio/quefrency/info.json b/keyboards/keebio/quefrency/info.json new file mode 100644 index 000000000000..1b50ccbe50e9 --- /dev/null +++ b/keyboards/keebio/quefrency/info.json @@ -0,0 +1,369 @@ +{ + "keyboard_name": "Quefrency", + "url": "https://keeb.io", + "maintainer": "nooges", + "width": 17, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + + {"label":"7", "x":8, "y":0}, + {"label":"8", "x":9, "y":0}, + {"label":"9", "x":10, "y":0}, + {"label":"0", "x":11, "y":0}, + {"label":"-", "x":12, "y":0}, + {"label":"=", "x":13, "y":0}, + {"label":"Del", "x":14, "y":0}, + {"label":"Bksp", "x":15, "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":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":"[", "x":12.5, "y":1}, + {"label":"]", "x":13.5, "y":1}, + {"label":"Backslash", "x":14.5, "y":1, "w":1.5}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + + {"label":"H", "x":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":";", "x":11.75, "y":2}, + {"label":"'", "x":12.75, "y":2}, + {"label":"Enter", "x":13.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":8.25, "y":3}, + {"label":"M", "x":9.25, "y":3}, + {"label":",", "x":10.25, "y":3}, + {"label":".", "x":11.25, "y":3}, + {"label":"/", "x":12.25, "y":3}, + {"label":"Shift", "x":13.25, "y":3, "w":1.75}, + {"label":"Up", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Alt", "x":1.25, "y":4, "w":1.25}, + {"label":"Win", "x":2.5, "y":4, "w":1.25}, + {"label":"Fn", "x":3.75, "y":4, "w":1.25}, + {"label":"Space", "x":5, "y":4, "w":2.25}, + + {"label":"Fn", "x":8.25, "y":4, "w":1.25}, + {"label":"Space", "x":9.5, "y":4, "w":1.5}, + {"label":"Alt", "x":11, "y":4}, + {"label":"Ctrl", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] + }, + "LAYOUT_65": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + + {"label":"7", "x":8, "y":0}, + {"label":"8", "x":9, "y":0}, + {"label":"9", "x":10, "y":0}, + {"label":"0", "x":11, "y":0}, + {"label":"-", "x":12, "y":0}, + {"label":"=", "x":13, "y":0}, + {"label":"Del", "x":14, "y":0}, + {"label":"Bksp", "x":15, "y":0}, + {"label":"Home", "x":16, "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":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":"[", "x":12.5, "y":1}, + {"label":"]", "x":13.5, "y":1}, + {"label":"Backslash", "x":14.5, "y":1, "w":1.5}, + {"label":"End", "x":16, "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":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":";", "x":11.75, "y":2}, + {"label":"'", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":2, "w":2.25}, + {"label":"Page Up", "x":16, "y":2}, + + {"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":8.25, "y":3}, + {"label":"M", "x":9.25, "y":3}, + {"label":",", "x":10.25, "y":3}, + {"label":".", "x":11.25, "y":3}, + {"label":"/", "x":12.25, "y":3}, + {"label":"Shift", "x":13.25, "y":3, "w":1.75}, + {"label":"Up", "x":15, "y":3}, + {"label":"Page Down", "x":16, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Alt", "x":1.25, "y":4, "w":1.25}, + {"label":"Win", "x":2.5, "y":4, "w":1.25}, + {"label":"Fn", "x":3.75, "y":4, "w":1.25}, + {"label":"Space", "x":5, "y":4, "w":2.25}, + + {"label":"Fn", "x":8.25, "y":4, "w":1.25}, + {"label":"Space", "x":9.5, "y":4, "w":1.5}, + {"label":"Alt", "x":11, "y":4}, + {"label":"Ctrl", "x":12, "y":4}, + {"label":"Win", "x":13, "y":4}, + {"label":"Left", "x":14, "y":4}, + {"label":"Down", "x":15, "y":4}, + {"label":"Right", "x":16, "y":4} + ] + }, + "LAYOUT_60_with_macro": { + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F6", "x":1, "y":0}, + + {"label":"Esc", "x":2.25, "y":0}, + {"label":"1", "x":3.25, "y":0}, + {"label":"2", "x":4.25, "y":0}, + {"label":"3", "x":5.25, "y":0}, + {"label":"4", "x":6.25, "y":0}, + {"label":"5", "x":7.25, "y":0}, + {"label":"6", "x":8.25, "y":0}, + + {"label":"7", "x":10.25, "y":0}, + {"label":"8", "x":11.25, "y":0}, + {"label":"9", "x":12.25, "y":0}, + {"label":"0", "x":13.25, "y":0}, + {"label":"-", "x":14.25, "y":0}, + {"label":"=", "x":15.25, "y":0}, + {"label":"Del", "x":16.25, "y":0}, + {"label":"Bksp", "x":17.25, "y":0}, + + {"label":"F2", "x":0, "y":1}, + {"label":"F7", "x":1, "y":1}, + + {"label":"Tab", "x":2.25, "y":1, "w":1.5}, + {"label":"Q", "x":3.75, "y":1}, + {"label":"W", "x":4.75, "y":1}, + {"label":"E", "x":5.75, "y":1}, + {"label":"R", "x":6.75, "y":1}, + {"label":"T", "x":7.75, "y":1}, + + {"label":"Y", "x":9.75, "y":1}, + {"label":"U", "x":10.75, "y":1}, + {"label":"I", "x":11.75, "y":1}, + {"label":"O", "x":12.75, "y":1}, + {"label":"P", "x":13.75, "y":1}, + {"label":"{", "x":14.75, "y":1}, + {"label":"}", "x":15.75, "y":1}, + {"label":"Backslash", "x":16.75, "y":1, "w":1.5}, + + {"label":"F3", "x":0, "y":2}, + {"label":"F8", "x":1, "y":2}, + + {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, + {"label":"A", "x":4, "y":2}, + {"label":"S", "x":5, "y":2}, + {"label":"D", "x":6, "y":2}, + {"label":"F", "x":7, "y":2}, + {"label":"G", "x":8, "y":2}, + + {"label":"H", "x":10, "y":2}, + {"label":"J", "x":11, "y":2}, + {"label":"K", "x":12, "y":2}, + {"label":"L", "x":13, "y":2}, + {"label":":", "x":14, "y":2}, + {"label":"\"", "x":15, "y":2}, + {"label":"Enter", "x":16, "y":2, "w":2.25}, + + {"label":"F4", "x":0, "y":3}, + {"label":"F9", "x":1, "y":3}, + + {"label":"Shift", "x":2.25, "y":3, "w":2.25}, + {"label":"Z", "x":4.5, "y":3}, + {"label":"X", "x":5.5, "y":3}, + {"label":"C", "x":6.5, "y":3}, + {"label":"V", "x":7.5, "y":3}, + {"label":"B", "x":8.5, "y":3}, + + {"label":"N", "x":10.5, "y":3}, + {"label":"M", "x":11.5, "y":3}, + {"label":",", "x":12.5, "y":3}, + {"label":".", "x":13.5, "y":3}, + {"label":"/", "x":14.5, "y":3}, + {"label":"Shift", "x":15.5, "y":3, "w":1.75}, + {"label":"Fn", "x":17.25, "y":3}, + + {"label":"F5", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + + {"label":"Ctrl", "x":2.25, "y":4, "w":1.25}, + {"label":"Win", "x":3.5, "y":4, "w":1.25}, + {"label":"Alt", "x":4.75, "y":4, "w":1.25}, + {"label":"Fn", "x":6, "y":4, "w":1.25}, + {"label":"Space", "x":7.25, "y":4, "w":2.25}, + + {"label":"Fn", "x":10.5, "y":4, "w":1.25}, + {"label":"Space", "x":11.75, "y":4, "w":1.5}, + {"label":"Alt", "x":13.25, "y":4}, + {"label":"Ctrl", "x":14.25, "y":4}, + {"label":"Left", "x":15.25, "y":4}, + {"label":"Down", "x":16.25, "y":4}, + {"label":"Right", "x":17.25, "y":4} + ] + }, + "LAYOUT_65_with_macro": { + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F6", "x":1, "y":0}, + + {"label":"Esc", "x":2.25, "y":0}, + {"label":"1", "x":3.25, "y":0}, + {"label":"2", "x":4.25, "y":0}, + {"label":"3", "x":5.25, "y":0}, + {"label":"4", "x":6.25, "y":0}, + {"label":"5", "x":7.25, "y":0}, + {"label":"6", "x":8.25, "y":0}, + + {"label":"7", "x":10.25, "y":0}, + {"label":"8", "x":11.25, "y":0}, + {"label":"9", "x":12.25, "y":0}, + {"label":"0", "x":13.25, "y":0}, + {"label":"-", "x":14.25, "y":0}, + {"label":"=", "x":15.25, "y":0}, + {"label":"=", "x":16.25, "y":0}, + {"label":"Bksp", "x":17.25, "y":0}, + {"label":"Home", "x":18.25, "y":0}, + + {"label":"F2", "x":0, "y":1}, + {"label":"F7", "x":1, "y":1}, + + {"label":"Tab", "x":2.25, "y":1, "w":1.5}, + {"label":"Q", "x":3.75, "y":1}, + {"label":"W", "x":4.75, "y":1}, + {"label":"E", "x":5.75, "y":1}, + {"label":"R", "x":6.75, "y":1}, + {"label":"T", "x":7.75, "y":1}, + + {"label":"Y", "x":9.75, "y":1}, + {"label":"U", "x":10.75, "y":1}, + {"label":"I", "x":11.75, "y":1}, + {"label":"O", "x":12.75, "y":1}, + {"label":"P", "x":13.75, "y":1}, + {"label":"{", "x":14.75, "y":1}, + {"label":"}", "x":15.75, "y":1}, + {"label":"|", "x":16.75, "y":1, "w":1.5}, + {"label":"PgUp", "x":18.25, "y":1}, + + {"label":"F3", "x":0, "y":2}, + {"label":"F8", "x":1, "y":2}, + + {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, + {"label":"A", "x":4, "y":2}, + {"label":"S", "x":5, "y":2}, + {"label":"D", "x":6, "y":2}, + {"label":"F", "x":7, "y":2}, + {"label":"G", "x":8, "y":2}, + + {"label":"H", "x":10, "y":2}, + {"label":"J", "x":11, "y":2}, + {"label":"K", "x":12, "y":2}, + {"label":"L", "x":13, "y":2}, + {"label":":", "x":14, "y":2}, + {"label":"\"", "x":15, "y":2}, + {"label":"Enter", "x":16, "y":2, "w":2.25}, + {"label":"PgDn", "x":18.25, "y":2}, + + {"label":"F4", "x":0, "y":3}, + {"label":"F9", "x":1, "y":3}, + + {"label":"Shift", "x":2.25, "y":3, "w":2.25}, + {"label":"Z", "x":4.5, "y":3}, + {"label":"X", "x":5.5, "y":3}, + {"label":"C", "x":6.5, "y":3}, + {"label":"V", "x":7.5, "y":3}, + {"label":"B", "x":8.5, "y":3}, + + {"label":"N", "x":10.5, "y":3}, + {"label":"M", "x":11.5, "y":3}, + {"label":",", "x":12.5, "y":3}, + {"label":".", "x":13.5, "y":3}, + {"label":"/", "x":14.5, "y":3}, + {"label":"Shift", "x":15.5, "y":3, "w":1.75}, + {"label":"Up", "x":17.25, "y":3}, + {"label":"End", "x":18.25, "y":3}, + + {"label":"F5", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + + {"label":"Ctrl", "x":2.25, "y":4, "w":1.25}, + {"label":"Win", "x":3.5, "y":4, "w":1.25}, + {"label":"Alt", "x":4.75, "y":4, "w":1.25}, + {"label":"Fn", "x":6, "y":4, "w":1.25}, + {"label":"Space", "x":7.25, "y":4, "w":2.25}, + + {"label":"Fn", "x":10.5, "y":4, "w":1.25}, + {"label":"Space", "x":11.75, "y":4, "w":1.5}, + {"label":"Alt", "x":13.25, "y":4}, + {"label":"Ctrl", "x":14.25, "y":4}, + {"label":"Win", "x":15.25, "y":4}, + {"label":"Left", "x":16.25, "y":4}, + {"label":"Down", "x":17.25, "y":4}, + {"label":"Right", "x":18.25, "y":4} + ] + } + } +} diff --git a/keyboards/keebio/quefrency/keymaps/bcat/config.h b/keyboards/keebio/quefrency/keymaps/bcat/config.h new file mode 100644 index 000000000000..c9e836597a24 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/bcat/config.h @@ -0,0 +1,22 @@ +#pragma once + +/* + * I2C seems to randomly drop keystrokes. Not sure why. It seems a bit like + * https://github.com/qmk/qmk_firmware/issues/5037, but that issue is closed, + * and our problems happen even with underglow disabled. + * + * This issue occurs with multiple TRRS cables of different lengths from + * different companies, so it's most likely not a cable issue. It may be that + * we are running into issues with long I2C runs, in which case stronger + * pull-up resistors might help: + * https://hackaday.com/2017/02/08/taking-the-leap-off-board-an-introduction-to-i2c-over-long-wires/. + * For now, just don't use I2C. + */ +#define USE_SERIAL + +/* Use an extra LED on the right side since it's wider on the 65% PCB. */ +#undef RGBLED_NUM +#define RGBLED_NUM 17 + +/* Set up RGB lighting so it works with either side as master. */ +#define RGBLED_SPLIT { 8, 9 } diff --git a/keyboards/keebio/quefrency/keymaps/bcat/keymap.c b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c new file mode 100644 index 000000000000..fc66ff101358 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/bcat/keymap.c @@ -0,0 +1,42 @@ +#include QMK_KEYBOARD_H + +enum layer { + LAYER_DEFAULT, + LAYER_FUNCTION, + LAYER_MOUSE, +}; + +/* Switch to function layer when held. */ +#define LY_FUNC MO(LAYER_FUNCTION) + +/* Switch to mouse layer when held; send menu key when tapped. */ +#define LY_MOUSE LT(LAYER_MOUSE, KC_APP) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default layer: http://www.keyboard-layout-editor.com/#/gists/60a262432bb340b37d364a4424f3037b */ + [LAYER_DEFAULT] = LAYOUT_65( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, LY_FUNC, KC_SPC, KC_SPC, XXXXXXX, KC_RALT, LY_FUNC, LY_MOUSE, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Function layer: http://www.keyboard-layout-editor.com/#/gists/59636898946da51f91fb290f8e078b4d */ + [LAYER_FUNCTION] = LAYOUT_65( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, RGB_HUI, + _______, KC_MPLY, KC_VOLU, KC_MSTP, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, RGB_SAI, + KC_CAPS, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAD, + _______, _______, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD + ), + + /* Mouse layer: http://www.keyboard-layout-editor.com/#/gists/05b9fbe8a34f65ed85ded659b3941152 */ + [LAYER_MOUSE] = LAYOUT_65( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_U, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_D, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN3, KC_BTN1, KC_MS_U, KC_BTN2, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), +}; diff --git a/keyboards/keebio/quefrency/keymaps/bcat/readme.md b/keyboards/keebio/quefrency/keymaps/bcat/readme.md new file mode 100644 index 000000000000..2e9e0f6d768c --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/bcat/readme.md @@ -0,0 +1,17 @@ +# bcat's Quefrency 65% layout + +This is pretty much a stock 65% split keyboard layout, with an HHKB-style +(split) backspace, media keys in the function layer centered around the WASD +cluster, and mouse keys on their own layer centered around the arrow cluster. + +## Default layer + +![Default layer layout](https://i.imgur.com/3riRFev.png) + +## Function layer + +![Function layer layout](https://i.imgur.com/4R1F72M.png) + +## Mouse layer + +![Mouse layer layout](https://i.imgur.com/LmGgJEG.png) diff --git a/keyboards/keebio/quefrency/keymaps/bcat/rules.mk b/keyboards/keebio/quefrency/keymaps/bcat/rules.mk new file mode 100644 index 000000000000..c87b447c1e3d --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/bcat/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = atmel-dfu # Elite-C diff --git a/keyboards/quefrency/keymaps/bjohnson/config.h b/keyboards/keebio/quefrency/keymaps/bjohnson/config.h similarity index 100% rename from keyboards/quefrency/keymaps/bjohnson/config.h rename to keyboards/keebio/quefrency/keymaps/bjohnson/config.h diff --git a/keyboards/quefrency/keymaps/bjohnson/keymap.c b/keyboards/keebio/quefrency/keymaps/bjohnson/keymap.c similarity index 100% rename from keyboards/quefrency/keymaps/bjohnson/keymap.c rename to keyboards/keebio/quefrency/keymaps/bjohnson/keymap.c diff --git a/keyboards/quefrency/keymaps/bjohnson/rules.mk b/keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk similarity index 100% rename from keyboards/quefrency/keymaps/bjohnson/rules.mk rename to keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk diff --git a/keyboards/quefrency/keymaps/bramver/README.md b/keyboards/keebio/quefrency/keymaps/bramver/README.md similarity index 100% rename from keyboards/quefrency/keymaps/bramver/README.md rename to keyboards/keebio/quefrency/keymaps/bramver/README.md diff --git a/keyboards/quefrency/keymaps/bramver/config.h b/keyboards/keebio/quefrency/keymaps/bramver/config.h similarity index 100% rename from keyboards/quefrency/keymaps/bramver/config.h rename to keyboards/keebio/quefrency/keymaps/bramver/config.h diff --git a/keyboards/quefrency/keymaps/bramver/keymap.c b/keyboards/keebio/quefrency/keymaps/bramver/keymap.c similarity index 98% rename from keyboards/quefrency/keymaps/bramver/keymap.c rename to keyboards/keebio/quefrency/keymaps/bramver/keymap.c index 527f5de04748..f995f9bfab4e 100644 --- a/keyboards/quefrency/keymaps/bramver/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bramver/keymap.c @@ -4,9 +4,6 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _BASE 0 #define _LMSE 1 #define _RMSE 2 @@ -100,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ , KC_WH_L , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_U , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \ _______ , KC_WH_R , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_D , _______ , _______ , _______ , _______ , _______ , _______ , _______ ,\ _______ , _______ , KC_PGDN , KC_PGUP , KC_END , KC_HOME , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \ - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), [_RMSE] = LAYOUT( @@ -108,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ , _______ , _______ , _______ , _______ , _______ , KC_WH_U , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_L , _______ , _______ , _______ , \ _______ , _______ , _______ , _______ , _______ , _______ , KC_WH_D , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_R , _______ , _______ ,\ _______ , _______ , _______ , _______ , _______ , _______ , KC_HOME , KC_END , KC_PGUP , KC_PGDN , _______ , _______ , _______ , \ - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), [_SYMB] = LAYOUT( @@ -116,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \ _______ , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , KC_LPRN , KC_RPRN , _______ , _______ ,\ _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \ - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), [_EMOJ] = LAYOUT( @@ -124,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ , X(CLAP) , X(CUM) , X(BNIS) , X(BUTT) , X(CAR) , X(FIRE) , X(REDB) , X(MONY) , X(HNDR) , X(SOS) , _______ , _______ , _______ , \ _______ , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , _______ , _______ ,\ _______ , X(TRIU) , X(SCRM) , X(VOMI) , X(DTIV) , X(EXPL) , X(HAIR) , X(DANC) , X(STRN) , X(LEFT) , X(RGHT) , _______ , _______ , \ - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), }; diff --git a/keyboards/quefrency/keymaps/bramver/rules.mk b/keyboards/keebio/quefrency/keymaps/bramver/rules.mk similarity index 100% rename from keyboards/quefrency/keymaps/bramver/rules.mk rename to keyboards/keebio/quefrency/keymaps/bramver/rules.mk diff --git a/keyboards/quefrency/keymaps/default/config.h b/keyboards/keebio/quefrency/keymaps/default/config.h similarity index 100% rename from keyboards/quefrency/keymaps/default/config.h rename to keyboards/keebio/quefrency/keymaps/default/config.h diff --git a/keyboards/quefrency/keymaps/default/keymap.c b/keyboards/keebio/quefrency/keymaps/default/keymap.c similarity index 97% rename from keyboards/quefrency/keymaps/default/keymap.c rename to keyboards/keebio/quefrency/keymaps/default/keymap.c index 964a997dd9d8..744a8d32a4eb 100644 --- a/keyboards/quefrency/keymaps/default/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default/keymap.c @@ -13,9 +13,6 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = 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_DEL, KC_BSPC, \ diff --git a/keyboards/quefrency/keymaps/default65/rules.mk b/keyboards/keebio/quefrency/keymaps/default/rules.mk similarity index 100% rename from keyboards/quefrency/keymaps/default65/rules.mk rename to keyboards/keebio/quefrency/keymaps/default/rules.mk diff --git a/keyboards/quefrency/keymaps/default65/config.h b/keyboards/keebio/quefrency/keymaps/default65/config.h similarity index 100% rename from keyboards/quefrency/keymaps/default65/config.h rename to keyboards/keebio/quefrency/keymaps/default65/config.h diff --git a/keyboards/quefrency/keymaps/default65/keymap.c b/keyboards/keebio/quefrency/keymaps/default65/keymap.c similarity index 97% rename from keyboards/quefrency/keymaps/default65/keymap.c rename to keyboards/keebio/quefrency/keymaps/default65/keymap.c index 4b07949b0694..3e77731671de 100644 --- a/keyboards/quefrency/keymaps/default65/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default65/keymap.c @@ -13,9 +13,6 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_65( 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_DEL, KC_BSPC, KC_HOME, \ diff --git a/keyboards/quefrency/rev1/rules.mk b/keyboards/keebio/quefrency/keymaps/default65/rules.mk similarity index 100% rename from keyboards/quefrency/rev1/rules.mk rename to keyboards/keebio/quefrency/keymaps/default65/rules.mk diff --git a/keyboards/quefrency/keymaps/default65macro/config.h b/keyboards/keebio/quefrency/keymaps/default65macro/config.h similarity index 100% rename from keyboards/quefrency/keymaps/default65macro/config.h rename to keyboards/keebio/quefrency/keymaps/default65macro/config.h diff --git a/keyboards/quefrency/keymaps/default65macro/keymap.c b/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c similarity index 97% rename from keyboards/quefrency/keymaps/default65macro/keymap.c rename to keyboards/keebio/quefrency/keymaps/default65macro/keymap.c index c7ac46ea5ad6..4503291d28f9 100644 --- a/keyboards/quefrency/keymaps/default65macro/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c @@ -13,9 +13,6 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_65_with_macro( KC_F1, KC_F2, 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_DEL, KC_BSPC, KC_HOME, \ diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/config.h b/keyboards/keebio/quefrency/keymaps/georgepetri/config.h new file mode 100644 index 000000000000..d72d7760ef97 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/georgepetri/config.h @@ -0,0 +1,24 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Danny Nguyen + +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 . +*/ + +#pragma once + +#define USE_I2C \ No newline at end of file diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c new file mode 100644 index 000000000000..f08ab4f83431 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c @@ -0,0 +1,44 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _BASE 0 +#define _FN1 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_65( +// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_BSLS, KC_END, \ +// ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤ + 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_PGUP,\ +// ├───────────────┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┐ └─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴───────────────────┼────────┤ + 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_PGDN,\ +// ├──────────┬──────────┴┬───────┴──┬─────┴─────┬──┴────────┴────────┤ ├────────┴────────┴────┬───┴────┬───┴────┬───┴────┬────────┬────────┼────────┤ + KC_LCTL, KC_LGUI, KC_LALT, MO(_FN1), KC_SPC, KC_SPC ,_______, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +// └──────────┴───────────┴──────────┴───────────┴────────────────────┘ └──────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ), + + [_FN1] = LAYOUT_65( +// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_DEL, KC_INS, \ +// ├────────┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┘ ┌───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS,\ +// ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ +// ├───────────────┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┐ └─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴───────────────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\ +// ├──────────┬──────────┴┬───────┴──┬─────┴─────┬──┴────────┴────────┤ ├────────┴────────┴────┬───┴────┬───┴────┬───┴────┬────────┬────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// └──────────┴───────────┴──────────┴───────────┴────────────────────┘ └──────────────────────┴────────┴────────┴────────┴────────┴────────┴────────┘ + ) +}; diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/readme.md b/keyboards/keebio/quefrency/keymaps/georgepetri/readme.md new file mode 100644 index 000000000000..425190d198d0 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/georgepetri/readme.md @@ -0,0 +1,48 @@ +# George Petri's Quefrency 65 layout + +``` +make keebio/quefrency:georgepetri +``` + +Based on the default querty layout with minor tweaks. +The position of the arrow keys in a line in the bottom right. +The backspace key is 1u and to the left of the delete key. +Grave, pause and insert are on the function layer. + +### Base Layer +``` +┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ +│ ESC ││ 1 ││ 2 ││ 3 ││ 4 ││ 5 ││ 6 │ │ 7 ││ 8 ││ 9 ││ 0 ││ MINS││ EQL ││ BSPC││ DEL ││ HOME│ +└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ +┌──────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────────┐┌──────┐ +│ TAB ││ Q ││ W ││ E ││ R ││ T │ │ Y ││ U ││ I ││ O ││ P ││ LBRC││ RBRC││ BSLS ││ END │ +└──────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────────┘└──────┘ +┌────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────┐┌──────┐ +│ CAPS ││ A ││ S ││ D ││ F ││ G │ │ H ││ J ││ K ││ L ││ SCLN││ QUOT││ ENT ││ PGUP│ +└────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└────────────────┘└──────┘ +┌────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────────┐┌──────┐ +│ LSFT ││ Z ││ X ││ C ││ V ││ B │ │ N ││ M ││ COMM││ DOT ││ SLSH││ RSFT ││ PGDN│ +└────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└────────────────────┘└──────┘ +┌────────┐┌────────┐┌────────┐┌────────┐┌────────────────┐ ┌────────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ +│ LCTL ││ LGUI ││ LALT ││MO(_FN1)││ SPC │ │ SPC ││ RALT││ RCTL││ LEFT││ DOWN││ UP ││ RGHT│ +└────────┘└────────┘└────────┘└────────┘└────────────────┘ └────────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ +``` + +### Function +``` +┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ +│ GRV ││ F1 ││ F2 ││ F3 ││ F4 ││ F5 ││ F6 │ │ F7 ││ F8 ││ F9 ││ F10 ││ F11 ││ F12 ││ BSPC││ DEL ││ INS │ +└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ +┌──────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────────┐┌──────┐ +│ ││ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ ││ ││ PAUS│ +└──────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────────┘└──────┘ +┌────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────┐┌──────┐ +│ ││ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ ││ │ +└────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└──────┘└────────────────┘└──────┘ +┌────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ ┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌────────────────────┐┌──────┐ +│ ││ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ │ +└────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘ └──────┘└──────┘└──────┘└──────┘└──────┘└────────────────────┘└──────┘ +┌────────┐┌────────┐┌────────┐┌────────┐┌────────────────┐ ┌────────────────────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐┌──────┐ +│ ││ ││ ││ ││ │ │ ││ ││ ││ ││ ││ ││ │ +└────────┘└────────┘└────────┘└────────┘└────────────────┘ └────────────────────┘└──────┘└──────┘└──────┘└──────┘└──────┘└──────┘ +``` \ No newline at end of file diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/rules.mk b/keyboards/keebio/quefrency/keymaps/georgepetri/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/keebio/quefrency/keymaps/kingwangwong/config.h b/keyboards/keebio/quefrency/keymaps/kingwangwong/config.h new file mode 100644 index 000000000000..bf632842e9cb --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/kingwangwong/config.h @@ -0,0 +1,31 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Danny Nguyen + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +//#define USE_I2C +#define USB_MAX_POWER_CONSUMPTION 50 + + +// #define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/keebio/quefrency/keymaps/kingwangwong/keymap.c b/keyboards/keebio/quefrency/keymaps/kingwangwong/keymap.c new file mode 100644 index 000000000000..7bdc115ab977 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/kingwangwong/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _FN1 +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐ ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ + * │ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ │ 7 │ 8 │ 9 │ 0 │ - │ = │BSLS │ DEL │ + * ├─────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┘ ┌──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴─────┤ + * │TAB │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ [ │ ] │BSPC │ + * ├────────┴┬────┴┬────┴┬────┴┬────┴┬────┴┐ └┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴────────┤ + * │CAPS │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ ; │ ' │ENTER │ + * ├─────────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┐ └──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴───────┬─────┤ + * │LSHFT │ Z │ X │ C │ V │ B │ │ N │ M │ , │ . │ / │RSHFT │ UP │ + * ├──────┬─────┴─┬───┴──┬──┴─────┴────┬┴─────┤ ├─────┴┬────┴────┬┴────┬┴────┬┴────┬─────┼─────┤ + * │LCTRL │L_GUI │L_ALT │SPC │FN1 │ │SPC │BSPC │R_ALT│R_CTR│LEFT │DOWN │RIGHT│ + * └──────┴───────┴──────┴─────────────┴──────┘ └──────┴─────────┴─────┴─────┴─────┴─────┴─────┘ + */ + [_BASE] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_BSPC, KC_BSPC, KC_RALT, KC_RCTL, KC_LEFT, KC_RGHT, KC_DOWN + ), + + [_FN1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_BSPC, + _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + + ) +}; diff --git a/keyboards/keebio/quefrency/keymaps/unausgeschlafen/config.h b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/config.h new file mode 100644 index 000000000000..f9efe78c5b56 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/config.h @@ -0,0 +1,27 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2018 Danny Nguyen + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C diff --git a/keyboards/keebio/quefrency/keymaps/unausgeschlafen/keymap.c b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/keymap.c new file mode 100644 index 000000000000..e42c8651cd0f --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/keymap.c @@ -0,0 +1,62 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _BASE 0 +#define _FN1 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Keymap _BL: (Base Layer) Default Layer + * +-------------------------------------------------------------------------+ + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP | + * +-------------------------------------------------------------------------+ + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * +-------------------------------------------------------------------------+ + * | FN | A | S | D | F | G | H | J | K | L | ; | ' | RETURN | + * +-------------------------------------------------------------------------+ + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | FN | + * +-------------------------------------------------------------------------+ + * |LALT|LMETA|RCTRL| SPACE | FN | SPACE | RALT| MENU| RWIN|RCTRL| + * +-------------------------------------------------------------------------+ + */ + + [_BASE] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_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, \ + MO(_FN1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN1), \ + KC_LALT, KC_LGUI, KC_LCTL, KC_SPC, MO(_FN1), KC_SPC, _______, KC_RALT, KC_APP, _______, KC_RGUI, KC_RCTL + ), + + /* Keymap _FL: Function Layer + * ,-----------------------------------------------------------. + * | ~ | F1| F2| F3| F4| F5| F6| F7| F8| F9| F0|F11|F12| DEL | + * |-----------------------------------------------------------| + * | | | UP| | MSL|MSD|MSU|MSR| | |PRT|PGD|PGU|PAUS | + * |-----------------------------------------------------------| + * | | LE| DN| RE| | | LE| DN| UP| RE| | | | + * |-----------------------------------------------------------| + * | |HOM|END| | |PRE|NXT|MUT|VOD|VOU| /|Shift | FN| + * |-----------------------------------------------------------| + * | | | | | PLAY | PLAY | | | | | + * `-----------------------------------------------------------' + */ + + [_FN1] = LAYOUT( + KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, \ + _______, _______, KC_UP, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, KC_PSCR, KC_PGUP, KC_PGDN, KC_PAUS, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, \ + _______, KC_HOME, KC_END, _______, _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, \ + _______, _______, _______, KC_MPLY, _______, KC_MPLY, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/keebio/quefrency/keymaps/unausgeschlafen/readme.md b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/readme.md new file mode 100644 index 000000000000..a8d0efed0c27 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/readme.md @@ -0,0 +1,26 @@ +## UNAUSGESCHLAFEN'S QUEFRENCY + +This is the keymap that goes with [unausgeschlafen's Quefrency](https://www.reddit.com/r/MechanicalKeyboards/comments/aquefb/my_daily_driver_quefrency/) + +If you are using Ardoinos, comment this line in `rules.mk`: +```make +BOOTLOADER = atmel-dfu # comment this line if you use arduinos +``` + +Although QMK offers one-shot build and flash, I personally build and flash separately (for the Elite C). +I used the QMK default for the Arduino Pro Micros. +However, I do not own them anymore. +Hence, only the instructions for the Elite C are provided. + +Build with: +```sh +make keebio/quefrency:unausgeschlafen +``` + +Flash with: + +```sh +sudo dfu-programmer atmega32u4 erase +sudo dfu-programmer atmega32u4 flash keebio_quefrency_rev1_unausgeschlafen.hex +sudo dfu-programmer atmega32u4 reset +``` diff --git a/keyboards/keebio/quefrency/keymaps/unausgeschlafen/rules.mk b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/rules.mk new file mode 100644 index 000000000000..98956243cd20 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = atmel-dfu # comment this line if you use arduinos diff --git a/keyboards/quefrency/quefrency.c b/keyboards/keebio/quefrency/quefrency.c similarity index 100% rename from keyboards/quefrency/quefrency.c rename to keyboards/keebio/quefrency/quefrency.c diff --git a/keyboards/quefrency/quefrency.h b/keyboards/keebio/quefrency/quefrency.h similarity index 92% rename from keyboards/quefrency/quefrency.h rename to keyboards/keebio/quefrency/quefrency.h index 7a791230df42..0c387a6d5def 100644 --- a/keyboards/quefrency/quefrency.h +++ b/keyboards/keebio/quefrency/quefrency.h @@ -1,9 +1,8 @@ -#ifndef QUEFRENCY_H -#define QUEFRENCY_H +#pragma once #include "quantum.h" -#ifdef KEYBOARD_quefrency_rev1 +#ifdef KEYBOARD_keebio_quefrency_rev1 #include "rev1.h" #endif @@ -20,4 +19,3 @@ KC_##LC1, KC_##LC2, KC_##LC3, KC_##LC4, KC_##LC5, KC_##LC6, KC_##RC1, KC_##RC3, KC_##RC4, KC_##RC5, KC_##RC6, KC_##RC7, \ KC_##LD1, KC_##LD2, KC_##LD3, KC_##LD4, KC_##LD5, KC_##RD1, KC_##RD4, KC_##RD5, KC_##RD6, KC_##RD7 \ ) -#endif diff --git a/keyboards/quefrency/readme.md b/keyboards/keebio/quefrency/readme.md similarity index 90% rename from keyboards/quefrency/readme.md rename to keyboards/keebio/quefrency/readme.md index 66d033b6b21c..3f0e7d98e70c 100644 --- a/keyboards/quefrency/readme.md +++ b/keyboards/keebio/quefrency/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io/) Make example for this keyboard (after setting up your build environment): - make quefrency/rev1:default + make keebio/quefrency/rev1:default Example of flashing this keyboard: - make quefrency/rev1:default:avrdude + make keebio/quefrency/rev1:default:avrdude Handedness detection is already hardwired onto the PCB, so no need to deal with `EE_HANDS` or flashing .eep files. diff --git a/keyboards/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h similarity index 87% rename from keyboards/quefrency/rev1/config.h rename to keyboards/keebio/quefrency/rev1/config.h index 4b95eea5091c..67cef6195b85 100644 --- a/keyboards/quefrency/rev1/config.h +++ b/keyboards/keebio/quefrency/rev1/config.h @@ -34,8 +34,10 @@ along with this program. If not, see . #define MATRIX_COLS 8 // wiring of each half -#define MATRIX_ROW_PINS { F4, D4, D7, E6, B4, B5 } -#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6, C6 } +#define MATRIX_ROW_PINS { F4, D4, D7, E6, B4, C6 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6, B5 } +#define MATRIX_ROW_PINS_RIGHT { F4, D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS_RIGHT { F5, F6, F7, B1, B3, B2, B6, C6 } #define SPLIT_HAND_PIN D2 /* Set 0 if debouncing isn't needed */ diff --git a/keyboards/quefrency/rev1/rev1.c b/keyboards/keebio/quefrency/rev1/rev1.c similarity index 100% rename from keyboards/quefrency/rev1/rev1.c rename to keyboards/keebio/quefrency/rev1/rev1.c diff --git a/keyboards/quefrency/rev1/rev1.h b/keyboards/keebio/quefrency/rev1/rev1.h similarity index 100% rename from keyboards/quefrency/rev1/rev1.h rename to keyboards/keebio/quefrency/rev1/rev1.h diff --git a/keyboards/keebio/quefrency/rev1/rules.mk b/keyboards/keebio/quefrency/rev1/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk similarity index 90% rename from keyboards/quefrency/rules.mk rename to keyboards/keebio/quefrency/rules.mk index 3ec04fbf1f3d..c28696c08e66 100644 --- a/keyboards/quefrency/rules.mk +++ b/keyboards/keebio/quefrency/rules.mk @@ -22,12 +22,10 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = yes -USE_I2C = yes +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = quefrency/rev1 +DEFAULT_FOLDER = keebio/quefrency/rev1 diff --git a/keyboards/rorschach/config.h b/keyboards/keebio/rorschach/config.h similarity index 92% rename from keyboards/rorschach/config.h rename to keyboards/keebio/rorschach/config.h index 03fde5399d20..769330e39997 100644 --- a/keyboards/rorschach/config.h +++ b/keyboards/keebio/rorschach/config.h @@ -15,9 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif // CONFIG_H diff --git a/keyboards/rorschach/info.json b/keyboards/keebio/rorschach/info.json similarity index 100% rename from keyboards/rorschach/info.json rename to keyboards/keebio/rorschach/info.json diff --git a/keyboards/rorschach/keymaps/default/config.h b/keyboards/keebio/rorschach/keymaps/default/config.h similarity index 91% rename from keyboards/rorschach/keymaps/default/config.h rename to keyboards/keebio/rorschach/keymaps/default/config.h index b6a94363235b..da32daebb3e7 100644 --- a/keyboards/rorschach/keymaps/default/config.h +++ b/keyboards/keebio/rorschach/keymaps/default/config.h @@ -17,11 +17,8 @@ along with this program. If not, see . #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/rorschach/keymaps/default/keymap.c b/keyboards/keebio/rorschach/keymaps/default/keymap.c similarity index 100% rename from keyboards/rorschach/keymaps/default/keymap.c rename to keyboards/keebio/rorschach/keymaps/default/keymap.c diff --git a/keyboards/rorschach/keymaps/insertsnideremarks/config.h b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h similarity index 94% rename from keyboards/rorschach/keymaps/insertsnideremarks/config.h rename to keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h index 2048232c9c3a..ed948a4b3bbe 100644 --- a/keyboards/rorschach/keymaps/insertsnideremarks/config.h +++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h @@ -12,7 +12,7 @@ #define EE_HANDS #define IGNORE_MOD_TAP_INTERRUPT -#define TAPPING_TERM 175 +#define TAPPING_TERM 150 #define TAPPING_TOGGLE 2 // #undef RGBLED_NUM diff --git a/keyboards/rorschach/keymaps/insertsnideremarks/keymap.c b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c similarity index 96% rename from keyboards/rorschach/keymaps/insertsnideremarks/keymap.c rename to keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c index 5d93e2f05796..e345ce4a3837 100644 --- a/keyboards/rorschach/keymaps/insertsnideremarks/keymap.c +++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c @@ -28,9 +28,6 @@ enum rorschach_keycodes { NKROTG = MAGIC_TOGGLE_NKRO, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - //Tap Dance Declarations enum { ADJ = 0, @@ -60,7 +57,7 @@ void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { -[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer [LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap [RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap [EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap @@ -86,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ins | ` | [ | ] |App/Alt| Spc/FN| |Bsp/Fn2| RGUI | Left | Down | Up | Right | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | Ent/NS| Bspc | | Enter |Del/NS2| -* `---------------' `---------------' +* `---------------' `---------------' */ [_COLEMAK] = LAYOUT( KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, @@ -95,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ENTNS, KC_BSPC, KC_ENT, DELNS ), - + /* QWERTY * (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) * ,-----------------------------------------------. ,-----------------------------------------------. @@ -108,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ins | ` | [ | ] |App/Alt| Spc/FN| |Bsp/Fn2| RGUI | Left | Down | Up | Right | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | Ent/NS| Bspc | | Enter |Del/NS2| -* `---------------' `---------------' +* `---------------' `---------------' */ [_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, @@ -130,15 +127,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ( | ) | [ { | ] } | | | | | | | | | | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | | | -* `---------------' `---------------' +* `---------------' `---------------' */ [_NUMBERS] = LAYOUT( - _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______, KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), +), /* Number/Function Key layer * (Multiple characters: single-tap for first, double-tap for second) @@ -152,15 +149,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ( | ) | [ { | ] } | | | | | | | | | | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | | | -* `---------------' `---------------' +* `---------------' `---------------' */ [_NUMBERS2] = LAYOUT( - _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______, KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), +), /* Function layer * ,-----------------------------------------------. ,-----------------------------------------------. @@ -173,23 +170,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | Prev | Play | Next | Stop | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | | | -* `---------------' `---------------' +* `---------------' `---------------' */ [_FUNCTION] = LAYOUT( - _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, + _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, _______, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, LCA(KC_TAB), KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, _______, _______, _______, _______ -), +), [_FUNCTION2] = LAYOUT( - _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, + _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, _______, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, LCA(KC_TAB), KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, _______, _______, _______, _______ -), +), /* Numpad layer * (Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) @@ -203,11 +200,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ( | ) | [ { | ] } | | | | | KP 0 | = | KP . | KP + | | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | KP Ent| | -* `---------------' `---------------' +* `---------------' `---------------' */ [_NUMPAD] = LAYOUT( - _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, - _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_TAB, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, + _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_TAB, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______, KC_NLCK, KC_PDOT, TD(PSLPAS), TD(PMNUN), TD(PPLEQ), _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, KC_P0, KC_EQL, KC_PDOT, KC_PPLS, _______, _______, _______, KC_PENT, _______ @@ -225,40 +222,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | | | -* `---------------' `---------------' +* `---------------' `---------------' */ [_ADJUST] = LAYOUT( - _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), +), [_ADJUST2] = LAYOUT( - _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) - + }; uint32_t layer_state_set_user(uint32_t state) { return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); } -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case COLEMAK: if (record->event.pressed) { - persistent_default_layer_set(1UL << _COLEMAK); + default_layer_set(1UL << _COLEMAK); layer_off ( _QWERTY); layer_off ( _NUMBERS); layer_off ( _NUMBERS2); @@ -272,7 +264,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case QWERTY: if (record->event.pressed) { - persistent_default_layer_set(1UL << _QWERTY); + default_layer_set(1UL << _QWERTY); layer_off ( _COLEMAK); layer_off ( _NUMBERS); layer_off ( _NUMBERS2); @@ -286,4 +278,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk new file mode 100644 index 000000000000..cf63c44f4f0d --- /dev/null +++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk @@ -0,0 +1,19 @@ +# 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 +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes # Enable Tap Dancing function diff --git a/keyboards/rorschach/readme.md b/keyboards/keebio/rorschach/readme.md similarity index 89% rename from keyboards/rorschach/readme.md rename to keyboards/keebio/rorschach/readme.md index 8858b72144c5..1a623a535310 100644 --- a/keyboards/rorschach/readme.md +++ b/keyboards/keebio/rorschach/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make rorschach/rev1:default + make keebio/rorschach/rev1:default Example of flashing this keyboard: - make rorschach/rev1:default:avrdude + make keebio/rorschach/rev1:default:avrdude 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. diff --git a/keyboards/rorschach/rev1/config.h b/keyboards/keebio/rorschach/rev1/config.h similarity index 98% rename from keyboards/rorschach/rev1/config.h rename to keyboards/keebio/rorschach/rev1/config.h index 0ec9cdb31e0f..13402544f8b9 100644 --- a/keyboards/rorschach/rev1/config.h +++ b/keyboards/keebio/rorschach/rev1/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_CONFIG_H /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1246 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio diff --git a/keyboards/rorschach/rev1/rev1.c b/keyboards/keebio/rorschach/rev1/rev1.c similarity index 100% rename from keyboards/rorschach/rev1/rev1.c rename to keyboards/keebio/rorschach/rev1/rev1.c diff --git a/keyboards/rorschach/rev1/rev1.h b/keyboards/keebio/rorschach/rev1/rev1.h similarity index 100% rename from keyboards/rorschach/rev1/rev1.h rename to keyboards/keebio/rorschach/rev1/rev1.h diff --git a/keyboards/nyquist/rev2/rules.mk b/keyboards/keebio/rorschach/rev1/rules.mk similarity index 100% rename from keyboards/nyquist/rev2/rules.mk rename to keyboards/keebio/rorschach/rev1/rules.mk diff --git a/keyboards/rorschach/rorschach.c b/keyboards/keebio/rorschach/rorschach.c similarity index 100% rename from keyboards/rorschach/rorschach.c rename to keyboards/keebio/rorschach/rorschach.c diff --git a/keyboards/rorschach/rorschach.h b/keyboards/keebio/rorschach/rorschach.h similarity index 96% rename from keyboards/rorschach/rorschach.h rename to keyboards/keebio/rorschach/rorschach.h index 5c320b6a1265..45e64587f455 100644 --- a/keyboards/rorschach/rorschach.h +++ b/keyboards/keebio/rorschach/rorschach.h @@ -1,6 +1,6 @@ #pragma once -#ifdef KEYBOARD_rorschach_rev1 +#ifdef KEYBOARD_keebio_rorschach_rev1 #include "rev1.h" #endif diff --git a/keyboards/rorschach/rules.mk b/keyboards/keebio/rorschach/rules.mk similarity index 91% rename from keyboards/rorschach/rules.mk rename to keyboards/keebio/rorschach/rules.mk index 32012534871e..b50074052279 100644 --- a/keyboards/rorschach/rules.mk +++ b/keyboards/keebio/rorschach/rules.mk @@ -17,10 +17,10 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = rorschach/rev1 +DEFAULT_FOLDER = keebio/rorschach/rev1 diff --git a/keyboards/tragicforce68/README.md b/keyboards/keebio/tragicforce68/README.md similarity index 87% rename from keyboards/tragicforce68/README.md rename to keyboards/keebio/tragicforce68/README.md index 7cca1b50551a..c3ea92d7ad87 100644 --- a/keyboards/tragicforce68/README.md +++ b/keyboards/keebio/tragicforce68/README.md @@ -9,10 +9,10 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make tragicforce68:default + make keebio/tragicforce68:default Example of flashing this keyboard: - make tragicforce68:default:avrdude + make keebio/tragicforce68:default:avrdude 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. diff --git a/keyboards/tragicforce68/config.h b/keyboards/keebio/tragicforce68/config.h similarity index 96% rename from keyboards/tragicforce68/config.h rename to keyboards/keebio/tragicforce68/config.h index 2a7f3de0f21d..b415b5d714c6 100644 --- a/keyboards/tragicforce68/config.h +++ b/keyboards/keebio/tragicforce68/config.h @@ -15,13 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x0510 #define DEVICE_VER 0x0101 #define MANUFACTURER Keebio @@ -60,5 +59,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#endif diff --git a/keyboards/tragicforce68/info.json b/keyboards/keebio/tragicforce68/info.json similarity index 100% rename from keyboards/tragicforce68/info.json rename to keyboards/keebio/tragicforce68/info.json diff --git a/keyboards/tragicforce68/keymaps/buswerks/keymap.c b/keyboards/keebio/tragicforce68/keymaps/buswerks/keymap.c similarity index 100% rename from keyboards/tragicforce68/keymaps/buswerks/keymap.c rename to keyboards/keebio/tragicforce68/keymaps/buswerks/keymap.c diff --git a/keyboards/tragicforce68/keymaps/default/keymap.c b/keyboards/keebio/tragicforce68/keymaps/default/keymap.c similarity index 100% rename from keyboards/tragicforce68/keymaps/default/keymap.c rename to keyboards/keebio/tragicforce68/keymaps/default/keymap.c diff --git a/keyboards/tragicforce68/rules.mk b/keyboards/keebio/tragicforce68/rules.mk similarity index 100% rename from keyboards/tragicforce68/rules.mk rename to keyboards/keebio/tragicforce68/rules.mk diff --git a/keyboards/tragicforce68/tragicforce68.c b/keyboards/keebio/tragicforce68/tragicforce68.c similarity index 100% rename from keyboards/tragicforce68/tragicforce68.c rename to keyboards/keebio/tragicforce68/tragicforce68.c diff --git a/keyboards/tragicforce68/tragicforce68.h b/keyboards/keebio/tragicforce68/tragicforce68.h similarity index 100% rename from keyboards/tragicforce68/tragicforce68.h rename to keyboards/keebio/tragicforce68/tragicforce68.h diff --git a/keyboards/viterbi/config.h b/keyboards/keebio/viterbi/config.h similarity index 92% rename from keyboards/viterbi/config.h rename to keyboards/keebio/viterbi/config.h index 27a7d9e1a572..b628c83c8553 100644 --- a/keyboards/viterbi/config.h +++ b/keyboards/keebio/viterbi/config.h @@ -15,9 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif // CONFIG_H diff --git a/keyboards/viterbi/keymaps/hexwire/README.md b/keyboards/keebio/viterbi/keymaps/bakingpy/README.md similarity index 100% rename from keyboards/viterbi/keymaps/hexwire/README.md rename to keyboards/keebio/viterbi/keymaps/bakingpy/README.md diff --git a/keyboards/keebio/viterbi/keymaps/bakingpy/config.h b/keyboards/keebio/viterbi/keymaps/bakingpy/config.h new file mode 100644 index 000000000000..7d01468e8deb --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/bakingpy/config.h @@ -0,0 +1,33 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_TERM 150 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/viterbi/keymaps/hexwire/keymap.c b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c similarity index 99% rename from keyboards/viterbi/keymaps/hexwire/keymap.c rename to keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c index 2050c037933f..f0122bef05a8 100644 --- a/keyboards/viterbi/keymaps/hexwire/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c @@ -1,6 +1,4 @@ -#include "viterbi.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -25,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/viterbi/keymaps/fido/rules.mk b/keyboards/keebio/viterbi/keymaps/bakingpy/rules.mk similarity index 100% rename from keyboards/viterbi/keymaps/fido/rules.mk rename to keyboards/keebio/viterbi/keymaps/bakingpy/rules.mk diff --git a/keyboards/viterbi/keymaps/default/config.h b/keyboards/keebio/viterbi/keymaps/default/config.h similarity index 100% rename from keyboards/viterbi/keymaps/default/config.h rename to keyboards/keebio/viterbi/keymaps/default/config.h diff --git a/keyboards/viterbi/keymaps/default/keymap.c b/keyboards/keebio/viterbi/keymaps/default/keymap.c similarity index 60% rename from keyboards/viterbi/keymaps/default/keymap.c rename to keyboards/keebio/viterbi/keymaps/default/keymap.c index 3db912f6ae28..c4ae0a5987d6 100644 --- a/keyboards/viterbi/keymaps/default/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/default/keymap.c @@ -18,13 +18,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO -#define KC_AJST ADJUST -#define KC_LOWR LOWER -#define KC_RASE RAISE const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -41,18 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Pg Dn|Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up | Right| \ | * `------------------------------------------------' `------------------------------------------------' */ - [_QWERTY] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - INS, GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,DEL , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - MINS,TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - EQL, ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,ENT , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - PGUP,LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,HOME,END , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - PGDN,AJST,LCTL,LALT,LGUI,LOWR,SPC , SPC ,RASE,LEFT,DOWN, UP ,RGHT,BSLS - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + [_QWERTY] = LAYOUT_ortho_5x14( + KC_INS, 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_MINS, 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_EQL, 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_ENT , + KC_PGUP, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_HOME, KC_END , + KC_PGDN, ADJUST , KC_LCTL, KC_LALT, KC_LGUI, LOWER , KC_SPC , KC_SPC , RAISE , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_BSLS ), /* Lower @@ -68,18 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | Next | Vol- | Vol+ | Play | | * `------------------------------------------------' `------------------------------------------------' */ - [_LOWER] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - ,TILD, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - UNDS, ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,LCBR,RCBR, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - PLUS, , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR, , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , F7 , F8 , F9 ,F10 ,F11 , F12 , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , ,MNXT,VOLD,VOLU,MPLY,MUTE - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + [_LOWER] = LAYOUT_ortho_5x14( + _______, KC_TILD, 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_UNDS, _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, + KC_PLUS, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, + _______, _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE ), /* Raise @@ -95,47 +76,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | Next | Vol- | Vol+ | Play | | * `------------------------------------------------' `------------------------------------------------' */ - [_RAISE] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - ,TILD, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - UNDS, , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,LCBR,RCBR, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - PLUS, , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC, , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , ,MNXT,VOLD,VOLU,MPLY,MUTE - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + [_RAISE] = LAYOUT_ortho_5x14( + _______, KC_TILD, 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_UNDS, _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_LCBR, KC_RCBR, + KC_PLUS, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, _______, _______, + _______, _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_NUHS, KC_NUBS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE ), - [_ADJUST] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, \ - _______, _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, _______, \ - _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + [_ADJUST] = LAYOUT_ortho_5x14( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, _______, + _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -#endif - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; diff --git a/keyboards/viterbi/keymaps/hexwire/rules.mk b/keyboards/keebio/viterbi/keymaps/default/rules.mk similarity index 100% rename from keyboards/viterbi/keymaps/hexwire/rules.mk rename to keyboards/keebio/viterbi/keymaps/default/rules.mk diff --git a/keyboards/viterbi/keymaps/drashna/config.h b/keyboards/keebio/viterbi/keymaps/drashna/config.h similarity index 53% rename from keyboards/viterbi/keymaps/drashna/config.h rename to keyboards/keebio/viterbi/keymaps/drashna/config.h index 6eb871a50fa3..201c02e4199b 100644 --- a/keyboards/viterbi/keymaps/drashna/config.h +++ b/keyboards/keebio/viterbi/keymaps/drashna/config.h @@ -17,42 +17,31 @@ along with this program. If not, see . #pragma once -#ifdef RGBLIGHT_ENABLE -#undef RGBLED_NUM -#define RGBLED_NUM 16 +#undef MATRIX_ROWS +#define MATRIX_ROWS 5 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +#ifdef RGBLIGHT_ENABLE +# undef RGBLED_NUM +# define RGBLED_NUM 16 + +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 #endif // RGBLIGHT_ENABLE -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION #undef PRODUCT #define PRODUCT Drashnas Viterbi Macro Pad -#define USE_I2C - #ifdef AUDIO_ENABLE -#define C6_AUDIO -#define NO_MUSIC_MODE +# define C6_AUDIO +# define NO_MUSIC_MODE #endif -#define STRICT_LAYER_RELEASE - #define LAYOUT_ortho_5x7( \ L00, L01, L02, L03, L04, L05, L06, \ L10, L11, L12, L13, L14, L15, L16, \ @@ -60,13 +49,13 @@ along with this program. If not, see . L30, L31, L32, L33, L34, L35, L36, \ L40, L41, L42, L43, L44, L45, L46 \ ) \ - LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ - ) + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + } #define QMK_ESC_OUTPUT F5 // usually COL #define QMK_ESC_INPUT D4 // usually ROW diff --git a/keyboards/viterbi/keymaps/drashna/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c similarity index 98% rename from keyboards/viterbi/keymaps/drashna/keymap.c rename to keyboards/keebio/viterbi/keymaps/drashna/keymap.c index 9ca14961be56..1afc59fb90d9 100644 --- a/keyboards/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c @@ -10,9 +10,6 @@ extern keymap_config_t keymap_config; // Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define LMACRO OSL(_MACROS) #define DIABLO TG(_DIABLO) #define GAMEPAD TG(_GAMEPAD) diff --git a/keyboards/viterbi/keymaps/drashna/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk similarity index 94% rename from keyboards/viterbi/keymaps/drashna/rules.mk rename to keyboards/keebio/viterbi/keymaps/drashna/rules.mk index ec3befc0b73d..f42e065d51ed 100644 --- a/keyboards/viterbi/keymaps/drashna/rules.mk +++ b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk @@ -7,12 +7,13 @@ TAP_DANCE_ENABLE = no RGBLIGHT_ENABLE = yes AUDIO_ENABLE = yes NKRO_ENABLE = yes +SPLIT_KEYBOARD = no +SPACE_CADET_ENABLE = no NO_SECRETS = yes MACROS_ENABLED = yes INDICATOR_LIGHTS = no RGBLIGHT_TWINKLE = no - LAYOUTS = ortho_5x7 # SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC)) diff --git a/keyboards/keebio/viterbi/keymaps/drashna_old/config.h b/keyboards/keebio/viterbi/keymaps/drashna_old/config.h new file mode 100644 index 000000000000..5697f7f11090 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/drashna_old/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +#include "../drashna/config.h" + +#ifdef RGBLIGHT_ENABLE +# undef RGBLED_NUM +# define RGBLED_NUM 12 +#endif diff --git a/keyboards/viterbi/keymaps/drashna_old/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna_old/keymap.c similarity index 100% rename from keyboards/viterbi/keymaps/drashna_old/keymap.c rename to keyboards/keebio/viterbi/keymaps/drashna_old/keymap.c diff --git a/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk new file mode 100644 index 000000000000..73f37c6c558b --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk @@ -0,0 +1,4 @@ +USER_NAME := drashna +SRC += ../drashna/keymap.c + +include $(KEYBOARD_PATH_2)/keymaps/drashna/rules.mk diff --git a/keyboards/viterbi/keymaps/dwallace/config.h b/keyboards/keebio/viterbi/keymaps/dwallace/config.h similarity index 100% rename from keyboards/viterbi/keymaps/dwallace/config.h rename to keyboards/keebio/viterbi/keymaps/dwallace/config.h diff --git a/keyboards/viterbi/keymaps/dwallace/keymap.c b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c similarity index 99% rename from keyboards/viterbi/keymaps/dwallace/keymap.c rename to keyboards/keebio/viterbi/keymaps/dwallace/keymap.c index 24102448287f..5a797cb0bd0c 100644 --- a/keyboards/viterbi/keymaps/dwallace/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c @@ -23,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_SWIN LGUI(KC_TILD) // Switch between windows #define KC_SAPP LGUI(KC_TAB) // Switch between applications diff --git a/keyboards/viterbi/keymaps/mike808/rules.mk b/keyboards/keebio/viterbi/keymaps/dwallace/rules.mk similarity index 100% rename from keyboards/viterbi/keymaps/mike808/rules.mk rename to keyboards/keebio/viterbi/keymaps/dwallace/rules.mk diff --git a/keyboards/viterbi/keymaps/fido/config.h b/keyboards/keebio/viterbi/keymaps/fido/config.h similarity index 100% rename from keyboards/viterbi/keymaps/fido/config.h rename to keyboards/keebio/viterbi/keymaps/fido/config.h diff --git a/keyboards/viterbi/keymaps/fido/keymap.c b/keyboards/keebio/viterbi/keymaps/fido/keymap.c similarity index 99% rename from keyboards/viterbi/keymaps/fido/keymap.c rename to keyboards/keebio/viterbi/keymaps/fido/keymap.c index b8ef4600824c..cd6c8d087f1a 100644 --- a/keyboards/viterbi/keymaps/fido/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/fido/keymap.c @@ -11,7 +11,6 @@ extern keymap_config_t keymap_config; #define _FN 1 #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_FN1 MO(_FN) #define KC_WD_L LCTL(KC_LEFT) diff --git a/keyboards/keebio/viterbi/keymaps/fido/rules.mk b/keyboards/keebio/viterbi/keymaps/fido/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/fido/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/viterbi/keymaps/mike808/config.h b/keyboards/keebio/viterbi/keymaps/mike808/config.h similarity index 100% rename from keyboards/viterbi/keymaps/mike808/config.h rename to keyboards/keebio/viterbi/keymaps/mike808/config.h diff --git a/keyboards/viterbi/keymaps/mike808/keymap.c b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c similarity index 99% rename from keyboards/viterbi/keymaps/mike808/keymap.c rename to keyboards/keebio/viterbi/keymaps/mike808/keymap.c index c7e48b135c50..e1dc91d2b2b2 100644 --- a/keyboards/viterbi/keymaps/mike808/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c @@ -11,7 +11,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_DVOR DVORAK #define KC_QWER QWERTY @@ -84,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| , ,PERC,CIRC,LBRC,RBRC,TILD, AMPR, P1 , P2 , P3 ,SLSH, , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , ,PDOT, P0 ,EQL , , + , , , , , , , , ,PDOT, P0 ,EQL , , //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' ), @@ -98,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| , , , , , , , , , , , , , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , ,BTN1,BTN2, , , , , , , , + , , , ,BTN1,BTN2, , , , , , , , //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' ) }; diff --git a/keyboards/keebio/viterbi/keymaps/mike808/rules.mk b/keyboards/keebio/viterbi/keymaps/mike808/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/mike808/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/viterbi/readme.md b/keyboards/keebio/viterbi/readme.md similarity index 88% rename from keyboards/viterbi/readme.md rename to keyboards/keebio/viterbi/readme.md index 9aad7896b70c..2e475100b6fb 100644 --- a/keyboards/viterbi/readme.md +++ b/keyboards/keebio/viterbi/readme.md @@ -9,12 +9,12 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make viterbi/rev1:default + make keebio/viterbi/rev1:default Example of flashing this keyboard: - make viterbi/rev1:default:avrdude + make keebio/viterbi/rev1:default:avrdude 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. diff --git a/keyboards/viterbi/rev1/config.h b/keyboards/keebio/viterbi/rev1/config.h similarity index 96% rename from keyboards/viterbi/rev1/config.h rename to keyboards/keebio/viterbi/rev1/config.h index 3b5e8fe665e1..e6fc13abdacb 100644 --- a/keyboards/viterbi/rev1/config.h +++ b/keyboards/keebio/viterbi/rev1/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "config_common.h" @@ -52,5 +51,3 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 #define RGBLED_NUM 14 - -#endif diff --git a/keyboards/viterbi/rev2/rev2.c b/keyboards/keebio/viterbi/rev1/rev1.c similarity index 100% rename from keyboards/viterbi/rev2/rev2.c rename to keyboards/keebio/viterbi/rev1/rev1.c diff --git a/keyboards/viterbi/rev1/rev1.h b/keyboards/keebio/viterbi/rev1/rev1.h similarity index 95% rename from keyboards/viterbi/rev1/rev1.h rename to keyboards/keebio/viterbi/rev1/rev1.h index 9c03e495a9f0..f31373f02e05 100644 --- a/keyboards/viterbi/rev1/rev1.h +++ b/keyboards/keebio/viterbi/rev1/rev1.h @@ -1,9 +1,6 @@ -#ifndef REV1_H -#define REV1_H +#pragma once -#include "../viterbi.h" - -//void promicro_bootloader_jmp(bool program); +#include "viterbi.h" #include "quantum.h" @@ -64,5 +61,3 @@ #endif #define LAYOUT_ortho_5x14 LAYOUT - -#endif diff --git a/keyboards/viterbi/rev1/rules.mk b/keyboards/keebio/viterbi/rev1/rules.mk similarity index 100% rename from keyboards/viterbi/rev1/rules.mk rename to keyboards/keebio/viterbi/rev1/rules.mk diff --git a/keyboards/viterbi/rev2/config.h b/keyboards/keebio/viterbi/rev2/config.h similarity index 99% rename from keyboards/viterbi/rev2/config.h rename to keyboards/keebio/viterbi/rev2/config.h index 01a0bfa047ac..b2970610e2b3 100644 --- a/keyboards/viterbi/rev2/config.h +++ b/keyboards/keebio/viterbi/rev2/config.h @@ -17,7 +17,6 @@ along with this program. If not, see . #pragma once - /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1157 diff --git a/keyboards/viterbi/viterbi.c b/keyboards/keebio/viterbi/rev2/rev2.c similarity index 100% rename from keyboards/viterbi/viterbi.c rename to keyboards/keebio/viterbi/rev2/rev2.c diff --git a/keyboards/viterbi/rev2/rev2.h b/keyboards/keebio/viterbi/rev2/rev2.h similarity index 100% rename from keyboards/viterbi/rev2/rev2.h rename to keyboards/keebio/viterbi/rev2/rev2.h diff --git a/keyboards/viterbi/rev2/rules.mk b/keyboards/keebio/viterbi/rev2/rules.mk similarity index 100% rename from keyboards/viterbi/rev2/rules.mk rename to keyboards/keebio/viterbi/rev2/rules.mk diff --git a/keyboards/viterbi/rules.mk b/keyboards/keebio/viterbi/rules.mk similarity index 97% rename from keyboards/viterbi/rules.mk rename to keyboards/keebio/viterbi/rules.mk index 1aa4314f490d..811f57fdbcb0 100644 --- a/keyboards/viterbi/rules.mk +++ b/keyboards/keebio/viterbi/rules.mk @@ -28,5 +28,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = viterbi/rev2 +DEFAULT_FOLDER = keebio/viterbi/rev2 LAYOUTS = ortho_5x14 diff --git a/keyboards/keebio/viterbi/viterbi.c b/keyboards/keebio/viterbi/viterbi.c new file mode 100644 index 000000000000..509e42dc515d --- /dev/null +++ b/keyboards/keebio/viterbi/viterbi.c @@ -0,0 +1 @@ +#include "viterbi.h" diff --git a/keyboards/viterbi/viterbi.h b/keyboards/keebio/viterbi/viterbi.h similarity index 95% rename from keyboards/viterbi/viterbi.h rename to keyboards/keebio/viterbi/viterbi.h index b19f33154bb8..186892d57a9f 100644 --- a/keyboards/viterbi/viterbi.h +++ b/keyboards/keebio/viterbi/viterbi.h @@ -2,9 +2,9 @@ #include "quantum.h" -#ifdef KEYBOARD_viterbi_rev1 +#ifdef KEYBOARD_keebio_viterbi_rev1 #include "rev1.h" -#elif KEYBOARD_viterbi_rev2 +#elif KEYBOARD_keebio_viterbi_rev2 #include "rev2.h" #endif diff --git a/keyboards/wavelet/config.h b/keyboards/keebio/wavelet/config.h similarity index 97% rename from keyboards/wavelet/config.h rename to keyboards/keebio/wavelet/config.h index eed2b7944de1..5610bba17b1a 100644 --- a/keyboards/wavelet/config.h +++ b/keyboards/keebio/wavelet/config.h @@ -17,8 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -48,11 +47,8 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - #define RGBLED_NUM 12 // Number of LEDs /* Backlight LEDs */ #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 7 - -#endif diff --git a/keyboards/wavelet/info.json b/keyboards/keebio/wavelet/info.json similarity index 100% rename from keyboards/wavelet/info.json rename to keyboards/keebio/wavelet/info.json diff --git a/keyboards/levinson/keymaps/default/keymap.c b/keyboards/keebio/wavelet/keymaps/default/keymap.c similarity index 99% rename from keyboards/levinson/keymaps/default/keymap.c rename to keyboards/keebio/wavelet/keymaps/default/keymap.c index dac8068a42a3..abf253380b2e 100644 --- a/keyboards/levinson/keymaps/default/keymap.c +++ b/keyboards/keebio/wavelet/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/wavelet/keymaps/default/rules.mk b/keyboards/keebio/wavelet/keymaps/default/rules.mk similarity index 100% rename from keyboards/wavelet/keymaps/default/rules.mk rename to keyboards/keebio/wavelet/keymaps/default/rules.mk diff --git a/keyboards/wavelet/readme.md b/keyboards/keebio/wavelet/readme.md similarity index 90% rename from keyboards/wavelet/readme.md rename to keyboards/keebio/wavelet/readme.md index 90c5ac808995..a107289bb418 100644 --- a/keyboards/wavelet/readme.md +++ b/keyboards/keebio/wavelet/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make wavelet:default + make keebio/wavelet:default Example of flashing this keyboard: - make wavelet:default:avrdude + make keebio/wavelet:default:avrdude 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. diff --git a/keyboards/wavelet/rules.mk b/keyboards/keebio/wavelet/rules.mk similarity index 100% rename from keyboards/wavelet/rules.mk rename to keyboards/keebio/wavelet/rules.mk diff --git a/keyboards/wavelet/wavelet.c b/keyboards/keebio/wavelet/wavelet.c similarity index 100% rename from keyboards/wavelet/wavelet.c rename to keyboards/keebio/wavelet/wavelet.c diff --git a/keyboards/wavelet/wavelet.h b/keyboards/keebio/wavelet/wavelet.h similarity index 100% rename from keyboards/wavelet/wavelet.h rename to keyboards/keebio/wavelet/wavelet.h diff --git a/keyboards/keycapsss/o4l_5x12/config.h b/keyboards/keycapsss/o4l_5x12/config.h new file mode 100644 index 000000000000..b53e372d0e59 --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/config.h @@ -0,0 +1,43 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7983 +#define PRODUCT_ID 0x0512 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Keycapsss +#define PRODUCT O4L:5x12 +#define DESCRIPTION A 60 key ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { B5, B4, E6, D7, C6, D4, D0, D1, D2, F6, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* WS2812 RGB LED */ +#define RGB_DI_PIN D3 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_HUE_STEP 4 +#define RGBLIGHT_SAT_STEP 4 +#define RGBLIGHT_VAL_STEP 4 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 diff --git a/keyboards/keycapsss/o4l_5x12/info.json b/keyboards/keycapsss/o4l_5x12/info.json new file mode 100644 index 000000000000..7dba0dab56e8 --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/info.json @@ -0,0 +1,202 @@ +{ + "keyboard_name": "O4L 5x12", + "keyboard_folder": "keycapsss/o4l_5x12", + "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/keycapsss/o4l_5x12", + "maintainer": "BenRoe", + "width": 12, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x12": { + "key_count": 60, + "layout": [ + {"w": 1, "x": 0, "y": 0}, + {"w": 1, "x": 1, "y": 0}, + {"w": 1, "x": 2, "y": 0}, + {"w": 1, "x": 3, "y": 0}, + {"w": 1, "x": 4, "y": 0}, + {"w": 1, "x": 5, "y": 0}, + {"w": 1, "x": 6, "y": 0}, + {"w": 1, "x": 7, "y": 0}, + {"w": 1, "x": 8, "y": 0}, + {"w": 1, "x": 9, "y": 0}, + {"w": 1, "x": 10, "y": 0}, + {"w": 1, "x": 11, "y": 0}, + {"w": 1, "x": 0, "y": 1}, + {"w": 1, "x": 1, "y": 1}, + {"w": 1, "x": 2, "y": 1}, + {"w": 1, "x": 3, "y": 1}, + {"w": 1, "x": 4, "y": 1}, + {"w": 1, "x": 5, "y": 1}, + {"w": 1, "x": 6, "y": 1}, + {"w": 1, "x": 7, "y": 1}, + {"w": 1, "x": 8, "y": 1}, + {"w": 1, "x": 9, "y": 1}, + {"w": 1, "x": 10, "y": 1}, + {"w": 1, "x": 11, "y": 1}, + {"w": 1, "x": 0, "y": 2}, + {"w": 1, "x": 1, "y": 2}, + {"w": 1, "x": 2, "y": 2}, + {"w": 1, "x": 3, "y": 2}, + {"w": 1, "x": 4, "y": 2}, + {"w": 1, "x": 5, "y": 2}, + {"w": 1, "x": 6, "y": 2}, + {"w": 1, "x": 7, "y": 2}, + {"w": 1, "x": 8, "y": 2}, + {"w": 1, "x": 9, "y": 2}, + {"w": 1, "x": 10, "y": 2}, + {"w": 1, "x": 11, "y": 2}, + {"w": 1, "x": 0, "y": 3}, + {"w": 1, "x": 1, "y": 3}, + {"w": 1, "x": 2, "y": 3}, + {"w": 1, "x": 3, "y": 3}, + {"w": 1, "x": 4, "y": 3}, + {"w": 1, "x": 5, "y": 3}, + {"w": 1, "x": 6, "y": 3}, + {"w": 1, "x": 7, "y": 3}, + {"w": 1, "x": 8, "y": 3}, + {"w": 1, "x": 9, "y": 3}, + {"w": 1, "x": 10, "y": 3}, + {"w": 1, "x": 11, "y": 3}, + {"w": 1, "x": 0, "y": 4}, + {"w": 1, "x": 1, "y": 4}, + {"w": 1, "x": 2, "y": 4}, + {"w": 1, "x": 3, "y": 4}, + {"w": 1, "x": 4, "y": 4}, + {"w": 1, "x": 5, "y": 4}, + {"w": 1, "x": 6, "y": 4}, + {"w": 1, "x": 7, "y": 4}, + {"w": 1, "x": 8, "y": 4}, + {"w": 1, "x": 9, "y": 4}, + {"w": 1, "x": 10, "y": 4}, + {"w": 1, "x": 11, "y": 4} + ] + }, + "LAYOUT_ortho_5x12_1x2uC": { + "key_count": 59, + "layout": [ + {"w": 1, "x": 0, "y": 0}, + {"w": 1, "x": 1, "y": 0}, + {"w": 1, "x": 2, "y": 0}, + {"w": 1, "x": 3, "y": 0}, + {"w": 1, "x": 4, "y": 0}, + {"w": 1, "x": 5, "y": 0}, + {"w": 1, "x": 6, "y": 0}, + {"w": 1, "x": 7, "y": 0}, + {"w": 1, "x": 8, "y": 0}, + {"w": 1, "x": 9, "y": 0}, + {"w": 1, "x": 10, "y": 0}, + {"w": 1, "x": 11, "y": 0}, + {"w": 1, "x": 0, "y": 1}, + {"w": 1, "x": 1, "y": 1}, + {"w": 1, "x": 2, "y": 1}, + {"w": 1, "x": 3, "y": 1}, + {"w": 1, "x": 4, "y": 1}, + {"w": 1, "x": 5, "y": 1}, + {"w": 1, "x": 6, "y": 1}, + {"w": 1, "x": 7, "y": 1}, + {"w": 1, "x": 8, "y": 1}, + {"w": 1, "x": 9, "y": 1}, + {"w": 1, "x": 10, "y": 1}, + {"w": 1, "x": 11, "y": 1}, + {"w": 1, "x": 0, "y": 2}, + {"w": 1, "x": 1, "y": 2}, + {"w": 1, "x": 2, "y": 2}, + {"w": 1, "x": 3, "y": 2}, + {"w": 1, "x": 4, "y": 2}, + {"w": 1, "x": 5, "y": 2}, + {"w": 1, "x": 6, "y": 2}, + {"w": 1, "x": 7, "y": 2}, + {"w": 1, "x": 8, "y": 2}, + {"w": 1, "x": 9, "y": 2}, + {"w": 1, "x": 10, "y": 2}, + {"w": 1, "x": 11, "y": 2}, + {"w": 1, "x": 0, "y": 3}, + {"w": 1, "x": 1, "y": 3}, + {"w": 1, "x": 2, "y": 3}, + {"w": 1, "x": 3, "y": 3}, + {"w": 1, "x": 4, "y": 3}, + {"w": 1, "x": 5, "y": 3}, + {"w": 1, "x": 6, "y": 3}, + {"w": 1, "x": 7, "y": 3}, + {"w": 1, "x": 8, "y": 3}, + {"w": 1, "x": 9, "y": 3}, + {"w": 1, "x": 10, "y": 3}, + {"w": 1, "x": 11, "y": 3}, + {"w": 1, "x": 0, "y": 4}, + {"w": 1, "x": 1, "y": 4}, + {"w": 1, "x": 2, "y": 4}, + {"w": 1, "x": 3, "y": 4}, + {"w": 1, "x": 4, "y": 4}, + {"w": 2, "x": 5, "y": 4}, + {"w": 1, "x": 7, "y": 4}, + {"w": 1, "x": 8, "y": 4}, + {"w": 1, "x": 9, "y": 4}, + {"w": 1, "x": 10, "y": 4}, + {"w": 1, "x": 11, "y": 4} + ] + }, + "LAYOUT_ortho_5x12_2x2u": { + "key_count": 58, + "layout": [ + {"w": 1, "x": 0, "y": 0}, + {"w": 1, "x": 1, "y": 0}, + {"w": 1, "x": 2, "y": 0}, + {"w": 1, "x": 3, "y": 0}, + {"w": 1, "x": 4, "y": 0}, + {"w": 1, "x": 5, "y": 0}, + {"w": 1, "x": 6, "y": 0}, + {"w": 1, "x": 7, "y": 0}, + {"w": 1, "x": 8, "y": 0}, + {"w": 1, "x": 9, "y": 0}, + {"w": 1, "x": 10, "y": 0}, + {"w": 1, "x": 11, "y": 0}, + {"w": 1, "x": 0, "y": 1}, + {"w": 1, "x": 1, "y": 1}, + {"w": 1, "x": 2, "y": 1}, + {"w": 1, "x": 3, "y": 1}, + {"w": 1, "x": 4, "y": 1}, + {"w": 1, "x": 5, "y": 1}, + {"w": 1, "x": 6, "y": 1}, + {"w": 1, "x": 7, "y": 1}, + {"w": 1, "x": 8, "y": 1}, + {"w": 1, "x": 9, "y": 1}, + {"w": 1, "x": 10, "y": 1}, + {"w": 1, "x": 11, "y": 1}, + {"w": 1, "x": 0, "y": 2}, + {"w": 1, "x": 1, "y": 2}, + {"w": 1, "x": 2, "y": 2}, + {"w": 1, "x": 3, "y": 2}, + {"w": 1, "x": 4, "y": 2}, + {"w": 1, "x": 5, "y": 2}, + {"w": 1, "x": 6, "y": 2}, + {"w": 1, "x": 7, "y": 2}, + {"w": 1, "x": 8, "y": 2}, + {"w": 1, "x": 9, "y": 2}, + {"w": 1, "x": 10, "y": 2}, + {"w": 1, "x": 11, "y": 2}, + {"w": 1, "x": 0, "y": 3}, + {"w": 1, "x": 1, "y": 3}, + {"w": 1, "x": 2, "y": 3}, + {"w": 1, "x": 3, "y": 3}, + {"w": 1, "x": 4, "y": 3}, + {"w": 1, "x": 5, "y": 3}, + {"w": 1, "x": 6, "y": 3}, + {"w": 1, "x": 7, "y": 3}, + {"w": 1, "x": 8, "y": 3}, + {"w": 1, "x": 9, "y": 3}, + {"w": 1, "x": 10, "y": 3}, + {"w": 1, "x": 11, "y": 3}, + {"w": 1, "x": 0, "y": 4}, + {"w": 1, "x": 1, "y": 4}, + {"w": 1, "x": 2, "y": 4}, + {"w": 1, "x": 3, "y": 4}, + {"w": 2, "x": 4, "y": 4}, + {"w": 2, "x": 6, "y": 4}, + {"w": 1, "x": 8, "y": 4}, + {"w": 1, "x": 9, "y": 4}, + {"w": 1, "x": 10, "y": 4}, + {"w": 1, "x": 11, "y": 4} + ] + } + } +} diff --git a/keyboards/keycapsss/o4l_5x12/keymaps/2x2u/config.h b/keyboards/keycapsss/o4l_5x12/keymaps/2x2u/config.h new file mode 100644 index 000000000000..271f48d0011b --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/keymaps/2x2u/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/keycapsss/o4l_5x12/keymaps/2x2u/keymap.c b/keyboards/keycapsss/o4l_5x12/keymaps/2x2u/keymap.c new file mode 100644 index 000000000000..00aec245ef90 --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/keymaps/2x2u/keymap.c @@ -0,0 +1,83 @@ +#include QMK_KEYBOARD_H + +// 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 o4l5x12_layers { + _QWERTY, + _LOWER +}; + +// Layers get their own keys. These are defined to make them not mess up +// the grid. +enum o4l5x12_keycodes { + QWERTY = SAFE_RANGE, + LOWER +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | Y | U | I | O | P | BSPC | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI |Lower | Enter | Space | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12_2x2u( + 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_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |RGBPLA| { | [ | ( | | | ) | ] | } | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |RGBMOD| | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |UGlow | Reset| | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12_2x2u( + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL, + RGB_M_P, KC_LCBR, KC_LBRC, KC_LPRN, KC_SLSH, KC_BSLS, KC_RPRN, KC_RBRC, KC_RCBR, _______, _______, KC_PIPE, + RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RESET, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/keycapsss/o4l_5x12/keymaps/default/config.h b/keyboards/keycapsss/o4l_5x12/keymaps/default/config.h new file mode 100644 index 000000000000..271f48d0011b --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/keycapsss/o4l_5x12/keymaps/default/keymap.c b/keyboards/keycapsss/o4l_5x12/keymaps/default/keymap.c new file mode 100644 index 000000000000..3e9dc335d7e6 --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/keymaps/default/keymap.c @@ -0,0 +1,140 @@ +#include QMK_KEYBOARD_H + +// 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 preonic_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +// Layers get their own keys. These are defined to make them not mess up +// the grid. +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty (Preonic Layer Style) + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x12( + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + 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, + RGB_TOG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower (Preonic Layer Style) + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12( + 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise (Preonic Layer Style) + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12( + 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + 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 +), + +/* Adjust (Lower + Raise) (Preonic Layer Style) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/keycapsss/o4l_5x12/o4l_5x12.c b/keyboards/keycapsss/o4l_5x12/o4l_5x12.c new file mode 100644 index 000000000000..78267062c36d --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/o4l_5x12.c @@ -0,0 +1 @@ +#include "o4l_5x12.h" diff --git a/keyboards/keycapsss/o4l_5x12/o4l_5x12.h b/keyboards/keycapsss/o4l_5x12/o4l_5x12.h new file mode 100644 index 000000000000..2061d477b92f --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/o4l_5x12.h @@ -0,0 +1,50 @@ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + + #define LAYOUT_ortho_5x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b } \ + } + + #define LAYOUT_ortho_5x12_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k45, k47, k48, k49, k4a, k4b \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, }, \ + { k40, k41, k42, k43, k44, k45, XXX, k47, k48, k49, k4a, k4b } \ + } + + #define LAYOUT_ortho_5x12_2x2u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4a, k4b \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, }, \ + { k40, k41, k42, k43, k44, XXX, k46, XXX, k48, k49, k4a, k4b } \ + } diff --git a/keyboards/keycapsss/o4l_5x12/readme.md b/keyboards/keycapsss/o4l_5x12/readme.md new file mode 100644 index 000000000000..4b1ebb6c7c32 --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/readme.md @@ -0,0 +1,31 @@ +# O4L 5x12 + +A ortholinear 5x12 keyboard made and sold by Keycapsss. [More info at Keycapsss.com](https://keycapsss.com). + + + +## Features: + +- MX and Choc switch support +- RGB Underglow (12x SK6812MINI) +- USB-C +- PCB shape, reset button and mounting holes position same as Preonic Rev3 +- Pro Micro as controller + +--- + +- Keyboard Maintainer: BenRoe [Github](https://github.com/BenRoe) / [Twitter](https://twitter.com/ben_roe) +- Hardware Supported: Pro Micro +- Hardware Availability: [Keycapsss.com](https://keycapsss.com) + + + +Make firmware .hex for this keyboard (after setting up your build environment): + + make keycapsss/o4l_5x12:default + +Example of flashing this keyboard (or use [QMK Toolbox](https://github.com/qmk/qmk_toolbox)): + + make keycapsss/o4l_5x12:default:avrdude + +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). diff --git a/keyboards/keycapsss/o4l_5x12/rules.mk b/keyboards/keycapsss/o4l_5x12/rules.mk new file mode 100644 index 000000000000..36c30f309f25 --- /dev/null +++ b/keyboards/keycapsss/o4l_5x12/rules.mk @@ -0,0 +1,73 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + +LAYOUTS = ortho_5x12 diff --git a/keyboards/kinesis/keymaps/carpalx/keymap.c b/keyboards/kinesis/keymaps/carpalx/keymap.c index 922e8e7615b8..2e56946e766e 100644 --- a/keyboards/kinesis/keymaps/carpalx/keymap.c +++ b/keyboards/kinesis/keymaps/carpalx/keymap.c @@ -11,10 +11,6 @@ extern keymap_config_t keymap_config; #define QWERTY M(_QW) #define COLEMAK M(_CM) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - /* Function Keys on All Layers (Keypad toggles): diff --git a/keyboards/kinesis/keymaps/default/config.h b/keyboards/kinesis/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/kinesis/keymaps/default/config.h +++ b/keyboards/kinesis/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/config.h b/keyboards/kinesis/keymaps/insertsnideremarks/config.h index 9ce094be5164..053a291b7c6b 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/config.h +++ b/keyboards/kinesis/keymaps/insertsnideremarks/config.h @@ -6,7 +6,7 @@ // place overrides here #define IGNORE_MOD_TAP_INTERRUPT -#define TAPPING_TERM 175 +#define TAPPING_TERM 150 #define TAPPING_TOGGLE 2 diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c index 78defea2375b..10b0c2cb73d4 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c +++ b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -32,9 +32,6 @@ enum kinesis_keycodes { NKROTG = MAGIC_TOGGLE_NKRO }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - //Tap Dance Declarations enum { ADJ = 0, @@ -150,7 +147,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { SPCFN, ENTNS, KC_BSPC, KC_ENT, DELNS, BSPCFN ), -/* Number/symbol layer +/* Numbers/Symbols layer (Multiple characters: single-tap for first, double-tap for second) ,-----------------------------------------------------------------------------------------------------------. | | | | | | | | | | | | | | | | | | | @@ -259,7 +256,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |--------+------+------+------+------+------| |------+------+------+------+------+--------| | | | KP . |KP/KP*| KP- _| KP+ =| | | KP 1 | KP 2 | KP 3 |KP Ent| | `--------+------+------+------+------+------' `------+------+------+------+------+--------' - | ( | ) | [ { | ] } | | KP 0 | , | KP . |KP Ent| + | ( | ) | [ { | ] } | | | KP 0 | KP . |KP Ent| `---------------------------' `---------------------------' ,---------------. ,---------------. | | | | | | @@ -275,14 +272,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, _______, KC_P4, KC_P5, KC_P6, KC_EQL, _______, _______, _______, KC_PDOT, TD(PSLPAS), TD(PMNUN), TD(PPLEQ), _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, - KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), KC_P0, KC_COMM, KC_PDOT, KC_PENT, + KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Colemak gaming/vanilla - (Limited access to Function or Numbers layers; mainly used for gaming; double-tap and hold TD(ADJ) above LAlt to access Adjust layer) + (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Delete/Numbers2 to access Adjust layer) ,-----------------------------------------------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| `-----------------------------------------------------------------------------------------------------------' @@ -291,18 +288,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |--------+------+------+------+------+------| |------+------+------+------+------+--------| | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + | LCtrl | A | R | S | T | D | | H | N | E | I | O | ' | |--------+------+------+------+------+------| |------+------+------+------+------+--------| | Shift | Z | X | C | V | B | | K | M | , | . | / | Shift | `--------+------+------+------+------+------' `------+------+------+------+------+--------' | Ins | ` | [ | ] | | Left | Down | Up | Right| `---------------------------' `---------------------------' ,---------------. ,---------------. - |Esc/Ctl|TD(ADJ)| | RAlt | RCtl | + | Esc | | | RAlt | RCtl | ,-------|-------|-------| |-------+-------+-------. - | | | LAlt | | RGUI | | | - | Space | Enter |-------| |-------| Delete| Bspc | - | | |Bspc/FN| | Ent/NS| | | + | | | LAlt | | RGUI | Delete| Bspc | + | Space | Enter |-------| |-------| / | / | + | | | Bspc | | Ent/NS|Number2| Fn2 | `-----------------------' `-----------------------' */ [_COLEMAKGM] = LAYOUT_pretty( @@ -312,13 +309,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - CTLESC, TD(ADJ), KC_RALT, KC_RCTL, + KC_ESC, XXXXXXX, KC_RALT, KC_RCTL, KC_LALT, KC_RGUI, - KC_SPC, KC_ENT, BSPCFN, ENTNS, KC_DEL, KC_BSPC + KC_SPC, KC_ENT, KC_BSPC, ENTNS, DELNS, BSPCFN ), /* QWERTY gaming/vanilla - (Limited access to Function or Numbers layers; mainly used for gaming; double-tap and hold TD(ADJ) above LAlt to access Adjust layer) + (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Delete/Numbers2 to access Adjust layer) ,-----------------------------------------------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| `-----------------------------------------------------------------------------------------------------------' @@ -327,18 +324,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |--------+------+------+------+------+------| |------+------+------+------+------+--------| | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + | LCtrl | A | S | D | F | G | | H | J | K | L | ; | ' | |--------+------+------+------+------+------| |------+------+------+------+------+--------| | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | `--------+------+------+------+------+------' `------+------+------+------+------+--------' | Ins | ` | [ | ] | | Left | Down | Up | Right| `---------------------------' `---------------------------' ,---------------. ,---------------. - |Esc/Ctl|TD(ADJ)| | RAlt | RCtl | + | Esc | | | RAlt | RCtl | ,-------|-------|-------| |-------+-------+-------. - | | | LAlt | | RGUI | | | - | Space | Enter |-------| |-------| Delete| Bspc | - | | |Bspc/FN| | Ent/NS| | | + | | | LAlt | | RGUI | Delete| Bspc | + | Space | Enter |-------| |-------| / | / | + | | | Bspc | | Ent/NS|Number2| Fn2 | `-----------------------' `-----------------------' */ [_QWERTYGM] = LAYOUT_pretty( @@ -348,9 +345,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_RSFT, KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - CTLESC, TD(ADJ), KC_RALT, KC_RCTL, + KC_ESC, XXXXXXX, KC_RALT, KC_RCTL, KC_LALT, KC_RGUI, - KC_SPC, KC_ENT, BSPCFN, ENTNS, KC_DEL, KC_BSPC + KC_SPC, KC_ENT, KC_BSPC, ENTNS, DELNS, BSPCFN ), /* Adjust layer @@ -407,11 +404,6 @@ uint32_t layer_state_set_user(uint32_t state) { return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); } -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case COLEMAK: @@ -482,4 +474,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/readme.md b/keyboards/kinesis/keymaps/insertsnideremarks/readme.md index 7a146c7a2926..783c188185d4 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/readme.md +++ b/keyboards/kinesis/keymaps/insertsnideremarks/readme.md @@ -1,6 +1,8 @@ -# insertsnideremarks' Kinesis Keymap +## I've changed my folder name to match my GitHub username. Please see https://github.com/qmk/qmk_firmware/tree/master/keyboards/kinesis/keymaps/tuesdayjohn for my current keymap files. -These layouts are derived from what I was using on my Kinesis Contoured keyboards with Hasu's TMK converters. With the move to QMK via Stapelberg replacement controller, I've cleaned up the layouts a bit while adding more functions and layers. +## insertsnideremarks' Kinesis Keymap + +These layouts are derived from what I was using on my Kinesis Contoured keyboards with Hasu's USB-USB TMK converters. With the move to QMK via Stapelberg replacement controller, I've cleaned up the layouts a bit while adding more functions and layers. There are minor changes in the base keywell layout of non-alpha keys (e.g., CapsLock is ESC/Ctl, arrow clusters on one side), while the thumb clusters deviate more from the default layout. @@ -10,36 +12,36 @@ Changes to the thumb clusters include: * Backspace have been duplicated on both clusters. * The 2u keys serve dual function as momentary layer switchers. -I've largely left the function keys untouched, with the intension of not using them. They are neither easy to use nor reach due to their locations and size, and, prior to Advantage2, particularly terrible rubber domes were used. They have since updated the keys with Cherry ML switches on Advantage2, but did not resolve the issues of size or location. Additionally, leaving the function keys unused here makes it easier for me to adapt the keymaps to my other keyboards, most of which do not have physical function keys. +I've largely left the function keys untouched, with the intension of not using them. They are neither easy to use nor reach due to their locations and size, and the rubber domes used were terrible. They have since replaced the keys with Cherry ML switches on Advantage2, but did not resolve the issues of size or location. Additionally, leaving the function keys unused here makes it easier for me to adapt the keymaps to my other keyboards, most of which do not have physical function keys. I use Colemak as my default layout. I've included QWERTY here as well. -Additionally, I've added gaming/vanilla version of Colemak and QWERTY layouts. These layouts have limited access to the Function or Numbers layers, and are mainly used for gaming. +Additionally, I've added gaming/vanilla version of Colemak and QWERTY layouts. These layouts have limited access to the Function or Numbers/Symbols layers, and are mainly used for gaming. Persistent default layer has been enabled for Colemak and QWERTY. The gaming/vanilla Colemak and QWERTY can be set as default layer, but will not be persistent. ## Future plans -* Add status LEDs to the Stapelberg PCB (usually used for Caps Lock, Num Lock, and Scroll Lock). May configure it as layer indicator. +* Add status LEDs to the Stapelberg PCB (usually used for Caps Lock, Num Lock, and Scroll Lock) to use as layer indicators. * Add a speaker now that QMK supports additional pins for audio use. -* Utilize the leftover spots on the key matrix, as well as unused pins on Teensy to run macropad and/or foot pedals. +* Utilize the leftover spots on the key matrix, as well as unused pins on Teensy++ 2.0 to run macropad and/or foot pedals. ### Colemak - (Default layer, keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) - ,-----------------------------------------------------------------------------------------------------------. - | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| - `-----------------------------------------------------------------------------------------------------------' - ,-------------------------------------------. ,-------------------------------------------. - | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | - |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | - |--------+------+------+------+------+------| |------+------+------+------+------+--------| - |Esc/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | - |--------+------+------+------+------+------| |------+------+------+------+------+--------| - |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| - `--------+------+------+------+------+------' `------+------+------+------+------+--------' - | Ins | ` | [ | ] | | Left | Down | Up | Right| + (Default layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) + ,-----------------------------------------------------------------------------------------------------------. + | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| + `-----------------------------------------------------------------------------------------------------------' + ,-------------------------------------------. ,-------------------------------------------. + | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + |--------+------+------+------+------+------| |------+------+------+------+------+--------| + | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | + |--------+------+------+------+------+------| |------+------+------+------+------+--------| + |Esc/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | + |--------+------+------+------+------+------| |------+------+------+------+------+--------| + |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| + `--------+------+------+------+------+------' `------+------+------+------+------+--------' + | Ins | ` | [ | ] | | Left | Down | Up | Right| `---------------------------' `---------------------------' ,---------------. ,---------------. |Esc/Ctl| Hyper | | RAlt | RCtl | @@ -150,7 +152,7 @@ Persistent default layer has been enabled for Colemak and QWERTY. The gaming/va ### Colemak gaming/vanilla - (Limited access to Function or Numbers layers; mainly used for gaming; double-tap and hold TD(ADJ) above LAlt to access Adjust layer) + (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Delete/Numbers2 to access Adjust layer) ,-----------------------------------------------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| `-----------------------------------------------------------------------------------------------------------' @@ -159,23 +161,23 @@ Persistent default layer has been enabled for Colemak and QWERTY. The gaming/va |--------+------+------+------+------+------| |------+------+------+------+------+--------| | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + | LCtrl | A | R | S | T | D | | H | N | E | I | O | ' | |--------+------+------+------+------+------| |------+------+------+------+------+--------| | Shift | Z | X | C | V | B | | K | M | , | . | / | Shift | `--------+------+------+------+------+------' `------+------+------+------+------+--------' | Ins | ` | [ | ] | | Left | Down | Up | Right| `---------------------------' `---------------------------' ,---------------. ,---------------. - |Esc/Ctl|TD(ADJ)| | RAlt | RCtl | + | Esc | | | RAlt | RCtl | ,-------|-------|-------| |-------+-------+-------. - | | | LAlt | | RGUI | | | - | Space | Enter |-------| |-------| Delete| Bspc | - | | |Bspc/FN| | Ent/NS| | | + | | | LAlt | | RGUI | Delete| Bspc | + | Space | Enter |-------| |-------| / | / | + | | | Bspc | | Ent/NS|Number2| Fn2 | `-----------------------' `-----------------------' ### QWERTY gaming/vanilla - (Limited access to Function or Numbers layers; mainly used for gaming; double-tap and hold TD(ADJ) above LAlt to access Adjust layer) + (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Delete/Numbers2 to access Adjust layer) ,-----------------------------------------------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| `-----------------------------------------------------------------------------------------------------------' @@ -184,18 +186,18 @@ Persistent default layer has been enabled for Colemak and QWERTY. The gaming/va |--------+------+------+------+------+------| |------+------+------+------+------+--------| | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + | LCtrl | A | S | D | F | G | | H | J | K | L | ; | ' | |--------+------+------+------+------+------| |------+------+------+------+------+--------| | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | `--------+------+------+------+------+------' `------+------+------+------+------+--------' | Ins | ` | [ | ] | | Left | Down | Up | Right| `---------------------------' `---------------------------' ,---------------. ,---------------. - |Esc/Ctl|TD(ADJ)| | RAlt | RCtl | + | Esc | | | RAlt | RCtl | ,-------|-------|-------| |-------+-------+-------. - | | | LAlt | | RGUI | | | - | Space | Enter |-------| |-------| Delete| Bspc | - | | |Bspc/FN| | Ent/NS| | | + | | | LAlt | | RGUI | Delete| Bspc | + | Space | Enter |-------| |-------| / | / | + | | | Bspc | | Ent/NS|Number2| Fn2 | `-----------------------' `-----------------------' ### Adjust layer @@ -221,4 +223,4 @@ Persistent default layer has been enabled for Colemak and QWERTY. The gaming/va | | |-------| |-------| | | | | | | | | | | `-----------------------' `-----------------------' - \ No newline at end of file + diff --git a/keyboards/kinesis/keymaps/milestogo/keymap.c b/keyboards/kinesis/keymaps/milestogo/keymap.c index 1ae7d9082a82..f3eb24eb0579 100644 --- a/keyboards/kinesis/keymaps/milestogo/keymap.c +++ b/keyboards/kinesis/keymaps/milestogo/keymap.c @@ -7,10 +7,6 @@ #define _TRANS 3// #define _SYMB2 4// old symbol level, more ergodox like -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - /* Macros */ enum { NONE = 0, @@ -54,13 +50,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8, KC_GRAVE, KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_TAB, KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , - KC_FN0 ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , + TT(_MOUSE) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , KC_GRAVE, KC_ESC, KC_FN4, KC_FN5, KC_LCTL,KC_LALT, KC_DEL, - KC_BSPC, KC_DEL ,KC_FN0 , - KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_FN0 ,KC_FN1 ,KC_FN2, KC_NO, RESET, + KC_BSPC, KC_DEL ,TT(_MOUSE) , + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,TT(_MOUSE) ,KC_FN1 ,TT(_SYMB), KC_NO, RESET, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, @@ -109,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, _______, KC_FN0, KC_2, + _______, _______, _______, _______, _______, _______, _______, TT(_MOUSE), KC_2, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_LBRC, KC_LPRN, KC_RPRN, KC_UNDS, _______, KC_ASTR, KC_PLUS, KC_1, KC_MINS, KC_RBRC, KC_GRV, @@ -157,7 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, _______, KC_FN0, KC_2, + _______, _______, _______, _______, _______, _______, _______, TT(_MOUSE), KC_2, _______, _______, _______, KC_ASTR, _______, _______, _______, _______, KC_PLUS, KC_MINS, _______, _______, _______, _______, KC_EQL, KC_PIPE, _______, _______, @@ -202,7 +198,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_FN0,RESET, + _______, _______, _______, _______, _______, _______, _______, TT(_MOUSE),RESET, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_ACL2, KC_WH_U, M(A_MUL), KC_MS_U, M(A_MUR), KC_NO, KC_ACL1, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_ACL0, @@ -251,7 +247,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_FN0, KC_2, + _______, _______, _______, _______, _______, _______, _______, TT(_MOUSE), KC_2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -268,9 +264,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_TOGGLE(_MOUSE) , [1] = ACTION_LAYER_TOGGLE(_MOUSE) , - [2] = ACTION_LAYER_TAP_TOGGLE(_SYMB) , [5]= ACTION_LAYER_TAP_KEY(_SYMB,KC_RIGHT), [4]= ACTION_MODS_TAP_KEY(MOD_LGUI,KC_LEFT), [6]= ACTION_LAYER_TAP_KEY(_SYMB,KC_UP), diff --git a/keyboards/kinesis/keymaps/tuesdayjohn/config.h b/keyboards/kinesis/keymaps/tuesdayjohn/config.h new file mode 100644 index 000000000000..ebed17fedef4 --- /dev/null +++ b/keyboards/kinesis/keymaps/tuesdayjohn/config.h @@ -0,0 +1,6 @@ +#pragma once + +// place overrides here +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 175 +#define TAPPING_TOGGLE 2 diff --git a/keyboards/kinesis/keymaps/tuesdayjohn/keymap.c b/keyboards/kinesis/keymaps/tuesdayjohn/keymap.c new file mode 100644 index 000000000000..0cdb7d584dcf --- /dev/null +++ b/keyboards/kinesis/keymaps/tuesdayjohn/keymap.c @@ -0,0 +1,427 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum kinesis_layers { + _COLEMAK, // Colemak (default layer) + _QWERTY, // QWERTY + _GAMING, // Gaming/vanilla toggle layer (limited dual-role keys and layer access) + _NUMBERS, // Numbers & Symbols + _NUMBERS2, // Numbers & Symbols 2 (identical as _NUMBERS; basically used for tri-layer access to _ADJUST) + _FUNCTION, // Function + _FUNCTION2, // Function 2 (identical as _FUNCTION; used to allow for easier use of space and backspace while using function layer arrows) + _NUMPAD, // Numpad + _ADJUST, // Adjust layer (accessed via tri-layer feature) + _ADJUST2 // Second Adjust layer (accessed outside of tri-layer feature) +}; + +enum kinesis_keycodes { + COLEMAK = SAFE_RANGE, + QWERTY, + GAMING +}; + +//Tap Dance Declarations +enum { + ADJ = 0, + LBCB, + RBCB, + EQPL, + PLEQ, + MNUN, + SLAS, + GVTL, + PPEQ, + PMUN, + PSPA +}; + +void dance_LAYER_finished(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_on(_ADJUST2); + set_oneshot_layer(_ADJUST2, ONESHOT_START); + } +} +void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + layer_off(_ADJUST2); + clear_oneshot_layer_state(ONESHOT_PRESSED); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap +[RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap +[EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap +[PLEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PLUS, KC_EQL), // Equal sign on a single-tap, plus sign on a double-tap +[MNUN] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, KC_UNDS), // Minus sign on a single-tap, underscore on a double-tap +[SLAS] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_ASTR), // Slash in a single-tap, asterisk in a double-tap +[GVTL] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_TILD), // Grave on a single-tap, tilde on a double-tap +[PPEQ] = ACTION_TAP_DANCE_DOUBLE(KC_PPLS, KC_EQL), // Numpad plus sign on a single-tap, equal sign on a double-tap +[PMUN] = ACTION_TAP_DANCE_DOUBLE(KC_PMNS, KC_UNDS), // Numpad minus sign on a single-tap, underscore on a double-tap +[PSPA] = ACTION_TAP_DANCE_DOUBLE(KC_PSLS, KC_PAST) // Numpad slash on a single-tap, numpad asterisk on a double-tap +}; + +//Aliases for longer keycodes +#define NUMPAD TG(_NUMPAD) +#define ADJUST MO(_ADJUST2) +#define SPCFN LT(_FUNCTION, KC_SPC) +#define BSPCFN LT(_FUNCTION2, KC_BSPC) +#define ENTNS LT(_NUMBERS, KC_ENT) +#define DELNS LT(_NUMBERS2, KC_DEL) +#define CTLESC CTL_T(KC_ESC) +#define ALTAPP ALT_T(KC_APP) +#define CTL_A LCTL(KC_A) +#define CTL_C LCTL(KC_C) +#define CTL_V LCTL(KC_V) +#define CTL_X LCTL(KC_X) +#define CTL_Z LCTL(KC_Z) +#define CTL_Y LCTL(KC_Y) +#define CA_TAB LCA(KC_TAB) +#define HYPER ALL_T(KC_NO) +#define TD_ADJ TD(ADJ) +#define TD_LBCB TD(LBCB) +#define TD_RBCB TD(RBCB) +#define TD_EQPL TD(EQPL) +#define TD_PLEQ TD(PLEQ) +#define TD_MNUN TD(MNUN) +#define TD_SLAS TD(SLAS) +#define TD_GVTL TD(GVTL) +#define TD_PPEQ TD(PPEQ) +#define TD_PMUN TD(PMUN) +#define TD_PSPA TD(PSPA) +#define NKROTG MAGIC_TOGGLE_NKRO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* +Colemak +(Default layer; keys separated by "/" tap for first, hold for second; uses Space Cadet Shifts) +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | F9 | F10 | F11 | F12 |PrtScr|ScrLck| Pause|Numpad|Adjust| +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| ESC/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| SC Shift| Z | X | C | V | B | | K | M | , | . | / | SC Shift| +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | Ins | ` | [ | ] | | Left | Down | Up | Right | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | ESC/Ctl| Hyper | | RAlt | RCtl | + ,--------+--------+--------| |--------+--------+--------. + | Space | Enter | App/Alt| | RGUI | Delete | Bspc | + | / | / |--------| |--------| / | / | + | Fn | Number | Bspc | | Enter | Number2| Fn2 | + `--------------------------' `--------------------------' +*/ +[_COLEMAK] = LAYOUT_pretty( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + CTLESC, HYPER, KC_RALT, KC_RCTL, + ALTAPP, KC_RGUI, + SPCFN, ENTNS, KC_BSPC, KC_ENT, DELNS, BSPCFN +), + +/* +QWERTY +(Keys separated by "/" tap for first, hold for second; uses Space Cadet Shifts) +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | F9 | F10 | F11 | F12 |PrtScr|ScrLck| Pause|Numpad|Adjust| +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| ESC/Ctrl| A | S | D | F | G | | H | J | K | L | ; | ' | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| SC Shift| Z | X | C | V | B | | N | M | , | . | / | SC Shift| +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | Ins | ` | [ | ] | | Left | Down | Up | Right | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | ESC/Ctl| Hyper | | RAlt | RCtl | + ,--------+--------+--------| |--------+--------+--------. + | Space | Enter | App/Alt| | RGUI | Delete | Bspc | + | / | / |--------| |--------| / | / | + | Fn | Number | Bspc | | Enter | Number2| Fn2 | + `--------------------------' `--------------------------' +*/ +[_QWERTY] = LAYOUT_pretty( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + CTLESC, HYPER, KC_RALT, KC_RCTL, + ALTAPP, KC_RGUI, + SPCFN, ENTNS, KC_BSPC, KC_ENT, DELNS, BSPCFN +), + +/* +Numbers/Symbols layer +(Multiple characters: single-tap for first, double-tap for second) +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| | | | | | | | | | | | | | | | | | | | +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | 6 | 7 | 8 | 9 | 0 | | ^ | & | * | ( | ) | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | 1 | 2 | 3 | 4 | 5 | | ! | @ | # | $ | % | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | . | / * | - _ | + = | | ` ~ | [ { | ] } | | | | +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | ( | ) | [ { | ] } | | | | | | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | | | | | | + ,--------+--------+--------| |--------+--------+--------. + | | | | | | | | + | | |--------| |--------| | | + | | | | | | | | + `--------------------------' `--------------------------' +*/ +[_NUMBERS] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +), + +[_NUMBERS2] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +), + +/* +Function layer +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| | | | | | | | | | | | | | | | | | | | +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | | Up | | | | | | Up | Ctrl+Y | | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | Ctrl+A | Left | Down | Right | C+A+Tab| | PgUp | Left | Down | Right | Home | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | Ctrl+Z | Ctrl+X | Ctrl+C | Ctrl+V | Bspc | | PgDn | Mute | Vol- | Vol+ | End | | +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | | | | | | Prev | Play | Next | Stop | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | | | | | | + ,--------+--------+--------| |--------+--------+--------. + | | | | | | | | + | | |--------| |--------| | | + | | | | | | | | + `--------------------------' `--------------------------' +*/ +[_FUNCTION] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, CTL_Y, _______, _______, + _______, CTL_A, KC_LEFT, KC_DOWN, KC_RGHT, CA_TAB, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + _______, CTL_Z, CTL_X, CTL_C, CTL_V, KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, + _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +), + +[_FUNCTION2] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, CTL_Y, _______, _______, + _______, CTL_A, KC_LEFT, KC_DOWN, KC_RGHT, CA_TAB, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, + _______, CTL_Z, CTL_X, CTL_C, CTL_V, KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, + _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +), + +/* +Numpad layer +(Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| | | | | | | | | | | | | | | | | | | | +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| | NumLock| | | | | | Tab | NumLock| KP / | KP * | KP - | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | KP 7 | KP 8 | KP 9 | KP + | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | | KP 4 | KP 5 | KP 6 | = | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | KP . | KP/KP* | KP- _ | KP+ = | | | KP 1 | KP 2 | KP 3 | KP Ent | | +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | ( | ) | [ { | ] } | | | KP 0 | KP . | KP Ent | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | | | | | | + ,--------+--------+--------| |--------+--------+--------. + | | | | | | | | + | | |--------| |--------| | | + | | | | | | | | + `--------------------------' `--------------------------' +*/ +[_NUMPAD] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_NLCK, _______, _______, _______, _______, KC_TAB, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______, + _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, + _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, _______, KC_P4, KC_P5, KC_P6, KC_EQL, _______, + _______, _______, KC_PDOT, TD_PSPA, TD_MNUN, TD_PPEQ, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, KC_P0, KC_PDOT, KC_PENT, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +), + +/* +Gaming +(Toggle gaming layer with limited dual-role keys and layer access; NKRO turned on by default; Ent/NS + Delete/Numbers2 to access Adjust layer) +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| | | | | | | | | | | | | | | | | | | | +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| | | | | | | | | | | | | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | | | | | | | | | | | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| LCtrl | | | | | | | | | | | | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| Shift | | | | | | | | | | | | Shift | +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | | | | | | | | | | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | ESC |xxxxxxxx| | RAlt | RCtl | + ,--------+--------+--------| |--------+--------+--------. + | | | LAlt | | RGUI | Delete | Bspc | + | Space | Enter |--------| |--------| / | / | + | | | Bspc | |Enter/NS| Number2| Fn2 | + `--------------------------' `--------------------------' +*/ +[_GAMING] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, _______, _______, _______, _______, _______, + KC_ESC, XXXXXXX, _______, _______, + KC_LALT, _______, + KC_SPC, KC_ENT, _______, ENTNS, _______, _______ +), + +/* +Adjust layer +(Press and hold Adjust key on the function row or Enter/Number + Delete/Number2 to access; Numpad and NKRO are on toggle) +,--------------------------------------------------------------. ,--------------------------------------------------------------. +| | | | | | | | | | | | | | | | | | | | +`--------------------------------------------------------------' `--------------------------------------------------------------' +,------------------------------------------------------. ,------------------------------------------------------. +| | Colemak| QWERTY | | Gaming | | | Numpad | | | | | RESET | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | | | | | | | | | | | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | | | | | | | NKRO | | | | | +|---------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+---------| +| | | | | | | | | | | | | | +`---------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+---------' + | | | | | | | | | | + `-----------------------------------' `-----------------------------------' + ,-----------------. ,-----------------. + | | | | | | + ,--------+--------+--------| |--------+--------+--------. + | | | | | | | | + | | |--------| |--------| | | + | | | | | | | | + `--------------------------' `--------------------------' +*/ +[_ADJUST] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, GAMING, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +), + +[_ADJUST2] = LAYOUT_pretty( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, GAMING, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ +) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if (record->event.pressed) { +// persistent_default_layer_set(1UL << _COLEMAK); + default_layer_set(1UL << _COLEMAK); + layer_move (_COLEMAK); + keymap_config.nkro = 0; + } + return false; + break; + case QWERTY: + if (record->event.pressed) { +// persistent_default_layer_set(1UL << _QWERTY); + default_layer_set(1UL << _QWERTY); + layer_move (_QWERTY); + keymap_config.nkro = 0; + } + return false; + break; + case GAMING: + if (record->event.pressed) { + layer_invert (_GAMING); + layer_off (_NUMPAD); + keymap_config.nkro = 1; + } + return false; + break; + } + return true; +} diff --git a/keyboards/kinesis/keymaps/tuesdayjohn/readme.md b/keyboards/kinesis/keymaps/tuesdayjohn/readme.md new file mode 100644 index 000000000000..88af87e88bde --- /dev/null +++ b/keyboards/kinesis/keymaps/tuesdayjohn/readme.md @@ -0,0 +1,219 @@ +# TuesdayJohn's Kinesis Keymap + +These layouts are derived from what I was using on my Kinesis Contoured keyboards with Hasu's USB-USB TMK converters. With the move to QMK via Stapelberg replacement controller, I've cleaned up the layouts a bit while adding more functions and layers. + +There are minor changes in the base keywell layout of non-alpha keys (e.g., CapsLock is ESC/Ctl, arrow clusters on one side), while the thumb clusters deviate more from the default layout. + +Changes to the thumb clusters include: +* The navigations keys moved to function layers. +* The function of 2u keys have been reversed - I've always used space with my left thumb, and I find it more helpful to have quick and easy access to Space and Enter while using my mouse/trackball. +* Backspace have been duplicated on both clusters. As with Space and Backspace, I find it helpful to have quick and easy access to Backspace while using my mouse/trackball. +* The 2u keys serve dual function as momentary layer switchers. + +I've largely left the function keys untouched, with the intension of not using them often. They are neither easy to use nor reach due to their locations and size, and Kinesis used not-so-great rubber dome switches for them (Advantage model and earlier). Kinesis have since replaced the keys with Cherry ML switches on Advantage2, but did not resolve the issues of size or location. Additionally, leaving the function keys unused here makes it easier for me to adapt the keymaps to my other keyboards, most of which do not have physical function keys. + +I use Colemak as my default layout. I've included QWERTY here as well. + +Additionally, there is a gaming layer on toggle. This layer is turned top of either Colemak or QWERTY and have limited access to the Function or Numbers/Symbols layers. Additionally, NKRO is turned on when the layer is turned on. + +Persistent default layer has been enabled for Colemak and QWERTY. The gaming/vanilla Colemak and QWERTY can be set as default layer, but will not be persistent. + +## Future plans + +* Add status LEDs to the Stapelberg PCB (usually used for Caps Lock, Num Lock, and Scroll Lock) to use as layer indicators. +* Add a speaker now that QMK supports additional pins for audio use. +* Utilize the leftover spots on the key matrix, as well as unused pins on Teensy++ 2.0 to run macropad and/or foot pedals. + + +## Layers + +### Function Keys on all layers +- 'Numpd' toggles the Numpad layer +- 'Adjst' is a momentary layer key to access the Adjust layer + +``` +,-----------------------------------------------------. ,----------------------------------------------------. +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| +`-----------------------------------------------------' `----------------------------------------------------' +``` + +### Colemak +- Default layer +- Keys separated by "/" tap for first, hold for second +- Uses [Space Cadet Shifts](https://beta.docs.qmk.fm/features/feature_space_cadet) + +``` +,------------------------------------------------. ,------------------------------------------------. +| = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +|ESC/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +|SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | Ins | ` | [ | ] | | Left | Down | Up | Right | + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + |ESC/Ctl| Hyper | | RAlt | RCtl | + ,-------+-------+-------| |-------+-------+-------. + | Space | Enter |App/Alt| | RGUI | Delete| Bspc | + | / | / |-------| |-------| / | / | + | Fn | Number| Bspc | | Enter |Number2| Fn2 | + `-----------------------' `-----------------------' +``` + +### QWERTY +- Keys separated by "/" tap for first, hold for second +- Uses [Space Cadet Shifts](https://beta.docs.qmk.fm/features/feature_space_cadet) + +``` +,------------------------------------------------. ,------------------------------------------------. +| = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +|ESC/Ctrl| A | S | D | F | G | | H | J | K | L | ; | ' | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +|SC Shift| Z | X | C | V | B | | N | M | , | . | / |SC Shift| +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | Ins | ` | [ | ] | | Left | Down | Up | Right | + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + |ESC/Ctl| Hyper | | RAlt | RCtl | + ,-------+-------+-------| |-------+-------+-------. + | Space | Enter |App/Alt| | RGUI | Delete| Bspc | + | / | / |-------| |-------| / | / | + | Fn | Number| Bspc | | Enter |Number2| Fn2 | + `-----------------------' `-----------------------' +``` + +### Numbers & Symbols layer +- Momentary layer +- Multiple characters: Single-tap for first, double-tap for second + +``` +,------------------------------------------------. ,------------------------------------------------. +| F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | 6 | 7 | 8 | 9 | 0 | | ^ | & | * | ( | ) | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | 1 | 2 | 3 | 4 | 5 | | ! | @ | # | $ | % | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | . | / * | - _ | + = | | ` ~ | [ { | ] } | | | | +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | ( | ) | [ { | ] } | | | | | | + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + | | | | | | + ,-------+-------+-------| |-------+-------+-------. + | | | | | | | | + | | |-------| |-------| | | + | | | | | | | | + `-----------------------' `-----------------------' +``` + +### Function layer +- Momentary layer + +``` +,------------------------------------------------. ,------------------------------------------------. +| F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | | Up | | | | | | Up | Ctrl+Y| | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | Ctrl+A| Left | Down | Right | C+A+Tb| | PgUp | Left | Down | Right | Home | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | Ctrl+Z| Ctrl+X| Ctrl+C| Ctrl+V| Bspc | | PgDn | Mute | Vol- | Vol+ | End | | +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | | | | | | Prev | Play | Next | Stop | + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + | | | | | | + ,-------+-------+-------| |-------+-------+-------. + | | | | | | | | + | | |-------| |-------| | | + | | | | | | | | + `-----------------------' `-----------------------' +``` + +### Numpad layer +- Toggle layer +- Left side duplicates layout from the Numbers layer, just with numpad output +- Right side layout close to PC numpad layout +- Multiple characters: Single-tap for first, double-tap for second + +``` +,------------------------------------------------. ,------------------------------------------------. +| | NumLk | | | | | | Tab | NumLk | KP / | KP * | KP - | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | KP 7 | KP 8 | KP 9 | KP + | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | | KP 4 | KP 5 | KP 6 | = | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | KP . | KP/KP*| KP- _ | KP+ = | | | KP 1 | KP 2 | KP 3 | KP Ent| | +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | ( | ) | [ { | ] } | | KP 0 | , | KP . | KP Ent| + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + | | | | | | + ,-------+-------+-------| |-------+-------+-------. + | | | | | | | | + | | |-------| |-------| | | + | | | | | | | | + `-----------------------' `-----------------------' +``` + +### Gaming +- Toggle layer with limited access to Function or Numbers layers +- Mainly used for gaming +- NKRO turned on by default +- Press and hold Ent/NS + Delete/Numbers2 to access Adjust layer + +``` +,------------------------------------------------. ,------------------------------------------------. +| | | | | | | | | | | | | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | | | | | | | | | | | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| LCtrl | | | | | | | | | | | | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| Shift | | | | | | | | | | | | Shift | +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | | | | | | | | | | + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + | ESC |xxxxxxx| | RAlt | RCtl | + ,-------+-------+-------| |-------+-------+-------. + | | | LAlt | | RGUI | Delete| Bspc | + | Space | Enter |-------| |-------| / | / | + | | | Bspc | | Ent/NS|Number2| Fn2 | + `-----------------------' `-----------------------' +``` + +### Adjust layer +- Momentary layer +- Press and hold Adjust key on the function row or Enter/Number + Delete/Number2 to access +- Gaming, Numpad, and NKRO are on toggle + +``` +,------------------------------------------------. ,------------------------------------------------. +| |Colemak| QWERTY| | Gaming| | | Numpad| | | | | RESET | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | | | | | | | | | | | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | | | | | | | NKRO | | | | | +|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+--------| +| | | | | | | | | | | | | | +`--------+-------+-------+-------+-------+-------' `-------+-------+-------+-------+-------+--------' + | | | | | | | | | | + `-------------------------------' `-------------------------------' + ,---------------. ,---------------. + | | | | | | + ,-------+-------+-------| |-------+-------+-------. + | | | | | | | | + | | |-------| |-------| | | + | | | | | | | | + `-----------------------' `-----------------------' + ``` + diff --git a/keyboards/kinesis/keymaps/tuesdayjohn/rules.mk b/keyboards/kinesis/keymaps/tuesdayjohn/rules.mk new file mode 100644 index 000000000000..cf63c44f4f0d --- /dev/null +++ b/keyboards/kinesis/keymaps/tuesdayjohn/rules.mk @@ -0,0 +1,19 @@ +# 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 +# + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes # Enable Tap Dancing function diff --git a/keyboards/kinesis/keymaps/tw1t611/config.h b/keyboards/kinesis/keymaps/tw1t611/config.h new file mode 100644 index 000000000000..271f48d0011b --- /dev/null +++ b/keyboards/kinesis/keymaps/tw1t611/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/kinesis/keymaps/tw1t611/keymap.c b/keyboards/kinesis/keymaps/tw1t611/keymap.c new file mode 100644 index 000000000000..ceb9d5e7d0be --- /dev/null +++ b/keyboards/kinesis/keymaps/tw1t611/keymap.c @@ -0,0 +1,64 @@ +#include QMK_KEYBOARD_H +#include "keymap_german.h" + +#define QWERTZ 0 +#define MOD 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[QWERTZ] = LAYOUT( + _______,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8, + _______,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , + KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , + DE_HASH,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B , + DE_TILD,DE_PIPE,DE_BSLS,DE_GRV, + KC_RCTL,KC_LALT, + KC_HOME, + KC_LSFT,MO(MOD),KC_BSPC , + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR,KC_SLCK,KC_PAUS,KC_FN0 ,RESET, + KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_AUDIO_MUTE, + KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_EQL , + KC_H ,KC_J ,KC_K ,KC_L ,DE_SLSH,DE_QUOT, + KC_N ,KC_M ,DE_COMM,DE_DOT ,DE_MINS,DE_PLUS, + DE_AE ,DE_OE, DE_UE, DE_SS, + KC_LGUI,KC_LCTL, + KC_END , + KC_DEL,KC_ENTER ,KC_SPC + ), +[MOD] = LAYOUT( + _______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, + _______,DE_AT ,DE_EURO,DE_LBRC,DE_RBRC,_______, + _______,DE_EXLM,DE_DLR ,DE_LPRN,DE_RPRN,_______, + _______,DE_CIRC,DE_AMPR,DE_LCBR,DE_RCBR,_______, + _______,_______,DE_LESS,DE_MORE, + _______,_______, + _______, + _______,_______,_______, + _______,_______,_______,_______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, + _______,KC_PGDOWN,KC_PGUP,_______,_______,DE_PERC, + KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,DE_QST ,DE_DQOT, + _______,_______,DE_SCLN,DE_COLN,DE_UNDS,DE_ASTR, + _______,_______,_______,_______, + _______,_______, + _______, + _______,_______ ,_______ + ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kinesis/keymaps/tw1t611/readme.md b/keyboards/kinesis/keymaps/tw1t611/readme.md new file mode 100644 index 000000000000..da033be1e950 --- /dev/null +++ b/keyboards/kinesis/keymaps/tw1t611/readme.md @@ -0,0 +1 @@ +# The default keymap for kinesis-advantage diff --git a/keyboards/kinesis/keymaps/tw1t611/rules.mk b/keyboards/kinesis/keymaps/tw1t611/rules.mk new file mode 100644 index 000000000000..7a331cd530cf --- /dev/null +++ b/keyboards/kinesis/keymaps/tw1t611/rules.mk @@ -0,0 +1,18 @@ +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + diff --git a/keyboards/kinesis/keymaps/xyverz/keymap.c b/keyboards/kinesis/keymaps/xyverz/keymap.c index 3c697f8f075a..842645d90501 100644 --- a/keyboards/kinesis/keymaps/xyverz/keymap.c +++ b/keyboards/kinesis/keymaps/xyverz/keymap.c @@ -16,10 +16,6 @@ enum custom_keycodes { KEYPAD }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases to make the keymap more uniform #define GUI_END GUI_T(KC_END) #define MED_DEL LT(_MEDIA, KC_DEL) diff --git a/keyboards/kira75/config.h b/keyboards/kira75/config.h index f4b1c7a5ce69..4f98c1df8ab7 100644 --- a/keyboards/kira75/config.h +++ b/keyboards/kira75/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F6, F7, C7, C6, B6, B5, B4, F5, F4, F1, F0, E6, B3, B2, B1, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/kira75/keymaps/default/config.h b/keyboards/kira75/keymaps/default/config.h index 2c852d181991..a3ed4f762a6e 100644 --- a/keyboards/kira75/keymaps/default/config.h +++ b/keyboards/kira75/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h index 18eb1de1f942..bea682173111 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h @@ -41,8 +41,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C6, B6, F0, F1, C7, B5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -#define DIODE_DIRECTION CUSTOM_MATRIX +/* COL2ROW, ROW2COL*/ +//#define DIODE_DIRECTION /* number of backlight levels */ #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/kmac/keymaps/default/config.h b/keyboards/kmac/keymaps/default/config.h index a3828f7d5d6e..09b8f1bc73a1 100644 --- a/keyboards/kmac/keymaps/default/config.h +++ b/keyboards/kmac/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/kmac/keymaps/default/keymap.c b/keyboards/kmac/keymaps/default/keymap.c index ca5975753944..3444f3cd5025 100644 --- a/keyboards/kmac/keymaps/default/keymap.c +++ b/keyboards/kmac/keymaps/default/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/kmac/keymaps/winkeyless/keymap.c b/keyboards/kmac/keymaps/winkeyless/keymap.c index d714e46d3274..0df0aaf42e31 100644 --- a/keyboards/kmac/keymaps/winkeyless/keymap.c +++ b/keyboards/kmac/keymaps/winkeyless/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/kmac/readme.md b/keyboards/kmac/readme.md index ec36c0a5c9bf..cd181a5f68a3 100644 --- a/keyboards/kmac/readme.md +++ b/keyboards/kmac/readme.md @@ -20,7 +20,7 @@ For the full Quantum feature list, see the [documentation](https://docs.qmk.fm). The KMAC are available with two different PCB layouts, a winkey version and a winkeyless version. A default keymap are provided for each versions of the PCB. -Depending on which PCB and keymap you would like to use, you will have to compile the firmware slightly differently. All of the commands should be run in the [keyboards/kmac](/keyboards/kmac) folder. +Depending on which PCB and keymap you would like to use, you will have to compile the firmware slightly differently. All of the commands should be run in the [qmk root](https://github.com/qmk/qmk_firmware/) folder. ### Winkey keymap diff --git a/keyboards/kmini/config.h b/keyboards/kmini/config.h index b2ee7185e4da..7a795d49df98 100755 --- a/keyboards/kmini/config.h +++ b/keyboards/kmini/config.h @@ -39,8 +39,8 @@ #define MATRIX_COL_PINS { } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -#define DIODE_DIRECTION CUSTOM_MATRIX +/* COL2ROW, ROW2COL*/ +//#define DIODE_DIRECTION /* number of backlight levels */ #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/knops/mini/config.h b/keyboards/knops/mini/config.h index a12ed2720efc..31291412768e 100644 --- a/keyboards/knops/mini/config.h +++ b/keyboards/knops/mini/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/knops/mini/keymaps/default/config.h b/keyboards/knops/mini/keymaps/default/config.h index 999d8876c2b6..6775ba671ef2 100644 --- a/keyboards/knops/mini/keymaps/default/config.h +++ b/keyboards/knops/mini/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/knops/readme.md b/keyboards/knops/readme.md index 563099b6d3e1..115e4d7c642e 100644 --- a/keyboards/knops/readme.md +++ b/keyboards/knops/readme.md @@ -7,4 +7,4 @@ * Maintainer: [Pawnerd](https://github.com/pawnerd) * Hardware Supported: * [`Mini`](mini/): Knops Mini -* Hardware Availability: [knops.io](https://www.knops.io/) \ No newline at end of file +* Hardware Availability: [knops.io](http://www.knops.io/) \ No newline at end of file diff --git a/keyboards/kona_classic/keymaps/ansi/keymap.c b/keyboards/kona_classic/keymaps/ansi/keymap.c index 3d2061e80d67..5b53f21c6077 100644 --- a/keyboards/kona_classic/keymaps/ansi/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi/keymap.c @@ -15,12 +15,12 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; #define _DEFAULT 0 #define _FN 1 @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_F3, KC_F4, 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_F5, KC_F6, 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_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ @@ -55,29 +55,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +71,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +79,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c b/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c index 6e281f9511f8..e9c0f326f3b8 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c @@ -15,12 +15,12 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; #define _DEFAULT 0 #define _FN 1 @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi_arrows( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_F3, KC_F4, 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_F5, KC_F6, 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_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(_FN), \ @@ -55,29 +55,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +71,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +79,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c index b74a6c3d709b..2ca5b79208c1 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c @@ -15,12 +15,12 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; #define _DEFAULT 0 #define _FN 1 @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi_arrows( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_F3, KC_F4, 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_F5, KC_F6, KC_LCAP, 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_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(_FN), \ @@ -55,29 +55,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +71,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +79,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/ansi_split/keymap.c b/keyboards/kona_classic/keymaps/ansi_split/keymap.c index d60e162f6bad..79be4e911f9e 100644 --- a/keyboards/kona_classic/keymaps/ansi_split/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_split/keymap.c @@ -15,21 +15,21 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi_split( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_F3, KC_F4, 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_F5, KC_F6, 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_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ @@ -55,29 +55,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +71,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +79,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c b/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c index 181f2f14cc21..1e39f4aae67f 100644 --- a/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c @@ -15,21 +15,21 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi_split_arrows( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_F3, KC_F4, 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_F5, KC_F6, 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_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(_FN), \ @@ -55,29 +55,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +71,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +79,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/default/config.h b/keyboards/kona_classic/keymaps/default/config.h index a3828f7d5d6e..09b8f1bc73a1 100644 --- a/keyboards/kona_classic/keymaps/default/config.h +++ b/keyboards/kona_classic/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/kona_classic/keymaps/default/keymap.c b/keyboards/kona_classic/keymaps/default/keymap.c index 84a2f9cbd73d..ebfe0f248228 100644 --- a/keyboards/kona_classic/keymaps/default/keymap.c +++ b/keyboards/kona_classic/keymaps/default/keymap.c @@ -15,12 +15,12 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; #define _DEFAULT 0 #define _FN 1 @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_all( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_F3, KC_F4, 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_F5, KC_F6, MO(_FN), 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_F7, KC_F8, KC_LSFT, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(_FN), \ @@ -55,29 +55,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +71,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +79,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/iso/keymap.c b/keyboards/kona_classic/keymaps/iso/keymap.c index ff9d3dcb8f52..0d37536039b8 100644 --- a/keyboards/kona_classic/keymaps/iso/keymap.c +++ b/keyboards/kona_classic/keymaps/iso/keymap.c @@ -15,21 +15,21 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_iso( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_F3, KC_F4, 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_ENT, \ KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, \ KC_F7, KC_F8, 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, \ @@ -55,29 +55,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +71,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +79,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/iso_arrows/keymap.c b/keyboards/kona_classic/keymaps/iso_arrows/keymap.c index 79e52360caeb..a7ab26a35d22 100644 --- a/keyboards/kona_classic/keymaps/iso_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_arrows/keymap.c @@ -15,21 +15,21 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_iso_arrows( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_F3, KC_F4, 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_ENT, \ KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, \ KC_F7, KC_F8, 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_UP, MO(_FN), \ @@ -55,29 +55,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +71,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +79,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/iso_split/keymap.c b/keyboards/kona_classic/keymaps/iso_split/keymap.c index 51d3297736ec..14935e992e1f 100644 --- a/keyboards/kona_classic/keymaps/iso_split/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_split/keymap.c @@ -15,21 +15,21 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_iso_split( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_F3, KC_F4, 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_ENT, \ KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, \ KC_F7, KC_F8, 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, \ @@ -55,29 +55,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +71,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +79,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c b/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c index ea81de4bcc2d..4eb184bae94c 100644 --- a/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c @@ -15,21 +15,21 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_iso_split_arrows( - KC_F1, KC_F2, F(0), 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_F1, KC_F2, SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_F3, KC_F4, 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_ENT, \ KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, \ KC_F7, KC_F8, 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_UP, MO(_FN), \ @@ -55,29 +55,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +71,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +79,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/launchpad/keymaps/default/keymap.c b/keyboards/launchpad/keymaps/default/keymap.c index 67103576d97a..c793349a5d7b 100644 --- a/keyboards/launchpad/keymaps/default/keymap.c +++ b/keyboards/launchpad/keymaps/default/keymap.c @@ -1,7 +1,5 @@ // Below layout is based upon /u/That-Canadian's planck layout -#include "launchpad.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -13,10 +11,6 @@ extern keymap_config_t keymap_config; #define _FUNC 15 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) @@ -25,9 +19,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-------------. - * | 1 | 2 | + * | 1 | 2 | * |------+------| - * | 3 | 4 | + * | 3 | 4 | * |------+------| * | 5 | 6 | * |------+------| @@ -43,9 +37,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Function * ,-------------. - * | Q |CALDEL| + * | Q |CALDEL| * |------+------| - * | A |TSKMGR| + * | A |TSKMGR| * |------+------| * | Z | X | * |------+------| @@ -62,5 +56,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_init_user(void) { - + } diff --git a/keyboards/launchpad/keymaps/default_rgb/config.h b/keyboards/launchpad/keymaps/default_rgb/config.h new file mode 100644 index 000000000000..cae1450c15bb --- /dev/null +++ b/keyboards/launchpad/keymaps/default_rgb/config.h @@ -0,0 +1,9 @@ +#pragma once + +/* Underlight Configuration */ +#define RGB_DI_PIN F4 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 2 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 \ No newline at end of file diff --git a/keyboards/launchpad/keymaps/default_rgb/keymap.c b/keyboards/launchpad/keymaps/default_rgb/keymap.c new file mode 100644 index 000000000000..50fef532c031 --- /dev/null +++ b/keyboards/launchpad/keymaps/default_rgb/keymap.c @@ -0,0 +1,76 @@ +// Below layout is based upon /u/That-Canadian's planck layout +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _RGB 1 +#define _FUNC 15 + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-------------. + * | 1 | 2 | + * |------+------| + * | 3 | 4 | + * |------+------| + * | 5 | 6 | + * |------+------| + * | FUNC | RGB | + * `-------------' + */ + [_QWERTY] = LAYOUT( \ + KC_1, KC_2, \ + KC_3, KC_4, \ + KC_5, KC_6, \ + MO(_FUNC), TG(_RGB) \ + ), + + /* RGB + * ,-------------. + * | Mode-| Mode+| + * |------+------| + * | HUE- | HUE+ | + * |------+------| + * | SAT- | SAT+ | + * |------+------| + * |RGBTOG| | + * `-------------' + */ + [_RGB] = LAYOUT( \ + RGB_RMOD, RGB_MOD, \ + RGB_HUD, RGB_HUI, \ + RGB_SAD, RGB_SAI, \ + RGB_TOG, KC_TRNS \ + ), + + /* Function + * ,-------------. + * | Q |CALDEL| + * |------+------| + * | A |TSKMGR| + * |------+------| + * | Z | X | + * |------+------| + * | | C | + * `-------------' + */ + [_FUNC] = LAYOUT( \ + KC_Q, CALTDEL, \ + KC_A, TSKMGR, \ + KC_Z, KC_X, \ + _______, KC_C \ + ) + +}; + +void matrix_init_user(void) {} diff --git a/keyboards/launchpad/keymaps/default_rgb/readme.md b/keyboards/launchpad/keymaps/default_rgb/readme.md new file mode 100644 index 000000000000..3f15ff9bc392 --- /dev/null +++ b/keyboards/launchpad/keymaps/default_rgb/readme.md @@ -0,0 +1,41 @@ +# Launch Pad + +![Launch Pad](https://i.imgur.com/WVTe0Ku.png) + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +A budget-minded, 4-8 key macro-pad with built in legs, plate & case. + +Supports MX & Alps switches. 2x 1u or 1x 2u supported for each row. + +Supports 2u PCB-Mount stabilizers. + +Runs off of 1x Pro Micro & 8x diodes (1n4148). + +Optional "Reset" switch can be used on the PCB. + +A fantastic project for beginners to learn to solder, veteran's of the hobby who want to add an easy macro-pad to their collection, and everyone in between. + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +Make example for this keyboard (after setting up your build environment): + + make launchpad/rev1: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. + +# Under Glow + +![Underglow](https://i.imgur.com/3zFIOmu.jpg) + +SpaceCat now provides an underglow add-on kit. Please refer to the picture above for wiring. + +Make example for this keyboard (after setting up your build environment): + + make launchpad/rev1:default_rgb + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +Due to PCB tolerance issues outside of our control, the snap-apart legs included on the PCB may need extra padding to prevent a small amount of wobbling once placed properly. We have included small, clear, and semi-permanent "glue dots" in each order (PCB Only -and- Full Kit) to help with this. You may also use plastic wrap, tape, Elmer's glue, hot glue, rubber cement, etc. We advise against using anything more "permanent" in case you wish to make changes to your Launch Pad in the future. It is also best to attach legs after all of your soldering and building is finished, to get the most accurate feel for your Launch Pad. + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- diff --git a/keyboards/launchpad/keymaps/default_rgb/rules.mk b/keyboards/launchpad/keymaps/default_rgb/rules.mk new file mode 100644 index 000000000000..164232f3398c --- /dev/null +++ b/keyboards/launchpad/keymaps/default_rgb/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. \ No newline at end of file diff --git a/keyboards/lazydesigners/dimple/config.h b/keyboards/lazydesigners/dimple/config.h new file mode 100644 index 000000000000..0f7a8798eb36 --- /dev/null +++ b/keyboards/lazydesigners/dimple/config.h @@ -0,0 +1,66 @@ +/* +Copyright 2019 Erovia + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0040 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LazyDesigners +#define PRODUCT Dimple +#define DESCRIPTION A 40% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +/* RBG underglow */ +#define RGB_DI_PIN B7 +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_SLEEP + #define RGBLED_NUM 50 + /* #define RGBLIGHT_HUE_STEP 8 */ + /* #define RGBLIGHT_SAT_STEP 8 */ + /* #define RGBLIGHT_VAL_STEP 8 */ +#endif + +/* CapsLock LED */ +#define BACKLIGHT_PIN E6 +#ifdef BACKLIGHT_PIN + #define BACKLIGHT_LEVELS 6 +#endif diff --git a/keyboards/lazydesigners/dimple/dimple.c b/keyboards/lazydesigners/dimple/dimple.c new file mode 100644 index 000000000000..5f9571651682 --- /dev/null +++ b/keyboards/lazydesigners/dimple/dimple.c @@ -0,0 +1,24 @@ +/* Copyright 2019 Erovia + * + * 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 . + */ +#include "dimple.h" + +void dimple_led_on() { + DDRE |= (1 << 6); PORTE &= ~(1 << 6); +} + +void dimple_led_off() { + DDRE &= ~(1 << 6); PORTE &= ~(1 << 6); +} diff --git a/keyboards/lazydesigners/dimple/dimple.h b/keyboards/lazydesigners/dimple/dimple.h new file mode 100644 index 000000000000..ba8a413ed66b --- /dev/null +++ b/keyboards/lazydesigners/dimple/dimple.h @@ -0,0 +1,46 @@ +/* Copyright 2019 Erovia + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* + * ,---------------------------------------------------------------. + * | | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------' + */ + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, \ + K300, K302, K303, K304, K306, K307, K308, K309 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, KC_NO, K306, K307, K308, K309, KC_NO, KC_NO } \ +} + + +void dimple_led_on(void); +void dimple_led_off(void); diff --git a/keyboards/lazydesigners/dimple/info.json b/keyboards/lazydesigners/dimple/info.json new file mode 100644 index 000000000000..db5137e1f85f --- /dev/null +++ b/keyboards/lazydesigners/dimple/info.json @@ -0,0 +1,56 @@ +{ + "keyboard_name": "Dimple", + "url": "http://lazydesigners.cn", + "maintainer": "Erovia", + "width": 12.5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"Back
Space", "x":11, "y":0, "w":1.5}, + {"label":"Tab", "x":0, "y":1, "w":1.25}, + {"label":"A", "x":1.25, "y":1}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1}, + {"label":"F", "x":4.25, "y":1}, + {"label":"G", "x":5.25, "y":1}, + {"label":"H", "x":6.25, "y":1}, + {"label":"J", "x":7.25, "y":1}, + {"label":"K", "x":8.25, "y":1}, + {"label":"L", "x":9.25, "y":1}, + {"label":"'", "x":10.25, "y":1}, + {"label":"Enter", "x":11.25, "y":1, "w":1.25}, + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":",", "x":8.75, "y":2}, + {"label":"Up", "x":9.75, "y":2}, + {"label":".", "x":10.75, "y":2, "w":1.75}, + {"label":"Ctrl", "x":0.75, "y":3}, + {"label":"Gui", "x":1.75, "y":3}, + {"label":"Alt", "x":2.75, "y":3}, + {"label":"Space", "x":3.75, "y":3, "w":2.25}, + {"label":"Space", "x":6, "y":3, "w":2.75}, + {"label":"Left", "x":8.75, "y":3}, + {"label":"Down", "x":9.75, "y":3}, + {"label":"Right", "x":10.75, "y":3} + ] + } + } +} diff --git a/keyboards/lazydesigners/dimple/keymaps/default/keymap.c b/keyboards/lazydesigners/dimple/keymaps/default/keymap.c new file mode 100644 index 000000000000..e5a9c8466ac8 --- /dev/null +++ b/keyboards/lazydesigners/dimple/keymaps/default/keymap.c @@ -0,0 +1,136 @@ +/* Copyright 2019 Erovia + * + * 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 . + */ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +// Act as Shift on hold and as CapsLock on tap +#define SFT_CPS LSFT_T(KC_CAPS) +// Left space on tap, LOWER on hold +#define SPC_LOW LT(_LOWER, KC_SPC) +// Left space on tap, UPPER on hold +#define SPC_UPR LT(_RAISE, KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * ,---------------------------------------------------------------. + * |Esc | Q | W | E | R | T | Y | U | I | O | P | Bspc | + * |---------------------------------------------------------------| + * | Tab | A | S | D | F | G | H | J | K | L | ' |Enter | + * |---------------------------------------------------------------| + * | Shift | Z | X | C | V | B | N | M | , | Up | . | + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt | Spc/Lwr | Spc/Rse |Left|Down|Rght| + * `-----------------------------------------------------' + */ + + [_QWERTY] = LAYOUT( + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + SFT_CPS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_UP, KC_DOT, + KC_LCTL, KC_LGUI, KC_LALT, SPC_LOW, SPC_UPR, KC_LEFT, KC_DOWN, KC_RGHT + ), + +/* + * ,---------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |---------------------------------------------------------------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |---------------------------------------------------------------| + * | | F7 | F8 | F9 |F10 |F11 |F12 | | ; |PgUp| / | + * |---------------------------------------------------------------| + * | | | | | |Home|PgDn|End | + * `-----------------------------------------------------' + */ + + [_LOWER] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, + 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_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_SCLN, KC_PGUP, KC_SLSH, + KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END + ), + +/* + * ,---------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |---------------------------------------------------------------| + * | Ins | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |---------------------------------------------------------------| + * | | F7 | F8 | F9 |F10 |F11 |F12 | | | | | + * |---------------------------------------------------------------| + * |VolD|Mute|VolU| | | | | | + * `-----------------------------------------------------' + */ + + [_RAISE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_INS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_NO, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_NO, + KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO + ), + +/* + * ,---------------------------------------------------------------. + * |EEPR|RST | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | + * |---------------------------------------------------------------| + * |RGB-|RGB |RGB+| | | | | | + * `-----------------------------------------------------' + */ + + [_ADJUST] = LAYOUT( + EEP_RST, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + RGB_VAD, RGB_TOG, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; + +void led_set_user(uint8_t usb_led) { +if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + dimple_led_on(); + } else { + dimple_led_off(); + } +} + +uint32_t layer_state_set_user(uint32_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + switch (biton32(state)) { + case _LOWER: + rgblight_sethsv_noeeprom(HSV_GREEN); + break; + case _RAISE: + rgblight_sethsv_noeeprom(HSV_GOLD); + break; + case _ADJUST: + rgblight_sethsv_noeeprom(HSV_RED); + break; + default: + rgblight_sethsv_noeeprom(HSV_WHITE); + break; + } + return state; +} diff --git a/keyboards/lazydesigners/dimple/keymaps/default/readme.md b/keyboards/lazydesigners/dimple/keymaps/default/readme.md new file mode 100644 index 000000000000..c334b6c36750 --- /dev/null +++ b/keyboards/lazydesigners/dimple/keymaps/default/readme.md @@ -0,0 +1,60 @@ +# The default keymap for Dimple + +**Features** + +* Shift acts as CapsLock when tapped +* Left space: space on tap, Lower layer on hold +* Right space: space on tap, Raise layer on hold +* Both space: Adjust layer on hold + +## QWERTY (Normal) Layer +``` + ,---------------------------------------------------------------. + |Esc | Q | W | E | R | T | Y | U | I | O | P | Bspc | + |---------------------------------------------------------------| + | Tab | A | S | D | F | G | H | J | K | L | ' |Enter | + |---------------------------------------------------------------| + | Shift | Z | X | C | V | B | N | M | , | Up | . | + |---------------------------------------------------------------| + |Ctrl|Gui |Alt | Spc/Lwr | Spc/Rse |Left|Down|Rght| + `-----------------------------------------------------' +``` + +## Lower Layer +``` + ,---------------------------------------------------------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + |---------------------------------------------------------------| + | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + |---------------------------------------------------------------| + | | F7 | F8 | F9 |F10 |F11 |F12 | | ; |PgUp| / | + |---------------------------------------------------------------| + | | | | | |Home|PgDn|End | + `-----------------------------------------------------' +``` + +## Raise Layer +``` + ,---------------------------------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + |---------------------------------------------------------------| + | Ins | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + |---------------------------------------------------------------| + | | F7 | F8 | F9 |F10 |F11 |F12 | | | | | + |---------------------------------------------------------------| + |VolD|Mute|VolU| | | | | | + `-----------------------------------------------------' +``` + +## Adjust Layer +``` +,---------------------------------------------------------------. + |EEPR|RST | | | | | | | | | | | + |---------------------------------------------------------------| + | | | | | | | | | | | | | + |---------------------------------------------------------------| + | | | | | | | | | | | | + |---------------------------------------------------------------| + |RGB-|RGB |RGB+| | | | | | + `-----------------------------------------------------' +``` diff --git a/keyboards/lazydesigners/dimple/readme.md b/keyboards/lazydesigners/dimple/readme.md new file mode 100644 index 000000000000..04b4b438d62a --- /dev/null +++ b/keyboards/lazydesigners/dimple/readme.md @@ -0,0 +1,17 @@ +# Dimple + +![dimple](https://i.loli.net/2019/03/29/5c9daf903cad9.jpg) + +A 40% custom keyboard designed and produced by [LazyDesigners](http://lazydesigners.cn). + +Keyboard Maintainer: [Erovia](https://github.com/Erovia) +Hardware Supported: Dimple +Hardware Availability: Check for GBs on [Geekhack](https://geekhack.org) and on [LazyDesigner's homepage.](http://lazydesigners.cn) + +Make example for this keyboard (after setting up your build environment): + + make lazydesigners/dimple:default:dfu + +To enter the bootloader, either short the pins on the PCB or the RESET button on the FN layer. + +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). diff --git a/keyboards/lazydesigners/dimple/rules.mk b/keyboards/lazydesigners/dimple/rules.mk new file mode 100644 index 000000000000..a818e871c69f --- /dev/null +++ b/keyboards/lazydesigners/dimple/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c b/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c new file mode 100644 index 000000000000..a792d34fbd3b --- /dev/null +++ b/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c @@ -0,0 +1,79 @@ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _L1, + _L2 +}; + +// Act as Shift on hold and as CapsLock on tap +#define SFT_CPS LSFT_T(KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------. ,--------------. + * |Esc | Q | W | E | R | T | Y | U | I | O | P |Bspc| | 7 | 8 | 9 | + * |-----------------------------------------------------------| |--------------| + * | Tab | A | S | D | F | G | H | J | K | L | Enter | | 4 | 5 | 6 | + * |-----------------------------------------------------------| |--------------| + * | Shift | Z | X | C | V | B | N | M | , | . | L2 | | 1 | 2 | 3 | + * |-----------------------------------------------------------| |--------------| + * | Ctrl |Gui | Alt | Space | Space | RAlt |RCtrl| L1 | | 0 | . |Entr| + * `-----------------------------------------------------------' `--------------' + */ + +[_QWERTY] = LAYOUT( +KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_P7, KC_P8, KC_P9, +KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_P4, KC_P5, KC_P6, +SFT_CPS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(_L2), KC_P1, KC_P2, KC_P3, +KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_L1), KC_0, KC_PDOT, KC_PENT +), + +/* L1 + * ,-----------------------------------------------------------. ,--------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |Del | |NMLK| | / | + * |-----------------------------------------------------------| |--------------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | | [ | ] | \ | | - | = | * | + * |-----------------------------------------------------------| |--------------| + * | | F7 | F8 | F9 |F10 |F11 |F12 | , | . | / | | | | | - | + * |-----------------------------------------------------------| |--------------| + * | | | | | | ; | ' | | | | | + | + * `-----------------------------------------------------------' `--------------' + */ + +[_L1] = LAYOUT( +KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_NUMLOCK, _______, KC_PSLS, +_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_LBRC, KC_RBRC, KC_BSLASH, KC_MINS, KC_EQL, KC_PAST, +_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, KC_PMNS, +_______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, _______, _______, _______, KC_PPLS +), + +/* L2 + * ,-----------------------------------------------------------. ,--------------. + * |RST | | | | | | | | | |Ins |Del | |Home|PgUp| | + * |-----------------------------------------------------------| |--------------| + * | |Prev|Play|Next| | | |VolD|Mute|VolU| | |End |PgDn| | + * |-----------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | up | | + * |-----------------------------------------------------------| |--------------| + * |EEPRST| | | | | | | | |left|down| rt | + * `-----------------------------------------------------------' `--------------' + */ + +[_L2] = LAYOUT( +RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, KC_HOME, KC_PGUP, _______, +_______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_END, KC_PGDN, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, +EEP_RST, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT +) +}; + +void led_set_user(uint8_t usb_led) { + // Turn LED On/Off for Caps Lock + if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) { + the50_led_on(); + } else { + the50_led_off(); + } +} diff --git a/keyboards/lazydesigners/the60/config.h b/keyboards/lazydesigners/the60/config.h new file mode 100644 index 000000000000..a767d1dc8a14 --- /dev/null +++ b/keyboards/lazydesigners/the60/config.h @@ -0,0 +1,38 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LazyDesigners +#define PRODUCT THE60 +#define DESCRIPTION A 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 6 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 diff --git a/keyboards/lazydesigners/the60/info.json b/keyboards/lazydesigners/the60/info.json new file mode 100644 index 000000000000..4fef5a098c4d --- /dev/null +++ b/keyboards/lazydesigners/the60/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "THE60", + "url": "http://lazydesigners.cn", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_split_spc_split_bspc": { + "key_count": 66, + "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":"Home", "x":13, "y":0}, + {"label":"Del", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"|", "x":11.5, "y":1, "w":1.5}, + {"label":"}", "x":13, "y":1}, + {"label":"{", "x":14, "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":"Enter", "x":10.75, "y":2, "w":2.25}, + {"label":":", "x":13, "y":2}, + {"label":"\"", "x":14, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"Shift", "x":11.25, "y":3, "w":1.75}, + {"label":"Up", "x":13, "y":3}, + {"label":"/", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":2.75}, + {"label":"Alt", "x":8.75, "y":4, "w":1.25}, + {"label":"Menu", "x":10, "y":4}, + {"label":"Fn", "x":11, "y":4}, + {"label":"Left", "x":12, "y":4}, + {"label":"Down", "x":13, "y":4}, + {"label":"Right", "x":14, "y":4}] + } + } +} diff --git a/keyboards/lazydesigners/the60/keymaps/default/keymap.c b/keyboards/lazydesigners/the60/keymaps/default/keymap.c new file mode 100644 index 000000000000..8a95b447489f --- /dev/null +++ b/keyboards/lazydesigners/the60/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,--------------------------------------------------------------------------. + * |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Home|Del | + * |--------------------------------------------------------------------------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | BsPc | [ | ] | + * |--------------------------------------------------------------------------| + * |CapsLock | A | S | D | F | G | H | J | K | L | Enter | ; | ' | + * |--------------------------------------------------------------------------| + * | Shift | Z | X | C | V | B | N | M | , | . | Shift | Up | / | + * |--------------------------------------------------------------------------| + * | Ctrl | Gui | Alt | Space | Space | Alt |Menu| Fn |Left|Down|Rght| + * `--------------------------------------------------------------------------' + */ + +[_QWERTY] = LAYOUT_split_spc_split_bspc( +KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_HOME, 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_BSPC, KC_LBRC, KC_RBRC, +KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, 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_RSFT, KC_UP, KC_SLSH, +KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_RALT, KC_APP, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT +), + +/* FN + * ,--------------------------------------------------------------------------. + * |RST | | | | | | | | | | | | |End |Ins | + * |--------------------------------------------------------------------------| + * | | | | | | | | | | | | |PgUp|PgDn| + * |--------------------------------------------------------------------------| + * | | |Prev|Play|Next| |VolD|Mute|VolU| | | | | + * |--------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------| + * |EEPRST| | | | | | | | | | | + * `--------------------------------------------------------------------------' + */ + +[_FN] = LAYOUT_split_spc_split_bspc( +RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_END, KC_INS, +XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, +XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, +EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +) +}; + diff --git a/keyboards/lazydesigners/the60/keymaps/default/readme.md b/keyboards/lazydesigners/the60/keymaps/default/readme.md new file mode 100644 index 000000000000..7a5a10a34ac9 --- /dev/null +++ b/keyboards/lazydesigners/the60/keymaps/default/readme.md @@ -0,0 +1,32 @@ +# Default keymap for THE60 + + +## QWERTY (Normal) Layer +``` + ,--------------------------------------------------------------------------. + |Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Home|Del | + |--------------------------------------------------------------------------| + | Tab | Q | W | E | R | T | Y | U | I | O | P | BsPc | [ | ] | + |--------------------------------------------------------------------------| + |CapsLock | A | S | D | F | G | H | J | K | L | Enter | ; | ' | + |--------------------------------------------------------------------------| + | Shift | Z | X | C | V | B | N | M | , | . | Shift | Up | / | + |--------------------------------------------------------------------------| + | Ctrl | Gui | Alt | Space | Space | Alt |Menu| Fn |Left|Down|Rght| + `--------------------------------------------------------------------------' +``` + +## FN layer +``` + ,--------------------------------------------------------------------------. + |RST | | | | | | | | | | | | |End |Ins | + |--------------------------------------------------------------------------| + | | | | | | | | | | | | |PgUp|PgDn| + |--------------------------------------------------------------------------| + | | |Prev|Play|Next| |VolD|Mute|VolU| | | | | + |--------------------------------------------------------------------------| + | | | | | | | | | | | | | | + |--------------------------------------------------------------------------| + |EEPRST| | | | | | | | | | | + `--------------------------------------------------------------------------' +``` diff --git a/keyboards/lazydesigners/the60/readme.md b/keyboards/lazydesigners/the60/readme.md new file mode 100644 index 000000000000..bf7cc771af35 --- /dev/null +++ b/keyboards/lazydesigners/the60/readme.md @@ -0,0 +1,18 @@ +# THE60 + +![THE60](https://cdn.discordapp.com/attachments/536190211240099840/549506683064287243/image0.jpg) + +A 60% custom PCB and case designed and produced by [LazyDesigners](http://lazydesigners.cn). +The PCB allows one to test a 40% layout in a 60% case. + +Keyboard Maintainer: QMK Community +Hardware Supported: THE60 PCB +Hardware Availability: Check for GBs on [Geekhack](https://geekhack.org) and on [LazyDesigner's homepage.](http://lazydesigners.cn) + +Make example for this keyboard (after setting up your build environment): + + make lazydesigners/the60:default:dfu + +To enter the bootloader, either short the pins on the PCB, use the RESET button on the FN layer or hold the Esc key while plugging in your keyboard. + +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). diff --git a/keyboards/lazydesigners/the60/rules.mk b/keyboards/lazydesigners/the60/rules.mk new file mode 100644 index 000000000000..76fb44b2c884 --- /dev/null +++ b/keyboards/lazydesigners/the60/rules.mk @@ -0,0 +1,51 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/lazydesigners/the60/the60.c b/keyboards/lazydesigners/the60/the60.c new file mode 100644 index 000000000000..09eeb63cf00b --- /dev/null +++ b/keyboards/lazydesigners/the60/the60.c @@ -0,0 +1,2 @@ +#include "the60.h" + diff --git a/keyboards/lazydesigners/the60/the60.h b/keyboards/lazydesigners/the60/the60.h new file mode 100644 index 000000000000..e3708461c4ef --- /dev/null +++ b/keyboards/lazydesigners/the60/the60.h @@ -0,0 +1,32 @@ +#pragma once + +#include "quantum.h" + +/* + * ,--------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------| + * | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------| + * | | | | | | | | | | | | + * `--------------------------------------------------------------------------' + */ + +#define LAYOUT_split_spc_split_bspc( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K402, K403, K404, K407, K409, K410, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, KC_NO, KC_NO, K407, KC_NO, K409, K410, K411, K412, K413, K414 } \ +} + diff --git a/keyboards/lets_split/keymaps/DE_simple/keymap.c b/keyboards/lets_split/keymaps/DE_simple/keymap.c index e801c241e1f1..32383ec67b34 100644 --- a/keyboards/lets_split/keymaps/DE_simple/keymap.c +++ b/keyboards/lets_split/keymaps/DE_simple/keymap.c @@ -19,10 +19,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwertz diff --git a/keyboards/lets_split/keymaps/DE_simple/readme.md b/keyboards/lets_split/keymaps/DE_simple/readme.md index 972cd6c398fe..c5576d6233dd 100644 --- a/keyboards/lets_split/keymaps/DE_simple/readme.md +++ b/keyboards/lets_split/keymaps/DE_simple/readme.md @@ -21,15 +21,15 @@ Layout `-----------------------------------------------------------------------------------' - Qwerty + Lower ,-----------------------------------------------------------------------------------. - | Esc | Q | W | E | R | T | Z | U | I | O | P | Bksp | + | ° | ! | " | § | $ | % | & | / | ( | ) | = | Bksp | |------+------+------+------+------+-------------+------+------+------+------+------| - | Tab | A | S | D | F | G | H | J | K | L | + | # | + | Del | F1 | F2 | F3 | F4 | F5 | F6 | @ | € | ü | ? | ´ | |------+------+------+------+------+------|------+------+------+------+------+------| - | Shift| Y | X | C | V | B | N | M | , | . | - |Enter | + | Shift| F7 | F8 | F9 | F10 | F11 | F12 | | | ö | ä | |Enter | |------+------+------+------+------+------+------+------+------+------+------+------| - | Ctrl | Alt | AltGr| GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + | | | | | | | | Next | Vol- | Vol+ | Play | `-----------------------------------------------------------------------------------' diff --git a/keyboards/lets_split/keymaps/OLED_sample/keymap.c b/keyboards/lets_split/keymaps/OLED_sample/keymap.c index 5eccbcf1ac3b..67a20971cea9 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/keymap.c +++ b/keyboards/lets_split/keymaps/OLED_sample/keymap.c @@ -43,10 +43,6 @@ enum macro_keycodes { KC_SAMPLEMACRO, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO //Macros #define M_SAMPLE M(KC_SAMPLEMACRO) diff --git a/keyboards/lets_split/keymaps/adam/keymap.c b/keyboards/lets_split/keymaps/adam/keymap.c index b986ab780bd7..a5ad8e32e8bb 100644 --- a/keyboards/lets_split/keymaps/adam/keymap.c +++ b/keyboards/lets_split/keymaps/adam/keymap.c @@ -11,10 +11,6 @@ extern keymap_config_t keymap_config; #define FLOCK 1 // symbols arrows and F keys on F held down #define JLOCK 2 // same as Flock but with fall thru J and mapped to J held down -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/cpeters1982/keymap.c b/keyboards/lets_split/keymaps/cpeters1982/keymap.c index 9c3eb9475217..8fa2bf6c042a 100644 --- a/keyboards/lets_split/keymaps/cpeters1982/keymap.c +++ b/keyboards/lets_split/keymaps/cpeters1982/keymap.c @@ -37,12 +37,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; */ - - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/dlaroe/keymap.c b/keyboards/lets_split/keymaps/dlaroe/keymap.c index b2282e0fe8c1..65dad2d3d818 100644 --- a/keyboards/lets_split/keymaps/dlaroe/keymap.c +++ b/keyboards/lets_split/keymaps/dlaroe/keymap.c @@ -31,10 +31,6 @@ enum custom_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/fabian/keymap.c b/keyboards/lets_split/keymaps/fabian/keymap.c index 37053a8e4bfe..518eb0e73119 100644 --- a/keyboards/lets_split/keymaps/fabian/keymap.c +++ b/keyboards/lets_split/keymaps/fabian/keymap.c @@ -40,9 +40,6 @@ enum custom_keycodes { EXT_PLV, }; -#define XXXXXXX KC_NO -#define _______ KC_TRNS - #define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) diff --git a/keyboards/lets_split/keymaps/henxing/keymap.c b/keyboards/lets_split/keymaps/henxing/keymap.c index aab75dc543a8..e3d7885cb87c 100644 --- a/keyboards/lets_split/keymaps/henxing/keymap.c +++ b/keyboards/lets_split/keymaps/henxing/keymap.c @@ -17,10 +17,6 @@ enum custom_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* diff --git a/keyboards/lets_split/keymaps/khord/keymap.c b/keyboards/lets_split/keymaps/khord/keymap.c index 41042065d639..4209efabed7a 100644 --- a/keyboards/lets_split/keymaps/khord/keymap.c +++ b/keyboards/lets_split/keymaps/khord/keymap.c @@ -17,10 +17,6 @@ enum custom_keycodes { SMSPC1 }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Tap Dance Declarations enum { SFT_CAP = 0 diff --git a/keyboards/lets_split/keymaps/kris/keymap.c b/keyboards/lets_split/keymaps/kris/keymap.c index 34d2e86da03c..ee47d7999a06 100644 --- a/keyboards/lets_split/keymaps/kris/keymap.c +++ b/keyboards/lets_split/keymaps/kris/keymap.c @@ -23,10 +23,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/krusli/keymap.c b/keyboards/lets_split/keymaps/krusli/keymap.c index 9b49bab3b41d..002d22d302d5 100644 --- a/keyboards/lets_split/keymaps/krusli/keymap.c +++ b/keyboards/lets_split/keymaps/krusli/keymap.c @@ -25,10 +25,6 @@ enum custom_keycodes { NUMPAD }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/mbsurfer/keymap.c b/keyboards/lets_split/keymaps/mbsurfer/keymap.c index 5f6589337f8a..da49f0c7aaf4 100644 --- a/keyboards/lets_split/keymaps/mbsurfer/keymap.c +++ b/keyboards/lets_split/keymaps/mbsurfer/keymap.c @@ -24,10 +24,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Tap Dance Declarations enum { SFT_CAP = 0, diff --git a/keyboards/lets_split/keymaps/mjt/keymap.c b/keyboards/lets_split/keymaps/mjt/keymap.c index 2c61cce3bc2c..b0394659cc57 100644 --- a/keyboards/lets_split/keymaps/mjt/keymap.c +++ b/keyboards/lets_split/keymaps/mjt/keymap.c @@ -23,10 +23,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/normacos/keymap.c b/keyboards/lets_split/keymaps/normacos/keymap.c index 8902b7b56f5a..b6b6b1c141b9 100644 --- a/keyboards/lets_split/keymaps/normacos/keymap.c +++ b/keyboards/lets_split/keymaps/normacos/keymap.c @@ -26,10 +26,6 @@ enum custom_keycodes { CHROME }; -// Fillers (to make layering more clear) -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Mod taps #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift #define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control diff --git a/keyboards/lets_split/keymaps/piemod/README.md b/keyboards/lets_split/keymaps/piemod/README.md index f2a051da14ec..6bae7e76d940 100644 --- a/keyboards/lets_split/keymaps/piemod/README.md +++ b/keyboards/lets_split/keymaps/piemod/README.md @@ -17,9 +17,6 @@ A keymap for users that need: Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod. -### Keymap - -![PieMod Keymap](./keymap.png) ### TODO diff --git a/keyboards/lets_split/keymaps/pitty/keymap.c b/keyboards/lets_split/keymaps/pitty/keymap.c index 0fd4c1384f1c..d723e0c026d7 100644 --- a/keyboards/lets_split/keymaps/pitty/keymap.c +++ b/keyboards/lets_split/keymaps/pitty/keymap.c @@ -20,11 +20,6 @@ enum custom_keycodes { VIM, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/poker/keymap.c b/keyboards/lets_split/keymaps/poker/keymap.c index cce0ca47411f..7b202409e307 100644 --- a/keyboards/lets_split/keymaps/poker/keymap.c +++ b/keyboards/lets_split/keymaps/poker/keymap.c @@ -25,10 +25,6 @@ enum custom_keycodes { ADJUST }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/pyrol/keymap.c b/keyboards/lets_split/keymaps/pyrol/keymap.c index c5227f5afaa2..1a6cd7586639 100644 --- a/keyboards/lets_split/keymaps/pyrol/keymap.c +++ b/keyboards/lets_split/keymaps/pyrol/keymap.c @@ -24,10 +24,6 @@ enum custom_keycodes { GAME, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split/keymaps/smt/keymap.c b/keyboards/lets_split/keymaps/smt/keymap.c index 090cf78b7cb6..1b9b448008e2 100644 --- a/keyboards/lets_split/keymaps/smt/keymap.c +++ b/keyboards/lets_split/keymaps/smt/keymap.c @@ -23,10 +23,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/lets_split/keymaps/that_canadian/keymap.c b/keyboards/lets_split/keymaps/that_canadian/keymap.c index 239a8d3beee2..07a165ad89f9 100644 --- a/keyboards/lets_split/keymaps/that_canadian/keymap.c +++ b/keyboards/lets_split/keymaps/that_canadian/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -160,4 +156,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/lets_split/keymaps/vim-mode/config.h b/keyboards/lets_split/keymaps/vim-mode/config.h new file mode 100644 index 000000000000..25512a5c97c1 --- /dev/null +++ b/keyboards/lets_split/keymaps/vim-mode/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// comment the following lines if sounds are not desired +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + diff --git a/keyboards/lets_split/keymaps/vim-mode/keymap.c b/keyboards/lets_split/keymaps/vim-mode/keymap.c new file mode 100644 index 000000000000..4b25aa5dc756 --- /dev/null +++ b/keyboards/lets_split/keymaps/vim-mode/keymap.c @@ -0,0 +1,196 @@ +#include QMK_KEYBOARD_H + +// 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_names { + _QWERTY = 0, + _COLEMAK = 1, + _DVORAK = 2, + _LOWER = 3, + _RAISE = 4, + _ADJUST = 16 +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear + +// keys in multiple locations: +// - parenteses in both raise and lower +// - asterix in raise and twice on lower (normal and numpad) +// - minus/plus twice on lower (normal and numpad) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| PrtSc| GUI | Alt |Lower | Tab |Space |Raise | VolDn| VolUp| Pl/Ps| Next | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12 ( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_LCTRL,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 , \ + ADJUST, KC_PSCR, KC_LGUI, KC_LALT, LOWER, KC_TAB, KC_SPC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| PrtSc| GUI | Alt |Lower | Tab |Space |Raise | VolDn| VolUp| Pl/Ps| Next | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( \ + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_PSCR, KC_LGUI, KC_LALT, LOWER, KC_TAB, KC_SPC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Esc | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| PrtSc| GUI | Alt |Lower | Tab |Space |Raise | VolDn| VolUp| Pl/Ps| Next | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12( \ + KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_PSCR, KC_LGUI, KC_LALT, LOWER, KC_TAB, KC_SPC, RAISE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | | * | ( | ) | | | 7 | 8 | 9 | * | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | _ | + | { | } | | | 4 | 5 | 6 | - | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | - | = | [ | ] | | | 1 | 2 | 3 | + | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | Alt | | | | 0 | . | Enter| | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( \ + KC_GRAVE,_______, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, KC_7, KC_8, KC_9, KC_ASTR, _______, \ + KC_DEL, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, KC_MINS, KC_BSLS, \ + KC_NLCK, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, _______, KC_1, KC_2, KC_3, KC_PLUS, _______, \ + _______, _______, _______, KC_LALT, _______, _______, _______, _______, KC_0, KC_DOT, KC_ENT, _______ \ +), + +/* Raise: featuring vim-style hjkl arrow keys + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | Left | Down | Up |Right | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F6 | F7 | F8 | F9 | F10 | Home | PgDn | PgUp | End | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F11 | F12 | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_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_DEL, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, KC_PIPE, \ + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, \ + _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| |QWERTY|Colemk|Dvorak| | Prev | Pl/Ps| Next | | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Mute | VolDn| VolUp| | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, QWERTY, COLEMAK, DVORAK, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/lets_split/keymaps/vim-mode/readme.md b/keyboards/lets_split/keymaps/vim-mode/readme.md new file mode 100644 index 000000000000..9bb6131b1c45 --- /dev/null +++ b/keyboards/lets_split/keymaps/vim-mode/readme.md @@ -0,0 +1,22 @@ +# Vim-mode Keymap + +This layout is designed with the vim philosophy in mind: You should be able to do your work without lifting your hands off the keyboard. Some movement keys (like the arrow keys) have been directly borrowed from vim, and other keys (like the numpad) have been placed in easy-to-reach areas, following the vim philosophy. + +Based on the default keymap. + +## Features: + +* Vim-like `hjkl` arrow keys in raise layer. +* Right-hand numpad in lower layer. +* All brackets and the most frequently used operators are intuitively handled in the lower layer for easy access. +* Ctrl is just to the left of the left-hand pinky. +* The raise layer provides the symbol bar on the first row that you're used to. +* Media keys available in adjust layer (complete) and in the bottom-right corner of the default layer (frequently used). +* The two keys that are traditionally the keys for `space` behave differently. The right-hand key inserts a space. The left-hand key inserts a tab. This is intuitive: Both keys that would normally make up the spacebar are increasing the space, but in different manners. + + +## Some things to look out for: + +* Page up, page down, home, and end have been placed directly under the `hjkl` arrow keys, and each key moves the same direction as the key above it. (for instance, `h` moves left. Home has therefore been placed on `n`). You may ask why this was done instead of placing page down on `f` and page up on `b`. Here's why: + * In short, `f` and `b` are in prime locations for other types of keys, and using those keys for page down and page up would interrupt the space available for other keys. Using vim-style `f` and `b` would require either divide up the list of function keys with unrelated keys, which is unintuitive, or move all the function keys to another later, requiring restructuring that does not lend itself to an intuitive layout. +* Audio is not tested. If it doesn't work, please open an issue. diff --git a/keyboards/lets_split/keymaps/vim-mode/rules.mk b/keyboards/lets_split/keymaps/vim-mode/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/lets_split/keymaps/waples/keymap.c b/keyboards/lets_split/keymaps/waples/keymap.c index 7b25bc51f545..42b86aad2a3c 100644 --- a/keyboards/lets_split/keymaps/waples/keymap.c +++ b/keyboards/lets_split/keymaps/waples/keymap.c @@ -25,8 +25,6 @@ enum letssplit_keycodes { #define TG_NKRO MAGIC_TOGGLE_NKRO // Toggle NKRO #define CTLESC MT(MOD_LCTL, KC_ESC) // Hold for left Ctrl, tap for Esc #define SHFTENT MT(MOD_RSFT, KC_ENT) // Hold for right Shift, tap for Enter -#define _______ KC_TRNS -#define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/lets_split/keymaps/xk/keymap.c b/keyboards/lets_split/keymaps/xk/keymap.c index c032b865aac3..89197beb07c7 100755 --- a/keyboards/lets_split/keymaps/xk/keymap.c +++ b/keyboards/lets_split/keymaps/xk/keymap.c @@ -60,9 +60,6 @@ WINSH, OSX, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // action-TAP for key/mod behavior LT(layer, KC) #define XK_TAB LT(_FNCTION, KC_TAB) #define XK_BSP LT(_KAMELOC, KC_BSPC) diff --git a/keyboards/lets_split/keymaps/yshrsmz/keymap.c b/keyboards/lets_split/keymaps/yshrsmz/keymap.c index 52a0d2b83419..ccb3557b4a90 100644 --- a/keyboards/lets_split/keymaps/yshrsmz/keymap.c +++ b/keyboards/lets_split/keymaps/yshrsmz/keymap.c @@ -20,10 +20,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/lets_split_eh/keymaps/msiu/config.h b/keyboards/lets_split_eh/keymaps/msiu/config.h new file mode 100644 index 000000000000..526c0837c725 --- /dev/null +++ b/keyboards/lets_split_eh/keymaps/msiu/config.h @@ -0,0 +1,21 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once diff --git a/keyboards/lets_split_eh/keymaps/msiu/keymap.c b/keyboards/lets_split_eh/keymaps/msiu/keymap.c new file mode 100644 index 000000000000..af5c98241a4f --- /dev/null +++ b/keyboards/lets_split_eh/keymaps/msiu/keymap.c @@ -0,0 +1,195 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _DVORAK 1 + +#define _LOWER 3 +#define _RAISE 4 + +#define _NUMB 14 +#define _FUNC 15 +#define _ADJUST 16 + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + DVORAK, + LOWER, + RAISE, + ADJUST +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Hyper | Alt | GUI |Lower | Func |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( \ + LT(_NUMB, KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + LCTL_T(KC_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_LCTL, KC_HYPR, KC_LALT, KC_LGUI, LOWER, MO(_FUNC), KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +// Dvorak +[_DVORAK] = LAYOUT( \ + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, \ + _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______ , \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, 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, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, \ + _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | , | 0 | . |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT( \ + 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_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, \ + _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Taskmg| | | | | | | |RGBVAI|RGBSAI|RGBHUI|caltde| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | |Qwerty|RGBVAD|RGBSAD|RGBHUD|RGBTOG| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | |BLSTEP| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | RESET| + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + RGB_TOG, RGB_VAI, RGB_SAI, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, \ + RGB_MOD, RGB_VAD, RGB_SAD, RGB_HUD, _______, _______, _______, QWERTY, DVORAK, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET \ +), + +/* FUNC + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Caps | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +// Numpad +[_NUMB] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, KC_BSPC, \ + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______ \ +) + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // case QWERTY: + // if (record->event.pressed) { + // persistent_default_layer_set(1UL<<_QWERTY); + // } + // return false; + // break; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/lets_split_eh/keymaps/that_canadian/keymap.c b/keyboards/lets_split_eh/keymaps/that_canadian/keymap.c index 8ef973574957..bba9a02c8ce4 100644 --- a/keyboards/lets_split_eh/keymaps/that_canadian/keymap.c +++ b/keyboards/lets_split_eh/keymaps/that_canadian/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) @@ -167,4 +163,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c index 5bb50afaffab..5461f718c80c 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/ca178858/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout CS_GO, // 0x08 diff --git a/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c index 06e2f344a53d..68cb4591599e 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout FUNC, // 0x02 diff --git a/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c index 95399fef69fb..d0745382a00a 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/iso/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout FUNC, // 0x02 diff --git a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c index cf1949190ac2..d4fcb88548c2 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c +++ b/keyboards/lfkeyboards/lfk78/keymaps/split_bs_osx/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout FUNC, // 0x02 diff --git a/keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c index 99757ac724fe..59ee51c25ed4 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c +++ b/keyboards/lfkeyboards/lfk87/keymaps/ca178858/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout DEFAULT_WKL, // 0x02 Function in CapsLock location, gui key disabled diff --git a/keyboards/lfkeyboards/lfk87/keymaps/default/config.h b/keyboards/lfkeyboards/lfk87/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/default/config.h +++ b/keyboards/lfkeyboards/lfk87/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c index 18d5d8cadce3..fee3f7586e3b 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout FUNC, // 0x08 diff --git a/keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c index 5e3310c0d720..89c5d8f8dbfa 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c +++ b/keyboards/lfkeyboards/lfk87/keymaps/gbchk/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout FUNC, // 0x08 diff --git a/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c index a916f80f1a1a..a1236de2adbb 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c +++ b/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, FUNC, // 0x02 diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h b/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h +++ b/keyboards/lfkeyboards/lfkpad/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c index e8fae1dde004..afd24ba6ef26 100644 --- a/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfkpad/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_numpad_6x4( /* Base */ KC_ESC, KC_TAB, KC_PEQL, MO(1), \ diff --git a/keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c b/keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c index 16cc93e40c26..eadc6eb59605 100644 --- a/keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c +++ b/keyboards/lfkeyboards/mini1800/keymaps/ca178858/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, // matches MF68 layout FUNC, // 0x08 diff --git a/keyboards/lfkeyboards/mini1800/keymaps/default/config.h b/keyboards/lfkeyboards/mini1800/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/lfkeyboards/mini1800/keymaps/default/config.h +++ b/keyboards/lfkeyboards/mini1800/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/lfkeyboards/smk65/keymaps/default/config.h b/keyboards/lfkeyboards/smk65/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/default/config.h +++ b/keyboards/lfkeyboards/smk65/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c b/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c index 757217ddb2ea..1861dcc1adb0 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, FUNC, diff --git a/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c b/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c index 40a7ee03f920..6e5e57112ed8 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c +++ b/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum keymap_layout { VANILLA = 0, FUNC, diff --git a/keyboards/lily58/config.h b/keyboards/lily58/config.h index b88ec06bf41f..fb1cdf3962a1 100644 --- a/keyboards/lily58/config.h +++ b/keyboards/lily58/config.h @@ -24,11 +24,5 @@ along with this program. If not, see . #define USE_I2C #define USE_SERIAL -#ifdef USE_Link_Time_Optimization - // LTO has issues with macros (action_get_macro) and "functions" (fn_actions), - // so just disable them - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION - - #define DISABLE_LEADER -#endif // USE_Link_Time_Optimization \ No newline at end of file +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index 5ff5dc318254..b8dda17d535d 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -21,7 +21,7 @@ extern uint8_t is_master; #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 -#define _ADJUST 16 +#define _ADJUST 3 enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI | * | | | |/ / \ \ | | | | * `----------------------------' '------''--------------------' - */ + */ [_ADJUST] = LAYOUT( \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ @@ -235,4 +235,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/lily58/rev1/info.json b/keyboards/lily58/rev1/info.json new file mode 100644 index 000000000000..4a3568c3e206 --- /dev/null +++ b/keyboards/lily58/rev1/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Lily58", + "url": "", + "maintainer": "F_YUUCHI", + "width": 16.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0.5}, {"x":1, "y":0.375}, {"x":2, "y":0.125}, {"x":3, "y":0}, {"x":4, "y":0.125}, {"x":5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.5}, + {"x":0, "y":1.5}, {"x":1, "y":1.375}, {"x":2, "y":1.125}, {"x":3, "y":1}, {"x":4, "y":1.125}, {"x":5, "y":1.25}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.5}, + {"x":0, "y":2.5}, {"x":1, "y":2.375}, {"x":2, "y":2.125}, {"x":3, "y":2}, {"x":4, "y":2.125}, {"x":5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.5}, + {"x":0, "y":3.5}, {"x":1, "y":3.375}, {"x":2, "y":3.125}, {"x":3, "y":3}, {"x":4, "y":3.125}, {"x":5, "y":3.25}, {"x":6, "y":2.75}, {"x":9.5, "y":2.75}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.5}, + {"x":2.5, "y":4.125}, {"x":3.5, "y":4.15}, {"x":4.5, "y":4.25}, {"x":6, "y":4.25, "h":1.5}, {"x":9.5, "y":4.25, "h":1.5}, {"x":11, "y":4.25}, {"x":12, "y":4.15}, {"x":13, "y":4.15} + ] + } + } +} diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index f6b922eeac2f..f2947c81cc0a 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk @@ -65,9 +65,7 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = no -USE_I2C = yes +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/lily58/ssd1306.c b/keyboards/lily58/ssd1306.c index 4330c8497db2..20c2738db774 100755 --- a/keyboards/lily58/ssd1306.c +++ b/keyboards/lily58/ssd1306.c @@ -13,7 +13,7 @@ #include "sendchar.h" #include "timer.h" -static const unsigned char font[] PROGMEM; +extern const unsigned char font[] PROGMEM; // Set this to 1 to help diagnose early startup problems // when testing power-on with ble. Turn it off otherwise, diff --git a/keyboards/m0lly/README.md b/keyboards/m0lly/README.md new file mode 100644 index 000000000000..e0c8b45d95f0 --- /dev/null +++ b/keyboards/m0lly/README.md @@ -0,0 +1,17 @@ +The Key Company M0LLY + +[TKC M0LLY](https://cdn.shopify.com/s/files/1/1679/2319/files/Molly_Terminal_1024x1024.jpg?v=1529067702) + + +The Key Company's M0LLY keyboard is inspired by the Apple Macintosh M0110A, and utilizes the AT90USB1286 microcontroller. + +Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) +Hardware Supported: TKC M0LLY +Hardware Availability: [TheKey.Company](https://thekey.company) + + +Make example for this keyboard (after setting up your build environment): + + make m0lly: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). diff --git a/keyboards/40percentclub/mf68_ble/config.h b/keyboards/m0lly/config.h similarity index 73% rename from keyboards/40percentclub/mf68_ble/config.h rename to keyboards/m0lly/config.h index 3d9bb360bf5e..21f5fd3fb4c4 100644 --- a/keyboards/40percentclub/mf68_ble/config.h +++ b/keyboards/m0lly/config.h @@ -20,46 +20,47 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB -#define PRODUCT_ID 0x0510 -#define DEVICE_VER 0x0101 -#define MANUFACTURER di0ib -#define PRODUCT MF68 -#define DESCRIPTION Magicforce 68 BLE +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER The Key Company +#define PRODUCT M0lly +#define DESCRIPTION QMK keyboard firmware for M0lly /* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 9 +#define MATRIX_ROWS 5 +#define MATRIX_COLS 19 -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * +// ROWS: Top to bottom, COLS: Left to right +/* Row pin configuration */ -#define MATRIX_ROW_PINS { D1, D0, C6, D7, B5, B6, B7, D6 } -#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D2, D3 } -#define UNUSED_PINS {B5} +#define MATRIX_ROW_PINS { F2, F1, F0, E1, E0 } +/* Column pin configuration + */ +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, F5, F6, F7 } +#define UNUSED_PINS /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* -#define BACKLIGHT_PIN B5 + +#define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 -*/ -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ +/* Underlight configuration + */ +#define RGB_DI_PIN D7 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 30 // Number of LEDs +#define RGBLIGHT_HUE_STEP 5 +#define RGBLIGHT_SAT_STEP 10 +#define RGBLIGHT_VAL_STEP 10 + +/* define if matrix has ghost */ //#define MATRIX_HAS_GHOST -/* number of backlight levels */ +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE @@ -152,3 +153,26 @@ along with this program. If not, see . //#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 diff --git a/keyboards/bfo9000/i2c.c b/keyboards/m0lly/i2c.c similarity index 98% rename from keyboards/bfo9000/i2c.c rename to keyboards/m0lly/i2c.c index 084c890c405f..cd2b835d501d 100644 --- a/keyboards/bfo9000/i2c.c +++ b/keyboards/m0lly/i2c.c @@ -48,7 +48,7 @@ void i2c_master_init(void) { // returns: 0 => success // 1 => error uint8_t i2c_master_start(uint8_t address) { - TWCR = (1<", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"label":"1", "x":15.5, "y":3}, + {"label":"2", "x":16.5, "y":3}, + {"label":"3", "x":17.5, "y":3}, + {"x":18.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, "w":1.25}, + {"label":"FN", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, + {"label":"0", "x":15.5, "y":4}, + {"x":16.5, "y":4}, + {"label":".", "x":17.5, "y":4}, + {"label":"Ent", "x":18.5, "y":4}] + } + } +} diff --git a/keyboards/m0lly/keymaps/default/config.h b/keyboards/m0lly/keymaps/default/config.h new file mode 100644 index 000000000000..ee142927f3ad --- /dev/null +++ b/keyboards/m0lly/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Mathias Andersson + * + * 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 . + */ + +#pragma once + +#define USE_I2C +#define SSD1306OLED +//#define OLED_ROTATE180 +#define SSD1306_ADDRESS 0x3C + +// place overrides here diff --git a/keyboards/m0lly/keymaps/default/keymap.c b/keyboards/m0lly/keymaps/default/keymap.c new file mode 100644 index 000000000000..784deb04a729 --- /dev/null +++ b/keyboards/m0lly/keymaps/default/keymap.c @@ -0,0 +1,149 @@ +/* Copyright 2017 Mathias Andersson + * + * 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 . + */ +#include QMK_KEYBOARD_H +#include "LUFA/Drivers/Peripheral/TWI.h" +#include "i2c.h" +#include "ssd1306.h" + + +//Layers + +enum { + BASE = 0, + FUNCTION, +}; + +bool screenWorks = 0; + +//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() +static char layer_lookup[][14] = {"Base","Function"}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * + * ,-----------------------------------------------------------. .-------------------. + * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * | - | + * |-----------------------------------------------------------| |-------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | | + * |-----------------------------------------------------------| |--------------| + | + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | | + * |-----------------------------------------------------------| |-------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 1 | 2 | 3 | Ent| + * |-----------------------------------------------------------| |--------------| | + * |Ctrl|Gui |Alt | Space | Alt | Win |FN |Ctr | | 0 | . | | + * `-----------------------------------------------------------' '-------------------' + */ + [BASE] = LAYOUT_all( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + 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_P7, KC_P8, KC_P9, XXXXXXX, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, MO(FUNCTION), KC_RCTL, KC_P0, XXXXXXX, KC_PDOT, KC_PENT \ + ), + /* Keymap FUNCTION: (Function Layer) + * + * ,-----------------------------------------------------------. .-------------------. + * | | | | | | | | | | | | | | RESET | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | + * |-----------------------------------------------------------| |--------------| | + * | | | | | | | | | | | | | + * `-----------------------------------------------------------' '-------------------' + */ + [FUNCTION] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} + +void matrix_init_user(void) { + #ifdef USE_I2C + i2c_master_init(); + #ifdef SSD1306OLED + // calls code for the SSD1306 OLED + _delay_ms(400); + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + if ( iota_gfx_init() ) { // turns on the display + screenWorks = 1; + } + #endif + #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +void matrix_scan_user(void) { + #ifdef SSD1306OLED + if ( screenWorks ) { + iota_gfx_task(); // this is what updates the display continuously + }; + #endif +} + +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) { + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif + + struct CharacterMatrix matrix; + + matrix_clear(&matrix); + matrix_write_P(&matrix, PSTR("TKC M0LLY")); + + uint8_t layer = biton32(layer_state); + + char buf[40]; + snprintf(buf,sizeof(buf), "Undef-%d", layer); + matrix_write_P(&matrix, PSTR("\nLayer: ")); + matrix_write(&matrix, layer_lookup[layer]); + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n\n%s %s %s", + (host_keyboard_leds() & (1< + * + * 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 . + */ +#include "m0lly.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + led_init_ports(); + 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) { + DDRD |= (1<<2) | (1<<3) | (1<<4); // OUT + DDRB |= (1<<7); // OUT + PORTB |= (1<<7); +} + +void led_set_kb(uint8_t usb_led) { +// led_set_user(usb_led); + if (usb_led & (1< + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, K1I, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, K2I, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, K3H, K3I, \ + K40, K41, K42, K45, K49, K4B, K4C, K4D, K4F, K4G, K4H, K4I \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1F, K1G, K1H, K1I }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F, K2G, K2H, K2I }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, KC_NO, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I } \ +} diff --git a/keyboards/m0lly/rules.mk b/keyboards/m0lly/rules.mk new file mode 100644 index 000000000000..ae6cdcb53501 --- /dev/null +++ b/keyboards/m0lly/rules.mk @@ -0,0 +1,72 @@ + +# MCU name +MCU = at90usb1286 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +SRC = i2c.c \ + ssd1306.c diff --git a/keyboards/m10a/keymaps/default/keymap.c b/keyboards/m10a/keymaps/default/keymap.c index bbf58302fc7a..232239609986 100644 --- a/keyboards/m10a/keymaps/default/keymap.c +++ b/keyboards/m10a/keymaps/default/keymap.c @@ -1,7 +1,4 @@ - -#include "m10a.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -23,10 +20,6 @@ enum layers { _LAYER9 }; -// // Fillers to make layering more clear -// #define _______ KC_TRNS -// #define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}}, [_LAYER1] = {{KC_A, KC_B, KC_C}, {KC_D, KC_E, KC_F}, {KC_G, KC_H, KC_I}, {KC_NO, KC_NO, KC_J}}, diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index d2f73a6a8e10..59e66e133071 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -119,3 +119,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION + +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 15 +#define RGB_MATRIX_LED_FLUSH_LIMIT 10 + +#include "config_led.h" diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c new file mode 100644 index 000000000000..42d4d1474bba --- /dev/null +++ b/keyboards/massdrop/alt/config_led.c @@ -0,0 +1,59 @@ +#ifdef RGB_MATRIX_ENABLE +#include "alt.h" + +#include "led_matrix.h" +#include "rgb_matrix.h" +#include "config_led.h" + +// This table can be almost-automatically derived from ISSI3733_LED_MAP that is +// defined in config_led.h + +// You can calculate the (0-244, 0-64) x/y values from the x/y values defined in +// ISSI3733_LED_MAP with the following formula: +// uint8_t rgb_x = ((ISSI3733_LED_MAP[i].x - MIN_X) / (MAX_X - MIN_X)) * 224; +// uint8_t rgb_y = ((ISSI3733_LED_MAP[i].y - MIN_Y) / (MAX_Y - MIN_Y)) * 64; +// Where the min/max vars are the minimum and maximum "bounds" of x/y values +// present in ISSI3733_LED_MAP +// +// The row/col values need to be manually tweaked though, compensating for the +// "empty" cells that are a product of larger keys +// +// There is a quick-and-dirty implementation of this under ledvis.html + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, + { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, + { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 }, + { 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }, + { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 66 } +}, { + { 8, 56 }, { 22, 56 }, { 35, 56 }, { 49, 56 }, { 63, 56 }, { 77, 56 }, { 91, 56 }, { 105, 56 }, { 118, 56 }, { 132, 56 }, { 146, 56 }, { 160, 56 }, { 174, 56 }, { 195, 56 }, { 215, 56 }, + { 11, 44 }, { 28, 44 }, { 42, 44 }, { 56, 44 }, { 70, 44 }, { 84, 44 }, { 98, 44 }, { 112, 44 }, { 125, 44 }, { 139, 44 }, { 153, 44 }, { 167, 44 }, { 181, 44 }, { 198, 44 }, { 215, 44 }, + { 13, 32 }, { 32, 32 }, { 46, 32 }, { 60, 32 }, { 73, 32 }, { 87, 32 }, { 101, 32 }, { 115, 32 }, { 129, 32 }, { 143, 32 }, { 156, 32 }, { 170, 32 }, { 193, 32 }, { 215, 32 }, { 16, 19 }, + { 39, 19 }, { 53, 19 }, { 67, 19 }, { 80, 19 }, { 94, 19 }, { 108, 19 }, { 122, 19 }, { 136, 19 }, { 150, 19 }, { 163, 19 }, { 182, 19 }, { 201, 19 }, { 215, 19 }, { 9, 7 }, { 27, 7 }, + { 44, 7 }, { 96, 7 }, { 148, 7 }, { 165, 7 }, { 188, 7 }, { 201, 7 }, { 215, 7 }, + // Underglow LEDs + { 1, 1 }, { 15, 0 }, { 31, 0 }, { 47, 0 }, { 63, 0 }, { 79, 0 }, { 95, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, { 222, 1 }, + { 224, 13 }, { 224, 25 }, { 224, 38 }, { 224, 50 }, { 222, 62 }, { 191, 64 }, { 179, 64 }, { 167, 64 }, { 153, 64 }, { 139, 64 }, { 125, 64 }, { 112, 64 }, { 98, 64 }, { 84, 64 }, { 70, 64 }, + { 56, 64 }, { 42, 64 }, { 28, 64 }, { 1, 62 }, { 0, 50 }, { 0, 38 }, { 0, 25 }, { 0, 13 } +}, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, + // Underglow LEDs + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2 +} }; + + +#ifdef USB_LED_INDICATOR_ENABLE +void rgb_matrix_indicators_kb(void) +{ + led_matrix_indicators(); +} +#endif // USB_LED_INDICATOR_ENABLE + +#endif diff --git a/keyboards/massdrop/alt/config_led.h b/keyboards/massdrop/alt/config_led.h index a049e38179a6..82117b33279e 100644 --- a/keyboards/massdrop/alt/config_led.h +++ b/keyboards/massdrop/alt/config_led.h @@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _config_led_h_ -#define _config_led_h_ +#pragma once //Define number of ISSI3733 drivers being used (1...16) #define ISSI3733_DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL ISSI3733_LED_COUNT //Hardware address of each driver (Refer to ISSI3733 pdf "Table 1 Slave Address" and keyboard schematic) #define ISSI3773_DRIVER_ADDRESSES { 0xA0, 0xBE } @@ -30,21 +30,24 @@ along with this program. If not, see . //Count of LED bodies #define ISSI3733_LED_COUNT 105 -//Default Global Current Register value (Default brightness 0 - 255) -#define ISSI3733_GCR_DEFAULT 128 - #define LED_GCR_MAX 165 //Max GCR value (0 - 255) WARNING: Raising this value may overload the LED drivers and USB bus #define LED_GCR_STEP 10 //GCR increment/decrement value -//Automatic power rollback and recovery -#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power ) -#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit) -#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down) - +#ifdef USE_MASSDROP_CONFIGURATOR #define ANIMATION_SPEED_STEP 1 +#define BREATHE_STEP 1 #define BREATHE_MIN_STEP 0 #define BREATHE_MAX_STEP 255 +#endif + +//Default Global Current Register value (Default brightness 0 - 255) +#define ISSI3733_GCR_DEFAULT LED_GCR_MAX + +//Automatic power rollback and recovery +#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power ) +#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit) +#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down) //LED Mapping - More practically generated from a spreadsheet program //id: ID of the LED (Sync with PCB callouts) @@ -174,5 +177,3 @@ along with this program. If not, see . #define USB_LED_COMPOSE_SCANCODE 255 #define USB_LED_KANA_SCANCODE 255 #endif //USB_LED_INDICATOR_ENABLE - -#endif //_config_led_h_ diff --git a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c index 10bc62c1f0e6..f6f79ad91ef9 100644 --- a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c +++ b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c @@ -1,25 +1,13 @@ #include QMK_KEYBOARD_H enum alt_keycodes { - L_BRI = SAFE_RANGE, //LED Brightness Increase - L_BRD, //LED Brightness Decrease - L_PTN, //LED Pattern Select Next - L_PTP, //LED Pattern Select Previous - L_PSI, //LED Pattern Speed Increase - L_PSD, //LED Pattern Speed Decrease - L_T_MD, //LED Toggle Mode - L_T_ONF, //LED Toggle On / Off - L_ON, //LED On - L_OFF, //LED Off - L_T_BR, //LED Toggle Breath Effect - L_T_PTD, //LED Toggle Scrolling Pattern Direction - U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active - U_T_AGCR, //USB Toggle Automatic GCR control - DBG_TOG, //DEBUG Toggle On / Off - DBG_MTRX, //DEBUG Toggle Matrix Prints - DBG_KBD, //DEBUG Toggle Keyboard Prints - DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode @@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ ), [1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_MUTE, \ - L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ - KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MUTE, \ + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* [X] = LAYOUT( - 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 \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), */ }; @@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; switch (keycode) { - case L_BRI: - if (record->event.pressed) { - if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; - else gcr_desired += LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_BRD: - if (record->event.pressed) { - if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; - else gcr_desired -= LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_PTN: - if (record->event.pressed) { - if (led_animation_id == led_setups_count - 1) led_animation_id = 0; - else led_animation_id++; - } - return false; - case L_PTP: - if (record->event.pressed) { - if (led_animation_id == 0) led_animation_id = led_setups_count - 1; - else led_animation_id--; - } - return false; - case L_PSI: - if (record->event.pressed) { - led_animation_speed += ANIMATION_SPEED_STEP; - } - return false; - case L_PSD: - if (record->event.pressed) { - led_animation_speed -= ANIMATION_SPEED_STEP; - if (led_animation_speed < 0) led_animation_speed = 0; - } - return false; - case L_T_MD: - if (record->event.pressed) { - led_lighting_mode++; - if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; - } - return false; - case L_T_ONF: - if (record->event.pressed) { - led_enabled = !led_enabled; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_ON: - if (record->event.pressed) { - led_enabled = 1; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_OFF: - if (record->event.pressed) { - led_enabled = 0; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_T_BR: - if (record->event.pressed) { - led_animation_breathing = !led_animation_breathing; - if (led_animation_breathing) { - gcr_breathe = gcr_desired; - led_animation_breathe_cur = BREATHE_MIN_STEP; - breathe_dir = 1; - } - } - return false; - case L_T_PTD: - if (record->event.pressed) { - led_animation_direction = !led_animation_direction; - } - return false; case U_T_AUTO: if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); @@ -183,6 +95,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; default: return true; //Process all other keycodes normally } diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c index 10bc62c1f0e6..f6f79ad91ef9 100644 --- a/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default/keymap.c @@ -1,25 +1,13 @@ #include QMK_KEYBOARD_H enum alt_keycodes { - L_BRI = SAFE_RANGE, //LED Brightness Increase - L_BRD, //LED Brightness Decrease - L_PTN, //LED Pattern Select Next - L_PTP, //LED Pattern Select Previous - L_PSI, //LED Pattern Speed Increase - L_PSD, //LED Pattern Speed Decrease - L_T_MD, //LED Toggle Mode - L_T_ONF, //LED Toggle On / Off - L_ON, //LED On - L_OFF, //LED Off - L_T_BR, //LED Toggle Breath Effect - L_T_PTD, //LED Toggle Scrolling Pattern Direction - U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active - U_T_AGCR, //USB Toggle Automatic GCR control - DBG_TOG, //DEBUG Toggle On / Off - DBG_MTRX, //DEBUG Toggle Matrix Prints - DBG_KBD, //DEBUG Toggle Keyboard Prints - DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode @@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ ), [1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_MUTE, \ - L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ - KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MUTE, \ + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* [X] = LAYOUT( - 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 \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), */ }; @@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; switch (keycode) { - case L_BRI: - if (record->event.pressed) { - if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; - else gcr_desired += LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_BRD: - if (record->event.pressed) { - if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; - else gcr_desired -= LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_PTN: - if (record->event.pressed) { - if (led_animation_id == led_setups_count - 1) led_animation_id = 0; - else led_animation_id++; - } - return false; - case L_PTP: - if (record->event.pressed) { - if (led_animation_id == 0) led_animation_id = led_setups_count - 1; - else led_animation_id--; - } - return false; - case L_PSI: - if (record->event.pressed) { - led_animation_speed += ANIMATION_SPEED_STEP; - } - return false; - case L_PSD: - if (record->event.pressed) { - led_animation_speed -= ANIMATION_SPEED_STEP; - if (led_animation_speed < 0) led_animation_speed = 0; - } - return false; - case L_T_MD: - if (record->event.pressed) { - led_lighting_mode++; - if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; - } - return false; - case L_T_ONF: - if (record->event.pressed) { - led_enabled = !led_enabled; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_ON: - if (record->event.pressed) { - led_enabled = 1; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_OFF: - if (record->event.pressed) { - led_enabled = 0; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_T_BR: - if (record->event.pressed) { - led_animation_breathing = !led_animation_breathing; - if (led_animation_breathing) { - gcr_breathe = gcr_desired; - led_animation_breathe_cur = BREATHE_MIN_STEP; - breathe_dir = 1; - } - } - return false; - case L_T_PTD: - if (record->event.pressed) { - led_animation_direction = !led_animation_direction; - } - return false; case U_T_AUTO: if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); @@ -183,6 +95,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; default: return true; //Process all other keycodes normally } diff --git a/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/keyboards/massdrop/alt/keymaps/default_md/keymap.c new file mode 100644 index 000000000000..7969583df4b0 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/default_md/keymap.c @@ -0,0 +1,223 @@ +#include QMK_KEYBOARD_H + +enum alt_keycodes { + L_BRI = SAFE_RANGE, //LED Brightness Increase //Working + L_BRD, //LED Brightness Decrease //Working + L_PTN, //LED Pattern Select Next //Working + L_PTP, //LED Pattern Select Previous //Working + L_PSI, //LED Pattern Speed Increase //Working + L_PSD, //LED Pattern Speed Decrease //Working + L_T_MD, //LED Toggle Mode //Working + L_T_ONF, //LED Toggle On / Off //Broken + L_ON, //LED On //Broken + L_OFF, //LED Off //Broken + L_T_BR, //LED Toggle Breath Effect //Working + L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working + U_T_AGCR, //USB Toggle Automatic GCR control //Working + DBG_TOG, //DEBUG Toggle On / Off // + DBG_MTRX, //DEBUG Toggle Matrix Prints // + DBG_KBD, //DEBUG Toggle Keyboard Prints // + DBG_MOU, //DEBUG Toggle Mouse Prints // + MD_BOOT //Restart into bootloader after hold timeout //Working +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode + +keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_HOME, \ + 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_PGUP, \ + 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_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MUTE, \ + L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + */ +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case L_BRI: + if (record->event.pressed) { + if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; + else gcr_desired += LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_BRD: + if (record->event.pressed) { + if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; + else gcr_desired -= LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_PTN: + if (record->event.pressed) { + if (led_animation_id == led_setups_count - 1) led_animation_id = 0; + else led_animation_id++; + } + return false; + case L_PTP: + if (record->event.pressed) { + if (led_animation_id == 0) led_animation_id = led_setups_count - 1; + else led_animation_id--; + } + return false; + case L_PSI: + if (record->event.pressed) { + led_animation_speed += ANIMATION_SPEED_STEP; + } + return false; + case L_PSD: + if (record->event.pressed) { + led_animation_speed -= ANIMATION_SPEED_STEP; + if (led_animation_speed < 0) led_animation_speed = 0; + } + return false; + case L_T_MD: + if (record->event.pressed) { + led_lighting_mode++; + if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; + } + return false; + case L_T_ONF: + if (record->event.pressed) { + led_enabled = !led_enabled; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_ON: + if (record->event.pressed) { + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_OFF: + if (record->event.pressed) { + led_enabled = 0; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_T_BR: + if (record->event.pressed) { + led_animation_breathing = !led_animation_breathing; + if (led_animation_breathing) { + gcr_breathe = gcr_desired; + led_animation_breathe_cur = BREATHE_MIN_STEP; + breathe_dir = 1; + } + } + return false; + case L_T_PTD: + if (record->event.pressed) { + led_animation_direction = !led_animation_direction; + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} + +led_instruction_t led_instructions[] = { + //LEDs are normally inactive, no processing is performed on them + //Flags are used in matching criteria for an LED to be active and indicate how to color it + //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_) + //LED IDs can be found in config_led.h in the keyboard's directory + //Examples are below + + //All LEDs use the user's selected pattern (this is the factory default) + { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + + //Specific LEDs use the user's selected pattern while all others are off + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN, .id0 = 0xFFFFFFFF, .id1 = 0xAAAAAAAA, .id2 = 0x55555555, .id3 = 0x11111111 }, + + //Specific LEDs use specified RGB values while all others are off + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 }, + + //All LEDs use the user's selected pattern + //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green + //When layer 1 is active, key LEDs use red (id0 32 - 16: 1111 1111 1111 1111 1000 0000 0000 0000 = 0xFFFF8000) (except top row 15 - 1) + //When layer 1 is active, key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //When layer 1 is active, key LEDs use red (id2 67 - 65: 0000 0000 0000 0000 0000 0000 0000 0111 = 0x00000007) + //When layer 1 is active, edge LEDs use green (id2 95 - 68: 1111 1111 1111 1111 1111 1111 1111 1000 = 0xFFFFFFF8) + //When layer 1 is active, edge LEDs use green (id3 105 - 96: 0000 0000 0000 0000 0000 0011 1111 1111 = 0x000003FF) + // { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id0 = 0xFFFF8000, .id1 = 0xFFFFFFFF, .id2 = 0x00000007, .r = 255, .layer = 1 }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id2 = 0xFFFFFFF8, .id3 = 0x000003FF, .g = 127, .layer = 1 }, + + //All key LEDs use red while edge LEDs use the active pattern + //All key LEDs use red (id0 32 - 1: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //All key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //All key LEDs use red (id2 67 - 65: 0000 0000 0000 0000 0000 0000 0000 0111 = 0x00000007) + //Edge uses active pattern (id2 95 - 68: 1111 1111 1111 1111 1111 1111 1111 1000 = 0xFFFFFFF8) + //Edge uses active pattern (id3 105 - 96: 0000 0000 0000 0000 0000 0011 1111 1111 = 0x000003FF) + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFFFFFFFF, .id1 = 0xFFFFFFFF, .id2 = 0x00000007, .r = 255 }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN , .id2 = 0xFFFFFFF8, .id3 = 0x000003FF }, + + //end must be set to 1 to indicate end of instruction set + { .end = 1 } +}; diff --git a/keyboards/massdrop/alt/keymaps/default_md/rules.mk b/keyboards/massdrop/alt/keymaps/default_md/rules.mk new file mode 100644 index 000000000000..064a6f54c1fa --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/default_md/rules.mk @@ -0,0 +1,2 @@ +# This keymap requires Massdrop Configurator support +OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR diff --git a/keyboards/massdrop/alt/keymaps/mac/keymap.c b/keyboards/massdrop/alt/keymaps/mac/keymap.c index 639eb2da75ed..222d7e2c504a 100644 --- a/keyboards/massdrop/alt/keymaps/mac/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac/keymap.c @@ -1,25 +1,13 @@ #include QMK_KEYBOARD_H enum alt_keycodes { - L_BRI = SAFE_RANGE, //LED Brightness Increase - L_BRD, //LED Brightness Decrease - L_PTN, //LED Pattern Select Next - L_PTP, //LED Pattern Select Previous - L_PSI, //LED Pattern Speed Increase - L_PSD, //LED Pattern Speed Decrease - L_T_MD, //LED Toggle Mode - L_T_ONF, //LED Toggle On / Off - L_ON, //LED On - L_OFF, //LED Off - L_T_BR, //LED Toggle Breath Effect - L_T_PTD, //LED Toggle Scrolling Pattern Direction - U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active - U_T_AGCR, //USB Toggle Automatic GCR control - DBG_TOG, //DEBUG Toggle On / Off - DBG_MTRX, //DEBUG Toggle Matrix Prints - DBG_KBD, //DEBUG Toggle Keyboard Prints - DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode @@ -35,19 +23,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ ), [1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_MUTE, \ - L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_END, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, \ - KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MUTE, \ + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, DBG_TOG, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* [X] = LAYOUT( - 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 \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), */ }; @@ -68,82 +56,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; switch (keycode) { - case L_BRI: - if (record->event.pressed) { - if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; - else gcr_desired += LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_BRD: - if (record->event.pressed) { - if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; - else gcr_desired -= LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_PTN: - if (record->event.pressed) { - if (led_animation_id == led_setups_count - 1) led_animation_id = 0; - else led_animation_id++; - } - return false; - case L_PTP: - if (record->event.pressed) { - if (led_animation_id == 0) led_animation_id = led_setups_count - 1; - else led_animation_id--; - } - return false; - case L_PSI: - if (record->event.pressed) { - led_animation_speed += ANIMATION_SPEED_STEP; - } - return false; - case L_PSD: - if (record->event.pressed) { - led_animation_speed -= ANIMATION_SPEED_STEP; - if (led_animation_speed < 0) led_animation_speed = 0; - } - return false; - case L_T_MD: - if (record->event.pressed) { - led_lighting_mode++; - if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; - } - return false; - case L_T_ONF: - if (record->event.pressed) { - led_enabled = !led_enabled; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_ON: - if (record->event.pressed) { - led_enabled = 1; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_OFF: - if (record->event.pressed) { - led_enabled = 0; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_T_BR: - if (record->event.pressed) { - led_animation_breathing = !led_animation_breathing; - if (led_animation_breathing) { - gcr_breathe = gcr_desired; - led_animation_breathe_cur = BREATHE_MIN_STEP; - breathe_dir = 1; - } - } - return false; - case L_T_PTD: - if (record->event.pressed) { - led_animation_direction = !led_animation_direction; - } - return false; case U_T_AUTO: if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); @@ -183,6 +95,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; default: return true; //Process all other keycodes normally } diff --git a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c new file mode 100644 index 000000000000..8a052cc250ee --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c @@ -0,0 +1,193 @@ +#include QMK_KEYBOARD_H + +enum alt_keycodes { + L_BRI = SAFE_RANGE, //LED Brightness Increase //Working + L_BRD, //LED Brightness Decrease //Working + L_PTN, //LED Pattern Select Next //Working + L_PTP, //LED Pattern Select Previous //Working + L_PSI, //LED Pattern Speed Increase //Working + L_PSD, //LED Pattern Speed Decrease //Working + L_T_MD, //LED Toggle Mode //Working + L_T_ONF, //LED Toggle On / Off //Broken + L_ON, //LED On //Broken + L_OFF, //LED Off //Broken + L_T_BR, //LED Toggle Breath Effect //Working + L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working + U_T_AGCR, //USB Toggle Automatic GCR control //Working + DBG_TOG, //DEBUG Toggle On / Off // + DBG_MTRX, //DEBUG Toggle Matrix Prints // + DBG_KBD, //DEBUG Toggle Keyboard Prints // + DBG_MOU, //DEBUG Toggle Mouse Prints // + MD_BOOT //Restart into bootloader after hold timeout //Working +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode + +keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_HOME, \ + 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_PGUP, \ + 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_PGDN, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MUTE, \ + L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + */ +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case L_BRI: + if (record->event.pressed) { + if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; + else gcr_desired += LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_BRD: + if (record->event.pressed) { + if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; + else gcr_desired -= LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_PTN: + if (record->event.pressed) { + if (led_animation_id == led_setups_count - 1) led_animation_id = 0; + else led_animation_id++; + } + return false; + case L_PTP: + if (record->event.pressed) { + if (led_animation_id == 0) led_animation_id = led_setups_count - 1; + else led_animation_id--; + } + return false; + case L_PSI: + if (record->event.pressed) { + led_animation_speed += ANIMATION_SPEED_STEP; + } + return false; + case L_PSD: + if (record->event.pressed) { + led_animation_speed -= ANIMATION_SPEED_STEP; + if (led_animation_speed < 0) led_animation_speed = 0; + } + return false; + case L_T_MD: + if (record->event.pressed) { + led_lighting_mode++; + if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; + } + return false; + case L_T_ONF: + if (record->event.pressed) { + led_enabled = !led_enabled; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_ON: + if (record->event.pressed) { + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_OFF: + if (record->event.pressed) { + led_enabled = 0; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_T_BR: + if (record->event.pressed) { + led_animation_breathing = !led_animation_breathing; + if (led_animation_breathing) { + gcr_breathe = gcr_desired; + led_animation_breathe_cur = BREATHE_MIN_STEP; + breathe_dir = 1; + } + } + return false; + case L_T_PTD: + if (record->event.pressed) { + led_animation_direction = !led_animation_direction; + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} + +led_instruction_t led_instructions[] = { + //Please see ../default_md/keymap.c for examples + + //All LEDs use the user's selected pattern (this is the factory default) + { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + + //end must be set to 1 to indicate end of instruction set + { .end = 1 } +}; diff --git a/keyboards/massdrop/alt/keymaps/mac_md/rules.mk b/keyboards/massdrop/alt/keymaps/mac_md/rules.mk new file mode 100644 index 000000000000..064a6f54c1fa --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/mac_md/rules.mk @@ -0,0 +1,2 @@ +# This keymap requires Massdrop Configurator support +OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR diff --git a/keyboards/massdrop/alt/keymaps/reywood/README.md b/keyboards/massdrop/alt/keymaps/reywood/README.md new file mode 100644 index 000000000000..5ee630dfb803 --- /dev/null +++ b/keyboards/massdrop/alt/keymaps/reywood/README.md @@ -0,0 +1,5 @@ +# THIS KEYMAP IS BROKEN + +The CTRL and ALT have both been switched to using the QMK RGB Matrix system, +rendering any custom effects that used the old, custom Massdrop lighting system, +BROKEN. diff --git a/keyboards/massdrop/alt/keymaps/reywood/rules.mk b/keyboards/massdrop/alt/keymaps/reywood/rules.mk index b5b961a0f3b2..956d1c700c29 100644 --- a/keyboards/massdrop/alt/keymaps/reywood/rules.mk +++ b/keyboards/massdrop/alt/keymaps/reywood/rules.mk @@ -1,6 +1,4 @@ # project specific files -SRC = led_programs.c -SRC += matrix.c SRC += rgb_matrix_user.c #For platform and packs @@ -32,3 +30,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) VIRTSER_ENABLE = no # USB Serial Driver RAW_ENABLE = no # Raw device AUTO_SHIFT_ENABLE = no # Auto Shift + +# This keymap requires Massdrop Configurator support +OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR diff --git a/keyboards/massdrop/alt/rules.mk b/keyboards/massdrop/alt/rules.mk index c5539158f580..aa45c68056d8 100644 --- a/keyboards/massdrop/alt/rules.mk +++ b/keyboards/massdrop/alt/rules.mk @@ -1,6 +1,6 @@ # project specific files -SRC = led_programs.c -SRC += matrix.c +SRC = matrix.c +SRC += config_led.c #For platform and packs ARM_ATSAM = SAMD51J18A @@ -31,3 +31,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) VIRTSER_ENABLE = no # USB Serial Driver RAW_ENABLE = no # Raw device AUTO_SHIFT_ENABLE = no # Auto Shift + +# Custom RGB matrix handling +RGB_MATRIX_ENABLE = custom diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index 71ccac0f3991..9b9f98f5fe12 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h @@ -119,3 +119,9 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION + +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_LED_PROCESS_LIMIT 15 +#define RGB_MATRIX_LED_FLUSH_LIMIT 10 + +#include "config_led.h" diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c new file mode 100644 index 000000000000..5f1c4520715c --- /dev/null +++ b/keyboards/massdrop/ctrl/config_led.c @@ -0,0 +1,82 @@ +#ifdef RGB_MATRIX_ENABLE +#include "ctrl.h" + +#include "led_matrix.h" +#include "rgb_matrix.h" +#include "config_led.h" + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7 }, + { 16, 17, 18, 19, 20, 21, 22, 23 }, + { 33, 34, 35, 36, 37, 38, 39, 40 }, + { 50, 51, 52, 53, 54, 55, 56, 57 }, + { 63, 64, 65, 66, 67, 68, 69, 70 }, + { 76, 77, 78, 79, 80, 81, 82, 83 }, + { 8, 9, 10, 11, 12, 13, 14, 15 }, + { 24, 25, 26, 27, 28, 29, 30, 31 }, + { 41, 42, 43, 44, 45, 46, 47, 48 }, + { 58, 59, 60, 61, 62, 75, 49, 32 }, + { 71, 72, 73, 74, 84, 85, 86, NO_LED } +}, { + // KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS + { 7, 5 }, { 31, 5 }, { 43, 5 }, { 55, 5 }, { 67, 5 }, { 85, 5 }, { 97, 5 }, { 109, 5 }, + { 121, 5 }, { 139, 5 }, { 151, 5 }, { 163, 5 }, { 175, 5 }, { 193, 5 }, { 205, 5 }, { 217, 5 }, + // 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 + { 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 }, + { 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 }, + { 217, 20 }, + // 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 + { 10, 30 }, { 25, 30 }, { 37, 30 }, { 49, 30 }, { 61, 30 }, { 73, 30 }, { 85, 30 }, { 97, 30 }, + { 109, 30 }, { 121, 30 }, { 133, 30 }, { 145, 30 }, { 157, 30 }, { 172, 30 }, { 193, 30 }, { 205, 30 }, + { 217, 30 }, + // 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 + { 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 }, + { 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 }, + // 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 + { 14, 49 }, { 34, 49 }, { 46, 49 }, { 58, 49 }, { 70, 49 }, { 82, 49 }, { 94, 49 }, { 106, 49 }, + { 118, 49 }, { 130, 49 }, { 142, 49 }, { 165, 49 }, { 205, 49 }, + // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + { 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, + { 193, 59 }, { 205, 59 }, { 217, 59 }, + // Underglow / Border + { 222, 64 }, { 204, 64 }, { 186, 64 }, { 167, 64 }, { 149, 64 }, { 130, 64 }, { 112, 64 }, { 94, 64 }, + { 75, 64 }, { 57, 64 }, { 38, 64 }, { 20, 64 }, { 0, 64 }, { 0, 47 }, { 0, 32 }, { 0, 17 }, + { 0, 0 }, { 20, 0 }, { 38, 0 }, { 57, 0 }, { 75, 0 }, { 94, 0 }, { 112, 0 }, { 130, 0 }, + { 149, 0 }, { 167, 0 }, { 186, 0 }, { 204, 0 }, { 222, 1 }, { 224, 17 }, { 224, 32 }, { 224, 47 } +}, { + // KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, 4, + // 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 + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, + // 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 + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, + // 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 + 1, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, + // 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 + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, + // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, + // Underglow / Border + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2 +} }; + + +#ifdef USB_LED_INDICATOR_ENABLE +void rgb_matrix_indicators_kb(void) +{ + led_matrix_indicators(); +} +#endif // USB_LED_INDICATOR_ENABLE + +#endif diff --git a/keyboards/massdrop/ctrl/config_led.h b/keyboards/massdrop/ctrl/config_led.h index 471ab7007d1f..0c91a0c80baf 100644 --- a/keyboards/massdrop/ctrl/config_led.h +++ b/keyboards/massdrop/ctrl/config_led.h @@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _config_led_h_ -#define _config_led_h_ +#pragma once //Define number of ISSI3733 drivers being used (1...16) #define ISSI3733_DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL ISSI3733_LED_COUNT //Hardware address of each driver (Refer to ISSI3733 pdf "Table 1 Slave Address" and keyboard schematic) #define ISSI3773_DRIVER_ADDRESSES { 0xA0, 0xBE } @@ -30,21 +30,24 @@ along with this program. If not, see . //Count of LED bodies #define ISSI3733_LED_COUNT 119 -//Default Global Current Register value (Default brightness 0 - 255) -#define ISSI3733_GCR_DEFAULT 128 - #define LED_GCR_MAX 165 //Max GCR value (0 - 255) WARNING: Raising this value may overload the LED drivers and USB bus #define LED_GCR_STEP 10 //GCR increment/decrement value -//Automatic power rollback and recovery -#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power ) -#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit) -#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down) - +#ifdef USE_MASSDROP_CONFIGURATOR #define ANIMATION_SPEED_STEP 1 +#define BREATHE_STEP 1 #define BREATHE_MIN_STEP 0 #define BREATHE_MAX_STEP 255 +#endif + +//Default Global Current Register value (Default brightness 0 - 255) +#define ISSI3733_GCR_DEFAULT LED_GCR_MAX + +//Automatic power rollback and recovery +#define V5_HIGH 2540 //5V high level (After low power detect, point at which LEDs are allowed to use more power ) +#define V5_LOW 2480 //5V low level (LED power rolled back to stay above this limit) +#define V5_CAT 2200 //5V catastrophic level (Host USB port potential to shut down) //LED Mapping - More practically generated from a spreadsheet program //id: ID of the LED (Sync with PCB callouts) @@ -187,5 +190,3 @@ along with this program. If not, see . #define USB_LED_COMPOSE_SCANCODE 255 #define USB_LED_KANA_SCANCODE 255 #endif //USB_LED_INDICATOR_ENABLE - -#endif //_config_led_h_ diff --git a/keyboards/massdrop/ctrl/keymaps/default/keymap.c b/keyboards/massdrop/ctrl/keymaps/default/keymap.c index cdb627f9c4b5..53c96d95d0ea 100644 --- a/keyboards/massdrop/ctrl/keymaps/default/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default/keymap.c @@ -1,25 +1,13 @@ #include QMK_KEYBOARD_H enum ctrl_keycodes { - L_BRI = SAFE_RANGE, //LED Brightness Increase - L_BRD, //LED Brightness Decrease - L_PTN, //LED Pattern Select Next - L_PTP, //LED Pattern Select Previous - L_PSI, //LED Pattern Speed Increase - L_PSD, //LED Pattern Speed Decrease - L_T_MD, //LED Toggle Mode - L_T_ONF, //LED Toggle On / Off - L_ON, //LED On - L_OFF, //LED Off - L_T_BR, //LED Toggle Breath Effect - L_T_PTD, //LED Toggle Scrolling Pattern Direction - U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active - U_T_AGCR, //USB Toggle Automatic GCR control - DBG_TOG, //DEBUG Toggle On / Off - DBG_MTRX, //DEBUG Toggle Matrix Prints - DBG_KBD, //DEBUG Toggle Keyboard Prints - DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode @@ -36,21 +24,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), [1] = LAYOUT( - 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_MUTE, 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_MPLY, KC_MSTP, KC_VOLU, \ - L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_VOLD, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, 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_MUTE, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* [X] = LAYOUT( - 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, TG_NKRO, 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 \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), */ }; @@ -71,82 +59,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; switch (keycode) { - case L_BRI: - if (record->event.pressed) { - if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; - else gcr_desired += LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_BRD: - if (record->event.pressed) { - if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; - else gcr_desired -= LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_PTN: - if (record->event.pressed) { - if (led_animation_id == led_setups_count - 1) led_animation_id = 0; - else led_animation_id++; - } - return false; - case L_PTP: - if (record->event.pressed) { - if (led_animation_id == 0) led_animation_id = led_setups_count - 1; - else led_animation_id--; - } - return false; - case L_PSI: - if (record->event.pressed) { - led_animation_speed += ANIMATION_SPEED_STEP; - } - return false; - case L_PSD: - if (record->event.pressed) { - led_animation_speed -= ANIMATION_SPEED_STEP; - if (led_animation_speed < 0) led_animation_speed = 0; - } - return false; - case L_T_MD: - if (record->event.pressed) { - led_lighting_mode++; - if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; - } - return false; - case L_T_ONF: - if (record->event.pressed) { - led_enabled = !led_enabled; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_ON: - if (record->event.pressed) { - led_enabled = 1; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_OFF: - if (record->event.pressed) { - led_enabled = 0; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_T_BR: - if (record->event.pressed) { - led_animation_breathing = !led_animation_breathing; - if (led_animation_breathing) { - gcr_breathe = gcr_desired; - led_animation_breathe_cur = BREATHE_MIN_STEP; - breathe_dir = 1; - } - } - return false; - case L_T_PTD: - if (record->event.pressed) { - led_animation_direction = !led_animation_direction; - } - return false; case U_T_AUTO: if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); @@ -186,6 +98,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; default: return true; //Process all other keycodes normally } diff --git a/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c new file mode 100644 index 000000000000..16f88ffe1dc4 --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c @@ -0,0 +1,226 @@ +#include QMK_KEYBOARD_H + +enum ctrl_keycodes { + L_BRI = SAFE_RANGE, //LED Brightness Increase //Working + L_BRD, //LED Brightness Decrease //Working + L_PTN, //LED Pattern Select Next //Working + L_PTP, //LED Pattern Select Previous //Working + L_PSI, //LED Pattern Speed Increase //Working + L_PSD, //LED Pattern Speed Decrease //Working + L_T_MD, //LED Toggle Mode //Working + L_T_ONF, //LED Toggle On / Off //Broken + L_ON, //LED On //Broken + L_OFF, //LED Off //Broken + L_T_BR, //LED Toggle Breath Effect //Working + L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working + U_T_AGCR, //USB Toggle Automatic GCR control //Working + DBG_TOG, //DEBUG Toggle On / Off // + DBG_MTRX, //DEBUG Toggle Matrix Prints // + DBG_KBD, //DEBUG Toggle Keyboard Prints // + DBG_MOU, //DEBUG Toggle Mouse Prints // + MD_BOOT //Restart into bootloader after hold timeout //Working +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode + +keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + KC_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_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, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ + L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + */ +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case L_BRI: + if (record->event.pressed) { + if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; + else gcr_desired += LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_BRD: + if (record->event.pressed) { + if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; + else gcr_desired -= LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_PTN: + if (record->event.pressed) { + if (led_animation_id == led_setups_count - 1) led_animation_id = 0; + else led_animation_id++; + } + return false; + case L_PTP: + if (record->event.pressed) { + if (led_animation_id == 0) led_animation_id = led_setups_count - 1; + else led_animation_id--; + } + return false; + case L_PSI: + if (record->event.pressed) { + led_animation_speed += ANIMATION_SPEED_STEP; + } + return false; + case L_PSD: + if (record->event.pressed) { + led_animation_speed -= ANIMATION_SPEED_STEP; + if (led_animation_speed < 0) led_animation_speed = 0; + } + return false; + case L_T_MD: + if (record->event.pressed) { + led_lighting_mode++; + if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; + } + return false; + case L_T_ONF: + if (record->event.pressed) { + led_enabled = !led_enabled; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_ON: + if (record->event.pressed) { + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_OFF: + if (record->event.pressed) { + led_enabled = 0; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_T_BR: + if (record->event.pressed) { + led_animation_breathing = !led_animation_breathing; + if (led_animation_breathing) { + gcr_breathe = gcr_desired; + led_animation_breathe_cur = BREATHE_MIN_STEP; + breathe_dir = 1; + } + } + return false; + case L_T_PTD: + if (record->event.pressed) { + led_animation_direction = !led_animation_direction; + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} + +led_instruction_t led_instructions[] = { + //LEDs are normally inactive, no processing is performed on them + //Flags are used in matching criteria for an LED to be active and indicate how to color it + //Flags can be found in tmk_core/protocol/arm_atsam/led_matrix.h (prefixed with LED_FLAG_) + //LED IDs can be found in config_led.h in the keyboard's directory + //Examples are below + + //All LEDs use the user's selected pattern (this is the factory default) + { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + + //Specific LEDs use the user's selected pattern while all others are off + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN, .id0 = 0xFFFFFFFF, .id1 = 0xAAAAAAAA, .id2 = 0x55555555, .id3 = 0x11111111 }, + + //Specific LEDs use specified RGB values while all others are off + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 }, + + //All LEDs use the user's selected pattern + //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green + //When layer 1 is active, key LEDs use red (id0 32 - 17: 1111 1111 1111 1111 0000 0000 0000 0000 = 0xFFFF0000) (except top row 16 - 1) + //When layer 1 is active, key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //When layer 1 is active, key LEDs use red (id2 87 - 65: 0000 0000 0111 1111 1111 1111 1111 1111 = 0x007FFFFF) + //When layer 1 is active, edge LEDs use green (id2 95 - 88: 1111 1111 1000 0000 0000 0000 0000 0000 = 0xFF800000) + //When layer 1 is active, edge LEDs use green (id3 119 - 96: 0000 0000 1111 1111 1111 1111 1111 1111 = 0x00FFFFFF) + // { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id0 = 0xFFFF0000, .id1 = 0xFFFFFFFF, .id2 = 0x007FFFFF, .r = 255, .layer = 1 }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_MATCH_LAYER | LED_FLAG_USE_RGB, .id2 = 0xFF800000, .id3 = 0x00FFFFFF, .g = 127, .layer = 1 }, + + //All key LEDs use red while edge LEDs use the active pattern + //All key LEDs use red (id0 32 - 1: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //All key LEDs use red (id1 64 - 33: 1111 1111 1111 1111 1111 1111 1111 1111 = 0xFFFFFFFF) + //All key LEDs use red (id2 87 - 65: 0000 0000 0111 1111 1111 1111 1111 1111 = 0x007FFFFF) + //Edge uses active pattern (id2 95 - 88: 1111 1111 1000 0000 0000 0000 0000 0000 = 0xFF800000) + //Edge uses active pattern (id3 119 - 96: 0000 0000 1111 1111 1111 1111 1111 1111 = 0x00FFFFFF) + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFFFFFFFF, .id1 = 0xFFFFFFFF, .id2 = 0x007FFFFF, .r = 255 }, + // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_ROTATE_PATTERN , .id2 = 0xFF800000, .id3 = 0x00FFFFFF }, + + //end must be set to 1 to indicate end of instruction set + { .end = 1 } +}; diff --git a/keyboards/massdrop/ctrl/keymaps/default_md/rules.mk b/keyboards/massdrop/ctrl/keymaps/default_md/rules.mk new file mode 100644 index 000000000000..064a6f54c1fa --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/default_md/rules.mk @@ -0,0 +1,2 @@ +# This keymap requires Massdrop Configurator support +OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR diff --git a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c index e41b5eba20ce..79fe7388af6e 100644 --- a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c @@ -1,25 +1,13 @@ #include QMK_KEYBOARD_H enum ctrl_keycodes { - L_BRI = SAFE_RANGE, //LED Brightness Increase - L_BRD, //LED Brightness Decrease - L_PTN, //LED Pattern Select Next - L_PTP, //LED Pattern Select Previous - L_PSI, //LED Pattern Speed Increase - L_PSD, //LED Pattern Speed Decrease - L_T_MD, //LED Toggle Mode - L_T_ONF, //LED Toggle On / Off - L_ON, //LED On - L_OFF, //LED Off - L_T_BR, //LED Toggle Breath Effect - L_T_PTD, //LED Toggle Scrolling Pattern Direction - U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active - U_T_AGCR, //USB Toggle Automatic GCR control - DBG_TOG, //DEBUG Toggle On / Off - DBG_MTRX, //DEBUG Toggle Matrix Prints - DBG_KBD, //DEBUG Toggle Keyboard Prints - DBG_MOU, //DEBUG Toggle Mouse Prints - MD_BOOT, //Restart into bootloader after hold timeout + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode @@ -36,21 +24,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), [1] = LAYOUT( - 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_MUTE, 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_MPLY, KC_MSTP, KC_VOLU, \ - L_T_BR, L_PSD, L_BRI, L_PSI, KC_TRNS, KC_TRNS, KC_TRNS, U_T_AUTO,U_T_AGCR,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_VOLD, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, L_T_MD, L_T_ONF, KC_TRNS, KC_TRNS, MD_BOOT, TG_NKRO, 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_MUTE, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ + _______, RGB_SPD, RGB_VAI, RGB_SPI, RGB_HUI, RGB_SAI, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + _______, RGB_RMOD,RGB_VAD, RGB_MOD, RGB_HUD, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* [X] = LAYOUT( - 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, TG_NKRO, 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 \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), */ }; @@ -71,82 +59,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; switch (keycode) { - case L_BRI: - if (record->event.pressed) { - if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; - else gcr_desired += LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_BRD: - if (record->event.pressed) { - if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; - else gcr_desired -= LED_GCR_STEP; - if (led_animation_breathing) gcr_breathe = gcr_desired; - } - return false; - case L_PTN: - if (record->event.pressed) { - if (led_animation_id == led_setups_count - 1) led_animation_id = 0; - else led_animation_id++; - } - return false; - case L_PTP: - if (record->event.pressed) { - if (led_animation_id == 0) led_animation_id = led_setups_count - 1; - else led_animation_id--; - } - return false; - case L_PSI: - if (record->event.pressed) { - led_animation_speed += ANIMATION_SPEED_STEP; - } - return false; - case L_PSD: - if (record->event.pressed) { - led_animation_speed -= ANIMATION_SPEED_STEP; - if (led_animation_speed < 0) led_animation_speed = 0; - } - return false; - case L_T_MD: - if (record->event.pressed) { - led_lighting_mode++; - if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; - } - return false; - case L_T_ONF: - if (record->event.pressed) { - led_enabled = !led_enabled; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_ON: - if (record->event.pressed) { - led_enabled = 1; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_OFF: - if (record->event.pressed) { - led_enabled = 0; - I2C3733_Control_Set(led_enabled); - } - return false; - case L_T_BR: - if (record->event.pressed) { - led_animation_breathing = !led_animation_breathing; - if (led_animation_breathing) { - gcr_breathe = gcr_desired; - led_animation_breathe_cur = BREATHE_MIN_STEP; - breathe_dir = 1; - } - } - return false; - case L_T_PTD: - if (record->event.pressed) { - led_animation_direction = !led_animation_direction; - } - return false; case U_T_AUTO: if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); @@ -186,6 +98,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } return false; + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_KEYLIGHT: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable_noeeprom(); + } + break; + } + } + return false; default: return true; //Process all other keycodes normally } diff --git a/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c new file mode 100644 index 000000000000..6dfc21378627 --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c @@ -0,0 +1,196 @@ +#include QMK_KEYBOARD_H + +enum ctrl_keycodes { + L_BRI = SAFE_RANGE, //LED Brightness Increase //Working + L_BRD, //LED Brightness Decrease //Working + L_PTN, //LED Pattern Select Next //Working + L_PTP, //LED Pattern Select Previous //Working + L_PSI, //LED Pattern Speed Increase //Working + L_PSD, //LED Pattern Speed Decrease //Working + L_T_MD, //LED Toggle Mode //Working + L_T_ONF, //LED Toggle On / Off //Broken + L_ON, //LED On //Broken + L_OFF, //LED Off //Broken + L_T_BR, //LED Toggle Breath Effect //Working + L_T_PTD, //LED Toggle Scrolling Pattern Direction //Working + U_T_AGCR, //USB Toggle Automatic GCR control //Working + DBG_TOG, //DEBUG Toggle On / Off // + DBG_MTRX, //DEBUG Toggle Matrix Prints // + DBG_KBD, //DEBUG Toggle Keyboard Prints // + DBG_MOU, //DEBUG Toggle Mouse Prints // + MD_BOOT //Restart into bootloader after hold timeout //Working +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode + +keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + KC_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_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_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ + L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + */ +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case L_BRI: + if (record->event.pressed) { + if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX; + else gcr_desired += LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_BRD: + if (record->event.pressed) { + if (LED_GCR_STEP > gcr_desired) gcr_desired = 0; + else gcr_desired -= LED_GCR_STEP; + if (led_animation_breathing) gcr_breathe = gcr_desired; + } + return false; + case L_PTN: + if (record->event.pressed) { + if (led_animation_id == led_setups_count - 1) led_animation_id = 0; + else led_animation_id++; + } + return false; + case L_PTP: + if (record->event.pressed) { + if (led_animation_id == 0) led_animation_id = led_setups_count - 1; + else led_animation_id--; + } + return false; + case L_PSI: + if (record->event.pressed) { + led_animation_speed += ANIMATION_SPEED_STEP; + } + return false; + case L_PSD: + if (record->event.pressed) { + led_animation_speed -= ANIMATION_SPEED_STEP; + if (led_animation_speed < 0) led_animation_speed = 0; + } + return false; + case L_T_MD: + if (record->event.pressed) { + led_lighting_mode++; + if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL; + } + return false; + case L_T_ONF: + if (record->event.pressed) { + led_enabled = !led_enabled; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_ON: + if (record->event.pressed) { + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_OFF: + if (record->event.pressed) { + led_enabled = 0; + I2C3733_Control_Set(led_enabled); + } + return false; + case L_T_BR: + if (record->event.pressed) { + led_animation_breathing = !led_animation_breathing; + if (led_animation_breathing) { + gcr_breathe = gcr_desired; + led_animation_breathe_cur = BREATHE_MIN_STEP; + breathe_dir = 1; + } + } + return false; + case L_T_PTD: + if (record->event.pressed) { + led_animation_direction = !led_animation_direction; + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} + +led_instruction_t led_instructions[] = { + //Please see ../default_md/keymap.c for examples + + //All LEDs use the user's selected pattern (this is the factory default) + { .flags = LED_FLAG_USE_ROTATE_PATTERN }, + + //end must be set to 1 to indicate end of instruction set + { .end = 1 } +}; diff --git a/keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk b/keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk new file mode 100644 index 000000000000..064a6f54c1fa --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/mac_md/rules.mk @@ -0,0 +1,2 @@ +# This keymap requires Massdrop Configurator support +OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h new file mode 100644 index 000000000000..35fd446194ce --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -0,0 +1,52 @@ +#pragma once + +#define FORCE_NKRO + +#define PERMISSIVE_HOLD +#define TAPPING_TERM 150 + +// #define DISABLE_RGB_MATRIX_ALPHAS_MODS +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_BREATHING +#define DISABLE_RGB_MATRIX_CYCLE_ALL +#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define DISABLE_RGB_MATRIX_DUAL_BEACON +#define DISABLE_RGB_MATRIX_RAINBOW_BEACON +#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define DISABLE_RGB_MATRIX_RAINDROPS +#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define DISABLE_RGB_MATRIX_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 + +#define QMK_KEYS_PER_SCAN 4 + +// #define RGB_MATRIX_KEYRELEASES + + +// some speed shit +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#ifndef NO_DEBUG +#define NO_DEBUG +#endif // !NO_DEBUG +#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) +#define NO_PRINT +#endif // !NO_PRINT + +#define NO_ACTION_ONESHOT +#define TAPPING_FORCE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c new file mode 100644 index 000000000000..2823292e681d --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/keymap.c @@ -0,0 +1,403 @@ +#include QMK_KEYBOARD_H + +enum ctrl_layers { + _QWERTY, + _NAV, + _FNC +}; + +enum ctrl_keycodes { + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout + MAS_TOG, + MAS_CRM, + MAS_PRP, + MAS_RED, + MAS_GRN, + MAS_BLU, + MAS_CYN, + MAS_MGT, + MAS_YEL, + MAS_KEY, + MAS_WHT, +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode +#define LT_CAPS LT(_NAV, KC_CAPS) +#define _V_V_V_ KC_TRNS +extern bool autoshift_enabled; + + +keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = 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_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + KC_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, \ + LT_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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FNC), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [_NAV] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PAST, KC_PMNS, KC_PPLS, _______, _______, _______, _______, \ + _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______, KC_P4, KC_P5, KC_P6, KC_PSLS, _______, _______, KC_EQL, _______, _______, _______, \ + _V_V_V_, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PPLS, _______, \ + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, KC_P0, KC_PDOT, KC_PSLS, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [_FNC] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_MSEL, KC_ASTG, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPLY, KC_VOLU, \ + _______, RGB_MOD, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, MAS_MGT, MAS_BLU, MAS_WHT, RGB_RMOD, RGB_MOD, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + _______, RGB_RMOD, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, MAS_RED, MAS_KEY, MAS_CYN, MAS_PRP, _______, _______, \ + MAS_TOG, RGB_TOG, _______, _______, _______, MD_BOOT, TG_NKRO, MAS_YEL, MAS_GRN, MAS_CRM, _______, _______, RGB_VAI, \ + _______, _______, _______, _______, _______, _V_V_V_, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI \ + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [X] = LAYOUT( + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, \ + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, \ + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, \ + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, \ + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, \ + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86 \ + ), + */ +}; + +extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +void set_color_helper(int index, uint8_t red, uint8_t green, uint8_t blue) +{ + if (!HAS_ANY_FLAGS(g_rgb_leds[index].flags, rgb_matrix_get_flags())) + { return; } + + rgb_matrix_set_color(index, red, green, blue); +} + +void rgb_matrix_indicators_user(void) +{ + uint8_t this_led = host_keyboard_leds(); + + if (!g_suspend_state && rgb_matrix_config.enable) { + switch (biton32(layer_state)) { + case _NAV: + if (this_led & (1 << USB_LED_NUM_LOCK)) { + rgb_matrix_set_color(41, 0xFF, 0x00, 0x00); + } else { + rgb_matrix_set_color(41, 0x00, 0x00, 0x00); + } + + // layer indicator + rgb_matrix_set_color(50, 0xFF, 0xFF, 0xFF); + rgb_matrix_set_color(101, 0xFF, 0xFF, 0xFF); + // ESDF + rgb_matrix_set_color(36, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(52, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(53, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(54, 0xFF, 0x00, 0x00); + // home/end + rgb_matrix_set_color(35, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(37, 0x00, 0xFF, 0x00); + // pgup/dn + rgb_matrix_set_color(34, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(51, 0x00, 0x00, 0xFF); + // numpad + rgb_matrix_set_color(23, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(24, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(25, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(40, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(42, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(57, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(58, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(59, 0xFF, 0xFF, 0x00); + // zero + rgb_matrix_set_color(69, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(70, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(71, 0xFF, 0x00, 0x00); + // dot + rgb_matrix_set_color(72, 0x00, 0x00, 0xFF); + // math shit + rgb_matrix_set_color(26, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(27, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(28, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(43, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(46, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(60, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(61, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(73, 0x00, 0x00, 0xFF); + break; + + case _FNC: { + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + HSV hui = hsv; + HSV hud = hsv; + HSV sai = hsv; + HSV sad = hsv; + HSV vai = hsv; + HSV vad = hsv; + hui.h = hsv.h + 8; + hud.h = hsv.h - 8; + sai.s = hsv.s + 16 > 255 ? 255u : hsv.s + 16; + sad.s = hsv.s - 16 < 0 ? 0 : hsv.s - 16; + vai.v = hsv.v + 16 > 255 ? 255 : hsv.v + 16; + vad.v = hsv.v - 16 < 0 ? 0 : hsv.v - 16; + RGB rgb = hsv_to_rgb(hsv); + RGB rgbHUI = hsv_to_rgb(hui); + RGB rgbHUD = hsv_to_rgb(hud); + RGB rgbSAI = hsv_to_rgb(sai); + RGB rgbSAD = hsv_to_rgb(sad); + RGB rgbVAI = hsv_to_rgb(vai); + RGB rgbVAD = hsv_to_rgb(vad); + rgb_matrix_set_color(81, 0xFF, 0xFF, 0xFF); // layer indicator + rgb_matrix_set_color(91, 0xFF, 0xFF, 0xFF); + rgb_matrix_set_color(93, 0x00, 0x00, 0x00); + rgb_matrix_set_color(94, rgb.r, rgb.g, rgb.b); + rgb_matrix_set_color(95, rgb.r, rgb.g, rgb.b); + rgb_matrix_set_color(96, 0x00, 0x00, 0x00); + rgb_matrix_set_color(68, 0xFF, 0x00, 0x00); // MD_BOOT + rgb_matrix_set_color(69, 0xFF, 0x00, 0x40); // TG_NKRO + rgb_matrix_set_color(32, 0x00, 0x80, 0xFF); // KC_VOLU + rgb_matrix_set_color(49, 0x00, 0x80, 0xFF); + rgb_matrix_set_color(13, 0xFF, 0x00, 0x00); // KC_MUTE + rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); // KC_MSTP + rgb_matrix_set_color(47, 0xFF, 0x40, 0x00); // KC_MPRV + rgb_matrix_set_color(48, 0xFF, 0x40, 0x00); + rgb_matrix_set_color(14, 0x00, 0xFF, 0x00); // KC_MSEL + rgb_matrix_set_color(31, 0x00, 0xFF, 0x00); // KC_MPLY + + if (this_led & (1 << !autoshift_enabled)) { + rgb_matrix_set_color(15, 0xFF, 0x00, 0x00); // KC_ASTG + } else { + rgb_matrix_set_color(15, 0xFF, 0xFF, 0x00); + } + + rgb_matrix_set_color(44, 0xFF, 0x80, 0x00); //RGB_MOD + rgb_matrix_set_color(45, 0xFF, 0x80, 0x00); + rgb_matrix_set_color(34, 0xFF, 0x80, 0x00); //RGB_MOD + rgb_matrix_set_color(51, 0xFF, 0x80, 0x00); + rgb_matrix_set_color(63, 0xFF, 0x40, 0x00); //RGB_TOG + rgb_matrix_set_color(64, rgb.r, rgb.g, rgb.b); //MAS_TOG + rgb_matrix_set_color(36, rgbHUI.r, rgbHUI.g, rgbHUI.b); //RGB_HUI + rgb_matrix_set_color(53, rgbHUD.r, rgbHUD.g, rgbHUD.b); + rgb_matrix_set_color(37, rgbSAI.r, rgbSAI.g, rgbSAI.b); //RGB_SAI + rgb_matrix_set_color(54, rgbSAD.r, rgbSAD.g, rgbSAD.b); + rgb_matrix_set_color(38, rgbVAI.r, rgbVAI.g, rgbVAI.b); //RGB_VAI + rgb_matrix_set_color(55, rgbVAD.r, rgbVAD.g, rgbVAD.b); + rgb_matrix_set_color(79, rgb.r, rgb.g, rgb.b); // config display + rgb_matrix_set_color(75, rgbVAI.r, rgbVAI.g, rgbVAI.b); //RGB_VAI + rgb_matrix_set_color(85, rgbVAD.r, rgbVAD.g, rgbVAD.b); + rgb_matrix_set_color(35, 0x80, 0x80, 0x80); //RGB_SPI + rgb_matrix_set_color(52, 0x80, 0x80, 0x80); + rgb_matrix_set_color(84, 0x80, 0x80, 0x80); //RGB_SPI + rgb_matrix_set_color(86, 0x80, 0x80, 0x80); + rgb_matrix_set_color(41, 0xF0, 0x00, 0xFF); //MAS_MGT + rgb_matrix_set_color(42, 0x00, 0x02, 0xFF); //MAS_BLU + rgb_matrix_set_color(57, 0xFF, 0x00, 0x00); //MAS_RED + rgb_matrix_set_color(58, 0x00, 0x00, 0x00); //MAS_KEY + rgb_matrix_set_color(59, 0x00, 0xFF, 0xF7); //MAS_CYN + rgb_matrix_set_color(70, 0xFF, 0xDA, 0x00); //MAS_YEL + rgb_matrix_set_color(71, 0x00, 0xFF, 0x01); //MAS_GRN + rgb_matrix_set_color(72, 0xFF, 0xA5, 0x18); //MAS_CRM + rgb_matrix_set_color(60, 0x81, 0x3C, 0xFF); //MAS_PRP + rgb_matrix_set_color(26, 0xFF, 0xFF, 0xFF); //MAS_WHT + } + break; + } + } +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) +{ + autoshift_disable(); + rgb_matrix_sethsv(192, 112, 255); + rgb_matrix_mode(4); +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) +{ +}; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +bool process_record_user(uint16_t keycode, keyrecord_t* record) +{ + static uint32_t key_timer; + + switch (keycode) { + case U_T_AUTO: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); + } + + return false; + + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + + return false; + + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + + return false; + + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + + return false; + + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + + return false; + + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + + return false; + + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + + return false; + + case MAS_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + + case LED_FLAG_KEYLIGHT: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } + break; + + case LED_FLAG_UNDERGLOW: { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable_noeeprom(); + } + break; + + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + } + break; + } + } + + return false; + + case MAS_CRM: + if (record->event.pressed) { + rgb_matrix_sethsv(32, 160, 255); + } + + return false; + + case MAS_PRP: + if (record->event.pressed) { + rgb_matrix_sethsv(192, 112, 255); + } + + return false; + + case MAS_RED: + if (record->event.pressed) { + rgb_matrix_sethsv(0, 255, 255); + } + + return false; + + case MAS_GRN: + if (record->event.pressed) { + rgb_matrix_sethsv(88, 255, 255); + } + + return false; + + case MAS_BLU: + if (record->event.pressed) { + rgb_matrix_sethsv(168, 255, 255); + } + + return false; + + case MAS_CYN: + if (record->event.pressed) { + rgb_matrix_sethsv(128, 255, 255); + } + + return false; + + case MAS_MGT: + if (record->event.pressed) { + rgb_matrix_sethsv(216, 255, 255); + } + + return false; + + case MAS_YEL: + if (record->event.pressed) { + rgb_matrix_sethsv(40, 255, 255); + } + + return false; + + case MAS_KEY: + if (record->event.pressed) { + rgb_matrix_sethsv(0, 0, 0); + } + + return false; + + case MAS_WHT: + if (record->event.pressed) { + rgb_matrix_sethsv(128, 0, 255); + } + + return false; + + default: + return true; //Process all other keycodes normally + } +} + diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk b/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk new file mode 100644 index 000000000000..4fb7826ce61b --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk @@ -0,0 +1,2 @@ +NKRO_ENABLE = yes # USB Nkey Rollover +AUTO_SHIFT_ENABLE = yes # Auto Shift diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md new file mode 100644 index 000000000000..5ee630dfb803 --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/README.md @@ -0,0 +1,5 @@ +# THIS KEYMAP IS BROKEN + +The CTRL and ALT have both been switched to using the QMK RGB Matrix system, +rendering any custom effects that used the old, custom Massdrop lighting system, +BROKEN. diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c index 0bdc15214016..58911aa75741 100644 --- a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c @@ -15,7 +15,6 @@ extern issi3733_led_t *lede; extern issi3733_led_t led_map[]; -extern led_disp_t disp; enum ctrl_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase @@ -238,8 +237,6 @@ void led_matrix_run(void) { led_cur = led_map; - disp.frame += 1; - breathe_mult = 1; if (led_animation_breathing) @@ -314,7 +311,7 @@ void led_matrix_run(void) } float pomod; - pomod = (float)(disp.frame % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed; + pomod = (float)(g_tick % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed; //Add in any moving effects if ((!led_animation_direction && f[fcur].ef & EF_SCR_R) || (led_animation_direction && (f[fcur].ef & EF_SCR_L))) diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk new file mode 100644 index 000000000000..064a6f54c1fa --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/rules.mk @@ -0,0 +1,2 @@ +# This keymap requires Massdrop Configurator support +OPT_DEFS += -DUSE_MASSDROP_CONFIGURATOR diff --git a/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c b/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c new file mode 100644 index 000000000000..1e50b4a53c47 --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/xulkal/keymap.c @@ -0,0 +1,105 @@ +#include QMK_KEYBOARD_H +#include "xulkal.h" + +enum ctrl_keycodes { + U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active + U_T_AGCR, //USB Toggle Automatic GCR control + DBG_TOG, //DEBUG Toggle On / Off + DBG_MTRX, //DEBUG Toggle Matrix Prints + DBG_KBD, //DEBUG Toggle Keyboard Prints + DBG_MOU, //DEBUG Toggle Mouse Prints + MD_BOOT, //Restart into bootloader after hold timeout +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode + +keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, TD_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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, \ + KC_LCPO, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCPC, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ + _______, RGB_RMOD, RGB_MOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ + RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, MD_BOOT, _______, _______, U_T_AUTO,U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_TOG, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + */ +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +}; + +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + static uint32_t key_timer; + + switch (keycode) { + case U_T_AUTO: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); + } + return false; + case U_T_AGCR: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); + } + return false; + case DBG_TOG: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); + } + return false; + case DBG_MTRX: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix"); + } + return false; + case DBG_KBD: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard"); + } + return false; + case DBG_MOU: + if (record->event.pressed) { + TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse"); + } + return false; + case MD_BOOT: + if (record->event.pressed) { + key_timer = timer_read32(); + } else { + if (timer_elapsed32(key_timer) >= 500) { + reset_keyboard(); + } + } + return false; + default: + return true; //Process all other keycodes normally + } +} diff --git a/keyboards/massdrop/ctrl/keymaps/xulkal/rules.mk b/keyboards/massdrop/ctrl/keymaps/xulkal/rules.mk new file mode 100644 index 000000000000..f78fb3237b99 --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/xulkal/rules.mk @@ -0,0 +1 @@ +DISABLE_LTO = yes diff --git a/keyboards/massdrop/ctrl/led_programs.c b/keyboards/massdrop/ctrl/led_programs.c deleted file mode 100644 index ca27016454dc..000000000000 --- a/keyboards/massdrop/ctrl/led_programs.c +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 2018 Massdrop Inc. - -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 . -*/ - -#include "ctrl.h" -#include "led_matrix.h" - -//Teal <-> Salmon -led_setup_t leds_teal_salmon[] = { - { .hs = 0, .he = 33, .rs = 24, .re = 24, .gs = 215, .ge = 215, .bs = 204, .be = 204, .ef = EF_NONE }, - { .hs = 33, .he = 66, .rs = 24, .re = 255, .gs = 215, .ge = 114, .bs = 204, .be = 118, .ef = EF_NONE }, - { .hs = 66, .he = 100, .rs = 255, .re = 255, .gs = 114, .ge = 114, .bs = 118, .be = 118, .ef = EF_NONE }, - { .end = 1 }, -}; - -//Yellow -led_setup_t leds_yellow[] = { - { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_NONE }, - { .end = 1 }, -}; - -//Off -led_setup_t leds_off[] = { - { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_NONE }, - { .end = 1 }, -}; - -//Red -led_setup_t leds_red[] = { - { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_NONE }, - { .end = 1 }, -}; - -//Green -led_setup_t leds_green[] = { - { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_NONE }, - { .end = 1 }, -}; - -//Blue -led_setup_t leds_blue[] = { - { .hs = 0, .he = 100, .rs = 0, .re = 0, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_NONE }, - { .end = 1 }, -}; - -//White -led_setup_t leds_white[] = { - { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 255, .be = 255, .ef = EF_NONE }, - { .end = 1 }, -}; - -//White with moving red stripe -led_setup_t leds_white_with_red_stripe[] = { - { .hs = 0, .he = 100, .rs = 255, .re = 255, .gs = 255, .ge = 255, .bs = 255, .be = 255, .ef = EF_NONE }, - { .hs = 0, .he = 15, .rs = 0, .re = 0, .gs = 0, .ge = 255, .bs = 0, .be = 255, .ef = EF_SCR_R | EF_SUBTRACT }, - { .hs = 15, .he = 30, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 0, .ef = EF_SCR_R | EF_SUBTRACT }, - { .end = 1 }, -}; - -//Black with moving red stripe -led_setup_t leds_black_with_red_stripe[] = { - { .hs = 0, .he = 15, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_SCR_R }, - { .hs = 15, .he = 30, .rs = 255, .re = 0, .gs = 0, .ge = 0, .bs = 0, .be = 0, .ef = EF_SCR_R }, - { .end = 1 }, -}; - -//Rainbow no scrolling -led_setup_t leds_rainbow_ns[] = { - { .hs = 0, .he = 16.67, .rs = 255, .re = 255, .gs = 0, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER }, - { .hs = 16.67, .he = 33.33, .rs = 255, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER }, - { .hs = 33.33, .he = 50, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 255, .ef = EF_OVER }, - { .hs = 50, .he = 66.67, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER }, - { .hs = 66.67, .he = 83.33, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER }, - { .hs = 83.33, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 0, .ef = EF_OVER }, - { .end = 1 }, -}; - -//Rainbow scrolling -led_setup_t leds_rainbow_s[] = { - { .hs = 0, .he = 16.67, .rs = 255, .re = 255, .gs = 0, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER | EF_SCR_R }, - { .hs = 16.67, .he = 33.33, .rs = 255, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 0, .ef = EF_OVER | EF_SCR_R }, - { .hs = 33.33, .he = 50, .rs = 0, .re = 0, .gs = 255, .ge = 255, .bs = 0, .be = 255, .ef = EF_OVER | EF_SCR_R }, - { .hs = 50, .he = 66.67, .rs = 0, .re = 0, .gs = 255, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER | EF_SCR_R }, - { .hs = 66.67, .he = 83.33, .rs = 0, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 255, .ef = EF_OVER | EF_SCR_R }, - { .hs = 83.33, .he = 100, .rs = 255, .re = 255, .gs = 0, .ge = 0, .bs = 255, .be = 0, .ef = EF_OVER | EF_SCR_R }, - { .end = 1 }, -}; - -//Add new LED animations here using one from above as example -//The last entry must be { .end = 1 } -//Add the new animation name to the list below following its format - -void *led_setups[] = { - leds_rainbow_s, - leds_rainbow_ns, - leds_teal_salmon, - leds_yellow, - leds_red, - leds_green, - leds_blue, - leds_white, - leds_white_with_red_stripe, - leds_black_with_red_stripe, - leds_off -}; - -const uint8_t led_setups_count = sizeof(led_setups) / sizeof(led_setups[0]); diff --git a/keyboards/massdrop/ctrl/rules.mk b/keyboards/massdrop/ctrl/rules.mk index c5539158f580..aa45c68056d8 100644 --- a/keyboards/massdrop/ctrl/rules.mk +++ b/keyboards/massdrop/ctrl/rules.mk @@ -1,6 +1,6 @@ # project specific files -SRC = led_programs.c -SRC += matrix.c +SRC = matrix.c +SRC += config_led.c #For platform and packs ARM_ATSAM = SAMD51J18A @@ -31,3 +31,6 @@ HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) VIRTSER_ENABLE = no # USB Serial Driver RAW_ENABLE = no # Raw device AUTO_SHIFT_ENABLE = no # Auto Shift + +# Custom RGB matrix handling +RGB_MATRIX_ENABLE = custom diff --git a/keyboards/maxipad/config.h b/keyboards/maxipad/config.h index 1acd232c99ec..6d8225d74e95 100644 --- a/keyboards/maxipad/config.h +++ b/keyboards/maxipad/config.h @@ -1,22 +1,19 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H +/* Copyright 2019 + * + * 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 . + */ +#pragma once #include "config_common.h" @@ -28,37 +25,11 @@ along with this program. If not, see . #define PRODUCT maxipad #define DESCRIPTION A custom keyboard -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 6 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -//Pro micro pinout - #define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } - #define MATRIX_COL_PINS { F4, C6, D7, F5, B4, B5 } - #define UNUSED_PINS -//Teensy 2 pinout - //#define MATRIX_ROW_PINS { B6, F7, B2, B3, B1 } - //#define MATRIX_COL_PINS { F6, C6, D7, F5, B4, B5 } - //#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ +/* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST /* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_LEVELS 3 /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 @@ -86,4 +57,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/maxipad/info.json b/keyboards/maxipad/info.json index 3ee4830c47b8..84daa5aba4af 100644 --- a/keyboards/maxipad/info.json +++ b/keyboards/maxipad/info.json @@ -5,8 +5,11 @@ "width": 6, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_grid": { "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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}] - } + }, + "LAYOUT_1x2uC": { + "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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"w": 2, "x":4, "y":4}] + } } } diff --git a/keyboards/maxipad/keymaps/default/config.h b/keyboards/maxipad/keymaps/default/config.h new file mode 100644 index 000000000000..08c234aee2b2 --- /dev/null +++ b/keyboards/maxipad/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/maxipad/keymaps/default/keymap.c b/keyboards/maxipad/keymaps/default/keymap.c index 5cec84c5457c..0971569319a5 100644 --- a/keyboards/maxipad/keymaps/default/keymap.c +++ b/keyboards/maxipad/keymaps/default/keymap.c @@ -1,23 +1,33 @@ -#include "maxipad.h" +/* Copyright 2019 + * + * 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 . + */ +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT( /* Base */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, \ - MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \ - KC_LCTL, KC_LALT, MO(1), KC_ENT,KC_GRV,KC_SPC \ -), -[1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, \ - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, 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_SPC \ -), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function -{ - return MACRO_NONE; + [0] = LAYOUT( /* Base */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, \ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \ + KC_LCTL, KC_LALT, MO(1), KC_ENT, KC_GRV, KC_SPC \ + ), + [1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, \ + _______, _______, KC_UP, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______ \ + ), }; diff --git a/keyboards/maxipad/keymaps/default/readme.md b/keyboards/maxipad/keymaps/default/readme.md new file mode 100644 index 000000000000..a6c0d4a3f046 --- /dev/null +++ b/keyboards/maxipad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for maxipad \ No newline at end of file diff --git a/keyboards/maxipad/maxipad.c b/keyboards/maxipad/maxipad.c index a193b112b91c..44a0c2b7428d 100644 --- a/keyboards/maxipad/maxipad.c +++ b/keyboards/maxipad/maxipad.c @@ -1 +1,16 @@ +/* Copyright 2019 + * + * 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 . + */ #include "maxipad.h" \ No newline at end of file diff --git a/keyboards/maxipad/maxipad.h b/keyboards/maxipad/maxipad.h index 613f7df22e3e..e2a08050538f 100644 --- a/keyboards/maxipad/maxipad.h +++ b/keyboards/maxipad/maxipad.h @@ -1,13 +1,39 @@ -#ifndef MAXIPAD_H -#define MAXIPAD_H +/* Copyright 2019 + * + * 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 . + */ +#pragma once #include "quantum.h" -// This a shortcut to help you visually see your layout. -// The following is an example using the Planck MIT layout -// The first section contains all of the arguements -// The second converts the arguments into a two-dimensional array -#define LAYOUT( \ +#define ___ KC_NO + +#ifdef KEYBOARD_maxipad_promicro + #include "promicro.h" +#elif KEYBOARD_maxipad_teensy2 + #include "teensy2.h" +#endif + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_grid( \ k00, k01, k02, k03, k04, k05, \ k10, k11, k12, k13, k14, k15, \ k20, k21, k22, k23, k24, k25, \ @@ -22,4 +48,20 @@ { k40, k41, k42, k43, k44, k45 } \ } -#endif +#define LAYOUT_1x2uC( \ + 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 \ +) \ +{ \ + { 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 } \ +} + +#define LAYOUT LAYOUT_grid +#define LAYOUT_ortho_5x6 LAYOUT_grid diff --git a/keyboards/maxipad/promicro/config.h b/keyboards/maxipad/promicro/config.h new file mode 100644 index 000000000000..008e7929cbbd --- /dev/null +++ b/keyboards/maxipad/promicro/config.h @@ -0,0 +1,39 @@ +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } +#define MATRIX_COL_PINS { F4, C6, D7, F5, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/maxipad/promicro/promicro.c b/keyboards/maxipad/promicro/promicro.c new file mode 100644 index 000000000000..4ecd97464525 --- /dev/null +++ b/keyboards/maxipad/promicro/promicro.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "maxipad.h" diff --git a/keyboards/maxipad/promicro/promicro.h b/keyboards/maxipad/promicro/promicro.h new file mode 100644 index 000000000000..8f1419c9d7de --- /dev/null +++ b/keyboards/maxipad/promicro/promicro.h @@ -0,0 +1,20 @@ +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +#include "maxipad.h" +#include "quantum.h" + diff --git a/keyboards/maxipad/promicro/rules.mk b/keyboards/maxipad/promicro/rules.mk new file mode 100644 index 000000000000..dc6f19623730 --- /dev/null +++ b/keyboards/maxipad/promicro/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/maxipad/readme.md b/keyboards/maxipad/readme.md index b62afdf34315..65661b065b3d 100644 --- a/keyboards/maxipad/readme.md +++ b/keyboards/maxipad/readme.md @@ -1,17 +1,27 @@ # Maxipad -## Quantum MK Firmware +![Maxipad](https://images.bigcartel.com/product_images/193297217/product_image.jpg) -For the full Quantum feature list, see [the parent readme.md](/readme.md). +5 x 6 Gamepad/Macropad PCBs from /u/wootpatoot -If you are using a pro micro then make sure to enable USE_PRO_MICRO in the makefile -Change the config.h pinout to match your mcu!! +- Multiple layouts supported + - Full-grid + - 2u thumb-key (the 2u only works in the bottom right position). +- Multiple controllers supported + - Pro Micro + - PJRC Teensy 2.0 -Depending on which keymap you would like to use, you will have to compile slightly differently. +Keyboard Maintainer: QMK Community +Hardware Supported: Maxipad PCB +Hardware Availability: [switchtop](http://www.switchtop.com/product/gamepad-macropad-pcbs) -### Default +Make example for this keyboard (after setting up your build environment): -To build with the default keymap, simply run `make maxipad:default`. + make maxipad:default -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. +If you would like to use one of the alternative controllers: + + make maxipad/promicro:default + make maxipad/teensy2: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). diff --git a/keyboards/maxipad/rules.mk b/keyboards/maxipad/rules.mk index 31be1924fad3..735c7af26d69 100644 --- a/keyboards/maxipad/rules.mk +++ b/keyboards/maxipad/rules.mk @@ -1,76 +1,22 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - - # Build Options -# comment out to disable the options. +# change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -# 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 -# MIDI_ENABLE = YES # MIDI controls -# UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID -USE_PRO_MICRO = yes 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 +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +DEFAULT_FOLDER = maxipad/promicro diff --git a/keyboards/maxipad/teensy2/config.h b/keyboards/maxipad/teensy2/config.h new file mode 100644 index 000000000000..4e43920d5afb --- /dev/null +++ b/keyboards/maxipad/teensy2/config.h @@ -0,0 +1,39 @@ +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, F7, B2, B3, B1 } +#define MATRIX_COL_PINS { F6, C6, D7, F5, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/maxipad/teensy2/rules.mk b/keyboards/maxipad/teensy2/rules.mk new file mode 100644 index 000000000000..3fb7c7e5a7e4 --- /dev/null +++ b/keyboards/maxipad/teensy2/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = halfkay + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 diff --git a/keyboards/maxipad/teensy2/teensy2.c b/keyboards/maxipad/teensy2/teensy2.c new file mode 100644 index 000000000000..4ecd97464525 --- /dev/null +++ b/keyboards/maxipad/teensy2/teensy2.c @@ -0,0 +1,16 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "maxipad.h" diff --git a/keyboards/maxipad/teensy2/teensy2.h b/keyboards/maxipad/teensy2/teensy2.h new file mode 100644 index 000000000000..acb213acc8b4 --- /dev/null +++ b/keyboards/maxipad/teensy2/teensy2.h @@ -0,0 +1,19 @@ +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +#include "maxipad.h" +#include "quantum.h" diff --git a/keyboards/mechkeys/mk60/config.h b/keyboards/mechkeys/mk60/config.h new file mode 100644 index 000000000000..9d6a2565d6e0 --- /dev/null +++ b/keyboards/mechkeys/mk60/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Mechkeys +#define PRODUCT mechkeys mk60 +#define DESCRIPTION A custom 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 6 + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 12 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/mechkeys/mk60/info.json b/keyboards/mechkeys/mk60/info.json new file mode 100644 index 000000000000..06ed337260ce --- /dev/null +++ b/keyboards/mechkeys/mk60/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "MK60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 68, + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K07", "x":7, "y":0}, + {"label":"K08", "x":8, "y":0}, + {"label":"K09", "x":9, "y":0}, + {"label":"K0A", "x":10, "y":0}, + {"label":"K0B", "x":11, "y":0}, + {"label":"K0C", "x":12, "y":0}, + {"label":"K0D", "x":13, "y":0}, + {"label":"K0E", "x":14, "y":0}, + {"label":"K10", "x":0, "y":1, "w":1.5}, + {"label":"K12", "x":1.5, "y":1}, + {"label":"K13", "x":2.5, "y":1}, + {"label":"K14", "x":3.5, "y":1}, + {"label":"K15", "x":4.5, "y":1}, + {"label":"K16", "x":5.5, "y":1}, + {"label":"K17", "x":6.5, "y":1}, + {"label":"K18", "x":7.5, "y":1}, + {"label":"K19", "x":8.5, "y":1}, + {"label":"K1A", "x":9.5, "y":1}, + {"label":"K1B", "x":10.5, "y":1}, + {"label":"K1C", "x":11.5, "y":1}, + {"label":"K1D", "x":12.5, "y":1}, + {"label":"K1E", "x":13.5, "y":1, "w":1.5}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K22", "x":1.75, "y":2}, + {"label":"K23", "x":2.75, "y":2}, + {"label":"K24", "x":3.75, "y":2}, + {"label":"K25", "x":4.75, "y":2}, + {"label":"K26", "x":5.75, "y":2}, + {"label":"K27", "x":6.75, "y":2}, + {"label":"K28", "x":7.75, "y":2}, + {"label":"K29", "x":8.75, "y":2}, + {"label":"K2A", "x":9.75, "y":2}, + {"label":"K2B", "x":10.75, "y":2}, + {"label":"K2C", "x":11.75, "y":2}, + {"label":"K2D", "x":12.75, "y":2, "w":2.25}, + {"label":"K30", "x":0, "y":3}, + {"label":"K31", "x":1, "y":3}, + {"label":"K32", "x":2, "y":3}, + {"label":"K33", "x":3, "y":3}, + {"label":"K34", "x":4, "y":3}, + {"label":"K35", "x":5, "y":3}, + {"label":"K36", "x":6, "y":3}, + {"label":"K37", "x":7, "y":3}, + {"label":"K38", "x":8, "y":3}, + {"label":"K39", "x":9, "y":3}, + {"label":"K3A", "x":10, "y":3}, + {"label":"K3B", "x":11, "y":3}, + {"label":"K3C", "x":12, "y":3}, + {"label":"K3D", "x":13, "y":3}, + {"label":"K3E", "x":14, "y":3}, + {"label":"K40", "x":0, "y":4, "w":1.75}, + {"label":"K42", "x":1.75, "y":4, "w":1.25}, + {"label":"K43", "x":3, "y":4, "w":1.25}, + {"label":"K44", "x":4.25, "y":4, "w":1.25}, + {"label":"K47", "x":5.5, "y":4, "w":3}, + {"label":"K49", "x":8.5, "y":4, "w":1.5}, + {"label":"K4A", "x":10, "y":4}, + {"label":"K4B", "x":11, "y":4}, + {"label":"K4C", "x":12, "y":4}, + {"label":"K4D", "x":13, "y":4}, + {"label":"K4E", "x":14, "y":4} + ] + } + } + } + \ No newline at end of file diff --git a/keyboards/mechkeys/mk60/keymaps/default/config.h b/keyboards/mechkeys/mk60/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/mechkeys/mk60/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/mechkeys/mk60/keymaps/default/keymap.c b/keyboards/mechkeys/mk60/keymaps/default/keymap.c new file mode 100644 index 000000000000..ea566d4b557c --- /dev/null +++ b/keyboards/mechkeys/mk60/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_NO, KC_Z, \ + KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_DEL, KC_LCTL, KC_LGUI, KC_LALT, \ + MO(1), KC_SPC, KC_RALT, KC_PGUP, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( \ + RESET, 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, \ + BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, \ + RGB_MOD, RGB_HUI, RGB_HUD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, 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 \ + ), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/mechkeys/mk60/keymaps/default/readme.md b/keyboards/mechkeys/mk60/keymaps/default/readme.md new file mode 100644 index 000000000000..8a01d9475e81 --- /dev/null +++ b/keyboards/mechkeys/mk60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for mk60 diff --git a/keyboards/mechkeys/mk60/mk60.c b/keyboards/mechkeys/mk60/mk60.c new file mode 100644 index 000000000000..4c6a059f4cfa --- /dev/null +++ b/keyboards/mechkeys/mk60/mk60.c @@ -0,0 +1,50 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include "mk60.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(B7); + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)){ + writePinLow(B7); + }else { + writePinHigh(B7); + } + + led_set_user(usb_led); +} diff --git a/keyboards/mechkeys/mk60/mk60.h b/keyboards/mechkeys/mk60/mk60.h new file mode 100644 index 000000000000..66eb416a6fae --- /dev/null +++ b/keyboards/mechkeys/mk60/mk60.h @@ -0,0 +1,41 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k42, k43, k44, k47, k49, k4A, k4B, k4C, k4D, k4E \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E}, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E}, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, KC_NO}, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E}, \ + { k40, KC_NO, k42, k43, k44, KC_NO, KC_NO, k47, KC_NO, k49, k4A, k4B, k4C, k4D, k4E}, \ +} diff --git a/keyboards/mechkeys/mk60/readme.md b/keyboards/mechkeys/mk60/readme.md new file mode 100644 index 000000000000..d3093349a17e --- /dev/null +++ b/keyboards/mechkeys/mk60/readme.md @@ -0,0 +1,13 @@ +# mechkeys mk60 + +60% keyboard with RGB underglow and backlights + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: MK60 +Hardware Availability: The MK60 was discontinued by [mechkeys.ca](https://mechkeys.ca/) + +Make example for this keyboard (after setting up your build environment): + + make mk60: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). diff --git a/keyboards/mechkeys/mk60/rules.mk b/keyboards/mechkeys/mk60/rules.mk new file mode 100644 index 000000000000..e5a48d853f8a --- /dev/null +++ b/keyboards/mechkeys/mk60/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file diff --git a/keyboards/mechmini/v1/README.md b/keyboards/mechmini/v1/README.md index b4a1924c4f72..315349803a09 100644 --- a/keyboards/mechmini/v1/README.md +++ b/keyboards/mechmini/v1/README.md @@ -29,7 +29,7 @@ $ brew cask install crosspack-avr $ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb ``` -In order to use the `./program` script, which can reboot the board into +In order to use the `./util/atmega32a_program.py` script, which can reboot the board into the bootloader, you'll need Python 2 with PyUSB installed: ``` diff --git a/keyboards/mechmini/v1/keymaps/default/keymap.c b/keyboards/mechmini/v1/keymaps/default/keymap.c index 4a0a4dc0a698..f9e446064a53 100644 --- a/keyboards/mechmini/v1/keymaps/default/keymap.c +++ b/keyboards/mechmini/v1/keymaps/default/keymap.c @@ -13,8 +13,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "mechmini.h" -#include "quantum.h" +#include QMK_KEYBOARD_H #define _BL 0 // base layer #define _FN1 1 // function layer 1 diff --git a/keyboards/mechmini/v2/keymaps/arkag/keymap.c b/keyboards/mechmini/v2/keymaps/arkag/keymap.c index 29e125394bcd..4f4cbda3f37e 100644 --- a/keyboards/mechmini/v2/keymaps/arkag/keymap.c +++ b/keyboards/mechmini/v2/keymaps/arkag/keymap.c @@ -7,33 +7,47 @@ */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_2u_space_ortho( - KC_LEAD, 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_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, QUOTE, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, - M_PMOD, LRALT, M_SMOD, LOWER, RAISE, KC_SPC, KC_SLSH, KC_BSLS, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + M_PMOD, LRALT, M_SMOD, LOWER, RAISE, KC_SPC, MEDIA, FUNCT, XXXXXXX, GAME , KC_LEAD), [_RAISE] = LAYOUT_2u_space_ortho( - GRAVE, KC_1, KC_2, THREE, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + GRAVE, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, OBRACK, CBRACK, KC_EQL, HYPHEN, _______, _______, KC_4, KC_5, KC_6, _______, KC_NLCK, - _______, _______, _______, CEDILLA, _______, KC_COMM, KC_PDOT, KC_1, KC_2, KC_3, KC_PPLS, KC_PENT, - _______, _______, _______, KEEB, _______, _______, _______, M_OS, KC_PSLS, KC_PMNS, KC_PAST), + _______, _______, _______, CEDILLA, _______, KC_COMM, KC_PDOT, KC_1, KC_2, KC_3, KC_BSLS, KC_PENT, + _______, _______, _______, KEEB, _______, _______, KC_0, KC_PSLS, KC_PMNS, KC_PPLS, KC_PAST), [_LOWER] = LAYOUT_2u_space_ortho( - KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, M_P_B, M_C_A_D, + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_CAPS, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + _______, LRALT, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [_KEEB] = LAYOUT_2u_space_ortho( + [_MEDIA] = LAYOUT_2u_space_ortho( + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______), + + [_FUNCT] = LAYOUT_2u_space_ortho( 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_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, M_SFT, M_SPC, M_OS ), + + [_KEEB] = LAYOUT_2u_space_ortho( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_STEP, BL_INC, BL_DEC, BL_BRTG, _______, _______, _______, _______, _______, _______, RGB_M_P, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), - [_LAZY] = LAYOUT_2u_space_ortho( - _______, _______, _______, _______, _______, M_TM, _______, M_SNIPT, M_SHRUG, _______, _______, KC_MUTE, - _______, _______, _______, _______, _______, M_GGT, _______, M_UF, M_LOD, M_REPO, _______, _______, - _______, _______, _______, _______, _______, _______, _______, M_TF, M_LENNY, _______, KC_VOLU, KC_MPLY, - _______, _______, _______, _______, _______, _______, M_CALC, _______, KC_MPRV, KC_VOLD, KC_MNXT), + [_GAMING] = LAYOUT_2u_space_ortho( + KC_ESC, KC_F13, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_TAB, KC_F14, KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LSFT, KC_F15, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_F16, KC_Z, KC_X, KC_C, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, GAME, XXXXXXX), + }; diff --git a/keyboards/mechmini/v2/keymaps/arkag/rules.mk b/keyboards/mechmini/v2/keymaps/arkag/rules.mk index c1d5afa1ebae..64f65f7062e0 100644 --- a/keyboards/mechmini/v2/keymaps/arkag/rules.mk +++ b/keyboards/mechmini/v2/keymaps/arkag/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = lite MOUSEKEY_ENABLE = no STENO_ENABLE = no EXTRAKEY_ENABLE = yes @@ -6,7 +6,7 @@ CONSOLE_ENABLE = no COMMAND_ENABLE = no SLEEP_LED_ENABLE = no NKRO_ENABLE = yes -BACKLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes diff --git a/keyboards/mechmini/v2/keymaps/default/keymap.c b/keyboards/mechmini/v2/keymaps/default/keymap.c index e35f25ee401e..23f61f9184bc 100755 --- a/keyboards/mechmini/v2/keymaps/default/keymap.c +++ b/keyboards/mechmini/v2/keymaps/default/keymap.c @@ -4,11 +4,15 @@ #define _FN1 1 #define _FN2 2 -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +enum custom_keycodes { + SFT_ESC +}; + +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_split_space( - F(0), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + SFT_ESC,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, KC_DOT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RCTL, MO(1), MO(2)), @@ -42,10 +46,6 @@ void matrix_init_user(void) { void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { if (usb_led & (1 << USB_LED_NUM_LOCK)) { @@ -80,21 +80,11 @@ void led_set_user(uint8_t usb_led) { } -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -102,7 +92,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -110,6 +100,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/mechmini/v2/keymaps/spacebarracecar/config.h b/keyboards/mechmini/v2/keymaps/spacebarracecar/config.h new file mode 100644 index 000000000000..45dcbb04b589 --- /dev/null +++ b/keyboards/mechmini/v2/keymaps/spacebarracecar/config.h @@ -0,0 +1,3 @@ +#pragma once + + diff --git a/keyboards/niu_mini/keymaps/spacebarracecar/keymap.c b/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c similarity index 92% rename from keyboards/niu_mini/keymaps/spacebarracecar/keymap.c rename to keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c index ea22ce94775a..d4e9de03698b 100644 --- a/keyboards/niu_mini/keymaps/spacebarracecar/keymap.c +++ b/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c @@ -7,7 +7,8 @@ enum layers { _BASE, _RAISE, - _LOWER + _LOWER, + _MUSICMODE }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -24,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { `-----------------------------------------------------------------------------------------------------------------------' */ -[_BASE] = LAYOUT_ortho_4x12( +[_BASE] = LAYOUT_ortho( KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, CU_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC, CU_NAV, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, CU_SCLN, CU_QUOT, CU_LSFT, CU_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, CU_COMM, CU_DOT, CU_SLSH, CU_RSFT, @@ -42,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | | | | | | | | | | `-----------------------------------------------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_ortho_4x12( +[_LOWER] = LAYOUT_ortho( DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______, _______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE, _______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______, @@ -61,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { `-----------------------------------------------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_ortho_4x12( +[_RAISE] = LAYOUT_ortho( CU_GRV, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, CU_BSLS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, _______, _______, _______, _______, @@ -80,11 +81,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { `-----------------------------------------------------------------------------------------------------------------------' */ -[_DEADKEY] = LAYOUT_ortho_4x12( - KC_TAB, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_UE, CU_ED, CU_OE, CU_ED, _______, - _______, CU_AE, CU_SS, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_DDQ, - _______, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, _______, - _______, _______, _______, _______, _______, CU_DDQ, CU_DDQ, _______, _______, _______, _______, _______ +[_DEADKEY] = LAYOUT_ortho( + KC_TAB, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_UE, CU_ED, CU_OE, CU_ED, KC_BSPC, + CU_NAV, CU_AE, CU_SS, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_DDQ, + CU_LSFT, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_RSFT, + KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, CU_DDQ, CU_DDQ, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), /* Navigation @@ -99,11 +100,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { `-----------------------------------------------------------------------------------------------------------------------' */ -[_NAV] = LAYOUT_ortho_4x12( +[_NAV] = LAYOUT_ortho( ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, RGB_M_P, KC_ENT, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, RGB_TOG, RGB_MOD, RGB_HUI, CU_RGBV, _______, - RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME + RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, RGB_M_P, _______, _______, _______, CU_GAME ) }; diff --git a/keyboards/niu_mini/keymaps/spacebarracecar/readme.md b/keyboards/mechmini/v2/keymaps/spacebarracecar/readme.md similarity index 83% rename from keyboards/niu_mini/keymaps/spacebarracecar/readme.md rename to keyboards/mechmini/v2/keymaps/spacebarracecar/readme.md index 96727438167b..d4039713a51f 100644 --- a/keyboards/niu_mini/keymaps/spacebarracecar/readme.md +++ b/keyboards/mechmini/v2/keymaps/spacebarracecar/readme.md @@ -1,4 +1,4 @@ -# SpacebarRacecar US-International NIU Mini Keymap for German PCs +# SpacebarRacecar US-International Mechmini 2 Keymap for German PCs This keymap emulates most keys of the US-International layout on PCs that have German set as input language. This allows the use of the keyboard on any PC in Germany without the need to change any settings. diff --git a/keyboards/niu_mini/keymaps/spacebarracecar/rules.mk b/keyboards/mechmini/v2/keymaps/spacebarracecar/rules.mk similarity index 94% rename from keyboards/niu_mini/keymaps/spacebarracecar/rules.mk rename to keyboards/mechmini/v2/keymaps/spacebarracecar/rules.mk index 124de79deb86..cade68ac9849 100644 --- a/keyboards/niu_mini/keymaps/spacebarracecar/rules.mk +++ b/keyboards/mechmini/v2/keymaps/spacebarracecar/rules.mk @@ -13,7 +13,7 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/mehkee96/program b/keyboards/mehkee96/program deleted file mode 100644 index b777b911066b..000000000000 --- a/keyboards/mehkee96/program +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Luiz Ribeiro , Sebastian Kaim -# -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - - -def checkForKeyboardInNormalMode(): - """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found.""" - return usb.core.find(idVendor=0x20A0, idProduct=0x422D) - -def checkForKeyboardInBootloaderMode(): - """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise.""" - return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None) - -def flashKeyboard(firmware_file): - """Calls bootloadHID to flash the given file to the device.""" - print('Flashing firmware to device ...') - if os.system('bootloadHID -r "%s"' % firmware_file) == 0: - print('\nDone!') - else: - print('\nbootloadHID returned an error.') - -def printDeviceInfo(dev): - """Prints all infos for a given USB device""" - print('Device Information:') - print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) - print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) - print('Manufacturer: %s' % (dev.iManufacturer)) - print('Serial: %s' % (dev.iSerialNumber)) - print('Product: %s' % (dev.iProduct), end='\n\n') - -def sendDeviceToBootloaderMode(dev): - """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing.""" - try: - dev.set_configuration() - - request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - - USBRQ_HID_SET_REPORT = 0x09 - HID_REPORT_OPTION = 0x0301 - - dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5) - except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -kb = checkForKeyboardInNormalMode() - -if kb is not None: - print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='') - sendDeviceToBootloaderMode(kb) - print(' done.') - print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.") - print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode") - -attempts = 12 # 60 seconds -found = False -for attempt in range(1, attempts + 1): - print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='') - - if checkForKeyboardInBootloaderMode(): - print('Found', end='\n\n') - flashKeyboard(sys.argv[1]) - found = True - break - else: - print('Nothing.', end='') - - if attempt != attempts: # no need to wait on the last attempt - print(' Sleeping 5 seconds.', end='') - time.sleep(5) - - # print a newline - print() - -if not found: - print("Couldn't find a flashable keyboard. Aborting.") - sys.exit(2) - diff --git a/keyboards/mehkee96/rules.mk b/keyboards/mehkee96/rules.mk index e6e7d4a58833..f7fb397e2594 100644 --- a/keyboards/mehkee96/rules.mk +++ b/keyboards/mehkee96/rules.mk @@ -32,4 +32,4 @@ CUSTOM_MATRIX = yes SRC = matrix.c i2c.c # programming options -PROGRAM_CMD = ./keyboards/mehkee96/program $(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/meira/config.h b/keyboards/meira/config.h index ff39f90eb727..8cbd82f01d3f 100644 --- a/keyboards/meira/config.h +++ b/keyboards/meira/config.h @@ -32,8 +32,8 @@ along with this program. If not, see . #define MATRIX_ROWS 4 #define MATRIX_COLS 12 -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -#define DIODE_DIRECTION CUSTOM_MATRIX +/* COL2ROW, ROW2COL*/ +//#define DIODE_DIRECTION #ifdef BACKLIGHT_ENABLE #define BACKLIGHT_LEVELS 10 diff --git a/keyboards/meira/keymaps/default/config.h b/keyboards/meira/keymaps/default/config.h index 5f5844a70a18..e3776d2eff17 100644 --- a/keyboards/meira/keymaps/default/config.h +++ b/keyboards/meira/keymaps/default/config.h @@ -14,10 +14,9 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" +// place overrides here // place overrides here #define MUSIC_MASK (keycode != KC_NO) @@ -30,5 +29,3 @@ SONG(DVORAK_SOUND) \ } #endif - -#endif diff --git a/keyboards/meira/keymaps/default/keymap.c b/keyboards/meira/keymaps/default/keymap.c index b25d789192a4..5703999a0431 100644 --- a/keyboards/meira/keymaps/default/keymap.c +++ b/keyboards/meira/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "meira.h" +#include QMK_KEYBOARD_H #include "lighting.h" #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/meishi/config.h b/keyboards/meishi/config.h index 6c712e2ad13c..6aa4e6b6eab8 100644 --- a/keyboards/meishi/config.h +++ b/keyboards/meishi/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B1, B3, B2, B6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/meishi/keymaps/default/keymap.c b/keyboards/meishi/keymaps/default/keymap.c index 88f08ee5656a..528beb168b76 100644 --- a/keyboards/meishi/keymaps/default/keymap.c +++ b/keyboards/meishi/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "meishi.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( /* Base */ diff --git a/keyboards/melody96/keymaps/crilith/keymap.c b/keyboards/melody96/keymaps/crilith/keymap.c index ca65b5ad1b2d..4c5e27668cc7 100644 --- a/keyboards/melody96/keymaps/crilith/keymap.c +++ b/keyboards/melody96/keymaps/crilith/keymap.c @@ -7,7 +7,6 @@ enum custom_keycodes { #include "dynamic_macro.h" -#define _______ KC_TRNS #define KC_REC DYN_REC_START1 #define KC_DONE DYN_REC_STOP #define KC_PLAY DYN_MACRO_PLAY1 @@ -17,16 +16,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, 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_BSLS, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - 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_P7, KC_P8, KC_P9, KC_PMNS, + 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_P7, KC_P8, KC_P9, KC_PPLS, 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_P4, KC_P5, KC_P6, KC_PPLS, 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_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, TT(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), LAYOUT( RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, - BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, KC_TAB, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TAB, _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PLAY, _______, KC_REC, KC_DONE, _______, _______, _______, _______, _______, _______), }; diff --git a/keyboards/melody96/keymaps/konstantin/config.h b/keyboards/melody96/keymaps/konstantin/config.h new file mode 100644 index 000000000000..4b511eb8484f --- /dev/null +++ b/keyboards/melody96/keymaps/konstantin/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define LAYER_FN diff --git a/keyboards/melody96/keymaps/konstantin/keymap.c b/keyboards/melody96/keymaps/konstantin/keymap.c new file mode 100644 index 000000000000..7d65a0e98e70 --- /dev/null +++ b/keyboards/melody96/keymaps/konstantin/keymap.c @@ -0,0 +1,78 @@ +#include QMK_KEYBOARD_H +#include "konstantin.h" + +static const hsv_t *colors[] = { &GODSPEED_BLUE, &GODSPEED_YELLOW }; +static const size_t cnum = sizeof colors / sizeof *colors; +static size_t cidx = 0; + +enum keycodes_keymap { + RGB_SET = RANGE_KEYMAP, +}; + +void eeconfig_init_keymap(void) { + rgblight_sethsv(colors[cidx]->h, colors[cidx]->s, colors[cidx]->v); +} + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_SET: + if (record->event.pressed) { + cidx = (cidx + 1) % cnum; + rgblight_sethsv(colors[cidx]->h, colors[cidx]->s, colors[cidx]->v); + } + return false; + + default: + return true; + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│Hom│End│PgU│PgD│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │Del│NLk│P/ │P* │P- │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │P7 │P8 │P9 │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤P+ │ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │P4 │P5 │P6 │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ + * │LSft│RAG│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│ ↑ │P1 │P2 │P3 │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┼───┼───┤PEn│ + * │LCtl│LGui│LAlt│ Space │RAG│FnL│RCt│ ← │ ↓ │ → │P0 │P. │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ + [L_BASE] = 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_INS, KC_HOME, KC_END, KC_PGUP, KC_PGDN, + 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_BSLS, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, XXXXXXX, + FN_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_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, RAL_RGU, 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_P1, KC_P2, KC_P3, XXXXXXX, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, FN_FNLK, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + + /* Function layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │Sys│SLk│Pau│Brk│Top│Btm│ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │RTg│ ÷ │ × │ − │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┼───┼───┼───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│RH+│RS+│RV+│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┼───┼───┤RSt│ + * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │RH-│RS-│RV-│ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┼───┼───┼───┤ + * │ │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ │PgU│RMR│RMS│RMB│ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┼───┼───┤RMP│ + * │ │DtPR│DtNA│ MW↓ │ │ │App│Hom│PgD│End│RM-│RM+│ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + */ + [L_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SYSR, KC_SLCK, KC_PAUS, KC_BRK, TOP, BOTTOM, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, DIVIDE, TIMES, MINUS, + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SET, + _______, _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_PGUP, RGB_M_R, RGB_M_SN,RGB_M_B, XXXXXXX, + _______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, KC_APP, KC_HOME, KC_PGDN, KC_END, RGB_RMOD,RGB_MOD, RGB_M_P + ), +}; diff --git a/keyboards/melody96/keymaps/konstantin/rules.mk b/keyboards/melody96/keymaps/konstantin/rules.mk new file mode 100644 index 000000000000..47a859d08917 --- /dev/null +++ b/keyboards/melody96/keymaps/konstantin/rules.mk @@ -0,0 +1,10 @@ +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = yes + +BACKLIGHT_ENABLE = no diff --git a/keyboards/melody96/readme.md b/keyboards/melody96/readme.md index 3df1e48b46db..73cc13262b3c 100644 --- a/keyboards/melody96/readme.md +++ b/keyboards/melody96/readme.md @@ -2,11 +2,11 @@ ![melody96](https://i.imgur.com/9o0a6XF.png) -96-key Keyboard from YMDK +96-key Keyboard from YMDK. The PCB for this board is also commonly used in the NYM96. Keyboard Maintainer: [superuser41](https://github.com/kaylanm) Hardware Supported: melody96 -Hardware Availability: [YMDK, group buy closed](https://geekhack.org/index.php?topic=93614.0) +Hardware Availability: [YMDK on Geekhack, group buy closed](https://geekhack.org/index.php?topic=93614.0), [NYM96 on Massdrop](https://www.massdrop.com/buy/nym96-aluminum-mechanical-keyboard?mode=guest_open) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/meme/config.h b/keyboards/meme/config.h index 58b53b674a17..bd3e1cf2c127 100644 --- a/keyboards/meme/config.h +++ b/keyboards/meme/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D3, D2, B5, B6, C7, C6, C5, C4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/meme/keymaps/default/config.h b/keyboards/meme/keymaps/default/config.h index 2c852d181991..a3ed4f762a6e 100644 --- a/keyboards/meme/keymaps/default/config.h +++ b/keyboards/meme/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/miniaxe/config.h b/keyboards/miniaxe/config.h index ae1fd448a6e8..be8ef4bafa7b 100644 --- a/keyboards/miniaxe/config.h +++ b/keyboards/miniaxe/config.h @@ -52,8 +52,8 @@ along with this program. If not, see . } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -//#define DIODE_DIRECTION CUSTOM_MATRIX +/* COL2ROW, ROW2COL*/ +////#define DIODE_DIRECTION // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/miniaxe/keymaps/wanleg/config.h b/keyboards/miniaxe/keymaps/wanleg/config.h new file mode 100644 index 000000000000..0f20ea455f09 --- /dev/null +++ b/keyboards/miniaxe/keymaps/wanleg/config.h @@ -0,0 +1,11 @@ +#pragma once + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +//#define QMK_ESC_OUTPUT F1 // usually COL +//#define QMK_ESC_INPUT D6 // usually ROW // connected to nothing on the miniaxe +//#define QMK_LED D7 //connected to nothing on the miniaxe diff --git a/keyboards/miniaxe/keymaps/wanleg/keymap.c b/keyboards/miniaxe/keymaps/wanleg/keymap.c new file mode 100644 index 000000000000..69233741ba53 --- /dev/null +++ b/keyboards/miniaxe/keymaps/wanleg/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H +#include "wanleg.h" + +#define LAYOUT_miniaxe_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_wrapper( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ + _______, NUMBER, ETCETERA, KC_SPC, DIRECTION, KC_RGUI \ + ) +#define LAYOUT_miniaxe_base_wrapper(...) LAYOUT_miniaxe_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_GK] = LAYOUT_miniaxe_base_wrapper( + _______________Gherkin_Row_0_______________, + _______________Gherkin_Row_1_______________, + SFT_T(KC_Z), KC_X, KC_C, LT(NUM,KC_V), LT(ETC,KC_B), LT(_FN,KC_N), LT(DIR,KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC) +), + +[NUM] = LAYOUT_wrapper( + _______________Gherkin_NUM_0_______________, + _______________Gherkin_NUM_1_______________, + _______________Gherkin_NUM_2_______________, + _______, _______, _______, KC_ENT, KC_RSFT, _______ +), + +[DIR] = LAYOUT_miniaxe_base_wrapper( + _______________Gherkin_DIR_0_______________, + _______________Gherkin_DIR_1_______________, + _______________Gherkin_DIR_2_______________ +), + +[ETC] = LAYOUT_wrapper( + _______________Gherkin_ETC_0_______________, + _______________Gherkin_ETC_1_______________, + _______________Gherkin_ETC_2_______________, + _______, NUMBER, ETCETERA, LALT(LCTL(KC_DEL)), DIRECTION, KC_RGUI +), + +[_FN] = LAYOUT_miniaxe_base_wrapper( + _______________Gherkin_FN_0________________, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +}; \ No newline at end of file diff --git a/keyboards/miniaxe/keymaps/wanleg/rules.mk b/keyboards/miniaxe/keymaps/wanleg/rules.mk new file mode 100644 index 000000000000..ae5ae549cc34 --- /dev/null +++ b/keyboards/miniaxe/keymaps/wanleg/rules.mk @@ -0,0 +1,18 @@ +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +#BOOTLOADER = qmk-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 \ No newline at end of file diff --git a/keyboards/minidox/keymaps/alairock/keymap.c b/keyboards/minidox/keymaps/alairock/keymap.c index 9faf6309688f..c592b1a6a91a 100644 --- a/keyboards/minidox/keymaps/alairock/keymap.c +++ b/keyboards/minidox/keymaps/alairock/keymap.c @@ -21,10 +21,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/minidox/keymaps/default/keymap.c b/keyboards/minidox/keymaps/default/keymap.c index 521db63aab35..6cc78cce1d1c 100644 --- a/keyboards/minidox/keymaps/default/keymap.c +++ b/keyboards/minidox/keymaps/default/keymap.c @@ -18,10 +18,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/minidox/keymaps/dustypomerleau/README.md b/keyboards/minidox/keymaps/dustypomerleau/README.md new file mode 100644 index 000000000000..b2ec771257e3 --- /dev/null +++ b/keyboards/minidox/keymaps/dustypomerleau/README.md @@ -0,0 +1,28 @@ +## dustypomerleau, Minidox layout + +The rationale behind my layout can be summarized as follows: + +- Symmetry is important because use-cases are hard to predict. Whenever possible, modifiers and layer keys should be available from either hand. +- Inward rolls should be leveraged not just for alphas (Colemak DHm), but also for coding/symbols. +- Number order—like alpha order—should be designed to favor use of the strongest fingers. +- One-shot keys can greatly reduce the strain of typing, and should be leveraged. + +Some aspects of my layout are optimized for macOS (order of modifiers, manner of producing en and em dashes, coding of micro-volume adjustments, etc.), but can be easily tweaked for the OS of your choice. + +Shift can be a tricky modifier when used in `MT()` combinations, particularly for fast typists on split boards using serial. This can be partially mitigated with options in `config.h`, but still requires a relatively strict typing style/accuracy from the fast typist. The tendency is for faster typists to combat mod/tap mistakes by using very short intervals for `TAPPING_TERM`, but this can introduce its own set of complications. Shift is also one of the highest-yield opportunities to use `OSM()`. For these reasons, I pulled Shift onto dedicated keys in the thumbs for use during regular typing (the home row Shifts have been left in place for use during selection and keycuts). + +The tapdance code that I used to create mod/tap keys inside my symbol layer allows up to 2 consecutive symbols within `TAPPING_TERM`. If you think you will need to quickly nest more than that, feel free to add more `case`s. + +### Special thanks + +- Everyone on the QMK Discord, for helping me work out the code for mod/tap keys using shifted symbols. +- Everyone on the Colemak Discord, for their initial feedback on the layout. +- @stevep and @DreymaR, for their work on Colemak DH(m), a truly awesome typing experience (and of course Shai Coleman, for starting it all off!). +- @ckofy, for offering a dramatic improvement on Dvorak's original number order. +- u/That-Canadian, for designing this awesome keyboard. + +### Questions or comments? + +- GitHub @dustypomerleau +- Twitter @duspom +- Discord @dusty#8897 diff --git a/keyboards/minidox/keymaps/dustypomerleau/config.h b/keyboards/minidox/keymaps/dustypomerleau/config.h new file mode 100644 index 000000000000..b2169947b7a9 --- /dev/null +++ b/keyboards/minidox/keymaps/dustypomerleau/config.h @@ -0,0 +1,25 @@ +// dustypomerleau, Minidox config + +#pragma once + +#define EE_HANDS +#define IGNORE_MOD_TAP_INTERRUPT +#define ONESHOT_TIMEOUT 1000 +#define TAPPING_TERM 200 +#define USE_SERIAL + +// optional configuration: + +// #define CONVERT_TO_PROTON_C +// #define ONESHOT_TAP_TOGGLE 2 // not compatible with TAPPING_FORCE_HOLD +// #define PERMISSIVE_HOLD +// #define TAPPING_FORCE_HOLD // allows rapid mod use after tap event, but sacrifices double-tap to repeat + +// #define MOUSEKEY_DELAY 0 // delay before cursor movement (high feels sluggish, low makes fine movement difficult) +// #define MOUSEKEY_INTERVAL 20 // time between movement reports - low settings feel like high mouse speed +// #define MOUSEKEY_MAX_SPEED 10 +// #define MOUSEKEY_TIME_TO_MAX 60 +// #define MOUSEKEY_WHEEL_DELAY 0 +// #define MOUSEKEY_WHEEL_MAX_SPEED 8 +// #define MOUSEKEY_WHEEL_TIME_TO_MAX 4 + diff --git a/keyboards/minidox/keymaps/dustypomerleau/keymap.c b/keyboards/minidox/keymaps/dustypomerleau/keymap.c new file mode 100644 index 000000000000..e93a09f64a6d --- /dev/null +++ b/keyboards/minidox/keymaps/dustypomerleau/keymap.c @@ -0,0 +1,434 @@ +// Minidox keymap by dustypomerleau +// Thanks for checking out my keymap. The rationale behind the layout is described in the README. + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum my_layers { + _CMK_DHM, + _QWERTY, + _SYS, + _NAV, + _NUM_E, + _NUM_N, + _SYM +}; + +enum my_keycodes { + CMK_DHM = SAFE_RANGE, + QWERTY, + SYS, + NAV, + NUM_E, + NUM_N, + SYM +}; + +enum td_keycodes { + ALT_LP, + CTL_RCB, + GUI_RP, + SFT_LCB, + SFT_PLS +}; + +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_SINGLE_TAP +} td_state_t; + +static td_state_t td_state; +int cur_dance (qk_tap_dance_state_t *state); +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 ctlrcb_finished (qk_tap_dance_state_t *state, void *user_data); +void ctlrcb_reset (qk_tap_dance_state_t *state, void *user_data); +void guirp_finished (qk_tap_dance_state_t *state, void *user_data); +void guirp_reset (qk_tap_dance_state_t *state, void *user_data); +void sftlcb_finished (qk_tap_dance_state_t *state, void *user_data); +void sftlcb_reset (qk_tap_dance_state_t *state, void *user_data); +void sftpls_finished (qk_tap_dance_state_t *state, void *user_data); +void sftpls_reset (qk_tap_dance_state_t *state, void *user_data); + +#define ALT_2 LALT_T(KC_2) +#define ALT_3 LALT_T(KC_3) +#define ALT_8 LALT_T(KC_8) +#define ALT_D LALT_T(KC_D) +#define ALT_E LALT_T(KC_E) +#define ALT_K LALT_T(KC_K) +#define ALT_LB LALT_T(KC_LBRC) +#define ALT_S LALT_T(KC_S) +#define CTRL_2 LCTL_T(KC_2) +#define CTRL_4 LCTL_T(KC_4) +#define CTRL_5 LCTL_T(KC_5) +#define CTRL_9 LCTL_T(KC_9) +#define CTRL_EQ LCTL_T(KC_EQL) +#define CTRL_I LCTL_T(KC_I) +#define CTRL_L LCTL_T(KC_L) +#define CTRL_R LCTL_T(KC_R) +#define CTRL_S LCTL_T(KC_S) +#define GUI_0 LGUI_T(KC_0) +#define GUI_1 LGUI_T(KC_1) +#define GUI_4 LGUI_T(KC_4) +#define GUI_7 LGUI_T(KC_7) +#define GUI_RB LGUI_T(KC_RBRC) +#define GUI_F LGUI_T(KC_F) +#define GUI_J LGUI_T(KC_J) +#define GUI_N LGUI_T(KC_N) +#define GUI_TEA LGUI_T(KC_T) +#define MAC_EM S(LALT(KC_MINS)) +#define MAC_EN LALT(KC_MINS) +#define NAV_BK LT(_NAV, KC_BSPC) +#define NAV_LK TG(_NAV) +#define NUME_SPC LT(_NUM_E, KC_SPC) +#define NUMLK_E TG(_NUM_E) +#define NUMLK_N TG(_NUM_N) +#define NUMN_SPC LT(_NUM_N, KC_SPC) +#define SFT_0 LSFT_T(KC_0) +#define SFT_1 LSFT_T(KC_1) +#define SFT_6 LSFT_T(KC_6) +#define SFT_7 LSFT_T(KC_7) +#define SFT_A LSFT_T(KC_A) +#define SFT_O LSFT_T(KC_O) +#define SFT_OS OSM(MOD_LSFT) +#define SFT_QOT LSFT_T(KC_QUOT) +#define SYM_OS OSL(_SYM) +#define SYS_Z LT(_SYS, KC_Z) +#define VOL_DN S(LALT(KC__VOLDOWN)) +#define VOL_UP S(LALT(KC__VOLUP)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak DHm + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | F | P | B | | J | L | U | Y | ' | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/A| CTL/R| ALT/S| GUI/T| G | | M | GUI/N| ALT/E| CTL/I| SFT/O| + * |------+------+------+------+------| |------+------+------+------+------| + * | SYS/Z| X | C | D | V | | K | H | , | . | ; | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * |SFT/OS|NAV/BK| | | |NUM/SP|SFT/OS| + * `------+------|SYM/OS| |SYM/OS|------+------' + * | | | | + * `------' `------' + */ +[_CMK_DHM] = LAYOUT( \ + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, \ + SFT_A, CTRL_R, ALT_S, GUI_TEA, KC_G, KC_M, GUI_N, ALT_E, CTRL_I, SFT_O, \ + SYS_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SCLN, \ + SFT_OS, NAV_BK, SYM_OS, SYM_OS, NUME_SPC, SFT_OS \ +), + +/* QWERTY + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/A| CTL/S| ALT/D| GUI/F| G | | H | GUI/J| ALT/K| CTL/L| SFT/'| + * |------+------+------+------+------| |------+------+------+------+------| + * | SYS/Z| X | C | V | B | | N | M | , | . | ; | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * |SFT/OS|NAV/BK| | | |NUM/SP|SFT/OS| + * `------+------|SYM/OS| |SYM/OS|------+------' + * | | | | + * `------' `------' + */ +[_QWERTY] = LAYOUT( \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + SFT_A, CTRL_S, ALT_D, GUI_F, KC_G, KC_H, GUI_J, ALT_K, CTRL_L, SFT_QOT, \ + SYS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, \ + SFT_OS, NAV_BK, SYM_OS, SYM_OS, NUMN_SPC, SFT_OS \ +), + +/* System, media, and layer lock keys + * If you use QWERTY + the Vanilla numbers primarily, change NUMLK_E to NUMLK_N here. + * + * ,----------------------------------. ,----------------------------------. + * | RESET|DEBUG |QWERTY|CMKDHM| | | | VOL--| VOL++|BRITE-|BRITE+| + * |------+------+------+------+------| |------+------+------+------+------| + * | SHIFT| CTRL | ALT | GUI |NAV LK| | POWER| VOL- | VOL+ | MUTE | MPLY | + * |------+------+------+------+------| |------+------+------+------+------| + * | | |AU OFF| AU ON| | | |NUM LK| MRWD | MFFD | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | | | | | | | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_SYS] = LAYOUT( \ + RESET, DEBUG, QWERTY, CMK_DHM, _______, _______, KC_VOLD, KC_VOLU, KC_BRID, KC_BRIU, \ + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, NAV_LK, KC_POWER, VOL_DN, VOL_UP, KC__MUTE, KC_MPLY, \ + _______, _______, AU_OFF, AU_ON, _______, _______, NUMLK_E, KC_MRWD, KC_MFFD, _______, \ + _______, _______, _______, _______, _______, _______ \ +), + +/* Navigation + mouse keys + * + * ,----------------------------------. ,----------------------------------. + * | PSCR | | WH U | WH D | | | BSPC | PGDN | PGUP | HOME | END | + * |------+------+------+------+------| |------+------+------+------+------| + * | SHIFT| CTRL | ALT | GUI |NAV LK| | CAPS | LEFT | DOWN | UP | RIGHT| + * |------+------+------+------+------| |------+------+------+------+------| + * | | ACL0 | ACL1 | ACL2 | BTN2 | | BTN1 | MS L | MS D | MS U | MS R | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | | | | | | ENTER| | + * `------+------| ESC | | DEL |------+------' + * | | | | + * `------' `------' + */ +[_NAV] = LAYOUT( \ + KC_PSCR, _______, KC_WH_U, KC_WH_D, _______, KC_BSPC, KC_PGDN, KC_PGUP, KC_HOME, KC_END, \ + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, NAV_LK, KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, \ + _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_BTN2, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, \ + _______, _______, KC_ESC, KC_DEL, KC_ENT, _______ \ +), + +/* Number + function keys (ergonomic number order - default pairing with Colemak) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/7| CTL/5| ALT/3| GUI/1| 9 | | 8 | GUI/0| ALT/2| CTL/4| SFT/6| + * |------+------+------+------+------| |------+------+------+------+------| + * | F11 | F12 | - | SPACE| BSPC | | DEL |NUM LK| | | / | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | | TAB | | | | | | + * `------+------| ESC | | |------+------' + * | | | | + * `------' `------' + */ +[_NUM_E] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + SFT_7, CTRL_5, ALT_3, GUI_1, KC_9, KC_8, GUI_0, ALT_2, CTRL_4, SFT_6, \ + KC_F11, KC_F12, KC_MINS, KC_SPC, KC_BSPC, KC_DEL, NUMLK_E, _______, _______, KC_SLSH, \ + _______, KC_TAB, KC_ESC, _______, _______, _______ \ +), + +/* Number + function keys (numeric number order - default pairing with QWERTY) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/1| CTL/2| ALT/3| GUI/4| 5 | | 6 | GUI/7| ALT/8| CTL/9| SFT/0| + * |------+------+------+------+------| |------+------+------+------+------| + * | F11 | F12 | - | SPACE| BSPC | | DEL |NUM LK| | | / | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | | TAB | | | | | | + * `------+------| ESC | | |------+------' + * | | | | + * `------' `------' + */ +[_NUM_N] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + SFT_1, CTRL_2, ALT_3, GUI_4, KC_5, KC_6, GUI_7, ALT_8, CTRL_9, SFT_0, \ + KC_F11, KC_F12, KC_MINS, KC_SPC, KC_BSPC, KC_DEL, NUMLK_N, _______, _______, KC_SLSH, \ + _______, KC_TAB, KC_ESC, _______, _______, _______ \ +), + + +/* Symbols + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ? | ' | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/+| CTL/=| ALT/(| GUI/)| " | | : | GUI/]| ALT/[| CTL/}| SFT/{| + * |------+------+------+------+------| |------+------+------+------+------| + * | < | | | - | > | \ | | ` | _ | / | ~ | ; | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | |ENDASH| | | |EMDASH| | + * `------+------| | | |------+------' + * | | | | + * `------' `------' + */ +[_SYM] = LAYOUT( \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_QUOT, \ + TD(SFT_PLS), CTRL_EQ, TD(ALT_LP), TD(GUI_RP), KC_DQT, KC_COLN, GUI_RB, ALT_LB, TD(CTL_RCB), TD(SFT_LCB), \ + KC_LT, KC_PIPE, KC_MINS, KC_GT, KC_BSLS, KC_GRV, KC_UNDS, KC_SLSH, KC_TILD, KC_SCLN, \ + _______, MAC_EN, _______, _______, MAC_EM, _______ \ +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CMK_DHM: + if (record->event.pressed) { + set_single_persistent_default_layer(_CMK_DHM); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + default: + return true; + } +}; + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + if (state->count == 2) return DOUBLE_SINGLE_TAP; + else return 3; +} + +void altlp_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + register_code16(KC_LPRN); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LALT)); + break; + case DOUBLE_SINGLE_TAP: + tap_code16(KC_LPRN); + register_code16(KC_LPRN); + } +} + +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)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code16(KC_LPRN); + } +} + +void ctlrcb_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + register_code16(KC_RCBR); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LCTL)); + break; + case DOUBLE_SINGLE_TAP: + tap_code16(KC_RCBR); + register_code16(KC_RCBR); + } +} + +void ctlrcb_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + unregister_code16(KC_RCBR); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LCTL)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code16(KC_RCBR); + } +} + +void guirp_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + register_code16(KC_RPRN); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LGUI)); + break; + case DOUBLE_SINGLE_TAP: + tap_code16(KC_RPRN); + register_code16(KC_RPRN); + } +} + +void guirp_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + unregister_code16(KC_RPRN); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LGUI)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code16(KC_RPRN); + } +} + +void sftlcb_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + register_code16(KC_LCBR); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_SINGLE_TAP: + tap_code16(KC_LCBR); + register_code16(KC_LCBR); + } +} + +void sftlcb_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + unregister_code16(KC_LCBR); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code16(KC_LCBR); + } +} + +void sftpls_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + register_code16(KC_PLUS); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_SINGLE_TAP: + tap_code16(KC_PLUS); + register_code16(KC_PLUS); + } +} + +void sftpls_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + unregister_code16(KC_PLUS); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code16(KC_PLUS); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset), + [CTL_RCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctlrcb_finished, ctlrcb_reset), + [GUI_RP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, guirp_finished, guirp_reset), + [SFT_LCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftlcb_finished, sftlcb_reset), + [SFT_PLS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftpls_finished, sftpls_reset) +}; diff --git a/keyboards/minidox/keymaps/dustypomerleau/rules.mk b/keyboards/minidox/keymaps/dustypomerleau/rules.mk new file mode 100644 index 000000000000..2a74d95536b3 --- /dev/null +++ b/keyboards/minidox/keymaps/dustypomerleau/rules.mk @@ -0,0 +1,5 @@ +# dustypomerleau, Minidox rules + +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/keyboards/minidox/keymaps/haegin/keymap.c b/keyboards/minidox/keymaps/haegin/keymap.c index 221427b28af3..d95243f10bb3 100644 --- a/keyboards/minidox/keymaps/haegin/keymap.c +++ b/keyboards/minidox/keymaps/haegin/keymap.c @@ -10,10 +10,6 @@ extern keymap_config_t keymap_config; #define SYMBOLS 1 #define MEDIA 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/minidox/keymaps/khitsule/keymap.c b/keyboards/minidox/keymaps/khitsule/keymap.c index 750510579cf9..1c6b6749f300 100644 --- a/keyboards/minidox/keymaps/khitsule/keymap.c +++ b/keyboards/minidox/keymaps/khitsule/keymap.c @@ -18,10 +18,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/minidox/keymaps/norman/config.h b/keyboards/minidox/keymaps/norman/config.h new file mode 100644 index 000000000000..0d3542a03e3b --- /dev/null +++ b/keyboards/minidox/keymaps/norman/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define PERMISSIVE_HOLD +#define QMK_KEYS_PER_SCAN 4 +#define TAPPING_TERM 160 diff --git a/keyboards/minidox/keymaps/norman/keymap.c b/keyboards/minidox/keymaps/norman/keymap.c new file mode 100644 index 000000000000..2786b7dd930c --- /dev/null +++ b/keyboards/minidox/keymaps/norman/keymap.c @@ -0,0 +1,69 @@ +#include QMK_KEYBOARD_H + +#include + + +extern keymap_config_t keymap_config; + +// 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 layers { + _NORMAN, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST +}; + +// Defines for task manager and such +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) +#define DSK_LFT LGUI(LCTL(KC_LEFT)) +#define DSK_RT LGUI(LCTL(KC_RIGHT)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +[_NORMAN] = LAYOUT( \ + NM_Q, NM_W, NM_D, NM_F, NM_K, NM_J, NM_U, NM_R, NM_L, NM_SCLN, \ + NM_A, NM_S, NM_E, NM_T, NM_G, NM_Y, NM_N, NM_I, NM_O, NM_H, \ + NM_Z, NM_X, NM_C, NM_V, NM_B, NM_P, NM_M, NM_COMM, NM_DOT, NM_SLSH, \ + LGUI_T(KC_ENT), LT(_RAISE, KC_ESC), SFT_T(KC_BSPC), CTL_T(KC_SPC), LT(_LOWER, KC_TAB), ALT_T(KC_ENT) \ +), + +[_RAISE] = LAYOUT( \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PLUS, KC_7, KC_8, KC_9, KC_0, \ + KC_CIRC, KC_AMPR, KC_TILD, KC_PIPE, KC_BSLS, KC_MINUS, KC_4, KC_5, KC_6, KC_EQL, \ + KC_DQT, KC_QUOT, KC_UNDS, KC_GRV, _______, KC_ASTR, KC_1, KC_2, KC_3, _______, \ + _______, _______, _______, _______, MO(_ADJUST), _______ \ +), + + +[_LOWER] = LAYOUT( \ + KC_ESC, KC_HOME, KC_UP, KC_END, _______, _______, KC_LPRN, KC_RPRN, _______, _______, + KC_VOLU, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGUP, _______, KC_LBRC, KC_RBRC, _______, _______, \ + KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGDN, _______, KC_LCBR, KC_RCBR, _______, _______, \ + _______, MO(_ADJUST), _______, _______, _______, _______ \ +), + +[_ADJUST] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + _______, DSK_LFT, _______, DSK_RT, _______, TSKMGR, CALTDEL, _______, KC_F11, KC_F12, \ + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______ \ +) + +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} diff --git a/keyboards/minidox/keymaps/norman/readme.md b/keyboards/minidox/keymaps/norman/readme.md new file mode 100644 index 000000000000..018e4363227c --- /dev/null +++ b/keyboards/minidox/keymaps/norman/readme.md @@ -0,0 +1,56 @@ +# Minidox Norman Layout by LeHoff +Based on the QWERTY layout created by Khitsule. +![lehoff](https://i.imgur.com/rKTdymp.png) + +[KLE link](http://www.keyboard-layout-editor.com/#/gists/86ec49f9f820a8b9b36f6e0d2ef8fff7) + +## Layers +| Layer | Legend | +| ----- | ------ | +| Base | Top left (black) | +| Lower | Bottom right (red) | +| Raise | Top right (orange) | +| Adjust | Front print | + +## Features +* Raise/lower layers focus first on one-handed use +* Numpad on right hand with raise layer +* Navigation on left hand with lower layer (ESDF) + * D refers to desktop left/right on Win 10 (win+ctrl+left/right) +* Heavy use of hold/tap dual function keys - from left to right: + * Cmd/Enter + * Raise/Esc + * Shift/Backspace + * Ctrl/Space + * Lower/Tab + * Alt/Enter + + +## Modifier Placement Rationale + +There are several major driving forces at play: + +* I use MacOS. +* I'm Danish so the Alt and Shift-Alt layers in MacOS simply have to work. +* I use Vim for coding. +* I use org-mode in Emacs to keep track of my time. + +* Space is on the right hand side because I almost exclusively use my right hand thumb for + space. +* Cmd is on the left since I often use Cmd+click to open a link in a new tab in Safari. +* Due to my usage of Vim Esc got a spot on the modifier row. +* Tab is on the right to enable easy navigation between winows with Cmd+Tab. +* Shift is on the left since org-mode uses Ctrl+arrows to manipulate task state quickly, + and since the arrow keys are activated using Lower (which has been moved to the right) and S, E, T, + and D, it works well that way. +* Ctrl is on the right since Ctrl+<0-9> is used in MacOS to switch between spaces. +* Enter is on both sides since Enter is often used together with all of the modifiers. E.g., + Cmd+Enter to send mails in most situations, but Ctrl+Enter is used in Emacs to create a + new task in org-mode. + +This means that arrows and digits are being modified from the other hand, which could be +bad for gaming, so if you're into that you might want to re-think a few things, but in +that case you are probably using a Windows machine and then there are other constraints +you have to deal with. + + diff --git a/keyboards/minidox/keymaps/that_canadian/keymap.c b/keyboards/minidox/keymaps/that_canadian/keymap.c index 9d81283b675f..78ddca30e80d 100644 --- a/keyboards/minidox/keymaps/that_canadian/keymap.c +++ b/keyboards/minidox/keymaps/that_canadian/keymap.c @@ -18,10 +18,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/minidox/keymaps/xyverz/keymap.c b/keyboards/minidox/keymaps/xyverz/keymap.c index 3e62815655c8..4863f4f922bd 100644 --- a/keyboards/minidox/keymaps/xyverz/keymap.c +++ b/keyboards/minidox/keymaps/xyverz/keymap.c @@ -39,10 +39,6 @@ enum planck_keycodes { #define ALTCOMM ALT_T(KC_COMM) //#define GUIBSPC GUI_T(KC_BSPC) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Dvorak diff --git a/keyboards/mint60/config.h b/keyboards/mint60/config.h index c3d5d5663e2b..35449eb26190 100644 --- a/keyboards/mint60/config.h +++ b/keyboards/mint60/config.h @@ -31,6 +31,8 @@ along with this program. If not, see . #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 +#define USE_SERIAL + /* key matrix size */ #define MATRIX_ROWS 10 #define MATRIX_COLS 8 @@ -49,7 +51,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D4, B3, B1, F7, B2, B6, F6, F5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/mint60/keymaps/default/config.h b/keyboards/mint60/keymaps/default/config.h index 0195c61dffb6..9af2f45cfb46 100644 --- a/keyboards/mint60/keymaps/default/config.h +++ b/keyboards/mint60/keymaps/default/config.h @@ -17,7 +17,7 @@ #pragma once /* Use I2C or Serial, not both */ -#define USE_SERIAL +// #define USE_SERIAL // #define USE_I2C // #define MASTER_RIGHT diff --git a/keyboards/mint60/keymaps/default/keymap.c b/keyboards/mint60/keymaps/default/keymap.c index e07d199ea984..4a90bd57c777 100644 --- a/keyboards/mint60/keymaps/default/keymap.c +++ b/keyboards/mint60/keymaps/default/keymap.c @@ -26,10 +26,6 @@ extern keymap_config_t keymap_config; extern rgblight_config_t rgblight_config; #endif -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum custom_keycodes { RGBRST = SAFE_RANGE }; diff --git a/keyboards/mint60/keymaps/eucalyn/config.h b/keyboards/mint60/keymaps/eucalyn/config.h index 0195c61dffb6..9af2f45cfb46 100644 --- a/keyboards/mint60/keymaps/eucalyn/config.h +++ b/keyboards/mint60/keymaps/eucalyn/config.h @@ -17,7 +17,7 @@ #pragma once /* Use I2C or Serial, not both */ -#define USE_SERIAL +// #define USE_SERIAL // #define USE_I2C // #define MASTER_RIGHT diff --git a/keyboards/mint60/keymaps/eucalyn/keymap.c b/keyboards/mint60/keymaps/eucalyn/keymap.c index c26dd38d31c1..93979a131247 100644 --- a/keyboards/mint60/keymaps/eucalyn/keymap.c +++ b/keyboards/mint60/keymaps/eucalyn/keymap.c @@ -26,10 +26,6 @@ extern keymap_config_t keymap_config; extern rgblight_config_t rgblight_config; #endif -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum custom_keycodes { RGBRST = SAFE_RANGE }; diff --git a/keyboards/mitosis/keymaps/carvac_dv/keymap.c b/keyboards/mitosis/keymaps/carvac_dv/keymap.c index d97cb600eeae..c67f2e387cbf 100644 --- a/keyboards/mitosis/keymaps/carvac_dv/keymap.c +++ b/keyboards/mitosis/keymaps/carvac_dv/keymap.c @@ -21,10 +21,6 @@ enum mitosis_layers #define MOUSEKEY_WHEEL_MAX_SPEED 8 #define MOUSEKEY_WHEEL_TIME_TO_MAX 40 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY diff --git a/keyboards/mitosis/keymaps/datagrok/keymap.c b/keyboards/mitosis/keymaps/datagrok/keymap.c index d8c20bc4391d..220c140af077 100644 --- a/keyboards/mitosis/keymaps/datagrok/keymap.c +++ b/keyboards/mitosis/keymaps/datagrok/keymap.c @@ -30,9 +30,6 @@ enum mitosis_keycodes #define LAYOUT LAYOUT_bottomspace #endif -// Fillers to make layering more clear -#define _______ KC_TRNS // Transparent - // I don't use Japanese myself, but I've placed henkan 変換 and muhenkan 無変換 // in my layout to act as left and right HYPER diff --git a/keyboards/mitosis/keymaps/default/keymap.c b/keyboards/mitosis/keymaps/default/keymap.c index 60ebdac60a23..ec440ed75900 100644 --- a/keyboards/mitosis/keymaps/default/keymap.c +++ b/keyboards/mitosis/keymaps/default/keymap.c @@ -33,10 +33,6 @@ enum mitosis_macros #define LONGPRESS_DELAY 150 #define LAYER_TOGGLE_DELAY 300 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MALT] = LAYOUT( /* Malt Layout, customised for reduced columns (ex: quote and shift locations) */ diff --git a/keyboards/mitosis/keymaps/mjt/keymap.c b/keyboards/mitosis/keymaps/mjt/keymap.c index 379738951a7b..f00bf59556bd 100644 --- a/keyboards/mitosis/keymaps/mjt/keymap.c +++ b/keyboards/mitosis/keymaps/mjt/keymap.c @@ -47,9 +47,7 @@ enum mitosis_macros #define LAYER_TOGGLE_DELAY 900 // Fillers to make layering more clear -#define _______ KC_TRNS #define __MOD__ KC_TRNS -#define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( /* QWERTY adapted to this crazy thing */ diff --git a/keyboards/mitosis/keymaps/nzen/keymap.c b/keyboards/mitosis/keymaps/nzen/keymap.c index 7a276cade44c..d9fd3641bc6f 100644 --- a/keyboards/mitosis/keymaps/nzen/keymap.c +++ b/keyboards/mitosis/keymaps/nzen/keymap.c @@ -25,7 +25,6 @@ enum mitosis_layers #define MOUSEKEY_WHEEL_TIME_TO_MAX 40 // Fillers to make layering more clear -#define _______ KC_TRNS #define XXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/miuni32/keymaps/adam-lee/keymap.c b/keyboards/miuni32/keymaps/adam-lee/keymap.c index e128b24b1d62..754c20f7d33a 100644 --- a/keyboards/miuni32/keymaps/adam-lee/keymap.c +++ b/keyboards/miuni32/keymaps/adam-lee/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Level 0: Default Layer * ,---------------------------------------------------------------------------------------. diff --git a/keyboards/miuni32/keymaps/default/config.h b/keyboards/miuni32/keymaps/default/config.h index df06a2620627..271f48d0011b 100644 --- a/keyboards/miuni32/keymaps/default/config.h +++ b/keyboards/miuni32/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif \ No newline at end of file diff --git a/keyboards/miuni32/keymaps/default/keymap.c b/keyboards/miuni32/keymaps/default/keymap.c index e128b24b1d62..754c20f7d33a 100644 --- a/keyboards/miuni32/keymaps/default/keymap.c +++ b/keyboards/miuni32/keymaps/default/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Level 0: Default Layer * ,---------------------------------------------------------------------------------------. diff --git a/keyboards/miuni32/keymaps/ht_156/keymap.c b/keyboards/miuni32/keymaps/ht_156/keymap.c index d68edad85974..54e4bcf52d6d 100644 --- a/keyboards/miuni32/keymaps/ht_156/keymap.c +++ b/keyboards/miuni32/keymaps/ht_156/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Keyboard layer definitions #define BASE 0 #define NUMBERS 1 diff --git a/keyboards/miuni32/keymaps/ki/keymap.c b/keyboards/miuni32/keymaps/ki/keymap.c index 77140d6a9a0f..59d2e285cbc0 100644 --- a/keyboards/miuni32/keymaps/ki/keymap.c +++ b/keyboards/miuni32/keymaps/ki/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum miuni32_layers { _BEAKL, _LOWER, diff --git a/keyboards/model01/leds.c b/keyboards/model01/leds.c index 7a62c7424c66..b21c1a5c8a29 100644 --- a/keyboards/model01/leds.c +++ b/keyboards/model01/leds.c @@ -46,72 +46,35 @@ void set_led_to(int led, uint8_t r, uint8_t g, uint8_t b) { #ifdef RGB_MATRIX_ENABLE __attribute__ ((weak)) -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - {{0x73}, { 3, 35}, 0}, - {{0x72}, { 0, 26}, 0}, - {{0x71}, { 0, 17}, 0}, - {{0x70}, { 0, 6}, 0}, - {{0x60}, { 14, 5}, 0}, - {{0x61}, { 15, 16}, 0}, - {{0x62}, { 16, 25}, 0}, - {{0x63}, { 17, 34}, 0}, - {{0x53}, { 31, 29}, 0}, - {{0x52}, { 31, 19}, 0}, - {{0x51}, { 30, 11}, 0}, - {{0x50}, { 30, 1}, 0}, - {{0x40}, { 45, 0}, 0}, - {{0x41}, { 45, 8}, 0}, - {{0x42}, { 46, 17}, 0}, - {{0x43}, { 46, 27}, 0}, - {{0x33}, { 60, 27}, 0}, - {{0x32}, { 60, 18}, 0}, - {{0x31}, { 60, 9}, 0}, - {{0x30}, { 60, 0}, 0}, - {{0x20}, { 74, 2}, 0}, - {{0x21}, { 74, 11}, 0}, - {{0x22}, { 75, 20}, 0}, - {{0x23}, { 74, 28}, 0}, - {{0x12}, { 89, 30}, 0}, - {{0x11}, { 89, 19}, 0}, - {{0x10}, { 89, 7}, 0}, - {{0x00}, { 70, 38}, 1}, - {{0x01}, { 82, 41}, 1}, - {{0x02}, { 93, 45}, 1}, - {{0x03}, {104, 50}, 1}, - {{0x13}, { 74, 64}, 1}, - {{0x67}, {149, 64}, 1}, - {{0x77}, {119, 50}, 1}, - {{0x76}, {130, 45}, 1}, - {{0x75}, {141, 41}, 1}, - {{0x74}, {153, 38}, 1}, - {{0x64}, {134, 7}, 0}, - {{0x65}, {134, 19}, 0}, - {{0x66}, {134, 30}, 0}, - {{0x57}, {149, 28}, 0}, - {{0x56}, {148, 20}, 0}, - {{0x55}, {149, 11}, 0}, - {{0x54}, {149, 2}, 0}, - {{0x44}, {163, 0}, 0}, - {{0x45}, {163, 9}, 0}, - {{0x46}, {163, 18}, 0}, - {{0x47}, {163, 27}, 0}, - {{0x37}, {177, 27}, 0}, - {{0x36}, {177, 17}, 0}, - {{0x35}, {178, 8}, 0}, - {{0x34}, {178, 0}, 0}, - {{0x24}, {193, 1}, 0}, - {{0x25}, {193, 11}, 0}, - {{0x26}, {192, 19}, 0}, - {{0x27}, {192, 29}, 0}, - {{0x17}, {206, 34}, 0}, - {{0x16}, {207, 25}, 0}, - {{0x15}, {208, 16}, 0}, - {{0x14}, {209, 5}, 0}, - {{0x04}, {224, 6}, 0}, - {{0x05}, {223, 17}, 0}, - {{0x06}, {223, 26}, 0}, - {{0x07}, {220, 35}, 0}, -}; +led_config_t g_led_config = { { + { 27, 26, 20, 19, 12, 11, 4, 3 }, + { 28, 25, 21, 18, 13, 10, 5, 2 }, + { 29, 24, 22, 17, 14, 9, 6, 1 }, + { 30, 31, 23, 16, 15, 8, 7, 0 }, + { 60, 59, 52, 51, 44, 43, 37, 36 }, + { 61, 58, 53, 50, 45, 42, 38, 35 }, + { 62, 57, 54, 49, 46, 41, 39, 34 }, + { 63, 56, 55, 48, 47, 40, 32, 33 } +}, { + { 3, 35 }, { 0, 26 }, { 0, 17 }, { 0, 6 }, { 14, 5 }, { 15, 16 }, { 16, 25 }, { 17, 34 }, + { 31, 29 }, { 31, 19 }, { 30, 11 }, { 30, 1 }, { 45, 0 }, { 45, 8 }, { 46, 17 }, { 46, 27 }, + { 60, 27 }, { 60, 18 }, { 60, 9 }, { 60, 0 }, { 74, 2 }, { 74, 11 }, { 75, 20 }, { 74, 28 }, + { 89, 30 }, { 89, 19 }, { 89, 7 }, { 70, 38 }, { 82, 41 }, { 93, 45 }, { 104, 50 }, { 74, 64 }, + { 149, 64 }, { 119, 50 }, { 130, 45 }, { 141, 41 }, { 153, 38 }, { 134, 7 }, { 134, 19 }, { 134, 30 }, + { 149, 28 }, { 148, 20 }, { 149, 11 }, { 149, 2 }, { 163, 0 }, { 163, 9 }, { 163, 18 }, { 163, 27 }, + { 177, 27 }, { 177, 17 }, { 178, 8 }, { 178, 0 }, { 193, 1 }, { 193, 11 }, { 192, 19 }, { 192, 29 }, + { 206, 34 }, { 207, 25 }, { 208, 16 }, { 209, 5 }, { 224, 6 }, { 223, 17 }, { 223, 26 }, { 220, 35 } +}, { + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4 +} }; + static struct { uint8_t b; diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h index f0b3b9caa33e..e268c3c1a611 100644 --- a/keyboards/mt40/config.h +++ b/keyboards/mt40/config.h @@ -59,7 +59,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C2, C3, C4, C5, C6, C7, D7 } /* #define UNUSED_PINS */ -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ /* #define DIODE_DIRECTION COL2ROW */ #define BACKLIGHT_PIN D2 diff --git a/keyboards/mt40/keymaps/default/config.h b/keyboards/mt40/keymaps/default/config.h index 9f9a9fc10798..6c3e30ef7b5c 100644 --- a/keyboards/mt40/keymaps/default/config.h +++ b/keyboards/mt40/keymaps/default/config.h @@ -1,5 +1,6 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once + +// place overrides here #define TAPPING_TERM 200 @@ -7,5 +8,3 @@ #define RGBLIGHT_HUE_STEP 12 #define RGBLIGHT_SAT_STEP 15 #define RGBLIGHT_VAL_STEP 18 - -#endif diff --git a/keyboards/mt40/keymaps/default/keymap.c b/keyboards/mt40/keymaps/default/keymap.c index 645f58e8a63f..29a2b414b1bf 100644 --- a/keyboards/mt40/keymaps/default/keymap.c +++ b/keyboards/mt40/keymaps/default/keymap.c @@ -15,8 +15,6 @@ */ #include QMK_KEYBOARD_H - -#define _______ KC_TRNS #define OOOOOOO KC_TRNS #define C_LCTL MT(MOD_LCTL, KC_QUOT) diff --git a/keyboards/mt980/config.h b/keyboards/mt980/config.h new file mode 100644 index 000000000000..88c25a587032 --- /dev/null +++ b/keyboards/mt980/config.h @@ -0,0 +1,52 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wheat Field Peripherals +#define PRODUCT MT980 +#define DESCRIPTION Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 24 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 185 +#endif + +/* Place bootmagic key on Esc */ +#define BOOTMAGIC_LITE_ROW 5 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/mt980/info.json b/keyboards/mt980/info.json new file mode 100644 index 000000000000..f71d0228564c --- /dev/null +++ b/keyboards/mt980/info.json @@ -0,0 +1,117 @@ +{ + "keyboard_name": "mt980", + "url": "https://shop110310565.taobao.com", + "maintainer": "walkerstop", + "width": 19.5, + "height": 6.75, + "layouts": { + "LAYOUT": { + "key_count": 103, + "layout": [ + {"label":"K50", "x":0, "y":0}, + {"label":"K52", "x":1.25, "y":0}, + {"label":"K53", "x":2.25, "y":0}, + {"label":"K54", "x":3.25, "y":0}, + {"label":"K55", "x":4.25, "y":0}, + {"label":"K57", "x":5.5, "y":0}, + {"label":"K58", "x":6.5, "y":0}, + {"label":"KB8", "x":7.5, "y":0}, + {"label":"KB7", "x":8.5, "y":0}, + {"label":"KB5", "x":9.75, "y":0}, + {"label":"KB4", "x":10.75, "y":0}, + {"label":"KB3", "x":11.75, "y":0}, + {"label":"KB6", "x":12.75, "y":0}, + {"label":"K51", "x":14, "y":0}, + {"label":"KB2", "x":15.5, "y":0}, + {"label":"KB1", "x":16.5, "y":0}, + {"label":"KB0", "x":17.5, "y":0}, + {"label":"K63", "x":18.5, "y":0}, + {"label":"K40", "x":0, "y":1.5}, + {"label":"K41", "x":1, "y":1.5}, + {"label":"K42", "x":2, "y":1.5}, + {"label":"K43", "x":3, "y":1.5}, + {"label":"K44", "x":4, "y":1.5}, + {"label":"K45", "x":5, "y":1.5}, + {"label":"K46", "x":6, "y":1.5}, + {"label":"K47", "x":7, "y":1.5}, + {"label":"K48", "x":8, "y":1.5}, + {"label":"KA8", "x":9, "y":1.5}, + {"label":"KA7", "x":10, "y":1.5}, + {"label":"KA5", "x":11, "y":1.5}, + {"label":"KA4", "x":12, "y":1.5}, + {"label":"KA3", "x":13, "y":1.5}, + {"label":"KA6", "x":14, "y":1.5}, + {"label":"KA2", "x":15.5, "y":1.5}, + {"label":"KA1", "x":16.5, "y":1.5}, + {"label":"KA0", "x":17.5, "y":1.5}, + {"label":"K64", "x":18.5, "y":1.5}, + {"label":"K30", "x":0, "y":2.5, "w":1.5}, + {"label":"K31", "x":1.5, "y":2.5}, + {"label":"K32", "x":2.5, "y":2.5}, + {"label":"K33", "x":3.5, "y":2.5}, + {"label":"K34", "x":4.5, "y":2.5}, + {"label":"K35", "x":5.5, "y":2.5}, + {"label":"K36", "x":6.5, "y":2.5}, + {"label":"K37", "x":7.5, "y":2.5}, + {"label":"K38", "x":8.5, "y":2.5}, + {"label":"K98", "x":9.5, "y":2.5}, + {"label":"K97", "x":10.5, "y":2.5}, + {"label":"K95", "x":11.5, "y":2.5}, + {"label":"K94", "x":12.5, "y":2.5}, + {"label":"K84", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K96", "x":15.5, "y":2.5}, + {"label":"K92", "x":16.5, "y":2.5}, + {"label":"K91", "x":17.5, "y":2.5}, + {"label":"K90", "x":18.5, "y":2.5}, + {"label":"K20", "x":0, "y":3.5, "w":1.75}, + {"label":"K21", "x":1.75, "y":3.5}, + {"label":"K22", "x":2.75, "y":3.5}, + {"label":"K23", "x":3.75, "y":3.5}, + {"label":"K24", "x":4.75, "y":3.5}, + {"label":"K25", "x":5.75, "y":3.5}, + {"label":"K26", "x":6.75, "y":3.5}, + {"label":"K27", "x":7.75, "y":3.5}, + {"label":"K28", "x":8.75, "y":3.5}, + {"label":"K88", "x":9.75, "y":3.5}, + {"label":"K87", "x":10.75, "y":3.5}, + {"label":"K85", "x":11.75, "y":3.5}, + {"label":"K93", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K86", "x":15.5, "y":3.5}, + {"label":"K82", "x":16.5, "y":3.5}, + {"label":"K81", "x":17.5, "y":3.5}, + {"label":"K80", "x":18.5, "y":3.5}, + {"label":"K10", "x":0, "y":4.5, "w":1.25}, + {"label":"K11", "x":1.25, "y":4.5}, + {"label":"K12", "x":2.25, "y":4.5}, + {"label":"K13", "x":3.25, "y":4.5}, + {"label":"K14", "x":4.25, "y":4.5}, + {"label":"K15", "x":5.25, "y":4.5}, + {"label":"K16", "x":6.25, "y":4.5}, + {"label":"K17", "x":7.25, "y":4.5}, + {"label":"K18", "x":8.25, "y":4.5}, + {"label":"K78", "x":9.25, "y":4.5}, + {"label":"K77", "x":10.25, "y":4.5}, + {"label":"K75", "x":11.25, "y":4.5}, + {"label":"K74", "x":12.25, "y":4.5, "w":1.75}, + {"label":"K73", "x":14.25, "y":4.75}, + {"label":"K76", "x":15.5, "y":4.5}, + {"label":"K72", "x":16.5, "y":4.5}, + {"label":"K71", "x":17.5, "y":4.5}, + {"label":"K70", "x":18.5, "y":4.5}, + {"label":"K00", "x":0, "y":5.5, "w":1.25}, + {"label":"K01", "x":1.25, "y":5.5}, + {"label":"K02", "x":2.25, "y":5.5, "w":1.25}, + {"label":"K06", "x":3.5, "y":5.5, "w":6.25}, + {"label":"K08", "x":9.75, "y":5.5}, + {"label":"K07", "x":10.75, "y":5.5}, + {"label":"K05", "x":11.75, "y":5.5, "w":1.25}, + {"label":"K04", "x":13.25, "y":5.75}, + {"label":"K03", "x":14.25, "y":5.75}, + {"label":"K66", "x":15.25, "y":5.75}, + {"label":"K62", "x":16.5, "y":5.5}, + {"label":"K61", "x":17.5, "y":5.5}, + {"label":"K60", "x":18.5, "y":5.5} + ] + } + } +} diff --git a/keyboards/mt980/keymaps/default/keymap.c b/keyboards/mt980/keymaps/default/keymap.c new file mode 100644 index 000000000000..504233a98319 --- /dev/null +++ b/keyboards/mt980/keymaps/default/keymap.c @@ -0,0 +1,21 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = 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_NO, KC_INS, KC_PSCR, KC_PGUP, KC_PGDN, + 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_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, KC_PPLS, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + [1] = LAYOUT( + 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_PAUSE, KC_SLCK, KC_HOME, KC_END, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS) + +}; diff --git a/keyboards/mt980/keymaps/walker/config.h b/keyboards/mt980/keymaps/walker/config.h new file mode 100644 index 000000000000..0bd39599381b --- /dev/null +++ b/keyboards/mt980/keymaps/walker/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define TAPPING_TERM 200 +#define ONESHOT_TAP_TOGGLE 5 +#define ONESHOT_TIMEOUT 5000 diff --git a/keyboards/mt980/keymaps/walker/keymap.c b/keyboards/mt980/keymaps/walker/keymap.c new file mode 100644 index 000000000000..83a3fb8167da --- /dev/null +++ b/keyboards/mt980/keymaps/walker/keymap.c @@ -0,0 +1,168 @@ +#include "mt980.h" + +bool numlock_on = true; + +typedef struct { + bool is_press_action; + int state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + TRIPLE_TAP = 5, + TRIPLE_HOLD = 6 +}; + +enum { + ALT_L1 = 0 +}; + +int cur_dance (qk_tap_dance_state_t *state); +void alt_finished (qk_tap_dance_state_t *state, void *user_data); +void alt_reset (qk_tap_dance_state_t *state, void *user_data); + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = 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_NO, KC_INS, KC_PSCR, KC_PGUP, KC_PGDN, + 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_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, KC_PPLS, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, TD(ALT_L1), KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + [1] = LAYOUT( + 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_PAUSE, KC_SLCK, KC_HOME, KC_END, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, RGB_RMOD, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->pressed) return SINGLE_HOLD; + else return SINGLE_TAP; + } + else if (state->count == 2) { + if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + else if (state->count == 3) { + if (state->interrupted || !state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return 8; +} + +static tap alttap_state = { + .is_press_action = true, + .state = 0 +}; + +void alt_finished (qk_tap_dance_state_t *state, void *user_data) { + alttap_state.state = cur_dance(state); + switch (alttap_state.state) { + case SINGLE_TAP: set_oneshot_layer(1, ONESHOT_START); clear_oneshot_layer_state(ONESHOT_PRESSED); break; + case SINGLE_HOLD: register_code(KC_LALT); break; + case DOUBLE_TAP: set_oneshot_layer(1, ONESHOT_START); set_oneshot_layer(1, ONESHOT_PRESSED); break; + case DOUBLE_HOLD: register_code(KC_LALT); layer_on(1); break; + } +} + +void alt_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (alttap_state.state) { + case SINGLE_TAP: break; + case SINGLE_HOLD: unregister_code(KC_LALT); break; + case DOUBLE_TAP: break; + case DOUBLE_HOLD: layer_off(1); unregister_code(KC_LALT); break; + } + alttap_state.state = 0; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [ALT_L1] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,alt_finished, alt_reset) +}; + +void led_set_keymap(uint8_t usb_led) { + if (usb_led & (1<event.pressed && is_oneshot_layer_active()) + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + return true; + case RESET: + /* Don't allow reset from oneshot layer state */ + if (record->event.pressed && is_oneshot_layer_active()) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + return false; + } + return true; + case KC_PPLS: + if (!numlock_on) { + if (is_oneshot_layer_active() || layer_state & 0x2) { + if (record->event.pressed) + register_code(KC_HOME); + else + unregister_code(KC_HOME); + clear_oneshot_layer_state(ONESHOT_START); + } + else { + if (record->event.pressed) + register_code(KC_PGUP); + else + unregister_code(KC_PGUP); + } + return false; + } + return true; + case KC_PENT: + if (!numlock_on) { + if (is_oneshot_layer_active() || layer_state & 0x2) { + if (record->event.pressed) + register_code(KC_END); + else + unregister_code(KC_END); + clear_oneshot_layer_state(ONESHOT_START); + } + else { + if (record->event.pressed) + register_code(KC_PGDN); + else + unregister_code(KC_PGDN); + } + return false; + } + return true; + case KC_NLCK: + /* Shift + NumLock will be treated as shift-Insert */ + if ((keyboard_report->mods & MOD_BIT (KC_LSFT)) || (keyboard_report->mods & MOD_BIT (KC_RSFT))) { + if (record->event.pressed) { + register_code(KC_INS); + unregister_code(KC_INS); + } + return false; + } + else + return true; + default: + return true; + } + return true; +} diff --git a/keyboards/mt980/keymaps/walker/rules.mk b/keyboards/mt980/keymaps/walker/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/keyboards/mt980/keymaps/walker/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/mt980/mt980.c b/keyboards/mt980/mt980.c new file mode 100644 index 000000000000..5461a3b21ff0 --- /dev/null +++ b/keyboards/mt980/mt980.c @@ -0,0 +1,65 @@ +#include "mt980.h" + +__attribute__ ((weak)) +void matrix_init_keymap(void) {} + +__attribute__ ((weak)) +void matrix_scan_keymap(void) {} + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} +__attribute__ ((weak)) +uint32_t layer_state_set_keymap (uint32_t state) { + return state; +} +__attribute__ ((weak)) +void led_set_keymap(uint8_t usb_led) {} + +void matrix_init_user(void) { + matrix_init_keymap(); +} + +void matrix_scan_user(void) { + matrix_scan_keymap(); +} + +void keyboard_pre_init_user(void) { + /* Set NUMLOCK indicator pin as output */ + setPinOutput(C6); + /* Set CAPSLOCK indicator pin as output */ + setPinOutput(C7); + /* Set SCROLLOCK indicator pin as output */ + setPinOutput(B5); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return process_record_keymap(keycode, record); +} + +void led_set_user(uint8_t usb_led) { + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(C6); + } + else { + writePinHigh(C6); + } + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(C7); + } + else { + writePinHigh(C7); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(B5); + } + else { + writePinHigh(B5); + } + + led_set_keymap(usb_led); +} diff --git a/keyboards/mt980/mt980.h b/keyboards/mt980/mt980.h new file mode 100644 index 000000000000..d9804b33926e --- /dev/null +++ b/keyboards/mt980/mt980.h @@ -0,0 +1,25 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K050, K052, K053, K054, K055, K057, K058, K118, K117, K115, K114, K113, K116, K051, K112, K111, K110, K063, \ + K040, K041, K042, K043, K044, K045, K046, K047, K048, K108, K107, K105, K104, K103, K106, K102, K101, K100, K064, \ + K030, K031, K032, K033, K034, K035, K036, K037, K038, K098, K097, K095, K094, K084, K096, K092, K091, K090, \ + K020, K021, K022, K023, K024, K025, K026, K027, K028, K088, K087, K085, K093, K086, K082, K081, K080, \ + K010, K011, K012, K013, K014, K015, K016, K017, K018, K078, K077, K075, K074, K073, K076, K072, K071, K070, \ + K000, K001, K002, K006, K008, K007, K005, K004, K003, K066, K062, K061, K060 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ + { K050, K051, K052, K053, K054, K055, KC_NO, K057, K058 }, \ + { K060, K061, K062, K063, K064, KC_NO, K066, KC_NO, KC_NO}, \ + { K070, K071, K072, K073, K074, K075, K076, K077, K078 }, \ + { K080, K081, K082, KC_NO, K084, K085, K086, K087, K088 }, \ + { K090, K091, K092, K093, K094, K095, K096, K097, K098 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108 }, \ + { K110, K111, K112, K113, K114, K115, K116, K117, K118 } \ +} diff --git a/keyboards/mt980/readme.md b/keyboards/mt980/readme.md new file mode 100644 index 000000000000..7bc27c93a5f0 --- /dev/null +++ b/keyboards/mt980/readme.md @@ -0,0 +1,14 @@ +# mt980 + +A mechanical keyboard PCB in the same layout as the Leopold FC980M, sold by Wheat Field Peripherals on Taobao. This PCB requires soldering, except for the arrow cluster and the Escape key switches, which use Kailh hot swap sockets. + +Keyboard Maintainer: [walkerstop](https://github.com/walkerstop) +Hardware Supported: mt980 +Hardware Availability: Taobao store https://shop110310565.taobao.com + +Make example for this keyboard (after setting up your build environment): + + make mt980: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). + diff --git a/keyboards/mt980/rules.mk b/keyboards/mt980/rules.mk new file mode 100644 index 000000000000..9a7718aadba4 --- /dev/null +++ b/keyboards/mt980/rules.mk @@ -0,0 +1,55 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# + +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes +KEY_LOCK_ENABLE = no diff --git a/keyboards/mxss/config.h b/keyboards/mxss/config.h index 74188c943045..e3636ed519a4 100644 --- a/keyboards/mxss/config.h +++ b/keyboards/mxss/config.h @@ -37,7 +37,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D7, D6, D4, D0, C6, B6, D1, B5, D2, B4, D3, D5, B0, B2, B3 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/mxss/keymaps/default/config.h b/keyboards/mxss/keymaps/default/config.h index 9f8622579946..bfbdb62297d7 100644 --- a/keyboards/mxss/keymaps/default/config.h +++ b/keyboards/mxss/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/mxss/rgblight.h b/keyboards/mxss/rgblight.h new file mode 100644 index 000000000000..5205974f9fa7 --- /dev/null +++ b/keyboards/mxss/rgblight.h @@ -0,0 +1,166 @@ +/* Copyright 2017 Yang Liu + * + * 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 . + */ +#ifndef RGBLIGHT_H +#define RGBLIGHT_H + +#ifdef RGBLIGHT_ANIMATIONS + #define RGBLIGHT_MODES 35 +#else + #define RGBLIGHT_MODES 1 +#endif + +#ifndef RGBLIGHT_EFFECT_BREATHE_CENTER +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1-2.7 +#endif + +#ifndef RGBLIGHT_EFFECT_BREATHE_MAX +#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255 +#endif + +#ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 +#endif + +#ifndef RGBLIGHT_EFFECT_KNIGHT_LENGTH +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 +#endif + +#ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 +#endif + +#ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM +#endif + +#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 +#endif + +#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 +#endif + +#ifndef RGBLIGHT_HUE_STEP +#define RGBLIGHT_HUE_STEP 10 +#endif +#ifndef RGBLIGHT_SAT_STEP +#define RGBLIGHT_SAT_STEP 17 +#endif +#ifndef RGBLIGHT_VAL_STEP +#define RGBLIGHT_VAL_STEP 17 +#endif + +#define RGBLED_TIMER_TOP F_CPU/(256*64) +// #define RGBLED_TIMER_TOP 0xFF10 + +#include +#include +#include "eeconfig.h" +#ifndef RGBLIGHT_CUSTOM_DRIVER +#include "ws2812.h" +#endif +#include "rgblight_types.h" +#include "rgblight_list.h" + +extern LED_TYPE led[RGBLED_NUM]; + +extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM; +extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; +extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM; + +typedef union { + uint32_t raw; + struct { + bool enable :1; + uint8_t mode :6; + uint16_t hue :9; + uint8_t sat :8; + uint8_t val :8; + uint8_t speed :8;//EECONFIG needs to be increased to support this + }; +} rgblight_config_t; + +void rgblight_init(void); +void rgblight_increase(void); +void rgblight_decrease(void); +void rgblight_toggle(void); +void rgblight_enable(void); +void rgblight_disable(void); +void rgblight_step(void); +void rgblight_step_reverse(void); +uint8_t rgblight_get_mode(void); +void rgblight_mode(uint8_t mode); +void rgblight_set(void); +void rgblight_update_dword(uint32_t dword); +void rgblight_increase_hue(void); +void rgblight_decrease_hue(void); +void rgblight_increase_sat(void); +void rgblight_decrease_sat(void); +void rgblight_increase_val(void); +void rgblight_decrease_val(void); +void rgblight_increase_speed(void); +void rgblight_decrease_speed(void); +void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val); +uint16_t rgblight_get_hue(void); +uint8_t rgblight_get_sat(void); +uint8_t rgblight_get_val(void); +void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); +void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); +void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index); + +uint32_t eeconfig_read_rgblight(void); +void eeconfig_update_rgblight(uint32_t val); +void eeconfig_update_rgblight_default(void); +void eeconfig_debug_rgblight(void); + +void rgb_matrix_increase(void); +void rgb_matrix_decrease(void); + +void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); +void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); + +void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); +void rgblight_mode_noeeprom(uint8_t mode); +void rgblight_toggle_noeeprom(void); +void rgblight_enable_noeeprom(void); +void rgblight_disable_noeeprom(void); + +void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); +void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); + + +#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) +void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); + +void rgblight_task(void); + +void rgblight_timer_init(void); +void rgblight_timer_enable(void); +void rgblight_timer_disable(void); +void rgblight_timer_toggle(void); +void rgblight_effect_breathing(uint8_t interval); +void rgblight_effect_rainbow_mood(uint8_t interval); +void rgblight_effect_rainbow_swirl(uint8_t interval); +void rgblight_effect_snake(uint8_t interval); +void rgblight_effect_knight(uint8_t interval); +void rgblight_effect_christmas(void); +void rgblight_effect_rgbtest(void); + +#endif diff --git a/keyboards/mxss/templates/keymap.c b/keyboards/mxss/templates/keymap.c index 86a0f231d8ba..13dbb7206c34 100644 --- a/keyboards/mxss/templates/keymap.c +++ b/keyboards/mxss/templates/keymap.c @@ -16,9 +16,6 @@ #include QMK_KEYBOARD_H #include "mxss_frontled.h" -// Helpful defines -#define _______ KC_TRNS - // Predefined colors for layers // Format: {hue, saturation} // {0, 0} to turn off the LED @@ -39,4 +36,4 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { __KEYMAP_GOES_HERE__ -}; \ No newline at end of file +}; diff --git a/keyboards/namecard2x4/config.h b/keyboards/namecard2x4/rev1/config.h similarity index 99% rename from keyboards/namecard2x4/config.h rename to keyboards/namecard2x4/rev1/config.h index fbb5cf4454d3..4c60d059df74 100644 --- a/keyboards/namecard2x4/config.h +++ b/keyboards/namecard2x4/rev1/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { E6,D7,C6,D4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define RGB_DI_PIN F4 diff --git a/keyboards/namecard2x4/rules.mk b/keyboards/namecard2x4/rev1/rules.mk similarity index 100% rename from keyboards/namecard2x4/rules.mk rename to keyboards/namecard2x4/rev1/rules.mk diff --git a/keyboards/namecard2x4/rev2/config.h b/keyboards/namecard2x4/rev2/config.h new file mode 100644 index 000000000000..4343dff8cf3f --- /dev/null +++ b/keyboards/namecard2x4/rev2/config.h @@ -0,0 +1,216 @@ +/* +Copyright 2018 takashiski + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER takashiski +#define PRODUCT namecard2x4 +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B2,B6 } +#define MATRIX_COL_PINS { D7,E6,B4,B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +//#define DIODE_DIRECTION COL2ROW +#define DIODE_DIRECTION ROW2COL +#define RGB_DI_PIN D4 +#define RGBLED_NUM 8 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 10 +#define RGBLIGHT_VAL_STEP 10 + +//#define BACKLIGHT_PIN F4 +//#define BACKLIGHT_BREATHING +//#define BACKLIGHT_LEVELS 1 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* 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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ diff --git a/keyboards/namecard2x4/rev2/rules.mk b/keyboards/namecard2x4/rev2/rules.mk new file mode 100644 index 000000000000..51d2cbcb2e86 --- /dev/null +++ b/keyboards/namecard2x4/rev2/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +#UNICODEMAP_ENABLE = yes # for emoji user +#RGBLIGHT_ENABLE = yes # uncomment if you want addressable led strips diff --git a/keyboards/nek_type_a/config.h b/keyboards/nek_type_a/config.h new file mode 100644 index 000000000000..782b91d0e3bb --- /dev/null +++ b/keyboards/nek_type_a/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2018 Mike Roberts + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER miker +#define PRODUCT nek_type_a +#define DESCRIPTION NEK Type A + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +/* left columns are all onboard, right columns all on expander */ +#define COL_EXPANDED { false, false, false, false, false, false, false, true, true, true, true, true, true, true, true, true, true, true} +#define MATRIX_COL_PINS { C6, D7, B5, B6, B7, D6, D3, GPA0, GPA1, GPA2, GPA3, GPA4, GPA5, GPA6, GPA7, GPB0, GPB1, GPB2 } +#define MATRIX_ROW_PINS { F7, F6, F5, F4, F1, F0 } + +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 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 + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + + diff --git a/keyboards/nek_type_a/info.json b/keyboards/nek_type_a/info.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/nek_type_a/keymaps/default/config.h b/keyboards/nek_type_a/keymaps/default/config.h new file mode 100644 index 000000000000..5c2aaa2f31a7 --- /dev/null +++ b/keyboards/nek_type_a/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 Mike Roberts + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/nek_type_a/keymaps/default/keymap.c b/keyboards/nek_type_a/keymaps/default/keymap.c new file mode 100644 index 000000000000..627aa4590067 --- /dev/null +++ b/keyboards/nek_type_a/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2018 Mike Roberts + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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__MUTE, KC__VOLDOWN, KC__VOLUP, \ + KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_BSPACE, KC_INSERT, 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_LBRACKET, KC_RBRACKET, KC_BSLASH, KC_DELETE, KC_END, KC_PGDOWN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, KC_ENTER, \ + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, KC_UP, \ + KC_LCTRL, KC_LALT, KC_LCMD, KC_SPC, KC_SPC, KC_RCMD, KC_RALT, KC_RCTRL, KC_APP, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/nek_type_a/keymaps/default/readme.md b/keyboards/nek_type_a/keymaps/default/readme.md new file mode 100644 index 000000000000..763125cea54a --- /dev/null +++ b/keyboards/nek_type_a/keymaps/default/readme.md @@ -0,0 +1,3 @@ +![NEK Type A Layout](https://i.imgur.com/ElEVvze.png) + +# Default NEK Type A Keymap diff --git a/keyboards/zen/matrix.c b/keyboards/nek_type_a/matrix.c similarity index 64% rename from keyboards/zen/matrix.c rename to keyboards/nek_type_a/matrix.c index 6e274d3bac06..525296b1f191 100644 --- a/keyboards/zen/matrix.c +++ b/keyboards/nek_type_a/matrix.c @@ -1,5 +1,5 @@ /* -Copyright 2017 Danny Nguyen +Copyright 2012-2018 Jun Wako, Jack Humbert, Mike Roberts 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 @@ -16,27 +16,27 @@ along with this program. If not, see . */ /* - * scan matrix + * This matrix.c has been hacked up to support some columns being on an ex pander in ROW2COL mode. + * The columns are only ever selected and unselected, never read. Unselecting a single column via the expander is not + * implemented because updating one column costs the same as updating all the columns in a bank. Currently both banks + * are unselected but two i2c transactions could be removed if we only unselect the the proper half. */ + #include #include +#if defined(__AVR__) #include +#endif #include "wait.h" #include "print.h" #include "debug.h" #include "util.h" #include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" -#include "config.h" #include "timer.h" -#include "backlight.h" +#include "mcp23017.h" +#include "outputselect.h" -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif +/* Set 0 if debouncing isn't needed */ #ifndef DEBOUNCING_DELAY # define DEBOUNCING_DELAY 5 @@ -52,26 +52,34 @@ along with this program. If not, see . # define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) # define matrix_bitpop(i) bitpop(matrix[i]) # define ROW_SHIFTER ((uint8_t)1) -#else -# error "Currently only supports 8 COLS" +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) #endif -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#define ERROR_DISCONNECT_COUNT 5 - -#define SERIAL_LED_ADDR 0x00 -#define ROWS_PER_HAND (MATRIX_ROWS/2) - -static uint8_t error_count = 0; +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif +#if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +static const bool col_expanded[MATRIX_COLS] = COL_EXPANDED; +#endif /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; + static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + #if (DIODE_DIRECTION == COL2ROW) static void init_cols(void); static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); @@ -86,6 +94,17 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static void select_col(uint8_t col); #endif +__attribute__ ((weak)) +void matrix_init_quantum(void) { + expander_init(); + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + __attribute__ ((weak)) void matrix_init_kb(void) { matrix_init_user(); @@ -105,27 +124,24 @@ void matrix_scan_user(void) { } inline -uint8_t matrix_rows(void) -{ +uint8_t matrix_rows(void) { return MATRIX_ROWS; } inline -uint8_t matrix_cols(void) -{ +uint8_t matrix_cols(void) { return MATRIX_COLS; } -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; +void matrix_init(void) { // initialize row and col +#if (DIODE_DIRECTION == COL2ROW) unselect_rows(); init_cols(); - - TX_RX_LED_INIT; +#elif (DIODE_DIRECTION == ROW2COL) + unselect_cols(); + init_rows(); +#endif // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { @@ -133,17 +149,19 @@ void matrix_init(void) matrix_debouncing[i] = 0; } - + matrix_init_quantum(); + set_output(OUTPUT_AUTO); } -uint8_t _matrix_scan(void) +uint8_t matrix_scan(void) { - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); + #if (DIODE_DIRECTION == COL2ROW) + // Set row, read cols - for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { # if (DEBOUNCING_DELAY > 0) - bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); + bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); if (matrix_changed) { debouncing = true; @@ -151,167 +169,75 @@ uint8_t _matrix_scan(void) } # else - read_cols_on_row(matrix+offset, current_row); + read_cols_on_row(matrix, current_row); # endif } #elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { # if (DEBOUNCING_DELAY > 0) - bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); + bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); } # else - read_rows_on_col(matrix+offset, current_col); + read_rows_on_col(matrix, current_col); # endif } + #endif # if (DEBOUNCING_DELAY > 0) if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; } debouncing = false; } # endif + matrix_scan_quantum(); return 1; } -#ifdef USE_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { - return 1; - } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - -#ifdef BACKLIGHT_ENABLE - // Write backlight level for slave to read - serial_master_buffer[SERIAL_LED_ADDR] = get_backlight_level(); -#endif - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); - -#ifdef USE_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } - -#ifdef BACKLIGHT_ENABLE - // Read backlight level sent from master and update level on slave - backlight_set(serial_master_buffer[SERIAL_LED_ADDR]); -#endif -#endif -} - bool matrix_is_modified(void) { +#if (DEBOUNCING_DELAY > 0) if (debouncing) return false; +#endif return true; } inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(pin & 0xF); // IN _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI @@ -392,7 +320,7 @@ static void unselect_rows(void) static void init_rows(void) { - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { uint8_t pin = row_pins[x]; _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI @@ -408,9 +336,8 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) wait_us(30); // For each row... - for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) + for(uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { - // Store last value of row prior to reading matrix_row_t last_row_value = current_matrix[row_index]; @@ -442,23 +369,43 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) static void select_col(uint8_t col) { uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW + if (col_expanded[col]) + { + expander_select(pin); + } + else + { + _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW + } } + static void unselect_col(uint8_t col) { uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + if (col_expanded[col]) + { + expander_unselect_all(); + } + else + { + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } } static void unselect_cols(void) { - for(uint8_t x = 0; x < MATRIX_COLS; x++) { - uint8_t pin = col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + expander_unselect_all(); + + for(uint8_t col = 0; col < MATRIX_COLS; col++) { + uint8_t pin = col_pins[col]; + if (!col_expanded[col]) + { + _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN + _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + } } } diff --git a/keyboards/nek_type_a/mcp23017.c b/keyboards/nek_type_a/mcp23017.c new file mode 100644 index 000000000000..e24231680415 --- /dev/null +++ b/keyboards/nek_type_a/mcp23017.c @@ -0,0 +1,107 @@ +/* Copyright 2018 Mike Roberts + * + * 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 . + */ +#include +#include "action.h" +#include "lib/lufa/LUFA/Drivers/Peripheral/TWI.h" +#include "lib/lufa/LUFA/Drivers/Peripheral/AVR8/TWI_AVR8.c" +#include "mcp23017.h" +#include "debug.h" +#include "wait.h" + +uint8_t bit_for_pin(uint8_t pin); + +uint8_t expander_write(uint8_t reg, uint8_t data); + +uint8_t expander_read(uint8_t reg, uint8_t *data); + +void expander_config(void); + +static const char *twi_err_str(uint8_t res) { + switch (res) { + case TWI_ERROR_NoError: + return "OK"; + case TWI_ERROR_BusFault: + return "BUSFAULT"; + case TWI_ERROR_BusCaptureTimeout: + return "BUSTIMEOUT"; + case TWI_ERROR_SlaveResponseTimeout: + return "SLAVETIMEOUT"; + case TWI_ERROR_SlaveNotReady: + return "SLAVENOTREADY"; + case TWI_ERROR_SlaveNAK: + return "SLAVENAK"; + default: + return "UNKNOWN"; + } +} + +void expander_init(void) { + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 400000)); +} + +// set IN and HI +void expander_unselect_all() { + expander_write(EXPANDER_REG_IODIRA, 0xff); + expander_write(EXPANDER_REG_IODIRB, 0xff); + expander_write(EXPANDER_REG_OLATA, 0xff); + expander_write(EXPANDER_REG_OLATB, 0xff); + wait_us(EXPANDER_PAUSE); +} + +// set OUT and LOW +void expander_select(uint8_t pin) { + const uint8_t mask = 0xff & ~(1 << bit_for_pin(pin)); + if (pin < 8) { + expander_write(EXPANDER_REG_IODIRA, mask); + expander_write(EXPANDER_REG_OLATA, mask); + } else { + expander_write(EXPANDER_REG_IODIRB, mask); + expander_write(EXPANDER_REG_OLATB, mask); + } + wait_us(EXPANDER_PAUSE); +} + +void expander_config() { + // set everything to input + expander_write(EXPANDER_REG_IODIRA, 0xff); + expander_write(EXPANDER_REG_IODIRB, 0xff); + + // turn on pull-ups + expander_write(EXPANDER_REG_GPPUA, 0xff); + expander_write(EXPANDER_REG_GPPUB, 0xff); + + // disable interrupts + expander_write(EXPANDER_REG_GPINTENA, 0x0); + expander_write(EXPANDER_REG_GPINTENB, 0x0); + + // polarity + expander_write(EXPANDER_REG_IPOLA, 0x0); + expander_write(EXPANDER_REG_IPOLB, 0x0); +} + +uint8_t bit_for_pin(uint8_t pin) { + return pin % 8; +} + +uint8_t expander_write(uint8_t reg, unsigned char val) { + uint8_t addr = reg; + uint8_t result = TWI_WritePacket(EXPANDER_ADDR << 1, I2C_TIMEOUT, &addr, sizeof(addr), &val, sizeof(val)); + if (result) { + xprintf("mcp: set_register %d = %d failed: %s\n", reg, val, twi_err_str(result)); + } + return result == 0; +} + diff --git a/keyboards/nek_type_a/mcp23017.h b/keyboards/nek_type_a/mcp23017.h new file mode 100644 index 000000000000..41c747beab2c --- /dev/null +++ b/keyboards/nek_type_a/mcp23017.h @@ -0,0 +1,71 @@ +/* Copyright 2018 Mike Roberts + * + * 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 . + */ +#ifndef MAP23017_H +#define MAP23017_H + +#define EXPANDER_ADDR 0x27 +#define I2C_TIMEOUT 200 // milliseconds +#define EXPANDER_PAUSE 0 // microseconds + +enum EXPANDER_REGISTERS { + EXPANDER_REG_IODIRA = 0x00, + EXPANDER_REG_IODIRB = 0x01, + EXPANDER_REG_IPOLA = 0x02, + EXPANDER_REG_IPOLB = 0x03, + EXPANDER_REG_GPINTENA = 0x04, + EXPANDER_REG_GPINTENB = 0x05, + EXPANDER_REG_DEFVALA = 0x06, + EXPANDER_REG_DEFVALB = 0x07, + EXPANDER_REG_INTCONA = 0x08, + EXPANDER_REG_INTCONB = 0x09, + EXPANDER_REG_IOCONA = 0x0A, + EXPANDER_REG_IOCONB = 0x0B, + EXPANDER_REG_GPPUA = 0x0C, + EXPANDER_REG_GPPUB = 0x0D, + EXPANDER_REG_INTFA = 0x0E, + EXPANDER_REG_INTFB = 0x0F, + EXPANDER_REG_INTCAPA = 0x10, + EXPANDER_REG_INTCAPB = 0x11, + EXPANDER_REG_GPIOA = 0x12, + EXPANDER_REG_GPIOB = 0x13, + EXPANDER_REG_OLATA = 0x14, + EXPANDER_REG_OLATB = 0x15 +}; + +#define GPA0 0x0 +#define GPA1 0x1 +#define GPA2 0x2 +#define GPA3 0x3 +#define GPA4 0x4 +#define GPA5 0x5 +#define GPA6 0x6 +#define GPA7 0x7 +#define GPB0 0x8 +#define GPB1 0x9 +#define GPB2 0xA +#define GPB3 0xB +#define GPB4 0xC +#define GPB5 0xD +#define GPB6 0xE +#define GPB7 0xF + + +void expander_init(void); +void expander_select(uint8_t pin); +void expander_unselect(uint8_t pin); +void expander_unselect_all(void); + +#endif \ No newline at end of file diff --git a/keyboards/nek_type_a/nek_type_a.c b/keyboards/nek_type_a/nek_type_a.c new file mode 100644 index 000000000000..ec76a209b1ac --- /dev/null +++ b/keyboards/nek_type_a/nek_type_a.c @@ -0,0 +1,43 @@ +/* Copyright 2018 Mike Roberts + * + * 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 . + */ +#include "nek_type_a.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/nek_type_a/nek_type_a.h b/keyboards/nek_type_a/nek_type_a.h new file mode 100644 index 000000000000..9bf6028cb999 --- /dev/null +++ b/keyboards/nek_type_a/nek_type_a.h @@ -0,0 +1,58 @@ +/* Copyright 2018 REPLACE_WITH_YOUR_NAME + * + * 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 . + */ +#ifndef NEK_TYPE_A_H +#define NEK_TYPE_A_H + +#include "quantum.h" +#include +#include +#include + +#define I2C_ADDR 0b0100000 +#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) +#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 + +extern uint8_t expander_status; +extern uint8_t expander_input_pin_mask; +extern bool i2c_initialized; + +void init_expander(void); + +#define LAYOUT( \ + L12, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, R17, R18, R19, R1A, R1B, \ + L21, L22, L23, L24, L25, L26, L27, R21, R22, R23, R24, R25, R26, R28, R29, R2A, R2B, \ + L31, L32, L33, L34, L35, L36, R31, R32, R33, R34, R35, R36, R37, R38, R39, R3A, R3B, \ + L41, L42, L43, L44, L45, L46, R41, R42, R43, R44, R45, R46, R48, \ + L51, L52, L53, L54, L55, L56, R51, R52, R53, R54, R55, R58, R5A, \ + L61, L62, L63, L65, R61, R63, R65, R66, R68, R69, R6A, R6B \ +) \ +{ \ + { KC_NO, L12, KC_NO, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, R17, R18, R19, R1A, R1B }, \ + { L21, L22, L23, L24, L25, L26, L27, R21, R22, R23, R24, R25, R26, KC_NO, R28, R29, R2A, R2B }, \ + { L31, L32, L33, L34, L35, L36, KC_NO, R31, R32, R33, R34, R35, R36, R37, R38, R39, R3A, R3B }, \ + { L41, L42, L43, L44, L45, L46, KC_NO, R41, R42, R43, R44, R45, R46, KC_NO, R48, KC_NO, KC_NO, KC_NO }, \ + { L51, L52, L53, L54, L55, L56, KC_NO, R51, R52, R53, R54, R55, KC_NO, KC_NO, R58, KC_NO, R5A, KC_NO }, \ + { L61, L62, L63, KC_NO, L65, KC_NO, KC_NO, R61, KC_NO, R63, KC_NO, R65, R66, KC_NO, R68, R69, R6A, R6B }, \ +} +#endif diff --git a/keyboards/nek_type_a/readme.md b/keyboards/nek_type_a/readme.md new file mode 100644 index 000000000000..49f4a4659982 --- /dev/null +++ b/keyboards/nek_type_a/readme.md @@ -0,0 +1,30 @@ +# nek_type_a + +![NEK Type A Keyboard](https://i.imgur.com/XFnjlQ9.jpg) + +Natural Ergonomic Keyboard, Type A + +Keyboard Maintainer: [Mike Roberts](https://github.com/ecopoesis) +Hardware Supported: Custom PCBs from https://github.com/ecopoesis/nek-type-a +Hardware Availability: https://github.com/ecopoesis/nek-type-a + +## Design + +This is a column-driven split keyboard using three custom PCBs connected with ribbon cables. The left and right PCBs are +passive: they only have the diodes and switches needed to make the matrix. The center PCB has an Adafruit Feather 32u4 and +MCP23017 expander. + +The left matrix has its rows and columns directly connected to the Feather. The right matrix has its rows connect to the +Feather (using the same pins as the left matrix) and its columns connected to the expander. The expander uses the LUFA +hardware TWI driver. + +Bluetooth is enabled. + +## Building + +Make and install this keyboard (after setting up your build environment): +``` +make nek_type_a:default:avrdude +``` + +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). diff --git a/keyboards/nek_type_a/rules.mk b/keyboards/nek_type_a/rules.mk new file mode 100644 index 000000000000..6f172a9cea16 --- /dev/null +++ b/keyboards/nek_type_a/rules.mk @@ -0,0 +1,33 @@ +SRC = matrix.c mcp23017.c + +MCU = atmega32u4 +F_CPU = 8000000 + +ARCH = AVR8 +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +BOOTLOADER = caterina + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +CUSTOM_MATRIX = yes +DEBUG_ENABLE = yes +BLUETOOTH = AdafruitBLE \ No newline at end of file diff --git a/keyboards/newgame40/keymaps/default/keymap.c b/keyboards/newgame40/keymaps/default/keymap.c index b42fef00fe03..f3588751fa8e 100644 --- a/keyboards/newgame40/keymaps/default/keymap.c +++ b/keyboards/newgame40/keymaps/default/keymap.c @@ -38,7 +38,6 @@ enum layers { ADJUST, }; - // Fillers to make layering more clear #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) diff --git a/keyboards/niu_mini/keymaps/default/keymap.c b/keyboards/niu_mini/keymaps/default/keymap.c index 91f8bc8cde4b..5c7dc7fc0d43 100644 --- a/keyboards/niu_mini/keymaps/default/keymap.c +++ b/keyboards/niu_mini/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0 diff --git a/keyboards/niu_mini/keymaps/planck/rules.mk b/keyboards/niu_mini/keymaps/planck/rules.mk index e69de29bb2d1..8b137891791f 100644 --- a/keyboards/niu_mini/keymaps/planck/rules.mk +++ b/keyboards/niu_mini/keymaps/planck/rules.mk @@ -0,0 +1 @@ + diff --git a/keyboards/niu_mini/keymaps/yttyx/README.md b/keyboards/niu_mini/keymaps/yttyx/README.md new file mode 100644 index 000000000000..a48bdcca35f6 --- /dev/null +++ b/keyboards/niu_mini/keymaps/yttyx/README.md @@ -0,0 +1,92 @@ +# Overview + +This layout is based on Balance Twelve (mirror variant) by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/) +for more information. It's designed for left-handers who use their right hand for the mouse. + +## To build + +``` +make niu_mini:yttyx +``` + +## To flash (example) + +``` +sudo dfu-programmer atmega32u4 erase +sudo dfu-programmer atmega32u4 flash niu_mini_yttyx.hex --debug 6 +sudo dfu-programmer atmega32u4 launch +``` + +## Layers + +### Base: + + .--------.-------.-------.-------.--------. .-------.-------.-------.-------.------. + | P | L | C | D | W | | U | O | Y | K | Q | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | N | R | S | T | M | | A | E | I | H | V | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup | + '--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------' + | BS P1 | Spc P2 | P3 | | | Sft | | + '-------'--------'-----' '-----'-------'-------' + +### P1: Punctuation (1) + + .--------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | | | | | | | / | ^ | � | ~ | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | | | | & | \ | ` | $ | Ent | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup | + '--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | P1 | | | | | Sft | | + '-------'-------'-----' '-----'------'-------' + +### P2: Punctuation (2) + + .-------.-------.-------.-------.-------. .-------.-------.-------.-------.------. + | Esc | | NC | FV | | | ( | ) | " | ? | | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------' + | BS | P2 | | | | Sft | | + '-------'-------'-----' '-----'-------'-------' + +### P3: Punctuation (3) + + .-------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | Break | Pscr | ScLk | | < | > | + | _ | = | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | Caps | | | [ | ] | * | - | Ent | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | BS | | P3 | | | Sft | | + '-------'-------'-----' '-----'------'-------' + +### Numerals / Cursor control + + .-------.-------.-------.------.-------. .------.-------.-------.------.------. + | 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup | + '-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------' + | BS | BA | | | | Sft | | + '------'-------'-----' '-----'------'-------' + +### FV: Function keys / Cursor control (Vim) + + .-------.------.-------.-----.-------. .------.-------.-----.-------.------. + | F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup | + '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' + | BS | BA | | | | Sft | | + '-----'-------'-----' '-----'------'-------' diff --git a/keyboards/niu_mini/keymaps/yttyx/config.h b/keyboards/niu_mini/keymaps/yttyx/config.h new file mode 100644 index 000000000000..b9e113ec0bb4 --- /dev/null +++ b/keyboards/niu_mini/keymaps/yttyx/config.h @@ -0,0 +1,4 @@ +#pragma once +#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/niu_mini/keymaps/yttyx/keymap.c b/keyboards/niu_mini/keymaps/yttyx/keymap.c new file mode 100644 index 000000000000..e299a53b4849 --- /dev/null +++ b/keyboards/niu_mini/keymaps/yttyx/keymap.c @@ -0,0 +1,141 @@ + +#include QMK_KEYBOARD_H + +enum layers { + BA, // Base (Balance Twelve mirror variant) + P1, // Punctuation (1) + P2, // Punctuation (2) + P3, // Punctuation (2) + NC, // Numerals / Cursor control + FV // Function keys / Cursor control (Vim) +}; + +// Abbreviations - base +#define KX_P1_BSPC LT(P1, KC_BSPC) +#define KX_P2_SPC LT(P2, KC_SPC) + +#define KX_SFT_Z MT(MOD_LSFT, KC_Z) +#define KX_CTL_J MT(MOD_LCTL, KC_J) +#define KX_ALT_F MT(MOD_LALT, KC_F) + +#define KX_ALT_DOT MT(MOD_LALT, KC_DOT) +#define KX_CTL_SCLN MT(MOD_LCTL, KC_SCLN) +#define KX_SFT_X MT(MOD_LSFT, KC_X) + +#define KX_AT LSFT(KC_QUOT) +#define KX_DQUOT LSFT(KC_2) +#define KX_PIPE LSFT(KC_NUBS) +#define KX_TILDA LSFT(KC_NUHS) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + .--------.-------.-------.-------.--------. .-------.-------.-------.-------.------. + | P | L | C | D | W | | U | O | Y | K | Q | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | N | R | S | T | M | | A | E | I | H | V | + |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------| + | Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup | + '--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------' + | BS P1 | Spc P2 | P3 | | | Sft | | + '-------'--------'-----' '-----'-------'-------' + */ + [BA] = LAYOUT( + KC_P, KC_L, KC_C, KC_D, KC_W, XXXXXXX, XXXXXXX, KC_U, KC_O, KC_Y, KC_K, KC_Q, + KC_N, KC_R, KC_S, KC_T, KC_M, XXXXXXX, XXXXXXX, KC_A, KC_E, KC_I, KC_H, KC_V, + KX_SFT_Z, KX_CTL_J, KX_ALT_F, KC_G, KC_B, XXXXXXX, XXXXXXX, KC_COMM, KX_ALT_DOT, KX_CTL_SCLN, KX_SFT_X, KC_LGUI, + XXXXXXX, XXXXXXX, XXXXXXX, KX_P1_BSPC, KX_P2_SPC, MO(P3), XXXXXXX, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* P1: Punctuation (1) + .--------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | | | | | | | / | ^ | � | ~ | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | | | | & | \ | ` | $ | Ent | + |--------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup | + '--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | P1 | | | | | Sft | | + '-------'-------'-----' '-----'------'-------' + */ + [P1] = LAYOUT( + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KX_PIPE, KC_SLSH, KC_CIRC, KC_HASH, KX_TILDA, + KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_AMPR, KC_NUBS, KC_GRV, KC_DLR, KC_ENT, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_PERC, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* P2: Punctuation (2) + .-------.-------.-------.-------.-------. .-------.-------.-------.-------.------. + | Esc | | NC | FV | | | ( | ) | " | ? | | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent | + |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------' + | BS | P2 | | | | Sft | | + '-------'-------'-----' '-----'-------'-------' + */ + [P2] = LAYOUT( + KC_ESC, XXXXXXX, TO(NC), TO(FV), XXXXXXX, XXXXXXX, XXXXXXX, KC_LPRN, KC_RPRN, KX_DQUOT, KC_QUES, XXXXXXX, + KC_TAB, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_Z), XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_QUOT, KC_EXLM, KC_ENT, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_ENT, XXXXXXX, XXXXXXX, KC_NUHS, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* P3: Punctuation (3) + .-------.-------.-------.-------.-------. .------.-------.-------.-------.------. + | Esc | | Break | Pscr | ScLk | | < | > | + | _ | = | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Tab | | | Caps | | | [ | ] | * | - | Ent | + |-------+-------+-------+-------+-------| |------+-------+-------+-------+------| + | Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup | + '-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------' + | BS | | P3 | | | Sft | | + '-------'-------'-----' '-----'------'-------' + */ + [P3] = LAYOUT( + KC_ESC, XXXXXXX, KC_BRK, KC_PSCR, KC_SLCK, XXXXXXX, XXXXXXX, KC_LABK, KC_RABK, KC_PLUS, KC_UNDS, KC_EQL, + KC_TAB, XXXXXXX, XXXXXXX, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_ASTR, KC_MINS, KC_ENT, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KX_AT, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* NC: Numerals / Cursor control + .-------.-------.-------.------.-------. .------.-------.-------.------.------. + | 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | | + |-------+-------+-------+------+-------| |------+-------+-------+------+------| + | Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup | + '-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------' + | BS | BA | | | | Sft | | + '------'-------'-----' '-----'------'-------' + */ + [NC] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, + KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, + KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_DOT, XXXXXXX, XXXXXXX, KC_INS, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* FV: Function keys / Cursor control (Vim) + .-------.------.-------.-----.-------. .------.-------.-----.-------.------. + | F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | | + |-------+------+-------+-----+-------| |------+-------+-----+-------+------| + | Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup | + '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------' + | BS | BA | | | | Sft | | + '-----'-------'-----' '-----'------'-------' + */ + [FV] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, KC_0, KC_K, KC_DLR, LCTL(KC_B), XXXXXXX, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_H, KC_J, KC_L, LCTL(KC_F), XXXXXXX, + KC_LSFT, KC_LCTL, KC_LALT, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_LALT, KC_LCTL, KC_LSFT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) + +}; + diff --git a/keyboards/niu_mini/keymaps/yttyx/rules.mk b/keyboards/niu_mini/keymaps/yttyx/rules.mk new file mode 100644 index 000000000000..d8b21aa842da --- /dev/null +++ b/keyboards/niu_mini/keymaps/yttyx/rules.mk @@ -0,0 +1,10 @@ +# Build Options +AUDIO_ENABLE = no +CONSOLE_ENABLE = no +EXTRAKEY_ENABLE = no +MIDI_ENABLE = no +MOUSEKEY_ENABLE = no +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = no +STENO_ENABLE = no +VIRTSER_ENABLE = no diff --git a/keyboards/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk index b8d0ace97a49..496928ed70c8 100644 --- a/keyboards/niu_mini/rules.mk +++ b/keyboards/niu_mini/rules.mk @@ -58,7 +58,7 @@ COMMAND_ENABLE = no # 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 BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.c b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.c old mode 100644 new mode 100755 similarity index 100% rename from keyboards/dztech/boards/GENERIC_STM32_F303XC/board.c rename to keyboards/nk65/boards/GENERIC_STM32_F303XC/board.c diff --git a/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.h b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.h old mode 100644 new mode 100755 similarity index 99% rename from keyboards/dztech/boards/GENERIC_STM32_F303XC/board.h rename to keyboards/nk65/boards/GENERIC_STM32_F303XC/board.h index 988e6af34745..54df72ea6818 --- a/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.h +++ b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.h @@ -18,14 +18,14 @@ #define _BOARD_H_ /* - * Setup for Clueboard 60% Keyboard + * Setup for NK65 Keyboard */ /* * Board identifier. */ #define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "DZ60RGB PCB" +#define BOARD_NAME "NK65 PCB" /* * Board oscillators-related settings. diff --git a/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/nk65/boards/GENERIC_STM32_F303XC/board.mk old mode 100644 new mode 100755 similarity index 100% rename from keyboards/dztech/boards/GENERIC_STM32_F303XC/board.mk rename to keyboards/nk65/boards/GENERIC_STM32_F303XC/board.mk diff --git a/keyboards/dztech/dz60rgb/bootloader_defs.h b/keyboards/nk65/bootloader_defs.h old mode 100644 new mode 100755 similarity index 100% rename from keyboards/dztech/dz60rgb/bootloader_defs.h rename to keyboards/nk65/bootloader_defs.h diff --git a/keyboards/nk65/chconf.h b/keyboards/nk65/chconf.h new file mode 100755 index 000000000000..1d9f12ff1f8b --- /dev/null +++ b/keyboards/nk65/chconf.h @@ -0,0 +1,520 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 100000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM TRUE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY TRUE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h new file mode 100755 index 000000000000..0edb1bb62ece --- /dev/null +++ b/keyboards/nk65/config.h @@ -0,0 +1,154 @@ +/* +Copyright 2019 Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4E4B +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT NK65 +#define DESCRIPTION A 65-percent, tool-free RGB keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B3, B4, B5, A8, A4 } +#define MATRIX_COL_PINS { A13, A10, A9, A14, A15, B8, B9, C13, C14, C15, A0, A1, A2, A3, A5 } +// To enable debugger set A13 A14 -> A5 A7 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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. + * + */ + +/* Backlight options */ + +#define RGB_BACKLIGHT_ENABLED 1 + +#define RGB_BACKLIGHT_NK65 + +// they aren't really used if RGB_BACKLIGHT_HS60 defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 128 + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0100000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111111000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Backlight config starts after EEPROM version +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 +// Dynamic keymap starts after backlight config (35+32) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 67 +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (67+(4*5*15*2)) = (67+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 667 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/nk65/halconf.h b/keyboards/nk65/halconf.h new file mode 100755 index 000000000000..c3e0cbb728c7 --- /dev/null +++ b/keyboards/nk65/halconf.h @@ -0,0 +1,388 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef HALCONF_H +#define HALCONF_H + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC TRUE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT TRUE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the QSPI subsystem. + */ +#if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__) +#define HAL_USE_QSPI FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 16 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 256 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/** + * @brief Serial over USB number of buffers. + * @note The default is 2 buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_NUMBER 2 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* UART driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) +#define UART_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define UART_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/keyboards/nk65/info.json b/keyboards/nk65/info.json new file mode 100755 index 000000000000..ea227f71d906 --- /dev/null +++ b/keyboards/nk65/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "NK65", + "url": "", + "maintainer": "yiancar", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "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":"Home", "x":15, "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":"Page Up", "x":15, "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":"Page Down", "x":15, "y":2}, {"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":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/nk65/keymaps/default/keymap.c b/keyboards/nk65/keymaps/default/keymap.c new file mode 100755 index 000000000000..a793a8bf4123 --- /dev/null +++ b/keyboards/nk65/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +/* Copyright 2019 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_65_ansi( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, 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_ENT, KC_PGDN,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi( /* FN */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */ + 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), + +[3] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */ + 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), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/nk65/keymaps/default/readme.md b/keyboards/nk65/keymaps/default/readme.md new file mode 100755 index 000000000000..27bcd0501d41 --- /dev/null +++ b/keyboards/nk65/keymaps/default/readme.md @@ -0,0 +1,6 @@ +The default keymap for NK65. VIA support disabled. +========================================================= + +![Layout image](https://i.imgur.com/DL0CjJO.png) + +Default layer is normal ANSI 65% \ No newline at end of file diff --git a/keyboards/nk65/keymaps/default_via/keymap.c b/keyboards/nk65/keymaps/default_via/keymap.c new file mode 100755 index 000000000000..a793a8bf4123 --- /dev/null +++ b/keyboards/nk65/keymaps/default_via/keymap.c @@ -0,0 +1,58 @@ +/* Copyright 2019 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_65_ansi( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, 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_ENT, KC_PGDN,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_65_ansi( /* FN */ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */ + 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), + +[3] = LAYOUT_65_ansi( /* Empty for dynamic keymaps */ + 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), +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/nk65/keymaps/default_via/readme.md b/keyboards/nk65/keymaps/default_via/readme.md new file mode 100755 index 000000000000..6689191e4c1f --- /dev/null +++ b/keyboards/nk65/keymaps/default_via/readme.md @@ -0,0 +1,6 @@ +The default keymap for NK65. VIA support enabled. +========================================================= + +![Layout image](https://i.imgur.com/DL0CjJO.png) + +Default layer is normal ANSI 65% \ No newline at end of file diff --git a/keyboards/nk65/keymaps/default_via/rules.mk b/keyboards/nk65/keymaps/default_via/rules.mk new file mode 100755 index 000000000000..deb4fc889b9c --- /dev/null +++ b/keyboards/nk65/keymaps/default_via/rules.mk @@ -0,0 +1,67 @@ +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes diff --git a/keyboards/nk65/mcuconf.h b/keyboards/nk65/mcuconf.h new file mode 100755 index 000000000000..ce608f904ede --- /dev/null +++ b/keyboards/nk65/mcuconf.h @@ -0,0 +1,257 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F3xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F3xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADC12PRES STM32_ADC12PRES_DIV1 +#define STM32_ADC34PRES STM32_ADC34PRES_DIV1 +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_USART2SW STM32_USART2SW_PCLK +#define STM32_USART3SW STM32_USART3SW_PCLK +#define STM32_UART4SW STM32_UART4SW_PCLK +#define STM32_UART5SW STM32_UART5SW_PCLK +#define STM32_I2C1SW STM32_I2C1SW_SYSCLK +#define STM32_I2C2SW STM32_I2C2SW_SYSCLK +#define STM32_TIM1SW STM32_TIM1SW_PCLK2 +#define STM32_TIM8SW STM32_TIM8SW_PCLK2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 + +#undef STM32_HSE_BYPASS +// #error "oh no" +// #endif + +/* + * ADC driver system settings. + */ +#define STM32_ADC_DUAL_MODE FALSE +#define STM32_ADC_COMPACT_SAMPLES FALSE +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_USE_ADC4 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_ADC_ADC4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_ADC4_DMA_PRIORITY 2 +#define STM32_ADC_ADC12_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_IRQ_PRIORITY 5 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC4_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC12_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 +#define STM32_ADC_ADC34_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 TRUE +#define STM32_DAC_USE_DAC1_CH2 TRUE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI20_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI33_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 TRUE +#define STM32_GPT_USE_TIM6 TRUE +#define STM32_GPT_USE_TIM7 TRUE +#define STM32_GPT_USE_TIM8 TRUE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 10 +#define STM32_I2C_I2C2_IRQ_PRIORITY 10 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/keyboards/nk65/nk65.c b/keyboards/nk65/nk65.c new file mode 100755 index 000000000000..495246218352 --- /dev/null +++ b/keyboards/nk65/nk65.c @@ -0,0 +1,18 @@ +/* Copyright 2019 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #ifndef RGB_BACKLIGHT_NK65 + #error RGB_BACKLIGHT_NK65 not defined, recheck config.h + #endif diff --git a/keyboards/nk65/nk65.h b/keyboards/nk65/nk65.h new file mode 100755 index 000000000000..e45360541c48 --- /dev/null +++ b/keyboards/nk65/nk65.h @@ -0,0 +1,38 @@ +/* Copyright 2019 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define XXX KC_NO + +#include "quantum.h" +#include "../zeal60/rgb_backlight_keycodes.h" +#include "../zeal60/zeal60_keycodes.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_65_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, K49, K4A, K4B, K4C, K4D, K4E } \ +} diff --git a/keyboards/nk65/readme.md b/keyboards/nk65/readme.md new file mode 100755 index 000000000000..c893c9782a6a --- /dev/null +++ b/keyboards/nk65/readme.md @@ -0,0 +1,37 @@ +NK65 +========= + +[NK65]() + +This is a standard fixed layout 65% PCB. It supports VIA and full per-key RGB. + +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Hardware Supported: A 65% keyboard with STM32F303CC +Hardware Availability: https://novelkeys.xyz/ + +Due to the RGB implementation, the NK65 is currently not compatible with community layouts. + +## Instructions + +### Build + +Make example for this keyboard (after setting up your build environment): + + make nk65:default_via + +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). + +### Reset + +- Unplug +- Hold Escape +- Plug In +- Unplug +- Release Escape + +### Flash + +- Unplug +- Hold Escape +- Plug In +- Flash using QMK Toolbox or dfu-util (`make nk65::dfu-util`) diff --git a/keyboards/nk65/rules.mk b/keyboards/nk65/rules.mk new file mode 100755 index 000000000000..946722780562 --- /dev/null +++ b/keyboards/nk65/rules.mk @@ -0,0 +1,69 @@ +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +AUDIO_ENABLE = no # Audio output on port C6 +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in +#SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = no +DYNAMIC_KEYMAP_ENABLE = no +CIE1931_CURVE = yes + +LAYOUTS = 65_ansi diff --git a/keyboards/nomu30/config.h b/keyboards/nomu30/config.h new file mode 100644 index 000000000000..13fae5af3aa0 --- /dev/null +++ b/keyboards/nomu30/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2019 Naoto Takai + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC0C0 +#define PRODUCT_ID 0x3000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Naoto Takai +#define PRODUCT nomu30 +#define DESCRIPTION A 30% keyboard with ISO enter. + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D1, D0, D4 } +#define MATRIX_COL_PINS { C6, D7, E6, B4, F4, F5, F6, F7, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/nomu30/info.json b/keyboards/nomu30/info.json new file mode 100644 index 000000000000..d0c186016939 --- /dev/null +++ b/keyboards/nomu30/info.json @@ -0,0 +1,172 @@ +{ + "keyboard_name": "Nomu30", + "url": "https://keys.recompile.net/projects/nomu30/", + "maintainer": "takai", + "width": 11.5, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "Q", + "x": 0.5, + "y": 0 + }, + { + "label": "W", + "x": 1.5, + "y": 0 + }, + { + "label": "E", + "x": 2.5, + "y": 0 + }, + { + "label": "R", + "x": 3.5, + "y": 0 + }, + { + "label": "T", + "x": 4.5, + "y": 0 + }, + { + "label": "Y", + "x": 5.5, + "y": 0 + }, + { + "label": "U", + "x": 6.5, + "y": 0 + }, + { + "label": "I", + "x": 7.5, + "y": 0 + }, + { + "label": "O", + "x": 8.5, + "y": 0 + }, + { + "label": "P", + "x": 9.5, + "y": 0 + }, + { + "label": "Del", + "x": 10.5, + "y": 0 + }, + { + "label": "|", + "x": 0, + "y": 1 + }, + { + "label": "A", + "x": 1, + "y": 1 + }, + { + "label": "S", + "x": 2, + "y": 1 + }, + { + "label": "D", + "x": 3, + "y": 1 + }, + { + "label": "F", + "x": 4, + "y": 1 + }, + { + "label": "G", + "x": 5, + "y": 1 + }, + { + "label": "H", + "x": 6, + "y": 1 + }, + { + "label": "J", + "x": 7, + "y": 1 + }, + { + "label": "K", + "x": 8, + "y": 1 + }, + { + "label": "L", + "x": 9, + "y": 1 + }, + { + "label": "Enter", + "x": 10.25, + "y": 1, + "w": 1.25, + "h": 2 + }, + { + "label": "Control", + "x": 0, + "y": 2, + "w": 1.5 + }, + { + "label": "Z", + "x": 1.5, + "y": 2 + }, + { + "label": "X", + "x": 2.5, + "y": 2 + }, + { + "label": "C", + "x": 3.5, + "y": 2 + }, + { + "label": "V", + "x": 4.5, + "y": 2 + }, + { + "label": "B", + "x": 5.5, + "y": 2 + }, + { + "label": "N", + "x": 6.5, + "y": 2 + }, + { + "label": "M", + "x": 7.5, + "y": 2 + }, + { + "label": "Shift", + "x": 8.5, + "y": 2, + "w": 1.75 + } + ] + } + } +} diff --git a/keyboards/nomu30/keymaps/center_sprit/config.h b/keyboards/nomu30/keymaps/center_sprit/config.h new file mode 100644 index 000000000000..8861dc539688 --- /dev/null +++ b/keyboards/nomu30/keymaps/center_sprit/config.h @@ -0,0 +1,66 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// 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 + +// LED Setting: if you have KUMO you can use RGBLIGHT_ENABLE = yes +#ifdef RGBLIGHT_ENABLE + #define RGB_DI_PIN B5 + #define RGBLIGHT_TIMER + + #define RGBLED_NUM 6 +#endif diff --git a/keyboards/nomu30/keymaps/center_sprit/keymap.c b/keyboards/nomu30/keymaps/center_sprit/keymap.c new file mode 100644 index 000000000000..8ef037f42b64 --- /dev/null +++ b/keyboards/nomu30/keymaps/center_sprit/keymap.c @@ -0,0 +1,159 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +// 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, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +enum tapdances{ + TD_CODO = 0, + }; + +// Layer Mode aliases +#define KC_MLAD MO(_ADJUST) + +// Base layer mod tap +#define KC_SLSF LSFT_T(KC_SLSH) +#define KC_Z_CT LCTL_T(KC_Z) +#define KC_X_AL LALT_T(KC_X) +#define KC_C_GU LGUI_T(KC_C) +#define KC_ENSF LSFT_T(KC_ENT) +#define KC_M_CT LCTL_T(KC_M) + +// Lower layer mod tap +#define KC_F6SF LSFT_T(KC_F6) +#define KC_BSSF LSFT_T(KC_BSLS) +#define KC_11CT LCTL_T(KC_F11) +#define KC_12AL LALT_T(KC_F12) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) + +// Tap dance +#define KC_CODO TD(TD_CODO) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), + }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSLO, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_SLSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_Z_CT, KC_X_AL, KC_C_GU, KC_V, KC_B, KC_SPRA, KC_N, KC_M_CT, KC_CODO + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_LOWER] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_11CT, KC_12AL, KC_ESC, KC_TAB, KANJI, KC_MLAD, XXXXXXX, KC_COMM, KC_DOT + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_RAISE] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_SLSH, KC_RO + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_ADJUST] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, _______, KC_BTN1, KC_BTN2, XXXXXXX + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/nomu30/keymaps/center_sprit/readme.md b/keyboards/nomu30/keymaps/center_sprit/readme.md new file mode 100644 index 000000000000..754e37f46be5 --- /dev/null +++ b/keyboards/nomu30/keymaps/center_sprit/readme.md @@ -0,0 +1,68 @@ +# The center sprit (as known as treadstone/stonehenge style staggered like keymap) + +See [stonehenge30](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/stonehenge30) + +A Nomu30 can use full color LED strip used by B5 pin. This keymap can use LED animation option. + +## Keymap Description + +- KC_SLSF ...... / key is one tap, Shift key is long push. +- KC_Z_CT ...... Z key is one tap, Ctrl key is long tap. +- KC_X_AL ...... X key is one tap, Alt key is long tap. +- KC_C_GU ...... C key is one tap, GUI key is long tap. +- KC_M_CT ...... M key is one tap, Ctrl key is long tap. +- KC_ENSF ...... Enter key is one tap, Ctrl key is long tap. +- KC_CODO ...... , key is one tap, . key is double tap. +- KC_BSLO ...... Backspace key is one tap, Move to Lower layer with long push. +- KC_SPRA ...... Space key is one tap, Move to Raise layer with. +- AG_NORM ...... If you use Mac set to mode. +- AG_SWAP ...... If you use Win set to mode. +- KANJI ...... Japanese IME toggle key. + +## How to move to Ajdust Layer + +At first, Move to Lower layer with long push. After that Adjust key with long push. Now you have into Adjust layer state. + +```c + + [_BASE] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSLO, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_SLSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_Z_CT, KC_X_AL, KC_C_GU, KC_V, KC_B, KC_SPRA, KC_N, KC_M_CT, KC_CODO + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_LOWER] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_11CT, KC_12AL, KC_ESC, KC_TAB, KANJI, KC_MLAD, XXXXXXX, KC_COMM, KC_DOT + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_RAISE] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_6, KC_7, KC_8, KC_9, KC_0, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_SLSH, KC_RO + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_ADJUST] = LAYOUT( + //,-------------------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, _______, KC_BTN1, KC_BTN2, XXXXXXX + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ) + +``` diff --git a/keyboards/nomu30/keymaps/center_sprit/rules.mk b/keyboards/nomu30/keymaps/center_sprit/rules.mk new file mode 100644 index 000000000000..1b0d208ced73 --- /dev/null +++ b/keyboards/nomu30/keymaps/center_sprit/rules.mk @@ -0,0 +1,26 @@ + +# 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 +# +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +TAP_DANCE_ENABLE = yes + +# If your custom treadstone32 pcb, you can rewrite to yes. +RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/nomu30/keymaps/default/config.h b/keyboards/nomu30/keymaps/default/config.h new file mode 100644 index 000000000000..fb21eed1bce5 --- /dev/null +++ b/keyboards/nomu30/keymaps/default/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 Naoto Takai + * + * 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 . + */ + +#pragma once + +// place overrides here + +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD diff --git a/keyboards/nomu30/keymaps/default/keymap.c b/keyboards/nomu30/keymaps/default/keymap.c new file mode 100644 index 000000000000..8878c3b1e85b --- /dev/null +++ b/keyboards/nomu30/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Naoto Takai + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _BASE 0 +#define _NUMS 1 +#define _SYMS 2 +#define _FUNC 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + 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_ENT, + KC_LSFT, LALT_T(KC_Z), LGUI_T(KC_X), KC_C, LT(_SYMS, KC_V), LT(_FUNC, KC_B), LT(_NUMS, KC_N), KC_M, KC_SPC + ), + [_NUMS] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_TRNS, KC_LBRC, KC_RBRC, KC_SLSH, KC_BSLS, KC_TRNS, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_COMM, KC_DOT + ), + [_SYMS] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TILD, + KC_TRNS, KC_LCBR, KC_RCBR, KC_QUES, KC_PIPE, KC_TRNS, KC_UNDS, KC_PLUS, KC_COLN, KC_DQUO, KC_TRNS, + KC_TRNS, KC_LABK, KC_RABK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [_FUNC] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_TAB, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, RESET, + KC_TRNS, KC_LALT, KC_LGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/nomu30/keymaps/default/readme.md b/keyboards/nomu30/keymaps/default/readme.md new file mode 100644 index 000000000000..55bc4585010e --- /dev/null +++ b/keyboards/nomu30/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for nomu30 diff --git a/keyboards/nomu30/keymaps/like_jis/config.h b/keyboards/nomu30/keymaps/like_jis/config.h new file mode 100644 index 000000000000..8861dc539688 --- /dev/null +++ b/keyboards/nomu30/keymaps/like_jis/config.h @@ -0,0 +1,66 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// 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 + +// LED Setting: if you have KUMO you can use RGBLIGHT_ENABLE = yes +#ifdef RGBLIGHT_ENABLE + #define RGB_DI_PIN B5 + #define RGBLIGHT_TIMER + + #define RGBLED_NUM 6 +#endif diff --git a/keyboards/nomu30/keymaps/like_jis/keymap.c b/keyboards/nomu30/keymaps/like_jis/keymap.c new file mode 100644 index 000000000000..203d0a7a4151 --- /dev/null +++ b/keyboards/nomu30/keymaps/like_jis/keymap.c @@ -0,0 +1,159 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +// 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, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +// enum tapdances{ +// TD_CODO = 0, +// TD_SLRO, +// }; + +// Layer Mode aliases +#define KC_MLAD MO(_ADJUST) + +// Base layer mod tap +#define KC_CMSF LSFT_T(KC_COMM) +#define KC_DTCT LCTL_T(KC_DOT) +#define KC_Z_AL LALT_T(KC_Z) +#define KC_X_GU LGUI_T(KC_X) +#define KC_ENSF LSFT_T(KC_ENT) + +// Lower layer mod tap +#define KC_BSSF LSFT_T(KC_BSLS) +#define KC_11AL LALT_T(KC_F11) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) + +// Tap dance +// #define KC_CODO TD(TD_CODO) +// #define KC_SLRO TD(TD_SLRO) + +// qk_tap_dance_action_t tap_dance_actions[] = { +// [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), +// [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +// }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLO, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_CMSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_DTCT, KC_Z_AL, KC_X_GU, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SPRA + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, _______, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_11AL, KC_F12, KC_ESC, KC_TAB, KANJI, KC_COMM, KC_DOT, KC_MLAD + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_RO, _______ + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_ADJUST] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/nomu30/keymaps/like_jis/readme.md b/keyboards/nomu30/keymaps/like_jis/readme.md new file mode 100644 index 000000000000..ad64f06b1578 --- /dev/null +++ b/keyboards/nomu30/keymaps/like_jis/readme.md @@ -0,0 +1,64 @@ +# The LikeJIS is Japanese Keyboard like keymap + +A Nomu30 can use full color LED strip used by B5 pin. This keymap can use LED animation option. + +## Keymap Description + +- KC_CMSF ...... , key is one tap, Shift key is long push. +- KC_DTCT ...... . key is one tap, Ctrl key is long tap. +- KC_ENSF ...... Enter key is one tap, Ctrl key is long tap. +- KC_Z_AL ...... Z key is one tap, Alt key is long tap. +- KC_X_GU ...... X key is one tap, GUI key is long tap. +- KC_BSLO ...... Backspace key is one tap, Move to Lower layer with long push. +- KC_SPRA ...... Space key is one tap, Move to Raise layer with. +- AG_NORM ...... If you use Mac set to mode. +- AG_SWAP ...... If you use Win set to mode. +- KANJI ...... Japanese IME toggle key. + +## How to move to Ajdust Layer + +At first, Move to Lower layer with long push. After that Adjust key with long push. Now you have into Adjust layer state. + +```c + + [_BASE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLO, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_CMSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_DTCT, KC_Z_AL, KC_X_GU, KC_C, KC_V, KC_B, KC_N, KC_M, KC_SPRA + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, _______, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_11AL, KC_F12, KC_ESC, KC_TAB, KANJI, KC_COMM, KC_DOT, KC_MLAD + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLSH, KC_RO, _______ + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ), + + [_ADJUST] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX + //`---------+---------+---------+---------+---------+---------+---------+---------+---------' + ) + +``` diff --git a/keyboards/nomu30/keymaps/like_jis/rules.mk b/keyboards/nomu30/keymaps/like_jis/rules.mk new file mode 100644 index 000000000000..b1a6026c2ab5 --- /dev/null +++ b/keyboards/nomu30/keymaps/like_jis/rules.mk @@ -0,0 +1,26 @@ + +# 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 +# +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +TAP_DANCE_ENABLE = no + +# If your custom treadstone32 pcb, you can rewrite to yes. +RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/nomu30/nomu30.c b/keyboards/nomu30/nomu30.c new file mode 100644 index 000000000000..37a8614c11b7 --- /dev/null +++ b/keyboards/nomu30/nomu30.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Naoto Takai + * + * 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 . + */ +#include "nomu30.h" diff --git a/keyboards/nomu30/nomu30.h b/keyboards/nomu30/nomu30.h new file mode 100644 index 000000000000..e6c553bec528 --- /dev/null +++ b/keyboards/nomu30/nomu30.h @@ -0,0 +1,48 @@ +/* Copyright 2019 Naoto Takai + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208 \ +) \ +{ \ + { KC_NO, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, KC_NO, KC_NO, KC_NO }, \ +} + +#define LAYOUT_kc( \ + K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208 \ +) \ +LAYOUT( \ + KC_##K001, KC_##K002, KC_##K003, KC_##K004, KC_##K005, KC_##K006, KC_##K007, KC_##K008, KC_##K009, KC_##K010, KC_##K011, \ + KC_##K100, KC_##K101, KC_##K102, KC_##K103, KC_##K104, KC_##K105, KC_##K106, KC_##K107, KC_##K108, KC_##K109, KC_##K110, \ + KC_##K200, KC_##K201, KC_##K202, KC_##K203, KC_##K204, KC_##K205, KC_##K206, KC_##K207, KC_##K208 \ +) diff --git a/keyboards/nomu30/readme.md b/keyboards/nomu30/readme.md new file mode 100644 index 000000000000..95577164a110 --- /dev/null +++ b/keyboards/nomu30/readme.md @@ -0,0 +1,15 @@ +# nomu30 + +![nomu30](https://keys.recompile.net/images/nomu30-main@600w.jpg) + +A 30% keyboard with ISO enter. + +Keyboard Maintainer: [Naoto Takai](https://github.com/takai) +Hardware Supported: The Nomu30 PCBs, ProMicro supported +Hardware Availability: https://keys.recompile.net/projects/nomu30/ + +Make example for this keyboard (after setting up your build environment): + + make nomu30: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). diff --git a/keyboards/nomu30/rules.mk b/keyboards/nomu30/rules.mk new file mode 100644 index 000000000000..d4785aabbea0 --- /dev/null +++ b/keyboards/nomu30/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/novelpad/keymaps/default/keymap.c b/keyboards/novelpad/keymaps/default/keymap.c index 78cdff512e11..487a3778320d 100755 --- a/keyboards/novelpad/keymaps/default/keymap.c +++ b/keyboards/novelpad/keymaps/default/keymap.c @@ -16,8 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - enum custom_keycodes { BL = SAFE_RANGE, WK_RED, diff --git a/keyboards/noxary/220/220.c b/keyboards/noxary/220/220.c new file mode 100644 index 000000000000..e671e15a43a4 --- /dev/null +++ b/keyboards/noxary/220/220.c @@ -0,0 +1,62 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include "220.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(C6); + matrix_init_user(); +} + + +/* + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(C6); + } else { + writePinHigh(C6); + } + led_set_user(usb_led); +} \ No newline at end of file diff --git a/keyboards/noxary/220/220.h b/keyboards/noxary/220/220.h new file mode 100644 index 000000000000..3f1375e2a6a4 --- /dev/null +++ b/keyboards/noxary/220/220.h @@ -0,0 +1,42 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_6x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43, \ + K50, K51, K52, K53 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 }, \ + { K50, K51, K52, K53 } \ +} diff --git a/keyboards/noxary/220/config.h b/keyboards/noxary/220/config.h new file mode 100644 index 000000000000..e5a6be2de70a --- /dev/null +++ b/keyboards/noxary/220/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Noxary +#define PRODUCT 220 +#define DESCRIPTION A custom numpad + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { C4, B0, D3, D4, D5, D6 } +#define MATRIX_COL_PINS { B4, C5, D2, D1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/noxary/220/info.json b/keyboards/noxary/220/info.json new file mode 100644 index 000000000000..252c824aa8e4 --- /dev/null +++ b/keyboards/noxary/220/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Noxary 220", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 6.5, + "layouts": { + "LAYOUT_ortho_6x4": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":0, "y":2.5}, {"x":1, "y":2.5}, {"x":2, "y":2.5}, {"x":3, "y":2.5}, {"x":0, "y":3.5}, {"x":1, "y":3.5}, {"x":2, "y":3.5}, {"x":3, "y":3.5}, {"x":0, "y":4.5}, {"x":1, "y":4.5}, {"x":2, "y":4.5}, {"x":3, "y":4.5}, {"x":0, "y":5.5}, {"x":1, "y":5.5}, {"x":2, "y":5.5}, {"x":3, "y":5.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/noxary/220/keymaps/default/config.h b/keyboards/noxary/220/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/noxary/220/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/noxary/220/keymaps/default/keymap.c b/keyboards/noxary/220/keymaps/default/keymap.c new file mode 100644 index 000000000000..a72841db5467 --- /dev/null +++ b/keyboards/noxary/220/keymaps/default/keymap.c @@ -0,0 +1,76 @@ +/* Copyright 2019 Rozakiin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_ortho_6x4( + KC_ESC, BL_TOGG, BL_DEC, BL_INC, + KC_NLCK, KC_SLSH, KC_ASTR, KC_PEQL, + KC_7, KC_8, KC_9, KC_PMNS, + KC_4, KC_5, KC_6, KC_PPLS, + KC_1, KC_2, KC_3, KC_PENT, + KC_0, KC_0, KC_DEL, KC_PENT), + + LAYOUT_ortho_6x4( + 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), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/noxary/220/keymaps/default/readme.md b/keyboards/noxary/220/keymaps/default/readme.md new file mode 100644 index 000000000000..bff7feda38a1 --- /dev/null +++ b/keyboards/noxary/220/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Noxary 220 \ No newline at end of file diff --git a/keyboards/noxary/220/readme.md b/keyboards/noxary/220/readme.md new file mode 100644 index 000000000000..1fcdfcc3c744 --- /dev/null +++ b/keyboards/noxary/220/readme.md @@ -0,0 +1,13 @@ +# Noxary 220 + +A fully customizable numpad + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakiin](https://github.com/rozakiin) +Hardware Supported: Noxary 220 PCB +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=95660.0) + +Make example for this keyboard (after setting up your build environment): + + make noxary/220: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). diff --git a/keyboards/noxary/220/rules.mk b/keyboards/noxary/220/rules.mk new file mode 100644 index 000000000000..0f8cae92696b --- /dev/null +++ b/keyboards/noxary/220/rules.mk @@ -0,0 +1,83 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = ortho_6x4 \ No newline at end of file diff --git a/keyboards/noxary/260/260.c b/keyboards/noxary/260/260.c new file mode 100644 index 000000000000..9f577a2aee6d --- /dev/null +++ b/keyboards/noxary/260/260.c @@ -0,0 +1,61 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#include "260.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(B1); + matrix_init_user(); +} + +/* +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B1); + } else { + writePinHigh(B1); + } + + led_set_user(usb_led); +} \ No newline at end of file diff --git a/keyboards/noxary/260/260.h b/keyboards/noxary/260/260.h new file mode 100644 index 000000000000..2c62bd2a54dd --- /dev/null +++ b/keyboards/noxary/260/260.h @@ -0,0 +1,40 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, \ + K400, K401, K402, K406, K410, K411, K412, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, KC_NO, K414 } \ +} diff --git a/keyboards/noxary/260/config.h b/keyboards/noxary/260/config.h new file mode 100644 index 000000000000..984712dd1053 --- /dev/null +++ b/keyboards/noxary/260/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4E58 +#define PRODUCT_ID 0x003C +#define DEVICE_VER 0x0001 +#define MANUFACTURER Noxary +#define PRODUCT 260 +#define DESCRIPTION A custom 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F7, F6, F5, F0, B5 } +#define MATRIX_COL_PINS { C7, C6, B6, F4, E6, D0, B4, D1, D2, D3, D7, D6, D4, F1, D5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/noxary/260/info.json b/keyboards/noxary/260/info.json new file mode 100644 index 000000000000..e5b449ff36ff --- /dev/null +++ b/keyboards/noxary/260/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Noxary 260", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":2, "w":1.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, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/noxary/260/keymaps/default/config.h b/keyboards/noxary/260/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/noxary/260/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/noxary/260/keymaps/default/keymap.c b/keyboards/noxary/260/keymaps/default/keymap.c new file mode 100644 index 000000000000..061e3d24073c --- /dev/null +++ b/keyboards/noxary/260/keymaps/default/keymap.c @@ -0,0 +1,87 @@ +/* Copyright 2019 Rozakiin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// 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. +#define _BL 0 +#define _FL1 1 +#define _FL2 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* _BL: Base Layer(Default) - For ISO enter use ANSI enter + * ,-----------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BSpc| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | + * |-----------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| + * |-----------------------------------------------------------| + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift |Del| + * |-----------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt |Win |Mo(1) |Ctrl | + * `-----------------------------------------------------------' + */ + [_BL] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, 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_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_RGUI, MO(_FL1), KC_RCTL), + /* _FL1: Function Layer 1 - For ISO enter use ANSI enter + * ,----------------------------------------------------------------. + * | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |PScr| | + * |----------------------------------------------------------------| + * | | | | |RST| | | | | | | | | | Ins| + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | |Home| + * |----------------------------------------------------------------| + * | | | | | | | | | |Bl-|Bl+| |Mute|Vol+| End| + * |----------------------------------------------------------------| + * | | | | BL_Toggle | | | | |Vol-| | + * `----------------------------------------------------------------' + */ + [_FL1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_PSCR, + _______, KC_VOLU, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_VOLD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, _______, + _______, _______, _______, BL_TOGG, _______, _______, _______, _______), + /* _FL2: Function Layer 2 - For ISO enter use ANSI enter + * ,----------------------------------------------------------------. + * | | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | + * `----------------------------------------------------------------' + */ + [_FL2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), + + +}; + diff --git a/keyboards/noxary/260/keymaps/default/readme.md b/keyboards/noxary/260/keymaps/default/readme.md new file mode 100644 index 000000000000..af0cd4ee276f --- /dev/null +++ b/keyboards/noxary/260/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Noxary 260 \ No newline at end of file diff --git a/keyboards/noxary/260/readme.md b/keyboards/noxary/260/readme.md new file mode 100644 index 000000000000..48cbbbf22970 --- /dev/null +++ b/keyboards/noxary/260/readme.md @@ -0,0 +1,15 @@ +Noxary 260 + +![260](https://cdn.discordapp.com/attachments/438429095303315456/489188948749451276/image0.jpg) + +A fully customizable 60% keyboard. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakiin](https://github.com/rozakiin) +Hardware Supported: Noxary 260 PCB +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=93572.0) + +Make example for this keyboard (after setting up your build environment): + + make noxary/260: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). diff --git a/keyboards/noxary/260/rules.mk b/keyboards/noxary/260/rules.mk new file mode 100644 index 000000000000..0fffc2d3878e --- /dev/null +++ b/keyboards/noxary/260/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/noxary/268/keymaps/ansi/keymap.c b/keyboards/noxary/268/keymaps/ansi/keymap.c index 20dddd884d77..ffe376b4e86d 100644 --- a/keyboards/noxary/268/keymaps/ansi/keymap.c +++ b/keyboards/noxary/268/keymaps/ansi/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/noxary/268/keymaps/default/keymap.c b/keyboards/noxary/268/keymaps/default/keymap.c index 0a26d6313756..a76509db8b18 100644 --- a/keyboards/noxary/268/keymaps/default/keymap.c +++ b/keyboards/noxary/268/keymaps/default/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/noxary/268/keymaps/iso/keymap.c b/keyboards/noxary/268/keymaps/iso/keymap.c index 5d6987ce76fa..3d9ca2352f84 100644 --- a/keyboards/noxary/268/keymaps/iso/keymap.c +++ b/keyboards/noxary/268/keymaps/iso/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/noxary/268/keymaps/sixtyeight/keymap.c b/keyboards/noxary/268/keymaps/sixtyeight/keymap.c index 34dd3a6fa191..151ac1f73d40 100644 --- a/keyboards/noxary/268/keymaps/sixtyeight/keymap.c +++ b/keyboards/noxary/268/keymaps/sixtyeight/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/noxary/268_2/config.h b/keyboards/noxary/268_2/config.h index 2702f924b572..733c87990304 100644 --- a/keyboards/noxary/268_2/config.h +++ b/keyboards/noxary/268_2/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C6, B6, C7, F4, E6, D0, D7, D1, D2, B4, D6, D4, D5, F1, D3, B1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* number of backlight levels */ diff --git a/keyboards/noxary/280/280.c b/keyboards/noxary/280/280.c new file mode 100644 index 000000000000..441f0ad84a7d --- /dev/null +++ b/keyboards/noxary/280/280.c @@ -0,0 +1,70 @@ +/* Copyright 2019 %YOUR_NAME% + * + * 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 . + */ +#include "280.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(D5); + setPinOutput(D0); + matrix_init_user(); +} + +/* +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ + + +void led_set_kb(uint8_t usb_led) { + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(D5); + } else { + writePinHigh(D5); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(D0); + } else { + writePinHigh(D0); + } + + led_set_user(usb_led); +} \ No newline at end of file diff --git a/keyboards/noxary/280/280.h b/keyboards/noxary/280/280.h new file mode 100644 index 000000000000..1a93c8c6be7c --- /dev/null +++ b/keyboards/noxary/280/280.h @@ -0,0 +1,49 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT( \ + K000, K002, K103, K004, K105, K006, K107, K008, K109, K111, K012, K113, K014, K115, K016, K117, \ + K200, K301, K202, K303, K204, K305, K206, K307, K208, K309, K210, K311, K212, K313, K214, K315, K216, K317, \ + K400, K501, K402, K503, K404, K505, K406, K507, K408, K509, K410, K511, K412, K414, K515, K416, K517, \ + K600, K701, K602, K703, K604, K705, K606, K707, K608, K709, K610, K711, K612, K614, \ + K800, K901, K802, K903, K804, K905, K806, K907, K808, K909, K810, K911, K812, K814, K816, \ + K1000,K1101,K1002, K1006, K1010,K1111,K1012, K1014,K1115,K1016,K1117\ +) { \ + { K000, K002, K004, K006, K008, KC_NO, K012, K014, K016 },\ + { KC_NO, K103, K105, K107, K109, K111, K113, K115, K117 },\ + { K200, K202, K204, K206, K208, K210, K212, K214, K216 },\ + { K301, K303, K305, K307, K309, K311, K313, K315, K317 },\ + { K400, K402, K404, K406, K408, K410, K412, K414, K416 },\ + { K501, K503, K505, K507, K509, K511, KC_NO, K515, K517 },\ + { K600, K602, K604, K606, K608, K610, K612, K614, KC_NO },\ + { K701, K703, K705, K707, K709, K711, KC_NO, KC_NO, KC_NO },\ + { K800, K802, K804, K806, K808, K810, K812, K814, K816 },\ + { K901, K903, K905, K907, K909, K911, KC_NO, KC_NO, KC_NO },\ + { K1000, K1002, KC_NO, K1006, KC_NO, K1010, K1012, K1014, K1016 },\ + { K1101, KC_NO, KC_NO, KC_NO, KC_NO, K1111, KC_NO, K1115, K1117 }\ +} diff --git a/keyboards/noxary/280/config.h b/keyboards/noxary/280/config.h new file mode 100644 index 000000000000..427709d1b48f --- /dev/null +++ b/keyboards/noxary/280/config.h @@ -0,0 +1,251 @@ +/* +Copyright 2019 MechMerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4E58 +#define PRODUCT_ID 0x0050 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Noxary +#define PRODUCT 280 +#define DESCRIPTION A custom TKL + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, E6, D6, D4, F6, F5, F4, F1, B2, D3, D2, D1} +#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, B0, B3} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/noxary/280/info.json b/keyboards/noxary/280/info.json new file mode 100644 index 000000000000..f75d276564d4 --- /dev/null +++ b/keyboards/noxary/280/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Noxary 280", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5}, {"x":14, "y":1.5}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":13.75, "y":3.5, "w":1.25}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + } + } +} \ No newline at end of file diff --git a/keyboards/noxary/280/keymaps/default/config.h b/keyboards/noxary/280/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/noxary/280/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/noxary/280/keymaps/default/keymap.c b/keyboards/noxary/280/keymaps/default/keymap.c new file mode 100644 index 000000000000..3d993e04253c --- /dev/null +++ b/keyboards/noxary/280/keymaps/default/keymap.c @@ -0,0 +1,102 @@ +/* Copyright 2019 Rozakin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +// 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. +#define _BL 0 +#define _FL1 1 +#define _FL2 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* _BL: Base Layer(Default) - For ISO enter use ANSI enter + * ,------------------------------------------------------------. ,--------------. + * |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11| f12| |Prnt|ScLk|Paus| + * |------------------------------------------------------------| |--------------| + * | ~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BSpc| | Ins|Home|PgUp| + * |------------------------------------------------------------| |--------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | Del| End|PgDn| + * |------------------------------------------------------------| `--------------' + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| + * |------------------------------------------------------------| ,----. + * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift|Mo(1)| | Up | + * |------------------------------------------------------------| ,--------------. + * |Ctrl|Win |Alt | Space |Alt |Win |Mo(1) |Ctrl | |Left| Dn |Rght| + * `------------------------------------------------------------' `--------------' + */ + [_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_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, 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_NUHS, 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, MO(_FL1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL1), KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), + /* _FL1: Function Layer 1 - For ISO enter use ANSI enter + * ,------------------------------------------------------------. ,--------------. + * | | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| |--------------| + * | | | | |RST| | | | | | | | | | | | | | + * |------------------------------------------------------------| `--------------' + * | | | | | | | | | | | | | | | + * |------------------------------------------------------------| ,----. + * | | | | | | | | | |Bl-|Bl+| | Mute| | |Vol+| + * |------------------------------------------------------------| ,--------------. + * | | | | BL_Toggle | | | | | | |Vol-| | + * `------------------------------------------------------------' `--------------' + */ + [_FL1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, _______, KC_VOLU, + _______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, KC_VOLD, _______), + /* _FL2: Function Layer 2 - For ISO enter use ANSI enter + * ,------------------------------------------------------------. ,--------------. + * | | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| `--------------' + * | | | | | | | | | | | | | | | + * |------------------------------------------------------------| ,----. + * | | | | | | | | | | | | | | | | | + * |------------------------------------------------------------| ,--------------. + * | | | | | | | | | | | | | + * `------------------------------------------------------------' `--------------' + */ + [_FL2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + + }; + diff --git a/keyboards/noxary/280/keymaps/default/readme.md b/keyboards/noxary/280/keymaps/default/readme.md new file mode 100644 index 000000000000..e1a03dc002da --- /dev/null +++ b/keyboards/noxary/280/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Noxary 280 \ No newline at end of file diff --git a/keyboards/noxary/280/readme.md b/keyboards/noxary/280/readme.md new file mode 100644 index 000000000000..5af7441ddf71 --- /dev/null +++ b/keyboards/noxary/280/readme.md @@ -0,0 +1,13 @@ +Noxary 280 + +A fully customizable TKL keyboard. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin), [Rozakin](https://github.com/rozakiin) +Hardware Supported: 280 PCB +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=95660.0) + +Make example for this keyboard (after setting up your build environment): + + make noxary/280: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). diff --git a/keyboards/noxary/280/rules.mk b/keyboards/noxary/280/rules.mk new file mode 100644 index 000000000000..ad6117f16c25 --- /dev/null +++ b/keyboards/noxary/280/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/noxary/x268/config.h b/keyboards/noxary/x268/config.h index ac52d9fc3fe7..d2a8c3b9fd73 100644 --- a/keyboards/noxary/x268/config.h +++ b/keyboards/noxary/x268/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C6, B6, C7, F4, E6, B2, D6, D0, D1, D7, D4, D5, D3, F1, D2, B1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/ok60/keymaps/default/keymap.c b/keyboards/ok60/keymaps/default/keymap.c index 1cc2232a1301..c51510c646e4 100644 --- a/keyboards/ok60/keymaps/default/keymap.c +++ b/keyboards/ok60/keymaps/default/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_ansi( @@ -9,7 +7,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_MENU, KC_LCTL + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL ), [1] = LAYOUT_60_ansi( diff --git a/keyboards/ok60/keymaps/ebrowncross/keymap.c b/keyboards/ok60/keymaps/ebrowncross/keymap.c index 87921791077c..e2dbc8429a79 100644 --- a/keyboards/ok60/keymaps/ebrowncross/keymap.c +++ b/keyboards/ok60/keymaps/ebrowncross/keymap.c @@ -2,8 +2,6 @@ // An ISO UK keymap -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_iso( diff --git a/keyboards/org60/keymaps/default/keymap.c b/keyboards/org60/keymaps/default/keymap.c index ebb377d1dd8b..bf5438657a3c 100644 --- a/keyboards/org60/keymaps/default/keymap.c +++ b/keyboards/org60/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -9,7 +8,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_NO, KC_RSFT ,KC_UP, KC_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer LAYOUT( @@ -17,15 +16,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO ,KC_PGUP, KC_INS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { @@ -43,4 +37,4 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // Loop void matrix_scan_user(void) { // Empty -}; \ No newline at end of file +}; diff --git a/keyboards/org60/keymaps/jarred/keymap.c b/keyboards/org60/keymaps/jarred/keymap.c new file mode 100644 index 000000000000..3397a1909cd9 --- /dev/null +++ b/keyboards/org60/keymaps/jarred/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +#define _QW 0 +#define _NV 1 + +// HHKB Layout +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + MO(_NV), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, KC_ENT, \ + XXXXXXX, KC_LCTL, KC_LGUI, KC_SPC, XXXXXXX, KC_RALT, XXXXXXX, KC_RCTL, XXXXXXX), + + [_NV] = LAYOUT( + KC_GRV , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ + _______, _______, _______, _______, KC_DEL ,KC_BSPC,_______,KC_HOME,KC_UP ,KC_END , KC_INS , _______, _______, _______, \ + _______, _______, _______, KC_LSFT,KC_LCTL, KC_ENT, _______,KC_LEFT,KC_DOWN,KC_RGHT, KC_DEL , KC_DEL , _______, _______, \ + _______, _______, _______, _______, _______,_______,_______,_______,KC_PGUP,KC_PGDN, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, RESET, _______), + +}; + + diff --git a/keyboards/orthodox/keymaps/default/config.h b/keyboards/orthodox/keymaps/default/config.h index 3df957b84c5c..ce4538b08a24 100644 --- a/keyboards/orthodox/keymaps/default/config.h +++ b/keyboards/orthodox/keymaps/default/config.h @@ -19,10 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once /* Use I2C or Serial, not both */ @@ -44,6 +41,3 @@ along with this program. If not, see . SONG(DVORAK_SOUND) \ } #endif - - -#endif diff --git a/keyboards/orthodox/keymaps/default/keymap.c b/keyboards/orthodox/keymaps/default/keymap.c index c7a48d82d0bd..b1c86da6c0a3 100644 --- a/keyboards/orthodox/keymaps/default/keymap.c +++ b/keyboards/orthodox/keymaps/default/keymap.c @@ -38,10 +38,6 @@ enum custom_keycodes { DVORAK }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define LS__SPC MT(MOD_LSFT, KC_SPC) #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index eed1cbe89fb4..4719c22696c2 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -23,8 +23,8 @@ along with this program. If not, see . /* Use I2C or Serial, not both */ -#define USE_SERIAL -#undef USE_I2C +// #define USE_SERIAL +#define USE_I2C /* Select hand configuration */ @@ -33,41 +33,42 @@ along with this program. If not, see . #define EE_HANDS /* key combination for magic key command */ +#undef IS_COMMAND #define IS_COMMAND() ( \ get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \ ) #ifdef RGBLIGHT_ENABLE -#define RGB_DI_PIN D3 -#define RGBLED_NUM 16 // Number of LEDs - -#define RGBLIGHT_HUE_STEP 12 -#define RGBLIGHT_SAT_STEP 12 -#define RGBLIGHT_VAL_STEP 12 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +# define RGB_DI_PIN D3 +# define RGBLED_NUM 16 // Number of LEDs +# define RGBLED_SPLIT { 8, 8 } + +# define RGBLIGHT_HUE_STEP 12 +# define RGBLIGHT_SAT_STEP 12 +# define RGBLIGHT_VAL_STEP 12 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 #endif // RGBLIGHT_ENABLE #ifdef AUDIO_ENABLE -#define C6_AUDIO -#ifdef RGBLIGHT_ENABLE -#define NO_MUSIC_MODE -#endif +# define C6_AUDIO +# ifdef RGBLIGHT_ENABLE +# define NO_MUSIC_MODE +# endif #endif //AUDIO_ENABLE #undef PRODUCT #ifdef KEYBOARD_orthodox_rev1 -#define PRODUCT Drashna Hacked Orthodox Rev.1 +# define PRODUCT Drashna Hacked Orthodox Rev.1 #elif KEYBOARD_orthodox_rev3 -#define PRODUCT Drashna Hacked Orthodox Rev.3 +# define PRODUCT Drashna Hacked Orthodox Rev.3 #endif #define QMK_ESC_OUTPUT D7 // usually COL #ifdef KEYBOARD_orthodox_rev1 -#define QMK_ESC_INPUT D4 // usually ROW +# define QMK_ESC_INPUT D4 // usually ROW #else -#define QMK_ESC_INPUT D2 // usually ROW +# define QMK_ESC_INPUT D2 // usually ROW #endif #define QMK_LED B0 #define QMK_SPEAKER C6 diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index 9373d851dcf8..bde959f5e745 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -38,8 +38,8 @@ uint8_t last_osm; ) \ LAYOUT_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ - KC_TAB, K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, OS_RGUI, K16, K17, K18, K19, K1A, KC_QUOT, \ - KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, CTL_T(K2A), KC_MRSF \ + KC_TAB, K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, KC_QUOT, \ + KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF \ ) #define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__) @@ -47,61 +47,87 @@ uint8_t last_osm; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = LAYOUT_orthodox_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ -), - -[_COLEMAK] = LAYOUT_orthodox_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ -), - -[_DVORAK] = LAYOUT_orthodox_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ -), - -[_WORKMAN] = LAYOUT_orthodox_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ -), - -[_MODS] = LAYOUT_wrapper(\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -[_LOWER] = LAYOUT_wrapper(\ - KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, - KC_F11, _________________LOWER_L2__________________, _______, _______, _______, _______, _________________LOWER_R2__________________, KC_PIPE, - KC_F12, _________________LOWER_L3__________________, _______, _______, _______, _______, _______, _______, _________________LOWER_R3__________________, _______ -), - -[_RAISE] = LAYOUT_wrapper(\ - KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, - _______, _________________RAISE_L2__________________, _______, _______, _______, _______, _________________RAISE_R2__________________, KC_BSLS, - _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________, _______ -), - -[_ADJUST] = LAYOUT_wrapper(\ - KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, - VRSN, _________________ADJUST_L2_________________, _______, _______, _______, KC_NUKE, _________________ADJUST_R2_________________, EEP_RST, - TG_MODS, _________________ADJUST_L3_________________, _______, _______, _______, _______, _______, _______, _________________ADJUST_R3_________________, KC_MPLY -) + [_QWERTY] = LAYOUT_orthodox_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_orthodox_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_orthodox_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_orthodox_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_orthodox_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_orthodox_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_orthodox_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_orthodox_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + + + [_MODS] = LAYOUT_wrapper(\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_wrapper(\ + KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, + KC_F11, _________________LOWER_L2__________________, _______, _______, _______, _______, _________________LOWER_R2__________________, KC_PIPE, + KC_F12, _________________LOWER_L3__________________, _______, _______, _______, _______, _______, _______, _________________LOWER_R3__________________, _______ + ), + + [_RAISE] = LAYOUT_wrapper(\ + KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, + _______, _________________RAISE_L2__________________, _______, _______, _______, _______, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________, _______ + ), + + [_ADJUST] = LAYOUT_wrapper(\ + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + VRSN, _________________ADJUST_L2_________________, _______, _______, _______, KC_NUKE, _________________ADJUST_R2_________________, EEP_RST, + TG_MODS, _________________ADJUST_L3_________________, _______, _______, _______, _______, _______, _______, _________________ADJUST_R3_________________, KC_MPLY + ) + }; void matrix_init_keymap(void) { - #ifndef CONVERT_TO_PROTON_C +#ifndef CONVERT_TO_PROTON_C setPinOutput(D5); writePinHigh(D5); setPinOutput(B0); writePinHigh(B0); - #endif +#endif } diff --git a/keyboards/orthodox/keymaps/drashna/rules.mk b/keyboards/orthodox/keymaps/drashna/rules.mk index f870c3a7d654..a122b9e0f15e 100644 --- a/keyboards/orthodox/keymaps/drashna/rules.mk +++ b/keyboards/orthodox/keymaps/drashna/rules.mk @@ -5,11 +5,14 @@ CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration TAP_DANCE_ENABLE = no RGBLIGHT_ENABLE = yes -AUDIO_ENABLE = yes +AUDIO_ENABLE = no NKRO_ENABLE = yes +SPACE_CADET_ENABLE = no INDICATOR_LIGHTS = yes MACROS_ENABLED = no -RGBLIGHT_TWINKLE = yes +RGBLIGHT_TWINKLE = no +RGBLIGHT_STARTUP_ANIMATION = yes + BOOTLOADER = qmk-dfu diff --git a/keyboards/orthodox/keymaps/oscillope/keymap.c b/keyboards/orthodox/keymaps/oscillope/keymap.c index ad07b3ed431c..1f4aefca9023 100644 --- a/keyboards/orthodox/keymaps/oscillope/keymap.c +++ b/keyboards/orthodox/keymaps/oscillope/keymap.c @@ -42,10 +42,6 @@ enum custom_keycodes { CC_CBR, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define NAV_TAP LT(_NAV, KC_SPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/orthodox/keymaps/rfvizarra/keymap.c b/keyboards/orthodox/keymaps/rfvizarra/keymap.c index 55f0fa016bf4..4de7e39509fc 100644 --- a/keyboards/orthodox/keymaps/rfvizarra/keymap.c +++ b/keyboards/orthodox/keymaps/rfvizarra/keymap.c @@ -43,10 +43,6 @@ enum custom_keycodes { DVORAK }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( \ diff --git a/keyboards/orthodox/keymaps/xyverz/keymap.c b/keyboards/orthodox/keymaps/xyverz/keymap.c index 2b6551e199ca..df66e0fc5583 100644 --- a/keyboards/orthodox/keymaps/xyverz/keymap.c +++ b/keyboards/orthodox/keymaps/xyverz/keymap.c @@ -45,10 +45,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = LAYOUT ( \ diff --git a/keyboards/orthodox/orthodox.h b/keyboards/orthodox/orthodox.h index 51c524552789..6f8dad60acb0 100644 --- a/keyboards/orthodox/orthodox.h +++ b/keyboards/orthodox/orthodox.h @@ -1,5 +1,6 @@ -#ifndef ORTHODOX_H -#define ORTHODOX_H +#pragma once + +#include "quantum.h" #ifdef KEYBOARD_orthodox_rev1 #include "rev1.h" @@ -25,7 +26,3 @@ { KC_##LR18, KC_##LR17, KC_##LR16, KC_##LR15, KC_##LR14, KC_##LR13, KC_##LR12, KC_NO, KC_##LR10 }, \ { KC_##LR28, KC_##LR27, KC_##LR26, KC_##LR25, KC_##LR24, KC_##LR23, KC_##LR22, KC_##LR21, KC_##LR20 } \ } - -#include "quantum.h" - -#endif diff --git a/keyboards/orthodox/rev1/config.h b/keyboards/orthodox/rev1/config.h index f7497c09c5c7..198fff5aca29 100644 --- a/keyboards/orthodox/rev1/config.h +++ b/keyboards/orthodox/rev1/config.h @@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "config_common.h" @@ -49,6 +48,8 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define SOFT_SERIAL_PIN D0 + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -89,5 +90,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/orthodox/rev1/info.json b/keyboards/orthodox/rev1/info.json index 0a8442cf4b13..83180aa15e56 100644 --- a/keyboards/orthodox/rev1/info.json +++ b/keyboards/orthodox/rev1/info.json @@ -1,8 +1,8 @@ { "keyboard_name": "Monkeebs Orthodox Rev.1", "maintainer": "drashna", - "width": 17, - "height": 17.24, + "width": 19, + "height": 5, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/orthodox/rev1/rev1.h b/keyboards/orthodox/rev1/rev1.h index e73263fb6870..783dfb34b95f 100644 --- a/keyboards/orthodox/rev1/rev1.h +++ b/keyboards/orthodox/rev1/rev1.h @@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_H -#define REV1_H +#pragma once #include "orthodox.h" @@ -42,7 +41,3 @@ along with this program. If not, see . { R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \ { R28, R27, R26, R25, R24, R23, R22, R21, R20 } \ } - -#endif - - diff --git a/keyboards/orthodox/rev3/config.h b/keyboards/orthodox/rev3/config.h index d727ae674b46..53e5b15ae821 100644 --- a/keyboards/orthodox/rev3/config.h +++ b/keyboards/orthodox/rev3/config.h @@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV3_CONFIG_H -#define REV3_CONFIG_H +#pragma once #include "config_common.h" @@ -54,6 +53,8 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define SOFT_SERIAL_PIN D0 + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -95,5 +96,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/orthodox/rev3/info.json b/keyboards/orthodox/rev3/info.json index 289169d72b74..c98c9f232d7d 100644 --- a/keyboards/orthodox/rev3/info.json +++ b/keyboards/orthodox/rev3/info.json @@ -1,8 +1,8 @@ { "keyboard_name": "Monkeebs Orthodox Rev.3", "maintainer": "drashna", - "width": 17, - "height": 17.24, + "width": 19, + "height": 5, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/orthodox/rev3/rev3.h b/keyboards/orthodox/rev3/rev3.h index 2be9b9605cea..783dfb34b95f 100644 --- a/keyboards/orthodox/rev3/rev3.h +++ b/keyboards/orthodox/rev3/rev3.h @@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV3_H -#define REV3_H +#pragma once #include "orthodox.h" @@ -42,6 +41,3 @@ along with this program. If not, see . { R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \ { R28, R27, R26, R25, R24, R23, R22, R21, R20 } \ } - -#endif - diff --git a/keyboards/orthodox/rev3_teensy/config.h b/keyboards/orthodox/rev3_teensy/config.h index 591827fb9738..54cbb823eca4 100644 --- a/keyboards/orthodox/rev3_teensy/config.h +++ b/keyboards/orthodox/rev3_teensy/config.h @@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV3_TEENSY_CONFIG_H -#define REV3_TEENSY_CONFIG_H +#pragma once #include "config_common.h" @@ -46,6 +45,8 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define SOFT_SERIAL_PIN D0 + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -87,5 +88,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/orthodox/rev3_teensy/info.json b/keyboards/orthodox/rev3_teensy/info.json index d578a4134088..5781c08f8e2b 100644 --- a/keyboards/orthodox/rev3_teensy/info.json +++ b/keyboards/orthodox/rev3_teensy/info.json @@ -1,8 +1,8 @@ { "keyboard_name": "Monkeebs Orthodox Rev.3 (Teensy)", "maintainer": "drashna", - "width": 17, - "height": 17.24, + "width": 19, + "height": 5, "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/orthodox/rev3_teensy/rev3_teensy.h b/keyboards/orthodox/rev3_teensy/rev3_teensy.h index 0081a0df0118..783dfb34b95f 100644 --- a/keyboards/orthodox/rev3_teensy/rev3_teensy.h +++ b/keyboards/orthodox/rev3_teensy/rev3_teensy.h @@ -19,8 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV3_TEENSY_H -#define REV3_TEENSY_H +#pragma once #include "orthodox.h" @@ -42,6 +41,3 @@ along with this program. If not, see . { R18, R17, R16, R15, R14, R13, R12, KC_NO, R10 }, \ { R28, R27, R26, R25, R24, R23, R22, R21, R20 } \ } - -#endif - diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk index 715f25c3a005..61878ea83c3f 100644 --- a/keyboards/orthodox/rules.mk +++ b/keyboards/orthodox/rules.mk @@ -1,8 +1,3 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c - # MCU name MCU = atmega32u4 @@ -40,7 +35,7 @@ F_USB = $(F_CPU) # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. # Interrupt driven control endpoint task(+60) @@ -61,12 +56,10 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = yes -USE_I2C = yes +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = yes +SPLIT_KEYBOARD = yes DEFAULT_FOLDER = orthodox/rev3 diff --git a/keyboards/orthodox/serial.c b/keyboards/orthodox/serial.c deleted file mode 100644 index fea57b651018..000000000000 --- a/keyboards/orthodox/serial.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include "serial.h" - -#ifndef USE_I2C - -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 - -matrix_row_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -matrix_row_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define ROW_MASK (((matrix_row_t)0-1)>>(8*sizeof(matrix_row_t)-MATRIX_COLS)) - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -matrix_row_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -} - -// Used by the master to synchronize timing with the slave. -static -void sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static -void sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static -matrix_row_t serial_read_byte(void) { - matrix_row_t byte = 0; - serial_input(); - for ( uint8_t i = 0; i < MATRIX_COLS; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - _delay_us(1); - } - - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(matrix_row_t data) { - matrix_row_t b = MATRIX_COLS; - serial_output(); - while( b-- ) { - if(data & (1UL << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); - - matrix_row_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); - sync_send(); - checksum += ROW_MASK & serial_slave_buffer[i]; - } - serial_write_byte(checksum); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); - - matrix_row_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_master_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += ROW_MASK & serial_master_buffer[i]; - } - matrix_row_t checksum_received = serial_read_byte(); - sync_send(); - - serial_input(); // end transaction - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(1); - - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - sei(); - return 1; - } - - // if the slave is present syncronize with it - sync_recv(); - - matrix_row_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_slave_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += ROW_MASK & serial_slave_buffer[i]; - } - matrix_row_t checksum_received = serial_read_byte(); - sync_recv(); - - if (checksum_computed != checksum_received) { - sei(); - return 1; - } - - matrix_row_t checksum = 0; - // send data to the slave - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_master_buffer[i]); - sync_recv(); - checksum += ROW_MASK & serial_master_buffer[i]; - } - serial_write_byte(checksum); - sync_recv(); - - // always, release the line when not in use - serial_output(); - serial_high(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/orthodox/serial.h b/keyboards/orthodox/serial.h deleted file mode 100644 index a46a98c94724..000000000000 --- a/keyboards/orthodox/serial.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H - -#include "config.h" -#include -#include "matrix.h" - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD0) -#define SERIAL_PIN_INTERRUPT INT0_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 - -// Buffers for master - slave communication -extern volatile matrix_row_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile matrix_row_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/orthodox/split_util.h b/keyboards/orthodox/split_util.h deleted file mode 100644 index a0a8dd3bf438..000000000000 --- a/keyboards/orthodox/split_util.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H - -#include -#include "eeconfig.h" - - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); -void keyboard_slave_loop(void); - -void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/panc60/config.h b/keyboards/panc60/config.h index 00bdbc60f1b9..edb25ad27434 100644 --- a/keyboards/panc60/config.h +++ b/keyboards/panc60/config.h @@ -39,5 +39,3 @@ along with this program. If not, see . #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS - -#define NO_UART 1 diff --git a/keyboards/panc60/i2c.c b/keyboards/panc60/i2c.c deleted file mode 100644 index e8c4455ad1b4..000000000000 --- a/keyboards/panc60/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/panc60/matrix.c b/keyboards/panc60/matrix.c deleted file mode 100644 index cf0f63837b9e..000000000000 --- a/keyboards/panc60/matrix.c +++ /dev/null @@ -1,145 +0,0 @@ -/* -Copyright 2018 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 . -*/ - -#include -#include -#include -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { } - -__attribute__ ((weak)) -void matrix_scan_user(void) { } - -// #define MATRIX_ROW_PINS { B3, B4, B5, B6, B7 } -// #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - - // disables JTAG so we can use them as columns - MCUCSR = (1< #include "action_layer.h" -#include "i2c.h" +#include "i2c_master.h" #include "quantum.h" __attribute__ ((weak)) @@ -44,7 +44,7 @@ void rgblight_set(void) { } i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); } #endif diff --git a/keyboards/panc60/panc60.h b/keyboards/panc60/panc60.h index 95dcb1f90be4..ee4569c615c3 100644 --- a/keyboards/panc60/panc60.h +++ b/keyboards/panc60/panc60.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef PANC60_H -#define PANC60_H +#pragma once #include "quantum.h" @@ -67,5 +66,3 @@ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \ { KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, K4A, KC_NO, K4C, KC_NO, KC_NO } \ } - -#endif diff --git a/keyboards/panc60/readme.md b/keyboards/panc60/readme.md index 05ac3d72beec..3312a07ce738 100644 --- a/keyboards/panc60/readme.md +++ b/keyboards/panc60/readme.md @@ -14,6 +14,8 @@ Make example for this keyboard (after setting up your build environment): Flashing +**Reset Key:** Hold down the key located at `K40`, commonly programmed as left control while plugging in the keyboard. + ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. To put the panc60 into reset, hold left control while plugging in. @@ -36,9 +38,9 @@ macOS: ``` 3. Install the following packages: ``` - brew install python - brew install pyusb - brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb 4. Place your keyboard into reset. 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. diff --git a/keyboards/panc60/rules.mk b/keyboards/panc60/rules.mk index 588562a95b40..5531807f1853 100644 --- a/keyboards/panc60/rules.mk +++ b/keyboards/panc60/rules.mk @@ -31,7 +31,7 @@ F_CPU = 12000000 BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = yes +BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes @@ -43,8 +43,7 @@ RGBLIGHT_CUSTOM_DRIVER = yes OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = i2c_master.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/panc60/usbconfig.h b/keyboards/panc60/usbconfig.h index d2d848fcdc8f..54a7d20f1427 100644 --- a/keyboards/panc60/usbconfig.h +++ b/keyboards/panc60/usbconfig.h @@ -8,8 +8,7 @@ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ */ -#ifndef __usbconfig_h_included__ -#define __usbconfig_h_included__ +#pragma once #include "config.h" @@ -392,5 +391,3 @@ section at the end of this file). /* #define USB_INTR_PENDING EIFR */ #define USB_INTR_PENDING_BIT INTF1 #define USB_INTR_VECTOR INT1_vect - -#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/pearl/README.md b/keyboards/pearl/README.md deleted file mode 100644 index ec54ba80f50d..000000000000 --- a/keyboards/pearl/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Pearl 40% - -Pearl 40% is a keyboard designed by Koobaczech. It uses an Atmel -ATMEGA32A MCU. - -## Compiling and flashing - -These instructions are for building and flashing your Pearl 40% without -Bootmapper Client. - -### Requirements - -#### Windows - -(to be written, help needed) - -#### Mac - -Apart from regular QMK and AVR dependencies you need to install -`bootloadHID`. You can install it with `homebrew` as follows: - - $ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb - -If you don't use `homebrew` you can try following the compiling -instructions defined below in the Linux section. - -#### Linux - -For Linux you require all regular QMK dependencies, but make sure you're -using `gcc-avr` version 4.9 or higher. 4.8 and lower do not contain the -proper definitions for ATMEGA32A MCUs and QMK will fail while attempting -to compile a HEX for Pearl 40%. - -E.g. you cannot compile Pearl 40% HEX on a regular Ubuntu 14.04 as -`gcc-avr` version is maxed to 4.8 on it. - -Additionally you need an operational `bootloadHID` binary. - -You can install `bootloadHID` by taking the following steps: - - $ git clone https://github.com/robertgzr/bootloadHID ~/tmp/bootloadHIDsrc - $ cd ~/tmp/bootloadHIDsrc/commandline - $ make VENDORID=0x16c0 PRODUCTID=0x05DF # vid and pid for atmega32a - $ chmod +x bootloadHID && cp bootloadHID /usr/bin/bootloadHID - -Running `which bootloadHID` should return `/usr/bin/bootloadHID`. - -### Compiling - -Enter the QMK root directory and compile a keymap with the following -command: - - $ make pearl: - -where `` is a layout directory under the `pearl` directory. - -QMK should compile a HEX (called `pearl_.hex`) for you, which -you can flash using `bootloadHID`. - -### Flashing - -To enable Pearl 40% bootloading mode, unplug the keyboard, then plug it -in while holding `Esc` at the same time (the top-leftmost switch on the -PCB, next to the USB connector). Once the board is in bootload mode, -issue the following command (you might require `sudo` to perform the -command): - - # assuming we're still in the QMK root dir where you compiled a HEX into - $ bootloadHID -r ./pearl_.hex - -You should see something similar to - - > Page size = - > Device size = ; remaining - > Uploading bytes starting at 0 (0x0) - > ... - -where `` should be slowly increasing as the HEX is being -flashed to the board. If there is some warning about `resource busy` it -should still work OK. - -Once done the board underglow should turn red and the new firmware has -been flashed. If you can't type on the board try plugging it in again -(without holding any keys to prevent accidentally setting it into -bootload mode again). diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h index 6edf170d97b1..00850b8f09d6 100644 --- a/keyboards/pearl/config.h +++ b/keyboards/pearl/config.h @@ -35,8 +35,8 @@ along with this program. If not, see . #define MATRIX_ROWS 4 #define MATRIX_COLS 13 -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6} +#define MATRIX_ROW_PINS { B0, B1, B2, B3 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3} #define UNUSED_PINS #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/pearl/i2c.c b/keyboards/pearl/i2c.c deleted file mode 100644 index a4f95213524f..000000000000 --- a/keyboards/pearl/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/pearl/matrix.c b/keyboards/pearl/matrix.c deleted file mode 100644 index 57aa36b5ff74..000000000000 --- a/keyboards/pearl/matrix.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -uint8_t matrix_scan(void) { - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - matrix_set_row_status(row); - _delay_us(5); - - matrix_row_t cols = ( - // cols 0..7, PORTA 0 -> 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_user(); - - return 1; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/pearl/pearl.c b/keyboards/pearl/pearl.c index 3bbadb0a7fc9..c8cd8a8609c3 100644 --- a/keyboards/pearl/pearl.c +++ b/keyboards/pearl/pearl.c @@ -15,16 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "pearl.h" #include "rgblight.h" -#include "backlight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" +#include "i2c_master.h" #include "quantum.h" +#ifdef RGBLIGHT_ENABLE extern rgblight_config_t rgblight_config; void rgblight_set(void) { @@ -37,23 +32,59 @@ void rgblight_set(void) { } i2c_init(); - i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); } +#endif -void backlight_init_ports(void) { - DDRD |= (1<<4); - PORTD &= ~(1<<4); +void matrix_init_kb(void) { +#ifdef RGBLIGHT_ENABLE + if (rgblight_config.enable) { + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + } +#endif + // call user level keymaps, if any + matrix_init_user(); } -void backlight_set(uint8_t level) { - if (level > 0) { - PORTD |= (1<<4); - } else { - PORTD &= ~(1<<4); - } +void matrix_scan_kb(void) { +#ifdef RGBLIGHT_ENABLE + rgblight_task(); +#endif + matrix_scan_user(); + /* Nothing else for now. */ } __attribute__ ((weak)) void matrix_scan_user(void) { - rgblight_task(); } + +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} + +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } +} \ No newline at end of file diff --git a/keyboards/pearl/pearl.h b/keyboards/pearl/pearl.h index 6f5fbce5dbf0..72df1595def0 100644 --- a/keyboards/pearl/pearl.h +++ b/keyboards/pearl/pearl.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef PEARL_H -#define PEARL_H +#pragma once #include "quantum.h" #include "pearl.h" @@ -56,6 +55,3 @@ along with this program. If not, see . { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO}, \ { K30, K31, KC_NO, KC_NO, KC_NO, K35, KC_NO, KC_NO, KC_NO, K39, K3A, KC_NO, KC_NO}, \ } - - -#endif diff --git a/keyboards/pearl/readme.md b/keyboards/pearl/readme.md new file mode 100644 index 000000000000..c39d86cf3d07 --- /dev/null +++ b/keyboards/pearl/readme.md @@ -0,0 +1,47 @@ +# Pearl 40% + +Pearl 40% is a keyboard designed by Koobaczech. It uses an Atmel +ATMEGA32A MCU. + +Keyboard Maintainer: [Ethan Madden](https://github.com/jetpacktuxedo) +Hardware Supported: Pearl +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=92259.0) + +Make example for this keyboard (after setting up your build environment): + + make pearl:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +**Reset Key:** Hold down the key located at `K00`. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + +**Please Note:** You will need to use the `EEP_RST` keycode first, followed by unplugging/replugging the board to get RGB underglow effects to work. + +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). diff --git a/keyboards/pearl/rules.mk b/keyboards/pearl/rules.mk index fac85172ecc0..4db92d1219c5 100644 --- a/keyboards/pearl/rules.mk +++ b/keyboards/pearl/rules.mk @@ -31,7 +31,7 @@ F_CPU = 12000000 BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes @@ -43,8 +43,7 @@ RGBLIGHT_CUSTOM_DRIVER = yes OPT_DEFS = -DDEBUG_LEVEL=0 # custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = i2c_master.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/pearl/usbconfig.h b/keyboards/pearl/usbconfig.h index d2d848fcdc8f..54a7d20f1427 100644 --- a/keyboards/pearl/usbconfig.h +++ b/keyboards/pearl/usbconfig.h @@ -8,8 +8,7 @@ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ */ -#ifndef __usbconfig_h_included__ -#define __usbconfig_h_included__ +#pragma once #include "config.h" @@ -392,5 +391,3 @@ section at the end of this file). /* #define USB_INTR_PENDING EIFR */ #define USB_INTR_PENDING_BIT INTF1 #define USB_INTR_VECTOR INT1_vect - -#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c new file mode 100644 index 000000000000..19adfb933e52 --- /dev/null +++ b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.c @@ -0,0 +1,101 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.h b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.h new file mode 100644 index 000000000000..ee9d31e04ade --- /dev/null +++ b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.h @@ -0,0 +1,896 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +#ifndef _BOARD_H +#define _BOARD_H + +/* + * Setup for STMicroelectronics STM32 Nucleo32-F042K6 board. + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F042X6 +#define BOARD_NAME "Generic STM32F042 PCB" + +/* + * Board oscillators-related settings. + * NOTE: LSE not fitted. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 0U +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +/* + * MCU type as defined in the ST header. + */ +#define STM32F042x6 + +/* + * IO pins assignments. + */ +#define GPIOA_PIN0 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_PIN11 11U +#define GPIOA_PIN12 12U +#define GPIOA_PIN13 13U +#define GPIOA_PIN14 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_PIN13 13U +#define GPIOB_PIN14 14U +#define GPIOB_PIN15 15U + +#define GPIOC_PIN0 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_PIN6 6U +#define GPIOC_PIN7 7U +#define GPIOC_PIN8 8U +#define GPIOC_PIN9 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_PIN14 14U +#define GPIOC_PIN15 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_PIN0 0U +#define GPIOF_PIN1 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ + +#define LINE_BOOT0 PAL_LINE(GPIOB, 8U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - COL5 + * PA1 - COL4 + * PA2 - COL3 + * PA3 - COL2 + * PA4 - COL1 + * PA5 - COL0 + * PA6 - ROW4 + * PA7 - ROW3 + * PA8 - NC + * PA9 - ROW1 + * PA10 - ROW0 + * PA11 - USB_DM + * PA12 - USB_DP + * PA13 - COL15/SWDIO (for now, COL15) + * PA14 - COL14/SWCLK (for now, COL14) + * PA15 - COL13 + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_PIN11) | \ + PIN_MODE_INPUT(GPIOA_PIN12) | \ + PIN_MODE_INPUT(GPIOA_PIN13) | \ + PIN_MODE_INPUT(GPIOA_PIN14) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_HIGH(GPIOA_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_PULLUP(GPIOA_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_PIN11) | \ + PIN_PUPDR_FLOATING(GPIOA_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_PIN0) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_PIN11) | \ + PIN_ODR_HIGH(GPIOA_PIN12) | \ + PIN_ODR_HIGH(GPIOA_PIN13) | \ + PIN_ODR_HIGH(GPIOA_PIN14) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - ROW2 + * PB1 - RGB_D + * PB2 - PIN2 (input pullup). + * PB3 - COL12 + * PB4 - COL11 + * PB5 - COL10 + * PB6 - COL9 + * PB7 - COL8 + * PB8 - BOOT0 (set as output for STM32F042) + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - PIN13 (input pullup). + * PB14 - PIN14 (input pullup). + * PB15 - PIN15 (input pullup). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_OUTPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_OUTPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_INPUT(GPIOB_PIN13) | \ + PIN_MODE_INPUT(GPIOB_PIN14) | \ + PIN_MODE_INPUT(GPIOB_PIN15)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_HIGH(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_HIGH(GPIOB_PIN9) | \ + PIN_OSPEED_HIGH(GPIOB_PIN10) | \ + PIN_OSPEED_HIGH(GPIOB_PIN11) | \ + PIN_OSPEED_HIGH(GPIOB_PIN12) | \ + PIN_OSPEED_HIGH(GPIOB_PIN13) | \ + PIN_OSPEED_HIGH(GPIOB_PIN14) | \ + PIN_OSPEED_HIGH(GPIOB_PIN15)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_FLOATING(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLDOWN(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN15)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_PIN13) | \ + PIN_ODR_HIGH(GPIOB_PIN14) | \ + PIN_ODR_HIGH(GPIOB_PIN15)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN15, 0U)) + +/* + * GPIOC setup: + * + * PC0 - PIN0 (input pullup). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - PIN6 (input pullup). + * PC7 - PIN7 (input pullup). + * PC8 - PIN8 (input pullup). + * PC9 - PIN9 (input pullup). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - PIN14 (input pullup). + * PC15 - PIN15 (input pullup). + */ +#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_INPUT(GPIOC_PIN6) | \ + PIN_MODE_INPUT(GPIOC_PIN7) | \ + PIN_MODE_INPUT(GPIOC_PIN8) | \ + PIN_MODE_INPUT(GPIOC_PIN9) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_PIN14) | \ + PIN_MODE_INPUT(GPIOC_PIN15)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_PIN0) | \ + PIN_OSPEED_HIGH(GPIOC_PIN1) | \ + PIN_OSPEED_HIGH(GPIOC_PIN2) | \ + PIN_OSPEED_HIGH(GPIOC_PIN3) | \ + PIN_OSPEED_HIGH(GPIOC_PIN4) | \ + PIN_OSPEED_HIGH(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_PIN6) | \ + PIN_OSPEED_HIGH(GPIOC_PIN7) | \ + PIN_OSPEED_HIGH(GPIOC_PIN8) | \ + PIN_OSPEED_HIGH(GPIOC_PIN9) | \ + PIN_OSPEED_HIGH(GPIOC_PIN10) | \ + PIN_OSPEED_HIGH(GPIOC_PIN11) | \ + PIN_OSPEED_HIGH(GPIOC_PIN12) | \ + PIN_OSPEED_HIGH(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_PIN14) | \ + PIN_OSPEED_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN15)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_HIGH(GPIOC_PIN6) | \ + PIN_ODR_HIGH(GPIOC_PIN7) | \ + PIN_ODR_HIGH(GPIOC_PIN8) | \ + PIN_ODR_HIGH(GPIOC_PIN9) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_PIN14) | \ + PIN_ODR_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN7, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN15, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_HIGH(GPIOD_PIN0) | \ + PIN_OSPEED_HIGH(GPIOD_PIN1) | \ + PIN_OSPEED_HIGH(GPIOD_PIN2) | \ + PIN_OSPEED_HIGH(GPIOD_PIN3) | \ + PIN_OSPEED_HIGH(GPIOD_PIN4) | \ + PIN_OSPEED_HIGH(GPIOD_PIN5) | \ + PIN_OSPEED_HIGH(GPIOD_PIN6) | \ + PIN_OSPEED_HIGH(GPIOD_PIN7) | \ + PIN_OSPEED_HIGH(GPIOD_PIN8) | \ + PIN_OSPEED_HIGH(GPIOD_PIN9) | \ + PIN_OSPEED_HIGH(GPIOD_PIN10) | \ + PIN_OSPEED_HIGH(GPIOD_PIN11) | \ + PIN_OSPEED_HIGH(GPIOD_PIN12) | \ + PIN_OSPEED_HIGH(GPIOD_PIN13) | \ + PIN_OSPEED_HIGH(GPIOD_PIN14) | \ + PIN_OSPEED_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_HIGH(GPIOE_PIN0) | \ + PIN_OSPEED_HIGH(GPIOE_PIN1) | \ + PIN_OSPEED_HIGH(GPIOE_PIN2) | \ + PIN_OSPEED_HIGH(GPIOE_PIN3) | \ + PIN_OSPEED_HIGH(GPIOE_PIN4) | \ + PIN_OSPEED_HIGH(GPIOE_PIN5) | \ + PIN_OSPEED_HIGH(GPIOE_PIN6) | \ + PIN_OSPEED_HIGH(GPIOE_PIN7) | \ + PIN_OSPEED_HIGH(GPIOE_PIN8) | \ + PIN_OSPEED_HIGH(GPIOE_PIN9) | \ + PIN_OSPEED_HIGH(GPIOE_PIN10) | \ + PIN_OSPEED_HIGH(GPIOE_PIN11) | \ + PIN_OSPEED_HIGH(GPIOE_PIN12) | \ + PIN_OSPEED_HIGH(GPIOE_PIN13) | \ + PIN_OSPEED_HIGH(GPIOE_PIN14) | \ + PIN_OSPEED_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - COL7 + * PF1 - COL6 + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_PIN0) | \ + PIN_MODE_INPUT(GPIOF_PIN1) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN1) | \ + PIN_OSPEED_HIGH(GPIOF_PIN2) | \ + PIN_OSPEED_HIGH(GPIOF_PIN3) | \ + PIN_OSPEED_HIGH(GPIOF_PIN4) | \ + PIN_OSPEED_HIGH(GPIOF_PIN5) | \ + PIN_OSPEED_HIGH(GPIOF_PIN6) | \ + PIN_OSPEED_HIGH(GPIOF_PIN7) | \ + PIN_OSPEED_HIGH(GPIOF_PIN8) | \ + PIN_OSPEED_HIGH(GPIOF_PIN9) | \ + PIN_OSPEED_HIGH(GPIOF_PIN10) | \ + PIN_OSPEED_HIGH(GPIOF_PIN11) | \ + PIN_OSPEED_HIGH(GPIOF_PIN12) | \ + PIN_OSPEED_HIGH(GPIOF_PIN13) | \ + PIN_OSPEED_HIGH(GPIOF_PIN14) | \ + PIN_OSPEED_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_PULLUP(GPIOF_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_PIN0) | \ + PIN_ODR_HIGH(GPIOF_PIN1) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* _BOARD_H */ diff --git a/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk new file mode 100644 index 000000000000..bbeb5bbff728 --- /dev/null +++ b/keyboards/peiorisboards/ixora/boards/GENERIC_STM32_F042X6/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F042X6 diff --git a/keyboards/peiorisboards/ixora/bootloader_defs.h b/keyboards/peiorisboards/ixora/bootloader_defs.h new file mode 100644 index 000000000000..4994be9c24c3 --- /dev/null +++ b/keyboards/peiorisboards/ixora/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC400 \ No newline at end of file diff --git a/keyboards/peiorisboards/ixora/chconf.h b/keyboards/peiorisboards/ixora/chconf.h new file mode 100644 index 000000000000..b836a3b99cdd --- /dev/null +++ b/keyboards/peiorisboards/ixora/chconf.h @@ -0,0 +1,521 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ \ No newline at end of file diff --git a/keyboards/peiorisboards/ixora/config.h b/keyboards/peiorisboards/ixora/config.h new file mode 100644 index 000000000000..bf74b13cc1cd --- /dev/null +++ b/keyboards/peiorisboards/ixora/config.h @@ -0,0 +1,24 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0C61 +#define DEVICE_VER 0x00C6 +#define MANUFACTURER PeiorisBoards +#define PRODUCT Ixora Rev1 +#define DESCRIPTION 6key Macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 6 + +#define MATRIX_ROW_PINS { A0 } +#define MATRIX_COL_PINS { B4, A15, B3, A1, B6, B5 } + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 0 diff --git a/keyboards/peiorisboards/ixora/halconf.h b/keyboards/peiorisboards/ixora/halconf.h new file mode 100644 index 000000000000..bc2b66f2e1e1 --- /dev/null +++ b/keyboards/peiorisboards/ixora/halconf.h @@ -0,0 +1,350 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT FALSE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ \ No newline at end of file diff --git a/keyboards/peiorisboards/ixora/info.json b/keyboards/peiorisboards/ixora/info.json new file mode 100644 index 000000000000..a1818632cb83 --- /dev/null +++ b/keyboards/peiorisboards/ixora/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "Ixora", + "url": "", + "maintainer": "Peioris", + "width": 3, + "height": 2, + "layouts": { + "LAYOUT_full": { + "layout": [{"label":"1", "x":0, "y":0}, {"label":"2", "x":1, "y":0}, {"label":"3", "x":2, "y":0}, {"label":"Caps Lock", "x":0, "y":1}, {"label":"Num Lock", "x":1, "y":1}, {"label":"Scroll Lock", "x":2, "y":1}] + }, + "LAYOUT_blocker_right": { + "layout": [{"label":"1", "x":0, "y":0}, {"label":"2", "x":1, "y":0}, {"label":"Caps Lock", "x":0, "y":1}, {"label":"Num Lock", "x":1, "y":1}, {"label":"Scroll Lock", "x":2, "y":1}] + }, + "LAYOUT_blocker_left": { + "layout": [{"label":"2", "x":1, "y":0}, {"label":"3", "x":2, "y":0}, {"label":"Caps Lock", "x":0, "y":1}, {"label":"Num Lock", "x":1, "y":1}, {"label":"Scroll Lock", "x":2, "y":1}] + }, + "LAYOUT_arrows": { + "layout": [{"label":"\u2191", "x":1, "y":0}, {"label":"\u2190", "x":0, "y":1}, {"label":"\u2193", "x":1, "y":1}, {"label":"\u2192", "x":2, "y":1}] + } + } + } diff --git a/keyboards/peiorisboards/ixora/ixora.c b/keyboards/peiorisboards/ixora/ixora.c new file mode 100644 index 000000000000..7996db629f25 --- /dev/null +++ b/keyboards/peiorisboards/ixora/ixora.c @@ -0,0 +1,43 @@ +#include "ixora.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + setPinOutput(A8); + setPinOutput(A9); + setPinOutput(A10); + writePinLow(A8); + writePinLow(A9); + writePinLow(A10); + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(A10); + } else { + writePinLow(A10); + } + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(A9); + } else { + writePinLow(A9); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(A8); + } else { + writePinLow(A8); + } + led_set_user(usb_led); +} diff --git a/keyboards/peiorisboards/ixora/ixora.h b/keyboards/peiorisboards/ixora/ixora.h new file mode 100644 index 000000000000..92cf6586a698 --- /dev/null +++ b/keyboards/peiorisboards/ixora/ixora.h @@ -0,0 +1,40 @@ +#pragma once + +#define XXX KC_NO + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_full( \ + K00, K01, K02, \ + K03, K04, K05 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05 } \ +} + +#define LAYOUT_blocker_right( \ + K00, K01, \ + K03, K04, K05 \ +) \ +{ \ + { K00, K01, XXX, K03, K04, K05 } \ +} + +#define LAYOUT_blocker_left( \ + K01, K02, \ + K03, K04, K05 \ +) \ +{ \ + { XXX, K01, K02, K03, K04, K05 } \ +} + +#define LAYOUT_arrows( \ + K01, \ + K03, K04, K05 \ +) \ +{ \ + { XXX, K01, XXX, K03, K04, K05 } \ +} + diff --git a/keyboards/peiorisboards/ixora/keymaps/default/keymap.c b/keyboards/peiorisboards/ixora/keymaps/default/keymap.c new file mode 100644 index 000000000000..85a64685155e --- /dev/null +++ b/keyboards/peiorisboards/ixora/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2018 Peioris + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-----------------. + * |RESET| 2 | 3 | + * |-----------------| + * |Caps |NmLk |ScLk | + * `-----------------' + */ +[0] = LAYOUT_full( + RESET, KC_2, KC_3, + KC_CAPS, KC_NLCK, KC_SLCK) +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c b/keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c new file mode 100644 index 000000000000..3e08c78015cd --- /dev/null +++ b/keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c @@ -0,0 +1,26 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-----------------. + * |RESET| 2 | 3 | + * |-----------------| + * |Caps |NmLk |ScLk | + * `-----------------' + */ +[0] = LAYOUT_full( + KC_PSCR, KC_MUTE, LGUI(KC_1), + KC_MPRV, KC_MPLY, KC_MNXT) +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/peiorisboards/ixora/mcuconf.h b/keyboards/peiorisboards/ixora/mcuconf.h new file mode 100644 index 000000000000..4643e9f92e8f --- /dev/null +++ b/keyboards/peiorisboards/ixora/mcuconf.h @@ -0,0 +1,168 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ \ No newline at end of file diff --git a/keyboards/peiorisboards/ixora/readme.md b/keyboards/peiorisboards/ixora/readme.md new file mode 100644 index 000000000000..1a011ba9ad8e --- /dev/null +++ b/keyboards/peiorisboards/ixora/readme.md @@ -0,0 +1,22 @@ +Ixora +========= + +[Ixora](https://i.imgur.com/GqDk3XY.png) + + +Ixora is an ARM-powered 6-key macropad with a USB connector, hotswap sockets, and indicator LEDs. + +Keyboard Maintainer: [Peioris](https://github.com/coarse) +Hardware Supported: Ixora PCB +Hardware Availability: [Peioris](https://github.com/coarse) + +Make example for this keyboard (after setting up your build environment): + + make peiorisboards/ixora:default:dfu-util + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +#### Developer's Note + +STM32F042xx chips does not allow jumping to bootloader without BOOT0 being set to high, therefore it is impossible to enter the bootloader from sending a `RESET` keycode nor using bootmagic or bootmagic lite. +The only way to enter bootloader is to hold the BOOT0 button while the keyboard is powering up or after a power reset (done by pressing the reset switch or sending a `RESET` keycode). diff --git a/keyboards/peiorisboards/ixora/rules.mk b/keyboards/peiorisboards/ixora/rules.mk new file mode 100644 index 000000000000..9d89d9663635 --- /dev/null +++ b/keyboards/peiorisboards/ixora/rules.mk @@ -0,0 +1,47 @@ +# project specific files + +## chip/board settings +# - the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F042x6 + +# Startup code to use +# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = GENERIC_STM32_F042X6 + +# Cortex version +MCU = cortex-m0 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +#OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 +OPT_DEFS = + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/keyboards/phantom/keymaps/default/config.h b/keyboards/phantom/keymaps/default/config.h index a3828f7d5d6e..09b8f1bc73a1 100644 --- a/keyboards/phantom/keymaps/default/config.h +++ b/keyboards/phantom/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/phantom/keymaps/default/keymap.c b/keyboards/phantom/keymaps/default/keymap.c index 618822816702..eb5db022d8c9 100644 --- a/keyboards/phantom/keymaps/default/keymap.c +++ b/keyboards/phantom/keymaps/default/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/phantom/keymaps/iso_uk/keymap.c b/keyboards/phantom/keymaps/iso_uk/keymap.c index bcd23a7641e1..43a7e55fb378 100644 --- a/keyboards/phantom/keymaps/iso_uk/keymap.c +++ b/keyboards/phantom/keymaps/iso_uk/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/phantom/keymaps/rgbmod/keymap.c b/keyboards/phantom/keymaps/rgbmod/keymap.c index 372590772f5a..e3a6792394dc 100644 --- a/keyboards/phantom/keymaps/rgbmod/keymap.c +++ b/keyboards/phantom/keymaps/rgbmod/keymap.c @@ -15,9 +15,6 @@ */ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - // 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 diff --git a/keyboards/phantom/keymaps/xyverz/keymap.c b/keyboards/phantom/keymaps/xyverz/keymap.c index ac38e5524317..07a743c164f7 100644 --- a/keyboards/phantom/keymaps/xyverz/keymap.c +++ b/keyboards/phantom/keymaps/xyverz/keymap.c @@ -20,10 +20,6 @@ extern keymap_config_t keymap_config; #define DVORAK M(_DV) #define COLEMAK M(_CM) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT_tkl_ansi( /* Layer 0: Qwerty */ \ diff --git a/keyboards/pinky/3/config.h b/keyboards/pinky/3/config.h index 6de5a35d0e6a..370d2a702dde 100644 --- a/keyboards/pinky/3/config.h +++ b/keyboards/pinky/3/config.h @@ -46,7 +46,7 @@ #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/pinky/4/config.h b/keyboards/pinky/4/config.h index 53c6f91b1a7f..a6beaf29d48e 100644 --- a/keyboards/pinky/4/config.h +++ b/keyboards/pinky/4/config.h @@ -46,7 +46,7 @@ #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* diff --git a/keyboards/plaid/config.h b/keyboards/plaid/config.h new file mode 100644 index 000000000000..efef3ca18b74 --- /dev/null +++ b/keyboards/plaid/config.h @@ -0,0 +1,248 @@ +/* +Copyright 2019 Takuya Urakawa (dm9records.com) + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +/* VID & PID from vusb project, see tmk_core/protocol/vusb/USB-IDs-for-free.txt"*/ +#define VENDOR_ID 0x16c0 +#define PRODUCT_ID 0x27db +#define DEVICE_VER 0x0002 +#define MANUFACTURER dm9records +#define PRODUCT plaid +#define DESCRIPTION 12x4 ortholinear keyboard with through hole components + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B4, B5, B3, D4 } +#define MATRIX_COL_PINS { B0, D7, D6, D5, B2, B1, C0, C1, C2, C3, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define NO_UART 1 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/plaid/info.json b/keyboards/plaid/info.json new file mode 100644 index 000000000000..13bd05c149e4 --- /dev/null +++ b/keyboards/plaid/info.json @@ -0,0 +1,113 @@ +{ + "keyboard_name": "Plaid // Through Hole", + "keyboard_folder": "planid", + "url": "https://github.com/hsgw/plaid", + "maintainer": "hsgw", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_plaid_mit": { + "key_count": 47, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 2, "x": 5, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 } ] + }, + "LAYOUT_plaid_grid": { + "key_count": 48, + "layout": [ + { "w": 1, "x": 0, "y": 0 }, + { "w": 1, "x": 1, "y": 0 }, + { "w": 1, "x": 2, "y": 0 }, + { "w": 1, "x": 3, "y": 0 }, + { "w": 1, "x": 4, "y": 0 }, + { "w": 1, "x": 5, "y": 0 }, + { "w": 1, "x": 6, "y": 0 }, + { "w": 1, "x": 7, "y": 0 }, + { "w": 1, "x": 8, "y": 0 }, + { "w": 1, "x": 9, "y": 0 }, + { "w": 1, "x": 10, "y": 0 }, + { "w": 1, "x": 11, "y": 0 }, + { "w": 1, "x": 0, "y": 1 }, + { "w": 1, "x": 1, "y": 1 }, + { "w": 1, "x": 2, "y": 1 }, + { "w": 1, "x": 3, "y": 1 }, + { "w": 1, "x": 4, "y": 1 }, + { "w": 1, "x": 5, "y": 1 }, + { "w": 1, "x": 6, "y": 1 }, + { "w": 1, "x": 7, "y": 1 }, + { "w": 1, "x": 8, "y": 1 }, + { "w": 1, "x": 9, "y": 1 }, + { "w": 1, "x": 10, "y": 1 }, + { "w": 1, "x": 11, "y": 1 }, + { "w": 1, "x": 0, "y": 2 }, + { "w": 1, "x": 1, "y": 2 }, + { "w": 1, "x": 2, "y": 2 }, + { "w": 1, "x": 3, "y": 2 }, + { "w": 1, "x": 4, "y": 2 }, + { "w": 1, "x": 5, "y": 2 }, + { "w": 1, "x": 6, "y": 2 }, + { "w": 1, "x": 7, "y": 2 }, + { "w": 1, "x": 8, "y": 2 }, + { "w": 1, "x": 9, "y": 2 }, + { "w": 1, "x": 10, "y": 2 }, + { "w": 1, "x": 11, "y": 2 }, + { "w": 1, "x": 0, "y": 3 }, + { "w": 1, "x": 1, "y": 3 }, + { "w": 1, "x": 2, "y": 3 }, + { "w": 1, "x": 3, "y": 3 }, + { "w": 1, "x": 4, "y": 3 }, + { "w": 1, "x": 5, "y": 3 }, + { "w": 1, "x": 6, "y": 3 }, + { "w": 1, "x": 7, "y": 3 }, + { "w": 1, "x": 8, "y": 3 }, + { "w": 1, "x": 9, "y": 3 }, + { "w": 1, "x": 10, "y": 3 }, + { "w": 1, "x": 11, "y": 3 } ] + } + } +} diff --git a/keyboards/plaid/keymaps/default/config.h b/keyboards/plaid/keymaps/default/config.h new file mode 100644 index 000000000000..5733b9e4b046 --- /dev/null +++ b/keyboards/plaid/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/plaid/keymaps/default/keymap.c b/keyboards/plaid/keymaps/default/keymap.c new file mode 100644 index 000000000000..f27abb0aa564 --- /dev/null +++ b/keyboards/plaid/keymaps/default/keymap.c @@ -0,0 +1,222 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum plaid_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum plaid_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_plaid_grid( + 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_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_plaid_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_plaid_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_plaid_grid( + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_plaid_grid( + 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 +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = LAYOUT_plaid_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_plaid_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} diff --git a/keyboards/plaid/keymaps/default/readme.md b/keyboards/plaid/keymaps/default/readme.md new file mode 100644 index 000000000000..6f68e46af4ef --- /dev/null +++ b/keyboards/plaid/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default keymap for plaid +folk from planck diff --git a/keyboards/plaid/plaid.c b/keyboards/plaid/plaid.c new file mode 100644 index 000000000000..28f56d7f93c8 --- /dev/null +++ b/keyboards/plaid/plaid.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * 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 . + */ +#include "plaid.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/plaid/plaid.h b/keyboards/plaid/plaid.h new file mode 100644 index 000000000000..e680c077c2a4 --- /dev/null +++ b/keyboards/plaid/plaid.h @@ -0,0 +1,65 @@ +/* Copyright 2019 Takuya Urakawa (dm9records.com) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_plaid_mit( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_plaid_grid( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} + +// Used to create a keymap using only KC_ prefixed keys +#define KC_KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ + ) \ + LAYOUT_plaid_grid( \ + KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ + KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ + KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ + ) + +#define KEYMAP LAYOUT_plaid_grid +#define LAYOUT_ortho_4x12 LAYOUT_plaid_grid +#define LAYOUT_planck_mit LAYOUT_plaid_mit +#define LAYOUT_kc_ortho_4x12 KC_KEYMAP +#define KC_LAYOUT_ortho_4x12 KC_KEYMAP diff --git a/keyboards/plaid/readme.md b/keyboards/plaid/readme.md new file mode 100644 index 000000000000..dd49ecbdf53c --- /dev/null +++ b/keyboards/plaid/readme.md @@ -0,0 +1,23 @@ +# plaid // Through Hole + +![plaid](https://i.imgur.com/tTi9yR9h.jpg) + +12x4 ortholinear keyboard with only through hole components. + +Keyboard Maintainer: [hsgw](https://github.com/hsgw) +Hardware Supported: ATMEGA328p with vusb [PCB](https://github.com/hsgw/plaid) +Hardware Availability: Group buy in r/mk + +Make example for this keyboard (after setting up your build environment): + make plaid:default + +Flash firmware: + // In bootloader mode + make plaid:default:program + +## Bootloader +use usbasploader in my repository. +https://github.com/hsgw/USBaspLoader/tree/plaid + + +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). diff --git a/keyboards/plaid/rules.mk b/keyboards/plaid/rules.mk new file mode 100644 index 000000000000..507f873ae981 --- /dev/null +++ b/keyboards/plaid/rules.mk @@ -0,0 +1,101 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega328p +PROTOCOL = VUSB + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +# +# This uses usbaspbootloader +# BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 +OPT_DEFS += -DBOOTLOADER_SIZE=2048 + +# Flash program via avrdude, but default command is not suitable. +# You can use plaid:default:program +PROGRAM_CMD = avrdude -c usbasp -p m328p -U flash:w:$(BUILD_DIR)/$(TARGET).hex + + +# disable debug code +OPT_DEFS = -DDEBUG_LEVEL=0 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + + +LAYOUTS = ortho_4x12 planck_mit +LAYOUTS_HAS_RGB = no diff --git a/keyboards/plaid/usbconfig.h b/keyboards/plaid/usbconfig.h new file mode 100644 index 000000000000..ea9fdd8ea6f1 --- /dev/null +++ b/keyboards/plaid/usbconfig.h @@ -0,0 +1,397 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +// max power draw with maxed white underglow measured at 120 mA (peaks) +#define USB_CFG_MAX_BUS_POWER 100 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 0 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x01 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'd','m','9','r','e','c','o','r','d','s' +#define USB_CFG_VENDOR_NAME_LEN 10 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'P', 'l', 'a', 'i', 'd' +#define USB_CFG_DEVICE_NAME_LEN 5 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +#define USB_CFG_SERIAL_NUMBER 'd','m','9','r','e','c','o','r','d','s','.','c','o','m',':','p','1' +#define USB_CFG_SERIAL_NUMBER_LEN 17 +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +// #define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +// /* #define USB_INTR_CFG_CLR 0 */ +// /* #define USB_INTR_ENABLE EIMSK */ +// #define USB_INTR_ENABLE_BIT INT1 +// /* #define USB_INTR_PENDING EIFR */ +// #define USB_INTR_PENDING_BIT INTF1 +// #define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/plain60/config.h b/keyboards/plain60/config.h index 763aeff08239..5dd784887cfc 100644 --- a/keyboards/plain60/config.h +++ b/keyboards/plain60/config.h @@ -17,7 +17,7 @@ along with this program. If not, see . #pragma once -#include QMK_KEYBOARD_CONFIG_H +#include "config_common.h" /* USB Device descriptor parameter */ #define VENDOR_ID 0x4705 diff --git a/keyboards/plain60/info.json b/keyboards/plain60/info.json index dca4b3cdc2e4..91eab457a876 100644 --- a/keyboards/plain60/info.json +++ b/keyboards/plain60/info.json @@ -74,6 +74,341 @@ {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25} ] + }, + "LAYOUT_60_ansi": { + "key_count": 61, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0e", "x":13, "y":0, "w":2}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k1a", "x":10.5, "y":1}, + {"label":"k1b", "x":11.5, "y":1}, + {"label":"k1c", "x":12.5, "y":1}, + {"label":"k1d", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k21", "x":1.75, "y":2}, + {"label":"k22", "x":2.75, "y":2}, + {"label":"k23", "x":3.75, "y":2}, + {"label":"k24", "x":4.75, "y":2}, + {"label":"k25", "x":5.75, "y":2}, + {"label":"k26", "x":6.75, "y":2}, + {"label":"k27", "x":7.75, "y":2}, + {"label":"k28", "x":8.75, "y":2}, + {"label":"k29", "x":9.75, "y":2}, + {"label":"k2a", "x":10.75, "y":2}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2d", "x":12.75, "y":2, "w":2.25}, + {"label":"k30", "x":0, "y":3, "w":2.25}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":2.75}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4, "w":1.25}, + {"label":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k4a", "x":10, "y":4, "w":1.25}, + {"label":"k4b", "x":11.25, "y":4, "w":1.25}, + {"label":"k4c", "x":12.5, "y":4, "w":1.25}, + {"label":"k4d", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_ansi_split_bs_rshift": { + "key_count": 63, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0}, + {"label":"k0e", "x":14, "y":0}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k1a", "x":10.5, "y":1}, + {"label":"k1b", "x":11.5, "y":1}, + {"label":"k1c", "x":12.5, "y":1}, + {"label":"k1d", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k21", "x":1.75, "y":2}, + {"label":"k22", "x":2.75, "y":2}, + {"label":"k23", "x":3.75, "y":2}, + {"label":"k24", "x":4.75, "y":2}, + {"label":"k25", "x":5.75, "y":2}, + {"label":"k26", "x":6.75, "y":2}, + {"label":"k27", "x":7.75, "y":2}, + {"label":"k28", "x":8.75, "y":2}, + {"label":"k29", "x":9.75, "y":2}, + {"label":"k2a", "x":10.75, "y":2}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2d", "x":12.75, "y":2, "w":2.25}, + {"label":"k30", "x":0, "y":3, "w":2.25}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":1.75}, + {"label":"k3d", "x":14, "y":3}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4, "w":1.25}, + {"label":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k4a", "x":10, "y":4, "w":1.25}, + {"label":"k4b", "x":11.25, "y":4, "w":1.25}, + {"label":"k4c", "x":12.5, "y":4, "w":1.25}, + {"label":"k4d", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_hhkb": { + "key_count": 60, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0}, + {"label":"k0e", "x":14, "y":0}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k1a", "x":10.5, "y":1}, + {"label":"k1b", "x":11.5, "y":1}, + {"label":"k1c", "x":12.5, "y":1}, + {"label":"k1d", "x":13.5, "y":1, "w":1.5}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k21", "x":1.75, "y":2}, + {"label":"k22", "x":2.75, "y":2}, + {"label":"k23", "x":3.75, "y":2}, + {"label":"k24", "x":4.75, "y":2}, + {"label":"k25", "x":5.75, "y":2}, + {"label":"k26", "x":6.75, "y":2}, + {"label":"k27", "x":7.75, "y":2}, + {"label":"k28", "x":8.75, "y":2}, + {"label":"k29", "x":9.75, "y":2}, + {"label":"k2a", "x":10.75, "y":2}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2d", "x":12.75, "y":2, "w":2.25}, + {"label":"k30", "x":0, "y":3, "w":2.25}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":1.75}, + {"label":"k3d", "x":14, "y":3}, + {"label":"k41", "x":1.5, "y":4}, + {"label":"k42", "x":2.5, "y":4, "w":1.5}, + {"label":"k46", "x":4, "y":4, "w":7}, + {"label":"k4b", "x":11, "y":4, "w":1.5}, + {"label":"k4c", "x":12.5, "y":4} + ] + }, + "LAYOUT_60_iso": { + "key_count": 62, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0e", "x":13, "y":0, "w":2}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k1a", "x":10.5, "y":1}, + {"label":"k1b", "x":11.5, "y":1}, + {"label":"k1c", "x":12.5, "y":1}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k21", "x":1.75, "y":2}, + {"label":"k22", "x":2.75, "y":2}, + {"label":"k23", "x":3.75, "y":2}, + {"label":"k24", "x":4.75, "y":2}, + {"label":"k25", "x":5.75, "y":2}, + {"label":"k26", "x":6.75, "y":2}, + {"label":"k27", "x":7.75, "y":2}, + {"label":"k28", "x":8.75, "y":2}, + {"label":"k29", "x":9.75, "y":2}, + {"label":"k2a", "x":10.75, "y":2}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2c", "x":12.75, "y":2}, + {"label":"k2d", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"k30", "x":0, "y":3, "w":1.25}, + {"label":"k31", "x":1.25, "y":3}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":2.75}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4, "w":1.25}, + {"label":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k4a", "x":10, "y":4, "w":1.25}, + {"label":"k4b", "x":11.25, "y":4, "w":1.25}, + {"label":"k4c", "x":12.5, "y":4, "w":1.25}, + {"label":"k4d", "x":13.75, "y":4, "w":1.25} + ] + }, + "LAYOUT_60_iso_split_bs_rshift": { + "key_count": 64, + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0}, + {"label":"k0e", "x":14, "y":0}, + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k11", "x":1.5, "y":1}, + {"label":"k12", "x":2.5, "y":1}, + {"label":"k13", "x":3.5, "y":1}, + {"label":"k14", "x":4.5, "y":1}, + {"label":"k15", "x":5.5, "y":1}, + {"label":"k16", "x":6.5, "y":1}, + {"label":"k17", "x":7.5, "y":1}, + {"label":"k18", "x":8.5, "y":1}, + {"label":"k19", "x":9.5, "y":1}, + {"label":"k1a", "x":10.5, "y":1}, + {"label":"k1b", "x":11.5, "y":1}, + {"label":"k1c", "x":12.5, "y":1}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k21", "x":1.75, "y":2}, + {"label":"k22", "x":2.75, "y":2}, + {"label":"k23", "x":3.75, "y":2}, + {"label":"k24", "x":4.75, "y":2}, + {"label":"k25", "x":5.75, "y":2}, + {"label":"k26", "x":6.75, "y":2}, + {"label":"k27", "x":7.75, "y":2}, + {"label":"k28", "x":8.75, "y":2}, + {"label":"k29", "x":9.75, "y":2}, + {"label":"k2a", "x":10.75, "y":2}, + {"label":"k2b", "x":11.75, "y":2}, + {"label":"k2c", "x":12.75, "y":2}, + {"label":"k2d", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"k30", "x":0, "y":3, "w":1.25}, + {"label":"k31", "x":1.25, "y":3}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":1.75}, + {"label":"k3d", "x":14, "y":3}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k42", "x":2.5, "y":4, "w":1.25}, + {"label":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k4a", "x":10, "y":4, "w":1.25}, + {"label":"k4b", "x":11.25, "y":4, "w":1.25}, + {"label":"k4c", "x":12.5, "y":4, "w":1.25}, + {"label":"k4d", "x":13.75, "y":4, "w":1.25} + ] } } } diff --git a/keyboards/plain60/keymaps/RGB/config.h b/keyboards/plain60/keymaps/RGB/config.h new file mode 100644 index 000000000000..5fadcf821a4f --- /dev/null +++ b/keyboards/plain60/keymaps/RGB/config.h @@ -0,0 +1,26 @@ +/* +Copyright 2019 Sebastian Spindler + +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 . +*/ + +#pragma once + +/* RGB Underglow */ +#define RGB_DI_PIN B7 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 30 // Number of LEDs +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/plain60/keymaps/RGB/keymap.c b/keyboards/plain60/keymaps/RGB/keymap.c new file mode 100644 index 000000000000..25370823dfa7 --- /dev/null +++ b/keyboards/plain60/keymaps/RGB/keymap.c @@ -0,0 +1,57 @@ +/* +Copyright 2019 Sebastian Spindler + +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 . +*/ + +#include QMK_KEYBOARD_H + +#include "keymap_extras/keymap_german.h" + +//Layer renaming +#define _DL 0 //default +#define _FUN 1 //function layer +#define _LED 2 //LED configurations + +//Keymapping renaming +#define ______ KC_TRNS //renaming KC_TRNS for readability in keymaps +#define RGB_MI RGB_MODE_FORWARD //increase RGB mode +#define RGB_MD RGB_MODE_REVERSE //decrease RGB mode +#define RGB_ST RGB_M_P //rgb static +#define MONKEY LCTL(LALT(KC_DEL)) //ctrl+alt+del == monkey grip +#define SPECIAL LT(_FUN, DE_CIRC) // + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DL] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, ______, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, ______, \ + SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, \ + KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, MONKEY, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , ______, KC_ALGR, TG(_LED), KC_RCTL ), + + [_FUN] = LAYOUT( + ______, 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_PGUP, KC_UP, KC_PGDN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_HOME, ______, ______, KC_END, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_UP, ______, \ + ______, ______, ______, ______ , ______, KC_LEFT, KC_DOWN, KC_RIGHT ), + + [_LED] = LAYOUT( + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ + ______, RGB_TOG, RGB_MI, RGB_MD, RGB_ST, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______ , ______, ______, TG(_LED), ______ ), +}; diff --git a/keyboards/plain60/keymaps/RGB/rules.mk b/keyboards/plain60/keymaps/RGB/rules.mk new file mode 100644 index 000000000000..793bd869ae97 --- /dev/null +++ b/keyboards/plain60/keymaps/RGB/rules.mk @@ -0,0 +1,23 @@ +#Copyright 2019 Sebastian Spindler + +#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 . + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +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 (+4870) +RAW_ENABLE = no +DYNAMIC_KEYMAP_ENABLE = no diff --git a/keyboards/plain60/plain60.h b/keyboards/plain60/plain60.h index f7b497bab71f..4893e7ad7962 100644 --- a/keyboards/plain60/plain60.h +++ b/keyboards/plain60/plain60.h @@ -20,5 +20,80 @@ {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ } +#define LAYOUT_60_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, XXX, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ +} + +#define LAYOUT_60_hhkb( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k41, k42, k46, k4b, k4c \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, XXX}, \ + {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, XXX}, \ + {XXX, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4b, k4c, XXX, XXX} \ +} + +#define LAYOUT_60_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, XXX, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ +} + +#define LAYOUT_60_iso_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k46, k4a, k4b, k4c, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, XXX, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ +} + void matrix_init_user(void); void matrix_scan_user(void); diff --git a/keyboards/plain60/rules.mk b/keyboards/plain60/rules.mk index a1a0e9ca1c83..da9cb9fbd450 100644 --- a/keyboards/plain60/rules.mk +++ b/keyboards/plain60/rules.mk @@ -64,3 +64,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RAW_ENABLE = yes DYNAMIC_KEYMAP_ENABLE = yes + +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_hhkb 60_iso diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h new file mode 100644 index 000000000000..c449d1719267 --- /dev/null +++ b/keyboards/planck/ez/config.h @@ -0,0 +1,141 @@ +/* + * Copyright 2018 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 . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0000 + +#undef MATRIX_ROWS +#undef MATRIX_COLS +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS + +#define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2 } +#define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 } + +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { B12 } +#define ENCODERS_PAD_B { B13 } + +#define MUSIC_MAP +#undef AUDIO_VOICES +#undef C6_AUDIO + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 6 + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#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 + +// #define WS2812_LED_N 2 +// #define RGBLED_NUM WS2812_LED_N +// #define WS2812_TIM_N 2 +// #define WS2812_TIM_CH 2 +// #define PORT_WS2812 GPIOA +// #define PIN_WS2812 1 +// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) +//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP +//#define WS2812_EXTERNAL_PULLUP + +#define DRIVER_ADDR_1 0b1010000 +#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. + +#define DRIVER_COUNT 1 +#define DRIVER_1_LED_TOTAL 47 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + +#define RGB_MATRIX_KEYPRESSES diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c new file mode 100644 index 000000000000..3ad694c4a326 --- /dev/null +++ b/keyboards/planck/ez/ez.c @@ -0,0 +1,139 @@ +/* Copyright 2018 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 . + */ +#include "ez.h" + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, B_12, A_12, C_12}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + +}; + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5 }, + { 12, 13, 14, 15, 16, 17 }, + { 24, 25, 26, 27, 28, 29 }, + { 36, 37, 38, 45, 46, NO_LED }, + { 6, 7, 8, 9, 10, 11 }, + { 18, 19, 20, 21, 22, 23 }, + { 30, 31, 32, 33, 34, 35 }, + { 42, 43, 44, 39, 40, 41 } +}, { + { 0, 0 }, { 20, 0 }, { 40, 0 }, { 61, 0 }, { 81, 0 }, { 101, 0 }, { 122, 0 }, { 142, 0 }, { 162, 0 }, { 183, 0 }, { 203, 0 }, { 223, 0 }, + { 0, 21 }, { 20, 21 }, { 40, 21 }, { 61, 21 }, { 81, 21 }, { 101, 21 }, { 122, 21 }, { 142, 21 }, { 162, 21 }, { 183, 21 }, { 203, 21 }, { 223, 21 }, + { 0, 42 }, { 20, 42 }, { 40, 42 }, { 61, 42 }, { 81, 42 }, { 101, 42 }, { 122, 42 }, { 142, 42 }, { 162, 42 }, { 183, 42 }, { 203, 42 }, { 223, 42 }, + { 0, 63 }, { 20, 63 }, { 40, 63 }, { 61, 63 }, { 81, 63 }, { 111, 63 }, { 142, 63 }, { 162, 63 }, { 183, 63 }, { 203, 63 }, { 223, 63 } +}, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1 +} }; + + +void matrix_init_kb(void) { + matrix_init_user(); + + palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 9, PAL_MODE_OUTPUT_PUSHPULL); + + palClearPad(GPIOB, 8); + palClearPad(GPIOB, 9); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +uint32_t layer_state_set_kb(uint32_t state) { + + palClearPad(GPIOB, 8); + palClearPad(GPIOB, 9); + state = layer_state_set_user(state); + uint8_t layer = biton32(state); + switch (layer) { + case 3: + palSetPad(GPIOB, 9); + break; + case 4: + palSetPad(GPIOB, 8); + break; + case 6: + palSetPad(GPIOB, 9); + palSetPad(GPIOB, 8); + break; + default: + break; + } + return state; +} diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h new file mode 100644 index 000000000000..a3ca2b6ecebd --- /dev/null +++ b/keyboards/planck/ez/ez.h @@ -0,0 +1,107 @@ +/* Copyright 2018 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 . + */ +#pragma once + +#include "planck.h" + +#define LAYOUT_planck_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k33, k34, k35 } \ +} + +#define LAYOUT_planck_1x2uR( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k33, k34, k35 } \ +} + +#define LAYOUT_planck_1x2uL( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k33, k34, k35 } \ +} + +#define LAYOUT_planck_2x2u( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k33, k34, k35 } \ +} + +#define LAYOUT_planck_grid( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, KC_NO, k36, k37, k38, k39, k3a \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, KC_NO }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k33, k34, k35 } \ +} + +#define KEYMAP LAYOUT_planck_grid +#define LAYOUT_ortho_4x12 LAYOUT_planck_grid +#define KC_LAYOUT_ortho_4x12 KC_KEYMAP diff --git a/keyboards/planck/rules.mk b/keyboards/planck/ez/rules.mk similarity index 56% rename from keyboards/planck/rules.mk rename to keyboards/planck/ez/rules.mk index 609790238419..4aa431fdaa5c 100644 --- a/keyboards/planck/rules.mk +++ b/keyboards/planck/ez/rules.mk @@ -1,22 +1,5 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader -# This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded -# automatically (+60). See bootloader.mk for all options. -ifeq ($(strip $(KEYBOARD)), planck/rev3) - BOOTLOADER = atmel-dfu -endif -ifeq ($(strip $(KEYBOARD)), planck/rev4) - BOOTLOADER = atmel-dfu -endif -ifeq ($(strip $(KEYBOARD)), planck/rev5) - BOOTLOADER = qmk-dfu -endif -ifeq ($(strip $(KEYBOARD)), planck/light) - BOOTLOADER = atmel-dfu -endif +# Cortex version +MCU = STM32F303 # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT @@ -25,11 +8,12 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration +COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # 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 MIDI_ENABLE = no # MIDI controls @@ -41,8 +25,12 @@ API_SYSEX_ENABLE = no # 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 = yes # Breathing sleep LED during USB suspend -LAYOUTS = ortho_4x12 planck_mit planck_grid -LAYOUTS_HAS_RGB = no +CUSTOM_MATRIX = no # Custom matrix file +# SERIAL_LINK_ENABLE = yes +ENCODER_ENABLE = yes +RGB_MATRIX_ENABLE = IS31FL3737 -DEFAULT_FOLDER = planck/rev5 +LAYOUTS = ortho_4x12 planck_mit +LAYOUTS_HAS_RGB = no diff --git a/keyboards/planck/keymaps/altgr/keymap.c b/keyboards/planck/keymaps/altgr/keymap.c index c4eacbd47fa9..5f4d1fdfdbe0 100644 --- a/keyboards/planck/keymaps/altgr/keymap.c +++ b/keyboards/planck/keymaps/altgr/keymap.c @@ -188,9 +188,7 @@ enum planck_keycodes { // keycodes #define ___x___ KC_TRNS #define ___fn__ KC_TRNS -#ifdef _______ -#undef _______ -#endif +#undef _______ #define _______ KC_NO #define COPY LCTL(KC_C) diff --git a/keyboards/planck/keymaps/aviator/keymap.c b/keyboards/planck/keymaps/aviator/keymap.c index faece94381ca..ca11be8255ac 100644 --- a/keyboards/planck/keymaps/aviator/keymap.c +++ b/keyboards/planck/keymaps/aviator/keymap.c @@ -26,7 +26,6 @@ BACKLIT }; -#define _______ KC_TRNS #define ___x___ KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/basic/keymap.c b/keyboards/planck/keymaps/basic/keymap.c index cc70aeea3bce..748d9acbe4ce 100644 --- a/keyboards/planck/keymaps/basic/keymap.c +++ b/keyboards/planck/keymaps/basic/keymap.c @@ -6,10 +6,6 @@ // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index e26aff07e729..263c4102df59 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -11,10 +11,6 @@ #include "..\..\..\..\tmk_core\common\keycode.h" */ - -#define _______ KC_TRNS -#define XXXXXXX KC_NO - /* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. My favourite features are the placement of the special characters often used for programming right on the home row diff --git a/keyboards/planck/keymaps/brandon/keymap.c b/keyboards/planck/keymaps/brandon/keymap.c index 2d5e05affc23..47eb338a6e41 100644 --- a/keyboards/planck/keymaps/brandon/keymap.c +++ b/keyboards/planck/keymaps/brandon/keymap.c @@ -20,7 +20,6 @@ enum planck_layers { }; // Key aliases for legibility -#define _______ KC_TRNS #define ___x___ KC_NO // Macros diff --git a/keyboards/planck/keymaps/buhearns/config.h b/keyboards/planck/keymaps/buhearns/config.h new file mode 100644 index 000000000000..b8f3c18430fb --- /dev/null +++ b/keyboards/planck/keymaps/buhearns/config.h @@ -0,0 +1,15 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(MARIO_MUSHROOM) + #define UNICODE_SONG_OSX SONG(COIN_SOUND) + #define UNICODE_SONG_LNX SONG(UNICODE_LINUX) + #define UNICODE_SONG_WIN SONG(UNICODE_WINDOWS) + #define UNICODE_SONG_WINC SONG(UNICODE_WINDOWS) +#endif + +#define ENCODER_RESOLUTION 4 +#define MOUSEKEY_DELAY 300 +#define MOUSEKEY_INTERVAL 50 +#define MOUSEKEY_MAX_SPEED 8 +#define MOUSEKEY_TIME_TO_MAX 20 diff --git a/keyboards/planck/keymaps/buhearns/keymap.c b/keyboards/planck/keymaps/buhearns/keymap.c new file mode 100644 index 000000000000..4821ece5713a --- /dev/null +++ b/keyboards/planck/keymaps/buhearns/keymap.c @@ -0,0 +1,99 @@ +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum custom_keycodes { + B_UPD = SAFE_RANGE, + B_SSH, + B_SSHK, + B_USR, + B_X11, + B_X12, + B_X13 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(5,KC_TAB),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(4,KC_BSLS), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT,KC_ENT), + KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[1] = LAYOUT_planck_grid( + KC_TRNS, B_UPD, B_USR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_DEL, + KC_TRNS, B_SSH, B_SSHK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_TRNS, + KC_TRNS, B_X11, B_X12, B_X13, KC_NO, KC_NO, KC_NO, KC_NO, KC_1, KC_2, KC_3, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_PDOT, KC_PPLS, KC_PMNS +), + +[2] = LAYOUT_planck_grid( + 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_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLSH, KC_QUOT, KC_MINS, KC_LCBR, KC_RCBR, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DQUO, KC_EQL, KC_LBRC, KC_RBRC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_LT, KC_GT, KC_NO +), + +[3] = LAYOUT_planck_grid( + KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_PGUP, KC_MS_U, KC_PGDN, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_HOME, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_BTN3, KC_END +), + +[4] = LAYOUT_planck_grid( + KC_TRNS, RESET, DEBUG, KC_NO, KC_NO, KC_NO, KC_NO, MU_MOD, MUV_IN, MU_ON, AU_ON, KC_EJCT, + KC_TRNS, EEP_RST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MUV_DE, MU_OFF, AU_OFF, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_MPRV, KC_MNXT, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_VOLD, KC_VOLU, KC_MPLY +), + +[5] = LAYOUT_planck_grid( + UC(0xB0), UC(0xB9), UC(0xB2), UC(0xB3), UC(0xDF), UC(0x20AC), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, UC(0xC4), UC(0xD6), UC(0xDC), UC(0xBB), UC(0xAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, UC(0xE4), UC(0xF6), UC(0xFC), UC(0x2022), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UC_M_OS, UC_M_LN, UC_M_WI, UC_M_WC +)}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case B_UPD: + if (record->event.pressed) { + SEND_STRING("sudo apt update && sudo apt full-upgrade -yyy" SS_TAP(X_ENTER)); + } + break; + case B_SSH: + if (record->event.pressed) { + SEND_STRING("cd /etc/ssh" SS_TAP(X_ENTER) "sudo shasum ssh_host_*" SS_TAP(X_ENTER) "sudo rm ssh_host_*" SS_TAP(X_ENTER) "sudo dpkg-reconfigure openssh-server" SS_TAP(X_ENTER)); + } + break; + case B_SSHK: + if (record->event.pressed) { + SEND_STRING("ssh-keygen -t ed25519" SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_ENTER)); + } + break; + case B_USR: + if (record->event.pressed) { + SEND_STRING("useradd -m user" SS_TAP(X_ENTER) "usermod -a -G sudo user" SS_TAP(X_ENTER) "chsh -s /bin/bash user" SS_TAP(X_ENTER) "passwd user" SS_TAP(X_ENTER)); + } + break; + case B_X11: + if (record->event.pressed) { + SEND_STRING("sudo x11vnc -storepasswd /etc/x11vnc.pass" SS_TAP(X_ENTER)); + } + break; + case B_X12: + if (record->event.pressed) { + SEND_STRING("sudo nano /lib/systemd/system/x11vnc.service" SS_TAP(X_ENTER) "[Unit]" SS_TAP(X_ENTER) "Description=Start X11VNC" SS_TAP(X_ENTER) "After=multi-user.target" SS_TAP(X_ENTER) SS_TAP(X_ENTER) "[Service]" SS_TAP(X_ENTER) "Type=simple" SS_TAP(X_ENTER) "ExecStart=/usr/bin/x11vnc -display :0 -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared -localhost -o /var/log/x11vnc.log" SS_TAP(X_ENTER) SS_TAP(X_ENTER) "[Install]" SS_TAP(X_ENTER) "WantedBy=multi-user.target"); + } + break; + case B_X13: + if (record->event.pressed) { + SEND_STRING("sudo systemctl enable x11vnc.service" SS_TAP(X_ENTER)); + } + break; + } + return true; +}; diff --git a/keyboards/planck/keymaps/buhearns/readme.md b/keyboards/planck/keymaps/buhearns/readme.md new file mode 100644 index 000000000000..4dcf4f05dbb6 --- /dev/null +++ b/keyboards/planck/keymaps/buhearns/readme.md @@ -0,0 +1,20 @@ +Buhearns Keymap (February 12th, 2019) +===================================== + +Simple QWERTY keymap with german Unicode umlauts, special characters and several Linux commands. Intended to be working with ENGLISH layout. + + +## Buhearns base layer +``` + ,-----------------------------------------------------------------------------------. + | GESC | Q | W | E | R | T | Y | U | I | O | P | BKSP | + |------+------+------+------+------+-------------+------+------+------+------+------| + |M5/TAB| A | S | D | F | G | H | J | K | L | ; |M4/BSL| hold: M5, tap: TAB // hold: M4, tap: Backslash + |------+------+------+------+------+------|------+------+------+------+------+------| + |LSHIFT| Z | X | C | V | B | N | M | , | . | / |ST/ENT| hold: RSHIFT, tap: Enter + |------+------+------+------+------+------+------+------+------+------+------+------| + | CTRL | LGUI | LALT | M3 | M2 | SPACE | M1 | LEFT | DOWN | UP | RIGHT| + `-----------------------------------------------------------------------------------' +``` + +## Other layers are a WIP and being tested (DON'T WAIT FOR UPDATES!) diff --git a/keyboards/planck/keymaps/buhearns/rules.mk b/keyboards/planck/keymaps/buhearns/rules.mk new file mode 100644 index 000000000000..5c11b51a28e9 --- /dev/null +++ b/keyboards/planck/keymaps/buhearns/rules.mk @@ -0,0 +1,13 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/callum/config.h b/keyboards/planck/keymaps/callum/config.h new file mode 100644 index 000000000000..e66db1d7e80d --- /dev/null +++ b/keyboards/planck/keymaps/callum/config.h @@ -0,0 +1,7 @@ +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_MAX_SPEED 20 +#define MOUSEKEY_TIME_TO_MAX 100 +#define MOUSEKEY_WHEEL_DELAY 0 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 100 diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 039e8024823f..08d0c69b88d6 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -1,4 +1,3 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" #include "planck.h" #include "action_layer.h" @@ -6,8 +5,6 @@ extern keymap_config_t keymap_config; #define AC(X) A(C(X)) #define SC(X) S(C(X)) -#define _______ KC_TRNS -#define XXXXXXX KC_NO enum planck_layers { _COLEMAK, @@ -15,6 +12,7 @@ enum planck_layers { _SYMB, _MOVE, _FUNC, + _MOUSE, }; enum planck_keycodes { @@ -23,6 +21,7 @@ enum planck_keycodes { SYMB, MOVE, FUNC, + MOUSE, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -38,28 +37,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Func |Ctrl | Alt |Super|Symb |Enter|Space|Move |Super| Alt |Ctrl |Func | * `-----------------------------------------------------------------------' */ - [_COLEMAK] = { - { - KC_TAB, KC_Q, KC_W, KC_F, - KC_P, KC_G, KC_J, KC_L, - KC_U, KC_Y, KC_SCLN, KC_MINS - }, - { - KC_BSPC, KC_A, KC_R, KC_S, - KC_T, KC_D, KC_H, KC_N, - KC_E, KC_I, KC_O, KC_QUOT - }, - { - KC_LSFT, KC_Z, KC_X, KC_C, - KC_V, KC_B, KC_K, KC_M, - KC_COMM, KC_DOT, KC_SLSH, KC_RSFT - }, - { - FUNC, KC_LCTL, KC_LALT, KC_LGUI, - SYMB, KC_ENT, KC_SPC, MOVE, - KC_RGUI, KC_RALT, KC_RCTL, FUNC - } - }, + [_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, + KC_P, KC_G, KC_J, KC_L, + KC_U, KC_Y, KC_SCLN, KC_MINS, + + KC_BSPC, KC_A, KC_R, KC_S, + KC_T, KC_D, KC_H, KC_N, + KC_E, KC_I, KC_O, KC_QUOT, + + KC_LSFT, KC_Z, KC_X, KC_C, + KC_V, KC_B, KC_K, KC_M, + KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + + FUNC, KC_LCTL, KC_LALT, KC_LGUI, + SYMB, KC_ENT, KC_SPC, MOVE, + KC_RGUI, KC_RALT, KC_RCTL, FUNC + ), /* QWERTY * ,-----------------------------------------------------------------------. @@ -72,96 +66,81 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Func |Ctrl | Alt |Super|Symb |Enter|Space|Move |Super| Alt |Ctrl |Func | * `-----------------------------------------------------------------------' */ - [_QWERTY] = { - { - KC_TAB, KC_Q, KC_W, KC_E, - KC_R, KC_T, KC_Y, KC_U, - KC_I, KC_O, KC_P, KC_MINS - }, - { - KC_BSPC, KC_A, KC_S, KC_D, - KC_F, KC_G, KC_H, KC_J, - KC_K, KC_L, KC_SCLN, KC_QUOT - }, - { - KC_LSFT, KC_Z, KC_X, KC_C, - KC_V, KC_B, KC_N, KC_M, - KC_COMM, KC_DOT, KC_SLSH, KC_RSFT - }, - { - FUNC, KC_LCTL, KC_LALT, KC_LGUI, - SYMB, KC_ENT, KC_SPC, MOVE, - KC_RGUI, KC_RALT, KC_RCTL, FUNC - } - }, + [_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, + KC_R, KC_T, KC_Y, KC_U, + KC_I, KC_O, KC_P, KC_MINS, + + KC_BSPC, KC_A, KC_S, KC_D, + KC_F, KC_G, KC_H, KC_J, + KC_K, KC_L, KC_SCLN, KC_QUOT, + + KC_LSFT, KC_Z, KC_X, KC_C, + KC_V, KC_B, KC_N, KC_M, + KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + + FUNC, KC_LCTL, KC_LALT, KC_LGUI, + SYMB, KC_ENT, KC_SPC, MOVE, + KC_RGUI, KC_RALT, KC_RCTL, FUNC + ), /* SYMB * ,-----------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |ndash| * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------' */ - [_SYMB] = { - { - 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_EXLM, KC_AT, KC_HASH, - KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, - KC_ASTR, KC_LPRN, KC_RPRN, _______ - }, - { - _______, KC_TILD, KC_GRV, KC_PLUS, - KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, - KC_RBRC, KC_LCBR, KC_RCBR, _______ - }, - { - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______ - } - }, + [_SYMB] = LAYOUT_planck_grid( + KC_ESC, KC_1, KC_2, KC_3, + KC_4, KC_5, KC_6, KC_7, + KC_8, KC_9, KC_0, A(KC_MINS), + + KC_DEL, KC_EXLM, KC_AT, KC_HASH, + KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, + KC_ASTR, KC_LPRN, KC_RPRN, A(KC_3), + + _______, KC_TILD, KC_GRV, KC_PLUS, + KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, + KC_RBRC, KC_LCBR, KC_RCBR, _______, + + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), /* MOVE * ,-----------------------------------------------------------------------. - * | | | | | | | |Home | Up | End | | Esc | + * | | | | | | |CtrUp|Home | Up | End |Caps |Mouse| * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | |Left |Down |Right|Caps | Del | + * | | | | | | |CtrL |Left |Down |Right|CtrR | | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | |PgDn |PgUp |TabL |TabR | | + * | | | | | | |CtrDn|PgDn |PgUp |TabL |TabR | | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------' */ - [_MOVE] = { - { - AC(KC_A), AC(KC_B), AC(KC_C), AC(KC_D), - AC(KC_E), AC(KC_F), XXXXXXX, KC_HOME, - KC_UP, KC_END, XXXXXXX, KC_ESC - }, - { - AC(KC_G), AC(KC_H), AC(KC_I), AC(KC_J), - AC(KC_K), AC(KC_L), XXXXXXX, KC_LEFT, - KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL - }, - { - _______, AC(KC_M), AC(KC_N), AC(KC_O), - AC(KC_P), AC(KC_Q), XXXXXXX, KC_PGDN, - KC_PGUP, SC(KC_TAB), C(KC_TAB), _______ - }, - { - _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, _______ - } - }, + [_MOVE] = LAYOUT_planck_grid( + AC(KC_A), AC(KC_B), AC(KC_C), AC(KC_D), + AC(KC_E), AC(KC_F), C(KC_UP), KC_HOME, + KC_UP, KC_END, KC_CAPS, MOUSE, + + AC(KC_G), AC(KC_H), AC(KC_I), AC(KC_J), + AC(KC_K), AC(KC_L), C(KC_LEFT), KC_LEFT, + KC_DOWN, KC_RGHT, C(KC_RIGHT), XXXXXXX, + + _______, AC(KC_M), AC(KC_N), AC(KC_O), + AC(KC_P), AC(KC_Q), C(KC_DOWN), KC_PGDN, + KC_PGUP, SC(KC_TAB), C(KC_TAB), _______, + + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), /* FUNC * ,-----------------------------------------------------------------------. @@ -169,33 +148,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| * |Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 |VolDn| * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | |TabL |TabR | | | | |Clmak|Qwrty| | + * | | | | | | | | | |Clmak|Qwrty| | * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| * | | | | |Prev |Mute |Play |Next | | | | | * `-----------------------------------------------------------------------' */ - [_FUNC] = { - { - RESET, KC_F1, KC_F2, KC_F3, - KC_F4, KC_F5, KC_F6, KC_F7, - KC_F8, KC_F9, KC_F10, KC_VOLU - }, - { - KC_POWER, KC_F11, KC_F12, KC_F13, - KC_F14, KC_F15, KC_F16, KC_F17, - KC_F18, KC_F19, KC_F20, KC_VOLD - }, - { - _______, XXXXXXX, XXXXXXX, SC(KC_TAB), - C(KC_TAB), XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, COLEMAK, QWERTY, _______ - }, - { - _______, _______, _______, _______, - KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, - _______, _______, _______, _______ - } - } + [_FUNC] = LAYOUT_planck_grid( + RESET, KC_F1, KC_F2, KC_F3, + KC_F4, KC_F5, KC_F6, KC_F7, + KC_F8, KC_F9, KC_F10, KC_VOLU, + + KC_POWER, KC_F11, KC_F12, KC_F13, + KC_F14, KC_F15, KC_F16, KC_F17, + KC_F18, KC_F19, KC_F20, KC_VOLD, + + _______, XXXXXXX, KC_HOME, SC(KC_TAB), + C(KC_TAB), KC_END, XXXXXXX, XXXXXXX, + XXXXXXX, COLEMAK, QWERTY, _______, + + _______, _______, _______, _______, + KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, + _______, _______, _______, _______ + ), + + /* MOUSE + * ,-----------------------------------------------------------------------. + * | | |CtrL |CtrU |CtrR | B5 |CtrU | ScL |Up | ScR | | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | | Ac0 | Ac1 | Ac2 | B4 |CtrL |Left |Down |Right|CtrR | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | | |Home | End | B3 |CtrD | ScD | ScU |TabL |TabR | | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | | | | | B2 | B1 | | | | | | + * `-----------------------------------------------------------------------' + */ + [_MOUSE] = LAYOUT_planck_grid( + _______, XXXXXXX, C(KC_LEFT), C(KC_UP), + C(KC_RIGHT), KC_BTN5, C(KC_UP), KC_WH_R, + KC_MS_U, KC_WH_L, XXXXXXX, XXXXXXX, + + _______, XXXXXXX, KC_ACL0, KC_ACL1, + KC_ACL2, KC_BTN4, C(KC_LEFT), KC_MS_L, + KC_MS_D, KC_MS_R, C(KC_RIGHT), XXXXXXX, + + _______, XXXXXXX, XXXXXXX, KC_HOME, + KC_END, KC_BTN3, C(KC_DOWN), KC_WH_U, + KC_WH_D, SC(KC_TAB), C(KC_TAB), _______, + + _______, _______, _______, _______, + _______, KC_BTN2, KC_BTN1, _______, + _______, _______, _______, _______ + ) }; #ifdef AUDIO_ENABLE @@ -233,6 +236,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case SYMB: if (record->event.pressed) { + layer_off(_MOUSE); layer_on(_SYMB); } else { layer_off(_SYMB); @@ -240,6 +244,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case MOVE: if (record->event.pressed) { + layer_off(_MOUSE); layer_on(_MOVE); } else { layer_off(_MOVE); @@ -247,11 +252,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case FUNC: if (record->event.pressed) { + layer_off(_MOUSE); layer_on(_FUNC); } else { layer_off(_FUNC); } return false; + case MOUSE: + if (record->event.pressed) { + layer_on(_MOUSE); + } + return false; // Override the defualt auto shifted symbols to use SEND_STRING // See https://github.com/qmk/qmk_firmware/issues/4072 diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 176211cd4bce..99b6dfbeff00 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -17,68 +17,7 @@ This is a layout for the grid planck, built with a few ideals in mind: - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. -Keys are arranged as follows. Blank keys below may actually contain -undocumented shortcuts specific to my workflow. The base layer can be set to -colemak or qwerty (from the function layer). +A layout graphic can be found [here][keyboard-layout-editor] (excludes window +management keys). -``` -/* COLEMAK - * ,-----------------------------------------------------------------------. - * |Tab | Q | W | F | P | G | J | L | U | Y | ; | - | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Bksp | A | R | S | T | D | H | N | E | I | O | ' | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Shift| Z | X | C | V | B | K | M | , | . | / |Shift| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |FUNC |Super| Alt |Ctrl |SYMB |Enter|Space|MOVE |Ctrl | Alt |Super|FUNC | - * `-----------------------------------------------------------------------' - */ - -/* QWERTY - * ,-----------------------------------------------------------------------. - * |Tab | Q | W | E | R | T | Y | U | I | O | P | - | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Bksp | A | S | D | F | G | H | J | K | L | ; | ' | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Shift| Z | X | C | V | B | N | M | , | . | / |Shift| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |FUNC |Super| Alt |Ctrl |SYMB |Enter|Space|MOVE |Ctrl | Alt |Super|FUNC | - * `-----------------------------------------------------------------------' - */ - -/* SYMB - * ,-----------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------' - */ - -/* MOVE - * ,-----------------------------------------------------------------------. - * | | | | | | | |Home | Up | End | | Esc | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | |Left |Down |Right|Caps | Del | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | |PgDn |PgUp | | | | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------' - */ - -/* FUNC - * ,-----------------------------------------------------------------------. - * |Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |VolUp| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 |VolDn| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | F21 | F22 | F23 | F24 | | | | |COLMK|QWRTY| | - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * | | | | |Prev |Mute |Play |Next | | | | | - * `-----------------------------------------------------------------------' - */ - ``` +[keyboard-layout-editor]: http://www.keyboard-layout-editor.com/#/gists/ade5ec1f814bf83046489a4b632575ff diff --git a/keyboards/planck/keymaps/callum/rules.mk b/keyboards/planck/keymaps/callum/rules.mk index 25d398f0806d..182322ae2305 100644 --- a/keyboards/planck/keymaps/callum/rules.mk +++ b/keyboards/planck/keymaps/callum/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration @@ -17,4 +17,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/planck/keymaps/cbbrowne/config.h b/keyboards/planck/keymaps/cbbrowne/config.h index 0bb508385c69..4ec7d081ba8e 100644 --- a/keyboards/planck/keymaps/cbbrowne/config.h +++ b/keyboards/planck/keymaps/cbbrowne/config.h @@ -41,7 +41,6 @@ /* Filler to make layering a bit clearer * * borrowed from basic keymap */ -#define _______ KC_TRNS #define _____ KC_NO #endif diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.org similarity index 70% rename from keyboards/planck/keymaps/cbbrowne/readme.md rename to keyboards/planck/keymaps/cbbrowne/readme.org index e55b130efffc..2b1005858439 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.org @@ -1,20 +1,18 @@ -cbbrowne custom keyboard -============================== +* cbbrowne custom keyboard -Due to cbbrowne@acm.org -Christopher Browne + Due to cbbrowne@acm.org + Christopher Browne -This was originally based on the default keyboard map, but I have been -doing sundry experimentation: + This was originally based on the default keyboard map, but I have + been doing sundry experimentation: -1. Useful Experiments ----------------------------------------- +** Useful Experiments - * It made sense to mess around some with keyboard maps. + - It made sense to mess around some with keyboard maps. - I added a keypad, originally based on keymaps/numpad.c, but mighty substantially revised, as that one seems to be rotated 90 degrees from usual conventions for number pads - * The keypad layer also includes some sample "hacks" of cool things, + - The keypad layer also includes some sample "hacks" of cool things, all using actions attached in using the function action_get_macro() - Key [1][2] aka "q" types out my name, cbbrowne, as a fun example of a key generating a bunch of keystrokes. The keystroke is @@ -24,7 +22,7 @@ doing sundry experimentation: - Key [2][2] aka "a" uses a random number generator to select a digit 0-9 at random - Key [3][2] aka "z" uses a random number generator to select a letter a-z at random - Key [1][3] aka "e" spits out the keymap version number - * Trying out sgoodwin's "hold Enter down to get Shift" + - Trying out sgoodwin's "hold Enter down to get Shift" - Liking this Quite Well Enough... - Applied this to both Shift and Quote - It seems likely that Alt should get a right-hand-side, akin to this... @@ -33,11 +31,11 @@ doing sundry experimentation: - Emacs likes this!!! :-) - I'm suspicious that I'll want to shift ROT_LED another location over, so some modifier can replace the OS/KC_LGUI key - * I have added an alternate ADJUST layer that is activated via update_tri_layer() + - I have added an alternate ADJUST layer that is activated via update_tri_layer() - e.g. - LOWER+RAISE simultaneously - This seems entirely more useful for handling my "special keys" like the random numbers, user name, and such, than the keypad layer - * The _ADJUST layer provides a good place to have RESET + - The _ADJUST layer provides a good place to have RESET - But this isn't strictly enough; I want RESET somewhat accessible from main layer lest an error hide that layer - I never use the OS/KC_LGUI key (that's Command on MacOS, Windows @@ -45,8 +43,7 @@ doing sundry experimentation: some sort -2. Some code structure ideas ---------------------------------------------------- +** Some code structure ideas Each layer is given a name to aid in readability, which is then used in the keymap matrix below. The underscores do not denote @@ -65,57 +62,55 @@ doing sundry experimentation: to care (beyond "start at 0", and arguably even that's not needed) about their values. -3. Things I did not like about the default mapping ---------------------------------------------------------- +** Things I did not like about the default mapping - * I found control too hard to get to. I use it more than Tab, so + + - I found control too hard to get to. I use it more than Tab, so switched it there. - * Having dash on [lower-j] is a bit nonintuitive, but may be OK - * I switched ESC/TAB/M(0) around - * I'm suspicious that I want to shift M(0) from [4][1] to [4][2], + - Having dash on [lower-j] is a bit nonintuitive, but may be OK + - I switched ESC/TAB/M(0) around + - I'm suspicious that I want to shift M(0) from [4][1] to [4][2], and shift ESC off the first column so KC_LCTL and KC_LALT can be on the first column. - * I needed to swap ' and ENTER + - I needed to swap ' and ENTER -4. Unuseful experiments ---------------------------------------------------------- +** Unuseful experiments I have tried some things out that didn't turn out particularly well. I'll note some of these for posterity, hopefully helpful in not doing unwise things again... - * I tried added Workman alongside Dvorak and Colemak + - I tried added Workman alongside Dvorak and Colemak - Boy, oh boy, these don't help!!! - I have done 30 years of learning of Emacs key mappings, and these alternative keyboards massively mess me up - * Space Cadet Shift; switching L_SHIFT to KC_LSP0, so that when I + - Space Cadet Shift; switching L_SHIFT to KC_LSP0, so that when I just hit SHIFT, I get a left parens. In principle, this is great for Lisping. - Unfortunately, there are times when mouse interfaces use SHIFT to allow selecting multiple items, and this really interferes with that -5. TODO ---------------------------------------------------------- +** TODO - * I use tmux quite a lot; the mollat keymap seems to have some + - I use tmux quite a lot; the mollat keymap seems to have some interesting helpers. It might be interesting to add a "tmux layer," or to have a few keys in a layer oriented towards that - Keys for... - Picking windows 0 thru 8 - next/prev/new window - * The mollat tmux layer also suggests some thoughts about Emacs + - The mollat tmux layer also suggests some thoughts about Emacs helpers. - * I do not presently have anything that handles X11 screen + - I do not presently have anything that handles X11 screen switching, as with Control-Alt-various - * I ought to probably look into KC_LEAD, to have some key combos + - I ought to probably look into KC_LEAD, to have some key combos that do not need to be concurrent - * The jeebak keymap seems to have some neat ideas: + - The jeebak keymap seems to have some neat ideas: - Number layer which is aggressive about having numbers in several places - TouchCursor layer seems interesting - It sets up a layer with cursor keys on the home keys - * The jeremy-dev keymap has some very interesting concepts + - The jeremy-dev keymap has some very interesting concepts - Shift hands outwards; the special keys go in the center - Symbol layer has some compound keys for C operators like /=, *=, -=, +=, ... - This is likely what I'll use for my XD75re, and maybe I'll fork a diff --git a/keyboards/planck/keymaps/chance/keymap.c b/keyboards/planck/keymaps/chance/keymap.c index e769ed84eb1c..df57d5828b28 100644 --- a/keyboards/planck/keymaps/chance/keymap.c +++ b/keyboards/planck/keymaps/chance/keymap.c @@ -38,10 +38,6 @@ enum planck_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/circuit/keymap.c b/keyboards/planck/keymaps/circuit/keymap.c index 35f41c3872be..c2399bf3053e 100644 --- a/keyboards/planck/keymaps/circuit/keymap.c +++ b/keyboards/planck/keymaps/circuit/keymap.c @@ -32,8 +32,6 @@ enum planck_keycodes { #define SFT_ENT FUNC(0) // Tap for enter, hold for right shift #define LOCK FUNC(1) #define KC_PSTE KC_PASTE -#define _______ KC_TRNS -#define XXXXXXX KC_NO #ifdef TAP_DANCE_ENABLE #define SFT_CAP TD(0) // Left shift, double tap for caps diff --git a/keyboards/planck/keymaps/danielhklein/keymap.c b/keyboards/planck/keymaps/danielhklein/keymap.c index b5ab1354c57b..25463cf17c8f 100644 --- a/keyboards/planck/keymaps/danielhklein/keymap.c +++ b/keyboards/planck/keymaps/danielhklein/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ARROW }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY diff --git a/keyboards/planck/keymaps/davidrambo/config.h b/keyboards/planck/keymaps/davidrambo/config.h index 2decb3dc8de7..ccb18de3dd8b 100644 --- a/keyboards/planck/keymaps/davidrambo/config.h +++ b/keyboards/planck/keymaps/davidrambo/config.h @@ -1,8 +1,6 @@ -#ifndef CONFIG_USER_H +#pragma once -#define CONFIG_USER_H #define TAPPING_TERM 200 -#include "../../config.h" #define PERMISSIVE_HOLD -#endif + diff --git a/keyboards/planck/keymaps/davidrambo/keymap.c b/keyboards/planck/keymaps/davidrambo/keymap.c index 5ce808aa445c..b82791194421 100644 --- a/keyboards/planck/keymaps/davidrambo/keymap.c +++ b/keyboards/planck/keymaps/davidrambo/keymap.c @@ -1,8 +1,5 @@ -#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" -#include "planck.h" +#include QMK_KEYBOARD_H -//alias for clarity in layering -#define _______ KC_TRNS #define A_BSPC LALT(KC_BSPC) #define A_LEFT LALT(KC_LEFT) #define A_RGHT LALT(KC_RGHT) @@ -10,7 +7,7 @@ #define GSL LGUI(S(KC_LEFT)) #define GSR LGUI(S(KC_RGHT)) #define G_TAB LGUI(KC_TAB) -#define G_GRV LGUI(KC_GRV) // MAC: switch between windows within an application +#define G_GRV LGUI(KC_GRV) #define SftEnt SFT_T(KC_ENT) #define NAV LT(2, KC_TAB) @@ -23,8 +20,7 @@ enum { SFT_LCK }; -//alias for tapdance -#define SftLck TD(SFT_LCK) +#define SftLck TD(SFT_LCK) /* alias for tapdance */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -40,12 +36,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = { - {KC_GESC, KC_Q , KC_W , KC_F , KC_P , KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {NAV , KC_A , KC_R , KC_S , KC_T , KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {SftLck , KC_Z , KC_X , KC_C , KC_V , KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt }, - {KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} - }, +[_COLEMAK] = LAYOUT_planck_grid( + KC_GESC, KC_Q , KC_W , KC_F , KC_P , KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + NAV , KC_A , KC_R , KC_S , KC_T , KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + SftLck , KC_Z , KC_X , KC_C , KC_V , KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt , + KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), /* Symbol * ,-----------------------------------------------------------------------------------. @@ -53,26 +49,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | \| | ! | @ | # | $ | % | ^ | & | * | ( | ) | =+ | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Home | End | ScUp | ScDn | F1 | F2 | -_ |Pg Up | | / | | + * | | Home | End | ScUp | ScDn | BRMD | BRMU | -_ |Pg Up | | / | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | `~ | | | |Alt(Bk)| | |Pg Dn | Vol- | Vol+ | | * `-----------------------------------------------------------------------------------' */ -[_SYMBOL] = { - {KC_LBRC, KC_1, KC_2, KC_3, KC_4 , KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC}, - {KC_BSLS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL }, - {_______, KC_HOME, KC_END, KC_WH_U, KC_WH_D,KC_F1 , KC_F2 , KC_MINS, KC_PGUP, _______, _______, _______}, - {KC_GRV, _______, _______, _______, A_BSPC, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_MUTE} - }, +[_SYMBOL] = LAYOUT_planck_grid( + KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC, + KC_BSLS, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL , + _______, KC_HOME, KC_END , _______, _______, KC_BRMD, KC_BRMU, KC_MINS, KC_PGUP, _______, _______, _______, + KC_GRV, _______, _______, _______, A_BSPC , _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_MUTE + ), /* Navigation*/ -[_NAVIGATION] = { - {_______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______}, - {_______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______}, - {_______, _______, _______, _______, _______, _______, G_TAB , KC_HOME, _______, KC_END, G_GRV , _______}, - {RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} +[_NAVIGATION] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______, + _______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______, + _______, _______, _______, _______, _______, _______, G_TAB , KC_HOME, _______, KC_END, G_GRV , _______, + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) }; // Shift vs capslock function. From bbaserdem's Planck keymap. diff --git a/keyboards/planck/keymaps/davidrambo/rules.mk b/keyboards/planck/keymaps/davidrambo/rules.mk index 5e5ab3845816..4272493950e8 100644 --- a/keyboards/planck/keymaps/davidrambo/rules.mk +++ b/keyboards/planck/keymaps/davidrambo/rules.mk @@ -1,3 +1,3 @@ TAP_DANCE_ENABLE = yes -MOUSEKEY_ENABLE = yes + diff --git a/keyboards/planck/keymaps/dbroqua/keymap.c b/keyboards/planck/keymaps/dbroqua/keymap.c index 8bfd7d022a54..256e6c4a0f16 100644 --- a/keyboards/planck/keymaps/dbroqua/keymap.c +++ b/keyboards/planck/keymaps/dbroqua/keymap.c @@ -26,10 +26,6 @@ enum planck_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Func macro definitions. #define SFT_TAB FUNC(0) // Tap for Enter, hold for Shift diff --git a/keyboards/planck/keymaps/dcompact/keymap.c b/keyboards/planck/keymaps/dcompact/keymap.c index 79c9831509a1..0893059a0d43 100644 --- a/keyboards/planck/keymaps/dcompact/keymap.c +++ b/keyboards/planck/keymaps/dcompact/keymap.c @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, { KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, { DEL_SHF, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSPC}, - { KC_LCTL, PLOVER, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT} + { KC_LCTL, PLOVER, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT} }, /* Lower diff --git a/keyboards/planck/keymaps/dcompact/readme.md b/keyboards/planck/keymaps/dcompact/readme.md new file mode 100644 index 000000000000..cd88c3fed34b --- /dev/null +++ b/keyboards/planck/keymaps/dcompact/readme.md @@ -0,0 +1,45 @@ +# DCompact Layout + +**Dvorak, Layered, Mouse-Enabled, Compact -- now with Plover~** + +_See [the layout source](keymap.c) for the actual layout_ + +## Goals + +The following are the goals kept in mind when designing the DCompact +layout: + +- Provide minimal travel distance when typing English or coding +- Consistent muscle memory translation from standard QWERTY +- Stateless typing experience +- OS-agnostic features, macros, and key placement +- Minimize dependence on mouse usage + +These are generally all met or balanced within reason. This layout is +not intended at all to be a familiar layout for much of anyone (except +maybe those who already type in Dvorak) -- this is meant to amplify the +best parts of having limited, ortholinear keys with layering. + +## As Reference Material + +If you're reading this hoping to find reference material to implement +your own layout, then please feel free to copy over this layout and +make edits where you see fit. I removed a lot of the features I felt +extraneous to my usage and simplified style where I felt needed. This +would hopefully mean that my code should feel like a good base to +develop from for those new to QMK. + +_Remember that settings defined in the layout directory override and +merge with those in the keyboard folder_ + +## Relevant Links + +- [Online Dvorak Layout Trainer](https://learn.dvorak.nl/) +- [Dvorak Wikipedia Page](https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) +- [QMK Docs](https://docs.qmk.fm/#/) +- [QMK KeyCode Reference](https://docs.qmk.fm/#/keycodes) + +## Contact + +Maintainer: [Dan](https://github.com/loksonarius) + diff --git a/keyboards/planck/keymaps/dlaroe/keymap.c b/keyboards/planck/keymaps/dlaroe/keymap.c index d9dab4f527f0..28d2ec1f6264 100644 --- a/keyboards/planck/keymaps/dlaroe/keymap.c +++ b/keyboards/planck/keymaps/dlaroe/keymap.c @@ -34,10 +34,6 @@ enum planck_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/dr_notsokind/keymap.c b/keyboards/planck/keymaps/dr_notsokind/keymap.c index 64650aaa82f9..a244da2e4225 100644 --- a/keyboards/planck/keymaps/dr_notsokind/keymap.c +++ b/keyboards/planck/keymaps/dr_notsokind/keymap.c @@ -37,8 +37,6 @@ enum planck_keycodes { #define SFT_ENT FUNC(0) // Tap for enter, hold for right shift #define LOCK FUNC(1) #define KC_PSTE KC_PASTE -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define ZOOM_IN LCTL(KC_EQL) #define ZOOM_OUT LCTL(KC_MINS) #define ZOOM_NML LCTL(KC_0) diff --git a/keyboards/planck/keymaps/dsanchezseco/config.h b/keyboards/planck/keymaps/dsanchezseco/config.h new file mode 100644 index 000000000000..6fa31cc8a76f --- /dev/null +++ b/keyboards/planck/keymaps/dsanchezseco/config.h @@ -0,0 +1,39 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + diff --git a/keyboards/planck/keymaps/dsanchezseco/keymap.c b/keyboards/planck/keymaps/dsanchezseco/keymap.c new file mode 100644 index 000000000000..90ad2bc59632 --- /dev/null +++ b/keyboards/planck/keymaps/dsanchezseco/keymap.c @@ -0,0 +1,114 @@ +/* Copyright 2015-2017 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + DVORAK, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | AltGr| Alt | GUI |Lower |Space | Bksp |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SFTENT, + KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Del | | Play | Vol- | Vol+ | Next | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + 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, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | Del | | Play | Vol- | Vol+ | Next | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + 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_DEL, _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT +), + +/* Adjust (Lower + Raise) + * ,----------------------------------------------------------------------------------- + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/planck/keymaps/dsanchezseco/readme.md b/keyboards/planck/keymaps/dsanchezseco/readme.md new file mode 100644 index 000000000000..de9680b49851 --- /dev/null +++ b/keyboards/planck/keymaps/dsanchezseco/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/planck/keymaps/dsanchezseco/rules.mk b/keyboards/planck/keymaps/dsanchezseco/rules.mk new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/keyboards/planck/keymaps/dsanchezseco/rules.mk @@ -0,0 +1 @@ + diff --git a/keyboards/planck/keymaps/emilyh/keymap.c b/keyboards/planck/keymaps/emilyh/keymap.c index 28bee6243c65..e8a1d437a99b 100644 --- a/keyboards/planck/keymaps/emilyh/keymap.c +++ b/keyboards/planck/keymaps/emilyh/keymap.c @@ -37,10 +37,6 @@ enum planck_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/experimental/keymap.c b/keyboards/planck/keymaps/experimental/keymap.c index 86ce3a29342a..0c592ce6e603 100644 --- a/keyboards/planck/keymaps/experimental/keymap.c +++ b/keyboards/planck/keymaps/experimental/keymap.c @@ -43,9 +43,6 @@ enum planck_keycodes { RGBLED_DECREASE_VAL, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define SW_SPC SH_T(KC_SPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/fabian/keymap.c b/keyboards/planck/keymaps/fabian/keymap.c index 50bade14da30..5be91772d76d 100644 --- a/keyboards/planck/keymaps/fabian/keymap.c +++ b/keyboards/planck/keymaps/fabian/keymap.c @@ -38,9 +38,6 @@ enum planck_keycodes { EXT_PLV }; -#define XXXXXXX KC_NO -#define _______ KC_TRNS - #define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) diff --git a/keyboards/planck/keymaps/fsck/config.h b/keyboards/planck/keymaps/fsck/config.h new file mode 100644 index 000000000000..bf25da3a6fcc --- /dev/null +++ b/keyboards/planck/keymaps/fsck/config.h @@ -0,0 +1,28 @@ +#pragma once + +#define USB_MAX_POWER_CONSUMPTION 100 + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * 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 diff --git a/keyboards/planck/keymaps/fsck/keymap.c b/keyboards/planck/keymaps/fsck/keymap.c new file mode 100644 index 000000000000..cac5d554ec4a --- /dev/null +++ b/keyboards/planck/keymaps/fsck/keymap.c @@ -0,0 +1,154 @@ +/* Copyright 2015-2017 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 . + */ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Brite | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + 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_LCTL, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + 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_VOLD, KC_VOLU, _______, + _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + 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_VOLD, KC_VOLU, _______, + _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + } + return true; +} diff --git a/keyboards/planck/keymaps/fsck/readme.md b/keyboards/planck/keymaps/fsck/readme.md new file mode 100644 index 000000000000..755da3e219c0 --- /dev/null +++ b/keyboards/planck/keymaps/fsck/readme.md @@ -0,0 +1,5 @@ +![preonic:fsck Layout Image](https://i.imgur.com/GOLyPGP.png) + +# fsck's Planck Layout + +This is largely based on the default planck layout. \ No newline at end of file diff --git a/keyboards/planck/keymaps/fsck/rules.mk b/keyboards/planck/keymaps/fsck/rules.mk new file mode 100644 index 000000000000..bd0181d620e2 --- /dev/null +++ b/keyboards/planck/keymaps/fsck/rules.mk @@ -0,0 +1,3 @@ +#pragma once +NKRO_ENABLE = yes # 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 \ No newline at end of file diff --git a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c index 704c65638c61..a4d1f7cb09bc 100644 --- a/keyboards/planck/keymaps/handwired_binaryplease/keymap.c +++ b/keyboards/planck/keymaps/handwired_binaryplease/keymap.c @@ -35,10 +35,6 @@ enum planck_keycodes { /*EXT_PLV*/ }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/hiea/keymap.c b/keyboards/planck/keymaps/hiea/keymap.c index 2bc54b7a6daf..c09fd41f20b9 100644 --- a/keyboards/planck/keymaps/hiea/keymap.c +++ b/keyboards/planck/keymaps/hiea/keymap.c @@ -171,9 +171,7 @@ enum planck_keycodes { // keycodes #define ___x___ KC_TRNS #define ___fn__ KC_TRNS -#ifdef _______ -#undef _______ -#endif +#undef _______ #define _______ KC_NO #define COPY LCTL(KC_C) diff --git a/keyboards/planck/keymaps/hieax/keymap.c b/keyboards/planck/keymaps/hieax/keymap.c index 3f86695875e4..2b08506f25f4 100644 --- a/keyboards/planck/keymaps/hieax/keymap.c +++ b/keyboards/planck/keymaps/hieax/keymap.c @@ -176,9 +176,7 @@ enum planck_keycodes { // keycodes #define ___x___ KC_TRNS #define ___fn__ KC_TRNS -#ifdef _______ -#undef _______ -#endif +#undef _______ #define _______ KC_NO #define COPY LCTL(KC_C) diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 119e547da4ec..b53023dd96ff 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -27,10 +27,6 @@ enum planck_keycodes { PLOVER }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Workman Alpha-numeric diff --git a/keyboards/planck/keymaps/jarred/keymap.c b/keyboards/planck/keymaps/jarred/keymap.c index 6697c4ea482e..5911669086cf 100644 --- a/keyboards/planck/keymaps/jarred/keymap.c +++ b/keyboards/planck/keymaps/jarred/keymap.c @@ -19,6 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT_planck_grid_wrapper(QWERTY_4x12), + [_GAME] = LAYOUT_planck_grid_wrapper(GAME_4x12), [_LW] = LAYOUT_planck_grid_wrapper(LOWER_4x12), [_NV] = LAYOUT_planck_grid_wrapper(NAV_4x12), [_NP] = LAYOUT_planck_grid_wrapper(NUMPAD_4x12), @@ -30,4 +31,4 @@ void rgb_matrix_indicators_user(void) { // Disable light in middle of 2U position rgb_matrix_set_color(42, 0, 0, 0); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/planck/keymaps/jeebak/keymap.c b/keyboards/planck/keymaps/jeebak/keymap.c index d035728355e8..86a2c4c76ad2 100644 --- a/keyboards/planck/keymaps/jeebak/keymap.c +++ b/keyboards/planck/keymaps/jeebak/keymap.c @@ -53,10 +53,6 @@ enum macro_keycodes { KC_AG_TAB_R, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/planck/keymaps/jhenahan/keymap.c b/keyboards/planck/keymaps/jhenahan/keymap.c index 3e0e185d33c4..ea7a536102d6 100644 --- a/keyboards/planck/keymaps/jhenahan/keymap.c +++ b/keyboards/planck/keymaps/jhenahan/keymap.c @@ -32,10 +32,6 @@ enum planck_keycodes { TOG_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/planck/keymaps/jirgn/keymap.c b/keyboards/planck/keymaps/jirgn/keymap.c index 13c673799e35..3917355a8713 100644 --- a/keyboards/planck/keymaps/jirgn/keymap.c +++ b/keyboards/planck/keymaps/jirgn/keymap.c @@ -38,7 +38,6 @@ enum planck_keycodes { }; // keycode aliases -#define _______ KC_TRNS #define ___x___ KC_NO #define KC_EUR LALT(S(KC_2)) #define KC_SEC LALT(KC_6) diff --git a/keyboards/planck/keymaps/johannes/keymap.c b/keyboards/planck/keymaps/johannes/keymap.c index 2432a8673587..b0636d3147dd 100644 --- a/keyboards/planck/keymaps/johannes/keymap.c +++ b/keyboards/planck/keymaps/johannes/keymap.c @@ -6,9 +6,6 @@ // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define QWERTY 0 #define LOWER 1 #define RAISE 2 diff --git a/keyboards/planck/keymaps/juno/config.h b/keyboards/planck/keymaps/juno/config.h new file mode 100644 index 000000000000..eae636c57e8b --- /dev/null +++ b/keyboards/planck/keymaps/juno/config.h @@ -0,0 +1,41 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + +// Reduce power consumption for iOS compatibility +#define USB_MAX_POWER_CONSUMPTION 100 \ No newline at end of file diff --git a/keyboards/planck/keymaps/juno/keymap.c b/keyboards/planck/keymaps/juno/keymap.c new file mode 100644 index 000000000000..a34a9e9480d6 --- /dev/null +++ b/keyboards/planck/keymaps/juno/keymap.c @@ -0,0 +1,444 @@ +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST, + + _FN1, + _DPAD, + _DPADNUM +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV, + + FN1, + DP_ON, + DP_OFF +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ESC | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | App | Ctrl | GUI | Alt |Lower | SpaceFn |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), + KC_APP, KC_LCTL, KC_LGUI, KC_LALT, LOWER, LT(_FN1, KC_SPC), + LT(_FN1, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + 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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +// Two personal additional layers below + +/* Personal custom Fn layer + * ,-----------------------------------------------------------------------------------. + * | | Vol+ | PgUp | Up | PdDn | Ins | | | Up | | PScr | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Vol- | Left | Down | Right| Home | | Left | Down |Right | | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Prev | Play | Next | Brite| End | | | Vol- | Vol+ | Mute | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Caps | | | | | Space | | DP_ON| | | | + * `-----------------------------------------------------------------------------------' + */ +[_FN1] = LAYOUT_planck_grid( + _______, KC_VOLU, KC_PGUP, KC_UP, KC_PGDN, KC_INS, _______, _______, KC_UP, _______, KC_PSCR, _______, + _______, KC_VOLD, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL , + _______, KC_MPRV, KC_MPLY, KC_MNXT, BACKLIT, KC_END, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, DP_ON, _______, _______, _______ +), + +/* DPAD layer, to activate arrow cluster at the bottom right corner + + * ,-----------------------------------------------------------------------------------. + * | ESC | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | |DNUM | Space | |DP_OFF| Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ + +[_DPAD] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, MO(_DPADNUM), + KC_SPC, KC_SPC, LOWER, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT +), + +// Extended layer for weapon switching + +[_DPADNUM] = LAYOUT_planck_grid( + XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, XXXXXXX, MO(_DPADNUM), + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +) + + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); + + // Borrowing audio from unused audio + // Caps Lock on and off sound too similar + + float caps_song_on[][2] = SONG(NUM_LOCK_ON_SOUND); + float caps_song_off[][2] = SONG(SCROLL_LOCK_ON_SOUND); + + float dpad_song_on[][2] = SONG(ZELDA_PUZZLE); + float dpad_song_off[][2] = SONG(SONIC_RING); +#endif + +uint32_t layer_state_set_user(uint32_t state) { + + // LED control, lighting up when Fn layer is activated + + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + + switch (biton32(state)) { + case _QWERTY: + backlight_set(0); + break; + case _FN1: + backlight_set(3); + break; + case _DPAD: + backlight_set(3); + break; + } + + return state; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + PORTE |= (1<<6); + #endif + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + + +// Play audio upon switching Caps Lock and custom layers + + case KC_CAPS: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + if (host_keyboard_leds() & (1<event.pressed) { + + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(dpad_song_on); + #endif + + layer_off(_FN1); + layer_on(_DPAD); + } + + case DP_OFF: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(dpad_song_off); + #endif + + layer_off(_DPAD); + } + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_ADJUST); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} \ No newline at end of file diff --git a/keyboards/planck/keymaps/juno/readme.md b/keyboards/planck/keymaps/juno/readme.md new file mode 100644 index 000000000000..a93a0643d552 --- /dev/null +++ b/keyboards/planck/keymaps/juno/readme.md @@ -0,0 +1,8 @@ +# Juno Layout +created by Juno Nguyen +juno.ngx@gmail.com + +## Feature: +* Pok3r-inspired functional layer. +* Rearranged numerics for maximum efficiency. + diff --git a/keyboards/planck/keymaps/juno/rules.mk b/keyboards/planck/keymaps/juno/rules.mk new file mode 100644 index 000000000000..e9f1b1336065 --- /dev/null +++ b/keyboards/planck/keymaps/juno/rules.mk @@ -0,0 +1,10 @@ +BACKLIGHT_ENABLE = yes + +SRC += muse.c + +MIDI_ENABLE=no +RGBLIGHT_ENABLE = no +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration \ No newline at end of file diff --git a/keyboards/planck/keymaps/lae3/keymap.c b/keyboards/planck/keymaps/lae3/keymap.c index d43c682c6c1d..59bb36038bd7 100644 --- a/keyboards/planck/keymaps/lae3/keymap.c +++ b/keyboards/planck/keymaps/lae3/keymap.c @@ -32,10 +32,6 @@ enum planck_keycodes { RAISE, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define KC_MUP KC_MS_UP #define KC_MDN KC_MS_DOWN #define KC_MLFT KC_MS_LEFT diff --git a/keyboards/planck/keymaps/luke/keymap.c b/keyboards/planck/keymaps/luke/keymap.c index 121e5314852f..2ee8a5072e37 100644 --- a/keyboards/planck/keymaps/luke/keymap.c +++ b/keyboards/planck/keymaps/luke/keymap.c @@ -44,10 +44,6 @@ #pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" #include "planck.h" -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - // Layers #define _COLEMAK 0 #define _QWERTY 1 diff --git a/keyboards/planck/keymaps/mitch/keymap.c b/keyboards/planck/keymaps/mitch/keymap.c index 79b5204f0723..3887881a9ce6 100644 --- a/keyboards/planck/keymaps/mitch/keymap.c +++ b/keyboards/planck/keymaps/mitch/keymap.c @@ -5,9 +5,6 @@ #define LOWER 1 #define RAISE 2 -// Alias to make layering more clear -#define _______ KC_TRNS - // In MacOS, switch between windows within an application #define GUI_GRV LGUI(KC_GRV) diff --git a/keyboards/planck/keymaps/mjt/keymap.c b/keyboards/planck/keymaps/mjt/keymap.c index 00251b82fa3b..8179f4ab6483 100644 --- a/keyboards/planck/keymaps/mjt/keymap.c +++ b/keyboards/planck/keymaps/mjt/keymap.c @@ -37,10 +37,6 @@ enum planck_keycodes { #include "dynamic_macro.h" -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/mjtnumsym/keymap.c b/keyboards/planck/keymaps/mjtnumsym/keymap.c index 30e6e5304f3f..af72699a5013 100644 --- a/keyboards/planck/keymaps/mjtnumsym/keymap.c +++ b/keyboards/planck/keymaps/mjtnumsym/keymap.c @@ -36,10 +36,6 @@ enum planck_keycodes { #include "dynamic_macro.h" -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/motform/config.h b/keyboards/planck/keymaps/motform/config.h new file mode 100644 index 000000000000..6fa31cc8a76f --- /dev/null +++ b/keyboards/planck/keymaps/motform/config.h @@ -0,0 +1,39 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + diff --git a/keyboards/planck/keymaps/motform/keymap.c b/keyboards/planck/keymaps/motform/keymap.c new file mode 100644 index 000000000000..15f0e05fb603 --- /dev/null +++ b/keyboards/planck/keymaps/motform/keymap.c @@ -0,0 +1,211 @@ +/* Copyright 2015-2017 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" +#include "keymap_swedish.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +/* These definitions can be removed once keymap_swe is properly vetted against MacOS */ +#define NO_DLR_MAC_V ALGR(LALT(KC_4)) +#define NO_AT_MAC_V ALGR(LALT(KC_2)) + +/* Esc when pressed, ctrl when used as a modifier */ +#define KC_ECTL MT(MOD_LCTL, KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak_se + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | Ö | Å | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ECTR | A | R | S | T | D | H | N | E | I | O | Ä | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | SCSHE| Z | X | C | V | B | K | M | , | . | - |SCSHE | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | esc | CTRL | Alt | CMD |Lower |Space |Bksp |Raise | CMD | RALT | HYPER| MEH | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_planck_grid +( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, NO_OSLH, NO_AA, + KC_ECTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, NO_AE, + KC_SFTENT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_SFTENT, + KC_ESC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, KC_RALT, KC_HYPR, KC_MEH + ), + +/* Lower +* ,-----------------------------------------------------------------------------------. +* | | PIPE | ' | @ | & | | DOWN | | RIGHT| ` | ´ | ~ | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* | | ! | " | # | ? | % | LEFT | / | \ | = | + | * | +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | | | | [ | { | | UP | } | ] | | | | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | | | | | | | DEL | | Next | Vol- | Vol+ | Play | +* `-----------------------------------------------------------------------------------' +*/ +[_LOWER] = LAYOUT_planck_grid +( + _______, NO_PIPE_MAC, NO_APOS, NO_AT_MAC_V, NO_AMPR, _______, KC_DOWN, KC_NO, KC_RGHT, NO_GRV, NO_GRV, NO_TILD, + _______, KC_EXLM, NO_QUO2, KC_HASH, NO_QUES, KC_PERC, KC_LEFT, NO_SLSH, NO_BSLS_MAC, NO_EQL, KC_PPLS, KC_PAST, + _______, KC_NO, KC_NO, NO_LBRC, NO_LCBR_MAC, KC_NO, KC_UP, NO_RCBR_MAC, NO_RBRC, KC_NO, KC_NO, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + +/* Raise +* ,-----------------------------------------------------------------------------------. +* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | +* |------+------+------+------+------+-------------+------+------+------+------+------| +* | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | $ | +* |------+------+------+------+------+------|------+------+------+------+------+------| +* | | | | < | ( | | | ) | > |Pg Up |Pg Dn | | +* |------+------+------+------+------+------+------+------+------+------+------+------| +* | | | | | | | | Next | Vol- | Vol+ | Play | +* `-----------------------------------------------------------------------------------' +*/ +[_RAISE] = LAYOUT_planck_grid +( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + NO_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_DLR_MAC_V, + _______, KC_NO, KC_NO, NO_LESS_MAC, NO_LPRN, KC_NO, KC_NO, NO_RPRN, NO_GRTR_MAC, KC_PGUP, KC_PGDN, KC_NO, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| Debug| | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TRMon |TRMoff| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid +( + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_DOWN); + unregister_code(KC_MS_WH_DOWN); + #else + register_code(KC_PGDN); + unregister_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_UP); + unregister_code(KC_MS_WH_UP); + #else + register_code(KC_PGUP); + unregister_code(KC_PGUP); + #endif + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/motform/readme.md b/keyboards/planck/keymaps/motform/readme.md new file mode 100644 index 000000000000..47091c0aa8a1 --- /dev/null +++ b/keyboards/planck/keymaps/motform/readme.md @@ -0,0 +1,11 @@ +# Motform Planck Layout + +This layout is based off the [colemak-se](github.com/motform/colemak-se) +layout and features many tweaks to make working with Emacs and +evil-mode more ergonomi. As with the colemak layout itself, the idea +is to concentrate as much movement as possible to the home row. + +To properly use the layout in Emacs, set Super to LGUI and Meta to RGUI. +Unless you are running a permutation of the MacOS Swedish QWERTY-layout, +modifiers will probably not work. For future develoment, I’m planning +to add support for MS Windows SE-QWERTY in the form of a secondary layer. diff --git a/keyboards/planck/keymaps/motform/rules.mk b/keyboards/planck/keymaps/motform/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/planck/keymaps/motform/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/planck/keymaps/msiu/config.h b/keyboards/planck/keymaps/msiu/config.h new file mode 100644 index 000000000000..40e399a6759d --- /dev/null +++ b/keyboards/planck/keymaps/msiu/config.h @@ -0,0 +1,40 @@ +#pragma once + + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + diff --git a/keyboards/planck/keymaps/msiu/keymap.c b/keyboards/planck/keymaps/msiu/keymap.c new file mode 100644 index 000000000000..aea59e8d779a --- /dev/null +++ b/keyboards/planck/keymaps/msiu/keymap.c @@ -0,0 +1,208 @@ +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _DVORAK, + _LOWER, + _RAISE, + _NUMB, + _FUNC, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + DVORAK, + BACKLIT, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_planck_grid( + LT(_NUMB, KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LCTL_T(KC_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_LCTL, KC_HYPR, KC_LALT, KC_LGUI, LOWER, MO(_FUNC), KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[_DVORAK] = LAYOUT_planck_grid( + _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, _______, + _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, 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, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT +), + +[_RAISE] = LAYOUT_planck_grid( + 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_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE, + _______, _______, _______, _______, _______, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT +), + +[_ADJUST] = LAYOUT_planck_grid( + _______, _______, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, DVORAK, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF,_______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET +), + +[_FUNC] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_NUMB] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______, _______ +) + + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + PORTE |= (1<<6); + #endif + } + return false; + break; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_ADJUST); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/msiu/readme.md b/keyboards/planck/keymaps/msiu/readme.md new file mode 100644 index 000000000000..de9680b49851 --- /dev/null +++ b/keyboards/planck/keymaps/msiu/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/planck/keymaps/msiu/rules.mk b/keyboards/planck/keymaps/msiu/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/planck/keymaps/msiu/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/planck/keymaps/narze/keymap.c b/keyboards/planck/keymaps/narze/keymap.c index 71e9cccb2da2..8f6cb0626303 100644 --- a/keyboards/planck/keymaps/narze/keymap.c +++ b/keyboards/planck/keymaps/narze/keymap.c @@ -52,10 +52,6 @@ enum functions { static uint16_t m_gui_unds_timer; static uint16_t m_sft_po_timer; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Narze : Custom Macros #define HPR_ESC ALL_T(KC_ESC) #define SFT_ENT SFT_T(KC_ENT) diff --git a/keyboards/planck/keymaps/neo2planck/keymap.c b/keyboards/planck/keymaps/neo2planck/keymap.c index a8c4f93066fe..7b9d459fa27f 100644 --- a/keyboards/planck/keymaps/neo2planck/keymap.c +++ b/keyboards/planck/keymaps/neo2planck/keymap.c @@ -11,10 +11,6 @@ #include "..\..\..\..\tmk_core\common\keycode.h" */ - -#define _______ KC_TRNS -#define XXXXXXX KC_NO - /* This layout tries to emulate Neo2, and is intended to be used with a German QWERTZ softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. diff --git a/keyboards/planck/keymaps/oeywil/.gitignore b/keyboards/planck/keymaps/oeywil/.gitignore new file mode 100644 index 000000000000..03b2b466681f --- /dev/null +++ b/keyboards/planck/keymaps/oeywil/.gitignore @@ -0,0 +1 @@ +secrets.h diff --git a/keyboards/planck/keymaps/oeywil/config.h b/keyboards/planck/keymaps/oeywil/config.h new file mode 100644 index 000000000000..09b22e193e82 --- /dev/null +++ b/keyboards/planck/keymaps/oeywil/config.h @@ -0,0 +1,37 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Leader Key +#define LEADER_TIMEOUT 250 +#define LEADER_PER_KEY_TIMING + +// Tap dance +#define TAPPING_TERM 200 diff --git a/keyboards/planck/keymaps/oeywil/keymap.c b/keyboards/planck/keymaps/oeywil/keymap.c new file mode 100644 index 000000000000..59e76cab12b7 --- /dev/null +++ b/keyboards/planck/keymaps/oeywil/keymap.c @@ -0,0 +1,392 @@ +#include QMK_KEYBOARD_H +#include "no_keycodes.h" + +#if __has_include("secrets.h") +# include "secrets.h" +#else +# define mail_str "" +# define pwd_str "" +#endif + +// layer definitions +enum planck_layers { + _DEFAULT, + _LOWER, + _RAISE, + _GAME, + _GLOW +}; + +// sounds +#ifdef AUDIO_ENABLE + float gamesong[][2] = SONG(MARIO_MUSHROOM); + float defsong[][2] = SONG(PLOVER_GOODBYE_SOUND); + float failed[][2] = SONG(TERMINAL_SOUND); +#endif + +// leader key +bool leader_succeed; +bool leader_layer_game; +bool leader_layer_def; +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leader_succeed = leading = false; + leader_layer_game = false; + leader_layer_def = false; + + SEQ_TWO_KEYS(KC_P, KC_P) { + SEND_STRING(pwd_str); + leader_succeed = true; + } + SEQ_TWO_KEYS(KC_P, KC_M) { + SEND_STRING(mail_str); + leader_succeed = true; + } + SEQ_TWO_KEYS(KC_B, KC_B) { + SEND_STRING("build"SS_TAP(X_ENTER)); + leader_succeed = true; + } + SEQ_TWO_KEYS(KC_B, KC_F) { + SEND_STRING("flash"SS_TAP(X_ENTER)); + reset_keyboard(); + leader_succeed = true; + } + SEQ_TWO_KEYS(KC_L, KC_G) { + layer_on(_GAME); + leader_layer_game = true; + } + SEQ_TWO_KEYS(KC_L, KC_D) { + layer_off(_GAME); + leader_layer_def = true; + } + leader_end(); + } +} + +void leader_end(void) { + if (leader_succeed) { + // do nothing + } else if (leader_layer_game) { + #ifdef AUDIO_ENABLE + PLAY_SONG(gamesong); + #endif + } else if (leader_layer_def) { + #ifdef AUDIO_ENABLE + PLAY_SONG(defsong); + #endif + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(failed); + #endif + } +} + +// tap dance definitions +typedef struct { + bool is_press_action; + int state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + DOUBLE_SINGLE_TAP = 5, + TRIPLE_TAP = 6, + TRIPLE_HOLD = 7 +}; + +enum { + TD_LSFT = 0, + TD_LCTL, + TD_RSFT, + TD_RCTL +}; + +int cur_dance (qk_tap_dance_state_t *state); +void lsft_finished (qk_tap_dance_state_t *state, void *user_data); +void lsft_reset (qk_tap_dance_state_t *state, void *user_data); +void rsft_finished (qk_tap_dance_state_t *state, void *user_data); +void rsft_reset (qk_tap_dance_state_t *state, void *user_data); +void lctl_finished (qk_tap_dance_state_t *state, void *user_data); +void lctl_reset (qk_tap_dance_state_t *state, void *user_data); +void rctl_finished (qk_tap_dance_state_t *state, void *user_data); +void rctl_reset (qk_tap_dance_state_t *state, void *user_data); + +// layer declarations +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Default + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | Å | BkSp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | Ø | Æ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | P | , | . | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Lead | Win | Alt | Lower| Space| Enter| Raise| AltGr| App | Lead | Ctrl | + * `-----------------------------------------------------------------------------------' + */ + [_DEFAULT] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, NO_AA, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_OE, NO_AE, + TD(TD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_P, KC_COMM, KC_DOT, TD(TD_RSFT), + TD(TD_LCTL), KC_LEAD, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, KC_ENT, MO(_RAISE), KC_ALGR, KC_APP, KC_LEAD, TD(TD_RCTL) + ), + /* Lower + * ,-----------------------------------------------------------------------------------. + * | Tab | | PgUp | | | | F7 | F8 | F9 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | BkSp | Left | Down | Right| PgDn | | | | F4 | F5 | F6 | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Home | | End | | | | | F1 | F2 | F3 | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | | Win | Alt | Lower| M_PP |M_Next| | | Mute | VolD | VolUp| + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_planck_grid( + KC_TRNS, LCTL(KC_LEFT), KC_UP, LCTL(KC_RIGHT), KC_PGUP, KC_NO, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_DEL, + KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_F4, KC_F5, KC_F6, KC_NO, + KC_TRNS, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_TRNS, + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU + ), + /* Raise + * ,-----------------------------------------------------------------------------------. + * | Tab | ! | ? | # | * | | | = | / | 7 | 8 | 9 | Ins | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | BkSp | @ | & | $ | % | ~ | + | \ | 4 | 5 | 6 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ' | " | ¨ | | | - | 0 | 1 | 2 | 3 | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | | Win | Alt | | Space| Enter| Raise| AltGr| | | | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_planck_grid( + KC_TRNS, NO_EXCL, NO_QEST, NO_HASH, NO_ASTE, NO_PIPE, NO_EQUA, NO_FSLS, KC_7, KC_8, KC_9, KC_INS, + KC_BSPC, NO_ALFA, NO_AMPE, NO_USDO, NO_PERC, NO_TILD, NO_PLUS, NO_BSLS, KC_4, KC_5, KC_6, KC_NO, + KC_TRNS, NO_APOS, NO_QUOT, NO_UMLA, KC_NO, KC_NO, NO_DASH, KC_0, KC_1, KC_2, KC_3, KC_TRNS, + KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO + ), + /* Game + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | | BkSp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | P | , | . | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Lead | | Alt | Lower| Space| Enter| Lower| | | Lead | | + * `-----------------------------------------------------------------------------------' + */ + [_GAME] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_NO, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_NO, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_P, KC_COMM, KC_DOT, KC_NO, + KC_LCTL, KC_LEAD, KC_NO, KC_LALT, MO(_GLOW), KC_SPC, KC_ENT, MO(_GLOW), KC_NO, KC_NO, KC_LEAD, KC_NO + ), + /* Game lower + * ,-----------------------------------------------------------------------------------. + * | Tab | 1 | 2 | 3 | | | | | | | | Steam| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | 4 | 5 | 6 | | | | | | | | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| 7 | 8 | 9 | 0 | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | | | Alt | | PlyPa| Next | | | Mute | VolD | VolUp| + * `-----------------------------------------------------------------------------------' + */ + [_GLOW] = LAYOUT_planck_grid( + KC_TRNS, KC_1, KC_2, KC_3, KC_PPLS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LSFT(KC_F7), + KC_TRNS, KC_4, KC_5, KC_6, KC_PMNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F12, + KC_TRNS, KC_7, KC_8, KC_9, KC_0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_NO, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU + ) +}; + +// tap dance declarations +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + else if (state->count == 2) { + if (state->interrupted) return DOUBLE_SINGLE_TAP; + else if (state->pressed) return DOUBLE_HOLD; + else return DOUBLE_TAP; + } + if (state->count == 3) { + if (state->interrupted || !state->pressed) return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return 8; +} + +static tap xtap_state = { + .is_press_action = true, + .state = 0 +}; + +void lsft_finished (qk_tap_dance_state_t *state, void *user_data) { + xtap_state.state = cur_dance(state); + switch (xtap_state.state) { + case SINGLE_TAP: + register_code16(LSFT(KC_8)); + break; + case SINGLE_HOLD: + register_code(KC_LSFT); + break; + case DOUBLE_TAP: + register_code(KC_NUBS); + break; + case DOUBLE_SINGLE_TAP: + register_code(KC_NUBS); + break; + } +} + +void lsft_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (xtap_state.state) { + case SINGLE_TAP: + unregister_code16(LSFT(KC_8)); + break; + case SINGLE_HOLD: + unregister_code(KC_LSFT); + break; + case DOUBLE_TAP: + unregister_code(KC_NUBS); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_NUBS); + break; + } + xtap_state.state = 0; +} + +void rsft_finished (qk_tap_dance_state_t *state, void *user_data) { + xtap_state.state = cur_dance(state); + switch (xtap_state.state) { + case SINGLE_TAP: + register_code16(LSFT(KC_9)); + break; + case SINGLE_HOLD: + register_code(KC_RSFT); + break; + case DOUBLE_TAP: + register_code16(LSFT(KC_NUBS)); + break; + case DOUBLE_SINGLE_TAP: + register_code16(LSFT(KC_NUBS)); + break; + } +} + +void rsft_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (xtap_state.state) { + case SINGLE_TAP: + unregister_code16(LSFT(KC_9)); + break; + case SINGLE_HOLD: + unregister_code(KC_RSFT); + break; + case DOUBLE_TAP: + unregister_code16(LSFT(KC_NUBS)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code16(LSFT(KC_NUBS)); + break; + } + xtap_state.state = 0; +} + +void lctl_finished (qk_tap_dance_state_t *state, void *user_data) { + xtap_state.state = cur_dance(state); + switch (xtap_state.state) { + case SINGLE_TAP: + register_mods(MOD_BIT(KC_ALGR)); + register_code(KC_7); + break; + case SINGLE_HOLD: + register_code(KC_LCTL); + break; + case DOUBLE_TAP: + register_mods(MOD_BIT(KC_ALGR)); + register_code(KC_8); + break; + case DOUBLE_SINGLE_TAP: + register_mods(MOD_BIT(KC_ALGR)); + register_code(KC_8); +break; + } +} + +void lctl_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (xtap_state.state) { + case SINGLE_TAP: + unregister_code(KC_7); + unregister_mods(MOD_BIT(KC_ALGR)); + break; + case SINGLE_HOLD: + unregister_code(KC_LCTL); + break; + case DOUBLE_TAP: + unregister_code(KC_8); + unregister_mods(MOD_BIT(KC_ALGR)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_8); + unregister_mods(MOD_BIT(KC_ALGR)); +break; + } + xtap_state.state = 0; +} + +void rctl_finished (qk_tap_dance_state_t *state, void *user_data) { + xtap_state.state = cur_dance(state); + switch (xtap_state.state) { + case SINGLE_TAP: + register_mods(MOD_BIT(KC_ALGR)); + register_code(KC_0); + break; + case SINGLE_HOLD: + register_code(KC_RCTL); + break; + case DOUBLE_TAP: + register_mods(MOD_BIT(KC_ALGR)); + register_code(KC_9); + break; + case DOUBLE_SINGLE_TAP: + register_mods(MOD_BIT(KC_ALGR)); + register_code(KC_9); + break; + } +} + +void rctl_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (xtap_state.state) { + case SINGLE_TAP: + unregister_code(KC_0); + unregister_mods(MOD_BIT(KC_ALGR)); + break; + case SINGLE_HOLD: + unregister_code(KC_RCTL); + break; + case DOUBLE_TAP: + unregister_code(KC_9); + unregister_mods(MOD_BIT(KC_ALGR)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_9); + unregister_mods(MOD_BIT(KC_ALGR)); + break; + } + xtap_state.state = 0; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_LSFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lsft_finished, lsft_reset), + [TD_RSFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rsft_finished, rsft_reset), + [TD_LCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lctl_finished, lctl_reset), + [TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rctl_finished, rctl_reset), +}; diff --git a/keyboards/planck/keymaps/oeywil/no_keycodes.h b/keyboards/planck/keymaps/oeywil/no_keycodes.h new file mode 100644 index 000000000000..c412c35d81bb --- /dev/null +++ b/keyboards/planck/keymaps/oeywil/no_keycodes.h @@ -0,0 +1,28 @@ +// øæå +#define NO_OE KC_SCLN +#define NO_AE KC_QUOT +#define NO_AA KC_LBRC +// rename +#define NO_ANBR KC_NUBS +#define NO_APOS KC_BSLS +#define NO_BSLS KC_EQL +#define NO_DASH KC_SLSH +#define NO_PLUS KC_MINS +#define NO_UMLA KC_RBRC +#define NO_PIPE KC_GRV +// shifted +#define NO_EXCL LSFT(KC_1) +#define NO_QUOT LSFT(KC_2) +#define NO_HASH LSFT(KC_3) +#define NO_PERC LSFT(KC_5) +#define NO_AMPE LSFT(KC_6) +#define NO_FSLS LSFT(KC_7) +#define NO_LPAR LSFT(KC_8) +#define NO_RPAR LSFT(KC_9) +#define NO_EQUA LSFT(KC_0) +#define NO_QEST LSFT(KC_MINS) +#define NO_ASTE LSFT(KC_BSLS) +// altgr +#define NO_ALFA ALGR(KC_2) +#define NO_USDO ALGR(KC_4) +#define NO_TILD ALGR(KC_RBRC) diff --git a/keyboards/planck/keymaps/oeywil/readme.md b/keyboards/planck/keymaps/oeywil/readme.md new file mode 100644 index 000000000000..364f9422c718 --- /dev/null +++ b/keyboards/planck/keymaps/oeywil/readme.md @@ -0,0 +1,4 @@ +About +------ + +A simple Norwegian grid layout using Leader Key, Tap Dance and audio. diff --git a/keyboards/planck/keymaps/oeywil/rules.mk b/keyboards/planck/keymaps/oeywil/rules.mk new file mode 100644 index 000000000000..23b2611735b4 --- /dev/null +++ b/keyboards/planck/keymaps/oeywil/rules.mk @@ -0,0 +1,11 @@ +SRC += muse.c + +# Build Options +NKRO_ENABLE = yes +EXTRAKEY_ENABLE = yes +LEADER_ENABLE = yes +TAP_DANCE_ENABLE = yes +AUDIO_ENABLE = yes +COMMAND_ENABLE = no +CONSOLE_ENABLE = no +MOUSEKEY_ENABLE = no diff --git a/keyboards/planck/keymaps/originerd/keymap.c b/keyboards/planck/keymaps/originerd/keymap.c index 4248ad9e7b7e..27aa9d93cbb2 100644 --- a/keyboards/planck/keymaps/originerd/keymap.c +++ b/keyboards/planck/keymaps/originerd/keymap.c @@ -27,10 +27,6 @@ enum planck_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* NERD diff --git a/keyboards/planck/keymaps/palleiko/keymap.c b/keyboards/planck/keymaps/palleiko/keymap.c index c844191d1d9c..a980939388d8 100644 --- a/keyboards/planck/keymaps/palleiko/keymap.c +++ b/keyboards/planck/keymaps/palleiko/keymap.c @@ -57,8 +57,6 @@ enum planck_keycodes { #define WM_9 LALT(KC_9) #define WM_0 LALT(KC_0) -// Transparent Key -#define _______ KC_TRNS // NOP #define ___x___ KC_NO diff --git a/keyboards/planck/keymaps/pete/keymap.c b/keyboards/planck/keymaps/pete/keymap.c index faf41302eb82..2a9b66c42d8e 100644 --- a/keyboards/planck/keymaps/pete/keymap.c +++ b/keyboards/planck/keymaps/pete/keymap.c @@ -48,10 +48,6 @@ extern keymap_config_t keymap_config; #define MACSLEEP LSFT(LCTL(KC_POWER)) #define WINSLEEP KC_SLEP -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = { diff --git a/keyboards/planck/keymaps/piemod/README.md b/keyboards/planck/keymaps/piemod/README.md index f2a051da14ec..9c29e75db34c 100644 --- a/keyboards/planck/keymaps/piemod/README.md +++ b/keyboards/planck/keymaps/piemod/README.md @@ -17,10 +17,6 @@ A keymap for users that need: Still a work-in-progress. Suggestions welcome @ https://github.com/dwrz/piemod. -### Keymap - -![PieMod Keymap](./keymap.png) - ### TODO - [ ] Add Emacs layer. diff --git a/keyboards/planck/keymaps/premek/keymap.c b/keyboards/planck/keymaps/premek/keymap.c index e5a73ba7ec44..28fc8f3ad1ff 100644 --- a/keyboards/planck/keymaps/premek/keymap.c +++ b/keyboards/planck/keymaps/premek/keymap.c @@ -32,10 +32,6 @@ enum planck_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = { diff --git a/keyboards/planck/keymaps/priyadi/config.h b/keyboards/planck/keymaps/priyadi/config.h index 876d057bf2a3..c85e8656e6ff 100644 --- a/keyboards/planck/keymaps/priyadi/config.h +++ b/keyboards/planck/keymaps/priyadi/config.h @@ -21,7 +21,8 @@ #define DOUBLESPACE_LAYER_ENABLE // #define TOLELOT_ENABLE -#define KEYMAP_CUSTOM( \ +#ifdef __AVR__ +#define LAYOUT( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ @@ -34,5 +35,24 @@ {k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c}, \ {k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c} \ } +#elif KEYBOARD_planck_rev6 +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, \ + tp1, tp2, tp3 \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k39, k3a, k3b }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k36, k37, k38, k33, k34, k35 } \ +} +#endif #endif diff --git a/keyboards/planck/keymaps/priyadi/rules.mk b/keyboards/planck/keymaps/priyadi/rules.mk index a999eb00f639..17617b0b7cbc 100644 --- a/keyboards/planck/keymaps/priyadi/rules.mk +++ b/keyboards/planck/keymaps/priyadi/rules.mk @@ -8,15 +8,22 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # 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 MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes # Unicode map BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no + +ifeq ($(strip $(KEYBOARD)), planck/rev4) FAUXCLICKY_ENABLE = yes +BACKLIGHT_ENABLE = yes +AUDIO_ENABLE = no +endif + +ifeq ($(strip $(KEYBOARD)), planck/rev6) +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index 14e1041f49e4..a6ecf16115f5 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c @@ -105,8 +105,6 @@ enum keyboard_macros { #define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT KC_FN0 -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX diff --git a/keyboards/planck/keymaps/rai-suta/keymap.c b/keyboards/planck/keymaps/rai-suta/keymap.c index 97da0e80689d..e4934dbc4599 100644 --- a/keyboards/planck/keymaps/rai-suta/keymap.c +++ b/keyboards/planck/keymaps/rai-suta/keymap.c @@ -6,9 +6,6 @@ #include "sendstring_jis.h" -// Keycode defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO // JIS keyboard #define JK_CIRC KC_EQL // ^ #define JK_AT KC_LBRC // @ diff --git a/keyboards/planck/keymaps/rjhilgefort/config.h b/keyboards/planck/keymaps/rjhilgefort/config.h new file mode 100644 index 000000000000..672c5d570f08 --- /dev/null +++ b/keyboards/planck/keymaps/rjhilgefort/config.h @@ -0,0 +1,35 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 diff --git a/keyboards/planck/keymaps/rjhilgefort/keymap.c b/keyboards/planck/keymaps/rjhilgefort/keymap.c new file mode 100644 index 000000000000..455aa5a36487 --- /dev/null +++ b/keyboards/planck/keymaps/rjhilgefort/keymap.c @@ -0,0 +1,153 @@ +/* Copyright 2015-2017 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 . + */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + // QWERTY = SAFE_RANGE, + BACKLIT, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#define CTRL_ESC MT(MOD_LCTL, KC_ESC) +#define HYPER LCTL(LALT(QK_LGUI)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty +* ,-------------------------------------------------------------------------------------------------------. +* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | +* |--------+--------+--------+--------+--------+-------+-------+------+--------+--------+--------+--------| +* | Ct/Esc | A | S | D | F | G | H | J | K | L | ; | " | +* |--------+--------+--------+--------+--------+-------+-------+------+--------+--------+--------+--------| +* | Shift | Z | X | C | V | B | N | M | , | . | / | Enter | +* |--------+--------+--------+--------+--------+-------+-------+------+--------+--------+--------+--------| +* | | Ctrl | Raise | Alt | GUI | Space | Lowr | Hyper | | | Raise | +* `-------------------------------------------------------------------------------------------------------' +*/ +[_QWERTY] = LAYOUT_planck_grid( + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {CTRL_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_LCTL, RAISE, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, LOWER, HYPER, _______, _______, RAISE } +), + +/* Lower +* ,-----------------------------------------------------------------------------------------------------------. +* | | \ | / | [ | ] | ~ | | | = | + | - | _ | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+---------+--------+--------| +* | | { | } | ( | ) | ` | ← | ↓ | ↑ | → | Alt | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+---------+--------+--------| +* | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+---------+--------+--------| +* | | | | | | | | | | | | +* `-----------------------------------------------------------------------------------------------------------' +*/ +[_LOWER] = LAYOUT_planck_grid( + {_______, KC_BSLS, KC_SLSH, KC_LBRC, KC_RBRC, KC_TILD, KC_PIPE, KC_EQL, KC_PLUS, KC_MINS, KC_UNDS, _______}, + {_______, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_GRV, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_LALT, _______}, + {_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +), + +/* Raise +* ,----------------------------------------------------------------------------------------------------------. +* | | | | | | | | 7 | 8 | 9 | | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +* | | VolMte | Vol - | Vol + | Ply/Pse| | | 4 | 5 | 6 | | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +* | | Trak ← | Trak → | Scrn - | Scrn + | | | 1 | 2 | 3 | | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +* | | | | | | | | 0 | . | | | +* `----------------------------------------------------------------------------------------------------------' +*/ +[_RAISE] = LAYOUT_planck_grid( + {_______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______}, + {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, KC_4, KC_5, KC_6, _______, _______}, + {_______, KC_MRWD, KC_MFFD, KC_SLCK, KC_PAUS, _______, _______, KC_1, KC_2, KC_3, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, KC_DOT, _______, _______} +), + +/* Adjust (Lower + Raise) + * ,----------------------------------------------------------------------------------------------------------. + * | | Reset | | | | | | | | | | Del | + * |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | MuMod | AudOn | AudOff | | | Qwerty | | | | | + * |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | Voice- | Voice+ | MusOn | Musoff | MIDIon | MIDIof | TermOn | TermOff| | | | + * |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | + * `----------------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, + {_______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, QWERTY, _______, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} + +/* +* Example +* ,----------------------------------------------------------------------------------------------------------. +* | | | | | | | | | | | | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +* | | | | | | | | | | | | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +* | | | | | | | | | | | | | +* |-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +* | | | | | | | | | | | | +* `----------------------------------------------------------------------------------------------------------' +* +[_EXAMPLE] = LAYOUT_planck_grid( + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +), +*/ diff --git a/keyboards/planck/keymaps/rjhilgefort/readme.md b/keyboards/planck/keymaps/rjhilgefort/readme.md new file mode 100644 index 000000000000..f446a76194ea --- /dev/null +++ b/keyboards/planck/keymaps/rjhilgefort/readme.md @@ -0,0 +1,63 @@ +# [🐦 @rjhilgefort](https://twitter.com/rjhilgefort) Planck Layout + +A simple and practical layout featuring: + +- Hyper Key === CTRL + ALT + GUI +- Ctrl/Esc key that is CTRL when held and ESC when tapped +- Symbols layer that focuses on coding +- Numpad + media layer + +![Imgur](https://i.imgur.com/elygxAb.jpg) + + +## Main +``` +,-------------------------------------------------------------------------------------------------------. +| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | +|--------|--------|--------|--------|--------|-------|-------|------|--------|--------|--------|--------| +| Ct/Esc | A | S | D | F | G | H | J | K | L | ; | " | +|--------|--------|--------|--------|--------|-------|-------|------|--------|--------|--------|--------| +| Shift | Z | X | C | V | B | N | M | , | . | / | Enter | +|--------|--------|--------|--------|--------|-------|-------|------|--------|--------|--------|--------| +| | Ctrl | Raise | Alt | GUI | Space | Lowr | Hyper | | | Raise | +`-------------------------------------------------------------------------------------------------------' +``` + +## Lower +``` +,-----------------------------------------------------------------------------------------------------------. +| | \ | / | [ | ] | ~ | | | = | + | - | _ | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|---------|--------|--------| +| | { | } | ( | ) | ` | ← | ↓ | ↑ | → | Alt | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|---------|--------|--------| +| | ! | @ | # | $ | % | ^ | & | * | ( | ) | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|---------|--------|--------| +| | | | | | | | | | | | +`-----------------------------------------------------------------------------------------------------------' +``` + +## Raise +``` +,----------------------------------------------------------------------------------------------------------. +| | | | | | | | 7 | 8 | 9 | | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------| +| | VolMte | Vol - | Vol + | Ply/Pse| | | 4 | 5 | 6 | | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------| +| | Trak ← | Trak → | Scrn - | Scrn + | | | 1 | 2 | 3 | | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------| +| | | | | | | | 0 | . | | | +`----------------------------------------------------------------------------------------------------------' +``` + +## Adjust (Lower + Raise) +``` +,----------------------------------------------------------------------------------------------------------. +| | Reset | | | | | | | | | | Del | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------| +| | | MuMod | AudOn | AudOff | | | Qwerty | | | | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------| +| | Voice- | Voice+ | MusOn | Musoff | MIDIon | MIDIof | TermOn | TermOff| | | | +|-------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------| +| | | | | | | | | | | | +`----------------------------------------------------------------------------------------------------------' +``` diff --git a/keyboards/planck/keymaps/rjhilgefort/rules.mk b/keyboards/planck/keymaps/rjhilgefort/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/planck/keymaps/roguepullrequest/config.h b/keyboards/planck/keymaps/roguepullrequest/config.h new file mode 100644 index 000000000000..13d3a6370f74 --- /dev/null +++ b/keyboards/planck/keymaps/roguepullrequest/config.h @@ -0,0 +1,8 @@ +#pragma once + + + + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(RICK_ROLL) +#endif diff --git a/keyboards/planck/keymaps/roguepullrequest/keymap.c b/keyboards/planck/keymaps/roguepullrequest/keymap.c new file mode 100644 index 000000000000..177cb2b671fb --- /dev/null +++ b/keyboards/planck/keymaps/roguepullrequest/keymap.c @@ -0,0 +1,254 @@ +#include QMK_KEYBOARD_H + +#ifdef AUDIO_ENABLE + float mushroom[][2] = SONG(MARIO_MUSHROOM); +#endif + + +extern keymap_config_t keymap_config; + +// Complex Tapdance hoopla +typedef struct { + bool is_press_action; + int state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_TAP = 3, + DOUBLE_HOLD = 4, + TRIPLE_TAP = 5, + TRIPLE_HOLD = 6, +}; + +// Tap dance enums +enum { + X_AT_FUN = 0, + RSHIFT, + LSHIFT, + TD_S, + SLASH +}; + +int cur_dance (qk_tap_dance_state_t *state); + +void x_finished (qk_tap_dance_state_t *state, void *user_data); +void x_reset (qk_tap_dance_state_t *state, void *user_data); +void lshift_finished (qk_tap_dance_state_t *state, void *user_data); +void lshift_reset(qk_tap_dance_state_t *state, void *user_data); + + +bool is_alt_tab_active = false; +uint16_t alt_tab_timer = 0; + +// Modified Programmer Dvorak enums + +enum planck_layers { + _PDVORAK, + _UPPER, + _LOWER, + _FUNCTION, +}; + +enum custom_keycodes { + PDVK = SAFE_RANGE, + KC_LAST, + ALT_TAB +}; + +// For getting the last arg in shell line (SUPER THANKS to Drashna over on Discord) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint16_t macro_timer; + + switch (keycode) { + case ALT_TAB: + if (record->event.pressed) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + register_code(KC_TAB); + } else { + unregister_code(KC_TAB); + } + break; + } + + switch (keycode){ + case KC_LAST: + if(record->event.pressed){ + macro_timer = timer_read(); + register_mods(MOD_BIT(KC_LCTRL)); + } else { + unregister_mods(MOD_BIT(KC_LCTRL)); + if (timer_elapsed(macro_timer) < 150) { + SEND_STRING("!$"); + } + } + return false; + } + return true; +} + +void matrix_scan_user(void) { + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code16(KC_LALT); + is_alt_tab_active = false; + } + } +} + +#define PDVORAK MO(_PDVORAK) +#define LOWER MO(_LOWER) +#define UPPER MO(_UPPER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + /* Programmer Dvorak */ + [_PDVORAK] = LAYOUT_planck_grid( + KC_GESC, KC_SCOLON, KC_COMMA, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_LAST, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, TD(TD_S), TD(SLASH), + TD(LSHIFT), KC_QUOT, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(RSHIFT), + TD(X_AT_FUN), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, ALT_TAB, KC_SPACE, KC_ENTER, MT(MOD_LCTL | MOD_LSFT, KC_LGUI), KC_PGUP, KC_PGDN, LT(_LOWER, KC_PLUS) + ), + + [_UPPER] = LAYOUT_planck_grid( + KC_GRAVE, KC_AMPR, KC_PERC, KC_NO, KC_NO, KC_EQL, KC_ASTR, KC_NO, KC_NO, KC_EXLM, KC_HASH, KC_TRNS, + KC_PLUS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSLASH, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS + ), + + [_LOWER] = LAYOUT_planck_grid( + KC_DLR, KC_7, KC_5, KC_3, KC_1, KC_9, KC_0, KC_2, KC_4, KC_6, KC_8, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, CK_DOWN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS + ), + + [_FUNCTION] = LAYOUT_planck_grid( + KC_F11, KC_F7, KC_F5, KC_F3, KC_F1, KC_F9, KC_F12, KC_F2, KC_F4, KC_F6, KC_F8, RESET, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS + ), +}; + + +// Super crazy tap dancing stuff - see quad dance in feature_tap_dance.md + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) return SINGLE_TAP; + // key not interrupted, but still held sends 'HOLD' + else return SINGLE_HOLD; + } + else if (state->count == 2) { + if (state->interrupted || !state->pressed) return DOUBLE_TAP; + else return DOUBLE_HOLD; + } + else if (state->count == 3) { + if (state->interrupted || !state->pressed)return TRIPLE_TAP; + else return TRIPLE_HOLD; + } + else return 8; // magic number that i dont believe works. +} + +// instance of tap for the 'X' dance. +static tap xtap_state = { + .is_press_action = true, + .state = 0 +}; + +// registering keypresses +void x_finished (qk_tap_dance_state_t *state, void *user_data) { + xtap_state.state = cur_dance(state); + switch (xtap_state.state) { + case SINGLE_TAP: register_code16(KC_AT); break; + case SINGLE_HOLD: set_oneshot_layer(_UPPER, ONESHOT_START); break; + case DOUBLE_TAP: set_oneshot_layer(_FUNCTION, ONESHOT_START); break; + case DOUBLE_HOLD: reset_keyboard(); break; + } +} + +void lshift_finished (qk_tap_dance_state_t *state, void *user_data) { + xtap_state.state = cur_dance(state); + switch (xtap_state.state) { + case SINGLE_TAP: register_code16(KC_LSFT); register_code16(KC_9); break; + case SINGLE_HOLD: register_code16(KC_LSFT); break; + case DOUBLE_TAP: register_code16(KC_LBRC); break; + case TRIPLE_TAP: register_code16(KC_LSFT); register_code16(KC_LBRC); break; + } +} +void s_finished (qk_tap_dance_state_t *state, void *user_data) { + xtap_state.state = cur_dance(state); + switch (xtap_state.state) { + case SINGLE_TAP: register_code16(KC_S); break; + case DOUBLE_TAP: register_code16(KC_MINUS); break; + case TRIPLE_TAP: register_code16(KC_LSFT); register_code16(KC_MINUS); break; + } +} + +void rshift_finished (qk_tap_dance_state_t *state, void *user_data) { + xtap_state.state = cur_dance(state); + switch (xtap_state.state) { + case SINGLE_TAP: register_code16(KC_LSFT); register_code16(KC_0); break; + case SINGLE_HOLD: register_code16(KC_RSFT); break; + case DOUBLE_TAP: register_code16(KC_RBRC); break; + case TRIPLE_TAP: register_code16(KC_LSFT); register_code16(KC_RBRC); break; + } +} + +// forgetting keypresses + +void x_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (xtap_state.state) { + case SINGLE_TAP: unregister_code16(KC_AT); break; + case SINGLE_HOLD: clear_oneshot_layer_state(ONESHOT_PRESSED); break; + case DOUBLE_TAP: clear_oneshot_layer_state(ONESHOT_PRESSED); break; + case DOUBLE_HOLD: reset_keyboard(); break; + } + xtap_state.state = 0; +} +void lshift_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (xtap_state.state) { + case SINGLE_TAP: unregister_code16(KC_9); unregister_code16(KC_LSFT); break; + case SINGLE_HOLD: unregister_code16(KC_LSFT); break; + case DOUBLE_TAP: unregister_code16(KC_LBRC); break; + case TRIPLE_TAP: unregister_code16(KC_LBRC); unregister_code16(KC_LSFT); break; + } + xtap_state.state = 0; +} + +void rshift_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (xtap_state.state) { + case SINGLE_TAP: unregister_code16(KC_0); unregister_code16(KC_LSFT); break; + case SINGLE_HOLD: unregister_code16(KC_RSFT); break; + case DOUBLE_TAP: unregister_code16(KC_RBRC); break; + case TRIPLE_TAP: unregister_code16(KC_RBRC); unregister_code16(KC_LSFT); break; + } + xtap_state.state = 0; +} +void s_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (xtap_state.state) { + case SINGLE_TAP: unregister_code16(KC_S); break; + case DOUBLE_TAP: unregister_code16(KC_MINUS); break; + case TRIPLE_TAP: unregister_code16(KC_MINUS); unregister_code16(KC_LSFT); break; + } + xtap_state.state = 0; +} +qk_tap_dance_action_t tap_dance_actions[] = { + [X_AT_FUN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset), + [LSHIFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lshift_finished, lshift_reset), + [RSHIFT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rshift_finished, rshift_reset), + [TD_S] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, s_finished, s_reset), + [SLASH] = ACTION_TAP_DANCE_DOUBLE(KC_SLASH, KC_BSLASH), + +}; + +void shutdown_user(void) { clear_keyboard(); } diff --git a/keyboards/planck/keymaps/roguepullrequest/readme.md b/keyboards/planck/keymaps/roguepullrequest/readme.md new file mode 100644 index 000000000000..687a65fc9324 --- /dev/null +++ b/keyboards/planck/keymaps/roguepullrequest/readme.md @@ -0,0 +1,20 @@ +# Programmer Dvorak for the Planck (Light) + + +| | | | | | | | | | | | | +|----------|---------|-------|-----|------|-------|-------|------|------|------|------|------| +| GRAVE_ESC | ; [u]; [l]7 | , [u]% [l]5 | . [l]3 | p [l]1 | y [u]= [l]9 | f [u]* [l]0 | g [l]2 | c [l]4 | r [u]! [l]6 | l [u]# [l]8 | BKSP | +| LCTRL [TD]!$ | a | o | e | u | i | d | h | t | n | s [TD]- _ | / [TD]\ | +| LSHFT [TD]( [ { | ' | q | j | k | x | b | m | w | v | z | LSHFT [TD]) ] } | +| @ [TD]UPPER FUN RESET | LEFT | DOWN | UP | RIGHT | ALT_TAB | SPACE | ENTER | LGUI | PGUP | PGDOWN | = [TD]LOWER | + +# Layout notes +- [u] = UPPER symbol +- [l] = LOWER symbol +- [TD] = Tap Dances +- ALT_TAB = cycle through windows as long as you keep tapping it keeps alt tabbing +- LAST = "!$" = is useful for using the last parm in bash/zsh +- More to come + + +# Dvorak base Layer diff --git a/keyboards/planck/keymaps/roguepullrequest/rules.mk b/keyboards/planck/keymaps/roguepullrequest/rules.mk new file mode 100644 index 000000000000..9394c96e5b7d --- /dev/null +++ b/keyboards/planck/keymaps/roguepullrequest/rules.mk @@ -0,0 +1,4 @@ +AUDIO_ENABLE = yes +COMMAND_ENABLE = no +TERMINAL_ENABLE = no +TAP_DANCE_ENABLE = yes diff --git a/keyboards/planck/keymaps/samuel/README.org b/keyboards/planck/keymaps/samuel/README.org new file mode 100644 index 000000000000..3c0f08a9d908 --- /dev/null +++ b/keyboards/planck/keymaps/samuel/README.org @@ -0,0 +1,622 @@ +#+Title: Samuel's Literate QMK Config +#+PROPERTY: header-args :tangle ~/qmk_firmware/keyboards/planck/keymaps/samuel/keymap.c + +This is my qmk firmware for my keyboard. I grew tired of organizing the keycode +array in plain text so I made it a literate .org file. I've never done this +before, so bear with me. + +* Layers + +#+BEGIN_COMMENT +#+NAME: empty-layer +| <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | <6> | +|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +| - | - | - | - | - | - | - | - | - | - | - | - | +| - | - | - | - | - | - | - | - | - | - | - | - | +| - | - | - | - | - | - | - | - | - | - | - | - | +| - | - | - | - | - | - | - | - | - | - | - | - | +|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| +#+END_COMMENT + +This is my "pretty" org mode organized table for my main dvorak layer. If you +don't use org mode, it won't be that exciting, but if you enjoy working in org +mode, you can edit this table directly, and this file is tangled to the actual +keymap. No more organizing spaces or converting to and from comments. + +#+NAME: home-layer +|--------+--------+------+------+------+-----+-----+-----+------+-------+--------+--------| +| T_LRSE | QUOT | COMM | DOT | P | Y | F | G | C | R | L | T_RRSE | +| T_LSFT | A | O | E | U | I | D | H | T | N | S | T_RSFT | +| T_LCTL | SCLN | Q | J | K | X | B | M | W | V | Z | T_RCTL | +| T_LGUI | T_LALT | UP | DOWN | BSPC | TAB | ENT | SPC | LEFT | RIGHT | T_RALT | T_RGUI | +|--------+--------+------+------+------+-----+-----+-----+------+-------+--------+--------| + +This qwerty layout is just so normal people can try out the board. Tap keys +would need to be customized I think, more on that later. I also put another +dvorak key here because I have nightmares of getting trapped in this forsaken +layout. + +#+NAME: qwerty-layer +|--------+--------+----+------+------+-----+-----+-----+------+-------+--------+--------| +| T_LRSE | Q | W | E | R | T | Y | U | I | O | P | T_RRSE | +| T_LSFT | A | S | D | F | G | H | J | K | L | SCLN | T_RSFT | +| T_LCTL | Z | X | C | V | B | N | M | COMM | DOT | QUOT | T_RCTL | +| T_LGUI | T_LALT | UP | DOWN | BSPC | TAB | ENT | SPC | LEFT | RIGHT | T_RALT | DVORAK | +|--------+--------+----+------+------+-----+-----+-----+------+-------+--------+--------| + +I tried to keep my layout bare bones, just what would be available on a normal +keyboard, minus some keys I never used. This one secondary layer should cover a +majority of the keys not found on the home layer. The bottom left copies a normal +keyboards symbols from shifted numbers, and the rest is placed where convenient, +with some considerations for one handed use, hence the shortcuts in the top +left. + +#+NAME: secondary-layer +|--------+--------+--------+--------+--------+------+------+-----+--------+--------+-------+--------| +| -- | EZUNDO | EZCOPY | EZCUT | EZPSTE | INS | EQL | 7 | 8 | 9 | -- | -- | +| EZSHFT | ESC | CAPS | PGUP | PGDN | HOME | ASTR | 4 | 5 | 6 | 0 | EZSHFT | +| EZCTRL | EXLM | AT | HASH | DLR | PERC | CIRC | 1 | 2 | 3 | COM | EZCTRL | +| EZGUI | EZALT | EZUP | EZDOWN | SPC | AMPR | PIPE | END | EZLEFT | EZRGHT | EZALT | EZGUI | +|--------+--------+--------+--------+--------+------+------+-----+--------+--------+-------+--------| + +Basic command layer for one-shot macros and function keys. + +#+NAME: command-layer +|----+-----+-----+-----+-----+--------+--------+------+-------+------+-----+----| +| -- | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | -- | +| -- | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | -- | +| -- | F21 | F22 | F23 | F24 | QWERTY | DVORAK | USER | EMAIL | NAME | -- | -- | +| -- | -- | -- | -- | -- | -- | -- | DIR | -- | -- | -- | -- | +|----+-----+-----+-----+-----+--------+--------+------+-------+------+-----+----| + +But wait, we are missing several important keys? well, yes, but the modifier keys +all do other keys when tapped. More about that in the keymap section. + +* Keymap Conversion in Python + +This python can convert that table into the array needed for the keymap file. It +simply prepends every key with "KC_". I used to use a dictionary to convert some +keys from the table into qmk keycodes, but the double convertion was +unneccessary so I just prepended all my macros with KC and moved all the +implementation to the `process-user-input` function. + +#+NAME:layer-to-array +#+BEGIN_SRC python :var keys=secondary-layer :tangle no +results = "{" +row = 0 +while row < len(keys): + results += '{ ' + key = 0 + while key < len(keys[row]): + keyName = str(keys[row][key]) + if keyName == '--': + keyName = 'TRANSPARENT' + results += 'KC_' + keyName + if key != 11: + results += ', ' + key+=1 + results += '}' + if row != 3: + results += ',' + results += '\n' + row+=1 +results += '},\n' +return results +#+END_SRC + +* keymap.c + +Now that we laid out our layout, lets lay out our kemap file. + +#+BEGIN_SRC C :noweb yes +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#+END_SRC + +** Keycodes + +#+BEGIN_SRC C :noweb yes +// where the 'T_' communicates how the key does something different when tapped. +enum planck_keycodes { +//DVORAK = SAFE_RANGE, +KC_T_LALT = SAFE_RANGE, +KC_T_RALT, +KC_T_LGUI, +KC_T_RGUI, +KC_T_LCTL, +KC_T_RCTL, +KC_T_LSFT, +KC_T_RSFT, +KC_T_LRSE, +KC_T_RRSE, +KC_EZRGHT, +KC_EZLEFT, +KC_EZUP, +KC_EZDOWN, +KC_EZUNDO, +KC_EZCOPY, +KC_EZCUT, +KC_EZPSTE, +KC_EZSHFT, +KC_EZCTRL, +KC_EZGUI, +KC_EZALT, +KC_DVORAK, +KC_QWERTY, +KC_USER, +KC_EMAIL, +KC_NAME, +KC_DIR, +KC_COM +}; + +#+END_SRC + +** Import Key table + +#+BEGIN_SRC C :noweb yes +enum planck_layers { +_DVORAK, +_QWERTY, +_RISE, +_COMMAND +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +[_DVORAK] = + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +<> + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +[_QWERTY] = + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +<> + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +[_RISE] = + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +<> + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +[_COMMAND] = + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +<> + +#+END_SRC + +#+BEGIN_SRC C :noweb yes +}; + +#+END_SRC + +** Tap Keys + +I don't like tap keys coming out on release. When modified, I often let go of +the modifier too early because the tap button doesn't come out untill release. I +guess you could save the state of the board on press and then apply it after the +timer, but what I really want is the keys to come out on press when they can and +when it is most useful. For me, that is when they are modified a single time. So +I kind "locked" the board into only doing single modifiers, making them faster. +Disadvantages are double modified keys must be done with one shot keys (its +actually not that bad, it feels like emacs!) and triple modified keys are +impossible at the moment. + +#+BEGIN_SRC C :noweb yes + +static uint16_t tap_timer = 0; +char last_mod = 10; + +void mod_press(uint16_t tap_code, uint16_t hold_code, int id) { + // this first if body makes double modified keys impossible, but stops the + // delay when modifying a tap key which would result in the tap key not + // getting modified. + if (last_mod != id && last_mod != 10) { + tap_code16(tap_code); + last_mod = 10; + } else { + tap_timer = timer_read(); + last_mod = id; + register_code(hold_code); + } +} + +void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) { + unregister_code(hold_code); + if (last_mod == id && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(tap_code); + last_mod = 10; + } +} + +#+END_SRC + +** Process User Input + +#+BEGIN_SRC C :noweb yes +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { +#+END_SRC + +** Layouts + +Set Dvorak layout + +#+BEGIN_SRC C :noweb yes +case KC_DVORAK: +if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); +} +return true; +break; + +#+END_SRC + +Set Qwerty layout. + +#+BEGIN_SRC C :noweb yes +case KC_QWERTY: +if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); +} +return true; +break; + +#+END_SRC + +** Alt and () + +Left and right alt are ( and ) when tapped. I put them on alt instead of a more +conveniant key like control because parentheses do not need to be shift modified +ever, unlike some other tap keys seen in the next sections. + +#+BEGIN_SRC C :noweb yes +case KC_T_LALT: +if (record->event.pressed) { + mod_press(S(KC_9), KC_LALT, 0); +} else { + mod_lift(S(KC_9), KC_LALT, 0); +} +return false; +break; +case KC_T_RALT: +if (record->event.pressed) { + mod_press(S(KC_0), KC_RALT, 1); +} else { + mod_lift(S(KC_0), KC_RALT, 1); +} +return false; +break; + +#+END_SRC + +** Gui and `\ + +I place gui in the bottom corner because I believe it is the hardest key to +reach, so gui seemed like a good fit for a dedicated key that I never want to +have to spam. For tap keys, I used equally unused keys that are not apart of the +number pad or shifted number keys. + +#+BEGIN_SRC C :noweb yes +case KC_T_LGUI: +if (record->event.pressed) { + mod_press(KC_GRAVE, KC_LGUI, 2); +} else { + mod_lift(KC_GRAVE, KC_LGUI, 2); +} +return false; +break; +case KC_T_RGUI: +if (record->event.pressed) { + mod_press(KC_BSLASH, KC_RGUI, 3); +} else { + mod_lift(KC_BSLASH, KC_RGUI, 3); +} +return false; +break; + +#+END_SRC + +** Ctrl and [] + +Left and right control are [] respectively when they are tapped, making { and } +also very convenient. + +#+BEGIN_SRC C :noweb yes +case KC_T_LCTL: +if (record->event.pressed) { + mod_press(KC_LBRACKET, KC_LCTL, 4); +} else { + mod_lift(KC_LBRACKET, KC_LCTL, 4); +} +return false; +break; +case KC_T_RCTL: +if (record->event.pressed) { + mod_press(KC_RBRACKET, KC_RCTL, 5); +} else { + mod_lift(KC_RBRACKET, KC_RCTL, 5); +} +return false; +break; + +#+END_SRC + +** Shft and =- + +I place shift on the home row, so having '-' right of my pinkie is standard, and +it only felt natural to put its opposite, '=/+' on the other side. I put an +extra one on the right side in the secondary layer for the num pad. + +#+BEGIN_SRC C :noweb yes +case KC_T_LSFT: +if (record->event.pressed) { + mod_press(KC_EQUAL, KC_LSFT, 6); +} else { + mod_lift(KC_EQUAL, KC_LSFT, 6); +} +return false; +break; +case KC_T_RSFT: +if (record->event.pressed) { + mod_press(KC_MINUS, KC_RSFT, 7); +} else { + mod_lift(KC_MINUS, KC_RSFT, 7); +} +return false; +break; + +#+END_SRC + +** Rise, DEL, and / + +I use the top corners as rise because I decided that I do not like using layers +with my thumbs. It feels uncomfortable to hold keys down with the side of my +thumb, and backspace, tab, enter, and spacebar keep them satisfied. My pinky is +for holding modifiers, so it makes sense to put the layer key with the other +modifiers. Both my left and right layer keys activate the same layer which also +makes sense to me. You wouldn't want left and right shift to do different things + +I used to have escape in the top left, but I use delete a lot more, and putting +escape under a layer has not been a problem at all. I put / in the top right +corner again mimicing a standard dvorak keyboard. + +#+BEGIN_SRC C :noweb yes +case KC_T_LRSE: +if (record->event.pressed) { + tap_timer = timer_read(); + last_mod = 8; + layer_on(_RISE); +} else { + layer_off(_RISE); + if (last_mod == 8 && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(KC_DELETE); + last_mod = 10; + } +} +return false; +break; +case KC_T_RRSE: +if (record->event.pressed) { + tap_timer = timer_read(); + last_mod = 9; + layer_on(_RISE); +} else { + layer_off(_RISE); + if (last_mod == 9 && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(KC_SLASH); + last_mod = 10; + } +} +return false; +break; + +#+END_SRC + +** EZ Keys + +EZ or "easy" keys do things that can already be done on the board, but I want an +easier way of doing them. + +*** One Shot Keys + +Since I made modified tap keys occur on press instead of release, I need one +shot keys to press any key with more than one modifier. + +#+BEGIN_SRC C :noweb yes +case KC_EZSHFT: +if (record->event.pressed) { + set_oneshot_mods(MOD_LSFT); + last_mod = 10; +} +return false; +break; +case KC_EZCTRL: +if (record->event.pressed) { + set_oneshot_mods(MOD_LCTL); + last_mod = 10; +} +return false; +break; +case KC_EZALT: +if (record->event.pressed) { + set_oneshot_mods(MOD_LALT); + last_mod = 10; +} +return false; +break; +case KC_EZGUI: +if (record->event.pressed) { + set_oneshot_mods(MOD_LGUI); + last_mod = 10; +} +return false; +break; + +#+END_SRC + +*** Arrows + +I use ctrl+shift+arrows keys a lot, so when the layer key is pressed they became +lazy versions of themselves with control and shift already pressed. + +I also added undo, copy, paste, and cut to be easily available with only the +left hand like on a qwerty or colemek keyboard. + +#+BEGIN_SRC C :noweb yes +case KC_EZRGHT: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_RGHT)); + unregister_code(KC_LCTL); + last_mod = 10; +} +return false; +break; +case KC_EZLEFT: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_LEFT)); + unregister_code(KC_LCTL); + last_mod = 10; +} +return false; +break; +case KC_EZDOWN: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_DOWN)); + unregister_code(KC_LCTL); + last_mod = 10; +} +return false; +break; +case KC_EZUP: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_UP)); + unregister_code(KC_LCTL); + last_mod = 10; +} +return false; +break; +#+END_SRC + +*** Undo, Copy, Cut, Paste + +#+BEGIN_SRC C :noweb yes +case KC_EZUNDO: +if (record->event.pressed) { + tap_code16(C(KC_Z)); + last_mod = 10; +} +return false; +break; +case KC_EZCOPY: +if (record->event.pressed) { + tap_code16(C(KC_C)); + last_mod = 10; +} +return false; +break; +case KC_EZCUT: +if (record->event.pressed) { + tap_code16(C(KC_X)); + last_mod = 10; +} +return false; +break; +case KC_EZPSTE: +if (record->event.pressed) { + tap_code16(C(KC_V)); + last_mod = 10; +} +return false; +break; +#+END_SRC + +** Commands + +Start command layer one shot + +#+BEGIN_SRC C :noweb yes +case KC_COM: +if (record->event.pressed) { + layer_on(_COMMAND); + set_oneshot_layer(_COMMAND, ONESHOT_START); + last_mod = 10; +} else { + clear_oneshot_layer_state (ONESHOT_PRESSED); +} +return false; +break; +#+END_SRC + +Just some strings I notice that I type a lot. + +#+BEGIN_SRC C :noweb yes +case KC_USER: +if (record->event.pressed) { + send_string("mhostley"); + last_mod = 10; +} +return true; +break; +case KC_EMAIL: +if (record->event.pressed) { + send_string("mhostley@gmail.com"); + last_mod = 10; +} +return true; +break; +case KC_NAME: +if (record->event.pressed) { + send_string("Samuel Jahnke"); + last_mod = 10; +} +return true; +break; +case KC_DIR: +if (record->event.pressed) { + send_string("home/mhostley/"); + last_mod = 10; +} +return true; +break; + +#+END_SRC + +** Standard inputs interupt tap + +Finally, if just a standard key is tapped, set the interupted flag. +Keep this last. + +#+BEGIN_SRC C :noweb yes +} +last_mod = 10; +return true; +} +#+END_SRC diff --git a/keyboards/planck/keymaps/samuel/config.h b/keyboards/planck/keymaps/samuel/config.h new file mode 100644 index 000000000000..95bfdd36fef0 --- /dev/null +++ b/keyboards/planck/keymaps/samuel/config.h @@ -0,0 +1 @@ +#define TAPPING_TERM 250 diff --git a/keyboards/planck/keymaps/samuel/keymap.c b/keyboards/planck/keymaps/samuel/keymap.c new file mode 100644 index 000000000000..ff1424489fc0 --- /dev/null +++ b/keyboards/planck/keymaps/samuel/keymap.c @@ -0,0 +1,359 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// where the 'T_' communicates how the key does something different when tapped. +enum planck_keycodes { +//DVORAK = SAFE_RANGE, +KC_T_LALT = SAFE_RANGE, +KC_T_RALT, +KC_T_LGUI, +KC_T_RGUI, +KC_T_LCTL, +KC_T_RCTL, +KC_T_LSFT, +KC_T_RSFT, +KC_T_LRSE, +KC_T_RRSE, +KC_EZRGHT, +KC_EZLEFT, +KC_EZUP, +KC_EZDOWN, +KC_EZUNDO, +KC_EZCOPY, +KC_EZCUT, +KC_EZPSTE, +KC_EZSHFT, +KC_EZCTRL, +KC_EZGUI, +KC_EZALT, +KC_DVORAK, +KC_QWERTY, +KC_USER, +KC_EMAIL, +KC_NAME, +KC_DIR, +KC_COM +}; + +enum planck_layers { +_DVORAK, +_QWERTY, +_RISE, +_COMMAND +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DVORAK] = + +{{ KC_T_LRSE, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_T_RRSE}, +{ KC_T_LSFT, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_T_RSFT}, +{ KC_T_LCTL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_T_RCTL}, +{ KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_BSPC, KC_TAB, KC_ENT, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_T_RGUI} +}, + +[_QWERTY] = + +{{ KC_T_LRSE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_T_RRSE}, +{ KC_T_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_T_RSFT}, +{ KC_T_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, KC_T_RCTL}, +{ KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_BSPC, KC_TAB, KC_ENT, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_DVORAK} +}, + +[_RISE] = + +{{ KC_TRANSPARENT, KC_EZUNDO, KC_EZCOPY, KC_EZCUT, KC_EZPSTE, KC_INS, KC_EQL, KC_7, KC_8, KC_9, KC_TRANSPARENT, KC_TRANSPARENT}, +{ KC_EZSHFT, KC_ESC, KC_CAPS, KC_PGUP, KC_PGDN, KC_HOME, KC_ASTR, KC_4, KC_5, KC_6, KC_0, KC_EZSHFT}, +{ KC_EZCTRL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_1, KC_2, KC_3, KC_COM, KC_EZCTRL}, +{ KC_EZGUI, KC_EZALT, KC_EZUP, KC_EZDOWN, KC_SPC, KC_AMPR, KC_PIPE, KC_END, KC_EZLEFT, KC_EZRGHT, KC_EZALT, KC_EZGUI} +}, + +[_COMMAND] = + +{{ KC_TRANSPARENT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRANSPARENT}, +{ KC_TRANSPARENT, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRANSPARENT}, +{ KC_TRANSPARENT, KC_F21, KC_F22, KC_F23, KC_F24, KC_QWERTY, KC_DVORAK, KC_USER, KC_EMAIL, KC_NAME, KC_TRANSPARENT, KC_TRANSPARENT}, +{ KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_DIR, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT} +}, + +}; + +static uint16_t tap_timer = 0; +char last_mod = 10; + +void mod_press(uint16_t tap_code, uint16_t hold_code, int id) { + // this first if body makes double modified keys impossible, but stops the + // delay when modifying a tap key which would result in the tap key not + // getting modified. + if (last_mod != id && last_mod != 10) { + tap_code16(tap_code); + last_mod = 10; + } else { + tap_timer = timer_read(); + last_mod = id; + register_code(hold_code); + } +} + +void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) { + unregister_code(hold_code); + if (last_mod == id && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(tap_code); + last_mod = 10; + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + +case KC_DVORAK: +if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); +} +return true; +break; + +case KC_QWERTY: +if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); +} +return true; +break; + +case KC_T_LALT: +if (record->event.pressed) { + mod_press(S(KC_9), KC_LALT, 0); +} else { + mod_lift(S(KC_9), KC_LALT, 0); +} +return false; +break; +case KC_T_RALT: +if (record->event.pressed) { + mod_press(S(KC_0), KC_RALT, 1); +} else { + mod_lift(S(KC_0), KC_RALT, 1); +} +return false; +break; + +case KC_T_LGUI: +if (record->event.pressed) { + mod_press(KC_GRAVE, KC_LGUI, 2); +} else { + mod_lift(KC_GRAVE, KC_LGUI, 2); +} +return false; +break; +case KC_T_RGUI: +if (record->event.pressed) { + mod_press(KC_BSLASH, KC_RGUI, 3); +} else { + mod_lift(KC_BSLASH, KC_RGUI, 3); +} +return false; +break; + +case KC_T_LCTL: +if (record->event.pressed) { + mod_press(KC_LBRACKET, KC_LCTL, 4); +} else { + mod_lift(KC_LBRACKET, KC_LCTL, 4); +} +return false; +break; +case KC_T_RCTL: +if (record->event.pressed) { + mod_press(KC_RBRACKET, KC_RCTL, 5); +} else { + mod_lift(KC_RBRACKET, KC_RCTL, 5); +} +return false; +break; + +case KC_T_LSFT: +if (record->event.pressed) { + mod_press(KC_EQUAL, KC_LSFT, 6); +} else { + mod_lift(KC_EQUAL, KC_LSFT, 6); +} +return false; +break; +case KC_T_RSFT: +if (record->event.pressed) { + mod_press(KC_MINUS, KC_RSFT, 7); +} else { + mod_lift(KC_MINUS, KC_RSFT, 7); +} +return false; +break; + +case KC_T_LRSE: +if (record->event.pressed) { + tap_timer = timer_read(); + last_mod = 8; + layer_on(_RISE); +} else { + layer_off(_RISE); + if (last_mod == 8 && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(KC_DELETE); + last_mod = 10; + } +} +return false; +break; +case KC_T_RRSE: +if (record->event.pressed) { + tap_timer = timer_read(); + last_mod = 9; + layer_on(_RISE); +} else { + layer_off(_RISE); + if (last_mod == 9 && timer_elapsed(tap_timer) < TAPPING_TERM) { + tap_code16(KC_SLASH); + last_mod = 10; + } +} +return false; +break; + +case KC_EZSHFT: +if (record->event.pressed) { + set_oneshot_mods(MOD_LSFT); + last_mod = 10; +} +return false; +break; +case KC_EZCTRL: +if (record->event.pressed) { + set_oneshot_mods(MOD_LCTL); + last_mod = 10; +} +return false; +break; +case KC_EZALT: +if (record->event.pressed) { + set_oneshot_mods(MOD_LALT); + last_mod = 10; +} +return false; +break; +case KC_EZGUI: +if (record->event.pressed) { + set_oneshot_mods(MOD_LGUI); + last_mod = 10; +} +return false; +break; + +case KC_EZRGHT: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_RGHT)); + unregister_code(KC_LCTL); + last_mod = 10; +} +return false; +break; +case KC_EZLEFT: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_LEFT)); + unregister_code(KC_LCTL); + last_mod = 10; +} +return false; +break; +case KC_EZDOWN: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_DOWN)); + unregister_code(KC_LCTL); + last_mod = 10; +} +return false; +break; +case KC_EZUP: +if (record->event.pressed) { + register_code(KC_LCTL); + tap_code16(S(KC_UP)); + unregister_code(KC_LCTL); + last_mod = 10; +} +return false; +break; + +case KC_EZUNDO: +if (record->event.pressed) { + tap_code16(C(KC_Z)); + last_mod = 10; +} +return false; +break; +case KC_EZCOPY: +if (record->event.pressed) { + tap_code16(C(KC_C)); + last_mod = 10; +} +return false; +break; +case KC_EZCUT: +if (record->event.pressed) { + tap_code16(C(KC_X)); + last_mod = 10; +} +return false; +break; +case KC_EZPSTE: +if (record->event.pressed) { + tap_code16(C(KC_V)); + last_mod = 10; +} +return false; +break; + +case KC_COM: +if (record->event.pressed) { + layer_on(_COMMAND); + set_oneshot_layer(_COMMAND, ONESHOT_START); + last_mod = 10; +} else { + clear_oneshot_layer_state (ONESHOT_PRESSED); +} +return false; +break; + +case KC_USER: +if (record->event.pressed) { + send_string("mhostley"); + last_mod = 10; +} +return true; +break; +case KC_EMAIL: +if (record->event.pressed) { + send_string("mhostley@gmail.com"); + last_mod = 10; +} +return true; +break; +case KC_NAME: +if (record->event.pressed) { + send_string("Samuel Jahnke"); + last_mod = 10; +} +return true; +break; +case KC_DIR: +if (record->event.pressed) { + send_string("home/mhostley/"); + last_mod = 10; +} +return true; +break; + +} +last_mod = 10; +return true; +} diff --git a/keyboards/planck/keymaps/sdothum/keymap.c b/keyboards/planck/keymaps/sdothum/keymap.c index 1b8a7b717b7b..59a4a25e32af 100644 --- a/keyboards/planck/keymaps/sdothum/keymap.c +++ b/keyboards/planck/keymaps/sdothum/keymap.c @@ -186,9 +186,7 @@ enum planck_keycodes { // keycodes #define ___x___ KC_TRNS #define ___fn__ KC_TRNS -#ifdef _______ -#undef _______ -#endif +#undef _______ #define _______ KC_NO #define COPY LCTL(KC_C) diff --git a/keyboards/planck/keymaps/sean/mymappings.h b/keyboards/planck/keymaps/sean/mymappings.h index cbb016e38dcc..676cf018ebb8 100644 --- a/keyboards/planck/keymaps/sean/mymappings.h +++ b/keyboards/planck/keymaps/sean/mymappings.h @@ -33,7 +33,3 @@ #define KC_MB5 KC_MS_BTN5 #define KC_MWUP KC_MS_WH_UP #define KC_MWDN KC_MS_WH_DOWN - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO diff --git a/keyboards/planck/keymaps/sgoodwin/keymap.c b/keyboards/planck/keymaps/sgoodwin/keymap.c index a7f9c6c1d342..f5efeef4597f 100644 --- a/keyboards/planck/keymaps/sgoodwin/keymap.c +++ b/keyboards/planck/keymaps/sgoodwin/keymap.c @@ -30,10 +30,6 @@ enum planck_keycodes { BACKLIT, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak diff --git a/keyboards/planck/keymaps/smt/keymap.c b/keyboards/planck/keymaps/smt/keymap.c index 895a4bf05982..1426b62a6879 100644 --- a/keyboards/planck/keymaps/smt/keymap.c +++ b/keyboards/planck/keymaps/smt/keymap.c @@ -28,10 +28,6 @@ enum planck_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/planck/keymaps/spacebarracecar/keymap.c b/keyboards/planck/keymaps/spacebarracecar/keymap.c index 14b96c8472ff..7ace78903460 100644 --- a/keyboards/planck/keymaps/spacebarracecar/keymap.c +++ b/keyboards/planck/keymaps/spacebarracecar/keymap.c @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = LAYOUT_ortho_4x12( ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, XXXXXXX, KC_ENT, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, MU_ON, XXXXXXX, XXXXXXX, XXXXXXX, _______, RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME ) diff --git a/keyboards/planck/keymaps/that_canadian/keymap.c b/keyboards/planck/keymaps/that_canadian/keymap.c index 512fc6bd4a50..131bf4108a2a 100644 --- a/keyboards/planck/keymaps/that_canadian/keymap.c +++ b/keyboards/planck/keymaps/that_canadian/keymap.c @@ -29,10 +29,6 @@ enum planck_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/planck/keymaps/thermal_printer/keymap.c b/keyboards/planck/keymaps/thermal_printer/keymap.c index 2b05f2b08e84..e43e13cd2781 100644 --- a/keyboards/planck/keymaps/thermal_printer/keymap.c +++ b/keyboards/planck/keymaps/thermal_printer/keymap.c @@ -32,10 +32,6 @@ enum planck_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/tom/config.h b/keyboards/planck/keymaps/tom/config.h new file mode 100644 index 000000000000..6fa31cc8a76f --- /dev/null +++ b/keyboards/planck/keymaps/tom/config.h @@ -0,0 +1,39 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + diff --git a/keyboards/planck/keymaps/tom/keymap.c b/keyboards/planck/keymaps/tom/keymap.c new file mode 100644 index 000000000000..e6a1411ee8bb --- /dev/null +++ b/keyboards/planck/keymaps/tom/keymap.c @@ -0,0 +1,261 @@ +/* Copyright 2015-2017 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + BACKLIT +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | / | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT +), + + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Vol- | Vol+ |Brite-|Brite+| + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_QUOT, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_BRMD, KC_BRMU +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Vol- | Vol+ |Brite-|Brite+| + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_BRMD, KC_BRMU +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + C(G(S(KC_4))), RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_ADJUST); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} + +void rgb_matrix_indicators_user(void) { + #ifdef RGB_MATRIX_ENABLE + switch (biton32(layer_state)) { + case _RAISE: + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + rgb_matrix_set_color(i, 0x6B, 0x00, 0x80); + } else { + rgb_matrix_set_color(i, 0x00, 0xFF, 0x00); + } + } + break; + + case _LOWER: + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + rgb_matrix_set_color(i, 0xFF, 0xA5, 0x00); + } else { + rgb_matrix_set_color(i, 0x00, 0x67, 0xC7); + } + } + break; + + case _ADJUST: + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + rgb_matrix_set_color(i, 0xFF, 0x99, 0x00); + } + rgb_matrix_set_color(1, 0xFF, 0x00, 0x00); + break; + + default: + break; + } + #endif +} diff --git a/keyboards/planck/keymaps/tom/readme.md b/keyboards/planck/keymaps/tom/readme.md new file mode 100644 index 000000000000..8326cc13d85b --- /dev/null +++ b/keyboards/planck/keymaps/tom/readme.md @@ -0,0 +1,35 @@ +# tomholford's layout + +This layout is data-driven: I installed [WhatPulse](https://whatpulse.org/) a few months ago and generated a heatmap of the most frequently used keys. I also optimized for my most-used programming languages, and muscle memory. + +## Changes from Default + +### QWERTY + +- swap escape and tab +- rearrange arrows in original layout +- swap rshift and Enter +- map / to original location of left arrow key + +### RAISE + +- move backslash to backspace +- map quote to original location from qwerty layer +- map brightness up / down to original location of left and up arrows +- map volume up / down to original location of down and right arrows + +### LOWER + +- move pipe to backspace +- map quote to original location from qwerty layer +- map brightness up / down to original location of left and up arrows +- map volume up / down to original location of down and right arrows + +### ADJUST + +- map to esc key: screenshot region to clipboard - an alias for ctrl + cmd + shift + 4 + + +## RGB LED + +- Illuminate when pressing RAISE, LOWER, or ADJUST ([source](https://www.reddit.com/r/olkb/comments/8wvk8s/custom_rgb_configuration_by_keycodelayer/)) diff --git a/keyboards/planck/keymaps/tom/rules.mk b/keyboards/planck/keymaps/tom/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/planck/keymaps/tom/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/planck/keymaps/tong92/keymap.c b/keyboards/planck/keymaps/tong92/keymap.c index b9cd24c01152..d85bd6e88218 100644 --- a/keyboards/planck/keymaps/tong92/keymap.c +++ b/keyboards/planck/keymaps/tong92/keymap.c @@ -23,9 +23,6 @@ enum planck_keycodes { EXT_MOUSE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define LOWER M(1) #define RAISE M(2) #define WINDOW_SHORTCUT MO(_WINDOW_SHORTCUT) diff --git a/keyboards/planck/keymaps/unicode/keymap.c b/keyboards/planck/keymaps/unicode/keymap.c index 749aaa8682e3..bc9e5326a3eb 100644 --- a/keyboards/planck/keymaps/unicode/keymap.c +++ b/keyboards/planck/keymaps/unicode/keymap.c @@ -54,11 +54,6 @@ extern keymap_config_t keymap_config; #define EXT_PLV M(13) #define TOG_OUT M(14) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/planck/keymaps/vxid/config.h b/keyboards/planck/keymaps/vxid/config.h new file mode 100644 index 000000000000..6f70f09beec2 --- /dev/null +++ b/keyboards/planck/keymaps/vxid/config.h @@ -0,0 +1 @@ +#pragma once diff --git a/keyboards/planck/keymaps/vxid/keymap.c b/keyboards/planck/keymaps/vxid/keymap.c new file mode 100644 index 000000000000..51d1daa70a09 --- /dev/null +++ b/keyboards/planck/keymaps/vxid/keymap.c @@ -0,0 +1,49 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, + KC_LCTL, KC_LGUI, KC_LALT, LOWER, RAISE, KC_MINS, KC_SPC, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, KC_GRV +), + +[_LOWER] = LAYOUT_planck_grid( + _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, _______, _______, _______, KC_DEL, + _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_RAISE] = LAYOUT_planck_grid( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_ADJUST] = LAYOUT_planck_grid( + RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/planck/keymaps/vxid/readme.md b/keyboards/planck/keymaps/vxid/readme.md new file mode 100644 index 000000000000..9e0ae33423bb --- /dev/null +++ b/keyboards/planck/keymaps/vxid/readme.md @@ -0,0 +1,13 @@ +# vxid planck layout + +## Layout + +This planck layout aims at proviging most symbols on the base layer while remaining usable. +The minus and space keys become alt and gui modifiers when pressed. +Arrow keys are located on hjkl on the lower layer. + +## Building + +``` + make planck/rev6:vxid:dfu-util +``` diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index 89be16f5fd73..f6ece4d1e787 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -15,10 +15,6 @@ #define _FUNC 6 #define _NAV 7 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* _QWERTY diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index e9866883b4b2..5de64de955d3 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -5,9 +5,6 @@ #include "keymap_colemak.h" extern keymap_config_t keymap_config; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #undef C #define C(n) RCTL(n) #define CADKEY RCTL(RALT(KC_DEL)) diff --git a/keyboards/planck/keymaps/zrichard/keymap.c b/keyboards/planck/keymaps/zrichard/keymap.c index 151ec877b2b5..a792560bd4ee 100755 --- a/keyboards/planck/keymaps/zrichard/keymap.c +++ b/keyboards/planck/keymaps/zrichard/keymap.c @@ -113,8 +113,6 @@ enum { #define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT KC_FN0 -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX diff --git a/keyboards/planck/light/config.h b/keyboards/planck/light/config.h index 17c015ed0fdf..c7bc9cb1a381 100644 --- a/keyboards/planck/light/config.h +++ b/keyboards/planck/light/config.h @@ -39,7 +39,7 @@ #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 25 #define DRIVER_2_LED_TOTAL 24 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #endif diff --git a/keyboards/planck/light/light.c b/keyboards/planck/light/light.c index f463090dd0b8..896ec44587c6 100644 --- a/keyboards/planck/light/light.c +++ b/keyboards/planck/light/light.c @@ -77,65 +77,24 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {1, C9_14, C8_14, C7_14} }; -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { - - /*{row | col << 4} - | {x=0..224, y=0..64} - | | modifier - | | | */ - {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, - {{0|(1<<4)}, {20.36*1, 21.33*0}, 0}, - {{0|(2<<4)}, {20.36*2, 21.33*0}, 0}, - {{0|(3<<4)}, {20.36*3, 21.33*0}, 0}, - {{0|(4<<4)}, {20.36*4, 21.33*0}, 0}, - {{0|(5<<4)}, {20.36*5, 21.33*0}, 0}, - {{0|(6<<4)}, {20.36*6, 21.33*0}, 0}, - {{0|(7<<4)}, {20.36*7, 21.33*0}, 0}, - {{0|(8<<4)}, {20.36*8, 21.33*0}, 0}, - {{0|(9<<4)}, {20.36*9, 21.33*0}, 0}, - {{0|(10<<4)}, {20.36*10,21.33*0}, 0}, - {{0|(11<<4)}, {20.36*11,21.33*0}, 1}, - - {{1|(0<<4)}, {20.36*0, 21.33*1}, 1}, - {{1|(1<<4)}, {20.36*1, 21.33*1}, 0}, - {{1|(2<<4)}, {20.36*2, 21.33*1}, 0}, - {{1|(3<<4)}, {20.36*3, 21.33*1}, 0}, - {{1|(4<<4)}, {20.36*4, 21.33*1}, 0}, - {{1|(5<<4)}, {20.36*5, 21.33*1}, 0}, - {{1|(6<<4)}, {20.36*6, 21.33*1}, 0}, - {{1|(7<<4)}, {20.36*7, 21.33*1}, 0}, - {{1|(8<<4)}, {20.36*8, 21.33*1}, 0}, - {{1|(9<<4)}, {20.36*9, 21.33*1}, 0}, - {{1|(10<<4)}, {20.36*10,21.33*1}, 0}, - {{1|(11<<4)}, {20.36*11,21.33*1}, 1}, - - {{2|(0<<4)}, {20.36*0, 21.33*2}, 1}, - {{2|(1<<4)}, {20.36*1, 21.33*2}, 0}, - {{2|(2<<4)}, {20.36*2, 21.33*2}, 0}, - {{2|(3<<4)}, {20.36*3, 21.33*2}, 0}, - {{2|(4<<4)}, {20.36*4, 21.33*2}, 0}, - {{2|(5<<4)}, {20.36*5, 21.33*2}, 0}, - {{2|(6<<4)}, {20.36*6, 21.33*2}, 0}, - {{2|(7<<4)}, {20.36*7, 21.33*2}, 0}, - {{2|(8<<4)}, {20.36*8, 21.33*2}, 0}, - {{2|(9<<4)}, {20.36*9, 21.33*2}, 0}, - {{2|(10<<4)}, {20.36*10,21.33*2}, 0}, - {{2|(11<<4)}, {20.36*11,21.33*2}, 1}, - - {{3|(0<<4)}, {20.36*0, 21.33*3}, 1}, - {{3|(1<<4)}, {20.36*1, 21.33*3}, 1}, - {{3|(2<<4)}, {20.36*2, 21.33*3}, 1}, - {{3|(3<<4)}, {20.36*3, 21.33*3}, 1}, - {{3|(4<<4)}, {20.36*4, 21.33*3}, 1}, - {{3|(5<<4)}, {20.36*5, 21.33*3}, 0}, - {{3|(5<<4)}, {20.36*5.5,21.33*3}, 0}, - {{3|(6<<4)}, {20.36*6, 21.33*3}, 0}, - {{3|(7<<4)}, {20.36*7, 21.33*3}, 1}, - {{3|(8<<4)}, {20.36*8, 21.33*3}, 1}, - {{3|(9<<4)}, {20.36*9, 21.33*3}, 1}, - {{3|(10<<4)}, {20.36*10,21.33*3}, 1}, - {{3|(11<<4)}, {20.36*11,21.33*3}, 1} -}; +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }, + { 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 }, + { 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 }, + { 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48 } +}, { + { 0, 0 }, { 20, 0 }, { 40, 0 }, { 61, 0 }, { 81, 0 }, { 101, 0 }, { 122, 0 }, { 142, 0 }, { 162, 0 }, { 183, 0 }, { 203, 0 }, { 223, 0 }, + { 0, 21 }, { 20, 21 }, { 40, 21 }, { 61, 21 }, { 81, 21 }, { 101, 21 }, { 122, 21 }, { 142, 21 }, { 162, 21 }, { 183, 21 }, { 203, 21 }, { 223, 21 }, + { 0, 42 }, { 20, 42 }, { 40, 42 }, { 61, 42 }, { 81, 42 }, { 101, 42 }, { 122, 42 }, { 142, 42 }, { 162, 42 }, { 183, 42 }, { 203, 42 }, { 223, 42 }, + { 0, 63 }, { 20, 63 }, { 40, 63 }, { 61, 63 }, { 81, 63 }, { 101, 63 }, { 111, 63 }, { 122, 63 }, { 142, 63 }, { 162, 63 }, { 183, 63 }, { 203, 63 }, + { 223, 63 } +}, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1, + 1 +} }; void matrix_init_kb(void) { @@ -151,6 +110,16 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) return process_record_user(keycode, record); } +uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { + // Spacebar has 2 leds 41 & 42, so add 42 to the array here, and 41 will be added + // by the default lookup code that runs after this + if (row == 3 && column == 5) { + led_i[0] = 42; + return 1; + } + return 0; +} + void matrix_scan_kb(void) { matrix_scan_user(); diff --git a/keyboards/planck/light/rules.mk b/keyboards/planck/light/rules.mk index c10b8fd1da5e..b621a9abb0ff 100644 --- a/keyboards/planck/light/rules.mk +++ b/keyboards/planck/light/rules.mk @@ -1,5 +1,36 @@ -MIDI_ENABLE = yes +# MCU name +MCU = at90usb1286 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = atmel-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = yes # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. RGB_MATRIX_ENABLE = yes +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -MCU = at90usb1286 \ No newline at end of file +LAYOUTS = ortho_4x12 planck_mit +LAYOUTS_HAS_RGB = no diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h index d908d80ec4a3..4bc5e9c3f28e 100644 --- a/keyboards/planck/planck.h +++ b/keyboards/planck/planck.h @@ -5,6 +5,10 @@ #define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise) +#ifdef KEYBOARD_planck_ez + #include "ez.h" +#endif + #ifdef __AVR__ #define LAYOUT_planck_mit( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ @@ -50,7 +54,7 @@ #define LAYOUT_ortho_4x12 LAYOUT_planck_grid #define KC_LAYOUT_ortho_4x12 KC_KEYMAP -#else +#elif KEYBOARD_planck_rev6 #define LAYOUT_planck_1x2uC( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ diff --git a/keyboards/planck/readme.md b/keyboards/planck/readme.md index 083279e8a62d..94b256c74518 100644 --- a/keyboards/planck/readme.md +++ b/keyboards/planck/readme.md @@ -6,7 +6,7 @@ Planck A compact 40% (12x4) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/planck/) Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) -Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, Teensy 2.0 +Hardware Supported: Planck PCB rev1, rev2, rev3, rev4, rev5, rev6; Planck Light Hardware Availability: [OLKB.com](https://olkb.com), [Massdrop](https://www.massdrop.com/buy/planck-mechanical-keyboard?mode=guest_open) Make example for this keyboard (after setting up your build environment): @@ -15,6 +15,7 @@ Make example for this keyboard (after setting up your build environment): Install examples: - make planck/rev6:default:dfu-util + make planck/rev5:default:dfu # For Planck rev5 or earlier and Planck Light + make planck/rev6:default:dfu-util # For Planck rev6 -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). diff --git a/keyboards/planck/rev1/rules.mk b/keyboards/planck/rev1/rules.mk index e51af55c6686..be03e4515eff 100644 --- a/keyboards/planck/rev1/rules.mk +++ b/keyboards/planck/rev1/rules.mk @@ -1 +1,29 @@ -AUDIO_ENABLE = no # Audio output on port C6 +# MCU name +MCU = atmega32u4 + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_4x12 planck_mit +LAYOUTS_HAS_RGB = no diff --git a/keyboards/planck/rev2/rules.mk b/keyboards/planck/rev2/rules.mk index e51af55c6686..be03e4515eff 100644 --- a/keyboards/planck/rev2/rules.mk +++ b/keyboards/planck/rev2/rules.mk @@ -1 +1,29 @@ -AUDIO_ENABLE = no # Audio output on port C6 +# MCU name +MCU = atmega32u4 + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_4x12 planck_mit +LAYOUTS_HAS_RGB = no diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk index e51af55c6686..3de40a66c582 100644 --- a/keyboards/planck/rev3/rules.mk +++ b/keyboards/planck/rev3/rules.mk @@ -1 +1,35 @@ -AUDIO_ENABLE = no # Audio output on port C6 +# MCU name +MCU = atmega32u4 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = atmel-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_4x12 planck_mit +LAYOUTS_HAS_RGB = no diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk index 7e64e7edc4f5..390f5824948a 100644 --- a/keyboards/planck/rev4/rules.mk +++ b/keyboards/planck/rev4/rules.mk @@ -1 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = atmel-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_4x12 planck_mit +LAYOUTS_HAS_RGB = no diff --git a/keyboards/planck/rev5/rules.mk b/keyboards/planck/rev5/rules.mk index 7e64e7edc4f5..ca63b39acf54 100644 --- a/keyboards/planck/rev5/rules.mk +++ b/keyboards/planck/rev5/rules.mk @@ -1 +1,35 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = qmk-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_4x12 planck_mit +LAYOUTS_HAS_RGB = no diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index 1f3d1dfe5840..c582750025ca 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk @@ -5,20 +5,35 @@ LAYOUTS += ortho_4x12 # Cortex version MCU = STM32F303 +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + # Build Options -# comment out to disable the options. +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically # -BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -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 +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# 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 = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover + CUSTOM_MATRIX = yes # Custom matrix file -AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = no # SERIAL_LINK_ENABLE = yes ENCODER_ENABLE = yes + +LAYOUTS = ortho_4x12 planck_mit +LAYOUTS_HAS_RGB = no diff --git a/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c b/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c index 3506efe80491..a3450118a153 100644 --- a/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c +++ b/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c @@ -11,9 +11,6 @@ #include QMK_KEYBOARD_H -// Helpful defines -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //Base Layer [0] = LAYOUT( diff --git a/keyboards/playkbtw/pk60/keymaps/default/keymap.c b/keyboards/playkbtw/pk60/keymaps/default/keymap.c index 67969b25deb7..d0fbc619f5bb 100644 --- a/keyboards/playkbtw/pk60/keymaps/default/keymap.c +++ b/keyboards/playkbtw/pk60/keymaps/default/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( \ @@ -60,4 +58,4 @@ void led_set_user(uint8_t usb_led) { } -} \ No newline at end of file +} diff --git a/keyboards/playkbtw/pk60/keymaps/rfvizarra/keymap.c b/keyboards/playkbtw/pk60/keymaps/rfvizarra/keymap.c new file mode 100644 index 000000000000..e439d4462e44 --- /dev/null +++ b/keyboards/playkbtw/pk60/keymaps/rfvizarra/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_minila( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRAVE, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(2), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + + [1] = LAYOUT_minila( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_MPLY + ), + + [2] = LAYOUT_minila( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, RGB_TOG, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + _______, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_RMOD, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), +}; diff --git a/keyboards/playkbtw/pk60/keymaps/rfvizarra/readme.md b/keyboards/playkbtw/pk60/keymaps/rfvizarra/readme.md new file mode 100644 index 000000000000..cd9a22108796 --- /dev/null +++ b/keyboards/playkbtw/pk60/keymaps/rfvizarra/readme.md @@ -0,0 +1,11 @@ +# A personal keymap for Play Keyboard60 based on the minila layout + +![Mininla layout](https://i.imgur.com/K7ONE1k.jpg) + +To build the firmware use + + make playkbtw/pk60:rfvizarra + +or if you prefer to use docker + + util/docker_build.sh playkbtw/pk60:rfvizarra diff --git a/keyboards/preonic/keymaps/0xdec/keymap.c b/keyboards/preonic/keymaps/0xdec/keymap.c index 5f82087b0173..28277bd5f4ca 100644 --- a/keyboards/preonic/keymaps/0xdec/keymap.c +++ b/keyboards/preonic/keymaps/0xdec/keymap.c @@ -11,10 +11,6 @@ enum preonic_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak diff --git a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c index ba703a2080b3..a5727707885d 100644 --- a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c +++ b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c @@ -25,10 +25,6 @@ #define RAISE M(_RAISE) #define M_BL 5 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/preonic/keymaps/bucktooth/keymap.c b/keyboards/preonic/keymaps/bucktooth/keymap.c index d3bcf66efa50..f03e469d709b 100644 --- a/keyboards/preonic/keymaps/bucktooth/keymap.c +++ b/keyboards/preonic/keymaps/bucktooth/keymap.c @@ -4,10 +4,6 @@ #define L_QWERTSPLITLY 0 #define L_FN 1 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for Mac specific key accelerators used in map. Some of these are very awkward to type. // These are the default bindings for Mac, some of which may be turned off or changed, check your // settings in System Preferences @@ -32,32 +28,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QwertSplitly * ,-----------------------------------------------------------------------------------. - * | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | + * | 1 | 2 | 3 | 4 | 5 | = | ` | 6 | 7 | 8 | 9 | 0 | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Q | W | E | R | T | [ | ] | Y | U | I | O | P | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | A | S | D | F | G | ` | ' | H | J | K | L | ; | + * | A | S | D | F | G | - | ' | H | J | K | L | ; | * |------+------+------+------+------+------|------+------+------+------+------+------| - * |LShift| Z | X | C | V | B | \ | / | N | M | , |./RSft| + * |LShift| Z | X | C | V | \ | / | B | N | M | , |./RSft| * |------+------+------+------+------+------+------+------+------+------+------+------| * |ESC/fn|LCtrl | LOpt | LCmd |Space | Tab | BkSp |Space |En/Cmd|<-/fn |CRSR v|CRSR->| * `-----------------------------------------------------------------------------------' */ [L_QWERTSPLITLY] = LAYOUT_preonic_grid( \ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINUS,KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL ,KC_GRAVE,KC_6, KC_7, KC_8, KC_9, KC_0, \ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - KC_A, KC_S, KC_D, KC_F, KC_G, KC_GRAVE,KC_QUOTE,KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSLS, KC_SLASH,KC_N, KC_M, KC_COMM, MT_RSDOT,\ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_MINUS,KC_QUOTE,KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_BSLS, KC_SLASH,KC_B, KC_N, KC_M, KC_COMM, MT_RSDOT,\ LT_FNESC,KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_TAB, KC_BSPC, KC_SPC, MT_RGENT,LT_FNLFT,KC_DOWN, KC_RIGHT \ ), /* Fn * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | Vol- | Vol+ | F6 | F7 | F8 | F9 | F10 | + * | F1 | F2 | F3 | F4 | F5 | Vol+ | Mute | F6 | F7 | F8 | F9 | F10 | * |------+------+------+------+------+------+------+------+------+------+------+------| * | F11 | F12 | F13 | F14 | F15 |Track-|Track+|M:WhUp|M:Lclk| M:Up |M:Rclk| PgUp | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps |^LPad |^DashB|^Help |^Drawr| Mute | |>|| |M:WhDn|M:Left|M:Down|M:Rght| PgDn | + * | Caps |^LPad |^DashB|^Help |^Drawr| Vol- | |>|| |M:WhDn|M:Left|M:Down|M:Rght| PgDn | * |------+------+------+------+------+------|------+------+------+------+------+------| * |RShift|^Menu |^SMenu|^Dock |^Tools|^Notif| Ins |M:Slow|M:Norm|M:Fast| Home | End | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -65,9 +61,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [L_FN] = LAYOUT_preonic_grid( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_VOLD, KC_VOLU, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_VOLU, KC_MUTE, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_MRWD, KC_MFFD, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_PGUP, \ - KC_CAPS, MF_LPAD, MF_DASH, MF_HELP, MF_DRWR, KC_MUTE, KC_MPLY, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_PGDN, \ + KC_CAPS, MF_LPAD, MF_DASH, MF_HELP, MF_DRWR, KC_VOLD, KC_MPLY, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_PGDN, \ KC_RSFT, MF_MENU, MF_STAT, MF_DOCK, MF_TOOL, MF_NOTI, KC_INS, KC_ACL0, KC_ACL1, KC_ACL2, KC_HOME, KC_END, \ _______, KC_RCTL, KC_RALT, KC_RGUI, _______, LS_TAB, KC_DEL, _______, KC_PENT, _______, KC_UP, KC_LEFT \ ) @@ -97,14 +93,12 @@ void matrix_init_user(void) { void startup_user() { - _delay_ms(20); // gets rid of tick PLAY_SONG(tone_startup); } void shutdown_user() { PLAY_SONG(tone_goodbye); - _delay_ms(150); stop_all_notes(); } diff --git a/keyboards/preonic/keymaps/bucktooth/readme.md b/keyboards/preonic/keymaps/bucktooth/readme.md index a1bda9f6a2b3..4c1c62721146 100644 --- a/keyboards/preonic/keymaps/bucktooth/readme.md +++ b/keyboards/preonic/keymaps/bucktooth/readme.md @@ -1,4 +1,4 @@ -# Bucktooth v1.0 (Mac) +# Bucktooth v2.0 (Mac) Bucktooth is an alternate layout that pushes the letters to the edges and puts most punctuation in the center. It's derived in part from my experience with Ergodox boards. I call the main layer layout QWERTSplitlY, you may notice the right side punctuation moving to the center and the control keys missing from the left. @@ -6,13 +6,13 @@ Bucktooth is an alternate layout that pushes the letters to the edges and puts m QwertSplitly ,-----------------------------------------------------------------------------------. - | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | + | 1 | 2 | 3 | 4 | 5 | + | ` | 6 | 7 | 8 | 9 | 0 | |------+------+------+------+------+------+------+------+------+------+------+------| | Q | W | E | R | T | [ | ] | Y | U | I | O | P | |------+------+------+------+------+-------------+------+------+------+------+------| - | A | S | D | F | G | ` | ' | H | J | K | L | ; | + | A | S | D | F | G | - | ' | H | J | K | L | ; | |------+------+------+------+------+------|------+------+------+------+------+------| - |LShift| Z | X | C | V | B | \ | / | N | M | , |./RSft| + |LShift| Z | X | C | V | \ | / | B | N | M | , |./RSft| |------+------+------+------+------+------+------+------+------+------+------+------| |ESC/fn|LCtrl | LOpt | LCmd |Space | Tab | BkSp |Space |En/Cmd|<-/fn |CRSR v|CRSR->| `-----------------------------------------------------------------------------------' @@ -24,6 +24,12 @@ That left shift is the only control or modifier key on the top four rows. All th With all control keys on the bottom row, the ESC key now lives in the bottom left and on my keyboard I actually put a very heavy keyswitch in that space to keep me from hitting it accidentally instead of ctrl. Hold it down and it becomes fn. I usually hit it with my whole hand since it is in the corner, without moving my fingers down to it. +## Revision 2 Changes + +The move of B to the right side of the keyboard may be controversial but has felt more and more comfortable to me. Again if you split a staggered layout keyboard down a straight line B has more in common with Y than T. I don't understand breaking the board into left and right on anything but a vertical line despite the long history of bringing the staggered layout slewing left. + +Revision 2 also changes the positions of -, =, and ~ for better compatibility with sculpted profile keysets which offer a Dvorak set option that provides the middle row dash because a middle row backtick/tilde is not found anywhere. + ## Function Layer There are no raise and lower or multiple function pages. The Preonic has enough keys to avoid more than a single function page, and I prefer to have spacebars for both thumbs so the "Bucktooth" name comes from the typical keyset with darker function keys and lighter alphas and space keys giving the keyboard fang-like appearance where the two spaces are. @@ -31,11 +37,11 @@ There are no raise and lower or multiple function pages. The Preonic has enough Fn ,-----------------------------------------------------------------------------------. - | F1 | F2 | F3 | F4 | F5 | Vol- | Vol+ | F6 | F7 | F8 | F9 | F10 | + | F1 | F2 | F3 | F4 | F5 | Vol+ | Mute | F6 | F7 | F8 | F9 | F10 | |------+------+------+------+------+------+------+------+------+------+------+------| | F11 | F12 | F13 | F14 | F15 |Track-|Track+|M:WhUp|M:Lclk| M:Up |M:Rclk| PgUp | |------+------+------+------+------+-------------+------+------+------+------+------| - | Caps |^LPad |^DashB|^Help |^Drawr| Mute | |>|| |M:WhDn|M:Left|M:Down|M:Rght| PgDn | + | Caps |^LPad |^DashB|^Help |^Drawr| Vol- | |>|| |M:WhDn|M:Left|M:Down|M:Rght| PgDn | |------+------+------+------+------+------|------+------+------+------+------+------| |RShift|^Menu |^SMenu|^Dock |^Tools|^Notif| Ins |M:Slow|M:Norm|M:Fast| Home | End | |------+------+------+------+------+------+------+------+------+------+------+------| @@ -50,6 +56,6 @@ The cursor keys are a design I stole from the old Commodore computers which had On Fn layer ZXCVB and SDFG keys I have set up the default key bindings for Mac OS Keyboard Focus keys since they are obscure and require FKeys mostly. They are pretty convenient for using the keyboard to search the menus, go to the dock, etc. Some like the one to jump to a window's toolbar and the one to jump to a window's accessory drawer are less commonly used. -___ +--- -Contributed to QMK and released with the QMK license by J. Eric Mason, 3/16/2018 +Contributed to QMK and released with the QMK license by Jeri C. Mason, 3/16/2018 - Revision 2 2/26/2019 diff --git a/keyboards/preonic/keymaps/default/config.h b/keyboards/preonic/keymaps/default/config.h index 205351258267..40a9524b469d 100644 --- a/keyboards/preonic/keymaps/default/config.h +++ b/keyboards/preonic/keymaps/default/config.h @@ -1,7 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(PREONIC_SOUND) @@ -38,5 +35,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/dlaroe/keymap.c b/keyboards/preonic/keymaps/dlaroe/keymap.c index 77a2a44cfb87..888a21c063ff 100644 --- a/keyboards/preonic/keymaps/dlaroe/keymap.c +++ b/keyboards/preonic/keymaps/dlaroe/keymap.c @@ -24,10 +24,6 @@ enum preonic_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/preonic/keymaps/fsck/config.h b/keyboards/preonic/keymaps/fsck/config.h new file mode 100644 index 000000000000..b06980c5b0d5 --- /dev/null +++ b/keyboards/preonic/keymaps/fsck/config.h @@ -0,0 +1,26 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * 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 diff --git a/keyboards/preonic/keymaps/fsck/keymap.c b/keyboards/preonic/keymaps/fsck/keymap.c new file mode 100644 index 000000000000..97a0ed608977 --- /dev/null +++ b/keyboards/preonic/keymaps/fsck/keymap.c @@ -0,0 +1,249 @@ +/* Copyright 2015-2017 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + BACKLIT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Brite | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( \ + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + 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_LCTL, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( \ + 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + 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_VOLD,KC_VOLU,_______, \ + _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( \ + 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + 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_VOLD, KC_VOLU, _______, + _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef __AVR__ + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + PORTE |= (1<<6); + #endif + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/fsck/readme.md b/keyboards/preonic/keymaps/fsck/readme.md new file mode 100644 index 000000000000..e459884eb6a9 --- /dev/null +++ b/keyboards/preonic/keymaps/fsck/readme.md @@ -0,0 +1,5 @@ +![preonic:fsck Layout Image](https://i.imgur.com/nI8fBco.png) + +# fsck's Preonic Layout + +This is based on the fsck layout for the Planck keyboard and similar to the Preonic default layout. \ No newline at end of file diff --git a/keyboards/preonic/keymaps/fsck/rules.mk b/keyboards/preonic/keymaps/fsck/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/preonic/keymaps/fsck/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c index ffd588945593..e4cd76b84d3d 100644 --- a/keyboards/preonic/keymaps/jacwib/keymap.c +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -22,10 +22,6 @@ enum preonic_keycodes { MRAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/preonic/keymaps/juno/config.h b/keyboards/preonic/keymaps/juno/config.h new file mode 100644 index 000000000000..6387debbb17e --- /dev/null +++ b/keyboards/preonic/keymaps/juno/config.h @@ -0,0 +1,37 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * 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 2 \ No newline at end of file diff --git a/keyboards/preonic/keymaps/juno/keymap.c b/keyboards/preonic/keymaps/juno/keymap.c new file mode 100644 index 000000000000..2e3152d299d6 --- /dev/null +++ b/keyboards/preonic/keymaps/juno/keymap.c @@ -0,0 +1,313 @@ +/* Juno's Preonic Layout */ + +#include QMK_KEYBOARD_H + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST, + + _FN1, + _DPAD +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT, + + FN1, + DP_ON, + DP_OFF +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | FN1 | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_DEL, \ + MO(_FN1),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 , \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_preonic_grid( \ + 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_preonic_grid( \ + 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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( \ + 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + 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, _______, _______, KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( \ + 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + 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 \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_ADJUST] = LAYOUT_preonic_grid( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Function (personal function layer) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Vol- | | Vol+ | | | | PgUp | Up | PgDn | PScr | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | Home | Left | Down |Right | Ins | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Prev | Play | Next | Brite| | End | | Vol- | Vol+ | Mute | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | Caps | | Space | | DP_ON| | | | + * `-----------------------------------------------------------------------------------' + */ +[_FN1] = LAYOUT_preonic_grid( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_VOLD, _______, KC_VOLU, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_DEL , \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL , \ + KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT, BACKLIT, _______, KC_END, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_CAPS, _______, KC_SPC, KC_SPC, _______, DP_ON, _______, _______, _______ \ +), + +/* DPAD layer, for active arrow cluster at the bottom right corner + * Use TG() to enable, but FUNC() to disable (defined at end of file) + * All layers clearing required + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | |Lower | Space |Raise |DP_OFF| Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DPAD] = LAYOUT_preonic_grid( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , \ + KC_LCTL, KC_LGUI, KC_LALT, _______, LOWER, KC_SPC, KC_SPC, RAISE, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT \ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); + + float caps_song_on[][2] = SONG(NUM_LOCK_ON_SOUND); + float caps_song_off[][2] = SONG(SCROLL_LOCK_ON_SOUND); + + float dpad_song_on[][2] = SONG(ZELDA_PUZZLE); + float dpad_song_off[][2] = SONG(SONIC_RING); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + PORTE &= ~(1<<6); + } else { + unregister_code(KC_RSFT); + PORTE |= (1<<6); + } + return false; + break; + + + + // Additional personal custom functions + + case KC_CAPS: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + if (host_keyboard_leds() & (1<event.pressed) { + + } else { + // activated upon release + #ifdef AUDIO_ENABLE + PLAY_SONG(dpad_song_on); + #endif + + layer_off(_FN1); + layer_on(_DPAD); + } + + case DP_OFF: + if (record->event.pressed) { + // deactivated upon pressdown + #ifdef AUDIO_ENABLE + PLAY_SONG(dpad_song_off); + #endif + + //layer_off(_FN1); // do not put in this line + layer_off(_DPAD); + } + + } + return true; +}; diff --git a/keyboards/preonic/keymaps/juno/readme.md b/keyboards/preonic/keymaps/juno/readme.md new file mode 100644 index 000000000000..e911968dd964 --- /dev/null +++ b/keyboards/preonic/keymaps/juno/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file diff --git a/keyboards/preonic/keymaps/juno/rules.mk b/keyboards/preonic/keymaps/juno/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/preonic/keymaps/kinesis/keymap.c b/keyboards/preonic/keymaps/kinesis/keymap.c index 93fd99163583..44d51da4a082 100644 --- a/keyboards/preonic/keymaps/kinesis/keymap.c +++ b/keyboards/preonic/keymaps/kinesis/keymap.c @@ -8,9 +8,6 @@ #define _FN 1 #define _ULCK 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define HYP_TIC ALL_T(KC_GRV) #define EQ_LOCK TD(TD_EQ_LOCK) #define MIN_ULK TD(TD_MIN_ULOCK) diff --git a/keyboards/preonic/keymaps/kuatsure/config.h b/keyboards/preonic/keymaps/kuatsure/config.h index bae774211a48..ba0ed525e037 100644 --- a/keyboards/preonic/keymaps/kuatsure/config.h +++ b/keyboards/preonic/keymaps/kuatsure/config.h @@ -3,9 +3,6 @@ #include "config_common.h" -#define NO_AUTO_SHIFT_SPECIAL -#define NO_AUTO_SHIFT_ALPHA - #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(PREONIC_SOUND) // #define STARTUP_SONG SONG(NO_SOUND) diff --git a/keyboards/preonic/keymaps/kuatsure/keymap.c b/keyboards/preonic/keymaps/kuatsure/keymap.c index 5a7fa40e56d4..907360d0cfa1 100644 --- a/keyboards/preonic/keymaps/kuatsure/keymap.c +++ b/keyboards/preonic/keymaps/kuatsure/keymap.c @@ -20,20 +20,16 @@ enum preonic_layers { _QWERTY, _GAME, - _GAME_MOD, _LOWER, _RAISE, _ADJUST, }; enum preonic_keycodes { - QWERTY = SAFE_RANGE, + QWERTY = USER_SAFE_RANGE, GAME, - GAME_MOD, LOWER, RAISE, - - END_OF_LINE, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -42,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | + * | Tab/M| Q | W | E | R | T | Y | U | I | O | P | \ | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc/C| A | S | D | F | G | H | J | K | L | ; | ' | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -53,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = LAYOUT_preonic_grid_wrapper( \ KC_GRV, _________________NUMBER_L1_________________, _________________NUMBER_R1_________________, KC_BSPC, \ - KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, \ + KT_MTAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, \ KT_CESC, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, \ KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT, \ KC_LEAD, GAME, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ @@ -61,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Game * - * Mostly transparent, but wanted to disable gui key, and give different raise / lower layers ( game_mod ). + * Mostly transparent, but wanted to disable gui key. * Also give a key to get back to qwerty layout. * * ,-----------------------------------------------------------------------------------. @@ -73,104 +69,83 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | |Qwerty| | Spc |Game+ | |Game+ | | | | | + * | |Qwerty| | Spc | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_GAME] = LAYOUT_preonic_grid_wrapper( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, QWERTY, _______, KC_SPC, GAME_MOD, _______, _______, GAME_MOD, _______, _______, _______, _______ \ -), - -/* Game Modifiers - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F9 | F10 | F11 | F12 | ` | | 7 | 8 | 9 | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F5 | F6 | F7 | F8 | ~ | | 4 | 5 | 6 | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * |Shift | F1 | F2 | F3 | F4 | | | 1 | 2 | 3 | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | 0 | 0 | | | - * `-----------------------------------------------------------------------------------' - */ -[_GAME_MOD] = LAYOUT_preonic_grid_wrapper( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, ____________FUNCTION_3____________, KC_GRV, _______, KC_7, KC_8, KC_9, _______, _______, \ - _______, ____________FUNCTION_2____________, KC_TILD, _______, KC_4, KC_5, KC_6, _______, _______, \ - KC_LSFT, ____________FUNCTION_1____________, _______, _______, KC_1, KC_2, KC_3, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, QWERTY, _______, KC_SPC, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* Lower * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * | E`~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | Up | | ` | | { | } | _ | | | | + * | | | | Up | | ` | < | { | } | _ | | | | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | Del | Left | Down | Right| ~ | = | ( | ) | + | : | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Vol- | Prev | Play | Next | Vol+ | - | [ | ] | | ? | | + * | | Vol- | Prev | Play | Next | Vol+ | - | [ | ] | > | ? | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Mute | | | | | | Home | PgUp | PgDwn| End | + * | | Mute | | | | | | Home | PgDn | PgUp | End | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_preonic_grid_wrapper( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - _______, _______, _______, KC_UP, _______, KC_GRV, _______, KC_LCBR, KC_RCBR, KC_UNDS, _______, KC_PIPE, \ - _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TILD, KC_EQL, KC_LPRN, KC_RPRN, KC_PLUS, KC_COLN, KC_DQT , \ - _______, KC_VOLD, KC_MRWD, KC_MPLY, KC_MFFD, KC_VOLU, KC_MINS, KC_LBRC, KC_RBRC, _______, KC_QUES, _______, \ - _______, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END \ + KC_GESC, _________________SYMBOL_L1_________________, _________________SYMBOL_R1_________________, _______, \ + _______, _______, _______, KC_UP, _______, KC_GRV, _______, ____CRBRACES____, KC_UNDS, _______, KC_PIPE, \ + _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TILD, KC_EQL, _____PARENS_____, KC_PLUS, KC_COLN, KC_DQT , \ + _______, KC_VOLD, KC_MRWD, KC_MPLY, KC_MFFD, KC_VOLU, KC_MINS, ___SQBRACKETS___, _______, KC_QUES, _______, \ + _______, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ ), /* Raise * ,-----------------------------------------------------------------------------------. - * | E`~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F9 | F10 | F11 | F12 | | | { | } | | | Bksp | + * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F5 | F6 | F7 | F8 | | | ( | ) | < | > | | + * | | F9 | F10 | F11 | F12 | | * | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F5 | F6 | F7 | F8 | | = | 4 | 5 | 6 | + | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | | | [ | ] | | | | + * | | F1 | F2 | F3 | F4 | | - | 1 | 2 | 3 | / | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | Enter | | Home | PgUp | PgDwn| End | + * | | | | | | | | 0 | 0 | | | * `-----------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_preonic_grid_wrapper( \ - KC_GESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - _______, ____________FUNCTION_3____________, _______, _______, KC_LCBR, KC_RCBR, _______, _______, KC_BSPC, \ - _______, ____________FUNCTION_2____________, _______, _______, KC_LPRN, KC_RPRN, KC_LT, KC_GT, _______, \ - _______, ____________FUNCTION_1____________, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, \ - _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, ____________FUNCTION_3____________, _______, KC_ASTR, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, ____________FUNCTION_2____________, _______, KC_EQL, KC_4, KC_5, KC_6, KC_PLUS, _______, \ + _______, ____________FUNCTION_1____________, _______, KC_MINS, KC_1, KC_2, KC_3, KC_SLASH, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______ \ ), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| Debug| | | | | | | | | Del | + * | | MAKE | FLSH | | | | | | | | | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | |Aud on|AudOff| | | | | | + * | | RESET| DEBUG| | |Aud on|AudOff| | | | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | |MusMod|Mus on|MusOff| | | | | | + * | | VRSN | | |MusMod|Mus on|MusOff| | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | |Qwerty| Game | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_preonic_grid_wrapper( \ ____________FUNCTION_1____________, ____________FUNCTION_2____________, ____________FUNCTION_3____________, \ - _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, MU_MOD, MU_ON, MU_OFF, _______, _______, _______, _______, _______, \ + _______, KB_MAKE, KB_FLSH, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, RESET, DEBUG, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, \ + _______, KB_VRSN, _______, _______, MU_MOD, MU_ON, MU_OFF, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, GAME, _______, _______ \ ), }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { @@ -186,15 +161,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; break; - case GAME_MOD: - if (record->event.pressed) { - layer_on(_GAME_MOD); - } else { - layer_off(_GAME_MOD); - } - return false; - break; - case LOWER: if (record->event.pressed) { layer_on(_LOWER); diff --git a/keyboards/preonic/keymaps/kuatsure/rules.mk b/keyboards/preonic/keymaps/kuatsure/rules.mk index 4aacc70513ce..9369f99a9e9b 100644 --- a/keyboards/preonic/keymaps/kuatsure/rules.mk +++ b/keyboards/preonic/keymaps/kuatsure/rules.mk @@ -1,3 +1,2 @@ BACKLIGHT_ENABLE = no LEADER_ENABLE = yes -AUTO_SHIFT_ENABLE = yes diff --git a/keyboards/preonic/keymaps/mikethetiger/config.h b/keyboards/preonic/keymaps/mikethetiger/config.h new file mode 100644 index 000000000000..9e5eb83a64e9 --- /dev/null +++ b/keyboards/preonic/keymaps/mikethetiger/config.h @@ -0,0 +1,38 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * 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 +#define TAP_CODE_DELAY 10 + +/* 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 2 diff --git a/keyboards/preonic/keymaps/mikethetiger/keymap.c b/keyboards/preonic/keymaps/mikethetiger/keymap.c new file mode 100644 index 000000000000..2f3963f71523 --- /dev/null +++ b/keyboards/preonic/keymaps/mikethetiger/keymap.c @@ -0,0 +1,289 @@ +/* Copyright 2015-2017 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_preonic_grid( + 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_preonic_grid( + 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_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, \ + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( + 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + 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, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( + 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + 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 \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef __AVR__ + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + PORTE |= (1<<6); + #endif + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/mikethetiger/readme.md b/keyboards/preonic/keymaps/mikethetiger/readme.md new file mode 100644 index 000000000000..6da54ebbb54c --- /dev/null +++ b/keyboards/preonic/keymaps/mikethetiger/readme.md @@ -0,0 +1 @@ +# mikethetiger's Preonic layout - largely based on the Planck's \ No newline at end of file diff --git a/keyboards/preonic/keymaps/mikethetiger/rules.mk b/keyboards/preonic/keymaps/mikethetiger/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/preonic/keymaps/mikethetiger/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/preonic/keymaps/nikchi/keymap.c b/keyboards/preonic/keymaps/nikchi/keymap.c index bb7be876c24f..34d837cd6487 100644 --- a/keyboards/preonic/keymaps/nikchi/keymap.c +++ b/keyboards/preonic/keymaps/nikchi/keymap.c @@ -21,10 +21,6 @@ enum preonic_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/preonic/keymaps/seph/keymap.c b/keyboards/preonic/keymaps/seph/keymap.c index 3d2606006767..1584d2cb9814 100644 --- a/keyboards/preonic/keymaps/seph/keymap.c +++ b/keyboards/preonic/keymaps/seph/keymap.c @@ -8,9 +8,6 @@ #define _LO 1 #define _RA 2 -// Fillers to make layering more clear -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 3c703f473200..bb561a72cff8 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -20,10 +20,6 @@ enum preonic_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/preonic/keymaps/spacebarracecar/config.h b/keyboards/preonic/keymaps/spacebarracecar/config.h new file mode 100644 index 000000000000..4f48857fe57d --- /dev/null +++ b/keyboards/preonic/keymaps/spacebarracecar/config.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(NO_SOUND) +#endif diff --git a/keyboards/preonic/keymaps/spacebarracecar/keymap.c b/keyboards/preonic/keymaps/spacebarracecar/keymap.c new file mode 100644 index 000000000000..041fa9fed3bd --- /dev/null +++ b/keyboards/preonic/keymaps/spacebarracecar/keymap.c @@ -0,0 +1,176 @@ +#include QMK_KEYBOARD_H +#include "spacebarracecar.h" + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +enum layers { + _BASE, + _RAISE, + _LOWER, + _MUSICMODE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base +,-----------------------------------------------------------------------------------------------------------------------. +|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |\ | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|Tab |Q |W |E |R |T |Z |U |I |O |P |Backspace| +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|Esc/Nav |A |S |D |F |G |H |J |K |L |; |' | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|Shift |Y |X |C |V |B |N |M |, |. |/ |Shift | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|LCtrl | |Win |Alt |Lower |Space |Enter |Raise |AltGr |Win |Menu |RCtrl | +`-----------------------------------------------------------------------------------------------------------------------' +*/ + +[_BASE] = LAYOUT_preonic_grid( + CU_GRV, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, CU_BSLS, + KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, CU_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC, + CU_NAV, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, CU_SCLN, CU_QUOT, + CU_LSFT, CU_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, CU_COMM, CU_DOT, CU_SLSH, CU_RSFT, + KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, CTLENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL +), + +/* Lower +,-----------------------------------------------------------------------------------------------------------------------. +|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |\ | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|~ |! |" |# |$ |% |^ |& |* |( |) | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |@ |Strg+X |Strg+C |Strg+V | | |_ |+ |{ |} || | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |? | | | | | | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | | | | | | | | | +`-----------------------------------------------------------------------------------------------------------------------' +*/ +[_LOWER] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______, + _______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE, + _______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Raise +,-----------------------------------------------------------------------------------------------------------------------. +|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |\ | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |F1 |F2 |F3 |F4 |F5 |F6 |- |= |[ |] |\ | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |F7 |F8 |F9 |F10 |F11 |F12 | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | | | | | | | | | +`-----------------------------------------------------------------------------------------------------------------------' +*/ + +[_RAISE] = LAYOUT_preonic_grid( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + CU_GRV, DE_1, DE_2, CU_3, DE_4, DE_5, CU_6, CU_7, CU_8, CU_9, CU_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, CU_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_MUSICMODE] = LAYOUT_preonic_grid( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_LCTL, KC_LALT, KC_LGUI, KC_DOWN, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_MOD, MU_OFF +), + +/* Deadkey +,-----------------------------------------------------------------------------------------------------------------------. +| | | | | | | | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | | | |Ü | |Ö | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |Ä |ß | | | | | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | | | | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| | | | | |" |" | | | | | | +`-----------------------------------------------------------------------------------------------------------------------' +*/ + +[_DEADKEY] = LAYOUT_preonic_grid( + CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, + KC_TAB, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_UE, CU_ED, CU_OE, CU_ED, KC_BSPC, + CU_NAV, CU_AE, CU_SS, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_DDQ, + CU_LSFT, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_ED, CU_RSFT, + KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, CU_DDQ, CU_DDQ, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL +), + +/* Navigation +,-----------------------------------------------------------------------------------------------------------------------. +|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10 |F11 |F12 | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|ALT F4 |PageDown |Up |PageUp |Home | | | |Win+Up | | |Del | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |Left |Down |Right |End | | |Win+Left |Win+Down |Win+Right| |Enter | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +| |Prev |Pause |Next |LowerVol |RaiseVol |Mute | | | | | | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| +|RESET |ESCT | | | | | | | | | |Game | +`-----------------------------------------------------------------------------------------------------------------------' +*/ + +[_NAV] = LAYOUT_preonic_grid( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, + _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, MU_ON, XXXXXXX, XXXXXXX, XXXXXXX, _______, + RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME +) + +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { +switch (keycode) { + case MO(_LOWER): + if (game){ + if(record->event.pressed) { + register_code(KC_SPC); + } else { + unregister_code(KC_SPC); + } + return false; + } else { + return true; + } + case KC_LALT: + if (game) { + if (record->event.pressed){ + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + } else { + return true; + } + case MU_ON: + if(record->event.pressed) { + layer_off(_LOWER); + layer_off(_RAISE); + layer_off(_NAV); + layer_off(_DEADKEY); + layer_on(_MUSICMODE); + } + return true; + case MU_OFF: + if(record->event.pressed) { + layer_off(_MUSICMODE); + } + return true; + default: + return true; + } +} diff --git a/keyboards/fc660c/keymaps/spacebarracecar/readme.md b/keyboards/preonic/keymaps/spacebarracecar/readme.md similarity index 51% rename from keyboards/fc660c/keymaps/spacebarracecar/readme.md rename to keyboards/preonic/keymaps/spacebarracecar/readme.md index 88c447e75c66..b99bb956feec 100644 --- a/keyboards/fc660c/keymaps/spacebarracecar/readme.md +++ b/keyboards/preonic/keymaps/spacebarracecar/readme.md @@ -1,5 +1,5 @@ -# SpacebarRacecar US-International FC660C Keymap for German PCs +# SpacebarRacecar US-International Preonic Keymap for German PCs This keymap emulates most keys of the US-International layout on PCs that have German set as input language. This allows the use of the keyboard on any PC in Germany without the need to change any settings. -The keymap is mostly based on the US-International layout. +The keymap is mostly based on the Preonic default layout but adds essential features for german input, like access to Ä, Ö, Ü, ß. diff --git a/keyboards/preonic/keymaps/spacebarracecar/rules.mk b/keyboards/preonic/keymaps/spacebarracecar/rules.mk new file mode 100644 index 000000000000..bc817a140317 --- /dev/null +++ b/keyboards/preonic/keymaps/spacebarracecar/rules.mk @@ -0,0 +1,22 @@ +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# Userspace defines +GERMAN_ENABLE = yes # Enable Custom US Ansi Keycodes for PC with German set as input language diff --git a/keyboards/preonic/keymaps/that_canadian/keymap.c b/keyboards/preonic/keymaps/that_canadian/keymap.c index 968b2ae25b74..bf9e89e1f2a7 100644 --- a/keyboards/preonic/keymaps/that_canadian/keymap.c +++ b/keyboards/preonic/keymaps/that_canadian/keymap.c @@ -20,10 +20,6 @@ enum preonic_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/preonic/keymaps/xulkal/keymap.c b/keyboards/preonic/keymaps/xulkal/keymap.c new file mode 100644 index 000000000000..967cd5a0abab --- /dev/null +++ b/keyboards/preonic/keymaps/xulkal/keymap.c @@ -0,0 +1,148 @@ +#include QMK_KEYBOARD_H +#include "xulkal.h" + +#include "muse.h" + +#define EXPAND_LAYOUT(...) LAYOUT_preonic_grid(__VA_ARGS__) + +// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty Layout + * ,------------------------------------------------. ,------------------------------------------------. + * | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * |FN(CAPS)| A | S | D | F | G | ` | | ' | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Sft[ | Z | X | C | V | B | RGB | |RGBRST| N | M | , | . | / | Sft] | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | Win | LOWER| RAISE| Alt | Space|RGBRMOD| |RGBMOD| Space| Left | Up | Down | Right| Ctrl | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | Space| DEL | | Enter| Space| + * `-------------' `-------------' + */ + [_QWERTY] = EXPAND_LAYOUT( \ + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, \ + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, \ + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, \ + _________________QWERTY_L4_________________, _________________QWERTY_R4_________________, \ + _________________QWERTY_L5_________________, _________________QWERTY_R5_________________ \ + ), + +#ifndef GAMELAYER_DISABLE + [_GAME] = EXPAND_LAYOUT( \ + ___________________GAME_L1_________________, ___________________GAME_R1_________________, \ + ___________________GAME_L2_________________, ___________________GAME_R2_________________, \ + ___________________GAME_L3_________________, ___________________GAME_R3_________________, \ + ___________________GAME_L4_________________, ___________________GAME_R4_________________, \ + ___________________GAME_L5_________________, ___________________GAME_R5_________________ \ + ), +#endif + + [_LOWER] = EXPAND_LAYOUT( \ + __________________LOWER_L1_________________, __________________LOWER_R1_________________, \ + __________________LOWER_L2_________________, __________________LOWER_R2_________________, \ + __________________LOWER_L3_________________, __________________LOWER_R3_________________, \ + __________________LOWER_L4_________________, __________________LOWER_R4_________________, \ + __________________LOWER_L5_________________, __________________LOWER_R5_________________ \ + ), + + [_RAISE] = EXPAND_LAYOUT( \ + __________________RAISE_L1_________________, __________________RAISE_R1_________________, \ + __________________RAISE_L2_________________, __________________RAISE_R2_________________, \ + __________________RAISE_L3_________________, __________________RAISE_R3_________________, \ + __________________RAISE_L4_________________, __________________RAISE_R4_________________, \ + __________________RAISE_L5_________________, __________________RAISE_R5_________________ \ + ), + +#ifdef TRILAYER_ENABLED + [_ADJUST] = EXPAND_LAYOUT( \ + _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, \ + _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, \ + _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, \ + _________________ADJUST_L4_________________, _________________ADJUST_R4_________________, \ + _________________ADJUST_L5_________________, _________________ADJUST_R5_________________ \ + ), +#endif +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/xulkal/rules.mk b/keyboards/preonic/keymaps/xulkal/rules.mk new file mode 100644 index 000000000000..f7e76252cd0a --- /dev/null +++ b/keyboards/preonic/keymaps/xulkal/rules.mk @@ -0,0 +1,6 @@ +SRC += muse.c + +ENCODER_ENABLE = no + +OPT_DEFS += -DTRILAYER_ENABLED +OPT_DEFS += -DAUDIO_CLICKY diff --git a/keyboards/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index e9866883b4b2..5de64de955d3 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -5,9 +5,6 @@ #include "keymap_colemak.h" extern keymap_config_t keymap_config; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO #undef C #define C(n) RCTL(n) #define CADKEY RCTL(RALT(KC_DEL)) diff --git a/keyboards/preonic/readme.md b/keyboards/preonic/readme.md index 5b3c0ec588b1..85adf635d746 100644 --- a/keyboards/preonic/readme.md +++ b/keyboards/preonic/readme.md @@ -6,11 +6,16 @@ Preonic A compact 50% (12x5) ortholinear keyboard kit made and sold by OLKB and Massdrop. [More info on qmk.fm](http://qmk.fm/preonic/) Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert) -Hardware Supported: Preonic PCB rev1, Teensy 2.0 +Hardware Supported: Preonic PCB rev1, rev2, rev3 Hardware Availability: [OLKB.com](https://olkb.com/preonic/), [Massdrop](https://www.massdrop.com/buy/preonic-mechanical-keyboard?mode=guest_open) Make example for this keyboard (after setting up your build environment): - make preonic:default + make preonic/rev2: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. \ No newline at end of file +Install examples: + + make preonic/rev2:default:dfu # For Preonic rev1 or rev2 + make preonic/rev3:default:dfu-util # For Preonic rev3 + +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). diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk index e69de29bb2d1..b0d44db82b7e 100644 --- a/keyboards/preonic/rev1/rules.mk +++ b/keyboards/preonic/rev1/rules.mk @@ -0,0 +1,67 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = atmel-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_5x12 diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk index e69de29bb2d1..748979c79054 100644 --- a/keyboards/preonic/rev2/rules.mk +++ b/keyboards/preonic/rev2/rules.mk @@ -0,0 +1,67 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = qmk-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = ortho_5x12 diff --git a/keyboards/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk index 0c171b2fb09a..39e69872c9aa 100644 --- a/keyboards/preonic/rev3/rules.mk +++ b/keyboards/preonic/rev3/rules.mk @@ -1,24 +1,34 @@ # project specific files SRC = matrix.c -LAYOUTS += ortho_5x12 # Cortex version MCU = STM32F303 # Build Options -# comment out to disable the options. +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically # -BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) ## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -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 -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# 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 = yes + CUSTOM_MATRIX = yes # Custom matrix file -AUDIO_ENABLE = yes -RGBLIGHT_ENABLE = no # SERIAL_LINK_ENABLE = yes ENCODER_ENABLE = yes + +LAYOUTS = ortho_5x12 diff --git a/keyboards/primekb/prime_e/config.h b/keyboards/primekb/prime_e/config.h new file mode 100644 index 000000000000..331993f4b2e5 --- /dev/null +++ b/keyboards/primekb/prime_e/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2019 Holten Campbell + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5052 +#define PRODUCT_ID 0x0051 +#define DEVICE_VER 0x0001 +#define MANUFACTURER PrimeKB +#define PRODUCT Prime_E +#define DESCRIPTION Ergo_45 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +/* Keyboard Matrix Assignments */ +#define MATRIX_ROW_PINS { E6, C7, B5, B4 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, D6, D4, D5, D3, D2, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 5 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 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 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*13*4*2)) = (35+416) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 451 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 573 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/primekb/prime_e/info.json b/keyboards/primekb/prime_e/info.json new file mode 100644 index 000000000000..0cca27565cd6 --- /dev/null +++ b/keyboards/primekb/prime_e/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "Prime_E", + "url": "https://www.primekb.com", + "maintainer": "holtenc", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0,"y":0,"w":1,"h":1}, {"x":1,"y":0,"w":1,"h":1}, {"x":2,"y":0,"w":1,"h":1}, {"x":3,"y":0,"w":1,"h":1}, {"x":4,"y":0,"w":1,"h":1}, {"x":5,"y":0,"w":1,"h":1}, {"x":7,"y":0,"w":1,"h":1}, {"x":8,"y":0,"w":1,"h":1}, {"x":9,"y":0,"w":1,"h":1}, {"x":10,"y":0,"w":1,"h":1}, {"x":11,"y":0,"w":1,"h":1}, {"x":12,"y":0,"w":1,"h":1}, {"x":13,"y":0,"w":1,"h":1}, + {"x":0,"y":1,"w":1.25,"h":1}, {"x":1.25,"y":1,"w":1,"h":1}, {"x":2.25,"y":1,"w":1,"h":1}, {"x":3.25,"y":1,"w":1,"h":1}, {"x":4.25,"y":1,"w":1,"h":1}, {"x":5.25,"y":1,"w":1,"h":1}, {"x":7.25,"y":1,"w":1,"h":1}, {"x":8.25,"y":1,"w":1,"h":1}, {"x":9.25,"y":1,"w":1,"h":1}, {"x":10.25,"y":1,"w":1,"h":1}, {"x":11.25,"y":1,"w":1,"h":1}, {"x":12.25,"y":1,"w":1.75,"h":1}, + {"x":0,"y":2,"w":1.75,"h":1}, {"x":1.75,"y":2,"w":1,"h":1}, {"x":2.75,"y":2,"w":1,"h":1}, {"x":3.75,"y":2,"w":1,"h":1}, {"x":4.75,"y":2,"w":1,"h":1}, {"x":5.75,"y":2,"w":1,"h":1}, {"x":6.75,"y":2,"w":1,"h":1}, {"x":7.75,"y":2,"w":1,"h":1}, {"x":8.75,"y":2,"w":1,"h":1}, {"x":9.75,"y":2,"w":1,"h":1}, {"x":10.75,"y":2,"w":1,"h":1}, {"x":11.75,"y":2,"w":1,"h":1}, {"x":12.75,"y":2,"w":1.25,"h":1}, + {"x":0,"y":3,"w":1.25,"h":1}, {"x":1.25,"y":3,"w":1.25,"h":1}, {"x":3.5,"y":3,"w":1.25,"h":1}, {"x":4.75,"y":3,"w":2,"h":1}, {"x":6.75,"y":3,"w":2.25,"h":1}, {"x":9,"y":3,"w":1.25,"h":1}, {"x":11.5,"y":3,"w":1.25,"h":1}, {"x":12.75,"y":3,"w":1.25,"h":1} + ] + } + } +} diff --git a/keyboards/primekb/prime_e/keymaps/default/keymap.c b/keyboards/primekb/prime_e/keymaps/default/keymap.c new file mode 100644 index 000000000000..5a09cb9694cc --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/default/keymap.c @@ -0,0 +1,94 @@ +/* Copyright 2018 Holten Campbell + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(3), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, + KC_LCTL, KC_LALT, MO(2), MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + LAYOUT( + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_SCLN, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + LAYOUT( + KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_LBRC, KC_RBRC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PENT, KC_PDOT, KC_TRNS, KC_TRNS + ), + + LAYOUT( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_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 + ) +}; + +void matrix_init_user(void) { + // set CapsLock LED to output and low + setPinOutput(B1); + writePinLow(B1); + // set NumLock LED to output and low + setPinOutput(B2); + writePinLow(B2); + // set ScrollLock LED to output and low + setPinOutput(B3); + writePinLow(B3); +} + +void matrix_scan_user(void) { + +} + + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(B2); + } else { + writePinLow(B2); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(B1); + } else { + writePinLow(B1); + } +/* + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(B3); + } else { + writePinLow(B3); + }*/ + +} + +//function for layer indicator LED +uint32_t layer_state_set_user(uint32_t state) +{ + if (biton32(state) == 1) { + writePinHigh(B3); + } else { + writePinLow(B3); + } + return state; +} diff --git a/keyboards/primekb/prime_e/keymaps/default/readme.md b/keyboards/primekb/prime_e/keymaps/default/readme.md new file mode 100644 index 000000000000..5266526eec98 --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default keymap for Prime_E +This is the default keymap for Prime_E. \ No newline at end of file diff --git a/keyboards/primekb/prime_e/keymaps/via/keymap.c b/keyboards/primekb/prime_e/keymaps/via/keymap.c new file mode 100644 index 000000000000..5a09cb9694cc --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/via/keymap.c @@ -0,0 +1,94 @@ +/* Copyright 2018 Holten Campbell + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(3), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, + KC_LCTL, KC_LALT, MO(2), MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + LAYOUT( + KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_SCLN, KC_BSLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + LAYOUT( + KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_LBRC, KC_RBRC, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PENT, KC_PDOT, KC_TRNS, KC_TRNS + ), + + LAYOUT( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_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 + ) +}; + +void matrix_init_user(void) { + // set CapsLock LED to output and low + setPinOutput(B1); + writePinLow(B1); + // set NumLock LED to output and low + setPinOutput(B2); + writePinLow(B2); + // set ScrollLock LED to output and low + setPinOutput(B3); + writePinLow(B3); +} + +void matrix_scan_user(void) { + +} + + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(B2); + } else { + writePinLow(B2); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(B1); + } else { + writePinLow(B1); + } +/* + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(B3); + } else { + writePinLow(B3); + }*/ + +} + +//function for layer indicator LED +uint32_t layer_state_set_user(uint32_t state) +{ + if (biton32(state) == 1) { + writePinHigh(B3); + } else { + writePinLow(B3); + } + return state; +} diff --git a/keyboards/primekb/prime_e/keymaps/via/readme.md b/keyboards/primekb/prime_e/keymaps/via/readme.md new file mode 100644 index 000000000000..bbd56c0cc71d --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA keymap for Prime_E +This keymap is for compatibility with the VIA configurator. \ No newline at end of file diff --git a/keyboards/primekb/prime_e/keymaps/via/rules.mk b/keyboards/primekb/prime_e/keymaps/via/rules.mk new file mode 100644 index 000000000000..93b2e70e7cfc --- /dev/null +++ b/keyboards/primekb/prime_e/keymaps/via/rules.mk @@ -0,0 +1,85 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +# This is the VIA magic +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +SRC += keyboards/wilba_tech/wt_main.c \ No newline at end of file diff --git a/keyboards/primekb/prime_e/prime_e.c b/keyboards/primekb/prime_e/prime_e.c new file mode 100644 index 000000000000..bd51ce0087eb --- /dev/null +++ b/keyboards/primekb/prime_e/prime_e.c @@ -0,0 +1,22 @@ +/* Copyright 2019 Holten Campbell + * + * 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 . + */ +#include "prime_e.h" + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/primekb/prime_e/prime_e.h b/keyboards/primekb/prime_e/prime_e.h new file mode 100644 index 000000000000..4af70fbe177e --- /dev/null +++ b/keyboards/primekb/prime_e/prime_e.h @@ -0,0 +1,34 @@ +/* Copyright 2019 Holten Campbell + * + * 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 . + */ + + +#pragma once + +#include "quantum.h" + + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K112, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ + K300, K301, K303, K304, K306, K308, K311, K312 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, KC_NO, K112 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212 }, \ + { K300, K301, KC_NO, K303, K304, KC_NO, K306, KC_NO, K308, KC_NO, KC_NO, K311, K312 } \ +} + diff --git a/keyboards/primekb/prime_e/readme.md b/keyboards/primekb/prime_e/readme.md new file mode 100644 index 000000000000..6abe0bed0195 --- /dev/null +++ b/keyboards/primekb/prime_e/readme.md @@ -0,0 +1,16 @@ +# Prime_E + +![Prime_E](https://imgur.com/7Rl4JOA.jpg) + +An ergonomic 45%. + +Keyboard Maintainer: [Holtenc](https://github.com/holtenc/) +Hardware Supported: Prime_E PCB, ATMega32u4 +Hardware Availability: Group Buy, Retail + +Make example for this keyboard (after setting up your build environment): + + make prime_e:default + make prime_e:via (when using VIA configurator) + +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). diff --git a/keyboards/primekb/prime_e/rules.mk b/keyboards/primekb/prime_e/rules.mk new file mode 100644 index 000000000000..313bf3b3ecaa --- /dev/null +++ b/keyboards/primekb/prime_e/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file diff --git a/keyboards/primekb/prime_l/config.h b/keyboards/primekb/prime_l/config.h index 354f69c4d4b2..8451a7686b75 100644 --- a/keyboards/primekb/prime_l/config.h +++ b/keyboards/primekb/prime_l/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D2, D3, D5, D4, D6, D7, B4, B5, C7, C6, F7, F6, F5, F4, F1, F0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B6 diff --git a/keyboards/primekb/prime_m/config.h b/keyboards/primekb/prime_m/config.h index aeddcf25c981..119e20a40e52 100644 --- a/keyboards/primekb/prime_m/config.h +++ b/keyboards/primekb/prime_m/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B3, C7, C6, D2, D1, D0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/primekb/prime_m/info.json b/keyboards/primekb/prime_m/info.json index 5332522022a1..822823e62a90 100644 --- a/keyboards/primekb/prime_m/info.json +++ b/keyboards/primekb/prime_m/info.json @@ -1,3 +1,4 @@ + { "keyboard_name": "Prime_M", "url": "https://www.primekb.com", @@ -5,8 +6,43 @@ "width": 6, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_ortho_5x6": { "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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}] + }, + "LAYOUT_numpad_5x6": { + "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":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":4, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":1, "h":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":4, "y":3}, + + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4, "w":2}, + {"x":4, "y":4}, + {"x":5, "y":3, "h":2} + ] } - } +} } diff --git a/keyboards/primekb/prime_m/keymaps/default/keymap.c b/keyboards/primekb/prime_m/keymaps/default/keymap.c index d230439d08e6..6834624d83cb 100644 --- a/keyboards/primekb/prime_m/keymaps/default/keymap.c +++ b/keyboards/primekb/prime_m/keymaps/default/keymap.c @@ -22,28 +22,28 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, LT(2, KC_BSPC), - KC_F1, KC_F2, KC_P7, KC_P8, KC_P9, KC_DEL, - KC_F3, KC_F4, KC_P4, KC_P5, KC_P6, KC_PMNS, - KC_F5, KC_F6, KC_P1, KC_P2, KC_P3, KC_PPLS, - KC_LCTL, KC_LALT, TO(1), KC_P0, KC_PDOT, KC_ENT + [0] = LAYOUT_ortho_5x6( + KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, LT(2, KC_BSPC), + KC_F1, KC_F2, KC_P7, KC_P8, KC_P9, KC_DEL, + KC_F3, KC_F4, KC_P4, KC_P5, KC_P6, KC_PMNS, + KC_F5, KC_F6, KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_LCTL, KC_LALT, TO(1), KC_P0, KC_PDOT, KC_PENT ), - [1] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, LT(2, KC_F9), - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC + [1] = LAYOUT_ortho_5x6( + KC_ESC, KC_1, KC_2, KC_3, KC_4, LT(2, KC_F9), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC ), - - [2] = LAYOUT( - BL_TOGG, BL_STEP, 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_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD + + [2] = LAYOUT_ortho_5x6( + BL_TOGG, BL_STEP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, KC_MUTE, KC_VOLD ) }; diff --git a/keyboards/primekb/prime_m/keymaps/numpad/config.h b/keyboards/primekb/prime_m/keymaps/numpad/config.h new file mode 100644 index 000000000000..95917a65cd43 --- /dev/null +++ b/keyboards/primekb/prime_m/keymaps/numpad/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 Jumail Mundekkat + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/primekb/prime_m/keymaps/numpad/keymap.c b/keyboards/primekb/prime_m/keymaps/numpad/keymap.c new file mode 100644 index 000000000000..35ff30a0c84b --- /dev/null +++ b/keyboards/primekb/prime_m/keymaps/numpad/keymap.c @@ -0,0 +1,33 @@ +/* Copyright 2018 Jumail Mundekkat + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_5x6( + KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_PMNS, + KC_A, KC_B, KC_P7, KC_P8, KC_P9, + KC_C, KC_D, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_E, KC_F, KC_P1, KC_P2, KC_P3, + KC_LCTL, TG(1), KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_numpad_5x6( + RESET, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_PMNS, + KC_A, KC_B, KC_HOME, KC_UP, KC_PGUP, + KC_C, KC_D, KC_LEFT, KC_NO, KC_RGHT, KC_PPLS, + KC_E, KC_F, KC_END, KC_DOWN, KC_PGDN, + KC_LCTL, _______, KC_INS, KC_DEL, KC_PENT + ), +}; diff --git a/keyboards/primekb/prime_m/keymaps/numpad/readme.md b/keyboards/primekb/prime_m/keymaps/numpad/readme.md new file mode 100644 index 000000000000..5654918abb2e --- /dev/null +++ b/keyboards/primekb/prime_m/keymaps/numpad/readme.md @@ -0,0 +1 @@ +# The default keymap for prime_m \ No newline at end of file diff --git a/keyboards/primekb/prime_m/prime_m.h b/keyboards/primekb/prime_m/prime_m.h index 0449a66d9b96..58d17eb6f689 100644 --- a/keyboards/primekb/prime_m/prime_m.h +++ b/keyboards/primekb/prime_m/prime_m.h @@ -13,12 +13,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef PRIME_M_H -#define PRIME_M_H +#pragma once #include "quantum.h" +#define ___ KC_NO -#define LAYOUT( \ +#define LAYOUT_ortho_5x6( \ K00, K01, K02, K03, K04, K05, \ K10, K11, K12, K13, K14, K15, \ K20, K21, K22, K23, K24, K25, \ @@ -32,4 +32,16 @@ { K40, K41, K42, K43, K44, K45 } \ } -#endif +#define LAYOUT_numpad_5x6( \ + K00, K01, K02, K03, K04, K05, \ + K10, K11, K12, K13, K14, \ + K20, K21, K22, K23, K24, K15, \ + K30, K31, K32, K33, K34, \ + K40, K41, K42, K44, K35 \ +) { \ + { K00, K01, K02, K03, K04, K05 }, \ + { K10, K11, K12, K13, K14, K15 }, \ + { K20, K21, K22, K23, K24, ___ }, \ + { K30, K31, K32, K33, K34, K35 }, \ + { K40, K41, K42, ___, K44, ___ } \ +} diff --git a/keyboards/primekb/prime_m/rules.mk b/keyboards/primekb/prime_m/rules.mk index 8d3b835f188c..72ad8325d303 100644 --- a/keyboards/primekb/prime_m/rules.mk +++ b/keyboards/primekb/prime_m/rules.mk @@ -78,3 +78,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = ortho_5x6 numpad_5x6 diff --git a/keyboards/primekb/prime_o/config.h b/keyboards/primekb/prime_o/config.h index 511d3d483498..2a35785ea0d0 100644 --- a/keyboards/primekb/prime_o/config.h +++ b/keyboards/primekb/prime_o/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B6, B5, C7, C6, D2, D1, D0, C2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c b/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c index 87ae5d12420a..407118309741 100644 --- a/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c +++ b/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = LAYOUT( _______, _______, _______, _______, KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, - _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, XXXXXXX, KC_ENT, + _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME ), @@ -243,7 +243,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = LAYOUT( KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, _______, _______, _______, _______, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, _______, _______, _______, _______, XXXXXXX, GUIL, GUID, GUIR, XXXXXXX, KC_ENT, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, _______, _______, _______, _______, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, RESET, CU_ESCT, _______, _______, _______, KC_SPC, _______, _______, _______, _______, CTLENT, _______, _______, _______, _______, CU_GAME ), @@ -364,7 +364,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAV] = LAYOUT( KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, ALTF4, KC_PGDN, KC_UP, KC_PGUP, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, GUIU, XXXXXXX, XXXXXXX, KC_DEL, _______, _______, _______, _______, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, XXXXXXX, KC_ENT, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, XXXXXXX, GUIL, GUID, GUIR, EMOJI, KC_ENT, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME, _______, _______, _______, _______ ), diff --git a/keyboards/primekb/prime_r/keymaps/default/config.h b/keyboards/primekb/prime_r/keymaps/default/config.h index e7ffd3aa2013..a70a6b37265e 100644 --- a/keyboards/primekb/prime_r/keymaps/default/config.h +++ b/keyboards/primekb/prime_r/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/primekb/prime_r/keymaps/default/keymap.c b/keyboards/primekb/prime_r/keymaps/default/keymap.c index a39d197e273d..2e620c9cb29e 100644 --- a/keyboards/primekb/prime_r/keymaps/default/keymap.c +++ b/keyboards/primekb/prime_r/keymaps/default/keymap.c @@ -19,10 +19,6 @@ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* (Base Layer) Default Layer * ,---------------------------------------------------------------. diff --git a/keyboards/primekb/prime_r/keymaps/rooski/keymap.c b/keyboards/primekb/prime_r/keymaps/rooski/keymap.c index 3fadc6c6bc25..40c73e7c16d7 100644 --- a/keyboards/primekb/prime_r/keymaps/rooski/keymap.c +++ b/keyboards/primekb/prime_r/keymaps/rooski/keymap.c @@ -18,10 +18,6 @@ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - //Arrow Cluster Toggle static bool arrow_toggle = false; diff --git a/keyboards/projectkb/alice/alice.c b/keyboards/projectkb/alice/alice.c new file mode 100644 index 000000000000..fada4368110f --- /dev/null +++ b/keyboards/projectkb/alice/alice.c @@ -0,0 +1,27 @@ +#include "alice.h" + +void matrix_init_board(void){ + setPinOutput(A0); + setPinOutput(A1); + setPinOutput(A2); +} + + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(A0); + } else { + writePinHigh(A0); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(A1); + } else { + writePinHigh(A1); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(A2); + } else { + writePinHigh(A2); + } + led_set_user(usb_led); +} diff --git a/keyboards/projectkb/alice/alice.h b/keyboards/projectkb/alice/alice.h new file mode 100644 index 000000000000..907f020e41a7 --- /dev/null +++ b/keyboards/projectkb/alice/alice.h @@ -0,0 +1,19 @@ +#pragma once + +#include "quantum.h" + +#define KNO KC_NO + +#define LAYOUT_default( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K28, K29, K2A, K2B, K2C, K2D, K2F, \ + K31, K32, K33, K34, K35, K36, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, \ + K41, K43, K44, K46, K49, K4B, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, KNO, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, KNO, K28, K29, K2A, K2B, K2C, K2D, KNO, K2F }, \ + { KNO, K31, K32, K33, K34, K35, K36, KNO, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { KNO, K41, KNO, K43, K44, KNO, K46, KNO, KNO, K49, KNO, K4B, KNO, KNO, KNO, K4F } \ +} diff --git a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000000..9d10fbd754da --- /dev/null +++ b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,109 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { +} diff --git a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000000..de3a93d1ceb0 --- /dev/null +++ b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000000..b98dcdd26c6a --- /dev/null +++ b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 000000000000..9c7cf4fd76a3 --- /dev/null +++ b/keyboards/projectkb/alice/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ + + + + + resources/gencfg/processors/boards/stm32f0xx/templates + .. + 3.0.x + + ST STM32F072B-Discovery + ST_STM32F072B_DISCOVERY + + STM32F072xB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboards/projectkb/alice/bootloader_defs.h b/keyboards/projectkb/alice/bootloader_defs.h new file mode 100644 index 000000000000..02c48c4e6dcb --- /dev/null +++ b/keyboards/projectkb/alice/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * /tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/projectkb/alice/chconf.h b/keyboards/projectkb/alice/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/projectkb/alice/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 10000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 0 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE FALSE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP FALSE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS FALSE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/projectkb/alice/config.h b/keyboards/projectkb/alice/config.h new file mode 100644 index 000000000000..2a6e81f1d7f8 --- /dev/null +++ b/keyboards/projectkb/alice/config.h @@ -0,0 +1,92 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x0159 +#define PRODUCT_ID 0xA71C +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER ProjectKB +#define PRODUCT Alice +#define DESCRIPTION ProjectKB Alice + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { B2, B10, B11, A9, A15, B3, B4, B5, B6, B7, B8, B9, C13, C14, C15, B12 } +#define MATRIX_ROW_PINS { B1, B0, A7, A5, A4 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't 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 + +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 14 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + + +// EEPROM usage +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x01 +#define EEPROM_VERSION_ADDR 34 + +#define EEPROM_CUSTOM_BACKLIGHT 804 + + + +/* + * 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 diff --git a/keyboards/projectkb/alice/halconf.h b/keyboards/projectkb/alice/halconf.h new file mode 100644 index 000000000000..da08cdbae2c9 --- /dev/null +++ b/keyboards/projectkb/alice/halconf.h @@ -0,0 +1,351 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#pragma once + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 1 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +/** @} */ diff --git a/keyboards/projectkb/alice/keymaps/default/keymap.c b/keyboards/projectkb/alice/keymaps/default/keymap.c new file mode 100644 index 000000000000..bad22f9ae445 --- /dev/null +++ b/keyboards/projectkb/alice/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_default( + KC_ESC, KC_TILD, 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_DEL, KC_BSPC, + 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_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_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RGUI, + KC_LCTL, KC_LALT, KC_SPC, MO(_FN1), KC_SPC, KC_RALT, KC_RCTL + ), + + [_FN1] = LAYOUT_default( + RGB_TOG, _______, 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, + RGB_MOD, _______, _______, KC_UP, _______, _______, _______, RGB_SAI, RGB_HUI, RGB_VAI, _______, _______, _______, _______, _______, + RGB_RMOD, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, _______, _______, + _______, BL_INC, BL_DEC, BL_TOGG, BL_BRTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, RESET + ) +}; + diff --git a/keyboards/projectkb/alice/mcuconf.h b/keyboards/projectkb/alice/mcuconf.h new file mode 100644 index 000000000000..048eb4df650d --- /dev/null +++ b/keyboards/projectkb/alice/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/projectkb/alice/readme.md b/keyboards/projectkb/alice/readme.md new file mode 100644 index 000000000000..cc9f22685b04 --- /dev/null +++ b/keyboards/projectkb/alice/readme.md @@ -0,0 +1,12 @@ +# ProjectKeyboard Alice PCB + +ProjectKeyboard Alice Keyboard Replacement PCB + +Keyboard Maintainer: onefiftynine + +Hardware Supported: STM32F072CBT6 +Make example for this keyboard (after setting up your build environment): + + make projectkb/alice: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). diff --git a/keyboards/projectkb/alice/rules.mk b/keyboards/projectkb/alice/rules.mk new file mode 100644 index 000000000000..cd366c76aa7c --- /dev/null +++ b/keyboards/projectkb/alice/rules.mk @@ -0,0 +1,56 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +# project specific files +VPATH += keyboards/cannonkeys/stm32f072 +SRC = keyboard.c \ + led.c + +#BOOTMAGIC_ENABLE = yes # 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 +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason +RGBLIGHT_ENABLE = yes + +# RAW_ENABLE = yes +# DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/ps2avrGB/README.md b/keyboards/ps2avrGB/README.md deleted file mode 100644 index 8399dff029ee..000000000000 --- a/keyboards/ps2avrGB/README.md +++ /dev/null @@ -1,78 +0,0 @@ -ps2avrGB keyboard firmware -========================== - -This is a port of the QMK firmware for boards that are based on the -ps2avrGB firmware, like the [ps2avrGB -keyboard](https://www.keyclack.com/product/gb-ps2avrgb/) or the ones sold -by [Winkeyless](http://winkeyless.kr/product/ps2avrgb-parts/). - -Note that this is a complete replacement for the firmware, so you won't be -using Bootmapper Client to change any keyboard settings, since not all the -USB report options are supported. - -This is an example based on the b.mini keyboard for making other keyboards -compatible with QMK; fully supported boards have their own directory. - -## Supported Boards - -- [b.fake](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bfake) -- [b.mini](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bmini) -- [b.face](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bface) -- [pearl](https://github.com/qmk/qmk_firmware/tree/master/keyboards/pearl) - -## Installing - -First, install the requirements. These commands are for OSX, but all you -need is the AVR toolchain and `bootloadHID` for flashing: - -``` -$ brew cask install crosspack-avr -$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb -``` - -In order to use the `./program` script, which can reboot the board into -the bootloader, you'll need Python 2 with PyUSB installed: - -``` -$ pip install pyusb -``` - -Then, with the keyboard plugged in, simply run this command from the -`qmk_firmware` directory: - -``` -$ make ps2avrGB:program -``` - -If you prefer, you can just build it and flash the firmware directly with -`bootloadHID` if you boot the board while holding down `L_Ctrl` to keep it -in the bootloader: - -``` -$ make ps2avrGB -$ bootloadHID -r ps2avrGB_default.hex -``` - -## Setting the board to bootloader mode - -If you're lucky, the programming script does this automagically for you. If -however this doesn't work for you, you need to enter the bootloader mode manually -by plugging the keyboard in while holding the bootloader key. If you did this -correctly the LEDs will blink and you'll be able to flash your firmware. - -The bootloader key is the top left key of your matrix. For a standard board -from winkeyless.kr this is `L_Ctrl`, but for some custom boards running ps2avrGB -this might be different. For the Pearl it's `Esc`, for a b.fake it is `q`. If -you're unsure you should be able to see the key in the bootmapper client. - - -## Troubleshooting - -From my experience, it's really hard to brick these boards. But these -tricks have been useful when it got stuck in a weird scenario. - -1. Try plugging the board in while holding the bootloader key. This will force - it to boot only the bootloader without loading the firmware. Once this is - done, just reflash the board with the original firmware. -2. Sometimes USB hubs can act weird, so try connecting the board directly - to your computer or plugging/unplugging the USB hub. diff --git a/keyboards/ps2avrGB/bmini.h b/keyboards/ps2avrGB/bmini.h deleted file mode 100644 index 65ffbe94797b..000000000000 --- a/keyboards/ps2avrGB/bmini.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#ifndef BMINI_H -#define BMINI_H - -#include "quantum.h" - -#define KEYMAP( \ - K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ - K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ - K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ - K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ - K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ - K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \ -){ \ - { K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KE0 }, \ - { K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \ - { K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \ - { K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \ - { K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \ - { K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ - { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ - { K07, K17, K27, K37, K47, K57, K67, K77, KC_NO, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ -} - -#define KC_KEYMAP( \ - K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ - K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ - K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ - K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ - K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ - K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \ -) \ -{ \ - { KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \ - { KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \ - { KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \ - { KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \ - { KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \ - { KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \ - { KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \ - { KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \ -} - -#endif diff --git a/keyboards/ps2avrGB/i2c.c b/keyboards/ps2avrGB/i2c.c deleted file mode 100644 index a4f95213524f..000000000000 --- a/keyboards/ps2avrGB/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c deleted file mode 100644 index 5c52e1d9b687..000000000000 --- a/keyboards/ps2avrGB/keymaps/default/keymap.c +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include "bmini.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( - 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_HOME,KC_END, - 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_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_INS, - MO(0), 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_PGUP, - 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_PGDN, - KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT - ), - [1] = KEYMAP( - KC_TRNS,RGB_TOG,RGB_MOD,RGB_HUI,RGB_SAI,RGB_VAI,RGB_HUD,RGB_SAD,RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END, - 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_DEL, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_INS, - 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_RGHT - ), -}; diff --git a/keyboards/ps2avrGB/matrix.c b/keyboards/ps2avrGB/matrix.c deleted file mode 100644 index 245813dfd2de..000000000000 --- a/keyboards/ps2avrGB/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/ps2avrGB/program b/keyboards/ps2avrGB/program deleted file mode 100755 index b777b911066b..000000000000 --- a/keyboards/ps2avrGB/program +++ /dev/null @@ -1,105 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Luiz Ribeiro , Sebastian Kaim -# -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - - -def checkForKeyboardInNormalMode(): - """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found.""" - return usb.core.find(idVendor=0x20A0, idProduct=0x422D) - -def checkForKeyboardInBootloaderMode(): - """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise.""" - return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None) - -def flashKeyboard(firmware_file): - """Calls bootloadHID to flash the given file to the device.""" - print('Flashing firmware to device ...') - if os.system('bootloadHID -r "%s"' % firmware_file) == 0: - print('\nDone!') - else: - print('\nbootloadHID returned an error.') - -def printDeviceInfo(dev): - """Prints all infos for a given USB device""" - print('Device Information:') - print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) - print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) - print('Manufacturer: %s' % (dev.iManufacturer)) - print('Serial: %s' % (dev.iSerialNumber)) - print('Product: %s' % (dev.iProduct), end='\n\n') - -def sendDeviceToBootloaderMode(dev): - """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing.""" - try: - dev.set_configuration() - - request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - - USBRQ_HID_SET_REPORT = 0x09 - HID_REPORT_OPTION = 0x0301 - - dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5) - except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -kb = checkForKeyboardInNormalMode() - -if kb is not None: - print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='') - sendDeviceToBootloaderMode(kb) - print(' done.') - print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.") - print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode") - -attempts = 12 # 60 seconds -found = False -for attempt in range(1, attempts + 1): - print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='') - - if checkForKeyboardInBootloaderMode(): - print('Found', end='\n\n') - flashKeyboard(sys.argv[1]) - found = True - break - else: - print('Nothing.', end='') - - if attempt != attempts: # no need to wait on the last attempt - print(' Sleeping 5 seconds.', end='') - time.sleep(5) - - # print a newline - print() - -if not found: - print("Couldn't find a flashable keyboard. Aborting.") - sys.exit(2) - diff --git a/keyboards/ps2avrGB/ps2avrGB.c b/keyboards/ps2avrGB/ps2avrGB.c deleted file mode 100644 index 45ba37bffe7a..000000000000 --- a/keyboards/ps2avrGB/ps2avrGB.c +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include "ps2avrGB.h" -#include "rgblight.h" - -#include - -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" - -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); -} - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - for (uint8_t i=0; i - -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 . -*/ - -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H - -#include "quantum.h" - -#ifdef KEYBOARD_ps2avrGB_bfake - #include "bfake.h" -#endif - -#ifdef KEYBOARD_ps2avrGB_bmini_x2 - #include "bmini_x2.h" -#endif - -#endif diff --git a/keyboards/quantrik/kyuu/config.h b/keyboards/quantrik/kyuu/config.h new file mode 100644 index 000000000000..655314985d72 --- /dev/null +++ b/keyboards/quantrik/kyuu/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2019 mechmerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Quantrik +#define PRODUCT Kyuu +#define DESCRIPTION A 65% keyboard with blocker + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, B5, B4, D7, D6 } +#define MATRIX_COL_PINS { F1, F4, F5, F6, F7, C7, C6, F0, B7, D0, D5, D3, D2, D1, B3 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/quantrik/kyuu/info.json b/keyboards/quantrik/kyuu/info.json new file mode 100644 index 000000000000..05c1b40b95b3 --- /dev/null +++ b/keyboards/quantrik/kyuu/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "Kyuu", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 67, + "layout": [ + {"label":"K00 (B6,F1)", "x":0, "y":0}, + {"label":"K01 (B6,F4)", "x":1, "y":0}, + {"label":"K02 (B6,F5)", "x":2, "y":0}, + {"label":"K03 (B6,F6)", "x":3, "y":0}, + {"label":"K04 (B6,F7)", "x":4, "y":0}, + {"label":"K05 (B6,C7)", "x":5, "y":0}, + {"label":"K06 (B6,C6)", "x":6, "y":0}, + {"label":"K07 (B6,F0)", "x":7, "y":0}, + {"label":"K08 (B6,B7)", "x":8, "y":0}, + {"label":"K09 (B6,D0)", "x":9, "y":0}, + {"label":"K0A (B6,D5)", "x":10, "y":0}, + {"label":"K0B (B6,D3)", "x":11, "y":0}, + {"label":"K0C (B6,D2)", "x":12, "y":0}, + {"label":"K0D (B6,D1)", "x":13, "y":0}, + {"label":"K0E (B6,B3)", "x":14, "y":0}, + {"label":"K2E (B4,B3)", "x":15, "y":0}, + {"label":"K10 (B5,F1)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B5,F4)", "x":1.5, "y":1}, + {"label":"K12 (B5,F5)", "x":2.5, "y":1}, + {"label":"K13 (B5,F6)", "x":3.5, "y":1}, + {"label":"K14 (B5,F7)", "x":4.5, "y":1}, + {"label":"K15 (B5,C7)", "x":5.5, "y":1}, + {"label":"K16 (B5,C6)", "x":6.5, "y":1}, + {"label":"K17 (B5,F0)", "x":7.5, "y":1}, + {"label":"K18 (B5,B7)", "x":8.5, "y":1}, + {"label":"K19 (B5,D0)", "x":9.5, "y":1}, + {"label":"K1A (B5,D5)", "x":10.5, "y":1}, + {"label":"K1B (B5,D3)", "x":11.5, "y":1}, + {"label":"K1C (B5,D2)", "x":12.5, "y":1}, + {"label":"K1D (B5,D1)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B5,B3)", "x":15, "y":1}, + {"label":"K20 (B4,F1)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (B4,F4)", "x":1.75, "y":2}, + {"label":"K22 (B4,F5)", "x":2.75, "y":2}, + {"label":"K23 (B4,F6)", "x":3.75, "y":2}, + {"label":"K24 (B4,F7)", "x":4.75, "y":2}, + {"label":"K25 (B4,C7)", "x":5.75, "y":2}, + {"label":"K26 (B4,C6)", "x":6.75, "y":2}, + {"label":"K27 (B4,F0)", "x":7.75, "y":2}, + {"label":"K28 (B4,B7)", "x":8.75, "y":2}, + {"label":"K29 (B4,D0)", "x":9.75, "y":2}, + {"label":"K2A (B4,D5)", "x":10.75, "y":2}, + {"label":"K2B (B4,D3)", "x":11.75, "y":2}, + {"label":"K2C (B4,D2)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2D (B4,D1)", "x":15, "y":2}, + {"label":"K30 (D7,F1)", "x":0, "y":3, "w":2.25}, + {"label":"K31 (D7,F4)", "x":2.25, "y":3}, + {"label":"K32 (D7,F5)", "x":3.25, "y":3}, + {"label":"K33 (D7,F6)", "x":4.25, "y":3}, + {"label":"K34 (D7,F7)", "x":5.25, "y":3}, + {"label":"K35 (D7,C7)", "x":6.25, "y":3}, + {"label":"K36 (D7,C6)", "x":7.25, "y":3}, + {"label":"K37 (D7,F0)", "x":8.25, "y":3}, + {"label":"K38 (D7,B7)", "x":9.25, "y":3}, + {"label":"K39 (D7,D0)", "x":10.25, "y":3}, + {"label":"K3A (D7,D5)", "x":11.25, "y":3}, + {"label":"K3B (D7,D3)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3C (D7,D2)", "x":14, "y":3}, + {"label":"K3D (D7,D1)", "x":15, "y":3}, + {"label":"K40 (D6,F1)", "x":0, "y":4, "w":1.5}, + {"label":"K41 (D6,F4)", "x":1.5, "y":4}, + {"label":"K42 (D6,F5)", "x":2.5, "y":4, "w":1.5}, + {"label":"K46 (D6,C6)", "x":4, "y":4, "w":7}, + {"label":"K4A (D6,D5)", "x":11, "y":4, "w":1.5}, + {"label":"K4B (D6,D3)", "x":13, "y":4}, + {"label":"K4C (D6,D2)", "x":14, "y":4}, + {"label":"K4D (D6,D1)", "x":15, "y":4} + ] + } + } + } + \ No newline at end of file diff --git a/keyboards/quantrik/kyuu/keymaps/default/config.h b/keyboards/quantrik/kyuu/keymaps/default/config.h new file mode 100644 index 000000000000..60dd02a9d0ee --- /dev/null +++ b/keyboards/quantrik/kyuu/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/quantrik/kyuu/keymaps/default/keymap.c b/keyboards/quantrik/kyuu/keymaps/default/keymap.c new file mode 100644 index 000000000000..077d7ac5a647 --- /dev/null +++ b/keyboards/quantrik/kyuu/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( \ + 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, QMKBEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, 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 \ + ), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/quantrik/kyuu/keymaps/default/readme.md b/keyboards/quantrik/kyuu/keymaps/default/readme.md new file mode 100644 index 000000000000..f87ce36e38e5 --- /dev/null +++ b/keyboards/quantrik/kyuu/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Kyuu diff --git a/keyboards/quantrik/kyuu/kyuu.c b/keyboards/quantrik/kyuu/kyuu.c new file mode 100644 index 000000000000..e9a72a5749a9 --- /dev/null +++ b/keyboards/quantrik/kyuu/kyuu.c @@ -0,0 +1,43 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ +#include "kyuu.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/quantrik/kyuu/kyuu.h b/keyboards/quantrik/kyuu/kyuu.h new file mode 100644 index 000000000000..25d9d86dd55d --- /dev/null +++ b/keyboards/quantrik/kyuu/kyuu.h @@ -0,0 +1,41 @@ +/* Copyright 2019 mechmerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k2E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4A, k4B, k4C, k4D, KC_NO }, \ +} diff --git a/keyboards/quantrik/kyuu/readme.md b/keyboards/quantrik/kyuu/readme.md new file mode 100644 index 000000000000..2b3314098009 --- /dev/null +++ b/keyboards/quantrik/kyuu/readme.md @@ -0,0 +1,13 @@ +# kyuu + +Kyuu is a 65% keyboard inspired by the TGR 910's top right blocker. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Quantrik 65% PCB +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=97810.0), [quantrik.com](https://www.quantrik.com/collections/frontpage/products/kyuu-keyboard) + +Make example for this keyboard (after setting up your build environment): + + make quantrik/kyuu: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). diff --git a/keyboards/quantrik/kyuu/rules.mk b/keyboards/quantrik/kyuu/rules.mk new file mode 100644 index 000000000000..3229957d9cb9 --- /dev/null +++ b/keyboards/quantrik/kyuu/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/quefrency/info.json b/keyboards/quefrency/info.json deleted file mode 100644 index 160e7896bbd0..000000000000 --- a/keyboards/quefrency/info.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "keyboard_name": "Quefrency", - "url": "https://keeb.io", - "maintainer": "nooges", - "width": 17, - "height": 5, - "layouts": { - "LAYOUT": { - "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"1", "x":1, "y":0}, - {"label":"2", "x":2, "y":0}, - {"label":"3", "x":3, "y":0}, - {"label":"4", "x":4, "y":0}, - {"label":"5", "x":5, "y":0}, - {"label":"6", "x":6, "y":0}, - - {"label":"7", "x":8, "y":0}, - {"label":"8", "x":9, "y":0}, - {"label":"9", "x":10, "y":0}, - {"label":"0", "x":11, "y":0}, - {"label":"-", "x":12, "y":0}, - {"label":"=", "x":13, "y":0}, - {"label":"Del", "x":14, "y":0}, - {"label":"Bksp", "x":15, "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":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":"[", "x":12.5, "y":1}, - {"label":"]", "x":13.5, "y":1}, - {"label":"Backslash", "x":14.5, "y":1, "w":1.5}, - - {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, - {"label":"A", "x":1.75, "y":2}, - {"label":"S", "x":2.75, "y":2}, - {"label":"D", "x":3.75, "y":2}, - {"label":"F", "x":4.75, "y":2}, - {"label":"G", "x":5.75, "y":2}, - - {"label":"H", "x":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":";", "x":11.75, "y":2}, - {"label":"'", "x":12.75, "y":2}, - {"label":"Enter", "x":13.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":8.25, "y":3}, - {"label":"M", "x":9.25, "y":3}, - {"label":",", "x":10.25, "y":3}, - {"label":".", "x":11.25, "y":3}, - {"label":"/", "x":12.25, "y":3}, - {"label":"Shift", "x":13.25, "y":3, "w":1.75}, - {"label":"Up", "x":15, "y":3}, - - {"label":"Ctrl", "x":0, "y":4, "w":1.25}, - {"label":"Alt", "x":1.25, "y":4, "w":1.25}, - {"label":"Win", "x":2.5, "y":4, "w":1.25}, - {"label":"Fn", "x":3.75, "y":4, "w":1.25}, - {"label":"Space", "x":5, "y":4, "w":2.25}, - - {"label":"Fn", "x":8.25, "y":4, "w":1.25}, - {"label":"Space", "x":9.5, "y":4, "w":1.5}, - {"label":"Alt", "x":11, "y":4}, - {"label":"Ctrl", "x":12, "y":4}, - {"label":"Left", "x":13, "y":4}, - {"label":"Down", "x":14, "y":4}, - {"label":"Right", "x":15, "y":4} - ] - }, - "LAYOUT_65": { - "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"1", "x":1, "y":0}, - {"label":"2", "x":2, "y":0}, - {"label":"3", "x":3, "y":0}, - {"label":"4", "x":4, "y":0}, - {"label":"5", "x":5, "y":0}, - {"label":"6", "x":6, "y":0}, - - {"label":"7", "x":8, "y":0}, - {"label":"8", "x":9, "y":0}, - {"label":"9", "x":10, "y":0}, - {"label":"0", "x":11, "y":0}, - {"label":"-", "x":12, "y":0}, - {"label":"=", "x":13, "y":0}, - {"label":"Del", "x":14, "y":0}, - {"label":"Bksp", "x":15, "y":0}, - {"label":"Home", "x":16, "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":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":"[", "x":12.5, "y":1}, - {"label":"]", "x":13.5, "y":1}, - {"label":"Backslash", "x":14.5, "y":1, "w":1.5}, - {"label":"End", "x":16, "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":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":";", "x":11.75, "y":2}, - {"label":"'", "x":12.75, "y":2}, - {"label":"Enter", "x":13.75, "y":2, "w":2.25}, - {"label":"Page Up", "x":16, "y":2}, - - {"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":8.25, "y":3}, - {"label":"M", "x":9.25, "y":3}, - {"label":",", "x":10.25, "y":3}, - {"label":".", "x":11.25, "y":3}, - {"label":"/", "x":12.25, "y":3}, - {"label":"Shift", "x":13.25, "y":3, "w":1.75}, - {"label":"Up", "x":15, "y":3}, - {"label":"Page Down", "x":16, "y":3}, - - {"label":"Ctrl", "x":0, "y":4, "w":1.25}, - {"label":"Alt", "x":1.25, "y":4, "w":1.25}, - {"label":"Win", "x":2.5, "y":4, "w":1.25}, - {"label":"Fn", "x":3.75, "y":4, "w":1.25}, - {"label":"Space", "x":5, "y":4, "w":2.25}, - - {"label":"Fn", "x":8.25, "y":4, "w":1.25}, - {"label":"Space", "x":9.5, "y":4, "w":1.5}, - {"label":"Alt", "x":11, "y":4}, - {"label":"Ctrl", "x":12, "y":4}, - {"label":"Win", "x":13, "y":4}, - {"label":"Left", "x":14, "y":4}, - {"label":"Down", "x":15, "y":4}, - {"label":"Right", "x":16, "y":4} - ] - } - } -} diff --git a/keyboards/qwertyydox/info.json b/keyboards/qwertyydox/info.json index 0b762388ec59..3dd6b3ec7385 100644 --- a/keyboards/qwertyydox/info.json +++ b/keyboards/qwertyydox/info.json @@ -5,8 +5,8 @@ "url": "", "maintainer": "qmk", "processor": "atmega32u4", - "width": 14, - "height": 4, + "width": 16, + "height": 5, "layouts": { "LAYOUT": { "key_count": 53, diff --git a/keyboards/rama/koyu/config.h b/keyboards/rama/koyu/config.h new file mode 100644 index 000000000000..e7817e79a090 --- /dev/null +++ b/keyboards/rama/koyu/config.h @@ -0,0 +1,142 @@ +/* Copyright 2017 Jason Williams (Wilba) + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +// USB Device descriptor parameter +#define VENDOR_ID 0x5241 // "RW" +#define PRODUCT_ID 0x4B59 // "KY" +#define DEVICE_VER 0x0001 +#define MANUFACTURER RAMA.WORKS +#define PRODUCT RAMA KOYU +#define DESCRIPTION RAMA KOYU Keyboard + + + +// key matrix size +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// KOYU PCB pin-out +#define MATRIX_ROW_PINS { F0, F1, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +// IS31FL3731 driver +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 72 + +// COL2ROW or ROW2COL +#define DIODE_DIRECTION COL2ROW + +// Set 0 if debouncing isn't needed +#define DEBOUNCING_DELAY 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 + + +/* + * 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 + +#define RGB_BACKLIGHT_ENABLED 1 + +// This conditionally compiles the backlight code for KOYU specifics +#define RGB_BACKLIGHT_KOYU + +// enable/disable LEDs based on layout +// they aren't really used if RGB_BACKLIGHT_M60_A defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 1 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 1 + +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 + +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 + +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 + +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0110000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0111000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0111100000000111 + +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Backlight config starts after EEPROM version +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 +// Dynamic keymap starts after backlight config (35+31) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 66 +// Dynamic macro starts after dynamic keymaps (66+(4*5*15*2)) = (66+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 666 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 358 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/rama/koyu/info.json b/keyboards/rama/koyu/info.json new file mode 100644 index 000000000000..4b6edc7bfa82 --- /dev/null +++ b/keyboards/rama/koyu/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "KOYU", + "url": "", + "maintainer": "Wilba", + "bootloader": "DFU", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "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":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Num Lock", "x":15, "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":"Insert", "x":15, "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":"Home", "x":15, "y":2}, {"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":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"/", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Ctrl", "x":11, "y":4, "w":1.5}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/rama/koyu/keymaps/default/keymap.c b/keyboards/rama/koyu/keymaps/default/keymap.c new file mode 100644 index 000000000000..f6bc94fbd60e --- /dev/null +++ b/keyboards/rama/koyu/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + MO(1), KC_LGUI, KC_LALT, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, 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), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BR_DEC, BR_INC, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ES_DEC, ES_INC, 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 Layer + [3] = LAYOUT_all( + 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), +}; diff --git a/keyboards/rama/koyu/koyu.c b/keyboards/rama/koyu/koyu.c new file mode 100644 index 000000000000..03d1e1215976 --- /dev/null +++ b/keyboards/rama/koyu/koyu.c @@ -0,0 +1,18 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ +#ifndef RGB_BACKLIGHT_KOYU +#error RGB_BACKLIGHT_KOYU not defined, you done goofed somehao, brah +#endif diff --git a/keyboards/rama/koyu/koyu.h b/keyboards/rama/koyu/koyu.h new file mode 100644 index 000000000000..c2aaa0273a61 --- /dev/null +++ b/keyboards/rama/koyu/koyu.h @@ -0,0 +1,42 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" +#include "../../zeal60/rgb_backlight_keycodes.h" +#include "../../zeal60/zeal60_keycodes.h" + +#define ____ KC_NO + +// Right switch of split backspace is at 2,13 and is the only switch +// whose physical position doesn't match switch matrix position :-( +// However, it also makes no sense to view the physical as 16 columns, +// so the numbering goes 00 to 14. Deal with it. + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K213, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K407, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, ____, ____, ____, ____, K407, ____, ____, ____, K411, K412, K413, K414 } \ +} diff --git a/keyboards/rama/koyu/readme.md b/keyboards/rama/koyu/readme.md new file mode 100644 index 000000000000..c249bf11b62b --- /dev/null +++ b/keyboards/rama/koyu/readme.md @@ -0,0 +1,23 @@ +# RAMA KOYU + +![RAMA KOYU](https://static1.squarespace.com/static/563c788ae4b099120ae219e2/t/5b8bd6e6b8a045c95eac2003/1535891375794/RW-KOYU-A-RENDER-04-TOP.1335.jpg?format=1500w) + +The 'wait' for something isn't the most conscious desire, but that anticipation creates nostalgia. + +At Rama Works, you've embraced this. From updates of the blog, to direct communication with the community, being part of a Rama Works product doesn't just start when you receive it. If you've ever received a Rama Works product, you know that no detail is overlooked. + +Let us take you on a journey that will capture that sensory experience, and explore the gravitational interaction between aesthetic and design. The Rama Works 'X' element personifies the understanding that taking something away doesn't necessarily make it less. + +This is the sound of Rama Works. Never too busy-a feeling of delightful modern weightlessness. A rich sonic experience. Sparse and ethereal, this music boldly inhabits a nondescript, borderless space. Warm, synthetic textures, bespoke musical sound design. percussive elements percolating and accentuating movement on the screen and in the stereo field. a sonic palette full of clicks, taps and resonances evoking a sense of calm comfort and familiarity. + +[More info at RAMA WORKS](https://rama.works/koyu/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: RAMA KOYU PCB +Hardware Availability: [RAMA WORKS Store](https://ramaworks.store/) + +Make example for this keyboard (after setting up your build environment): + + make rama/koyu: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). \ No newline at end of file diff --git a/keyboards/rama/koyu/rules.mk b/keyboards/rama/koyu/rules.mk new file mode 100644 index 000000000000..5e470769d603 --- /dev/null +++ b/keyboards/rama/koyu/rules.mk @@ -0,0 +1,80 @@ + + +# project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + quantum/color.c \ + drivers/issi/is31fl3731.c \ + drivers/avr/i2c_master.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Boot Section +BOOTLOADER = atmel-dfu + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes + +#LAYOUTS = ??? diff --git a/keyboards/rama/m10_b/config.h b/keyboards/rama/m10_b/config.h index 1af1f64a5064..25fd58d154dd 100644 --- a/keyboards/rama/m10_b/config.h +++ b/keyboards/rama/m10_b/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D7, B6, F0, D6, B5, F1, D4, B4, F4, F5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN C6 diff --git a/keyboards/rama/m10_b/keymaps/default/config.h b/keyboards/rama/m10_b/keymaps/default/config.h index d150575c1a73..2a3bf1819f0d 100644 --- a/keyboards/rama/m10_b/keymaps/default/config.h +++ b/keyboards/rama/m10_b/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/rama/m60_a/config.h b/keyboards/rama/m60_a/config.h index 2b54cda790db..1cbdee5ae355 100644 --- a/keyboards/rama/m60_a/config.h +++ b/keyboards/rama/m60_a/config.h @@ -87,9 +87,19 @@ // disable backlight after timeout in minutes, 0 = no timeout #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + // the default effect (RGB test) #define RGB_BACKLIGHT_EFFECT 255 +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + // These define which keys in the matrix are alphas/mods // Used for backlight effects so colors are different for // alphas vs. mods @@ -101,6 +111,11 @@ #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage diff --git a/keyboards/rama/m6_a/config.h b/keyboards/rama/m6_a/config.h index 3098a988dc46..efaf74a9329b 100644 --- a/keyboards/rama/m6_a/config.h +++ b/keyboards/rama/m6_a/config.h @@ -43,7 +43,7 @@ #define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/rama/m6_a/keymaps/krusli/keymap.c b/keyboards/rama/m6_a/keymaps/krusli/keymap.c index c8775f4eae5b..410229ae471a 100644 --- a/keyboards/rama/m6_a/keymaps/krusli/keymap.c +++ b/keyboards/rama/m6_a/keymaps/krusli/keymap.c @@ -52,9 +52,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) return true; }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = LAYOUT( MUTE, DEAFEN, TO(_LAYER1), diff --git a/keyboards/rama/m6_b/config.h b/keyboards/rama/m6_b/config.h index 5ad648c7634c..0d690bffafc5 100644 --- a/keyboards/rama/m6_b/config.h +++ b/keyboards/rama/m6_b/config.h @@ -43,7 +43,7 @@ #define MATRIX_COL_PINS { D4, B5, F4, D7, C6, F6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 @@ -120,9 +120,19 @@ // disable backlight after timeout in minutes, 0 = no timeout #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + // the default effect (RGB test) #define RGB_BACKLIGHT_EFFECT 255 +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + // These define which keys in the matrix are alphas/mods // Used for backlight effects so colors are different for // alphas vs. mods @@ -134,6 +144,11 @@ #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0 +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage diff --git a/keyboards/rama/u80_a/config.h b/keyboards/rama/u80_a/config.h index 0a8397c0a09b..953bf63f2310 100644 --- a/keyboards/rama/u80_a/config.h +++ b/keyboards/rama/u80_a/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4, B7, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/readme.md b/keyboards/readme.md index 8b0c10ab4826..8b6e40721c13 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -3,8 +3,6 @@ QMK runs on a diverse range of keyboards. Some of these keyboards are officially ## Official QMK Keyboards -These keyboards are manufactured by the maintainers of QMK. - ### Ortholinear Keyboards - Jack Humbert What makes OLKB keyboards shine is a combo of lean aesthetics, compact size, and killer tactile feel. These are available through [olkb.com](http://olkb.com) as well as through [Massdrop](http://massdrop.com) from time to time, as easy to assemble kits. @@ -13,12 +11,6 @@ What makes OLKB keyboards shine is a combo of lean aesthetics, compact size, and * [Preonic](/keyboards/preonic/) — Like the Planck, but bigger. 50%. * [Atomic](/keyboards/atomic/) — Imagine the size of the Planck. Now imagine the size of the Preonic. Now imagine _bigger_. That is the Atomic. A 60% keyboard. -### ErgoDox EZ - Erez Zukerman - -Made in Taiwan using advanced robotic manufacturing, the ErgoDox EZ is a fully-assembled, premium ergonomic keyboard. Its split design allows you to place both halves shoulder width, and its custom-made wrist rests and tilt/tent kit make for incredibly comfortable typing. Available on [ergodox-ez.com](https://ergodox-ez.com). - -* [ErgoDox EZ](/keyboards/ergodox_ez/) — Our one and only product. Yes, it's that awesome. Comes with either printed or blank keycaps, and 7 different keyswitch types. - ### Clueboard - Zach White Designed and built in Felton, CA, Clueboards keyboard emphasize quality and locally sourced components, available on [clueboard.co](http://clueboard.co) @@ -27,6 +19,13 @@ Designed and built in Felton, CA, Clueboards keyboard emphasize quality and loca * [Cluecard](/keyboards/clueboard/card/) — A small board to help you hack on QMK. * [Cluepad](/keyboards/clueboard/17/) — A mechanical numpad with QMK superpowers. +### ErgoDox EZ and Planck EZ - ZSA Technology Labs + +[ZSA Technology Labs](https://ergodox-ez.com) maintains its own [fork of QMK](https://github.com/zsa/qmk_firmware) which feeds its [configurator](https://configure.ergodox-ez.com), for stability and legal purposes. The ZSA boards are: + +* [ErgoDox EZ](/keyboards/ergodox_ez/) — A powerful split mechanical keyboard. +* [Planck EZ](/keyboards/planck/ez) — A 40% DIY powerhouse of customizability and modification capability. It's a lean, mean, typing machine, which ships fully assembled with a two-year warranty. + ## Community-supported QMK Keyboards @@ -35,7 +34,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [9key](/keyboards/9key) — A 9-key minipad sold by Bishop Keyboards. * [Alps64](/keyboards/alps64) — A 60% keyboard for Alps keyswitches. * [AMJ60](/keyboards/amj60) — DIY/Assembled compact 60% keyboard. -* [Arrow Pad](/keyboards/arrow_pad) — A custom creation by IBNobody. +* [Arrow Pad](/keyboards/handwired/arrow_pad) — A custom creation by IBNobody. * [Atreus](/keyboards/atreus) — Made by Technomancy. * [Bantam44](/keyboards/bantam44) — It is a 44-key 40% staggered keyboard. * [DataHand](/keyboards/handwired/datahand) — DataHand keyboard converted to use a Teensy board. @@ -53,7 +52,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [The Kitten Paw](/keyboards/kitten_paw) — A replacement controller (2016 revision) for the Filco Majestouch by [Bathroom Epiphanies](https://github.com/BathroomEpiphanies). * [Lets Split](/keyboards/lets_split) - Split ortholinear 40% keyboard. * [Phantom](/keyboards/phantom) — A tenkeyless kit by Teel, also from Geekhack. -* [Retro Refit](/keyboards/retro_refit) — Another creation by IBNobody. +* [Retro Refit](/keyboards/handwired/retro_refit) — Another creation by IBNobody. * [S60-x](/keyboards/s60_x) — DIY compact keyboard designed by VinnyCordeiro for Sentraq. * [Satan](/keyboards/satan) — A GH60 variant. * [SixKeyBoard](/keyboards/sixkeyboard) — A 6-key keyboard made by TechKeys. diff --git a/keyboards/redox/keymaps/fculpo/config.h b/keyboards/redox/keymaps/fculpo/config.h new file mode 100644 index 000000000000..bff76aef2649 --- /dev/null +++ b/keyboards/redox/keymaps/fculpo/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2018 Mattia Dal Ben + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +#define MASTER_LEFT +//#define MASTER_RIGHT +//#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/redox/keymaps/fculpo/keymap.c b/keyboards/redox/keymaps/fculpo/keymap.c new file mode 100644 index 000000000000..b5aeca99dd2b --- /dev/null +++ b/keyboards/redox/keymaps/fculpo/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _SYMB 1 +#define _NAV 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + SYMB, + NAV, + ADJUST, +}; + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) + +#define KC_ALAS LALT_T(KC_PAST) +#define KC_CTES LCTL_T(KC_ESC) +#define KC_CTQU RCTL_T(KC_QUOT) + +#define KC_NAGR LT(_NAV, KC_GRV) +#define KC_NAMI LT(_NAV, KC_MINS) + +#define KC_ADEN LT(_ADJUST, KC_END) +#define KC_ADPU LT(_ADJUST, KC_PGUP) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CTES ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_CTQU , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_BSLS ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_LGUI , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , KC_RALT , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,KC_F6 , KC_F7 ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_NAV] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/redox/keymaps/fculpo/keymap.json b/keyboards/redox/keymaps/fculpo/keymap.json new file mode 100644 index 000000000000..ca7905b16952 --- /dev/null +++ b/keyboards/redox/keymaps/fculpo/keymap.json @@ -0,0 +1,399 @@ +[ + { + "name": "Redox/rev1", + "author": "Fabien Culpo", + "switchMount": "cherry", + "plate": false, + "pcb": false + }, + [ + { + "x": 3.5 + }, + "#\n3", + { + "x": 10.5 + }, + "*\n8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@\n2", + { + "x": 1 + }, + "$\n4", + { + "x": 8.5 + }, + "&\n7", + { + "x": 1 + }, + "(\n9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "%\n5", + { + "x": 6.5 + }, + "^\n6" + ], + [ + { + "y": -0.875, + "x": 0.25, + "a": 5, + "w": 1.25 + }, + "`\nLayer 2\n\n\n\n\n~", + { + "a": 4 + }, + "!\n1", + { + "x": 14.5 + }, + ")\n0", + { + "a": 5, + "w": 1.25 + }, + "_\nLayer 2\n\n\n\n\n-" + ], + [ + { + "y": -0.625, + "x": 6.5 + }, + "Layer 1", + { + "x": 4.5 + }, + "Layer 1" + ], + [ + { + "y": -0.75, + "x": 3.5, + "a": 4 + }, + "E", + { + "x": 10.5 + }, + "I" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "W", + { + "x": 1 + }, + "R", + { + "x": 8.5 + }, + "U", + { + "x": 1 + }, + "O" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "T", + { + "x": 6.5 + }, + "Y" + ], + [ + { + "y": -0.875, + "x": 0.25, + "a": 7, + "w": 1.25 + }, + "TAB", + { + "a": 4 + }, + "Q", + { + "x": 14.5 + }, + "P", + { + "a": 5, + "w": 1.25 + }, + "+\n=" + ], + [ + { + "y": -0.625, + "x": 6.5, + "a": 7, + "h": 1.5 + }, + "[", + { + "x": 4.5, + "h": 1.5 + }, + "]" + ], + [ + { + "y": -0.75, + "x": 3.5, + "a": 4 + }, + "D", + { + "x": 10.5 + }, + "K" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "S", + { + "x": 1, + "n": true + }, + "F", + { + "x": 8.5, + "n": true + }, + "J", + { + "x": 1 + }, + "L" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "G", + { + "x": 6.5 + }, + "H" + ], + [ + { + "y": -0.875, + "x": 0.25, + "a": 5, + "w": 1.25 + }, + "ESC\nCTRL", + { + "a": 4 + }, + "A", + { + "x": 14.5 + }, + ":\n;", + { + "a": 5, + "w": 1.25 + }, + "'\nCTRL" + ], + [ + { + "y": -0.375, + "x": 3.5, + "a": 4 + }, + "C", + { + "x": 10.5 + }, + "<\n," + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "X", + { + "x": 1 + }, + "V", + { + "x": 8.5 + }, + "M", + { + "x": 1 + }, + ">\n." + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "B", + { + "x": 6.5 + }, + "N" + ], + [ + { + "y": -0.875, + "x": 0.25, + "a": 5, + "w": 1.25 + }, + "SHIFT", + { + "a": 4 + }, + "Z", + { + "x": 14.5 + }, + "?\n/", + { + "a": 5, + "w": 1.25 + }, + "SHIFT" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "*\nALT", + { + "x": 10.5 + }, + "Left" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "-", + { + "x": 12.5 + }, + "Down" + ], + [ + { + "y": -0.75, + "x": 0.5 + }, + "|\n\n\n\n\n\n\\", + "+", + { + "x": 14.5 + }, + "Up", + { + "sb": "cherry", + "st": "MX1A-21xx" + }, + "Right" + ], + [ + { + "r": 15, + "y": -2.625, + "x": 5.75, + "a": 7, + "w": 1.25 + }, + "SUPER" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "a": 5 + }, + "PgUp\nLay. 3", + { + "a": 7 + }, + "PgDn" + ], + [ + { + "h": 1.5 + }, + "Bksp", + { + "h": 1.5 + }, + "Del" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -2 + }, + "Home", + { + "a": 5 + }, + "End\nLay. 3" + ], + [ + { + "x": -2, + "a": 7, + "h": 1.5 + }, + "Enter", + { + "h": 1.5 + }, + "Space" + ], + [ + { + "r": -15, + "rx": 0, + "ry": 0, + "y": 7.75, + "x": 11.75, + "w": 1.25 + }, + "ALT" + ] +] diff --git a/keyboards/redox/keymaps/fculpo/readme.md b/keyboards/redox/keymaps/fculpo/readme.md new file mode 100644 index 000000000000..1250e47b9c9c --- /dev/null +++ b/keyboards/redox/keymaps/fculpo/readme.md @@ -0,0 +1,18 @@ +# A tweaked keymap for Redox + +This keymap modifies the [default keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/redox) for the awesome [Redox keyboard](https://github.com/mattdibi/redox-keyboard) designed by Mattia Dal Ben. + +Also heavily inspired by nrichers layout. + +![fculpo Layout Image](https://i.imgur.com/OXT8boJ.png) + +## Changes to the default keymap + +These keymap changes are meant to improve the usability of the layout in everyday use: + +- Move `GUI` (`SUPER`) key to where default left `CTRL` is +- Move `/?` into usual location next to right `SHIFT` - the default flash from Falbatech put `\|` here (might not be the Redox default?), which felt unintuitive +- Put `\|` into bottom-left spot where `GUI` (`SUPER`) was - had to go somewhere and this bottom-left placement sort of balances with the almost bottom-right `/?` +- Change default `ESC` into `ESC` on tap, `CTRL` on hold - Love the UNIX-ey `CTRL` key location and wanted to keep `ESC` in the original position +- Change default `'` above right `SHIFT` into `'` on tap, `CTRL` on hold - Love the UNIX-ey CTRL key location, but it can give you 'left claw hand', which a second, mirrored `CTRL` key fixes +- Add `F11` and `F12` keys to two layers - needed on macOS if you want to control volume up and down from your keyboard (not shown, on a different layer)S diff --git a/keyboards/zen/keymaps/jwlawrence/rules.mk b/keyboards/redox/keymaps/fculpo/rules.mk similarity index 50% rename from keyboards/zen/keymaps/jwlawrence/rules.mk rename to keyboards/redox/keymaps/fculpo/rules.mk index 73142a16803a..a81250cdf6d9 100644 --- a/keyboards/zen/keymaps/jwlawrence/rules.mk +++ b/keyboards/redox/keymaps/fculpo/rules.mk @@ -1,3 +1,2 @@ RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = yes diff --git a/keyboards/redox/keymaps/finex/config.h b/keyboards/redox/keymaps/finex/config.h index b23342ce0fa0..8852a4cc8721 100644 --- a/keyboards/redox/keymaps/finex/config.h +++ b/keyboards/redox/keymaps/finex/config.h @@ -32,3 +32,7 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 + +// #define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 200 diff --git a/keyboards/redox/keymaps/finex/keymap.c b/keyboards/redox/keymaps/finex/keymap.c index 8b8f5f183903..5a508815b2d9 100644 --- a/keyboards/redox/keymaps/finex/keymap.c +++ b/keyboards/redox/keymaps/finex/keymap.c @@ -3,47 +3,161 @@ extern keymap_config_t keymap_config; // Layer names -#define _QWERTY 0 -#define _COLEMAKDHMK 1 -#define _QWERTY_MAC 2 -#define _COLEMAKDHMK_MAC 3 -#define _SYMB 4 -#define _ADJUST 5 +enum{ + // - Base layers: + _COLEMAKDHMK, + _COLEMAKDHMK_MAC, + _QWERTY, + _QWERTY_MAC, + // - Symbols, numbers, functions and custom shifts: + _SYMB, + _NUMB, + _FUNC, + _RHSH, // Righ hand shifted keycodes + _LHSH, // Left hand shifted keycodes + // - Adjust layer: + _ADJUST +}; // Custom keycodes enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAKDHMK, - QWERTY_MAC, + COLEMAKDHMK = SAFE_RANGE, COLEMAKDHMK_MAC, - SYMB, - ADJUST, + QWERTY, + QWERTY_MAC, ASC_SAR, ASC_DAR, ASC_SQT, ASC_DQT, + ASC_CIRC, + ASC_TILD, ASC_HAP, - ASC_SAD + ASC_SAD, + ASC_BKT, + ASC_CBRL, + ASC_CBRR }; +// Tap dance keycodes +enum tap_dance{ + TD_SCLN, // ;; -> : + TD_LBRC, // [[ -> { + TD_RBRC, // ]] -> } + TD_QMRK // // -> ? +}; + +// Semicolon to Colon +void dance_scln_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_SCLN); + } else { + register_code (KC_RSFT); + register_code (KC_SCLN); + } +} +void dance_scln_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_SCLN); + } else { + unregister_code (KC_RSFT); + unregister_code (KC_SCLN); + } +} + +// Square braket to curly bracket (left) +void dance_lbrc_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_LBRC); + } else { + register_code (KC_RSFT); + register_code (KC_LBRC); + } +} +void dance_lbrc_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_LBRC); + } else { + unregister_code (KC_RSFT); + unregister_code (KC_LBRC); + } +} + +// Square braket to curly bracket (right) +void dance_rbrc_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_RBRC); + } else { + register_code (KC_RSFT); + register_code (KC_RBRC); + } +} +void dance_rbrc_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_RBRC); + } else { + unregister_code (KC_RSFT); + unregister_code (KC_RBRC); + } +} + + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SCLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_scln_finished, dance_scln_reset), + [TD_LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lbrc_finished, dance_lbrc_reset), + [TD_RBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_rbrc_finished, dance_rbrc_reset) +}; + + // Shortcut to make keymap more readable -#define KC_SYQT LT(_SYMB, KC_QUOT) -#define KC_SYGR LT(_SYMB, KC_GRV) -#define KC_SYSP LT(_SYMB, KC_SPC) -#define KC_ADEN LT(_ADJUST, KC_END) -#define KC_ADPU LT(_ADJUST, KC_PGUP) -#define KC_CESC LCTL_T(KC_ESC) -#define KC_CBSP LCTL_T(KC_BSPC) -#define KC_CMIN RCTL_T(KC_MINUS) -#define KC_GBSP LGUI_T(KC_BSPC) -#define KC_ADEL LALT_T(KC_DEL) -#define KC_APLS RALT_T(KC_PPLS) -#define KC_LSEN LSFT_T(KC_ENT) -#define KC_RSEN RSFT_T(KC_ENT) -#define FN1 QWERTY -#define FN2 COLEMAKDHMK -#define FN3 QWERTY_MAC -#define FN4 COLEMAKDHMK_MAC + +// - Adjustment Layer: +#define KC_ADEN LT(_ADJUST, KC_END) // End / _ADJUST layer +#define KC_ADPU LT(_ADJUST, KC_PGUP) // Page Up / _ADJUST layer + +// - Custom layers: +#define KC_SYSP LT(_SYMB, KC_SPC) // Space / _symbols +#define KC_NUES LT(_NUMB, KC_ESC) // Esc / _numbers +#define KC_FUTA LT(_FUNC, KC_TAB) // Tab / _functions +#define KC_N_SH LT(_LHSH, KC_N) // Pressing N key, enable shifted keys on other half (the left one) +#define KC_T_SH LT(_RHSH, KC_T) // Pressing T key, enable shifted keys on other half (the right one) + +// - Custom keys/modifiers: +#define KC_ATAB RALT_T(KC_TAB) // - Tab / Alt Gr +#define KC_CESC LCTL_T(KC_ESC) // - Esc / Left Ctrl +#define KC_GSPC LGUI_T(KC_SPC) // - Space / Left GUI +#define KC_CBSP LCTL_T(KC_BSPC) // - Backspace / Left Ctrl + +// -- Mac os mode: +#define KC_CSPC LCTL_T(KC_SPC) // - Space / Left Ctrl +#define KC_GBSP LGUI_T(KC_BSPC) // - Backspace / Left GUI + + +#define KC_AEQL LALT_T(KC_EQL) // - Equals / Alt (left alt) +#define KC_CMIN RCTL_T(KC_MINUS) // - Minus / Right Ctrl +#define KC_ADEL RALT_T(KC_DEL) // - Del / Alt Gr +#define KC_RSEN RSFT_T(KC_ENT) // - Enter / Right Shift (standard shift) +#define KC_LAEN LALT_T(KC_ENT) // - Enter / Left Alt + +// Home row mod tap keys: +// - Left hand +#define KC_CT_A CTL_T(KC_A) // A / Left Ctrl +#define KC_AL_S ALT_T(KC_S) // S / Left Alt +// - Right hand +#define KC_AL_E ALT_T(KC_E) // E / Left Alt +#define KC_CT_O CTL_T(KC_O) // O / Left Ctrl + +// - Tap dance: +#define KC_TDSC TD(TD_SCLN) // ;; -> : +#define KC_TDLB TD(TD_LBRC) // [[ -> { +#define KC_TDRB TD(TD_RBRC) // ]] -> } + +// - Keyboard base maps: +#define LR1 COLEMAKDHMK +#define LR2 COLEMAKDHMK_MAC +#define LR3 QWERTY +#define LR4 QWERTY_MAC + // Send custom strings or change default base layer bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -63,12 +177,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // SS_RALT(SS_LSFT()): Avoid sending dead key on software intl layouts SEND_STRING(SS_RALT(SS_LSFT("\""))); return false; + case ASC_CIRC: + // SS_RALT(): Avoid sending dead key on software intl layouts + SEND_STRING(SS_RALT("^")); + return false; + case ASC_TILD: + // SS_RALT(SS_LSFT()): Avoid sending dead key on software intl layouts + SEND_STRING(SS_RALT(SS_LSFT("~"))); + return false; case ASC_HAP: SEND_STRING(":-) "); return false; case ASC_SAD: SEND_STRING(":-( "); return false; + case ASC_BKT: + // SS_RALT(): Avoid sending dead key on software intl layouts + SEND_STRING(SS_RALT("`")); + return false; + case ASC_CBRL: + SEND_STRING("{"); + return false; + case ASC_CBRR: + SEND_STRING("}"); + return false; case QWERTY: if (record->event.pressed) { set_single_persistent_default_layer(_QWERTY); @@ -98,91 +230,157 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_SYGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_SYQT , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_DEL , KC_BSPC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_CESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_CMIN , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - KC_SYSP ,KC_BSLS ,KC_QUOT ,KC_LGUI , KC_ADEL , KC_CBSP ,KC_LSEN , KC_RSEN ,KC_SYSP , KC_APLS , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + // Colemak DM-MK Mod + [_COLEMAKDHMK] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_ESC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ATAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,XXXXXXX , XXXXXXX ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_TDSC ,KC_AEQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CESC ,KC_A ,KC_R ,KC_AL_S ,KC_T_SH ,KC_G ,KC_TDLB , KC_TDRB ,KC_M ,KC_N_SH ,KC_AL_E ,KC_I ,KC_O ,KC_CMIN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_D ,KC_V ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_K ,KC_H ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_GSPC ,KC_HYPR ,KC_MEH ,XXXXXXX , KC_NUES , KC_CBSP ,KC_FUTA , KC_LAEN ,KC_SYSP , KC_ADEL , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), - [_COLEMAKDHMK] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_SYGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_SYQT , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,KC_DEL , KC_BSPC ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_SCLN ,KC_EQL , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_CESC ,KC_A ,KC_R ,KC_S ,KC_T ,KC_G ,KC_LBRC , KC_RBRC ,KC_M ,KC_N ,KC_E ,KC_I ,KC_O ,KC_CMIN , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_D ,KC_V ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_K ,KC_H ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - KC_SYSP ,KC_BSLS ,KC_QUOT ,KC_LGUI , KC_ADEL , KC_CBSP ,KC_LSEN , KC_RSEN ,KC_SYSP , KC_APLS , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + // Colemak DM-MK Mod, Mac version (CTRL and GUI are swapped) + [_COLEMAKDHMK_MAC] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_ESC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ATAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,XXXXXXX , XXXXXXX ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_TDSC ,KC_AEQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CESC ,KC_A ,KC_R ,KC_AL_S ,KC_T_SH ,KC_G ,KC_TDLB , KC_TDRB ,KC_M ,KC_N_SH ,KC_AL_E ,KC_I ,KC_O ,KC_CMIN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_D ,KC_V ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_K ,KC_H ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_CSPC ,KC_HYPR ,KC_MEH ,XXXXXXX , KC_NUES , KC_GBSP ,KC_FUTA , KC_LAEN ,KC_SYSP , KC_ADEL , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), - [_QWERTY_MAC] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_SYGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_SYQT , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_DEL , KC_BSPC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_CESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_CMIN , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - KC_SYSP ,KC_BSLS ,KC_QUOT ,KC_LCTL , KC_ADEL , KC_GBSP ,KC_LSEN , KC_RSEN ,KC_SYSP , KC_APLS , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + // QWERTY + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_ESC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ATAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,XXXXXXX , XXXXXXX ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_AEQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_TDLB , KC_TDRB ,KC_H ,KC_J ,KC_K ,KC_L ,KC_TDSC ,KC_CMIN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_GSPC ,KC_HYPR ,KC_MEH ,XXXXXXX , KC_NUES , KC_CBSP ,KC_FUTA , KC_LAEN ,KC_SYSP , KC_ADEL , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), - [_COLEMAKDHMK_MAC] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_SYGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_SYQT , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_B ,KC_DEL , KC_BSPC ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_SCLN ,KC_EQL , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_CESC ,KC_A ,KC_R ,KC_S ,KC_T ,KC_G ,KC_LBRC , KC_RBRC ,KC_M ,KC_N ,KC_E ,KC_I ,KC_O ,KC_CMIN , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_D ,KC_V ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_K ,KC_H ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - KC_SYSP ,KC_BSLS ,KC_QUOT ,KC_LCTL , KC_ADEL , KC_GBSP ,KC_LSEN , KC_RSEN ,KC_SYSP , KC_APLS , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + // QWERTY, Mac version (CTRL and GUI are swapped) + [_QWERTY_MAC] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_ESC , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_ATAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,XXXXXXX , XXXXXXX ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_AEQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_TDLB , KC_TDRB ,KC_H ,KC_J ,KC_K ,KC_L ,KC_TDSC ,KC_CMIN , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSPO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSPC , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_CSPC ,KC_HYPR ,KC_MEH ,XXXXXXX , KC_NUES , KC_GBSP ,KC_FUTA , KC_LAEN ,KC_SYSP , KC_ADEL , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), + // Symbols, home row arrows, function keys and macros layer [_SYMB] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,XXXXXXX , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_CIRC ,KC_BSLS ,KC_PMNS ,KC_UNDS ,XXXXXXX ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,KC_F11 ,KC_APP , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_PAST ,KC_PIPE ,ASC_SQT ,KC_TILD ,KC_QUOT ,ASC_SAR , ASC_DAR ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,KC_F12 ,KC_PSCR , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,KC_HASH ,KC_AMPR ,KC_AT ,ASC_DQT ,KC_GRV ,ASC_SAD ,ASC_HAP , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,KC_UP ,_______ , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_PDOT ,KC_LEFT ,KC_DOWN ,KC_RGHT - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_AT ,KC_HASH ,KC_DLR ,KC_PERC ,_______ , _______ ,ASC_CIRC,KC_AMPR ,KC_ASTR ,KC_PLUS ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PIPE ,KC_PMNS ,ASC_SQT ,ASC_DQT ,KC_GRV ,ASC_SAR , ASC_DAR ,KC_QUOT ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_BSLS ,KC_UNDS ,KC_COLN ,ASC_TILD,KC_EQL ,ASC_SAD ,ASC_HAP , _______ ,_______ ,ASC_BKT ,KC_PGUP ,KC_PGDN ,KC_HOME ,KC_END ,_______ , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + // Numeric keypad layer + [_NUMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,KC_PAST ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,KC_PPLS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,KC_PMNS ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,KC_PSLS ,_______ , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , XXXXXXX , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + // Function layer and some extra keys on right hand + [_FUNC] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F12 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F11 ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PSCR ,KC_NLCK ,KC_INS ,KC_CAPS ,KC_APP ,_______ ,_______ , _______ ,_______ ,_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F10 ,_______ , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + + // Left hand shifted keycodes + [_LHSH] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,S(KC_Q) ,S(KC_W) ,S(KC_F) ,S(KC_P) ,S(KC_B) ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,S(KC_A) ,S(KC_R) ,S(KC_S) ,S(KC_T) ,S(KC_G) ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,S(KC_Z) ,S(KC_X) ,S(KC_C) ,S(KC_D) ,S(KC_V) ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , KC_TAB ,KC_BSPC , KC_ESC , _______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + // Right hand shifted keycodes + [_RHSH] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,S(KC_J) ,S(KC_L) ,S(KC_U) ,S(KC_Y) ,KC_COLN ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,S(KC_M) ,S(KC_N) ,S(KC_E) ,S(KC_I) ,S(KC_O) ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,S(KC_K) ,S(KC_H) ,KC_LABK ,KC_RABK ,KC_QUES ,_______ , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , KC_DEL , KC_SPC ,KC_ENT , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______ + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), + // Adjust layer (RGB, Reset and base layer switch) [_ADJUST] = LAYOUT( - //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - XXXXXXX ,FN1 ,FN2 ,FN3 ,FN4 ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,XXXXXXX , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,RGB_M_B ,RGB_M_R ,RGB_M_SW,RGB_M_SN,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , - //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,RGB_M_K ,RGB_M_X ,RGB_M_G ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , - //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX - //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,LR1 ,LR2 ,LR3 ,LR4 ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,RGB_M_B ,RGB_M_R ,RGB_M_SW,RGB_M_SN,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,RGB_M_K ,RGB_M_X ,RGB_M_G ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ) }; diff --git a/keyboards/redox/keymaps/finex/readme.md b/keyboards/redox/keymaps/finex/readme.md index f1b6fa7c7ba9..9b88469a1339 100644 --- a/keyboards/redox/keymaps/finex/readme.md +++ b/keyboards/redox/keymaps/finex/readme.md @@ -4,27 +4,61 @@ ## Features - Enabled USE_SERIAL for Falba.Tech Redox keyboards. -- PC Layouts: QWERTY, Colemak Mod DH-MK. -- Mac Layouts: same as above with CTRL-GUI keys inverted on the bottom row. -- Added redundant "Space", "Esc" and "Ctrl" keys. -- Added macro to print "->" and "=>" strings. -- Added macro to print ":-( " and ":-) " strings. +- PC Layouts: Colemak Mod DH-MK, Qwerty. +- Mac Layouts: same as above with CTRL-GUI keys inverted. +- Added redundant `Space`, `Esc`, `Ctrl` and `Enter` keys. I like to have this + keys on both halves. +- Added macro to print `->` and `=>` strings. +- Added macro to print `:-( ` and `:-) ` strings. - Added more arrows. -- Added "(" and ")" on Shifts keys. -- Added Shift on both ) "Enter" keys. +- Added `(` and `)` on Shifts keys. +- Tapdance: `:` (`;` × 2), `{` (`[` × 2), `}` (`]` × 2). - Removed Mouse and media support. - Added missing "Print Screen" and "Menu" keys. - Added missing "F11" and "F12" keys. +- Added `Alt` modifier on home row. +- Added `Shift other half` on home keys: this allows to shift the right half +pressing `t` on the left (or `f` using Qwerty), and the opposite pressing `n` +(or `j` for Qwerty layout). -## Layers +## Description + +This keymap use the default one with some changes to suit my needs. Mainly +having most used symbol on a separated layer copying the common symbols on the +number keys on the second row and adding other symbols and ``|´` dead keys for +accents. + + +## Main Keyboard Layout + +[TODO] -This keymap use the default one with some minor improvements to suit my needs. ## Changelog - 2018/11/13 - First public release + First public release. +- 2018/12/04 + Added Caps Lock, Num Lock and Insert on Symbols Layout. Inverted KC_GRV and + KC_QUOT on Symbols Layout. Added "Toggle Symbols Layout" and "Momentarily + activates Symbols Layout" on bottom row. Added Space/Control on left bottom + corner: now both halves contains Enter and Space keys. +- 2018/12/23 + Moved around modifiers key. + Added MEH and HYPER keys. + Improved symbols layout. + Rearranged layers. +- 2019/01/04 + Added new layer with numeric keypad and rearranged symbols. +- 2019/01/26 + Added curly brackets on own keys (normally unused). + Added tap dance for testing purpose. + Minor fixes. +- 2019/02/25 + Major layouts upgrade, partially inspired by Steven Hum's Beakl layouts. +- 2019/03/17 + Aligned qwerty and mac to main layout. ## TODO @@ -32,4 +66,5 @@ This keymap use the default one with some minor improvements to suit my needs. - Bring back mouse and multimedia keys. - Add default Colemak Mod DH layout. - Improve top corner keys. -- Improve bottom row keys (mostly KC_BSLS and KC_QUOT). +- Improve bottom row keys. +- Improve README.md diff --git a/keyboards/redox/keymaps/finex/rules.mk b/keyboards/redox/keymaps/finex/rules.mk index 21550e9fe10c..f248688fb49c 100644 --- a/keyboards/redox/keymaps/finex/rules.mk +++ b/keyboards/redox/keymaps/finex/rules.mk @@ -1,3 +1,4 @@ RGBLIGHT_ENABLE = yes - COMMAND_ENABLE = no +KEY_LOCK_ENABLE = yes +TAP_DANCE_ENABLE=yes diff --git a/keyboards/zen/keymaps/default/config.h b/keyboards/redox/keymaps/nrichers/config.h old mode 100644 new mode 100755 similarity index 85% rename from keyboards/zen/keymaps/default/config.h rename to keyboards/redox/keymaps/nrichers/config.h index 38e4d73f0d84..a3ef209a05d9 --- a/keyboards/zen/keymaps/default/config.h +++ b/keyboards/redox/keymaps/nrichers/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Danny Nguyen +Copyright 2018 Mattia Dal Ben 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 @@ -15,27 +15,20 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once /* Use I2C or Serial, not both */ - #define USE_SERIAL // #define USE_I2C /* Select hand configuration */ - #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 16 +#define RGBLED_NUM 14 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/redox/keymaps/nrichers/keymap.c b/keyboards/redox/keymaps/nrichers/keymap.c new file mode 100755 index 000000000000..7434b4368295 --- /dev/null +++ b/keyboards/redox/keymaps/nrichers/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _QWERTY 0 +#define _SYMB 1 +#define _NAV 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + SYMB, + NAV, + ADJUST, +}; + +// Shortcut to make keymap more readable +#define SYM_L MO(_SYMB) + +#define KC_ALAS LALT_T(KC_PAST) +#define KC_CTES LCTL_T(KC_ESC) +#define KC_CTQU RCTL_T(KC_QUOT) + +#define KC_NAGR LT(_NAV, KC_GRV) +#define KC_NAMI LT(_NAV, KC_MINS) + +#define KC_ADEN LT(_ADJUST, KC_END) +#define KC_ADPU LT(_ADJUST, KC_PGUP) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CTES ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_CTQU , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_BSLS ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_LGUI , KC_SPC ,KC_BSPC , KC_DEL ,KC_ENT , KC_RGUI , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_SYMB] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_NAV] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,KC_F12 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ) + +}; diff --git a/keyboards/redox/keymaps/nrichers/keymap.png b/keyboards/redox/keymaps/nrichers/keymap.png new file mode 100644 index 0000000000000000000000000000000000000000..8ef3fe4eaa51e027167d34c360a87b23788bd40c GIT binary patch literal 146904 zcmafbby(F~w>4}*0i{dn?ogy#rID5{De0DOl}>3SC8edMk?!tpL^?Okx3(u<&wKAZ z-(T|h>{!3G)|_+9F~;11^0MNnCN`cftR#Vjj+bf8gyE z#h=3!^%HHv!3o1jiadMe48NU>T&Jvb*^#>Lf`^hNpMFfkE+3Hj0jv0Pxji(ljT=J8{}Ac__>eze zlPTacJXHSrXuYq}s0VMR#v$KrXR?Iy(@5u?e_H~0w?2)0-Ya@W)uJS~7*^eRhF4!O zN+p-);_P2b2B#B815j5DeW*JT4tCj|PMaUna0s_OR4` zgUU}l$lZ@n?g$sUF&R#h2!8i}@5!&n@mVG#Lw|KBQZZvy>sx+`M9}hr0GpnVL8Ty| zG=tkU%>4QPxu>xAN4yaBdo-*r;Y3a>_88f0sl@ffj8P#Sp*!q#EBD=h-45XrjEF3M z{JfT*qq$0p7l=&!tKCvh_-qW6y>ajT`)SgNL58&@{K>V&Jn7T+&vvR7w7d_m9-X88 z>leZy1SJZC{gtT+xl$Bf`kY3ZB^}qF8ou}c+3B=N*l#YIF6|Ge4%$6X;CLr&Y5I3Y>*{P&#_p_1p-M`MG1ii9o1pd+jT8JlJ@ ziN}6BPS;cNU>Z;R#BB779SRxS!UD|JGI;vY!boIIa&uft&?0s%xQQzs#&Z)EN2ZxXjJ7rgu)eqnylA207NX$D(z3P(fy6Ne4 zMn-ez8H?-mm9k%!n2uy;$!2{){%0=pVW(_zXFo+V5G3Gx+7C8@0vjoNpUh9(&}tR7 zEg|0SnNm236pigjEC5R!^ zN;wRp2;fkJ-y*E{CK&W3a-k=x#}ZeVjg`JfRjwj}s#LP{ zm-+;vd@2VCCGZXZ2;9%ek4aJc{BU6Z-9-aVed+@}>3`q5-4tvdOr9{`x2@h?3Ksd8tr;EEJVKlsdt?ZAia0q zK`D>C7qucCqHP~0F@cxihdn350?Yr1^byU63NxO|It7)8dr&Hl#ZtTGZHedgh5Gxu zs0E;cNY?0I;M7{qaB5asBrxmLO}2+TGRP1Quf(JjQ!9JZhczC+wctMD3W6YtMy6Dy zP-9BRZO151+c9D8?T8F=tr#y(EBAvrY0)QWFLaZCJ^Ei6gDM>E$a~NtiU(b-+~i}0 z#niA$u}-oBOZFDp=A%*#oPtXkV;j77i%i!|P;NbKP;saco z`jhzz4Z9*`zkkk0f5g^m`E#bu#oi*OD{VHUWs>(P=E~zr#z;cQrZm{3i&J6_IVH%U z484LykVL8J2n`I3Xl{o`b7_y941!qX$p`mzk|tmxnqH}Q1E14Ap!H;HVrF})OuHc3 zy777(jc@yLj_}83gS~oaC3N0x;OAKW29xx2oR3fZJ;Fj-8f)28Y$wZ%2SOg9v%@0v z&)Y`Ehx8b|b7tV6_s(G~##~iTQ70`ZTuC+V$pbu?M&f z1wX}+FOXrt3Jw{n;EOaQq?hrJzh4}0u8`O?Yg@JWp=QG=%Y0(D-E$@DW*=g~M>Nx| zw##xW2G^{UChvNg#`7RZ%K(*xfAUJ3{o^lH);d5?LY2?i zsJK=hS5dAI`-9Z<=nxrljvU?VuX-3Tu9d?U4X4`2JO zLS0+Vm`g~@>@LGk+juu4!QX3snh7%4+BNObBX6*k{qvremNOv6EI=^E7IveZz^!~e zYuDS2IY;p6r3QJ${xUW;iw<6$UBqsIic1BYuiOwGRgQ*P@ieh)tIQP&We_68gfgg7 z<&0wJNvH(uHpR`+iB=nIXz!tF3ZX5FsvC6w*(*4NNNErkHVvX2=wEc|Yx2EsN$NNg zyg)js3lBCUy4%Pr4hsPr(-hEgA`X*5 zvf8V|9__2JP(rTha?_FR-P%1^5}X96BgshI7X?@GbDpWvJ@r15f>y+L8b zeB(IoayKUTw_KSMPMCg{n*Rsv5c-@1eG;5_|HpC+IpI?p-$7XibiY^Iu$LkArU=Y{ z!1Isu>;0*samVKa20(8ZAvh49blR_aEq4jo3S+r}^8a=O*mP`JnHaJR& zT`&Bn43p_V_`Q5-;!$p!s+~$ymPX49H?H?_c?o zdVUKf;9%e*M>IVF-?9qHV0>MzrQY|6qlez_o#C215=7`~|9yqk+;k|TZgr*mxn1pE z!(~$NWBTP%N%pDTp$z}TZGo%(mhlR6Rd7llKX0G8;RL*Q4hTMzAg9t<_WQe*`#2-* zU*V=`u%$MZyR7Bq7qJN(k$PPnSP8mLo90Zd_a(Nd2E9U}ituhvZC}dGNin-e;`|yS zolOT2hZ0iSerI$_Cb9YpVV_F3lb=S(d`_GRHm92-9eJw7yG#P*X{?Ol0;iKL%);m( zvlTU5m{nm5nZx;-{N!IrMXkKRmw@N(z6(U#}@`VxO4g$v7H;ms=6Ly+E*X| zDri%joBKG{EEfx_=7S0qSN(*^k?2TrINi+Z?*Pn8h7khCQut0`=^=t*bQ37TJ6A^o zPPGrk!iY?>q+&{KSK6njsJq7zp>~i5W{;C z31VaY+pW~lu56c?$MwlXk`cBz^;LTEqSKNR}puUm_mO9SnEws4t zCMcT2a^&PvsYt6j;NX3$w2H~H_{;F}9V>=E`#d^4aM{+{NCu8n=dtuJRq|Dso!)89 zbiY&G`xM1C5fVySy+WJD9chEe!yLL$Lb&7CQXxC1qMN`+amSL?R`;{Do}DR zbjy~t;kz%L@l-B^?$feWt1NcX$b9++l{jySiODnNbJ~6DGyMw_x3t+QT(-$v0XS+F zuE_ewu?U-CEuJ%0=`MTRbTgBm%55asht;1g2Rm+N#eG^&g@G(=S?=$SGnQ48_g5Yu zwLTNpxm#&5rSDJTYC>dej{+Ws8J3Be1!VZ1zH0&pyH>!B#gN(B@odly4}rU@A&1gvMT0kE>dpD+j)c;ip(7*D9Flq1{M{e;uFpU8Z^ z&PA<2QShhNVcL7NQjkZ)UWI*NX7a^8naMcKP5!I4{C2(WgX?8yiraA%w;ms~0R^{< z$9xVHS)K`%>WXD-P*oO_o#t)vO$O7R*|Cajf~u+kYf{JO#MjC~y=Re4{XIZp)f#C$ zTfU#KQIU5auka4r-sqFItO)Z*JMQwcK>%bJ6EaLEQb82$+^-HgScGQ*hIuos?$}MA zqXrPfPCwt?%VA}uvPoUfbL#XfW2`yupmf-3KVdZW&G@S0PIZccWX1+2edIPFuqtjaaKi*X!B=K)AAGhjH};#CPL3 zj6QeJxSLX3f6_+Xj3gfcDB3UhcZizuZp5Yi~mBy zy9d2Co$8Gg`;N@FFaA+#eR|2s zdP3=yvg4U}aavv+4TBV+etx*N<40)q^&_QtjmwWEf6^45&}?dYNnt`>>QDX@Fi`m% zQzAcYZCc-MHUbnFGX!0N0Ds1e<(r&8ZD8m|teYgZ$sXYZI;^_?O3 zoFR95#6Yagxm0h??xU!DNxl}kIWxGzUwrv@wuB)^vNfc$qP$h!YEb@)JcAhNx6t|| zK`@(I&Qv<=#wryZzM{)OGAR^Ie^L#Q+M8E1C^HYoH{M}~7f4*k%dWZ?WL6NAkT0)C4rglL^bz3K&9ZKT z%;*$L3d&ZRR{-=eLZ$VBm9EE0OmG?HoA0wan_imFnj98>KV}rU*Ed(^<9W)A(3h7( z;-t6@O-%I92vev=a^#!_ia{0XjA~-3-PX5zTJE@`u^~GZ&b7(5e-DC8ljaa3CwSgk zXfM&_7hfWX?}{T*E7(zEZ{imydvGbjg3(gQhksf_U%Wraaxx;z*T=jsb@ZMp&O2HH z9H$-Y&Sb1;=vj|UDBe8P#gm<(jC&qf>5Py^jyuz1PjFbPuO&YWzrdq(O^e3uSnZ11 z$xgJgTN}?+>Y(R|W!1F;jf~@NAs&m?4~S&OKGKjnQCLC~=<|%9zUh5jtrV3yFLZk~ zg2VV`@~d8d$n|=nby#(;1>ZBNHIUEd@R-yVKj{=|a70PhV9W78xz`4|0?V`gB~GW^ z*(3w^znUY!1JDuq+}=PNi{O~8Oov`|qf@cLTMiCsshGnDEzru{4Pwr9fYeXqs}3*= z>%JWlwQA8_#p;6hIYT0{ZN;P+z-tXYPbA&4U+Pd`-?A^@^EZzFG1?@ET(O%JV4hvq z{6YmG=!JJFCFUHl+oNR`Y50?t8SBO!ltJT!!eQE>0~}h!erzs87sdjUxa+kzT`O@C zmrO>b`#HlA7e4Q}ET;`otULky_Zg!=p;k{vNz3t;#U_bF^ogTuJEZ=W%*ixyQB&D~m$=(vv{7+jP z_pT0+?Sb2KoWP*6LlAT|#HZ79X>nJJrqIwv69UmEhCaf*2v&{Pj`)OPQu1x*3X9KW zY#!@|hbVRr$O&DKxuVkJu|oIaAqfBhSu6dVJ$%H{E$+BVF66-;bkT1pUtq}72o`ZJ9W;n9t+cNA{}m~?TzXv0q* zvsAHv7TLk)O4a+~en7;kSy`ZDhrvfq;+llb>Jx;^STkqq${nH3heZs3z1t0uX2DrS zdwJXViCb!wP`$(N!K38@K|_xBe_4(aq$pil6LSXf%*-Sa?~&S5#t zE@8G#G#sAki2WmLv4y~YiAezR=nWd8Mr0oXz~EL3?ng45lmYoWc9J>CzIO0rzF&Jw za0x|GmI27>1T5JOiPj23Qq*r{4h6&c_8Pha!oZP5jUzm2hPrPc#r;sy*fL*+A1F}~ zBnUXVDpv0Ri}XxsHr{6I@#awanc1VhPxM>%->2>t4V1J$N>b1Z$Af+{?P}&EOV}`< zaL*)VxlL6Sa@KIhlLzU-YcVh}8hiPn>?r!raFYv>KUmA6Zz0l3FeJ15^g*0IJ5na0 zj|C@rSXJ?{O%d6e-F-5y*Q#2!zNY@4qqCjnU2+lwq&LY`;ioH}dR!a_G_oFy`yT!M zB*L5+&HzRw8x_t5U8FxWD;-becPaG>a00bY2C0+bX3`+MqS}5VTQU?|R|ZtJr=dn3 zXnx-x(Oj4?c|?9O&ncJAHz7y}4c;2E38W6cJ71t)M!^u5&a5Q(6IYlou@(Jcii~A; zA;5Z92soD_#li~vhcNhao=MDM7X5T!zS1(WCw-;3{`8Z*Kdv)c>Tj%AGj@d29n0bB z^Yz4|R$l(=;}PwByEb@X0A`LU(onNX2cI`%zxH6^Pc>02`>4mRrQfAQWS(tWy#IQ! zjji?F26LDXejUv(f;1u-0q5!f(Czl$p@viBy5%qpg3!8d2&DAa6WUJ6Ze4QBzmdQg z0`M+e&Wk?xP?FLRM_>(SlP%g`H#=e;L2)`unKwguaSF(6lgzKO?D@X%{laNfsZD@( zOg0jSHL;*(aHu=NinHVKkoZg+zV7xrb5HPRS22?6Z^h!*pFSZ}UttybJtrlhcm^4U zFd)j{LPR{7l(IvPhUObQ+&26LJ{skitAh|O19^GI13DL1B$GA|!%tYUuTQt9I8BGC zqK026f)WL7c)O_xW#M{Ida)l~`~C{n&HY7({qbk3u&{kEr{(k{C}IZO!37u+LIBi8 zjvBKi#<*c2BE~UdwZ05?#JVM>`9=G^-X$3V+=3E6br+^MksjcYzWUs`H_fw=WB>qB z1+{eSLv-ftN$h?M&8!qyc+yM-0^8|uMly4G=6z2c@nmUBL=p+`w z_^g!x(Fn~`aHB)$<;Zs4$L8=Z0d@t(!Yb8&8b$w=lY@MOlX)F1mRkd}-9*#aEhYzv z(fQkr|L3RbApvfr`xB?78M?r6gtp_9kqT%?n{hg-F(f1*YR;L4Rfcb}a3(~S8;##E zn&N_O_W6NaZZg!2^M&Yt?m7;l58w;{PrJ1Z_!yR;9$Qo-93Ggu5XSGu`VFSxwoia; z??ygo_dgc%$HC!X`+%Z7pzQ+4)3#T4Snm6*Vl`zc+np=A!olk9{0CqLBzj@;gFL1&!~vf=pe&+laT#hZiz1llG~r(IJ{Y|{ikUaTtw zK2bx(Hm#&hx=GcUNxd}FnX!3nh32c-7z2!D?>`5PWtl>T*qZymDLNg0sRsg%-ld1= zJvzDwpR4(NTCbIq46{ULD z1Y*xb!1dV1eh}7oR9enhZ1g9eF1|;f2C8u(_|Cv@4~&G#D8Pf401z19(iQOu0SN1_ z0n^f-n-rZR!2;-|wbDhUNaQm-k{h>3R`CN2I^jidR~@?11PslLLv_G?;}ozEJnW>b zG#N^VY}oum$@z8r<<%hgy6z=Pjth8H`GF}@3V%Q}BFqWXB^<_>uBFEr>XO5N5 zw0SWc<;@utPQ=5uG1lmHdu$;QX%^Z{DfybdlFVni!dw&Fyxyu~y7>2$7!oW#=z?cW z+KT{dRx&8(spTqW6#x|EI4nt9y%KLv6DO4QPe~D@Qw(y*v=2mYjj=rCUyRKB-Eu)T zn?+%N0}xSD0lu90*zjI;CFIrdyxu)D$spJ=Dc2!_J_HWBE|Xvreh0{-~et6eLKsVx9W0g5956?)~@Wl%RrFw@-50tsbv;b26VQ%>u;h zyt+pxVY|yla$Kjh0vr3vtBG#+ElK{BA^3Hx#pc)tiCPXRr;Ef zU)(SaSo|m{nJ;A3mVyJAPaA=XXK=~=6M|TaXA9KJQK^T z$(EMIPCkZQpi@6xtvoVG*>05w#XAX(11Id68QMG%ZudF`*K^e}kU%D@kVOp&r zMiyZK0hR9CQC)fk1_C4jwy)WzOgr!35Dqa0S^R)_w!rJS9l!Cdfyia`<8J)R;Qu8* zQy?>GeH+A`$d*auZ&Udq|6QZPY%T2iu!q%U_zdDBf(@Fk_X3~`_|;ETE_hy2*En~- z7w*OY3U~KgL|h*r4`<6Jn>{t|XBT+fb-U4cbHd7Zxm{NH*7PR11+zf2sz^Cku?>$^ zXB*N2qZN6kIzkCI1R2BbVe$C@`e7Q7s;|-c_q}%j7AV1Qdi0ND5bnkTs8TlN%>O&X zbd7^~Ph&hOlWrx+$U0w_d2#(47@&$_I)~mEAhLJ?!Awg7Fm$tgUd`BNARKl;EK~y8 za{6@IoVChF;d@n23?u%Hh@$20Y_%i6S$uN%i{8RC*sp!rquk;ujc|NGj;cu+n{+V2NmAABL#Iq zj}%yEr~+uxY4+NKc0%nYrvwwqe?HP1%rlVg=bn0fQvnql$yfZLFbdk-SG^aSHE(lG zGv-WllGizz&6Yetb%YTu`G7Br$CAMExxL==a-4VBm;%Q|)VMQK1;ZQ0V8xZ7oXjIG z`@J%O99k{8eM3qP#zD#y0wrv7!M~hL8mTw_NlWIo$?Uh1nLdyj?<4}nS=+9Q`V^$x zYTv6Ft6FAhlh%n|AhZs{Oi!14Ubp5zE3%g**QaMh^qP>7g^)I5ogH+L{>pCMVP79f z0>i{_#bG$M>5*}g9>5*U@?MtCieD|Ojd-^T%1|=x$>O{@nHr9VrLC}2Ah8Qz(L8~3 zwN6gshdlSrFru5l3H{`xx0RW(4;|xg1mOlnRp8^%+8x&{`hyro%0cdf=1mvXl zwT$^lyf+R>But7c7iLvRD+49E7xaC}26wlx&ak7s3%JEX9_mf#xD^6W*@+lB!a`VG z)l97>Z%B^LfK=x=4l{S{tPa26gZMOKML?Xoqv>fzJk=}6y|5#EHGpc7>@fWvT@VTH zSIXt!%t9dD?#>IU;1j$fd;Jy zK+GlVh??C8Xc1$_&zEU!KrqxSq#LKWv;+DZ$Lm=VGJH5p=}E58sLmVP={#boXx|C1 zaFx+i%Vj%Tnk%u)_kfNOX&&FOyBYMZ^vjh*li0a=|3cWpu2_o=_%#dP_I%$&nbEU0 zoTUeg+wN9xEK|_7_nQK>X4AJ->@|Q8yC1Gt5;EDR!H!shZOrB`_}JDSGuuU*7GEk( z>=1o^U=Zcic2<;@c6t~~DbM0Zo=0GDu=7R)f-w!%r`2O;#(Q|ju@zuJnHE!aY8&x}tVaM~>XLosga(oN( z?f@>hrYdTIyKQI)t#F0)p$Y9mg!y#p6=O~ZZsxJ+V0wicvDXyp>CeLVM63edpjYhL z96~Zf{^dI1LHM?}mWFiUbEzZGMDHY@cz{!up_nD**n-NHsdfED{tcGAw_R6Gs^_O1 zAA<1GtB6it4wP_y=d(x%!mwVS`nW3$AU&}H9O=eQ9B^cCR1GPY*bmD{Wo!DDRW#TU z+JhEn>a#zI8R$yNU@5B2V(=Z;E_12lxD_VHP!}nk0k=o*%3tl9_|44FP+GpiX}?7J@Sqsk~&i42UuKxcmsyR;h^=C z7a^BA7Ii@kP|(yb;kDpUV)mRbj=~IGit!o1$>Atf3Bx=j9>)qBS!+G4jlH%N1*J-J z=F)o80{~Xj_yD{xL(c~|1^xSYOg2SOAb&l~+27aRraig{WFhnwj~0RT?ORi2IWSDw zue*q=s-*{lJ(;i8dZB@Z`70f2G#WAQBupMelV)@T>=Uod5y&Xk146g%vX0g76?D`s z-fmAm`GFP)Yc;_2o`v`?WBgd30!_odA4+q5OlU>?9$fyqYdAXwOlu|RI(L~L-wY9>1TuG_&0F0}sa8}(KJjCmw+{Xq^BZ|{>O7i?v^RriWxFT7VQ zqMxjtb=7qkQ|=!#2gWvSEgW^iE(n3DUf_moAh_-ibL|K{XKg#GZ9PEws6ovp*y@R6 zbuw?aWu8qm-mJNoOY+!G>iJib8twGPU82RMjli$e48UjEMTf9FRFYkIS8^N?>Afe1(%1Q+*HTp$2^STB4$X^vXUcVFR;w@zaf5 z7eCrb@Ch1*%4dk7Lg8KoP$(U~N)Y>5Ww_QIvs(`kg=GE);LDR!=V6ppVu=^I?q(iw za81M2InB&)Ya{30rpzKtU5+Xu!5h0>FBZCf?PYP+c5}!?@>E&M6+Ip|f9&he+Huqw z5t((_8vTHJ&w+@q=MujPkk2SZlLxD{m(4;?52bbkhzR>i;CLNrm+PyJSVV}2UGd2b zn2ZN%@~DpIxzWhgtKIw>r@h_f2PPgNPt?_#lXQs?R`YbMwktlLZb0s?235^Wxad=^(H~%n`Fv0R14ipylwt4BQzKqcm0_QfKOw!tsM}&YDp`5P4$*F)7zY?U54M)v9BjE)R=B& zN53@kpWK83;KqxV;k7b?k60Ng!BgNWf&5;Wi~zDVQCzi7`!+oOBxg<90;;jLLk+PUMdE4z7u(7xXJ+hmMR}*DFyBznb3yf#j<`|ghUm; zqT+>2FMVeT|Dh(@t=#D8p$R;oJ{AN~Fkf!2QcevqJR+M-8XP=*8*VUtd=db+R}POJdp5&4wJA2dIRqVLuykHV_XOLrm^OYdOA5;hz#1F%vAD``Vk6 zk(1Zwq+z47Z{qS*m;z?DOi(E2DJPi#5Hu>$xv=s45XAh<>CTLT^O>--93KP*uxhzB zwTrr8vY2L-RiCLplaN*YiAvRw4oY~Oj%!z;q;%Ithr@XGXp@7n?+c{2=72XZi|7tZ zy6-~zHuY7=;(*{~FTHH}_eS8&^HCpOehMO_#uUh@{TeUOMPQgA8PsMgT8A|Br>0}< zU)h_ETk?Is17e~2S)Q~>8e$Mh-Z6^1NmNg=4TY0fO&Gh^@V4p4CxfGOv(=edLhwQ) zA?@+y_2)*Z9;ddkV&~yUVB$bR08+X?A{+8L-QPK(hyuVq!u*R7M<$ck}L-|;spzihRhkVPOt zf(|%bk4?D3(1A-JO0=!X=Z<~QxNG@%e8qf$Gtsm~9*3UG(!PMzsxE14q{!BX1`!Q= z6~VT|SSWd0^Uz(lM{t?>Y5M``8|9C)?olwy(whXY0{2L_eYO@VOnfwC$@Iw~K07Sg zK`(+CTM{7Ww5AyJ?fwuCQA)cW%2W%2v^;+%*@$g&vbOm0d@TBgcY*q@WEga4kc+~o zv%NM2|F^Z-`j0n1Yej8efh_~-pS~lVvj%72?5L4lL8Qe`>1p7}6(&=GTwD)Ss+rUb z&|WrhS#{#fYFyePYl)DM_2WsxO?6rr0SBSffJ< z_Sa2tRq&nwM~&yJvc?r)AYsu<;t*<3w3WY$zhvo}`;O$5xhP*3A?R`O?Y3|@Yeds1 zV!k4LP`!kP5$@#;+St43cVvB_L!zg1T<~z(s9A%#BD&GfQKD-Z=${*^aG8zLRsG2E zq5GIF(lEkqV|aHIn3V8;XnoIqzcY-kY`n8OQNixLmd`BD?(JYnWsht^uKs-o6DgAd z{@U@UuZXyC(F5Ec3h3;1fdPL})_`aLyNKsmu9j!4(l!-sBFHj94iHqRj_PV`XI0aRwcEyhC1l9>xslqI7vI+plIMIkP^q@->y?zX=ti?SmxXKcWYMh^5~#d`(q>^c@4254i)b=xB{i_9;9Y~N$qP>TYIOjZs7)u392?# zNQai(KL^BOGa~zhpX*%5+wCO#{w{hk!hMGV09MyK{KlUY@?4s?4b5(p z59vzbwe5AXQi_Fu{*zRS*Zp?D>&C#<7rPq!0zB@le)OKKlnN0W_MvDj3049eVi4X} z9hWuSDmM{6iSka|FBl3pR~rZ^#RERwkyobf{;9B*1#&(#^BMKRQ`&@q^dg(pG59}ULiOG|dUr_#N>+G>POX}WD|0r&q>pUy zo#a*zO6X#3(P2+CqF=xEH=ECrUB%8^iu;#`?S$56q%Rt_u3lm>@$3JPL5&waz$Iey z8biZOaFj|QZ%q3x;?sNboD3t-o1`7LihBPZ!!XZgO3|rbnVl5$G|S-nk$=}FN3~2u z=jbb+PMpL|zz@DH`MesXB*<;F)it_wbd?Q3}KMc=iJ1E^P^&XxF0P}PmRP` zq(mPTwvct8U@ zkzxHMsRQe?-xwII7ij>{6_HgVBfF!GucrWqUrjkM>rk)jKT>u< z@(Fl`?-NBQMyjV8X6N0KS8!=;&ezw%w29T6$DbCZhhh^q&yUGYMwR5MU#pa|1c*KK zACeDZ9sqQjAxb%bGaG9>LrxCLz>3e`asIowC*)IqI^B~@^w4XB)e@xgT?5W)tkW5i z&14s0ljptSFUpYPn!zYgvh%p;^Eff7Y|MzrJEGzi^+C;)V2no=!v|)31PrYOXk%Z$ zlj`l&FE69f$oKE1!l+Xga65gA5)RW{=yQ^=__4+BV_>ibp1~L}#NijjU>bn}d*OgK z)qS`;c>ik)8ZeQ6TEj`_Ccz>W|K|n+b%Um78gyN?#HBZH+CbY?J68&PmuxPU!YEj; zN#r8}!vLJ^ryf>V&-jRht6k%HJMRJ2h7tlET)isc7+_m_!lR%fJTPR{MG3s(E*A7W z2tL3Z*Jf3-NfX7Yj6*_BX3I_C1I*3wT5zVcBEUULu|9D60A={>Y$bdK7`@7fMN6t0 zfn^s)NK6LOru@K>`{dmS6o71QlEZsM!EAYxgf9^PUb=7)b_7SYewH?9eXVY6Kxd!{ zlY0OwSP5jH4YScIh~z=Gd_4{Ym}RQ$2hfkO*l=BiC{X+=%NzAq{qwT(*184n4UJl_hw z5G$I7xpGODf145|gGabH-7(i#9Vv^8CT*Z|J_i=+C9gGNhyo0?lHeWJeM;wh3_3178I7*&&uLs6C!lY^ddnH}<6?_ol?-y5YQdOIWPT-9P7AG2*B>B#=l03oJC-oiC7`qoN7%mb`aTo^qLMMDrk zw|BAk9$^Q4%!sFPbpVbr94gs594JDTIL2#9-dCVMx&%r_p;QcmWX+j`yO=Av* ziozd7z%r|sfy&pzKZb>{3_zF>vD!vGM$16Jr_x;Heh`_o5#gTtMsu5@0zb9b#SdQh zuYjU^4!+pezmJ~`mQH<+;MOyiBye9E2x>$~)`>$p^a_kR`TStU9z@x>Qlnr#6)-mU z=N^FJi8BF)FEl*RG_f*Hvl)~3?NLC( zY!&Se9?wOk53Jc}5X`;q$N+w{o%V@dTxRh7oex97b zN%YCi%mmHL_}74&4D6Jv#VdcGD;Y(@#O_9%aX@3W+`%1Uoq0E`#f0>6#ThG?oc%_B zA4(fxci34wp7CD;Hxb;h1-|LxCu2{vq5rkH)tUNJXRYq+ahi3hV0X)phMLSdfIqlR?Bw1f@E&J<-VZ%V-wP1&W-{+UX$Jk;8W3acl0AoHUF zI0({h_E(1pBY#I4cA(Z+G`y7?ePIBg^xPIu1?{qPfh`G)7wt~ggTa%K7H(c48zLQ0 zF%;s`1d%6L74SvG{v(L`e1Xj*5Mjfn6Df#MlkPnx?aOKdD;8C7MwTH_ts7lFuyg|AgcpEByGN0NqTCs6H+EKhEj7@U12C56_L*BsrAYDM2F) zG@*0>78vcbk^^IlUWkf+XEcDB<&P2K?|m>%32*`FWlx#0Ab)Hhkkl zpL-;ab-#a}BvEwjB<6I?>xup$9xhP?84p9jpU?OooB@OR z_<%>fgbPQ$7}V4LP-Q=M#DgBll-D@x{8HJPI#Bv1I)MbW3)ZxY2 z!_^V;Xyu)G&p?5r7mk?cRV&$2Gfy_(6T$|LUn3I1ERlF&&3ib2yFg9Dev9vi8c+? zx4*i%+*8LDdbSfvO%rJK6M)>W@OSQFl=F9XDidM1u@AwfOtTlYmT}FA!mmUx511L8 zv5P3fxGB8s`kl172tU|9Y>12EKx@&B8GT8${}D=fIv>nBoul)T;?HI>ViO^yVUy-^ zdCtjlC@1xetI|lN2RK(JZLm_Sj4&rtFCBsgyo6M6zzZFL5B&=Ue2s}@%sAOX{G^#& z^tGRcW^K#6jOZ+VZ@NELF+?hN+ytBBE>tUN29_iO59(q5oauZ=amLc^9}A5_-C=Y- zK>OzptNp{N}Ei?wkV-sHbe4IoASRYq(Hhln0n{%al zPOp2NeI7f!fufs?w7WVtQrC{>8#|@ihgn`8$<^LeZ`cu##gPxp+XW}P%~+0)DuooO zH_WDdJJry1b@)x`g zcF?DDP+n)go?0E7XZ;T13pVeWQ#g98j-n5}b|&=vp4HYw!2vq$YVt<$ z*^`R_T?QW)VGE+8fjjzqiL;-P9;3bZi0sLqV%vG4WfNOM)FCjX=tKlacq_SDF%?$u;s&}^t9o~SC8PJL{b>9NE7U~Yw;yV81Q z-LaVE0EalH4v~zR0WoTRUjL&`5C2xf?fufnINL;Fe-==EYMU)!P4TNR-*INuiH=5% zy1mpT{HZP(et<(>>jte`0QCN?z=cUzvq2B3*W@jUTQAxP4h6MzjNJie=9#rqH+`jb zPb{ayu}ST6C#7ZUJ<`b(AUp+~AMG$&-+6|-cdjiJ{j+wLpggEWU<#RfE zWzrWRey=vUVXqr~l887x{v+=?>V0MsNJvZFXe0-kdTLJ(Pm1+a^J5aurT##tK6b5y zlFY37=J!7M(oP%eGN(-=%Z*Ip>;1`zxWOkw41A+^N|}BDsMDGzPgs}SGW~rtQxZE` zjD(B6uNAc?WcGHY*dx`q+j@N}YXL6Uk(SIlwqwkt0RL7j{3^LAt$!w z)VHCqow1&E7b(6q+bE(nL?ZAKT3MH6Pr8+RdTfG`70NZOL;=LRTy@#x+@*C$tb!y`;U&P>U9h9p& zfBF8PPObKO@2ZQ$Sy61$ca{2ahrN?sRMiMqQfFyKY!!Fhrq%ay39Yg>GSG|eL}$q^ zY^z>&sH3U4K7Lq!>M3XoCmZXLwH|*=ed$#t`StiEPdj(-PM34XQqMd^H4cfZno!#e zav&f+>!<|kMdPGds;O$CmV2p<#0zU2b~voLw#=+c#ES$ox4!_LrATB)#d5oPYaf>+ z)m4RbdM6K&JTRKTh<^($d9SA!sFQ--95KcF+}$$@jEunU^vh5quZ18L$865Ue_PiV z&)#*jGNB&>shUIgrlcEd6rwY;M(Koe4Xx0e9L=b!Z%yiox8o`cs*Vwc)a$|S~VZ&j!hX& z%eAhJqJ7gS9RN~2cA`4o~ta?|vf+EdA+5V7mimBUnZL#hL zWl0}5k^x>)mR~{MS*s?kJ0SaKU|FVYN`z`*F$z?{^Sfo`SX45rsPwq z-#4nYIMUZ*(yZ)-xyhnKX6oUxm#M8p$ye%~32_-zEAI*3Ow#kd?Hj1~M2V&pFfYDE zBQUgf-sO#UoK{v{`$m_)#k_xYd<}J+->Is#dz-TC)>+|iO^v07_m|7PO>~jcTFIw? z_pXaiYdHT7yDIA3%wcfBL-FIiJtl!l%PIYi)7_oY(UX*L>OwFG8g{y@D~Z#3Wja8R z_9mHk*DddA>73DBj%xWl82pq)dnO(#e7oL|%{l`{rw9PdY$d9u;AappV!grr7AW&V zfCQ4INkZ9Kn{u>1cWF0)ZZ{P}I#Xnn8Mj-Wi30KA&JOdJPE=7g!(qyBHF|3&vos>- zv!#9%g9d!f7Y*I!&Lv#)o~P=GTZmF|F&)-hG~4~O_fT`K-csE=3dI_Pp_L5CgH1x%9gUcU1Dwrd?}4b zvWz>H)AIZgk~%3+paEKWuEp?ANc*zF`cB_;=NlB=JAdK&HgVuvJSf@d{>vhV^UmA) zBZt}kA|&g$dJS)D{rs`+V*@|bQ}-xooY%_FR4X(czH9_poPp7x6_jz_mYGL0v-WNk zm-BA51{WjanpX-u2K-(dq&H=gWr=Z~^&1ybv6M6X(D$-+h?yp>#l^QIeLSmwlIYx! z+gbDZQ%QV0vIF}UQOh`eCE5UFk z3>mD*?u=T+@x#%Ua`E(Nq~f+C7q#QS9nUbgagf$pZY}oyd`22r z47}76j;1zN({%%(hR1RX-RUber|=73S4vMWRZ>1aS3wg!NV9hwp}<~b$d!W>iV9g? z*F?Xh*T!5j)(cVH9aWA{$Woy89Qc9F9Nd=lu(d+;oo-gt?Qg0ErJEt~c!uwsEyB1A zEQ1c{NVO6xMfF9!s&1`MVP5(1xF~98o?qLvs>;RwNL|uX%X>h3!;j=ylZTbHOXw z1s!ZReUK({(6vPteru1`g6onrA&O{mw?|e>6A#Di#mHHT9`t_%PSXh2=G`AK*TsJl z0TNZ|q0-s|RvDp1P1!XDI2Cfw9l3Uhc6eBeulZmH&nE4kV-+HKzE8kyL%YF`%KGw} z!y*Y$<75(h0__-{4Z~$r&edcfnz``aa{^-rd&@LZ{z+K9#Rw(UJ3dvI*`$V4>EpRV zcc3bvbK-X=zc7CF8|1pIUh#rA$nRY*jbR%BD;tB?!BP3)w?pNsiPE*3H2r-Blu!H} zORjEtlKv&<2KTU=fp2RB)YC=ya~&>TebgJ3l~n`~9%(S8hytFD+f20DSmo`OLyhxE z)wSEo`AO9W&H;A8=M@j8kKEo1Q#=vBgLRL>0Fee#cg`kdcPI;gzYd!6(qZ?jWxfdmJ61PWQ zq0DHx2ocUsP1AAzlxI~5_4}*U#2Z=j6ocx$KfdTarHWD?jtf1vAS=q5S6kU-|2Sl> zX*JH7AjaLE-FHsu0SUiqOOSr$fOMzGb^-u$Y@NP&B~#c!(}8@;0JjxmRF0QF$Sq}3 zab@zj(|-AA>_`8+2HJy!@Air_u|6JQ&+XJ*&GKk6H|qQQ_;RFQM0@W^9MYz$OfBIg zr;aGs)7ud<`1(1rB^(D2pF5=aR=$@}R(xs~5m*3bdt0efQGbeE_z~CL4#t5Sox;>| zR6hC@-m!MoC(bP3ipB?8LBEG`PMwC13|+^In%rYgs`k$=p_2(@-Uu|}) zYV*CU?myTPjI6n6en3I&VrG=g@M=)Bdy`%gMeC;n#UQ`VWD(V?Rc?c6b|1R~OB3Pae7NhoknlupM9J`t zegKxBr?bO(;c3Jr=GpkcfIx~>gyHCtj_bWioha%m2W8>@Sqe;a`V^z*c5*Y-2%{c^ z8OaX75`<#t0b&wiOa3@9p0$xA@A}c*I)4tK89F8W!TgGr>!yA~d5&*A?jxXsAF(a5 z*gswK&ywErd3w6w$N^#-M}m-isr)?i^z+S}0|5TaZ?NTBWW1=Zn#togy)Q&O%9R{l z-OyZS{|c+oz+j@xe%TyDj6R)HSYsAiQ6-~`WwF!rBF@ZAn{UpH8iPXxclCi?hv`>l z>}y%%xE^6o7-ujpAs!I=A!8x2uM`DZHm``8wOufurJePQAP1j2Tc4J5*UO+8WQD3b zq^k4yoBnqaIuYFKE-v{JG=4SU;X=4^Y{*on0-;HHO!1IL;hF4Qmz{C?sPrJi{WTyC z)#eixJ5Q0B63d*>O-`h25=axk@ zpFxDml^|5k7HVwZ=_-AaBg8y)5z)0(; z|FLjRA&LX?Ea$pX1)^hdV)5PU6rhp8xt66r3hf44q0)u$YKcAEbJa$F85=e#j9{}@ z)k@h4A=V!Vu|M%qw;YqH-}NXewdZZ|{M?OOw}9%2?WWV=Cyt5+Y=&a+k>KmJ)uFOz z;|5U%LNF&)XHt2_0lTlEn!H)~FJHU(y|9meSp;^6qI4QUKi=z5I)3r7zt>17DF=Qd z&CLsFpvlP;8r5=t%C3;>$f%pyVsgiW%YE%e0V3>o24Vl!KEnv8v~y!Ou<@^`<#HpI zR&JmMNOa2rVq8AoWx`78SAhWF3XsYo$Q@)I?Dx11-^in;r`YmhlmppuAsj_bv~H}@ zZN3B*M>c5xH3=1P+DY)m=@|XE;nt(5J+twTDa7#C2xQSwPiL<7=NbCEN=t~^FB&W` zj~{v0+)nsUy9{Yhr17I3ml_0Ue7gRfh#?LKlvrm_+xZy5ucHVtN796jVM_EagzAUj zb-zcu+9)he}!VL==t&TW)=VAV^@7=a6e{R_O6l<3))pMytJ zJF%6ywr?Q{*UjKON`eh*fAN$zm@L{3pnppgDuT|~xn9#!yg#vXnvm;gpqKY!KMYq9 z#d3`V3VbbP^pYt$S~E?`)>&4b!Vk(xoRa=%F0GNhzyw=BOYm!Hv;{_#Jyx2pub)-I z(3Nb;dOM4B{rVCW`HmFa%bXYatr8Y)q>6vuJ+;|l+6}a?M0Uo~!dEJG`*r3l(VAsg z0jch2OttBexpe8zNT@(#^C@7)MPoPDC@;_uQSm3Opyot}h^5 zo8}b8GSaFh5k35&K3}F8&|HPEX34lNBP45@&EP z04u`k4y}zR7wYb?B?t=K5+Npc_{Qw8-z%kVloHFp)>TfPvBNnaX?hPBa8Rl<>#7_b zNEB4JfR$LTa7Nc@$06i4I|-HO*|C5p-qZzC(0wcb3duQ{b80{1zz@mR)(MTBC4ggB zSoHg6;+*ULM1pcYEo});{#2Sh_pbqo>xjE1jxKO?-yo(3E*|?*Pen(dp+0ux=Y!Pg-xVw zKAk2_S(d$S-Kcs48kHlG340Q@8Vq|Qz>MExkWae%rp9F|qlDQv5{Qw4trt&A;RlXS zMrRp&@>sCS5MVMq5ud1aKiVjI!yW1nLy`d+N9e?q>Eo8lwB7H|T~W+Uc9|pVX{Y{^ zfJEVg4Q&X7yrHXIIvaIcF(3_)YzI=raTihDT2(nh?l%mWeR2toxsjY2m4(%Q6MgUi zv?8N>Y7v{o@hT6c@0xY(#CFOPr_iSuXzHI$?YGb=V3#0#*JwjMXfY@Hy|nyr`L0LD z+U~cpCpn$|v`Zab-xY4;8X@^mEULCu(KXSoKoN8cunQ0o`vrC%J;9jtR!JE0)gryn8!VnpA$gG zmKMj^2yKYgJM+!=57Lr2%{k0M>+vzf0&(Q5!iUMuho;|C^(QeXY`pb>>;Lv1rb7=}^CC zBbm^DLLQ@2J006N#|gxSIgC$}VNQNp@zs?b7ca)8CC=JXDC4OofQG z*b1igP~qExoiC3A_0AYukdr&r-|EHj5w|7$Ql@b=SSpA6gXs45H}3pKiHhowf`rBuG9!usq~a2K;4;IcV~_L~Aeg4>_)M zXR^7d8s`7J6c%hW2&xXbR*!Pnb4zNuN@s}7OS5CBK(;EYs^RnCgaCK}wQt@|wV_-T zqfYOc{}G9GGQ&G6cs3!YB^jI)?2H+yJ!B8iKdVsG`9t06f>SraXhZS~4TSyU zuaOLsOMwW17*GlD3)l^3k50nQZOqFpH;5$2VUpfkr4!o5I>}G&*gW$Wy{M4Pus8(Y z^E@LIJ0?Bm%&#vYW*i(~_BV@pQ%M;4A2(vxEEh{r_JQgJV3h;tx1$)Rcq9HHzWv8%p%YvXc7AWa#N6-c zlLy&=HsYZGnNY#j4JfDQgkz2S(A48xp;ac0U?@ zLIdxz`^wjT(Ph|tKy^n{XBDNT&HSQKi%|;=Dn!A6hH0|2=A~LZ z?6tZvPW;7z1bIF*Iha3y-2kB>JhKB|^$?YiY0c0M?KOZrr?37jYHUhh+ z2F<4sF&}+c&Q-~F1RF~!_V(KNxO^0@=yGAX8K4kcd-pmw|Q++%*v}zK}+=4U$32;zLi{ikFPbeMq5g!ud4KUM4P(Oxe zXgHZznSzJY>cxK82;aX%tl#vmeQK?{d!htE+SLC!Ns)jv42k?mDX=!)BLWsgkwe-k zHKs$CGhXkYs{B}-5O_kW*Ha1(dF=-220=+!_X_9%FBHbXc6Y%2KmD=)nLZzgFNnIA zEJPY2E!KH6(FmuggWX*`9}Nb0D(Bo7Pc5ZUE5k1YvIoryi7h3Ryr^Y7%Dn za~FW;{m-X428W*Qfa(c58uGMxf&+!zE9#S$VZm-jAE{t(;YK4>eRIQn+I zl15YnS%9wI_?Ud-|BBl%rBehjM;!X~Gk~72i1>(yyYc%DBemv(-gl91r!@=UiT(tI z5MsKFhQCSn=Y0BOYMs0#Kr9(*r)WP2V5Tgy;4SL?;(`44(t*I_inue59m=fy$%^@} zHAb)w9;ZeZ{$nQm`}xp>{6x519;DqU|6`cpe{MSSocX`5<)6hZ>jrb-?zdWyOSQ9U z3I0uX2>VgM0iI6;Oi*m!_HpXg-ZV~4CuAy`b7@RU8Tj{WbOc>Y*?fn_6PmKqIl z!bF&>g2LdrZVEWU2dMBx=Cu)}|2#sRWl~967Oh^d#c`Z|$&Wm9yN#8R(w>$m&IgDd zObAwx=I!@JK44|tjL=XKoodp7AoB+5{~8z+A2fvBDo(T~-WWuw#BGRB`Vp4h3P>Hc z@n06JI(TiO{#!I9gGi9xplwr_FlcM49 z0f&)6WV!C?u!MJK!jTs6)0_rGzzlf=c06+rv8ppesvjwr-aT;i`zZ0`%%B7Y zr3p9$^6ESRa;u2Td3qrFTEX7$a3w?`3z0mpR&E<0wjqe8joceDX-OJ4OpSLM&A$m7 z1)tvm-}*+Gf4G})>6hETt;c^p;^l0|Mw?~7RW$B-I9R1$)^~qRt+`<6UC4*y*6QP` z!M>x4=BrkN7Lo7P!pi9^U!wbS zZJZinrFdGsj1ka5RzLG~3inh3dil0vr8ge9Pt1vr)Ra@z><~Xd!SO?Uu!On7DkUF% zgL;;4k`nDZ!I!D(5n;IxJN<@U_3GDk6X@+NR%j##L(h*&GfvZ_)E~FUdlp!0S-!7! z%npA2^oM}7m11E*vD((V1=Tx$NzdhILCwml%}RnMtqfNgNI05_ zx%xtuu2&iIUnNZ#j6oe{Z*Vxdc6k(Pe3PI5Y#WpRc)%Pf9s8mWXLTS2v33SnR=lPw(mGXhV zI%fs1{K=j9PHSz68;Mv>a|yBb@2AgEpCO__MSj3@(tT}Lio4+Dk+}Dgs@FHukD=&x z!QxQH+2!$2bNOTAhYMK)4HNCOOmi3`_@l5cluDuIL;bT048(NVP`X7=adGbmF8ymF zN^o{eI^aP0Ce1|YJ1MpFlxMkRz0v=lKQ-1^xRlp4@Ti2}3?G4ykv3w%FnU=tIIXsB zhU%GM*2IL-E>ocvSL;1YfVT)p44>04k2L%D)QLaVz2 zdXNZv`u0Mus0OFS@b`!e$n+G1UiCUU`0)driqE-U_N$c+ej<{blH|wJ#I}E9CDVZxJ*-jDgp+Zly}z za3p|#fiTf~JXAK}?4D>#e_za}PoK)VyI1(?&Q!48;~sj*P;+owO)V@mO)=aTrNk#W zw8r+{Q=*=kr{a$u6*3%q@G|S{tQ1U~@x=Z0gsY^y*F?7WU%<;?=_W%z>fYB9s^0n6 zq^(PKh_4+ubfc5m*vlh@anE*-B?&q?OoRZR3ciddI z?mf~WKgU;<_liSN4Eb$sZEu9}DxF7zFS~)(m`W(G7*31^;X3-M(vn@6@3<(A)kNd3 zk)9Aj-x;&7&V!faL?IPB$`qBCOR65Ct{?P*%`&HR^%&fgE2PjEQV3J<@n51>%hj}E zUcY{wr9cz1=@4>$D`%aRwk*7$w|6m44L!IFssPOlm1Hgm!eQRtD6fNeJ+3LHnYG2x z0e+%&hnz>o}!?icKv#Zyz)Y>3}uh44A+zZe*+BL&B;%f#L)~CQG^}@ zCb_OpnZ+0s!9g1AzKyS>1JWS9%9ywA#r=eXdH{`S^O9H!zh|nKQUlOIq3|ZcW;i1- z@=Ryd;#AL3JVgce3=YY<@n7MC62eDmzt+dKO2qW0QgJ8ZHhKx(`(Sub`+5nZv#wvs zXdA*&uwtZPpbBJpsflQO^cZ56aK6*?k zhn&-enukewGj z5|>ox17jc<)Ci-&I&TaUgo!&t=K~ortIxPM>M0Wd&%43L32ek(eE$4d*2cz$tM9W= zfV{GD6unGP6Ik|{fJskFKXc0w!?(ZqbRpWtDmb){n9Q- zAW`dNK{a~RZzmaF4g4;OrWd@p?SIv8)>R{!*cc{M8#7$Qu3{|x?=|ink3P{xK>aKp z{W6tFE#b+B^wEEj!Y?y7Ia;6`rvD6?iKg<{9rGxroC>p@e7dXXAeDG~ z6t#JdgW>G(qlk>%F@ovZ>O6%r{$tH_cPcXQ?XJOE3tLlW})p7 zi(Z-@i>evAJo}AsqV2K_dI^<7VDOS^qvZuy)e|l-f1HypDImKf3aTR4WMKvD+K-6L z{kRWeYBI4zp~_M-dt8H~-1_#%`%`UF#S@=-E?rWst*sT-c)V>I@blH^4Jkdngh$`L zNKjGpTwi>&X8q$*wH$^RQ~Ld}T+t$-?a&f3;xx!yc)gC?0fG%0w=t4JZm5P0-Rkq9 z%3~o>MvT2mj^VQHkMaeI4=^G`%^&pLO4d(Ij@sj6l8a<6m){uCA=1u#mTD((%=^^e z-%b{`aSv}8;LST6@c7NKE=0>Zf23+lL_c_jvaHR-$hfQI)^5pC;zNx_L9xBq8_w4j$wmAQbJv^R=y`;+&#lh^VkQunL22Sq)Q$5zggzN#FeLAN8|r1 zjTom7vHoJSyW%UM;do*B8jEiY&Pd>yj_MzBwv;KIGTeQRlrZV3-Y(lht;P&!ZBB^^T)lB`_+w5Fn=!A=*5a*F z+v#ULg;jAVZSqH`WLWUH>-V9iFqJ=9#x}y4m zNnpBA*W1e`aV^^A-m?Id>j>iB+BWFgDzXTL1;1eshgr)SHmJA z##u)>Q8_HYV&yES+Sf@M>HSX+zt1PDO-_ao(IXi{%|0f&dx0LF@HQHgX<6j78#hkU zWrGRL2OU2+2!p)rj%H)d_M-+3eybnIJyk;0PBYumz?>_?S5oR`DunkkS7wwmpfl8) zn>eMmF4`^FVOtIjT+uYK@fE|sN^Cy-VN-zo6H>IDmlrNc!a*5tZ=X$AejXGQ1&1gs zW^8WBDqej3>eW|s;D4hr29L?%4;)~WpT;?FLs8bX`*Hd`C@7xUizk2E3YZM!h_Zq6 zS%~(#4$E?C@%q=l(D<`br^k2n(|<3fpfZs42>P6?#OL8Gv7IIpdtbLHl z2^cBKr}WFsma%_r#qk8a!XL%M*;(ECJ(s7H5uCHd>#|`|R6b~ZG4aW>yQBihdQzMh zAf~DdyahXo{mpl4A}?SaxuTBL;QLJ94A%Hrl0D7ihCOB*iPCWQrgPz{F^}=B{HIm^ z%%iyOJVYzfOkJF;#Za?>NMrwjTQ9v$M(r{_%8m#>N zgA%Hu&id?foyJt1UD$5l)1fA8Yuyk#O7aU7RSO=iq3&XQz-R<);7rR;}%u@fEW`sY9X*51yj9JCblr z81|ei>~E=(5Bwq2bF$-A6HT~v8oG%(4YxaZi(2#bp+Z37yTQ?zDoW4Skm`vQ$cVZ` zw9bw7*kM1Eb5jD%xin9w;D%sG!w0aGVYVyIRT8^#;|3eXEaWD)%(5+CIa|=721$9u zQ26b+L*n-c?)(xmMdZDq+(%lktt^Y6wx|3hk~x+y1pf{EuAN z{TYgi^Nym{hgX{P(9YyC?Pgl||3J-Y{-p=KcVnKXsa@`4@G zA+|0<)b!12`t}Qc5uFQsSBaK_abMclGQP~>RoB{ZjOd#`M@36ZOGHi04aM@KuQ$e= zBvB4(y0RyNJ*L>|KxZTiy%E@H1iqz^)TR-POl&h`rh>U6FWjBt;Dp!&QVT*>rZJuk z2TZ9~ob!SJ(U+yuNW1(N+2nftY5JcFDxbBQfYM74q(iW$|E}P4Fl~+^Pd~>IE7~Qc zn!HwX+QvezAorA>o37ZE1DBuQx}}sG?%e|7ehicYeYa}7!RU&V)7h9ViGI2I=6m!U>$4D|N}D33FqK1JW6BqW@q zNna{HOjj8(6@U!ybP@Dzlqc`1!T8@|Ty}~ZkRcYo9Yl)R@X`P!FOpr0jd{&=VdNza z4o*0fx~)*bLWhX+9mfjE^Kuv0O?wKzShvPRTWBJQ_y+`p!{5z20;>~jNw$a`;czfQ}~?3pvv!!R+M?zl!{kGFaZg32UeU<|N5fd;1>6i%a^ZH-AY0&OFA zV9G^wn$9hEaC_bPhDTm$J`x$bIJ+R9022^=c$Pj0xd9Frbso38`@@ay`^TwqZBAGQmC8+*E6{;BG*XGy*kO#zhhUJx5cD7=BrMA`u=;|7$&e$JF4|kBSZTfkLn%7 z&A4vxKaQ)UO1$zQssa#4v;yfEaxpMSB|EqIggvM(P}$K*Brf#H(YaasJ@>%RdpJ_` z9C~uoL2X|n54O5>B`1B(NKVgL`jt>&HpHrUd)!T40Hoh^rYZC%{c&kPIAvE?R}_Em zGdW`ojflNv;B=}HUV}GM zEbj+giEYl}5jv;`3OF0Mb4#h(znMApza|qDsD9<%AxLk|+Vq8tcI^d!r+Sf7Q9uzb zY96CEC4;M^hX#dN_JnzDGTKmpj)!a#lJk^+bIOYHn2Wl~cSV`oJ zn?qa|eqvOc#|r{Bf0cD7#T~?|quGl^*_+(CrJ87 zou$0?b>PW)`Fh)X)qM8$6hnEaYhm73Ftz8N`duk|l0)MIbwmoeDB}TZO65H#14JmD z#r8GlHh*4L*!-+L#kIA^kk%lWPULhWSn4T2=OYdDT1N}50? zRxMlmLq#rCD>H(*B{PeMYl@EhT6&8SdFKVdWj2An-xNF;?7mM)dwn)?jXws5VjTcj zTZ$pbWz2Wt{`VGk5RY=;cn|eR1k7rfU{KWL@mECu!i`3lYlx{<3#P*vLYC0MQ;os8 zYB$3j3>O~1ZqfBV>;$xkecry~;K{wtbs;{Vk`jRhFw&dQzU0^s_=Smbjp2(LUmVg1 zV-a%!JZjNw%kFCm=Ds_y6|;tGN=Qhwq}_s}i7mPplY@$`yyXESmRS=L$6|}_7Hs1$?Y)@V-OB zoH-)|B0KOTxMo5~L^Q?IAy24n+1St^zcyBx4k}R1`*ExfvGDLTMU^J{(_j}x%Z#1y zJ#KvSgXi=mKH3xflm@jLxlPaL`Mv|3B^LCD9w~B=(*#`f%| zmQ#E}c-YwF0ceh2Si1{m!S~J29;hsjR~u6LJ7f_Ah>;Kwr071c@_u5$Ny4gjUGRBb zZX8(6$XB`V7P5E>(cFY{VP^AcB?`w!sCbOLfBdTVMDWrH&euBQaXZPR*pT2# z->@6~ph7rS_jd5maLV&5B5mw-!Hs~v(*vUQ!{k;>@oCJPW{aN8_csJ*#K|)EDcaq; zKdQ7f^=F-T8R491pg7u^k`qy*`@yW z0;t*5I>Xsf&8xls0{tKq#Uvx5vvh3p*t1UWKVhMeN=Zaeo(BB6e99U35EOJB(x%tdyTHkpZmsYp(w7*w+QG@=vYE zlp9&$uUvQQvZ_Q8s{f6do{UK@!NdXklk@Y2WE{@YXh*W*;oKG*OkO4v%JEkW;sV3% z%$-=`_5*W92D1|?_nu;06a+lbV!W!7DB}xlw$7-PFg0!&oF1eBjxHfb1bgVp=CMHp|uxuyma@A0XB5Vq-p$DVfVN8T99@KEnz z^j!V&48=Etttj#WUYG)16K(FqZQ7CChGWz=X~l#qh#v?Sxs82)vZ|{@#b2Qd03RVV zr~udOI;xlLC-sTmUqgk&Z|RQPhG0vgzVSWB`)+pTd@bv)z8H=HkmML5y#tB_pD2eBlIQ zUyluZnwOJ+Jw}KNFfvMiM=MS^!xCGlztu!Km-7V!;h8KJ1ILkN@;>;G+v}1fGo$LG zG0I1T03Wy4DsFwBitYJ?EJvy(oum0)?+5H>a!=0zD&P^V?fu;iN zRHWtp>&c5ytVi_dP+-Ih*wXEPeiqSy@IV*LYAj!kmgyDUj|AEP_2Q$mijC-}Ps_pa z*0??4clRbpcq3Khv!w`2KGhF- zboA}wAy>WM^4vYh&fMdfS>t_=SIkZw7O@5^b@Z7pr#Bgl7|~)(rZn1tMzwr33rsv0 zMVVe9pI#+}B1GZ1HkPB@Ti@8YuUxOAj%@zFf2wJCz!|aVJlIlMy1HFSemD^LR|7yC zZR~mtv$AuICBCBWEPI6EMMw9WaX||V_4gwqQw}a$nEo`9FOA~Jbfk<_zwH^VV?W;n zDeUQR@_RxLPaWJ4-w7I}0ksr zGaL@ARm_h&y9fKB##y5cB*UrM$I`2E*MW?J3CPA8bEk?fMsw(>#a*_bgS(4_jP8E% zuF^kM4Z{QzswEz{nEK~m=mJ)cWoZrBwK+rRHxND4kK_!c9!HKW;WgifZZS*1DRERY z%#U+#j) z1l~k%HJ-d!R4?DIX0WPdtEbKgEA+=b;`8m<01kSOMJZ*{I_IfmrX4sNMqcUNrw5a@ zzJhA5kCytBKu+;40kzIna05A%9NC;(f*Zj@AN{c!%PXX1RS{nUrPK`MPb4fi;D~_C zqr4K}yP80~u>qL`+xRV;gO|kmM{_?$%H4vB=zkC8x-=S8x9^66+ITFsiyl=C+)(M; zg~L14GQu(NsW?I~pe@w|oH)Z<3=!9H8A6894O|x({hvQ?(&V@rR|SrUgR8f<&OoUk z^5D9tOlg6rRDto!ro?uZo~3hC1Y?dDz^IojaYdQxChr}q=bqlw=g{^30#L;f0ChS3 zG5JAK2|3SOf53F7;arD7B*VW6iXZvV1x%l_suDtIsfT-19gduchcI z6sx^ll%91N^N^==uC(EX3$xH!`bPfr_U;FAaU@EQK}DCFfIRLd|4mB-AwkZVXEmrO z0TO{6!v45Soxrgj%N6nddJK3$G5J0IMaEz z`gp(ka=QJyd&F)Ve-ARUYJEnSP}KXVJ${733F#6>Iw?k<9;<dS`gF>@leYgmU~NQgH9 z>qUbb*ypev;>JkqM3b=4??rPlHjhVlVDI?e@Ds8mM1T0rPdb@X&Ef=@{SNsiBQLKS zI5K5a<*;O*s{0Kxe{@Pvd-CGv6Y_>avQ!B0C%FMMg5ZGcf_Ik0C(roCv5or^Du5zQ73zbnUhIreiSznDYWlfdrJBJUFr*I z3RKKO*k{g#si~$r^jzZQL&cnslETUA{9e$APO+uz8sU;srno4iYx>wY%N3Pbh$g!( z2%jB;C-B7!HEN2?r(rT{X&4mMLdNE%2A1SlAvH>9Jf^-kKisX4=Rexr26j2xIF-&R z_pNV-<6&1sy#Bn_0p@ielgPo^E|4~;au*yH89Rxp)=Vg|Z~4fGXYGHwebGdglE)3f z%6Q^Zd*#-KP5zf3;zPqRHfmOPQ{Fr-69jnFWRhj{a^P2H6wiq_q+cKlc2B?>GiqoV zPgq7ew+4V{Af@TLHJVH?)h!hH2$oQ+&yd2TAwGkm$nm8aj}A_nRDWSS6I4D(8$W_v zN35gIZZ)zY69M9C>>&?=mp85<@FFhi{SchF&o|6Co7XFcmRL*=uX zsiLqbcAV!&!p3lVW%*2d<(x;0^fTzmwOb zrUc(ZQuo65P&BQCjk}1aJcw)lu+-fAZe~tJjFUSdIBPsm>7RB#|bE|ei zO_^@=3AZPZ6l_}{eKX*)xvhT@XfQ};b%@SF{tz7m9vzGe{ zX>$K6*@b0L;^)UL#}sZ@@9DAi<;|5ocIPl>6ApCLUTl9_JZ7MNcX2doth>Uy^o3lN=SOg4KU*5gdD9@}?bX`5`BRR8xm6tw$Co%w} zjcSm`GhMoL3F%Mlf=}O@_4o4g`IK-I&oDJ|bZ>!Pij)lMTfl-1@F+@L=m;`LK}kgi zF2Nyil$<scB1uPTy4AMvYy9Jw`75@dZ)MR0j;IgMJzV>jt zHM{Yi7kC7?$IBnWk8umXC<;dB>FZFrq#Ez}zdTzI-4q!RJ+turNlzr@&?zOM;;`d~ z19ZDMPwy3TY#|vXV-0e;4??+XDeNt=old)%8t;`Bb)SR$1dql;D0XsiCN&-CI#ihj zQ!uN*`iqgSJ?-gvqp=r%r0}vd=I9ebO59(wv{VGvy6Ha)z42J2_-JQ3>OT9gTe^XHT}FmInd(M2@7aIW^56Sgi2@BY$sym% zxH_adImsox=E8NEPVxSjmmdjBo6^k3N=aWo&ar*JO( zli{(}9Bw=dyI34EyJ$idh28YiMh}&uP_xd$$dr%+yS-qsbn&>vqW5nC6DxE!3#Zng zl7DLkY703JCuqZ`tb6OQ15IgQ+LHMHxHjY>z4-|+@$sYKl!s7F&5Be$#Wzw%lBZ2} zHsqLQOmaBhtlNALi{EyUG_qrRz(S>d?eP5N2gaTUdL5aG>jTG|%7c}wq`NMY7h^Ad z)8F-&_goOMczQjOi?%=4Dx93PpOJ^faIauUdhsQBSlk>7Wu{0rkx}j}cpQcS2-^BO zSoB>S0Ossl$sCpgb#m4~y36U-`}jN3{HvV=I~rum&&0L0V~|6!A1v0r2=Qjdyg4~Z z*L!zXzB%XYJ0bT)ztYy(9qaEKJI_UlRE2ec;a^45%e*W!rnlSN2(aXpJ^ zVJEg&$gj*5!9VKdI0Cf691KQ-;Lk?eSwzT|aAwlpqswtF`q-{rgR;K#eK zM@Cai)gFERn!}WX;TT?ToY^{@vnOAWw8Hr6df~xO`-C>HCG}Yx21o5Y%h{d9vn+zZ zC4Q}_c?eqv(S?}Q2MS6BqYhwe&;&rMDbQ5Zpx!rp$h7olt@a0ag+yZb36Vj6v(AGp zI$>6uqi_{dROi%z4M;C?H5th+J7p`9uTzt4&#*5vzi5n*v)3L|F010>IW+L=cT=$O zA=sU(T*!AjjQX+f(4*}5V{gZSmBND3Z%&}n_HfSu!B%)JBF6^2xWI0a9;n)3ut%#+ zhMvRwS3dXmm?3Y(@vv$(6oJM!^c>32U5dGeM!6axppxBrZz!L}$}y*Z)O&N$HF$)c zIBt~Di}D&<=JAd~i$*}`xBS6G+j$(kuz}Rhci~iCRL`TcqPa5Db69-ou*umPqlql$ zvXS$E%X@=>1%{0;aD^Jq1e$4$9t|xY#c&D#r%&>q^Sy=@RolqNH1hd#OhItZ?fC&H zV3jPO!}wblBgoRT8r}pK&>@j+qljHdVXojiSSm(7!N7;9dn*m}GLFNxKtg{TPQ4RM z%9MwI&*clw|Lgl4(Bk}EV&=>t))E1q;ho5m^hz0o=viohlwGOyDg>YBc&m#y09ZMB zXjVi6RgO8IZ^*Ph87-4rvz@jpxECe;SCL*SIkA0N?8TGSN-gMW*ryAhm;5#K#prN> zvl=&|i?5h0Fof6x^=Kx6*8cBZ_x%N*fuqA&SNRwBdmo-9*UfgY#QQ6LjW7@x6uv2R zUoCw^aqdCCa`oKleFz6uzStG}H~0ON?2vo_BW9?KmZnO05QqdumV{`kj%(HjlxA@RB3I0nc| zqNvQ*UTvolsuk~!b_->=e7uJ{Wp{;LAzsT>HV5P4yPakandUvR@umcvYFVS3RhFIW zXa4sESrf@t*(qgI2-PRID_Y-=L7VMX>#|3d76Jt0Ku zcVqfmNl80#*GU4@oDL;c6@6v;LX9@vns;<~&A(k|HApRdMA554r*J;JeLOeZ@O)0B zlktA*K#rk&V0F27h$g!_gq^X1S?j&*hl#LT2<_n=aK76#c#sejycCVtirs~ z8yK*$-$qC4Y3pEQVv>gq^LFR{loW82+y9<$f4>QF0w!R)&`*w7ba$Vcj66*?(?*X` zs_=PH7kxA|G>xLv_ZKz?aEOZcm>c8ud{{0XpHCTShvh*H#@~>A@*bNk*Qx4iEc4dqOR-_8tqUHg-3K%&STf3wd#%; z7HUyN*b5|R7#OZkO;7V#?R+{1U0lBZp5Zf;sJSwmK_UuFV1@mDF+49#{GPn*KJQLZGRywR2}r-gTy7I&*v653TotA6mPI17Bsd0OdrOR@62QhqvS8!1bt z3T5Obs=%KvGi*S0RG@2v8JbN}0;KwGQ3#UWFj);sbc7^e-vYbmiP7qC! zkdrbH*}pnL-*8OxdHSE=0CL6N$;1<`Upp~S;#JU;F&UPH66SuUWIQE(*%n2#if5qD zBRcHiWK}cu1>asv*5~pz&bj+qw#+!m?$5CCF-9FBor}!i{GoGe=inC+hxd!wdq zJrYulM|msAB5vDLZ*f>PSKtkmHGJ^}8k9+~HsO_l4^mcXhm|^4CQ2?l5~vQ|>7_C& z|Brpd{Uu8O>#9EEY;LR>JfE~`?xx7k46{U^mWdjjC^&X;&fOfWwd-0C3(9J*uG3Ns zbN_Vo`pkNARGGlzSMt#z544J#UtY%G_L11l7ddNs`XFSw(2qU!bB<|GLKMG7Fb)2I z%D(N<{oU_bx4MtE#_oQ6Tpw9>i4#jZ6veS`qVDgh_Q#u2Iq#*ek+k-F*&2RKk{6ij z@yn?pHY7B`c$m1d`z1_HxwhjgYH22yA|Gx4IMr{gCJ*sdH6INUU-+{CijTl1_o6`t6WEFcVnEo`JkAIwcO(4 z6YJY?a__{pkGX<{kJFxH>X&?h=xO z8Lql7d+J=f^HHzNrYpCTz-eRar#YndU!-6K%PskgntUHv*l^6M>drQI^JgLCtUd$< z5BjbKQiTlMsiY8I8G0xXBvIo0(>()2%afP8-9&Sa>z%6;rNroo?4kx6{r#80a;Ln> z42>+!m)Q7qg)t%j%4;gZfkZVn$en%eq-*$`vRnNl$FA6JVJC~+fSdN>hh5iWMZf7g?4dF9 z5ZF{7uFt29PMGJ5Jr%;6>9D9Z*_5KejB3O5L{@3(G!O{*8@3KpuiQJuL zywpC0ug6S+jURdYod!YEYs%9ycIGAeHZ!iNgM2IK)SNp{Mg}iQyhN++QFb{=7sJu9 zW-g*85XmblM!bLjUXPtG4@c5%B{8UF$#vI$m%{I8WZzQgj|JilEXQj#hHhi!L+!TT z^bbD`IR}YrYdp1>%M#X77;h2$Qv9xUD9qc7022!=W1`{loq)2i6WhWOfJT z$Ahlij06`ivH^S$3M|_eF!N!&a-~<{L0rN8RQ-F@L;eVJTe8x1i-C))Lsl)LSrP?E zSh5oWmnHoz{uLH$bWfO+D!DRSyWi^VMB);I%I!jz1;0b8>3zeSDd#fL0TU`WJpmzM zYMbs!oE<5dG%e!GyC#tFf)e*$Ue}k84{yi*qBFCM4u*A^9|}@3sqvY$g;0sOHUSWW zn+jhHH1&Ufu^N1_%}AnN@HMm7q(HkhzP8#VO)=ka0kTLoVSzKUH33*g<}bU{@eM|B zd$RhV)t$bMwAl+EL{B<5|9H$1Me9uK4b0#}+~T0=FFb5a48P#Tzg}AjV5B^?>_qM- z2NaaU_t5`;jD2-flj0Z)W2^l;4# z=jC9}f_@GR)gFXw6CNQ;_@C4!&ieX#Zv%l9zB5u%CUHzs9B6W;1c2x?E?$h9B69lQ z+Z&w2%W#ew}YWdqQr&C|YI1*A(r4X2R(<+fKz4pAEF7ENRb<;FCWM z`w|lqTNS*a1x;lT7=I$`@Snul!~Js%c22!twUhATI;I~@-#ROVQLvr{j*qC*$lK~C zN7_!}$5Uf|*e$oi)_RCH{J(#*brN%NbGL$y&T6(j-P`oIAr>X00{yp)%Dr9ajl8mO zfZ(CHpO=c^b3galT2xOqJkWh3t0;r8hh~^PY=Av9-H=4|zaH=%d?<35Jw^Kq;|6Ek zHG$hzy)zXpPL$KnT)!@h(CFi*tY_g1%HhDaoXolhr17hB+B1_DQyn`5#>_i{}FmHzF*Wc&53OC9~1T#@G+BliWkfx`t1ZubwDDx&! zKE9R{u`OQ>v5Y(HK%4kOV;w;2k^~-q%kIo{0%gmSz9d;rll|RLO)cU>Qt0k4<4(Q0lp=7=vJH2X?4SWm>y>4gs*og+`08z0~pfEViKdN?%spRS#?X%1rT|9rcn2RvQOex@F zW5a!StG&l2A#oW>Lmpyc;(2Kfj`!uM{d2x9L6o zN69l&sRqO#I}i_Rk2qXVI8V%K&HatqseO%Hc7#;?`($e|h!qUSZ1>Bte-0aiy z#ogjJ*Ti#px>oygENTQb@D#rRTSWt$O$7PMH~xQQ6Coc!^T!mv9BVM_Vs|Hq_;0b; zAVhoHhF`keG-&m}wVOzaHo(;B+WDuW6(eWc)68ve+a)@;y^cNlXIvqy4Z_6fXG{-f z_S=9Qo!JPIq4p-dm?hxecadEzarB+?5f9F+GOC#VJm=FhTDHSPyd#SA;Fa6Pp1E9~ z4|gscS21wu6}^ohawT6e)$1&;gs(B zT=oy(U&P&b0|qK_N@vfFdoXP+^mjUw&(YNQi)1CT@_dLh`Y**Nj`i?cHJ#mWlT#{D zU2=2r=tnd-c1KQuP{VkpF?C7ujZ!YRaYUF}_T89g_Oc=vc$asy=i3~IP2 zxXFJ73wT2JfrrSC?uLbWkM7hJH9&D-o4F7a99&cTJEz3_FS`cZX4nuWSxO4+M?`tF zcm+dBDwZ)q{r$74k#DLq)4XRD1F+FijelX9KP9a^?5gMFb1NAZ@Zij2-~_^YZX(0< zXH((A*bLBf^bo)<&AcB<}-jBkQ86T}GapT3?1%cKREFb}}#1R)k( zchi*;h}HSuUDn^L8Kc71eF1k%Ll&=z!0M+cXbdS34Ne0#U6xpq15aTO5ig5n%?qVY&BmKXg$6s>)NX}t856AGuIqgSZ2US`A zOKV3h`HetmN4BN7+Y%^H-QaaA<@d8(G`$y$X!tG_ML3SU)jQ)jz;?T4^WNe}rGEMe zQVgcqREl(TQnF`7QzuU8R}#bjJOFbz;d9Gf{cq_=cZ`djj@)r7Dt4uC@?N2laLend zol*|`UpqQ5Qt@Z6E-zLqQ^6n>b(}2G?Re+K;>X<=hT6nEFj!W}jANx@a&mH}_I=N8 z8s0O_r5IXhjl|1Zoa=phUw6>rnL|CX_BigSzs|@}@Ls$RdRbFGX;Z(=%M5b9UhfL# zLywy#(C}#Uo@@qUp@5m+W~vMr<1N#DrRj75^?}x*vSCWn8TM!g29eiONBl8-$2-(? zy~K;(s^N`@hn<#doq?MHKi9byCtqK&4F{7i-`HPcc^bze0AsR>8~9npUZOl94lY_x+FTj3HL3qR59t! zY!H+5W;iV$?a5G*(5PNdYujbTZT|-kAGSWwP+#AE@XA$U^GV2s@T&WX*^k)vrQK#@ zhEAG+9zvqH>_#qj5&^lGQDUAZFIgoDkQ@UZZTz$G| zTj{0M-22aXZ;ss@$yx3m41JUaO&k<;Y%hq5X z#o5wo!&rx`fXXhn3PcGYiWd~!r4>`LfQ?~t^>_a~4M>)T#SH606!UPl-7Zj(%D1x^svD|}$C4MW#x0ZXYK*T5N zI-@p9;8MnU?%dG2O}+3a^4T zc}z@|*zz>ce8SVDH-#;e_J<1N`+M4k1qe)ul9EBu%xXiCCJh>hD=+>-qVd?TR_c1Z zedYU`Kfu1F$2hFT#*sSIOg*ipv5A!c)EPC4%Rb_q=x;_Tol>?lf<(yH;cZlHP0KPC znhF|?CRAy#vd-gp9*f2&AZLmbdudKKRAt>pcl`|1C(B`^$4@_2g-otxC%Svy(98H6 zy*o$V^tUyUIpO$3bdJUtR2z^MZbEnZT3U|t$Xl20d?mE|`$FyQ-`}^rEpqWvm^XN; zIXAv_zRAUU{+Vi5XW%xs$CFx_bCY_?W6y)6cx(QhkJ8uqM|{%!0Xwx^o!KV?4-6tU zg!+BB7xtqU@b>nvT}KaesvInXeN>Nn9JH1K2Z^QhF7V8?L6XZ!5J0=O2tD>!A7gC; z0Z6>7CDV{lx~Docl5m6@29!zAv16H8EG#VOZpOZ}$*ajZ6JYrAhRPt2pt5AVyNw_0 z%N%RU-@yM%h;5J^7`fHO@yS5tPym8-NgZOPUQsjUqiMzi%#zOXU~hJM;L{On^xK>G z(qEmg93eX^w0Gr1#dqG1^CRpZZ$CY`8>Ccj<-g}AyZa<-q)tQolurV1Oz^_M34f=yNfn_8+vRw6 z40@;%?S=O%e8GMMOyOIVtEXX`L54b#wjYqSN5`%Ur+IG@5CobFu>pdB&o6VY7-B$Xt{ca#-AEYhzD=dZ$3kXTE;ft;Ci)zeax>nsB4nT zUtf3B%s&Xbe~G+RKQ~5eV>r*Dd9kQFWRhe^@=%=yNorPsf=EnJX>K%w8K`rQ}(Ff5TW**Y;eK2gnCbJ38|83l#(17Dy-y9de+ z!$=J=FM9Ryo5{zT#}le7-pYKUXPicOL2#c6?uBY3w7dzX4Upq`vG(^*2R?(xl-c-? z^jqFyH{OFi6CbM>y(Mt{KSk_+Be^+2``a~RH;~nTM`3BP^Ir3fv#{GdXcw8hP5oc} z?2nhv)rki9!;$p`?wqo)7wUE8mow?Jufqm!0q zUlbQ3Jg@u4>3aRU=t=HCp!|}^AsknYYJ$^|Te?>r08sZsy}rDixhx?n^* zAkCc7Ah-)_8YchplB~y$JxE~y<)YI=4*&f%RqG3AIYJ;?T(DNPNIg}!7!B)CHSOe|;S7zTH9ADF_=%yHj>YD#Z>Bzdri zor1H^XDi8go`r7M`3kuTx{)sH==*T=FVB%h8)rNUXM9#?0-^s)M)pAGlm3R#r*RHn zUGwC$8ie4@YmJ^th+~%y$O&J zjyjrn4*U>{{D1virkgz8Y0=cRJsuzg?qi8i;}tVYfUTY0BU@)t{J7MYO1brNfpF9m zV^m=(J*9+O<_f?#m&bB`2i56X`0VW4*a?*BMB{&8&&wcoXp^wdNelRtdw$&MB-3-M zMebQGM7`AeFb_u0ts%rTMPSw8I)TGaV#ikk3Zhs@ixY>I96BsTdRQf8;jBdED-$By zibzYt67H|TqxHlN+iIcYM>Sg$2j6Po{mNVFi~FPRtjbIsmqR<5M_gxG4uiF=0U{Ly zaG4h;(Don$;e-FdFVC-5cPDUx%Qj0!os-SN+8nUeUIH1%BM){9R};u^t(%(Awq*60 zV|Q;qk-QF|AxV~&1AglpST)+rZrkWkG>C6-lXpAZS&P`sF^Cc!TM1B|;q~ZwQ(RYwoFzeE~P}l7n}^V6_HjyX(%Xg>~)4Hhc$x zwDR7m*L(XO+H8V?nz!CHG*-c3CmDd#(XR&bwJRJe8o@_WsBU27Yn6Ai?go%$_>$}B zFE6qvy~-_1mCj6j11o@yHvODM*bgT&Gvd$fcETIZ*?4gUC27JsIp4dl%aSoJ0^j{c z?prK18R$n5Yn|rA_k=1_chHXciW4Jc)*9gY6ph&QpzYFDMd^8TtG!(6!|NsSnG#n% z=Lh?)x9|ipU#lRA2cc36h;VzpGwl2<_4!woeLo2O)|qScs4CB{ft)(c@YNOEflKLN zRzgBv?OH%mAr?5lJHTs-pkDc}Hf;bTVn#=fd4eED>aAxe4X3WxL<;)M_)Ywdw=c}< zO3o0n=hVv*OioTN%g&*7K=7&Y``1dqQwd%x0dU_B*%1?J*5u1|^P3oM{kAF&#krXH z9`TPz5YWWz*IYSAqM(L*%}9OL;x(eWa-zly_(AwniALL^pv623+o&;ZyWg_N_ww$Q zjW77t==Z?5M;gjOnhkPdFD%xkkN@eC>8Gqzx|P6!8veGW;WrwfM8C5TawvbbzeLU| zV`$)khc^_urGOvy*TCR^ik6V;dtMD&+wHMyyIXDcwIp>=e7x|jus#m&=ZJ{r|fg639@r9vRULpVx z_jeD{Gx~Ne+q_QSeJhVQQqTG;kLVhLM3e>x*Gu8UZgVxPBez>8FnbErFuIY7ii$li zEq?KUN5CuQ!Uj)GuO5MLk%Ri!k>;lS@<7REdXW(bnQ%A^#6(;aWka#Dy4o^`RI0lRVV{05en2r=9r=dflNh=L9UjsL_vjPqPc!y!^9!Zw# zGeeX@BGeBpKs@6ItmRBf_<63NPV#}7%}3a+D}zRn=QmFdU;N8o0jAA{Q0Mj)DAzBu z5AjiC?T4u+4Gb7}9`B&u&%x8axBdN#D&L^_auwLPy6*3|cz;bb>M4!~Za?ley`J2o z@!ktFK*V1V6PNCbI20ocg@^aar_~x)c|7kPIsMz`rSIBL)e(j#^=r7Zj_sCchzz^~ z&IIoUPT?OE-#B|Vt8r42K90`yjnfhSSc}6V2y6Xec9A526j4nNnUGtPaAyKuWLUvy z(Ub(TwqU%)2k-s)fB%NORn81=0WGQ|Mt5_Dzct9eoxDodJ0htm>}}yCRKT^bUdG`DPRIsQdRx`tx5`b&-v)+%%Lht zGAA;dY(O^nzBlNgX21wiUyDi93ITqv7FRk(AE!ZNIU{#hYUYcmXdyD}c{0TB62~$8 z@0q{xeY_M#sJWBCrt0xgU17Jq&q@?)MQ_}zMi#EzOG@GZbAV)?T;EGTd@Y#al-$K% zI4=3U9VCJXgH)HYJxs)!V>!f*TQ= zos$4j)LX|mZ*ZJ?kflsSM8x;VYB4#c<1_vHXT6JquZ}4Vpu`)Bjxo8_%h|&=|8>wd z_j2gefUrj&E`*NBLt)49a#J%yiuc!}DCZ1IFuAoKu^5@|LAO5>nWMqFK8CY?ka{v3 z@o5b_dL=8TUiv?`6l9Dmy#1bu%zq9kW4>M+KGWY2P9Y%HAz7IxRsK5mo4W^raX28) zM$d^ThXH|GjPwdeX>#M4^n&y$rFtHAxrG_o97-T z(>}dy7__c$L$aZcsJD_cDcWL$Y@|{^6X&?j`b66!qrE46#Ds@bN$)>2P&LXR^Raxa zr#T~sj~U5hZh8cVM5~C@PQ#f;vrU8t={H;nC(rG1NjqE(8`vaxq&AVNf1bsQCF-c; z9+E39#wU@dix?k#1-C=pxOWrMA%Q3vEj-dD(DOXXe6;}W^P}i;<=+_rq`b>67mwhp z9!%c1g~yE`^VQz=iq2UYo5%~VsQ!EH0!zwSk;MXJBtb|0AVcHI!y&u1A(>P9Tmb_o zv0CR;qG+j%*?A2fCk$oTpJl(DgjGjO-FR1-BXtXui4lAc(PZ%(KC`<-Tzfy3JNNGX zYuh62gW1}CJc@q$i@BGM@;}kZmivSvFMHMcjn{L_na8SS%+O|DZ8_^J)f<1Gn)ig# zL%E=XCFvWTAImzA3O&LdFo)iWlgCM9DFXi@Mo7|Pip**C?v%D9AVSoF(}S=rYVgB{ z;$uvsJ|XK^y08KCRBFKSkR7|{g_#+E)%QJ* zS+@LZJ(LK*95n%SjwYYZn&)5~&}nT@zXg!HZT)V7-SX)^8zgbG>KZMEGN0`g<@u`=X);u{yTnVn)R%H zk)GD?-@I``1GO55cP@ z@!mT4%Jb{vB-63(r-7%8y-k@{#_4ump|BcAL^Hglhjb481HH!;oK!_7<~jj16YO~!>~uQ} zQXcDoD@AG$;cQZA1L`3i{dyP<_H-f}Id1JN-mMho$Cp7F_Z4cD`_RCvE`|I8B!31T zA#Z()d;f|7Z4BavGAP&-c_hop4t5}JYcxxEWIO~X>94YU(Du)AEx&=2A^qLGDhrN4 z?(aTEEm>s(-uO%hZ@p5K!l3^aueJv*89 =u{2qUZa6BQT^s`pXJJF{up2BH5RM# zesl3YCAMiFiq>Y66nldbGyHKm;Z-2!pH6Hm((hu4aCt7_3QTr(7z4q+6tS=Ri8G+~ z-DHz@CjWvbPL#063HS+3)Grvck)1kX4(OIpt*+lDxXAO53*7O@*!$H;{Rbsmq`}@6 zPP-8jybM}w{@ftv)6b8WE+f%BPqjs-dTNgmp4q71X78(z>}@$L9ctC^4#J64j`ci0 z*KVvr7uT(2`C1Jow|%4&7Z@I~u)9sKE85KWl2CAZu^S^(sic&fOq6)%#fZegwaG^8 z&gaY32*HV+zBTwM~ z*va4_^U?D&mc%aa2np!Zwh-B|@3XCEfKvgHjuS7JnP`1MKqcnujCAp5Q!&5Pox+$e zi(?(6>BZpx)4q(F{o_XlqXq>wm?%j#^|hP)8bA1DW@^xIyDelT1v#wUSeE5+amKtF z=8V+=2fsx@M*KrxdU>V^abZDzaF+=vTM@|)3v{E_Plz8;GM;hdEiGKKmuEprxRnb= zxtpOsbmwEhtmg8um0PylIez(C&p7|}oFG;-@N(w*OB%o)r^0@53?U#Q@zQ(#?D{cD z*N@sdyn|2IoecIdg48f7e(BPL>;od+bHa5v zPw;a1IpJsX!N?d!swr+8pbEP=XtKOF>N%bYh>UTcdezr+G04iQ#5_z1Xk8%MDy>?c)z;IyI5`0qUzek#TJR<>RYwO3Ix^hny_IUi>s7)+E1? zE!FiZ6aV(%H$y=U9`wNj{1T_Hy=A+*wMgaL@bC^exA>M`t~Ij8_?A9(1B+>Gf%xk$ zb))2^3PNEMz6e&W$k<3bSMHQo{7q^5$?-yv@pXer=Jl`#oO||<9Kl@Sb<=-|;hm^( ze6h&n_?4!v2h=yG^yPHz?RdyU4u#|?>jaUji}_07DD9T)Y+k>$kH@XSSq1U51{On$ zLD(^WS|QVGV?GO~zJ3@XS+Za}T&oQDyb@z}efmiqJgrJKtoKXjILh2xe1PtJQ7YN_ z(uI=W1_a%GB4k_>Z3s=_>)1yAyN2(~pyOcLf~XgR(XbjflE5!2qWF#l%l0#!xn|F+rlzKPS}1NgCGjN(_)joK_Ep%GBq+;aBIr1An+O2;l{yLx}Gfb_5F9ZZp)FU-PN5m^TojM zYt@h#YOd89o|(&0x>RCg9b75GKxN-F>v;6|Yfy<=BWdomLzOW)8aAxJ1u|VDe zsqewh{yMVs#MRpuE5G<;wWdMl36kTYO&UT?=r2|Ng>j38*YH^yoO~@WEt`7KiZsKc zrMh;ol(lO2mZiN{>(S7DnkK@RZ$)D;*p|8dciX|MVOx3$`! zN|owYFfG4TD0Y4NmjO&IzoszRgl{T>yAmoF^0{mT^jD;AN9{r20J9;wH36_;sTkWs z6x=vcUNJ+FFu#xR=$FjU19TgxV3Jj-XQl>8VIZSGPm^tS9QVYX0c;M{N^cQS+_$CRoKH*vbj?<4RM> zzt%nvph$_PVR5#py)}I1q|8v6HR-Rrl7wvtqm6pil3odVzNK}0_ zZ%!UtPzY8N?^?;1q|&TD@O=cT#L~Ud+ttGp$!l=VzhUgm{8Q-ED&>vGys_>ZWc_-N z|5&$x-;{IE;$Z3JAjNf!2g43U1iER|X1>kAsX$LONEA{>8^(F~gR%iOBL}@hMkad{aO+-)x zIc&V=*{;a^GeF0SiU6+w0Trn}4c&VUAqBUvx#T-(?{6aUzx0VekWs*BciIWJItFz>i{pf+T=Y$h>81y2uvI~Q?#IBrqRu%22w2${`GX@s^s zh4z+@C^El2{V!Qd6a}_%CGDy;;M{Ss5=(=v&~93D3MwGvA(9C7(bj33zJobKIKXeP zi2w0|L|XS1fOTr@#{N_!t0Dvow!WNqYY#4;sPL0#xm#Hk-<#8W5=Npxy>1T^;ikd5 zxk~aip_sRjp4Y*ZxION$PQapm5NDkaFde(QBKsYDH~rt28-G%cc%IktUFjTg=?2|< z4qmw^TE2p@aFeBnhykFebt~=HfokxqC<8;!Y$k?35-js$1iE1XKe|-s4bW#oW0|E5 z^91_|QmDLyCd=70xxxD8YK=zuPL}U+egn0Mivn-j*;GtS&oc2*7b)>ZUE5B*`#ut>Tnkw$iO8lfpV(W6_Vq`Ij_a)gFPdR`VFiG` z>-vnkXVjF~pU2cx8*e2OcA%DE3c1I$L}MoE#&`FCX_AdE++@S$&$CS}tUR$g*?{=8c~1nQvmS<<6K{PcB)p!>U%!IZ zPLd=o&5UDycTB*LHtPqjd7dcy$Q8zq+Vx%?ZtoolI|UFYUkBAyi%P$uIn*T6Q0c7p$OHI)qGF! zI^=suX|(=*JcPJE7ns?CS~>HQuuM<1L(7vy>;meV*~co=Be|WlLG6;+%Gpa{@foK1-z&b7=#C+MX4JMtA=?B8;g{fFaO21kbcUx~3qY zVER0}j=!8I4t9!)xZI}*9^pSVe9m97mSaz)X;(i}uynWC)MS7R`>qb=M_UEn@qg-M zRZMknLHrNiF#`}>d{(t@w@<=~K!6&tEexvgrq-jGl@Ybae zRFygq1oSLZf|g8}ncxe{a>)6Eef_b313&j0g;18eLbh=mjKo&N1+siUs8jIDnV&}4 zlsKlIq&)2onrXS;JC?iiPhS*GLp%vL_EPK$Yry=N({{zm2Ufj%1uB^&H(%XXY|Wt6 zQ{>Pnpky!G)7zp>GPw7dBb20A*(7S}o9ex-O^@5ZI=_9oEA5#fWoxtCUL)p~8-8=P zLuw;u+qbj*?%4LOT<3P>1i>yye0_&|nQ8G=wa*LXWe4(1-^vg=p-Y}&(!D{{Q#-F5iC;YHZ=sCLdi{hWP0 z?eX3>LLFWc|VdUytqv1<+n;K{yP@q4+oC# zeuPo*?lPkzI*!o$06yFaDZzQ?ESJVZH#j%n^XjT`8eA*zm2!d&N%YO=3>L#H(Mwjv z2~>k{RwVyYh>d^m5kVyF>8JDe6G;+KG9YF9@a?+mU}9)qw#7E-J$`}<9U{Fc#m2n9 zeB3v#lk%Ejz9P}EW?*j1Y97T%`2J7lhNEZGuIPhX-kCvOBDuF`@-VyvQCJS$$Cwd` zg-S))92QL~UO_-*3riFFrVsz_@Sn&hvdQBQz_@z%Tu1_CpmCnZ1@SEy1hgR~qh013 zaA>+xZpRK|*Oy2H35+cqxL&`%1%Lj8yKFl_iCl!d6!()w`FFv#=_74sPAVzz%X($@ zc4@&M-X3|2&|n<&CSQ{@PA7tHUXR6lhN^O|AX>9AU-sOfuhk~INhs3|uw(R#JhEpZ zs?y9I^V)@VCTEV@Du|g-y^%9cQW0j-Ll`eJ4$x`mXF9!Wq0OvWD5+XMqm-BTMSJOqk*W8|m0!-Lt0q6cJl5kZ zHm&(7w<&8^2(Ys#xXtC8_CX?;6Bp+%CWA?)tJ{AU053hkLjQ~7%V6CK z-67>=#vZvS2M`E~zU{PvSjzOuMYy4ELYF~Z^++{CLc{cL0BE$r8Oz#apvhwmUv>5!8 zG9;*6f8+nYB;m1o3Fv&(~LBMeMBtb6xZE&K{>SrJ4YZ3!uhM5{C&IE$c(rd#V8NT6Y(zBOqO48R^hHjs#bX?m{fyJ!qb|zjkQps3DgVsH`YY9IyQD#L)4> zw>;b;B8Um>;`N#6()rGFc2@uxNMJ!3o2ar5T!l7ho=-u=A>l3^aR=tN2M*=Eh+Qsl z0Pev%$z{xL?~?hwjuU0l`!RltR#sIYXM_DcJr6B|p#9$mX-xr7_52`R&z$^NF^tf5 zqrBX7IHW0xdFSuw21NFEoe&KJzWzPHrdq4LH#EiI3ZpBZ(Wdi2?I7~8tL7)kV6g9W zw&z%Se8l$87$<#H6eoc{L(@kp8d=-JiXEr;+#kt7=}|HH~jaI zQBwti|Jn)a2AvC0d$Lw|dKF#t-FisQA)l_c4bg>r%^#1O2_jP>-;Gaa6(16ZGywu} zt9&Gpm|cGwS}#(cX6I&NMsJAdZaQ%zIOxrCr;Djoy1Z}R(pa%R52B_yR}jQea{F)< zQ8E+6)Fg}n)9*fvbK0P+cmQa>cdQ6qax8jMAv?}8PU=E)pTOg6w+<;A8J=V-2tNvX z#<5Lbbky<|n)yzG38~v@)5c1dl99b0WXqQ%h(G`PEpc4n4+DL;jZ?9BB!tgsh_A8f zYM-jW@J>>pbh2oGW>U?^q?*{pt(B2RJP!sf_urf~YlhuEa!VEZ|H zyZoAnIODG4<0c?bD>}W(wNQNi@V}qyJr4Ok!o(6_6^(jY;-odj*`*)HQpHYwfDQDr z8jn7V>}Ifp}iRZag?7knUROxxH zT(}Sxx%@z<@3UDQRDeXpp|HBler~S_9qf%CEZX?}y;TtqHfd9~P2bO8YX)g}N>){w z9D8wlRNM4r>&+d}p-4>oI;8V4a4_E#B)gO;_#UQ%-OnT}U6_V1Kq7%PFfPV@1lrTtgogp8;2}RU0*6T-lJ2mz)FRiGnedFvi3Q|u_g)K z8hduk&bL9$_{b1UH61Fbe8aCp*z)Y{%-!=4UanIo%23c($27kSM!;4!rAzxP`KAy3I@ zR!ZkZFVwX&Wzxu8HBg=NT+bC~9v(oa$DM?J&q?Pon{Jyye6zITnc$J(v~oqSRn0rG z$N{j!iMv7e+^UNA$AR+tO8u_SDMfHZ+9adJ4?sEZOk)+t8ajEIq8muMIdj62?cRqF zgI{jEOj+=>g3JgMFRpX>;TZ+5s+($ZCP=N+1x@PrCQodjIQ#?lmd?^t*HW8L8gLj=8*aM4bk}dSI_$L!&WyMT?+EaTg6KCea;<#YT($SCwR zx3UZYEQoPK-`ti`o_Ufne_rAb+Xa`Z@TP3JfmCyP=kDU(imkv?0& zPgFe84&HbO(}0E}!1--4-=D*JF&eMT;9$2iAjXlFJR+RMhnICw;m*mugu%cQcq%QG zbvuJ_sj+0o27e*ygJ(aD?h%OQ2+CkwtOVbN>pmjvX1WwI=REVY86&e&z0v+siY}dv zk_@H^;&HTf)2i>7gV1H1XV3O;6pjRgu^nd*zb+g=Vg&D4PIVZWbzY~!#Nzqe_E`q{ z+b;h?k$sS+7rN7V$w9+c=|nQ+Q;09fEN9^m=u*AaUy`lfX5D?_8HR~G2+T9TN`C=P zr^NVp{_ng}CZev<3qNAa0xxg>{&@xVfFMp>&>~E7MWU6{?EM?Mlr_+|WnIRs6KkM7 z)t`y_rpDz={Y|i(CraLtlI=v;UE$Yn_G6k&guK;e)ZX$my-(PI3G90R3DTJ|?n@ zfK-i7{^4`VPAOUEe+ zlARE5mTXLj=TM~gP647on{P(Y8&G$h{rE9G8g;@g8A!3|1=EuW%*&lhJJg%eghv%I z1t}s8Nw|df%2VCHAzGQ;=(>Aq9C<)ROCj!a+%b3_+ z4w4gNEyb8Dv(XlTg#^1Km?&Vp%8aWrWD=Jn+7$MuOBdqs_51-xKCvF^hv`rfO{`?w z*8>N=6Ih1GAJO=i(N`L*3Rbfk|`n+k!Z+2bwtP0yX6o6~i z^EW0nE|}6=juNePL0`yjhr6}N`n=NmsUsuw-gSJgP6yh(wkKtRu9^JM<|9)LYXVh+ z6&Oo3vMXGtxD>^%@Ju9<)Ai#mP4h^Cb+JpSpC#Qh&k2s&%{i##O<+nT$vmm9tQOuR zMGkBO4BIE=GfKi`xKW<0UzB;KMfiH``XS(rM`lao%2iQ|o4IzgxZ5$oQ}X zozC5JN?-M|c*KG&Qg$&=u}P<`(MR$zZN1J4DsZyAW~*uA)Uxv_?L>)4hv>amhDDOR z>!D7Zd%0NY`C$2XX3q6QHkx6AZ?-x6vaP}=*bwaC->&9JHZ?Y^O!jw@d~4~_OH;(XRh_zG=AK|3}tXo2B4Zt zzA4}s{l5V{#3(^}Rw0j3fvT^0g6zk!^N@VZ&DO9?GoLOMoUJtA_n6g$Nz(yNMeFV; zV9Pm;os@VBUf1iuGid|tll$;+_+N-i)_-A!~%WJG5LuJ%;sn*+}kL<Z9P6UJG^n}bl=PJ zWWe zn#Hv!nFpEGSp6YS!#mtEKvX17c59$|yTA{hN+GNn2y`~~VF_OqswjV$hP@&R8o7Oo zOr0WKaVrlgqF_&kk$9acgUw6HxQcwt2U7gyg)^VW{K#hMt#p2lULA${JD)1T=^@>_ znxb(<1J15^5P_ybIA8|v#Y-9CU#a##fi7O3J8U@;6BqVo+Fp|q-x z_jaJaaa{hTrVV4^fftpf6=0X##Vx^rru#rPL%@Y83Y8F*OB<;Lm~l6P2y=A)CZ$UB z2NF^lj-cjC3LFkd!E3^9^+4I7NPPMO>4h9DjnA4Sj({_^KsLu;`|y}kR>C@x&T9%^ zK)3ZgxG;b>mh14#Tz2UPi7`OLpq|6pJ|Ctrurs}S+TYLrJ;A&LzcCZo_w4awm1ai>$o;H} zoCS%*%Fa9U0uj6eC50O18QOMEN)%CKE`_or-R_F#RZ4Qo6O=4gSl^w=@C!fZqXbHX zlYtDgcM*Wy_7E?C8MsfR*$&+Z(oDR<-PA>2bYzevpCfXB{JUcQ^*@((i3&ex=yNOi z1rO)i5mtJhMAxWL_DJ_p_x|+v2Ck-s;xl9r9PUv zR#``hr&iGhbT_3lT48L1SpRL-Wlmay09d<96%QB>w+RHzm>0aNSE9ElHsoc-+V~&fLMKV3W@KXsoK{&Xz znwG6S~o_buN zF}OYQeFf-8(v_%R&&JKOi{7&{#}H!}W;v~{8ZUWSJ>tD4eS54rPgHO+3*EubbSXb( zs!~~w^TpRti^rV{dxuQ`7e9gI&z4zMNoVus(~S-IxV2{fz_+utg!S0TMJ!wR4Axws zwG^Omo2xRv1MPr(2r${rTFAn_(2JeGv!Z9%d!(73BqY!^O0lfo!^CckYx_*5+DF27 zy6$d;k@UO63J%$r)I3mWMhVZs1h>Bp@B}-1epey#>ig8Zl>Ekc4B9Mx%|$a7vEE_* zBaO?pxrA-!2DX!TO~hmrugP}D@ENN>qaCV17ou^)yW0h1PU_rbz87XfwBaY&0)w9C$B@MWOf%B#hsYB0 zJ)(d5sl_9Rja_E*74Do)xxHtJa^6rvX`Q0vI&*5UK2T6^^0)=#6aAPP0P4h>Fs~`J z&kFAYQGMMbP@d!19=sYYN1~E-#EhT3*&q1$1BMMvZ&!ElyQ6lzv!SFOyYdnIfE>+fJ%jgle1eKUK?1c)qsA7DKdyXMdMQol#RMVF` z3jsettYO{aSLb=Yp>M`tqch>MkBrBb5KD z0_rNUezN!hi{ev!1R_eTbhiI8oslx`_0msQ<&bCRu(S3a&30Q}AU zvjPHKfo9q)lisGgqzZtroMYD&Ia2n(JI9L~&wL!LP+xQ7QZINeg&>1rGPZZga$F4A zYd#ul<;#-1ph-kc671d?um~sazWON3HEMzh!I$7@q@u)r&U5O9ijC|h{+b``1f+vM zK|>)r&A&~YWuMQq7E=@BZdJ()S@j~)r^@&)#IxL5=In{%`hrTu7nQ+ON56K->3L!g z#vIKLTjQNWOxwL#8sxvqkTLYaLUV%kdqKy^2K6wJ6`C?$v7Jbs!~bH&$m&Abc4%9Tj07 z^~?yMm0IR4F>?M!^Rg>7WZ@RjvswXssfd5QnLOfX+|gYTfNGVFXn~`D$GHVTnq!N- zIe=dxU+)-ZLRV>h1?gZmGz)l&BkRZ2=nAt(k@-sY5trX^)OmRjfBOPGAcG+;!d9sy zHi0mK(JD^3mcuB**FdJ3eA&$^CChJXko)O}-q`BFC@}M@4oAy_Pb%o}H$d8o)w!8(r+f45NzT4$!?Q;J_zpLGz@Ud_ldF)35wGRnPzogVpr~Y84>frr0K@d8oz>#YK|7_#Uwg!&os3f80cQ0IMH-V^5J-c zvu?K^2_ycD95iCnndRl@hnk<7 z3bGveE_9dlL$28N(Hqe>xNxlFZeoa)t%OlYtXmb#f51efx~tF&$#O|ti&|^DWmTBS z*W`~tz6{$8{p_w_W_xYBWUo3*l1Ct}dD)mDW7JB}bp?}ZVf@)rj{<=j#7w+L77}ig ziI<&!EKOXz(XAnrz9&F0`cTPnZxA2NWG?6M%35)$Q#SqF9_$@ELO_Wp`S9_r`hu3W2sV|2ETWKHX18{chhBnRuW7Lk zqwiji_$)kc#Q(5D#2`?lDS4XQFU!E{>V(Yu9VRM=Wiql?`PhTc=mOg=S)R5aN3!PQ zWm9bI&37Va<fTP0A$Tqd9q=qBrqb&K zwdu%NVrmXc;WU@AggMHeBUgn*wdfB;uu_)lYMJchI`}wqrl)q4bbG=_T!pOzvvU`3 zY6Sn5>0$i_MYjX%sAZ9L&ps6%55zf3sIZw(vAF_IGapz9Z+4QHX?uaA{tlcjpFQy7g#x#5n=42(7Yd$LeiCuyBMw}na0`&U3gpZKys@o?Y7Uu9bqT&eYgfYf7QB}YKTrriip_v{*8JHm$irjvjL0(OI+7T-!7O?gq@>)z z4GSAF*}h>e;$1P7tkZ(s*N|z7F72-vu?}H(RU{}OnZ0?>^n&<#E(sI%F8bFp9*YB$ zdtCtFF_N(x9$vA0f8m&sHvHP*df(Uis69oAu{YHoeYfp^ThZ(_MU;FI=5f*GqKNOm zp{h#|#t64?@psa7Sm#$kb06~EOwSV)d$ZtKA`jaVU`uK?DCfKc_xhEQPUj%@WUAO6 zee+>S>x2ZwD`KmD7C_v6&Q6$6`M!Be{t4lC8je_+7T$}|+;>6q;9I3~ zfizB8jij#NwRjlKXB!u`+c$`hl^~hsTAwHjN*TrN%;y8atMSwSVe7oZss7`?ZxiAe z$>HEQ#|+sVd+(J|kqS9h8OJ8FXVy6s*@cW!_ROBgj!^bEMzZ(j_woJR_jUhs|JhZS zD}2uT^LoFY&*$S=LtP*G-$yu@OlZ76OKxhKuCQClmP9qodoS!A9FWEoZ(|#Mn2s&t*IBPaSrS@^{y8f37yh4hHvN49 zimUe(FK6qXEwGv<=kRd48QkN0byIcW>KL9|5}(@$UhJlV$_4 zGjfnj-FRl`lwww-4*3e%M}RdC4xMwtr`iI1`gws&-aAW?hh-ZsrPaVs6^`^dvGJZS z%t;s(Rg&*7nMa)C9xOqkeMtDQR2&vqt{yBF%bemGRP}PKcT@u(j%9z_lI^n??F(ja zJ^Q{5e2Xv}^V9P2Rc;&AG6`gZu#(@r_8B5|3i)1SCqIb^#RZvfYB$ZKOz5i0` zJZ4)o4Hl64T^59~w{znzQ#K0)--1iJT!c_RK=T1DpJ zQ#|FAIeJR||0n^*e6mDQ(wrle2=MB9e05xBT@o0-?v~ZO4Z^QDBjR@e@kB)X2B2Z4 z+>{}efXS#c&Jj-a9&0aNuFRhlbde6%0B(~qG|L|FZ0P;s+oBm-z4q{tm+sGPr%0L=aYg( zfdcLWnRm{QfgAIS2)qeviT3T%b}CWYQ0H<&+B+fdFR7%KKn{OOKY?RV_3jGuq7BsG zEjwg9y7M;>E;k-(cM0q=?s|w#&JohI?Rp|pW8I)uPTt1U7Fz!p)IVJTWRCcLscji! z%`-hlv|Kkuz##_%a$BS_&~w1O(S9KF=g5BU*XiR*?Aj_!>E;-)U;E!uzSie6bi;T3td$1XWyO9AvM;(%f`EqXLfBesv@6!d;3^-Vku}14Z<} z#QC?GaBKUM1)nA<0CAXfsd+a!cp3purQgz`Ywaa0h|69$$gzBB#Y9AX*`BJt#2?QI zL0nt{LpLKWAZ*WxZ{tpsSjqjNbV5xA<7Rh;0^l~pYYQ6cuJQ+Ql)~hvuhmq4S>zlu z8bD=2z%)OADp1i0wo2mr&Z$WNDTk@ipNzVTr(6!J{GYN3i1Ik1Djt1>OAi%L0&rPn z z{yI$@Y;G|8?HME~|J;0L9S^uQu~%(NJWJS$(W>08ZH^qS+&vwgu$2#ZnsPMk|5PED zjDwiqp2K_k6fK!lZL*KMO~{_a(hTn+kJ&QBT_9`)yDY63lAo$E<0AaaaQERsrVFWc zDPhbb2Csl{(N>BcmYrYQRtGIp+w7j;i`Z8o@kclE9z>X5=n{eraN=6@$`AzJDs&nD zWN{tw;Yy$fg&DDA>+`q9?l-%a-)lk4M#yRcjYWFnqlDD5mgRSD4D2{$d3Tp#cYx}Y za>qPY1NIpJpxWvx%M-(CQ|cLjCS{Q~$LB0lM{wURc1;p(!~_eyJ@-CA9UUa~G6UA;%_PQO-x_4-d_5!6X7U(g7RoOlpsox13c6TRV{>HCo9Y{#b{CzrL?J1YWR%3r%4&1B8 zb6ewgJKvcZZO*5;{VmfVo+<`TQ{Eff3$H8qkR$OHzVqIwG4z={1Kk-?`Z(m^edo`Z z_>EgdCpY9cSBbNQ8i2-A!FVH=`yNd-LofNh429^_#@i0EaSNQR9Sha-tz5B2$h3Bx z8jM~5KBpMsT?W4LP(HCYXCB4~W+yj6T>U&A{B4a8C5+IH8PftB<4HFGp}z$`5}dTg z0k2!Hp#}>lph0KdjGyWnXpJY2*#@Y3woVVX2EVqS{Gx-?}5xF8XH zYPtAVTrnt;O;Oc6@Xk^<)HLe7>vzxs{edl&5{J|}Db{L>Gj>dqOW8-UxPlt&8Jmt& zg$<}(_niHmYYx;E6@*J^L~(`47uKwLQs?+ct%hD$0}mujN)`LY^Xd*Q(=*brh%WaS zKbDW{!;KGufvex~BF*;Wt!=B?bwls$>f$+`xxrH-{U2X`oIAbwMwSO5(Duoj<{YEb z_8^MNuxV}Mi2nPqY6pZTNO=);a^&7cqt~^_!2RMLbBqRz%@^u`*Mqxb7FsR-M=t|m z*c@r-FFZZhu9?GG$MyU-=iBdj7aCA{>{}?VWe63d5FmD(G1fEu0BODV6c`pERi56kfo`^@aJ`rzR|c}T)N!5 zQTML`cwKhf#m~z}kHFJITNua;Akxm(#g!crIBuesd0mXkCdF*{x^bYWX}}lrL0V8{baGsOk#){n?0Ivt`Y zBe~;g_cvOUkZnXd5BkX;hPN9Z*#I|Aq6XWWQIG^E4v<2`X$=uOeuw`!0o<`LmHZD& z`Gqh#T?s;D&{Q!F*ttL9di^1mmMjTH8OcuUd6}VGspe`<_CiD#OSCVlBNG10tFRhH zNjny^LH-*fF{7_9qJ-Un;ywc#VxWnSI(2dN)8wz?n~zH!X#ThfwV=Gu3_DHFL~1>D2fcgu_5{92fA9_P5lM21hVg~)--_}uhr>thP)7?Nxzq16khJRP zQNX;}rCI$pgp)X1-_XFVK}MDUF(m&!{kD=1#}}p8Pz-0U%3+csXSobI$|OdCpq?s< z5(kheziWiz3f70`YdikUv}{|6Z3f8OpqaH8Oj z+O_=jrT<2w$ImY#KuV!3q>P3`h&X+@Llcz;K5yckZg$ETsonMn*HD6W#1YiGAqq12 z`FewyFEQGY_Fp)tO3&5+>Po>I@<@V8O~eun%B8+BoS_@Yga%dap~qSg8tNf_8&*$4 z{?2<-gDHfWG|4pFj}UWUy2}-v{vw|IIFICkoE>RaGx+F6j%|1f`*vk7hWel!SU?V< z8?dLCPu-Vj`J_Yp&_~#n4|0B9S$Xq-Rk<;Zf5hqOxl$pCd0TFCB^?B&t#&0+Y> zzHj428I@(m@L{3k;F;V(7dOM4$}x?b7qTyLZ9i|#%qcI-nA8Ngl-dx{4#}WB~frW>Oh)^u|wr{qO+Pylt~@aXm@N%`GB+DO5( zrN1?}>0^wmm; zz?wu(bRV@sQ>XWc^s=i*<0y*r)nB>}8gcm+>LO93EjH`Fk!(o`FY)YV+y+WD!HX%o z{Z1F-K#J2j;9PT#J(6B0^h3*O6TktpC{hsNWn}IVf#-$@WBV9gdcLUGikUKybBL)8 zvpe(3v-Z}yDB3?bkI~iOs0RMqgm5dhapnnUM$9NOSh1f&WI@TIEJvDRtLj z@CA(dCjL0RpMS+Hd9%;H{q5!@A3gTylJzwl+_!D@dW{nN!#V31-}5UB4Ff!!7}#AS z1C{^QSRv4$WI<|iwU31~A2s=&{8ha;2OAoc{nR;@(J!vSeN;~C9rEpRExK%N!q(4U zM9#OGh5h>3$MaDK`H79UEa39>>EGOhSi&7ZCp_YmX@S_WcBmrMpP>QL3pjBRXb=`L z?0c@tK&1k!7h-FdU3n4ZO#y(Mk+*tK*TpKyvMdBd` z4`IxvMhVgTdoWo9>EJ4$LZSgb|L`cE*3!QA`zFp_=^$TZ$Y491IBV5rgx zH>S6(uJhC_JC~J?LldCPY&t7tN893BeM@<|&B!OLSn?36(Qa2aR`~UfDGKLioki&Ht$~}OAk*lRc`>JyhfvNlyfca_9dB4u& z{Qt55Dl9k-%+?sxKB7RHuZJbL6a(}_+k!=W69@vzGBg>wU(xbLOpiu8TbBoqlF~`R zp1j}qvoAwHx`TIj2On7U)~Jf-d^3seJ3x6x>MWSNMLgrY9uX=2srwt+&pgtJURz~xv*AM_As`QsE`%LXh&4WngK0yUKj_9E+s+v@v$vkePY+28nh01~4qY&!0O0hY&=6 zXLhb-FRp(GNpNI?m9qyEbW=ppWnd7OEe?P<(lmLoCI9aguw;s2BN(kvOr~CySCW^V zMv~%~hy<*qCdko6;YwbpE?`a&IZkUyQwp}9N84mTzuew2f8x@Fu?V)F4xOOmiL}q{$|<*fgns~|P)1Psk&Re^nUkJE z>@7|_nqGy$AJOr{V~v&qYut4E2EwRgVhx+D_k3k+pLt8l=obI%*bx+OSlF@!PwIT5 z!seiFs3+(8ehM|i5XL-Wj{P>1_&dPf*ROit44j2*iTmrWVD<@#NXYpMuMN(g`aopZ zz!0fl+qFcu3Qi^Zo1a9CCYJzu#Nq2U@Pt=mUu-g*koY<4vw-IpU7$rIM9rZ2Ji?f& zAzjSj1&1*~iN?I0tL`2cY1<}@ERWLt{-o;5wAYjq*Ce=mdb-Y?_*pgv@6@UnI#xQBFm(o zwuKJ5&jRpB@wq$4J%2Cy;?$8Pp##mZSL}O@rT`rQGjRqQ&T-&06+K zcslQgM9R3|y!#8!8YWA4e<$S?tw2Pctu-RxGFFQhV~0pH8Z*5>5$?wPB@{Hu6bOip zAdT;-7?jqD>X6yP!sEO|tFf~)ij&le5KNqQD&O; z72+pIQ*p%O??HX1rc%wR z7hdX_cBj;g0dU0W^&HrGs5$L-RfgkRM^%S%wHj{Ur!|B`45B)oSG|1CZi;DxCJ~LO z-IzKS6Y#7-VFE^~1({xHU~|Uq=`eyp1Cc81Y=|bAo$l_sl)GR#7bEir$s5W*J{u_e zd3XtXznMZgtD9XGkqj%50JY|eNf%(dTRO8hs}e%p4NK(+CSiXA@DWlsY+f=Oew<=5 z^F{_V0PoKHm0S4i#V#rXNm5h^s$%7PWXMnV@BWs`@Jl+Eh1M2Xh3FRl7|a-Kp5{?I zlKykSSI%&8Yzqn6IR~Pax+`1V?()eb-_o$co9Q~ocBI-xlbCZB{eXs)hT%=6Bsn&H z^)G>f#_rTB3P?Z9VP`D`%_K0Z$(q@d8Lb2|T7&k5%f}gOgiGa?-x>E$_cze225!_p zzl8Y(#iv+sRQQ7@_J-6?H%lz?j8g9nUVeAfKGQuN1Z)**<1WwmWW2V~V5n2&$daG;m%1p&g({a% z?LJI)s%#c>^hgtH*cH>7YBC@9uQ%cv_`p>&Cuid2JYfZ6#mTB!Ie@zQB=txg z+L-E|TxQ`=CwWeZbC&?s$G-gahSvN=+b35b)jCxJdrcD9bQdw{io#fhQ~8T9h^=-E zNv%RelR?8eNHMBv8n`-Rqc`N_Q>+?ahbm9^hf9c0uG$=s3ZPS3=X$guzhwtOp>H90 z+J#|>?6&rjrn|l?WC#k3NASm6DLbXz5iRpq*wZHyj2R9`-lly$QA$TKj@KGRk$iC}*F5J};os$u-O=1x_T{~d z-e`v98iPzW$O?8QTtxFO*6nOnoWU)@3KDD&^nPn@e4s0K!uqW2AXltT+Z4@^#}E8G_p z>`->0khmsq^hTPWe1~^Oi@pKqD@OaJp?Ow6R!004HKc4DEqe5(-~;q#U;U0(&VOx2 zzgo&leyjzkp0Hl}$tmrZ%{g7n!`DwK2#}24Q2GxRbbpiuKv6v7Ul}KC`cp7ORc@dB zlZC&R>H-fRCcegkX!ZI?&wTkf?)v?-XA!e*OzfRh7Ms5A_>I!XMYSi0&C{-bQcT$n z#qpW6VWgHqm_76PZgMdvZdsy(G@@k|}h z5?=U%rNjr)ks z7{H?+2Agw!?6s~~3|Dce+fpVbQ3gw9%qf50NVJ|}?>2o02&cFpF*{Spff~n_jexoRFN zGU+9>N{)lPgF^dhInQBRgwuRMGK6g2kx|CEc=~jpZ&0KV?-8d8)z~cOBEezDHA~rcMvA7DEeeW)GkotF5b=YMSFl5ALa_cjhu1@ru`Plxrc0IOd0LeTy$qsmDMARz5xZdrP6)3ED$Il0k z;u~u72VKU#3ayBbeT#Ag*dn$WUBcL$H2WJA_QX?njy@>V)P(M#=92iT87Q>Bt+m&M zts6!Y0~{)O5<{T-u{8WUn76?QjjaD-Cpj8HWxyb`6^iI1pg`e*Du`QCah)$HxujD+ zLIK{4aNH?7k)$=V^&lVz>voZ1Ru1SKSU9$n!8lTDTK(6O4or@Lnk*SnqgL zIT7WyF1z5T_6)x%#(q&$9qM^!TNnnJ_Fz+krh+V=20i#FZvgDxksE)?&ZoB>GpUdd zp&1luHX7rK2Hdz!;IbzHhG3NpaRe{YcW>FTwUSOpf>+re^2T2Pf5$YT^>+U?4eR{S zYT+%dbgyYLuV+|^l|RUy%TB$JhwQ2neH)WsAIsWp$itKy?_^ zF|>T6f$XFGVCXjU@or09FreTJQ+i+B`EmzkH{0=a;RZOiCTgqMXnQ;CwSOktI^Rq} z@xLXfuOZ>Hzzes(izgQM1dQr%v9 z&q~esLdaw;26rCo$=Ct62CgiT))(q@aXYAE(a~3jF=5K;bAYOguK@VUc2qQL`2IH) zryAY@M5!|f!u8%Lq$g#9cHhv&^X^t5|@pZ(AVEDw2rfq>Yno@kvSW(z#13?ij)!`Jk) z=NfsQho$`3!ee;k4F1~a7ZvT;8Ldjh6u)E2L{p7OLie_@Q`dzM-XGUbH9e9VsYdPK z?DyP8hPei1qwt%)j@Iso<`qZvQb`)6#L|$_lC?a!Uv#fr&Ife?lo?wS)T@aZ&HzI<+=O>Ypg`rqt0@OY$~JHSKrbR#EOsJYwwBk z;KmhAG1{>+gO4$6_+dBPA=P%YfbwoADT3UW##uR6MWj+cv~ETA9$ji7V^LRlZ#Zs1PC1vSi=e<5TlUx>i> z{v|_WR1E#f9}vV{qEKgQ%I@Ey$0IIEfxFV6vk_rAE-y)6!3BQj+`bT(6gLM}C7qxo7ACvXMH=-$WY{PF0b;}qaWsigqC_Sc zszMUqmBo>*0!fLL%fU73=2sd1*tKx$>L4i`TYUQi^%Zhe`Ez$i5xE9RWhPkoP&gm; z-?8V0E;uGd52#?*pUv=xN@u-3x_ZHYSKF6WWz}N%Q~!4CB+m^i<%Yo|;WP(}o2o*? zr^GR>DqTx`KdB0+NJmVhWZXII{HiwwX9dhs&5VR|Ly(VLMWjYV{bkImj65gy&ebt{ zgWp+i&BaYs3yFJQlvn#xe^8b&<=p`I4XOR^$3^UFB&V-l&DYkf-7K0O5E+4k|M-;?JsAeT8OBK|muak{H7hv|-c`MV2v(*kdP0YXzUQX=TU$&a!`*q2G!$ zA}Hwu3@uJg>j-h6M{KNR;QV61h4Dp)9_>a&()#VCyxIW!jYvAr=zhj0hpO+4EGvMS zr5vysCOHj%eJlvKB8Uz>cqg8bVn37gNlCRbdt5FaF&NC_feI1A=UdNczvbI`=P}u# z_g}(9Ue%~boxMK+YZWl`7cz9&A+WC}>#Snu#*~CiqnP!LyI=v5vgAyfc!u~3rvPbW ziG?HwubfaN8C@2%xPY`D0GMLW{Wir_ECGbr>?ru--}{~tXtz25+Tw46zZneGsO1)t zKaI22bQE^30uYjjSfKkrbxQZAT^GDumeDS8H=tch2_=-QJd2VKU?e7ng-8}%cO3VW zApD8+7}lSiX2MEtxHjprOC=0~iCj+cN!A(ljE!>;E{E$H$qHD;q~8y3sqz#MM5f&4 z_YtJ0p9gNElY$Ys^HqvSBfs73q<@(3JBitZS*nemt!B?bWzaXj>*7^pf=blAg|fSJ z1lnXrma$S; zE~82y51h}Sh@jceS}kCHL-Vl(mWq!sK;hAJMyu2V=?AWt63^r9;=`?D!dZsnKx}_o zxXqUYCMXchmt@qCCvo0{Eogwo-TDVX+y0N0c znokyVRsV&<(vi7B`49F92_mj;tQ&j4wA+itz~69|qJ;K>Vp|u;Y@Y_MdxULt1Z&g# zKGq;eD0GbiJ%dELb9!c*sNrp1O*#JdBlUd+1U&Jx`EH5V%oJ2lV(ZU5i0jjobnWG^$X@)b ze*do7?ir`N#dX1^6Xn8Z^!-3%Bfb*D5ujs8?sFiopi!wfT8_5ukPb#AL9+ZI~8_fBey zk)c?M;hH5{Vq{yV5S<-yHn4IQB^f?}D2`0ln5{m`)$q-Zd zTFSVU+nmP>sEhi?7;luSM&!QNyG$@zyE;^W2rTw;L+%auPP#fMhr%gvz4ucFq9d!Bdj%K-_Rq zH8Pah@H=7)_2dbh7JbHrY=@RbRJ`k~NTK@`@F@FEu!$1h>K_0N-M<|+X9?YnhDR4# z1r)^6p`*)$%B7=ZyHoX7NW`UumXc5bNvDy;@5M9x(Uha~pDd-^1T-C#?UlP!by`ps zinIw&NW3n}x+(qDnYPRO?k7G0XE^m(;@wi0IlewM<9*NI_t?nH?pf(kc5|MG zSwX1=+0;YcnI4$ykvlfSnJcEFj#163e$<}%AB?_bL<^+AiHswKnuGu@Bqp0f^)~`PtTzQInNl|oQMhbVca;Er6Oi$=e zix^l4R5#$}RTbLxl+P|g4zeY+rRAp#q?;M~&>VI2M zR@+`i%pO+}&X1QN6Yc0v?b`9|e?KTQph73ioD<1W~}% z%$^Y%e96s3T~4^liM)FR6h5TGaL5;>_I9ozM0aRrKqkm&^e38l*Kaq%$r3f{PdOu1 z!?9SnL#LCtx*n=7s;EZ+KR_(>vGL0Ye1{$vjO&NF zkK&qla}tUsS})s~JXN90jDqOtauN(kV8UvuCHl!{?K|uhtwW4SwJt)eX5H3>LyGx9 zaGYBX^Q!VVvzzert3^F8ba14#7ofD+PG=%~6W@I?f9QO90sc?WvS0fpvbg$tDeS9E z-;`)U>f!-fxO0Z=50o%*0}FIGLaM+gO)Y0#{On(HjJ_oNtpwf%&F3zUv8}^5sb1-E1}6YZv-`J zc>?*CqK*~GVHT* z)QF38`cjYF3MJzHXt&T7?gniA)1?IPJ&5Q|-qbjyFUaGv&$s(+7Ph{h*MaaP4_)i= zw1QH~j#9bA7Vv-Rrnwc9h7;AsYmE`_tV*Ngd>-hUlxQJS{@Zi|AqW!Q$&Q*^KKr zB9&+%*2*5tHl7>q!Rq&o^7``Dhmg*Z z{lV)%)x4;4t>zO2)F;QG$rMEIcOxTx-!C;DeoIWgeqCY?K;omQ5e3Na-7~wfxv^wV zGYk=>s1}Z#g{T~oXp1l*Bmspe>=55%IS`WVz{uyZtLEQKGVDKBVc-v~F~DIf<_l3l$aw zS#)m4bk|0V8WzX#Qx8sUUkxG%FiKsmKwZ(lsoPyngW1B|G;yx)2zG!IDo!de1Rv4t z1KuZi+vFbCGkx-U?RR-6@45sMV8!`t@*0&-&ekmr8vR(FcW3HZ7Tv=1YOvXBUMRLn zKfly{=T&Eb`Gf$-vGAhtkA^DXqn~nnesuzFJ+k{G+vysYt_PiXeq`#BDTsO^ zGVt;?)2q{b-L}-Zlei^yUM4FjzNFDKSyn81`n?=3Ty-pcQf2mY^D|3o@pR_-Aoa{9 zAfKBi#mxs8SZpf=eY{gXgpQ8$aOBX*`55M!^NbXmb(3-P=(BA?DG+7@O#il6cc6Jr z7_0)K1x0$vV<8?uL`R*WFY7M&UxTDo8_{`ko!xF$W=gIH-Yu%!Hx%%R!S3D>6s4;qOgOfxKY59Uy-gj?_u`*vz zH3sj*ou!ub$X01I=*bD0X#;=2LZH#H2~i?7e$J-^r@#!m?z&H(H}wY}M{byz))dfBAfz{aLKnd-maTfK2KL%|dDzA&r#y+>U7%%74xFq>K zicOik3*p}8&){8s=FtTCofGcLPuD{i{cDUakA6DJ{cEd(z!I7w?Ii2jTEy7rz}L`-nVXk@m4X=zK|iKuVo1nu)| zD}2o^qE$8n8NeXeACgu~$-LJ8K{20X*c&8r!e>8w|nV1Oelw*4v(=v)>&+XZqw!KQQ z&T`}l2nC2r_Dz}#mW(^+WQXQRX5zwOLk;UDm$@b`W1<2&lHr~|=cC33sdG6_+48jE zI-g#6Pa&;@)RV*+U$qZgRM-yq4>x^^$Cn~E3`?SvVi&}*h7!iR%3@-76Xa>0MVo+D zsn;Nagrr@5|A^<2%T4>8y`SCM4ctuOD)a%;Z+Cg)a?b?LR`LUgt9r+g-r)CHZn z?xoo^NLiF@_Uz?m;0K85Cba0ur!?cBX^dcuqTBfX2O4Moq=#Mf%ExDauDC}r$N7zR z{`Ak!ffOAc(FdFry>mCztj-%6c>;hJQ_om0^cYCo?L^4S0PbU_tnpoP>%n>;+P421 za6b8h+mI(#The^fGVHS0j9|P^$*k%h_4#jK8>O{V-w*I{Inw5zG8n6Fp_ndCFuojA z3;aA2uxfh9_30M1J}t?+TeXR-W%Wy#D#ES#ZQC4Qy_X-KC+(CHaqqZUGtP2TcndN} zs)|lUT099@IMPo@)+H+qk}GelQAx*sD`vFy4hyAz(w?`F6mRfEe(f}GE$O?#r2N`> z-fq(1ww*onv6FE(mI!(`$PsT3A4^v0{JRUG9=*Y?EdtS^Y{q?V^UCqbW)*$%L2H_eAb`E19&<^{vP_OVunWQ~R#^0SnbL7~G-zawY^%=^tJs7x)=k*lU-0VD~`ut)d~k1(MLu zE0V%vtK-DxZ6b&xU6NZOtn$LXK)Fzl1qSeaGp~_ocF0?w?sDlJr&WHQU~igEqhxWD zpNUsvM{%6<5IF;TMR6G)b*_%fb7X&1iZH92F7qbyKZK?qJ71_M(@59QU(tQ%t|V2V ztsxLg_5F8oM)8m5pp(#2Gj|AJR2DgG_x{{>`DW>0_zm*+)pK2qE7r`z`S&7=SLb^@ z150yosq017j>Gw5*9JQ1&*cVp zPxXA6Eq6|GJol@hJ25u8_xW*R=oeNl(lLbUm&b+dHktJh2U>*?zC=FE!+Sbz)qZ_F zm`&q?D?_d+&ctfZxy9(9Ozy<0NC2rhC<`FZ#(dp%y5zR>{=|Ys`$bblrU@M{-vQ>6 zj)u9mTOK%8EeQlkw9*P3Uu>LlHFbT`j~ndR-wD2c;dGM9CBGBG@4FOgDw&zM8BFI> zcj?~nsM&q^*_I{nupV#;Z@px-Yx@|?AWP>;!kTjxMGkA@$)bCjaR2iG7XwIW4zUKr z0&H{ATIS?@awlTq<%Ui2T9S?;2kW0F$ywZvVaK%E=hF!jKc7#=s^0@vsN+wn9UVM8 zHs=5bc33E$KK?%eN|uR-4fcfpyiKqk*a(=|$i7aBwbio;*RR{jEED>bQ%3^jGp=pU zL#}U|ZKS2!K8tb)%oHU(7`erLAcQ1DQ_l}8z1AB161TVCU$Pue8rk>QodJ96TfF4t zchzW7cB0ao6*vVSv%rdagjA)whES#Rqp_>LHw~(w zyQ-6}n?L6ZTtMu}E$oW`=6f>#2O5r+QOz{YK)e&SYmHJCj4J!{*=3YGc%Fbxa{R)% zhb#C3YHb??A7ap7(N#Lj%YI1oA`Xv=>1{2H-A0sey1RwF!}O*vQFMG^$O{rfnH6raGp6j*tJ3DW17RaHOw!-EAs zWIm=PYPZ7@uxpaGg`T$o)x3^fLRYqWir*Sq_>uCjC|>;H!pU~%$d-4_T-6b~3?}04 z%bL9u^IoYqq)t4DJs~DWJ@2tRVYzy8_VwcQ)ByM~dQ3FJz1gla&N3;EwVz}crOZh& z$Z7kug(e~A*~!Vc7*7nq8DW zN&%-=+&FvKKe^NK0hgtjr*jCN%>ak!nYu={%^Bash9*m4Lb1$BL=w0HJi;F%5s@e*7}03M8N z5_fFUnp*3lu6X-y$+rpnQtYhVNAj?uiWr`Hf+`iiQi5r<+i*8~l8y*!X8sgOvTLq^LOq?~vOYmkK7$ z@mp^aWj&q-sz@k}aE1z}Kz|T(-#aduU>iz46G*@DJoVNYSa5%)E_vt8$}MDyur7|3&g0QJ? zS^56qeX~d);yMh5b^-;>2tFDLzN&k?eUfmt`gH!u_0u5=zp#U$qPYoTQ}%|+-yMD1 zPk%ad5HDC6(60LNkT%S4C)%wS+u<48T{dAmUkS|~Yo6)DpgVwdnp;`2l3FVsk1C#I zGtD=Pn8qCJ09Gb?oWtaBnRmPo(xCOVbB=c$nBA~{>yqR&mATlZ|69jKdUYNI7Qr#$2OiTU4Ikq@zEmKXEqnNQ*CJ3&b{mul9NmU{{aVe1RzR28 zF4HqPnkW(-a-zu9ClF1yR_B@t#CTppGFvl}k&HA08k>ZivM{yB$Ab5WqF7gt>0>uO z8YEvFz-9g<@I2(BTa;(}M`4&98N@~w1K2LpHJ_}TDzjy7+^;F44kHD#gIHzJ0;>Cv zk!mPW{yAc}!FIYJNJ=$=C0n^F^y>U%7q?HA0XU$;CdV3veBxv25fR2IJr!j_5{cmy zt!=`>unb(|EKWY`xjfZv%|oe})xNQ$?f0~#DXt+}M@*`u_*`psegrxv@iqlcDS-H> zx6?i=x8K~WHN`2%2H{bOyq$EHg?HE|+u$lU^7?Lb3INL)FNCA!3SD>bM*z3b$Wof< z(o#xE;&dgdFfK4*b>pq>*dU8crWCR|Z(Bb}x8SFDXEAxA8E;=|E7#VA^wW-B+hkYB zFJ`%03FX}z+!g^4{(c6sfP27Z)qTDGSJ6Bf1*Q1i;w&u zqD|;+$@hS~D4LdqsOein^!F$(o}owH{z~io4ln?#r4P1_XG(Z~f*XIkuWfY)Hx#IT?4VH6MQwPw>y)| z<~;v=)}sOVx!juGo!CVdr|rhcN*{sE5bL5v&(?*ERjJLSGWegdBm0RD6(A|GO7l3)6vQi_mjg zx7ML3x7_PpSTsSx&|$DHqxj2rb?T0*E>RS)#xlTF96ffe(d`e|V^0~fZMj$3kk(kC zqx{*NU7i>Gs`T zRMdH#HT|-!zfC_}TJD3A<@`l9K+MLJF|QzUH(k)0=2-n28iAPhk?{mv4XJCNOC3)S z)szOqDWVe{M6Mn*dFex9vEnhWN8cQG<+*KbG37@;!LTcDu#|_53VRx1U)EjyCi+nH z7`D_GRTyFEw?4z`wx&Y(`QjGovdrk#v-rHf$xcQhKl0qK=PY`q@u?Y&a+xJcQmUA* zFy#+3=IJ7R$ZhUSjV7{O_lOT_ybR$8QR;Aa3ED{&vIip;ldtkpj{oE;|f zKbv_cz0c1lBZ9R+Xv^QXuyPoGJK#Nr2c-AIofu%*YTsF`NBF0~yt7$tN;*B8g7V@A_tN8qfhSfjX?8NKG=Nd5x>gDjq ztQHM5T#0Q`dw;Ig998}fjZfXH2d0!I_5bbxZAv->*?PksabyxN({>cuz~E{{%9wn+ z*P|h@AVQjQLij(S|Do!v8tPi2HH!uJ;IMIbJGi?A4KBgmA-KD{yKLMYf`ufwdvJGm zhhDke_o4p)5A3Q{Rr8y3jD*XdMud#k!9`s%0$Kp|A{cet+6L?Ni<=4i)6%P_vw5+N zU}}bTwK{Vfx4tm`Bq54vaj-2Iul%FoOY8Yx@|7G(Z?|(d*`_;TIo>;A0i2_pm-EV! zy@c~GV>_-#6#RaAEDRRRX~Vz6hq!NWWwVo)GY-E~AMhx?F3VF2Jaw=7PCDXqo?uK~ z!1xYqsWj;A`Iy38l%+FL&F2JV?Tu=%#>Ly|a?4vuqt=)%6I+NXK4H#SKYGp-En2Z3 zrA<30h+|^3M2W|3=nLeM#60lqN1!*cYYyfASqAP2qFj;rVFDf)p$h=$|8xIIoQ{cZ z!ID@P4>QtiZP&FN*|q1@c0Vk46j5hxwahm%kccUFOMSwBdpcri^#$M!V0wUSg)F}u z<)=kNvq_I}tleoi7Cl-J2RR!&6Uzbh8OQ#PL`+)~dy?Nt&;NYwQpkVgBcr{npsmKU zp(OQnj4L6dJMjr1|r?mnw3_W zBlh(cnhAWTlGXJ$RL_ly&pZFwAAm>)ScYCHSp$)&$@_Y>dla%-Y=9imlHPZtTT^af zm0^d#4-_ZJuHM;tfM-?NsE8w-DK`)3#2Il_*@O~dtWfc5XYkDwsG~Kh?|@8?z*rq2 z9;U-l@-GTISNT&I8+WiHHDUH0U1s}vL&hc^JlcNhsk8_Mj9_4;X;Fu)=e}3W!5B+s z6_?Gz7!h>QIsqiBq}6f$jg&CaM~<uPvFS=5VpWWGWf=VVF12rG~)@K9SC)=Lmd9T>9*D72AL5<1q0z zKPwRT#eP=7(NZxSddRb6qUM*d$Jje`v)w+VT!uc#PG_T&h7G@oZ3&GgL)y?HoQO9< zTcfb(_3E~m)qP*4ZMm;wqRRbHoz6kTYV-{UqH-5@5h6^=GKt#cx5O>*UivbHe~Y`| zh4-^n2bJj=ZtqY$2k!7WYbTTL%gf#6gp}^6z zSzTOCilntG+J0}jrzS)6N~Y*2BXm0@4pkAfwQE+0XcfXizq*0^U=+6_&5pqakN zh;Z2R7+COK7(hdx1SP}psAGbQ|CJ7!YH=|64o_r8{89t#F!6wHT)(%e)|N!TD(MS$ zQLv>>4w_5_CQoQHD-5kFS(C-P{Yuub76@6neEcU2QB7hU(^iUj|j^c}333Af#< zk@Q;H)DeDXR$|Pu4n^}n{)^Q~GwLIc=2H`$ZzxuJP4)^@_1&yHLVXXo+YUcC%7iP2 z*_>n4WI7eYrIOU^e$>U3b=sZZ4SC^b(w9wuX6j7E)17*7wc~b#)epw(k)giTtu$(I zUARG^HOj%+kG$|dERJ8ldb;mP?jP9EhT#4vMMH50zyUh6hgo@^#G(DrvDL`?q1EFE zL5L}ols8dNgbxBXFq7zWL*3(ctK6BINo#E5Wa?}(iu*5P(g&0I`3|pPt2EwOe1i5n z>m%;~xVf9@@_Rd8W2xqc9;w&6f9IRaX${`92~N8-X;|P2(u>1_S77g&aq3o|Na~49 z4fhYfcvCT>Zvm!)#2(|`Cgwe#Fn`$jg;9hKyOqiFf9I8_EAwprofsQZI0_|P9^R8n z=LW*U%#*pozdh=$c5BFV&mnR=ZR3&5W9zS6o~fqh<1Z8KjEUuJf;8#1j&9a3Ji@CSpn zQm7h5&)Fu()1_PCVBmej|NQifz9kF`p)`fV=ubP{eEVm5w4i8&mdFv$c*H;ZjB$1_ z7vk8rwWn_K=Ryn6d;!Xml5Vc=9(B=p&ZcL+5oASgC{jsd<}TVx;3Cf87k%Z$~;7u}}mo$7A#Oth8sowuLW z3mMvKSxLrj41U!djjC8?ncO_b%dyXkMV9{&Y;* zeh1gju!Ew&&1w*!Cx(O0Ju^$83x6s78y;EaH2q$O)cK~K#KdBfR2CuUW3N?$2hy9Ll~hBS|C@8T8ad%GEq08L!$mb1jB_Q-WRelThTpdg zK_>tP%E?|=lRgoJp9IWdgCz=(jmrHt8Jm~*3h%dkO+DHl%7Q2h7d?+#=R_bX)CZ_@ zjt!QYU)LYkF5jrd{>xyq-@FV>*yWbiz-HHc#mOM)IFS0s0@2nn^+U&Fvz#JLrc(@q zGocI-yo11J_`LQrtRW=ASQsn73cQ)g)1<9KnQ27-O?DjFgTO zD!@t%yV7{Eg`BxQCY-lDu3C4Ri9Q~D=5d)dDb`owqd z<;TX|lr$IPzxz*^HdJ41Zmk$Xo&Uu3tlELl>HS{g*ke|uae2D;(NagF^w7C@DsGyV zp1356rOi0o*d3?&bp?-7JLQs;Js>+mlal4=)bB6$e8-_vH^$}z)Rrhg<@XFSdC5O) z&tqFW6y5O&uey=dPcCO0s+DOETEEEa6sR2NB6g)IZt?5&MqQiJIYxQ$c(Ud@b3R&m z`zPD@CJxRf{$}Q$NIaRnG5GH>9=}o7S&ET(skq!6(rS*TIV=qED|ML>$w@rzSkfcv z0%EOdCop_vt{?be%PGiq`CP(FN>dyPKjv7`T;?ek+w5$h*GxBZ9JN)E^Q1SEqa$?& zJYFup`)Fpf*CMKv^@54&qPpVLqoVMifjO0gBf&Cbfbzs|WnWU~n5)4_D@nc=0BdNR zlRPB+ChWZkNg_Ed{cXAA0bP!^Q1+rbLIhnB1_LIAykO?5M8hl=It)x=QF*}MJ+%b# zAVf&XPhf63)lXn}%D~(A@$B|tedjjsKuYjf{`+bVxB6UwY3(yA+xNlTDey;oz5x`^C0EV_sPI+gb?+M=sgz3rcB9S4H5(- zMey+ciJpD}N_i}kx|0!vS3B`}YWXIPkO^yB1>9~f_Ch{DSXh6B74?zZ+{+xl~(wz-Va7Pe?)>4KvNw9;>JPyLSp1` zNVx@1<{K>7jN=tN9Vy}!12IWTDM>8{>FQF}D}M%o{OSjFjAj|{piu+CATWfjWP#Q6 zbTjHvS8@{>$7l|d4EuZi1%ktsms_<54_`9y$OCMWq`m4Tr6*&fmhqkcc0a#6cG(5M zZl}!Y0bc6{%hG+!6|FN)uUpG#E?p8l)9r@=62aL&teKg$3S`P((Ko*bJp(|8)u~+e z+&jQ)P;@foW==&?=i~!hnqYHp2=|g$D_hl-1#~QJ-86E!8Tpx|!a-L^Nv-k1lFMxL zLj)#b$iwO#HKGM;AX9@8MX#W7-+x7C9~9ot zf*6B96~CrQa4}HS8WHw_>4z)Fbf*h9y;8A(hF#eoY6_p%V*{I{O#ptyk2$*^!GA4H z)m2|0^-+RB)#m16MylX~3ppIw6yg$eomND#AbQfD{36PoIR4X4gy{QTP1#l11#j#$ zQlq>QPxmcg<*p}}ZxaUA(P9N2BabWNr{9cx_7pX#?4$w$L}T?c9BJ2` zNPfmNm|axbZ({WHc+M9LWJs6vkDY)3p~_r$o^(69(ID2F(Lm2k#iA9Wv1 zE|}?%ZC)ZgHyVL1g4O9#A%&LPi;^)Ph3GGU)5P;XBoeX!ogP<74_+^dEgf6bK^ezI z9lTz53`{wGle*2kG7%8Sakrpt(DQrK&2CE&ej74pLT@_M>e%i)2j4K>PgdtHHLdJu zpD30%fPU^Evm`Z0Sz&U`5B=AX+;c9FfU>UVncjRXBawnEcqNjzsrA&8x$twwqNgtY z*}fWeC>ovG^-71OpTeC1nPU~aa=r;b@l{AQXKsFM`)`P1y?qj0i>n0 z)Nlrk>UxF<8=IV8jk(6{bD`{VZreWiT4nE3N3&&Stl}3$9^DpGLpUFuPd!~4D&nCV z7|>MrdTnD5lV{$r>RO;-Z`>-1Mf-P*_%V`L#hY-_ny+c=5O+n>L-ER%kR9q&@%Ek z!CQ~R`1+HA@ObXja6wX*Jukc z6U8=?bH>3h_&?q+faVO5!dUt^KOz)?oXWlPI@a}+YmAym!rDE1|B+t_tvW;#pXGGWo& zFP~BKpK1JzPv4KEx}5D9MCuD+Wd{hpO&8lMlf?>H$$nbk3a!*b$xS}G|FpqjK)sD= zwy(x3cKpw3-4-7@9%xHwo!8rKy~&}QvfuTwPzEL+zC050_9$%)-Km z7l|j;{(h7b;CuWzj%-S zI=}m@xeG@%Y+~-0HJLXwi~`h41c@j1)UBlbAQ%kJDUM#QRCE?s(N^1~qD7|3Wi7ht zn@~|1jAeYUG%2BdESjzM%lQ*Gc{|q_n3q&Z{0(%lWEttZRJ9hXh5B|$I@i`ZT3FHI zX`)t>5lE-ap6QdTtl%&Dm{(4|X3k?w^Ko|Z^qj-4g{dP&X`GeVQvm;x()SnG@^Vo- z1a}tZ%(<@jQ>OT_>KQ9XA>cf?*k2>a*Le7$IrtImi0so9gVvbGJG*7c)0RDz`ecqx z@Rt`xjp+IdmZi4?M)MFKTzCO3W^*r7Fhw*98HQTj<~BJ+t+|Vq21=f1TbOXue+i6K>qp$S$IFUU+IpFo0_fgd%{I2A7~ zg$Fg=8@#|J-)}!}i6?ij%B^{TA9zy(qktkYdISJ?@8KN>!VxFLi8B=^Mi&Ac%28Vr zbE51Iyv$@wX3k3xeHTA@UvR~O!u90xaGlG`; z#v&c;dQg`COIO6SvGeSRbp@Spy+`PXFXN-iua!geLco{6{O)O6?pvdD?T~1Z4zNk6 zjxmC*^fZgnEuO(^wIZNjUxBb$sF92(7No?z{g?Hn5(h3q@*zHrh|qvGB(G=#4OUm8sE|5m!tff1=2?O$2P-5(Y9UIW*UTO zOl%75O9bHYvVvq$orKeyjg4U*O_hcR6S>#xKVP7sNqwlt9q79O+RV@i(PaGKik~e@ zp1v?rtie$fR$Fyl{4i33SlMr?VaZhs2H+N=$w%f;#nlv-b`__d}GPxV9#9kDT7SFkj|Ls*R%^m)dm$_f0ld4=2V0Ujh7x(seWv3Fz zk|{f5kcKi}pa4|v5_NQ-_l9Z(VCmUco%MTCw6sLTwvcFSw^_}?>X~HG$g>(Lqbccn zbbq|RBpD>zQc4XRgmZ}9j1n{jO!r83=&!{_U$>R**P<)K@A5+dn3UXI*MlJ8&Zp<+ zk(f(>2{uga%&a!Fx~#M}lFH#O?7R#APpdUHDG8JfQP1IL%PM5PD28TN6*Y~FUMy1{ z*6M}qhhIh>W;xX7>&NM>i6RpmWq6+5EwXtmxX3t-R2J2@5>|{07}u>8%|Df|~*vyNVKv=v$n#*yW6hUk%cH~;*Oe?mbXXXX&YwCLlT zm<-SVAdj5`>bY1@q4C487_x1sYK?#d3QVgcAnbO_IrMioJj&F0BJ*ggAdMb&Bk?dMXA zsi6B-OtR*)<&!TY8@NZY0m*sN>)rYw@OTetN@)h5dKoC`#t>5veS?>i3uK+vCq&vt z;Ha?dHaMbO4%&8AfthJnA9qfWE4N0xen>$9X=dW+&tCwt_rh2 z4=IB<=P`Bnn#`A9a8~~QqMwS!pdk6^D^v{8Lh+9DsTFf*LGd`jplj=nXpiPQ6*o#~Ef2JDb}QjG(u%`~D_p*v1rz#T&V-mORQ}sNKBZ>J z0{z(tVX9gwqyvQVXdz)?%g05n4F3-AKqvs6VGDTTRN_n$?}7u-H0-X+0O>P(q8ydl zUI4uk*WVtK-Qi1X^iYvLvY&7{fIdUb%ngfZ_gDrIk`?JPF6_GqnWdmScBb}uEpL_S z?Y)t%oND77chu+1kP$`<8O1MBQR0<_$*+Io#LKmtO7|u_A0sobW(So-Cy#z3OMk&~ zMHf2v`;>)XZKrBq#8=vk9)xz!6rFN1Oxm9oN^1VeUEp$w<50jJLZenUw!WSfUk{JZ z)iQ7@SUbDvsg>7dKR~eph+%^{3B3kR>CGLJZ49&(Ven23(^^&PBPR?DF64|o{S@cs z(zb&{>I}NUr7$h+w+dB$?3k>JgvC5F@2doUP6eM748JoRUFKYE@H8vxe+5w%|NJ_W%G_cmA*T zxcc8mRu};8Z~MllqJY0`x1^ln`jnbuipa84&tCb-n_NT3+T#B?09taA^Pfoav9(e~ zpQiy8@zA94W-*=-w&uOs6IN@_$%Uo8{khSvU-z2)VY(t3hv0}?wL8O687Ca z2`x{g!{ou2x$i6{GDmJ6J=5YIr@f1JNIg(1DUePGPKMNldAt%Oq}118VNMbAZsQ`>}J#K6UL8wgNj90 zM%sk&1sS9dKFMS^i$adWa?zSQN+pHS68yPgWBx#h|DnjN|0Cq^(6YFes&;K~5YB8Q zC2`I}ie|EsfX~MRt?+*StPzM1)Kxzc^ICG+rC+-&7^Il*|4`z=X6c>46)NN^10XuI%!BV74t%bM0Tf%_uI}Hl zAa5T-Jn${2&$MC)Op5JI{oqCoym5=-=^Qi47{tF59~4)g2dk^}J<$TrF1k_e~anXC?c`Aa zh=&KnjfnHV2#$%#Buz~_Iy+A8*&HZoZgSpPj9%IZRnFs-T|JMDIM0_+(-rfQ@r{xt z&Hu($CGK~o3_V=Q1__CqVjeGbTnbO?Mhp{})t$r^E)G<0b|CE+p2?#fe^0hUn7+Dv zKp9cr9Ce%$INYRl{+d}qpjufpr1w1;zxp+Io^hTHqz>Emr#+Ws)Ag0=)q5|BQJDHe zu>YC!UA@NNuZP_`1FdT;s;K=(;t&@}Mo`v+-1pYtR!3Xo9u)C!NBAj}%Dv+u^G{9+97OG_M&fO$!~@1t#JSWIU1 zIUDZj%=(vS%k!2WdMvj(T(J9*NY!4ZcNA5m!9H@uG38ON*uxB=!+0K7pT&+M8?M4; zkJ+D86#Pu0#zOu(wJnC`uyD6qwl2Qw9Vge=HFQSjBko^3Qp{Qw7ryw@7>UH%IxZrB zff?2Wrz8VW$yrPFZB(N!W}(LdU=M4sXhW zH1gpdkWr4nVEdIeT*q=|H3NTFg8Ii08r7ySuxKE^HS$UR-$g?L58#$3d%7>HajW?S z7}y1z$+X@FkH7qFI@e68)5lK!m2Nmyje9k7&8y{T%XHl85Vqq_^fP_uK$pnnX%4Ny zX}C=$f)1Y(O7EhdW?-0+7m2jdm*x@Z zVhyoz$)x#)nSIB!J~U1$Y%=oWn1)JMZW7s6zHFzX2=E&XpHi#7rcF3UnKb?3=?#+G z->g5)R;R|A@VgYVAFSYVskHoVNsIQy|6q#05lXM+(?;{P8eh=uc8_O>9V~+9QmcTi}eaxjtZ_RsIJ{0RcQSw zvqy2QX3Ina?lmqAISs^$fZgP0?7Rv4par?FTR6BTjr|*NaVBT{`9?ZzWmj5D_a4Qg z@YP;6bc$!ZF^Joqg7;ohd$=vUww84&3whJFUSP}4C(R+;;Sd~I;FCSxB$)O;^oirm{; z`Gd8kyam$Zsl2s)C_O7@bIUSF&$j3Hx}|NsScyz@@g{tQg+SomR$gY2VAMqFWeaYx z6@fQSGDgS$j%`&NP*tW|N-@=t#q!MPkASg7({TILHVsUkoi4Y?Yj}47faLuRJwRwHu1Rpy9n&p^Exn@5Af!$A{3*-hL`TYm#J!jx)%4;JvX?7YrX3J-G4w( zUE$NVM;cZuEq=?1RbMNTiW`3b%Gso#NUZp*S%Z^rDc>?-61$_4Cl!4rib#?XToy2i zBS7DwJI)O+f33E|Hk&UoNCpK5n{n5I>|f%sih&2Xez6899h!;f2|-VK z65rY#A-mS;M#TaGEj8xZs%BPJ_^bLx_|02YeNx0qz|yAk(grI)TQ*fFEQdVs;Em01 zwIA3lsr%ItmJjc0ieH8Q*<^c*{+(^}Vm~LHJF$F)Xsx>%tEI=|r9(Lb zkxIA_k}MyVUGAES7!e(pID7aoKwG%vhAU>Rv5<=sOp5G5guKBFO^lpIwA>8cx%eJr z7gU>;WsiNL{=3EhUD7a={f9{=H~U`#r!#s5V)D=ZVZ14BxVy}u^LtmTc zZn2;wVIj@4HG4V(&wVOFH}|vnrMWwNtGH^SBal9}=egb*ZaeUCvOsEnPk6uALHVAm z(8i*YRf`Rh`>m%ALY`KwL&}7494~Rh)YpO>qY9%U!|T2E{)#e~L3^-)*|UUbLyQBj zJn2Abrmx8dLLfVR7L@l``iJt@20z1#l6$z=!Xdo$qxVy>k1|y|bvC;D7amp#*lKgS z39IraQ@F0z6DXn|K2Wm5vNIK&K97#W^4Xfb-*(3=TG1pA|4G%)F1fyC>MMj(F$kn+ zlZzDgMB}m?^SQPN4i%2hcvGmj)bx6(!(*Aj92WQkM*0T8q4|5ZU?*{r%KI=I8IHjm z1O*LkR+K9EtjN;)$_|(ZAyxGNX-Zv;s6L zxH}{P@rU^4Z=f7yEBDiMIh5GB!E%>s%p!)gEUwA09GeROhtA=p+A@z8X z71^zxflm;=HkTZLeiK99BI( zCC_*0xS9z|iTWvizWt0KixBn<3jgIUr!v=-M+nlZQ}O~mDB&CPa2^f#!1T68t4-Hd zZoLM-g;-V%`AFIlY}XAAAxokJ%t2VV`dFYpv-l97_$>thx5g1fq%?+$wNA|wH?_L1 z@bMhp&p>)61w3O^T5Yv|JH<%2puo`%fDXYW_Tke_kWC92Mv^L`z!8}g1knOIqy-Pe z=3QNc&m%A3oOr#Yrf?aUoFaHk_5I$w6-N^c0g~)>c7ZP8$$a5&#|@Wx4K5GNl&Sw2 zot~qi&y|GrKUViBwBtZKNIRsk=wlevK4a72@Zh=;Bq zaj_W_vv;@PmpJ1s>#S<3l1W0}kTz;Y%g-SXCP+T_gJS4!x;yHYHvM$lt#mJ0?7c!N z3e$&!j34i>bwyTfpd}@ic;98`r>K%%yS>P=XmrIf%MOj<-dv5QiN-CV-xF44!BVsY z4Y~|LXU=~)u=crpP*P2<(|$nRyx6SN9)Q%i+37(1B0_N%PXNj;A5n0bn)417A*T5G zf)oq+a@wrmIs!ab4jT1OXoMp^Cg2IAXCQ2F@bT%6ygc>C6-U8$ba8b$l3`3E6+jo> z&`E`7DDNT*c&S^R!OBJg`?7t01Fxm`e@lD`-i=O!G04oiWs_r~(ut4<`^Nc|Qnqs_ z9hN`d>k7~?k@^EU@_w(pXcTv{hwXu)5-f~ zOn}Up+ZT>tnB^iSHfCbo-Y0~M_>7pc^TQ}M6z{EQ>*qNrXx`vAJ8gryx}aKqMk$V_~pxn2cBP zD13*$I{Xn?K3|5SQEh-Q6On)!nMEjtDxr&KxAp@Y7|r-?k?$J@1VF1A+|g&Q5;IrW z*w|(b-C%!1*gGIO$fkp^L_%X4;eI;Xib z#)&pE3PDy?bxktskxDTw^LmCWEU({TFNB03^Lu#sZ!+e(Oq7c?R-`;U_XK=guPnM+ zjo4r({bc>@xi|feY*(6HQ&+>W)H#LtY5x2%x_I8W9FA_f6iXJuQ+XoheIJlya6F%q zU5dvZ`mg_Q^Ppsb$(W`?;q2#bBV6ot()`Op%-@+j-+S#C5@BLMD)$=@NKyRv ztNO0Zg7CiqOSMvke@W=sQi;|r9kCL3|7O+Z_A>2CJzkD^PhL=1{(V**oLVpgj2sV? z>-GYoO=UC`?)C`M zIW`f_-f3&PP2wNw0U2rrphp(?>*oQg43|w^^MyNLFSWg|E-4lY`*tE z_75Z)`~4EC6@sVJM=&7g;4&~BqRxJ+t^byJ{+-or5-tK8s|^kf1k!Qqx)L5 zzhiTeN%jgDFGpw0nTc*a?pk~w<>Gw#n6**AAkvs6#Gx@Wo?_6Wp`l3wBi5z`vPNa- zv{vw()^qUSs`@g%SWz@{5Iu0QTixq&yCJZRXPZrahyebZ@_}mJ&{WHR!%;y=aa6E* zS=ASf>o=8qW`~Npr84 zxpeE!1_fg>o7RCVHYn8OA^Jc`(8bYJ#90S3Nv+9}_3rsVlQ3CHD^N6wo=H@^Dx%bp zhk;K|aE%Fdqjux%`li?aTS8qSignPlmp{oPQhfReXOr^Hre$7i#Gm-PG^m#JFXHK@9P!Vi?6`71U+-p(1xf* zAE=JC{|A#XCTSr+$J`6(I%Oe85n-%%QSjMeF1jBKP(P?ITwJ?)0m?s~pciKxh@Tpo zn&7{;n(=bSvzmkCxyrkafnqD)mc@VNVnB(Trv3)#+2j5siS2^>z)z2lLz*?c_w?LR zAI+2dlb_Lq9!Y5lCJhIHM)1n-O!sy4n<_Fr+uGheeO(kbh{Lu~`t^lUesi@ryIvws$Hhl?-;hn_Ob35_;E1FzeiIuiQN#;>2sZf#e-(&2sZ*$g}j0Gwb6}<{*@O^8T&0^ z|D{M_4Z9H{`)M@?Eyn8!l8GVX(NpCB2h1ent<$1!TTbjg`MYNmCsy50``LH`zMQJJ z(fp>45!+?!_V{R~o`UheScyYrpe4*1?*tWOnb}Pia?Hu*$06^&wd0!jc@gr*U8Exg z$)(Z{Oa4R?Hgz;P$%O-%j~#9m1!i`FvxZ}xAb+t970XKtZ={9${ArU@cdtA>u_+P#DqB zaOL6LH4chC;yAM==qAFNr7L>k4xfIJ%0dD~32NW#&}54(JR4=%ZF?~>XFdDyN%fD> zvWcA)Zrss=uolqhVkLRLO=i3J8nVtB>Nr^Zbg0g|n))VZJzd3W_dHirSN=dd_kMi0 zr-UJWP<$ucWTrH}{xN^t<0_k%6k9_kR(YxRO|wp13cEec5NyZoZ#UhP{Q9{5xo#^9 zKJTvyv*LuKlOtF4wiWt{N9l1f@D5%jf~p=fOvrx_g5{Ud{J!<;lc#>meV2aa zS3221$z_ITOuYIs`;2Y`C~of2pta~p$y?cDs^G4>1>MF;APd;t%>%??PaS|y^qM1i zXSvORWzi9gYWCmR{&+UWXZ#9CvDy2R`Kt8S>Njpc)XcjMKp$JauvcsYI;*5sS75{o zDDJ!v{{JQ4L3qbR5FTdCR|mMYL^VvzPr0dY(bj1Toso=9Ya0%I6@t80ARjq1c-GDr zQ(jEP4;nFpgW8x-t$T#rr4QU9idu?#F?{^LhWu4xmU>;h@Q4U547xQ%jGYIqYMp4K z)O-zS(We}`X0Ky8CSf|FT5>wqWBxmGSP~kpxu$1tbyoSko6A?VpwS zOr!Xf%&XKJF*i>6vHeNx1CTc~9rj$mLcKyIqT3N!mh(O;zTVzQX?>oV7Z1>GLKC=z zV1D;fr~^zNlI#*eR|2kZY?iMtQ%*jDo@89iPYdRgjB=GRA!Hf~n&rCcLW}P$JBIsy z$a!54eU#JAWHi#bqBM%12Yx5S}b0h#I1cNM#T-9yA=${o&Tfd5L}8YN2;`!4|? zoQrA)cJ586*U|!8^vwMru{Uz{q2Yh9RU%KeB3Z1~#r3MWUkABu6naMOR0qb1t5{DD z^zf()_X~iXKnnz$l5mhSdYsKFDuub9o|5$qN3ivSveU!I2wq<2-7lrmx8S|IaF>Ob zL1vX2KZOSscWyM<%WIeK&x$~>xJo&x7jGjl=Jp)^E~Ek`P8Nz5C8>*xRvW8bHv2E_ z<(5zDG(5kJ{8eFuwnIL5S|{`2^*EBF+OMO=d4HX-PW5U_wviG+j( zwHe#3wDtqK2vgQzPTaYGN+8=+Feq@@sq1}D0_HB2^3(cgVa?iz*F!CO^CNH3-7`A< zGs{K8d&86Af`aLP?Sem69T{$zV_v-AmnqOJlq&9i76dcNJIVbnSei5{YTxq78X ziKuzsUwLwGVD!P3+t8i$Y3lceg~7BJ9Sq*snP}-Xd|1wxoZ18c(_hQgKIu!}O)6|x z+~fs*iyy5rqMZ-&(q2E$a zZ5MLr_vayR2L)n9MU;~Nw_rojAZJeINY-WDjVs8Zr^lI!u?*TwTBVr(D4g4Cy$`@W z+E0{Sha)L7b>?OfFB`{pT1VqWrRg@EF>sBH$6j=*^*HAQXLHaC(6+amsJH9=VS7~h zAqOAlARKWS&%v(KV#~#3soJY1Kdht>w_Q7lEF!1M{=V!d0xR4OLHQpJlM1{jD%x4h z2#QTWv;s4I6=y{*T?RA%+OGc&V3iZ0_S?5_w_+7TM z33B0kHyeMvMcEW9?*zq%*MXg*qarcqB~={noFQy*^-<=$!H}=!$yR@ro^W0^-`dEgjLZW~{u-wAw`Ku}Q7>9g)Es2ZNL zaVGU(GzyjPo68Pu+jp-nYL3H^2J^|hSl|VN$J#vEIp2Fp^7$Fa>ZdZL8sZQIA>EE=I(y!6{uD+3bG+pO?L-hb@`LGt*jTzM5dhx@?B>CJb2qy z$+TkhAw|V5+AqT7`K_1Fw4*AX3c#y=wVLd7F8g?|S|p?BI~a24ED_3Ws*)9WY5lX@ zk#BNvjQp&jVbXl$&GLA5Do>KW0wM23%D5XB<^BuRP&wfeIx@aQ2tBB=( z?#m6#K#i}Gz(;Gsj`B`*b*f?b>J#;c3kSl;giS@z(E2?@h2l~9Vr3+F#YilY{a-WC zJ=xC#YuG#B(06~KRtbq4^A@D*#k(a8Plst5`Kl!TubEoxJ9qPZX zFIt!=94N5rUs@PnenwBI3Y<~f(Hj{IPQ)I2e5|i&Oau9RXcw_@!6ZLPsfE(U8z(b#b9VlS*HRwhn`qYiCURDBv^ z3hJKKECYyMmF8A`4(bQJi=2yNss)*{$GhZ0d~?4rJ2wn}I{2NOH?sOxpMiE%*AB5e zxtNSI^0bJf?V+d8dN@6ukVNlNZ|kuAd1sTJ-stx9@4(uj=cKQfzVo~k@eFtAmwtKS zNogFFiDd_p%aoYFyK@_jQm|TS^k_cWdr4h^{fL%Z5Y%t+R311?MZ@2ac=5}j)wo5urM+| z+T+BF&cIK-!J((2cj?(YsuoWQHaB~+eL9kFYIxe2f3)6)Qh4&L5MZui!Mo&Xx9Xe^ z2>+Hzs!W;F7hyuKQU>%Ri4tfF4YGS4w8TcMG<_HU{X*Gt$rTYW7$!No=fatvAOGQ` z9M>0VIoYoh>LOn_-Iw3RWnJEpx%zX%Q<`S97y8Cz9>oUHdABMcoR|K%TdZIcV^e2< z`0ZCvzV?@#zA(GGx5&?~Akt13q(VE@p$k2Sr4`R#mFti`O(!HRykLgEkaM zbDRaMb%=@yZKCM~>SUsPWOv~eBoUjJ3zXl98Ygjw%+uPw#im`C0$!xv}rHueEkbLU_1eSUVFJd1_oHS-ltq+i*8j zW~!gx-_q@ylV%8B#HomA$$UMOYrVn=U>K3v)1&hAVNP^0a&sp1^fMojklKFL3#TBh zS>9OBMy^vWkt!~);PbKLM4-pu?}w-o!RTx5C{q(0GsC8!e9a{-Xld~of=oh82^m9| z?dv#{F{LLdl(N>h4CmJ=_}7^}Zq?IEqfwT~olVzTR^n+AK#ch2l7`zotCZZTIb~b!|~| zGF@g$^B9maQ;T7WY&S#bUsU0Te)Yd{ceGOGX6?V(b^zvQ`ueBDa|Qn=djfYm6Sz|M zE}IXL3&K$_!MA@%ntZwu)>FLh>A&(3KYNlC;CCp5U0xjw@9?H3S}kxj_T+mXv__)FK z3ncTqITM~ooLC&C%VmB`T|ruU@r_h%SDaEWW)lSP33<^I5UgLK@}evby@R77RP;9T zt9L4Sbq}egGYQMMQz%P*AugiE#m8p+nk0j4?$l|)tv=HTHOdUfpQL2u!WZ-|l=4(D zd$=6x>w}A1BqpWB$pl-je6D-kjS80C0v1CLV5d&(P`7VlBJ8Ch;QeJ7jd#A(U503) z9T$?S#2~B zoNbGh;vBcm6W9}dRmkPR*|{PP<@j}dL_~B0+H8JW!QCpFzbeQ|o4o}VfH$x|O?f=5 z5_FW~T-l-v_B{of$`hp{igTA+SLueuDpJ#zan+_rq{HO%rJB?{BVN;-k;QvW5^x3$ zN2qS;vXQ@=PH^KGuKUy5i7EZG5PPA5qAT{W4aE-r|q*-2m;)qIYvZ!ZIFMAwry7@8-MI-KwH^{(8zRH zCCEXk{P$FGCjJ}~sB}Ir(8LY~zPCtA(RO+4o#JAIfbaQiH;)R(l}+f=f_eJ-l92L! z^sa@YfRz0EcF7i>iEo~@$LY_YGY39G3_lhHSlhSh7gpORRU$6h67a!BEMEX8+#b8W zWp>F|BVj&T6T#5AH*sQaxQvJf6^(E5faq-jAFpk1l8}ZZ@&lZm+=WQRdgR%1qj;~A+}U5N|Hq$zl<%ztdERXY z3aWkBV(YC=3BMI}J+Ffr4tSOaX{;eR4Gaxyd_KH0xSW23BOi`zHJKrEQI1qs&-5*& zLB4uY^_z=FV(OPie7=vbq5t&mX1Z*|^~m!wNLV-lJQ>#a=~Gqom6G!Q(`{fPsgW{N z0B2*>Zj(D7yeTf1ql7t!I*!HT#rhTXx6nISuAiEAQ_hZ#wT&KO8wa}wV2Z7j%x(i1 zm<4HPk1G=6X{=)^$+)ZKs@2h%>5V5Lj3QaWts@{|k`*_9rrySkz-j(=HA#nu4T-JC z`tQL9YVmrYEKX|2JN{fTt+*+nETcBnFo^kE)B*X%e$e2M3@9LWAq4d&hvSeqHazd1 z3?D}>n9tj%@p<>o5ZoNRsx^}mvZx~EFEPcYYq^DcT}^gB%e&l{qLC*MpONW72pk_DU2Tynt8>ICV4iW=2C|Xz$`v6uZ-R=2W zv;2B9=1~}e;NM(Uu|j#$?OCZpVRNJ~$OnDr_Q#Tgz{XIj+izgA+zzn5lalIRZS`Qh z-`oTgT?%So&k8D+$O(q0A0{Wz(;r&%VN@#@WamPL$JMx-tTo#)Z5ht1HUNS=6(~B1 z58wqL-Ix9N*C?76hQwU@{5a$#@u4&y>8CrHy(pLkSH5*K7md#w4jfBZXk^k~%FQa4 zfw8di>PIQZSf$)<=MIl-ofpSZif=2pTZd?&WAY!}Bm!NaMGBi_YF$?rSKOt*OO*&6 z-hZJr9}+cMv|E`6XO)R;LvE-~TZweZ5dDo#vjde5{{u(yvgx1YSa>v@KUc$Jv;K`+ zommrNjOGAt_LU5GtYa=&3$*qGAbmy=NxQ2kHtOHTu)-14>YS z|DOwkw`_+x#fr?7FRM9z-nAg)!t6f`tpnEcBlo;r)TJw3@g{g+{x zA37*09talRm5>o|^v}^^fOZY7-e-fSZ~_};-Cit zkocfshncUgr}#hia8%%}r^EWTps0BfaXEa4hlf46b-dxFJzZ&8VCS{kUFEqNFM!Cw zx0GOPMIyNhWY@ho@jrIEVxM5|WBXH+_>Y#i_MgW;x5#j?m=Z_i6klRLt zN7hSn>ph?Cfyr1nDI9jhYWs|iM{>`7TSEZ39ss~7Bb^!P>B*gSYkS+_r*?4?KPP_l zHYYxRE%xFCpC}87Xp(lH;jVVPPGJSO8%%!h_W9=7)AEMTYRnJB?KK;UoS0VCuC>IKc#^A?MS03i-l~k*F#Omr@QfR)z?i9A7B1 zBpEk8C%$5`xOVbfzA>4@&%?|W`x_J`rl*Ij^9($*s#@%-l<;%4g6!L6S>a^ICnr|*(PO`o^7AMi+vVHm-s0)D%&{%^tOeYdlIvrwUqkzdD z-1oO3vbk23COH(e$BCfS$)Xb;*!d1i$V6XG!t-&QcZ;uRIed=5gW>UsDcOaDg$oU7 zx?D?JB*-Ve2Iv-O$~G&R;AxH9|h#FMV9kYKFd7Zrg;oEMxz)KFrAMkPeNE7Wgwg zr(hB$;Op{bQukfcw5H__iMnW zH_AfV{9yc(>+Ju_0$3I%uTcQ!#)Q7Ux)(|=#&5*DU7jjBRgqA0q%$H|3$%T12&HZn zIzINR+Ie0UC9_^bv?6N2r#0$gG3WY}U&Dk5$D|bVezsj@S`HEM#-V3_GLiJ235v`L z(CC8T5`x|1946!mA)M6%-f(c=dFZnUrV@ZNX&z2D!m@9=?esXy{f7dqmMEFF9YZ+B zEX7r`$-@vw$7QIa$P!nRPjr@8e~^!{o?%Z-L;RuZQrqrK?JsgIl#H>0p71u5h+@7p zfAJz7D+|o>)!iUHPG<1?Go>fKW1g8)Ls=ZWL7R!JpoiTTY-icfu#jxkFBy3EhbA0y zjAzIRm=RA(L@e|f)b0oId%o*9O+SiXdqpn|mx|G@j$F{DJ*8EjSSg@lPW(*YjDFqe zUc>6VTM<2cIKY>hm6pio2gADp{dzH*CrxWZ2H(`lJs=Cvh5!(kNHYDKcx?F)1d0oJ z{dBo-fwYkrfJHf&lb-(ru$Lj-K#f9KdJl{>tMag)eWt6zOIvEPK3rWIK4}2(RsXLQ z6$gX}I^K}nm}dBEmh;FAm7NpJ-NM*NPf@6RBtMc*}j*omI`Oc z?`)63-EjNzlk$bM8Sp7FQ&pekUiTS)*&W^d7E1;Wbn3_>W4Y{5KC}i`0rO_U!bRU5 ze!kJ4fH3xI8#RB0Tp|p`>HL7&BQGWj5+(yhFvZ?QLq!F9 z{JVgnP*(Fd4QLZS$N)**AIpXx(533?vl^26_C!A~@U|kj@Y3?VhcJZBYJx-)2mP-2 zzrQ(sltWW0m*R5qJ>1{sR3dS06qYS}*e55+oe!FIaZfuymR5eE%QvI=L$yzP~ced9N)N@=J(_5eit z=BLh5Hz6o8Fc$a0SCG2$uGb6h4(l?RPvs`~O8`g$narmL?T_h9o@Hecf!oAZga719 zcenq-eQk#1q^zBtT`Ct|g;-57G0h>xgH3LJy1SrwG;R;@DvFun`+)b0qSk-w9FSnU zj*e4wOI@Ynokf=o?hMB2`<0_O#E|jgPEN%)EArS~CDcc9^P=1gr80f4ii+da@rL5X ziEU57kq%w;f7OKuF@a+NPckS@~{Q-y}!SwT3XH|D7bw3-qm=))AIdA9QW&2 zJoYM)JOHsQAp%BU*eltAWna?5t)K8TI=Xv~ zU0%asw$Hz?V1u55UlnY2sNlon%~XhgZx_hB2~@0N%T5HIoN-s$!B$l*WBGZ8sG=+k zS1z+h<`$@gPC^>S?Or+yK}8tas^MKl-fnH8ojVZryqxXp=zOcr4}YKd2CO>gE0C^6 zSXEYUoQ@=r*Vv7bMP~hrhOXOl>`uAF@gYGpej9~VM|rOhyY>1p`ifJt7-y0fTl8I})E4yHM&- zb~!sM{cnHOF0dXeQJ z;QMx5C?mnvJcUZ1t@73OayTT`d55brr5+g#U(FvKY4!2f2}eJ7KOxsOWV`k~8maZ; zqx|%c3wmHV2mpGc(t;nq-+>{?h&lD(L}kS$a)>>`Le{WZzTr(cf#L&lv5>HclIzlQ z;_oU{VpF-8onae~nLiE|>a^1BCF(uCgMbMGrssl%=ju%l4)d9NvFNhnW+*Q=#oP9q zU%^v9^t!LOZF-rj&k;_1{H3!tfUno5`~xkUQvfb-SXR)ckC8gLKE*!?767J1$%fJC zXxxLZhWEMIgw{b`zyu)o4L)^%iG;7`_;eHYzBuzCio0a zNQ6tXs95Y=`;*cUN{+Wv{O66N1Mxs)!QvKotY7bA(I4;M2ngsoie(Pc?b~CP+%V2B z&3&Xaz~R+oJkMF-(|94ZQcl(F4N!Ts+XJCZuU|XwCs(r?f7hdn3~GTf(?(hL?a?#* z`S|kYc7jRuU}ibLo|n1YW$ZEE*UU>mJW7q_gU=b+cF_t4^v1aO-mZitxeaTC@x7<- zcu~>N3Ok{Wt)4vGxz7QgRlNDwa4HH8P6PlBkN6IqXH;`F3gu9cFqqF%xMk)J#$+*; zbeo3*fi*`?)Uk~|AMdKL@yts--IcuaE=^2~WZ?|Mf~_+Eg`z(Z>~zFw0en#nWLLKl14;z;zp_Mo2T#V4l)idB86$n#zAG);tM7JRkJ{Z2rLM| z42bBGGyA4HT7_8Ye)#q;t)6mFi2Nxj{ZFsO0x@v_e4E(Dmle6(2|!H9AET~j&4Jd1 z87CzlNgM%Q#FcxW>aZ!QAaYDY|sc_Rak5cQE>Fz?CysuPm?#szb6XE)eLc0c>J)Tg#{IAYGJd;RL{On#-@R)UqA1tzdlkx~81U-AF4`Q^Llsi8#5 zD4!e@IbBBFi?aKlxW@Cek`1Tu$yRpF)627i@Ia&2#V60dp4Q8nrj9l^THHQZzdm^U zwx(~6*zd7uo-FWMc^^v}`hJ&KO-9o(aHcx4K0r&nM^F3#o>-_sQC#Z(JLqRo06kvl z0SB3^e~i++O-8Qhzv>)dl0iUjc9PL>yUns*5ZBP-^!E=G-oWtxb|(17&ZfMalKXF* zz*$V#;~c}9DPu1rRX@BXXQcTX$usKh@oW-wf<@sRRta^#J&n&7GnmI5_l>h_dS!oi z)bQj5+XJ054?%5bWMmbb4%G@7(as(XNA@CR;gAT})-8nRNyD_zmm}n(V}g{F-?`Ud zK@F@620@;f9c#%wjgLFxa$`_=zry<@U@{{Mtn>2e`J+;2(-afZBnw)pB=VUPUx>wi zjsqty&iKs*U^f!{DT^mXBu9gCv|LB-e6a?@^>i;?-fAFMOBe-$p>T=EVJo1LBfl!1 zF6BKQus{dctx*P}a6$m;W@oQ7;WLsTkXK5s(?vKUhs`W(hd3YQ8xiqs3|hl^9J+S6DJ6_O;Nc`nJ4o+irvTo`n%S9qZ1m+sG_N&l#HsipXpR z9Tnu2lQ9pZ5B$k@&n1;_Ety!42n=3NeZ4t>zSu|R6{VR9v~m;UDnQ?9A)G}NS@5- zB3%y#!c|~t-RnbyMc;iB9sdj!_AZVs9#8_BWZ0*uUjEA~vg6bTtaS26xF~e4eFAbM zYpqWgw|}^w@%8h!?A^|hfXLQ}vMKQ9@7%c+y3kZfrBvQjeNzKSVJLQ3h&b|2`KiAm zkR#uW$^0)XqMi7wlCcIqGcM4vqr*qLEOog&Q#fTlja-NXeDEeJhfVSY8G`Vz-*K>l zMuBYl`0Ags`J5%rK>~JyzJi0Lip4uX)z8R73Mopj-Ks>m2(D7d1UDImw+6Hn<+}NLm2+Kjhjn>i^()HE1HZ!&qS`q2dyuc2xn;cQKtY2d%L0Os1ehJa zcGIMW!vP!QY>d@P=JWCjj`%O~{zIlMeJk9C2~-dydC?>TWR^QKHH(I%v8SriQt5kMQrN4wjPPs z(Hek$JLndoIyT;}kh_1zHwRdgo10I#&FS9U;Q^G$SKqmiQKeueB)xcTy902d=#> zoz+$+LGgZ6*d*WS=@y9K{l(1qu3V7fNBEN?I8XcuO)j0ZR^M!dJZOqwg5x#us33{D5KspxXZ&q50L@_xNhzOb(77nkA_Re{9a@vlcmN2pE@ zJezL?*c9@52iqg@dHQ43np=y_{ud>bLj5Zp;72Y;{(95HzRvr>4RS?gd`Sm=-$SJZ zOu$c;Yp&Lh)>`UxzO6R`Q4zVDrzCNf-O&Q)(2A`veEyKVY1%w?7yx}P$hF}Sg%=LP z@9FE2eHO7ajFUnMO0YTgy0&6HV4#^sNF5g03JE)ay`1&Tzm<#6dwrgkXv%b=lYb!* z87=DT6AN!|ba{4m6iK+L01ZQfR17ZO4>wAE8=ht)D7?u8x#H3TvU_iLm1HpxLnk=O3SgXeG(tLC zZ?!sUOJq?sID>p_8qsYx7?Fa$1JA=oSfd0Ub-Nb2VS!ROb_D zWqN)0wQLi%Q%HIY6tT4y8kM|yqHi#FVk}~Xij%Z`eY1@Q_x(KKw>9=!qz#`Bug}Zx zvU0;ZOQJ1@K+E0^O_1WNZ*AD_1Pe#F5^_QU^=v9(o}m*rD_8=-@2|ArzjX^ty>!hR zfv+9-`L&B|geOFat_VQKB@CT4B$;S&rm`F!9v_pJ`yTF;y=YMM{<2=zEly_fMnGDn z5idykFBkc#wh`+*Ck7|~{B@Bt&VO0?(&nxLC6i{IPW^ksJvE(-V_d?YD z^gsP1Vr~kF+JUO46J08zMj1L3x4o00O+_T#fM0O?sw%!Fan~tyM zd9k>0O1b+8!^QFon{X&svw*S3lC1fQvj4@FwTR~k1;HwG>7B1M1aseBCQf~IQ#Kwv z{ZdX-GS_p6Lr+itXOyNZ@>ZwO5=$%wA3>!_3*{?m@h+YIS~QZJv8|Nd)MRVX?aRao zH@ke0YNwJYpw5iI@@hI54unXRMdaS{4y>Yd=z2*b-cFc z2e{u-L|Qrietiw2Lb~=eG(r$_?6r?8>E6`U{M+VYlduK=dQwD&CBz4g8h?HDf*k=;y;$>VEs3Ll->X&^X2nlv^`OvtA*t&SC{TdW-!P#1va=~bz!eKZlQehIW+x_y`PMZNqx`vU#o zWxv@pbFU(rr>+GJ>8cq-8ao>XaV=a8|CT3Yoolr5o=sPXvy=kzV3ef6rL(XOt6fkx zW#7QTpy2z1PF0cDCVVv{D}Z!0804?G57=NN`=XFFF%k5rRbp^IU8Mw7HXm{^>%8#S zPLc)>0NgI`7Q%t*c19TkZ2=QmdXmsaN;3`c=fxKS()=vf8W#*q^a zNZWFyO8+Z7O@_OOYtvg3T?Xh}tV<^#4?w7xL`G#Z5p~g)j|3|6!SU$aG+1=I?mQ+F8K?YS z{cB{>4D;=8T?&tJ?S#`ZP-cV)V|N=NJ+j2iGK5Hym!9P03uy-}pj{?k~xy}={1JI@HD?v;Qm;076li$Oh4mI|56 zDZG3}ePBFljl+__^Gc8gC}iws56O)M?fNnh{bTt5VG0Ms*SyXr(d$NsBp=OnGvrc< z8u1o|?c>}-{N6_Z-CJ{hnD3JL=r~4xxw~*sgaSHvB%VS6+ZzRu7ysTmB%>uojtSqr zqb{r>_7yk2%`5BX*yn4Q&ap>SjdWQC&;9ES+fi-7z`_IhMsJw)^t7Ig>~w!6RqMY5{&@t`V1G0N;9Y>xW7=GgcR^>n2KSH|eLODQ*-~w+IQPZJG z^cGdU=T!tmXStq~7Ec4d`n!{bF^16C^yievg*#r%z%7F&%jH^V6c)_~=;-tqVSJ}q z^<~9%LBV}M>=}EFe8vP=A|S571^Q2|0r1DDwY%0-6wTr+YeT~`ZwdO@bWT+=3I;D| zwy6U*`8v-T^cu+3ohNDprV*^W2T+xh{-@0afqdXCr zAFl$mpnz-pJ4~9~iOo_ii@YS0>4U@5brij=^482re}`>_3HP<%@3bph)ShPwc^FJ1 zizVVNUbYj+PX^8juCxExOMJT7g1c>UWRv{MhZZ-|;TOAX^d4GG3|AK?5xO@FZs#+B z2n2Sm%#7DEH7;hU_q_)PM*y)cBo3y5vee^ENN&?_}gV_Wh(BZRuNEzrVWH zH@GB3)7qUaF#=AueidNjl;4-E%c(oE=*BP+4d5$!qj<C3 z4^-3_3*k*3=y(8u4#wSvfF&hftfyAlt2XG%bsh@82Mrw^;xGD)5Gm!=2-9d1Gf!#6 zP>gy$bOjaXQ|MR=ZX!lRe19~JDMXvKpl=~je@_h>qBhS9MiLkfiklG3xdV5#Ic(qB zLAQ2(EAsFPDmiF%q591xj*%3IQHar`1-88F4*Cx<)$?3nFUjEZ|8s{wvIWqX+=XZK zg{W)F>rk2K;1J~Fzs$2Hp8wvo952_thE!+x198C}7edW!c%?vFir%=Z+v@>DJCLy4 zv9<7NxH}|;QcE4EuuLZ-k@^Q&l|e)Txm zqzyoacULM`nHV(XWUr$-1Io}G2F}u(n^$1HN@gL&NMd)(^1Y(3XL)1NPpO5X$DP|) zOXk5ciGGKCf;bj&w$Qb0X+P63=+;p6!Yg zw5efu>;c$H?r*YaYdq(0S%9N1{Oan82gbGJzGVN=;FA3I{s?HboUO~~+}^&n+B_O5 zeLgmFBnWM9Wer7l?&iOLuBx5zZlG$t0-QSrfaW=HkA8dC9*TBNZ2f@EoRj8kX{G9t zphl<@(HS0kx)@9KkFt#w95n%)HdJyg&x#y7oDAx0t^KQVxrRyVii44ggp+4I&g^LO zi8DDXRKJoZ#A7q-YNIDumd!j4_g~AT30ea9zF{QYZ#@W5?fjmo-maHE_8tkZtJ}bP zSQyS%4X2#KIs(1xvT9=xFqn)v=UO*tJl)++O`G+S1Q(}a;?Vm``#I0#U?PZN*Vcj% zLEk|O*&F2z3q&{N>@qCC3Vd7+<^q;<8r}Cw^sV>vrcI;ifZvSI#*Xf@W|BSE0OcuZ z-Zwlf(bvb=mX0Xvab!^>n;k8gKz7W9fPhrO^;x+)6LrJV!MaTW)XE=zyuM_*u(BqK zTpuI7k&zJvi%@0#3PeLzm};D7<8i(N<~gAAU_{74$q5rem)$+4iIH=V@LzQF2xVv+ z2Ew8d+9;H=e^>GcEd;mgPiZ>68wrJs=4b3Bu(_=6!wygO}+Nu^Z8+H-k zk-THNe*rzPQ1{JF1f2K6qllm9{SHm6)^O{PG|OQ}LA2M;n1R}ZzxbrHWG)v*r9v&P zL(<#i??>2`m&$5=)MVZc6QAI*tEnqyM|?Of7bA9ZKHcu+Sg|eN4vlrehCnOSmhvc6 zm9t#9`B2Gp4PsKnWwg(so4z@38aKL)32#~(Ny)~4@&h5}=+9A6MJ zT3k`TfwKx2jkA6ag?Ck|&@+cO00)m)*_*_sVXWFa%Sn3+8R?Z+pH* zN`v)YQ~}SJAwYCtOR~)skBiD&nrA7qAS$8k`TQc}8bK9%F?A(*;dL18;( zj{;ZcB~kg{b?J6vbpmQ%N;NP!pB=SoK*G=M_T9gAzWY;8F0Ft8nkqs7sng@z14zb# zys2+YChl{7slR`J51MydH!x{nCFvl6Fg(xgAu`rfQ^S;C%=<3@3=aVne^G8EGzAnKEVYGl?B8hpDK=fM%^*k#t^~xp3V$e#dwAi@6{kOUK~3B7 zd0q9t79@nsc?{zF*CLv=KU7WQLl2QATKSm2^yCuV814;Fub8yyme%c%msy}1L|(eM zM4bkx*ZtB&SYox=z=i6)cj8gIPWzqai+(K&Wcx`#J@`CSfiZ;VMRo4I6n-;55*0Da zmAITOR6Qn!%_G(>2tz+66crUM47fv_O~1o%uZAJrkJqwq$$Gn`^&#|Ivqp`NWzvmw zX=3K)zGYjx@ZRSId&NOm2-%Sz_Tqu=gv$)ev`IvuQd!vBx#bz&runtvM;s3ZPiHDlwvaVz_2#C8%jiz$Gj}L|O>(6Y{YBiDWDC>pPAbOEQ+lHpWeeICd=?y} zb>w?728^+S+vj;7mjS=c!s&{E**`WWg-mfdlP_LtROB8sZQ6goP3x9&oE4byV4Q{UQi3PhnXB8wN^$s1l?m315qoP<>S}Tx zO=;S@UPblvmR&R9y75L z2&7r)_5GE>)Tml}wil>|Dy_ z34PsvJSWK5x!W>X;sfFbmAD|l+7!SA!M{Qt3Td(j=Kxjz0sLjUrsCpa0ZGwl*)o>goY3F2>b2m2;qyzFmi;cUo0%~D+TCtUjJ z%0=Crc%yGcE2rhMAEh2Zmwz7#6cZ%P`{A_^UAZ2W&5sx2Nea82FUWg!G>WGp>JGoT za1>2Bl$39t4(VF`lT?e-5&KsozR-S>lP;dn9kYCpyPNB-SwC8{EBDWb9KjzCWqvKJ zkonwj{p1B0q~=W~GU?mLHQZOFht0imlOo54k&K*dTlx*mTpTI``bL5TBy-!LhCVy6 zD$6u3iG89;e182;3E7A1LjG5t8W21?L;F+t*AiE%{~e97oXErOW_YP!?0j(l`$Z*6 zv->^OM)h_!n}tyj_?@o|ZkrGm7qxhCts|9eF_ROOYH_U-m2NT9Lxwe3g5~?~;_2A-TpwZ82a$}mOV0Cnm zCOeV8ZbR7{e5^fNT~Nclm0;2vtx=e=0YD`Z5L{pkcCX)OUlQ+lLpy_+x_7Dh&S-!H zXIaYJo7h-nzn{fG5|bG(EgwE`m&8hgyWgJ#(P}mlQc?YIM9Qnr52t-`@qT@yW@V)uUFYwE}IQt>&Qs`$nry7xTus@Y#-1?FH0d<})Ebh|xhZn?DVm8tGXrZlSP4Y1QWKqm3(GA-&uK}Cra z?|HnYIKwBdj0>IX7d$IFP4`pVL38=`=~oDSQQ!=V=RIh?Hz+%J$5zBXC+9v{iarX6AIkJG z@|xcSPA_hRwzO_?Y+8g}ec?Z`Pd)2_6U~`No68R z>Zw6RX@Pw!#GxUxJLL9~b;)K$_INlG+x1Jt6Ri3^cA>7T0cmym7V4F zZY6RBxg9^&(eIR&=PGr`ZN5}?z;!P|kwmSE_^rT^XQ|`Q#0X;f`~E%K459iP*t-li ztyo}9U{QB$NbkE>3L`p3;#b(}4|0JTk&;6$+#U3CGlYRT3#3?j-OhUaq?n=q>N5_| zRCwTC95x~klqG*95#ULJ6rLP8k{o0H(Tw7~HcJ4Km+;cE3>z|5N ztqWUwCm}~I7JPB=?TtBZ&<245Mt@%P19&^}9XhgeaK^TVOCE*1VgdC=#UdHe-OEDG z$_Yr4b}g?28P)?$3Ieh}KccD97A4$y5%BGct$6yP6EfyZ=6s=n2+dd01=W+Tu9!wzz+Ljy7VWP5Z)7zd!#`^eiruuI!BH3xrQ9X z(t|d4T-WyN)6N!4v(m_ieRRcWRN4AC7fHJ^-|(g87wp1%ow+fP*#|t%O{*Cb$-}l4 zek9KyFEEdg<-s2`oG^K~QEZ~U<09kC2~N-3Qerhn{)vVMyTw56!)sGR@7)oXq)DBc z-LC5wv4xYcpm*{d+ZGpw-8=r0nHtK*DNVY&M4I{Nk0@vf7`lT zdsi(I*BGW#X6w_G-w?XjyWU=33pzIAPsY)g>+G(gc8+2Np&hFjePd=Oa)!<0)en>U z-F?S$!WhX!vX=#$w6#Zh^d{en2C=r0gkpRU7v&*eV=&Of3gNv54sF{d0m`88l=Ld9 z0F8N>MS`*g5`*iu@|?Fx2Kw*cKWJ!Z*L20<+99$vXnyPC7=buqQQO_U{X2d+RPh{p zXLsb{8)qtqVtW@VkK!8_s(@nqCsRch#nxeO5M6)-taNw*h2iB<58QoXupPv6Z!)r22ZQ*Y+ z>?4T;AIX)9YP%lFYH^}}#qc9~QQ;qFl(8RIL%lMZ*2V=~p6yn2P)^80V|os#tUukIr-45DER6JC5`VW|HJ< z`~lUZY(P>(m(ZLYZ;jm$28-$Rm%ZulliqpxZt1|tauz?G@0^K*HV#>DOSpa+zF(A0 zWimKW?k;bv(iY4ij$dN`$wgta+J5wa@z{m;r_^=j%O!`0I=Mf;i%s5PYO~Z=tW40W z5;a@!rj+%qI!vNkD=F_B_nJZ>MB2;srpX)y8IL9B$I9~YtlEp_vFA9>!7j3nL}M-K zKVF_LX=Fp`mk{68LF5PJd+bk(W&iUphhgP}>*m|8<>YeK#i!A;h@Iu0MlB7TVrk@S4_creOtSX^AI8rua43E}h zCfL`nB6Yy%nX%vYcRbCy-|vgFfdv(Vx5<1+80%KW#|h=oIg1-Du-a%<1B}udk*>r= zoU<4!j>PSay4p?p2dz}CgXcoO>3bi?@!{M$70Am%Hvf^seoi#Wu3hC7s?@BYIx`!8x0*`1gLoHNI5vic5aE=lsS zlGe#^(X4U$%J!U$@Ki>$Vg-F#oN$K~-utVPu2@ zjIEH7kx}qeGR3L{VT*ttD3-USw*YWZ5t@N-cs*(>l_?#wj%F8l6u%qdCHUt~FEHXgtR?Txqv&rdn{Z~B71(RT_VY#m%dg_M)vd%x`6aDh zC#VKw{3@4A)QK`Qca||N5gm54v42bWphIj7`UZVIf36-+Sw9zt- zzE#fJ7}0?AjLm&3qBw?)#1>xF`&Z2$P?oy@@fv+R*V>Z~C(`G&=XRJ;{X|Rh**ejO#9_Dg9Ah5Q2#Fb@#_y_NeXU?$ zMJ4@_Bm9cE^x8KT*)aYGw#*axj$ciMIB`fZl_zmbahWG^N)gKooVvKU_NBsT({O@NF{3_0e2mJqQ-o=0FP#DMA7zaPgf?0^XxhM2zGT5)XtdLs2;0c&!^xl{G67KY7wJrWqnj5_nbVHT{CNrXH9j`9is>wphh zs%gigbNy6kjo$f9obZ*T8w`K>1NZi;i4gd~cxnJJI{**3BSr)3#yk~?Goa~vqcjJJ zu7K3@UgUy4KO!kof(IsRm9UuaM?MT(q*Up}H*QqEiRWd%_*6D~sPpM+x@k8|~w$4v{-_ z8vmpOLnHV4sT$X7)^7J0dIZhUMuEAI@?@28Zt}efpDP522F^dMun_b)UgLff`Zn{8g7!a`cujH(+|yBwiQ4-3)*IhPu?r>%0U(0PG0y5moCwQ?rJj$$O# z5=bPPRmj6)`UcYY6Io?Qy$ad5V?w=uPX}Ia^Ik^r*xJtJ2+Z6_1GC$8wuj@!+b%ui zhPGky&hhg1Vl7DJy9Z%k-X5oJyAhPV=TBzgAypGJ8c!uT%G*az`r6tSHXP;7qd9~UtPDYU$oLc$2rNyzIre}HG>D7};PpmE2h6dG3{QYRm#$xO4Fdj>T`R4eOD7GBiAz0Bq&6OOos+0?)OZZVY|>6_UvCfJ%~$ zjEI)pzBK(3&OZoj4A>2Te`)u#Q@KScUtSmj0RgcM#CvDNaPxNW8`^`D%W8jsG73u+>^Ye11XM;{{H3>rH$$f;wWG$GudXpF6(2ZhXBK!xd1pTx` z1F0IDD(B){S)=*gJoel#JY}ys(v>dPXn*Y1@PV(lISn;3`j9V>&af4#L_rI4NFhq5 zAI7EtlQnS|ar&rT2E*<>Y;BK|z76F!A}C^P-~9~`5)vUug0K00M-lwSte7KH@CC-q zBkn$fPo%k8lhJ(x4&<8tBQ4ZVs`yVqsLR!vHQ`(O-~QMI=Bwp5dHU$MBpVic1TA#y zKPfc8CJK`NKTLgNbYAV&b!^*q)3~v1Cyi~}ww;Cz+t_Gq8x0y;jqT*yd7g95_x|V@ z9lL+-?(5nMbIvtaQwBKmw>5XvpOl(_9^29WTx{mG#A(1Jv1kH~a2FBJwsztD*nxMT z&)glg#CsUc^d`bMRB>5n%9Zo*O#&vSqsMX9`zu%Uap+lF?7R4DaBewb&k1+%rVAyQ zzUyi9r!+?6x0lC}R(JVx&#Oy)iGXJ@y&;M%tSe;T0t<^ic*hA|p$>aY30)lwdOJbX zeF1ZE+yKPog3m&xkrC^;bSDJwJWkGJEk?7Pl z*|3IH1lRDRixn~V_^RTU$YUZ(tK_!G>0yORo_t)xM`_Y$kbmLIal>$^Jc!JKwerKl zW;g)(bxBHQlRT{n8$P6?1T)M@d_jiuAflZeBV;Gx?M96u_$XTif~M4^vuIGZBeR>_UUzc~7flnRO2y0#%_G}M75E)Jd2IwG89`anlh4OM-_}S&3la<6R zXU^I>r<+^0cf4NZ zx88eixl2}Y1|mgC=xpw7Jw_WfdO~EnmiXn8l2_1-gTfcIQGUp6rL23ob9}QrNm_wS z92deuEec*$OQj*%RqLV&%h3ub_b2L|X=$6T_eSnnN(gs6^uHXyc5sx!UuJva;CJ4a zmCfPBWyv_H-07wMfS)L01EhbVL5v?vWQ9BK3{tMqVrn1p1e_^+cuE25VYUGIPS4p6 z^o;q4#juPgm9#C%D||t^o>K{X?{a*nCRY`FP2t42RmWNbESR57XZq?dwt7ptV}4h`g+)Dm2;9LMoOH zga{6$Y_B0MV34sd3?T+sh)g4hSCr^Auom%=GXYG+I&Y@b;ip+|J6hb0$N?tAw4CjQ z9QfwpGum^#mdJ0!jiTCN&&^Ze@U46|?h~J_NxEOjwhtno#riL|0DeLO<{}`R+~mP6 zP7sPzaMI^&dWxjx(NH-QgpVm9g6mcJ+XygO36YsOpF7!GNG(*N)5R^#Q4!J`J4&{| zdab8k@{%)pafD5;Cpd{5JRdMjgJsdsFI?zmD1?I8U%mmH z(k~%31U)W7t@wt*FHvUO*;H+)c>9~!tfBL;(cx3#&+4{`V_h)YFE|1b5d(=A70lmY zE25waMZ-LfmF) zjt3*MU2Z`2`%X#I`vc4K?;Ne7;xC;RCuLnv9soMM_=ZYyz&MkvTto*+wLVwU8qJ0t z#RT^uel~pFM?B;+hVjWvk!533%U24(jY%C|WaWUzk)%eTz#~cay>Pk~Hju>FR+U!L zA|3Evr_sChO}YCVwI_0r|K3vyNHvN-X<+%w%3{Q@yDO@RNT2>qbk<<83CpX@pDUU6 zyE(9!s5(&POPbE~ePnif|E1pCiCzA{i%Ztoaa*I{;IO2A@@`Fz=f5D8_lrV~arWd- zi$Ute@kRw!=Nc1-UmAj^+Azk2%WY7O?!g>=p!j&E!eJGMd z7FlgvXWbjm9QnIoBXSwsJ=&|en*0eP4X)s8Hu7O1lM!;??POl3lD4%gris}$!v&ukWT&~pQ@Ut#(I>xDS zaZOj%BF01inmS*)jbau*x`X1nH*-{lP!@l>dj)&rFIY_V;kxFL^tYe9r}6+t$E4r+ z^viLwtH1ZD{4$D1VMBF6IX?dukb*8>t*b)$k$|^+zGeh=I}cg3fl5g9Sn#})h3t5L zg1JkVP5c?k4g0Xt%oP_7&TZ~=22EgNHB2nLH&yp+E`cCwb2HLuZVn*1J!Ps zQ?eTr#LF+@&v+bte;eQPmNyRorgMmzj)qY|fB27rI!CB%oX&V;`eHeVOp^&WTOt$; z==XQV@iR(^S1!Jpo%^jno*s;&DYW2O6Hv4FoZfdfWoZf+?5b~3 zsC3SUv4UXgBUQ#CGc$9ZH31|KFmxNFVlGeqD*;|SNB2Rirf<|DBF1pWA-SbcFh^LE z|BsM)G+QdKZigYeME_B(YI89pHT^CkR8ZOE1 z{9ZYVI)Jf$_neSbRJs^^HZ*KT2pG)66hWmtK~SO-$u!n(=sn=uP7NCF#`BC^5 zo?*JmRf{0N>>TCXn-M&u)L@}hYuD`i%#K9B6N1K99(`9Rp3D!me#TG#_5JkQ>vJj{ znMrU`_t95M?Haha{PcNKPBRxA3Qp`+1w#61-%30V{mm09(rdr2IP{Ro(t_Y@Y7C5) zZqb?FqY+cQ>LWB%=?pRHBf^z`E9SB`RGI=BB+NRYCrI$A0+ z#BdZv-`UxQmuXgV7^IxL&$HPfS{W)h8FH<)`|U;g=^F4P#$mU?$>I0S+%8S5QURcC zAvVp`579tHAc&gD7rRxQHurP+`4HNf?fNNxbUIO^9V18PL#Qy~^zi#mJCO42pUF9$ z=Eg2cidv~Oo7x&B;$twad8(i3FnL*5u~+HSlfybK0~`f!dg_Du&KbomckT( zG;(UD+od*7yY(9X6(Mu5x&}4;J^iJg$zciO0b@L?Cfb3I1g{)_2t4Febx*S_tcyg| z&+lMH)R)#k*!C-O?!buLbLg-30eGXi1<1oM#yGrAp45MHm52||hgPB?#u1akD{jMH;x^dQhiALcU8F-sd+-@Gou|c)4i- zWZHDfkt?T0qs^bKHqOUas2BBTZQ05zNZFXUO8cxc&SrN3Am)Su{1FDQ=M*hSD(+%) zg$sCV{V)#iI!3(8*OA8QcysG-{Jfi&qg)BKG5U13<5E;9zv^6zQ&ANdmDYDD3U6my zTO1*rSin+hk4{fx0S43X?_6m!jst4fcy@SH=T8TRUaJ_|8)kObtmqYgV(`?T=4OSB z)4>8t*vSGwO{;sz58oEya|k|Frt ze`$2v$jW|MlE9b{>o%%zGJ>bQJY)t?-BRi%gorP7lrn!R{~H-&woE9?Av*f@YS@ye zDw67?=&_8PyF;;1w}}AD+|a@7ZbM88graF*hM# zgE8a*NKiVPC7R#cqxqoB)U0{3VPIh3pIYN^Mayq7XYKGG6mKL7iQ(l3jYq@v7noE5 zd$o3PVWaz66=VDCoszP zOOaT|k~=@N-uFCHDf5-!d#6$v&s@bQIT=g#jG;8D5kGNR$$Ojd0Htqh!?|d|CGDZF z%dI>D!=gM2-Nxf}8TM(1ITE@BZJHksK1QCjMaL3f47yAnPsgKYH@V@;iqH8dO|hyx zUcyC3x@M~5gUK?AkbW6p;|}x3UAm&JM!jrQvdV&24H6wvy@WqyCX3G`lFJ>{3?Wo) z0F6$g7m4z$L}zXaoxR_gN%SCfJvPP0xD_vI%=z9x?U}lgxIfc<8KM&^q1P=&mKb=NPk)mz#jsGst3AuOPZC95hr@hj8G@A= z#|Gd}U>$=f=P-4il4ZVGAUJjrcoN=0)W|p(5uRi5`03gK1i`>t>&IN7IpY@{>j?e6 z!{;$PQ*ok=e$8|vV{=jM{5ndANjq-!>DXt^T1#T*bZtnwa&vd^&^(C@FEv37>}stk zToF`{TOC#FUMyHl2`pJDvM)H-ep)Zi<1jk8 zxVs2!<9^;qw#KA))-S@WO6={31jn$g(@@7{hLAY0?*&%JD>W*h=OyfjLbq-NF2E)} z!8}l~a=u@NFghCb>7D2{5E0+m#tWNDZ%;0jYw)^2*?n)Pv9P{PXUCE2I=nLab{Uuy zEW>WRSX~aeJo+$LfGKS}n?FFK$5jiZ;q$!W^RufuuSRgVBLgc&k|{9g`JF*0dMKWF zXDhbN!K_uc7H^U*>m;wtKsqJgTO!nXnQy3= z<5z8bY;)H+Srrpu94mBOq0f?&#bOoVlk8u>DQB3XMEAG1pN~(RpqpsG^TGN{g%iRC zL0=Pd5PF-C?2U{3B#o1zxkTak&W6ow23Z&rRr}G8pyCC5txB0+t_wr`I4G!v!CaH{ zCP9+lul=r|gwp_&xpY~SV6va8yWB}i7t z1yvn(+gAZYn~0o2@+J;CrmdqS#7|`Iw*@tndBwwX1~uh0YFG)z>w^T#SDd(Wbo&w0 zH6#(z;8cjT+`iEhF%tR6A<}5Iai91zLmq$c=Na?_Nx2oCJPgWZZ5~gk1O{!#8En6~ zxw-{6l`A9}n|_N8PqXi9`7UuWaaB5Q=>)s;*B=ax@%*YU4XOCye$#S%q(&TN*Jiry zOK)z-_Dfaag<)WPEwD|gNs&MNSvfdS?UZ*OQh1DoVj$*)!2io55%Iiz&^2;({w1UA zn0Wu8TXgd-`~#Mu5c6dhY@%VE3A$-PSgovT);N`_94t~J#HUEEXN*r_6MfGE(y)^X z1(l`xUHrhHMjT+h8=Rd3*pd&{8V^An%mAq0^v^MwAvSBqdQV zE?F#3@|JDly+z%R|P| zmlQ~<7?wgobV_!{V>QBW_gRrnXEg2qi2i2=dE*BW}(6E-&TX zn`Y$#JmsMVjO~0+I%Oi`h9<-KQ{{kNW8Ywj53s#Fh2;ypkK%3kH@?boVs$*THEAjSsqT%C8Moz5>wNJ8cNBR}`?16#gdlyz9MFu`(4x)(8C~ z*-Jwxqg_buk=EVX?dFop*maX@2PcjWm|_uABYRNP_mZa`aIKsVf)m;MMX`>h^<-6t z!~+*qAL69KDClroK8H6l7N3J`b5=~%QW5?9OGOA7;#dz?mj|TC(A8zZxt>EM0gv(UkqNjfj4h-@YrAp;3M#l;v;L*@Q*z z#HOjp2vLw4=hfrA4Ij+iT7Nu#xV{7xg5LdN@F$FhY7P$%ee{r{zx-~O%D^bJ(_$l2 zsc}!G08mLwA>JF|Lz>y3Vm<6Jq|j{M7Kk8uiL_s|!Vn^;^RXeAQ-AYGoX#e*)mXii z*mb`i09KSh=J>;1Jw843^f)_@J-Z5S*NFc*zw^<4489Jyf0D_tiJ8yAB;m)IvGycTh~|)ZbU@K2K(1*9dm-|&~!OUEIqyme=s zhC`s!z1qzeV{Ln~gZTdo_F-42X<^8hGopYJ#!$&bC2)9Vkj>hcna+I9b}7 zz-*!JyRTrodTGaFIEjbm+v5g@T~!0KEMQhP4HahuQ@@X@y+T@H}5QFEU`RA1}w*U<6GAvS_}Kk^s__ zj`}5ZSqhwka!2Ff4h$5TgHip`1X`)0!_0~L=IvSg#Bk0Hs7d_+xyQ#4NgXv+nu%YdDI4$Izkx3Iq-!eGoFJa0Adgd0s7 zExY~9(WAFJ+%!@#jsNGCIb*^439#C%aa_)g@W7)x!33HNswSL(jPGG2^cT4Ncyl7n z;wm-d<(cU4pq}23a1B<<)*fBVbdG&WQqy_cN75j$5b2zaMHNDljOB0ud`U z=W+6<7Hs4F@%o_Fc8mSwv;o<){Haj3kB;We(6eOya&k7>HLiw~Y8He}({DcF$$C7U z`H3WQ z3BaSNT;hXgPR4#b)>l>-MG$aX<@Os>HJ()(zX>;0t<@YK`aQ4%%aLCO{9=Mv#yR(2 zec;;v^l$J=2=+ikm2QW=StY|MEw}H{OtJaUYzn)Y#v%kQth_e<3c-(ZeFfq1(+$?+^V;6roiE|*uPDDs@Y1`*zG+qb6Ah`aKGqZ<8g@aEnzbjpnAZSc+_o_p!tfB#5>VK^?2mf zS2ueP=h#?2Lv*008rz&)ak}8HAh%)Ji;m=EynF52xC`$-3a+lZgM!8s(OoR~HdxKW zea~#@4`J*IE-p4#=hgL@{BPXsL-`Ofy7fLf0e}yn7^77#T8c<#^gl!NhP-wRpbI80J-Tlxonvf}e2-|GrNi(@9F80-PgzgxOw0&{Pk zqQ!E;>Ax&kub!wBd{kX(WS1ZGzDp15_9L$xR0(Ey5$9Vg7cwKl!3+ zp-euq6fO}ebXF#fwiCjGBQFq0su(`8$Wb_yOOD1)`Ir+VduHWclJ3CQ)DNSWKs(7L z-%wEG(OB2qL2hlfG_lI?*rA{3 zWy#5Ngjo%}U!FCf45yZYYpq|D4|`op{0g~te-iN2z&e{_L-rPuC5(}OePJr7Cd_bt z@0xFO02Tn*7ImV1o~6wE_Dy8{~QA_ zwSxyrSInqhk$xdVc_&_o+GMxZ3v9b%b{|#bq|H`Jbd>G-T|;)YKo_ZDyYCl49=FTL z?R&M{Yiwl1Q^^Q zH8UPX_v6`In50sz>Pe93R0sEpwJ#5UNrNsZEY#n~u;2O!U6f$l>QagoVLJiPpS6w( z!uX}*b#izUUj7mXre!e#0wXw=3@J*f{(JYzztCz#91Yd_#Ma_3QB_%8(e~0;Y9kh$ zk?gZ;XWuG7I?L0bx#N!GzX-fUAsIjAOLfH+aAQjmu|?ac)`viGG*TPIKn0e~%``*~ z0;*23=Gtch=`U4>CE8)O#ecV;y&1QbJDoY*H#x5kMu2UW+pE~79D5*^rsXQbO1-kz58G=0EfbLIJJ z(N^|952cC}3z40Q8qZr<*bl!m;^jI-x)hP$7%H||qua?}y#~*lZ|b)ad}GiLQyTIQ z{XC+_$dOqX3s7f97$jVO)sHDb$j%Ye!DH@lEY!AziVhPb{klkl$nAlag9BoC#43_G zk|CO{rU1dKS#vF4{UT37xQ3>*XKes|hFM8b3L-^Y?kqZ23qhhZ>73+dL;J#3nPp2c za-)6}@@EzvM##6;stqIR&hBs0;yMjsd2JwMTEZpJb$d?@n&cf z+C@Uf4vNnSgWU;V^!2km%V{ExiwS5PBe#E$@=no}we5@4b~QmDeHh4N+6M|q{W;%1 z&iG*;r^qhkX6=&%U+DAmGr7Zt8paV#4p&NNg89S@EJtrVJqZcO7b^-m_@pmi)0pe2 zK29i|{HpMSPLU!NTm5}3pS%INz4V6*5ZaX z9lOH}L1uwSsYp^In_hNNlsBT9so!wEe`C7BQKbQQ6`Wlm;X-1Ap{ zf<=bRXy^6CnQu4dw;vIzvka#ZfjDt$qv(jF?~Q}6XpMZc{b%0K2?`A8zz2`~SE-lu2O!324G5_d zEl9Z(*-t(Sv{eRZN?uNuTry9`=YC8LWBRz(_8GV5LW@;B9|CQ!@u9;Y-J17j%!_+Z zXo0Ep=m2<7pb6y$YCdRUVmE)X0*)*3TD);)^1Vdn+|RBWhzH!{Bfp^8mI?~T6nKU&Op)W?s8DR7QN&;^fD z=9?&BuUTWe!cM^NAW3uI1RY`^URizV+?dbFZ${XQvIBe7iQTo>$CmYC#Ur?vfSs3CXk4t_V0%iu-cFRaMPq^eY=*x_w}B)+B;+ z1p0o=AjSK($=Nl_YGX8XeJEpo&6MKZx_h9e+0uEgva3lC$#Od(dMZ$46ci9V{@U;d zDAwCZ)jm$&#!$+m#6n14QnB6=(Foetd<|!Lkl2*+CcAVAvsWBAD}5E?|Zvn3%DffcXy{Ng};Xtl>8KvZ^St8 zV~8$(cWJQRDtrhK0nsL=I!3%9Akv-z>MWa@(Hq@f;4d`}TfL$>7l~k+ z44P`kaG4-rFd0e6zo^+(`CSr^+AtO6HITF7V*Ap+OX5=v?=>v^@_k?^LLSF z|FBMW^#a5bdkQLgJipG+{P97s%gBZ7Amscf1Dx-2idL!x-kQ}%H4W!3HY=@&PM&c_ z`j`Wu98M5UU|>|qu*B?kAw4VRB;RHjA~Ti@faQ1i?Yh4Gt$V}l$@3vYTY(OjsEg8M z60fLaKto))0Q&{_@WI1aD) z#w}Se$nO~g>`Ql#^81NJ2Dg>+sn2()3QOVs_@iwph(LCU_k|%UwYpd~w?yV1KR7;o z`oIJ_P&VIMQoc|9c=sy-=7k@>3Fgy&$R zVYOc*5m{`-SrbNL!#^cp_+7E7zn%$YFU4^=@3+Ia_3xm^lX8(|vNBA&uX{oR44&^+ zO7wXex_+hlC!qcf&*HE*0@Q*e(5A{b`=T}vnOtB?u%K;gNVBt?zE5n2gGakZDi3)= za_x&XEK%(A@R~gwW3pXL&e+++xJ-`Q{n#~1R0Hb)g(VzqL(#TU9gzUOAcY+a)&l1^ zb3y^)h4qG`{_SU(Vx<24Z8-5}cZDkq99%E9HC1>WLY9tbR8-#L%{G-Cyf8o*N>w9$@t2aSgc z2Cc24k)!mM3CY31r^p`aj*nMFxlV9gqvB&nGh9OpsmZ_KnK5hT{i1{PWvX>_Hp-f} z6Eipjx6lv{C0{PFMNfm9TFQO>f)`rWb&NsYIIz9SwxT_6Up zTA~OFjOQc8Z#gKg|1;z%1JHhxmzHu>|0aBHBGOlFkM14Jn6DKYq>8Mld@zB1r(9sF z^77jf{ifLZWCt+#afY+QKOp*kNNj3Rr-nc6GfsrE0SJl$|B^yMyY)q*L<+FB-+1X=~u;Xla03+J7IB>l#$ zIg+}KiQltQy>m4x@&KsXo5`t}LtfA&NQOvI#yS;%;oT^zoz^};893vrJu#kdpGe+h z&OhVFRhwu5K^(ejJn7Cca{hY_{4K~o-@VrMo#AGQPf5AB4+SgKXWegl_$Mu#Gu~Y* z4Pn8~jbaPupxOQSJm7MzZo#KJQ=u=BVx^8-<;jQYtRGHYY`61wot3lkT_DA~tKvdd zuTtxayj<$S#k(rzC%8TisO*tzVRmSUR3ySdOmt?|zWI7jg7IR?_iE61TF6D|(fRF81 zlq>d)Pw*DFdmtEF0L|uzUV@^q`~0v+MT};??{B^?$7|qy^6&JtnS_0VqdSSn zS`3-5U|kO!{~)Tp`EJB_J0bLA@7EywM_WNT&p$cek3ATzcLj1xB`c+t5= zzSlnvYQV8T3WThxz?!2DA@?}!74u!hsT*!~2QCp{cJhAYTP~Owd=4bLRJc6Jcx2JG z-|h}JDTt4_jhM*S)M0dD8$H)|!bBFm!1yuq{^~i2k~1@_xOksL7QCI6d#xQ;-RIE? ziF8s3JY+{Y*-&OAbj>{fH391o!7gQ5d4X@_J-gBWc^jZ{0T5uko1~y9_Wye#C{7~y zMErqr0c*Y-09!I4gbrZ1t3>%{R9-X&qq4knzQG7JKu-^Tt=v@WDmlEVF#CjIX1;qV zoqKJb|JX|<$?qEhvjEc>%#;q=56;b!L$&}=;=@MR8KT^nN)V%OT zak(r5U{J`w8U1~o{jX-~_fhOKtur70+xWn;6XDybyvrnqPVMg(#shwb)2)PLI+Yj1 zOWX7LXuffcL%n!*W~yOBLnETNpK#?wzA5O3bF0J%Gk+kK(- zVbJjpBtR02DoM9V>US%*1ADRcKajf{6~u%EHwuH6?8WVHS_mTv7&+;qsh5J{(IDfa zpP|~lVxZyHledkDSm;?2BgH+bS&QhNcxTwocm}`8zKt~j zeTGr&d3}d|7PDQ+6cg&|Jnrgkh^S#qLhWi+XKjOweSm7ECzw!K5~$1sCxrqyo1l?j zpu&qQMPj80#jvZ~=1Fw0!7A0^xt_P~&_KWb{8W%lZdm_E)HS67?wbL#G0fy^2lUr! zeUSkoMAU!ILFX+f>BWg*$ z&RWp*Yaui$7%5hkWf5P<{e)K7ZSyD2A=ApXS9eu?jiY~ckA2>Y%bBQ80}xPJBMtSd zq%BtF3MXn{qA{mZUd}@mXSa$@s#fRsqd~~JM+lW%rb+qj^}t6lXdfr|F%#f;FV(*u zi$*v;l2NK|xfc-whkcr+g5SaCV-U%rv{XU^(J8kf6u}I(*5=mtjoCl)?x*-qbws|x z=!WIWe|}@E@aNTJr97!|N&SlBm}+LTaU4ZRCXRo=(to2bpg1ME@Nho;c=x(ygTE1cyH4%p#UPwZFn|+@U zFNcMSc1akCWIkggX2%AmFwy98>n7nIWj|7Fj9>s8B9(l403x}68gI6Aq3{o8G_x$t zI(zx!yrj~Mg)n^j3Oc1x?x_bfd=A@?OGi!w>R{0}p4#KGRW(>R2WM|W(3W~-6c7In z%1bQ3J7d?YiR2Afi_(t>WXu1iA5O4RVIZ(7L*j2l{wE`Gf*nN%07L27p3X|vqR%FT z!D8Ijx}=DL(v{`hvD7(!6t=X6U|k?j!Jq*=ryv9K)n0+d^CU2 zuzE};eDq9A(JN1(Lrapy^J#IqvnBZ`M^&6NPn^L^crK}QT4ONL))Pv}D(+%r2xL`P zK;3|hGafQ*wg;;O2{pN5hnK6xiBkx1Gc^*pbLS`B`H11|$$Ob+1;f5Mv2ANPu}`|y zMu_VD15sZ+fx&?7wPnl?TU~lWZtTeuCu%b|bw0})@g9q4)Z=gDEA;C16scysOmai_ z-2k;`$b_@aarv)}%D1gNh1fW}#12xnw zP|D!Vc44+BV;+3#o~`NoNXf_$=r}ByFX6jRgv!l`w{mZ-mG-jslcv)FnCR+4zE<(L z@qKdVPwSe){jKox3}fkN`_*3WaO^dJF*!r%bp(sZG)Yd9*1JWp92+{;Ny0VK#W-rP zd-03M;3R6M^&Wg6{w81$B~b=1_Z!9|(@P0U{W7?ibdW|T%n`L_a>b51HuP^qEQr?B zfESSS;w*-5OMMXJk+0w)BW*cH8S4jnC4HVYw5C@4vsL8u42-aC-N`#rkfQLZu0JE+ z;NE@juT5e+g~^TdV)H+rmfr z>wFeFp7ChzJ~ZjynHJnXNp!RLVR1qKhieukPD70z!cZ;okq0`f_Bj65#)%$m zr0Z#4BjTa=KWH-$TWeteItDxyPd!{Whs7Mxw8u*0+t1{3)*LYiQqFD7I83z0fn^lb zi83CYAC{?rlUE?oTI`>giTS*AK92;QW;f6QzqkpwT}ZwgYpn#P zFYjCPw!3H_N`oeL_*Y`DcWL*%51d6q$q)2XL{v;d zUhc9K4D?gx3qLPBKXO0@LLejHsI9$U8A30-s;Mw}uVG4${(BOzSBI0c>h7|XTjfO! zcwhKYSp*(>-NDyk7?o6%>s76wOTg<3Zo>Qk0b;Nus7CuoWBKoA#{w1@j!aCZ zA1PeQj}d8T-I2jr+8dNN4L!{~V44IEEH5$9le0wi)QI*U>sIngV}}%7#0BQsvF3o%ay5U6J$1u zXZcyyYTTD1fPza9R%VO8-LZ_h^>;5&!7RRe&iGSe8f4R1b_W=K;i%QUu71qgCALf%6zbY-@=k&8lh=0E+L#8^E&`*sZl@7%uxD0l!rcOE?ce zYnt7k@G8E#7Sy{rxdHt#*G6Go(KX*YkJ$80G{ZC`U*EoFwAf;1rZ}U!zQ)pRjP4&% z_xlnR95?anKP@WMHVi=E4Sx8U;0Rbu1O>XZCz7S#Is zqZ?U~UfotOatjd<=_kyAI?S<|hi9Usgmgr4kLE|go)CQ%BLzEw{wjU-U@%31R+MkB z26U-RkHgA=`=f(FI+fvfP)FVgw%_Y94C8YO_7e0iXcIVQ{4!2OV)j}jYqsB=-Pr^V zG^jsv7+?n;z&ZxC|AFW_Kqv=+P(sLNa>AB}3sk40ucQU7EA30BpIT~@lDdu0HHh&d z4!m`7Y)#o0ZEl2Gqr6c7aMx?e)aKdo?Y34zW-Z}qVG8Y5)n!NqadJSzlov>TsFGL`5e1mm9S>bz&c$1Zw~V2)94@ zw*doAkOg&9A#(&G%KgL0?VlSdC{C(aYb3VX=7BEV;jwQjy)V+crbT5%G`0<*;2H=s z1Ko$0^~%C@JKkdI$RcxPHWurs!EMFwv^N@R_R3Ahp5}oP459aZViF+Nq+w5lH|BS+ zy3J~PR~QwNCMnDIOJ?gB0LIzzVD*b3@#x>R-a0Q|xP7rtSQo?NSVIxrInWtDLPyW( z1p>L%tP4y=k}^D{d_LGfK`Qa?jSXVRj%zZH=j(HsaFw3{0>4wI#mw{$p6AIAm@Ych zAAGw-Pab^<--vh-$;;gaVs}7KGEbxAcc5YB{X}h37xs_NLYr}TBn70$v!j{|l%usS zsue+_!zaR48P0?iOE8$0jSXs~X}(7jvY|JLX&0bkyr6h_Q?OM;sh4H4QOYC^aqW!f z7<;_G-mBE%pO5`>wEw)h?oTig8uX3>~vUhk#SfK6m2=stUI>ncRL)4EKw*0 zePowfPEocwEjX%(Nt&|6h2e5$;INR<8N75z?=Q_T!BB{3$AcgGWuO720aI<^^t!Ql z;WI+Qz`8s)Y2DA*87HB3HLLf=t}+BXaV`Kci&Xfx&GXH^LuOm1oBXZxCBvGFj*W|C z_79a8fp!!A;u}wHkqqD%$%sr$Wx$|&tLZGNUGZX$i8ogk{!da5UzUq@aN{cq@Ni=; z!|*Eb4oN66Pw+1L(-9_~)XV(Sx~uIk2HXK-1R%98cKN!V`@h1LAP@p(c#u`*0(Wa` zYue(6B?;PD-^Tw9roUhmpIHU~26)6->iWk~BqS?6ILiB|Ko_Y{tF7pPV~3aGK8sh6;sigUY3tZwHxp8cWbhU=wyyofaz*k^Jo<12LjZPau0QCw zz`s6cgirV8wJYi0MlI~L(brBmcec#1lx+Nt>1udGCRc)5CoWr}{dZEJ#$p%&0gnyl zVGKbV%XV`Gi}}z9)K& zDw@Z4hq=zvp5XCqT3}^Yti(Il8)I=}3C1;RKAd)x;Lra3qvOk_p=xIxH(9~E-&yYW zsG}@ZCB}jLQ8*0suiQV*<7LNBnTfIhK0#0a7r3?b!H6wJp5P@cCjnA}-EX{L_i<5q z%)Q)C^0m^8TIj*e!>e5g;ZDE!?c(_k32rsm%C=a@en=#DCy01D)lpyz9 z(f|jg7y!1XCCIQ|0+`NJIh%BoV?z@I&pyskIxV1GvJRk@V*K_}1(9qs)O)RwUKv-f zDonq_rcFdz7}Fb(8;{LFMzJoaI2?Bb@|dLR2|X`L{o%D^p8b5};j<-aaokVmio7e& z@g!Sb_y?}OBP9+I^HH&`c zPLz{`(lUO6S2Kgg!Qak9Ti?7h$yxaESUAZT@xE`E@p6-)oE&ogK<4h6L#9T0iM%|0 z-Z>!L$lmx|v7ycSd0H%LUQj5AaN)ZIDlE8N*Xv!)WO%Sj02ro19`y%#STUhmYW78Txt_BoNCZk`R^cbvX}_gMw*R7a(#p{30|;ZK zXFZJyLMtF2<862QYCsvKZ0=k*W>7^GA4kYzG*H7OtqZz3_cAa~ADd)kP6`KEnt1n375+)_f{NwUcyKfbsWTu><9(Q%o9 zNac@X6BNT@!a+D(YvcH3vl`RDCjn+jx%>Sasr`0A0)3Kg1U96^8dkQfTu}S(+6MNF zG*;aoYAjeJ|F5#Q49hC&)`g|JF%>0 z72mzD{q1wE&wnmptvSb>qwZ0kf5d%W$~l(%YB=_x+l;5$V^sMAt)d~tTDMHn=n_iW zbo@_AvI&R3lR_k+mK2%s$ zhdwO#6H}w!_D78F{=J7Ua~Uyp&@HW!6Bpdm#&isyc?q^|ur~A>b}4%Zaiq(ztR7J@ ziF?OQUMoqQ34K{n15$nGk(H?OO!H_j=~v2hLwSjEB&F!L27X!~lF7ZZ(LymFh~+oB&r&HcHM~7Y zrE}S%rxF9cdPH^B=HPnX54(_-zmofW5bGrORvwG4TNS|`LC!8&)Ve8u48@P|u#Ch< zQG4QM?s{&L4@$y%?qZ+(q+aUrrS5ozl&@jTxq#IxHUbv3kL6#1_oT= znc2F8=2M3@Hm#;Ys9E*{diR~UL>J8k{ZNmqk{Q259v*-7A-a{hD*Nsz+sHyx9EP9D zN1?-b`eS?BUW&`GXVUyFOEpM(KGj4@2zIgb_ktMR!!AR&&@LCdzRn5)XA2KvyzxGzp)y*$A4CwXkd_{m}%8SBEGB0;7cql*nA z6wIz9yg+>r$bcfZ7-x>*VvH~0y|2GN*iVwH79(}+vveS`AlQ!N&ufj^)!T)mRVg;C zr}=gF2L@a1OhY~wKIGB>7BL&#{lKw<{_7FpRxT;n1K7orVHpNOUdqve4Ikd@l}DzU ze!-U>&4EfTg4pnjX#~um#{u$k?`EOxg^CnMw5ji!!KN8*RG^RzTrh8)VBzvQ(qPAA zpp=QZC4^`zt*AD{?F9uI$%hf9L&J!YPLV^jyC|OS{$o1VG{j!xdk1E4Sscpwc zsH@}svi5JCxL6P+94OW3uIA?UpGW#9)}&qXVO4AK$^8q=7zXCQNPMepDAVgHA_}Q= z>!jj8?!sij@2=u}^NRD?GXb_&;v#Qn{u&Y>_|#`=u7OdBP=N3T@2P{H^bi>+YvTlu z%OhNP-5myhEF0d}j9?2`mbF5pL%+7>M+CYgd>`<)-4`k>sG+tU8 zEWbC4kw-G2|CqFttr@`^zGf~lN->xc*4Jld7be7h`S>Yk=qTcw0-VqzDmCgo9=z@r z2ZDp_izzuh=+@p4ROSm*$D$v3-dR5T!PB|s)6Uy`dz9>Z&LfofrNetOFmCe9i___| zs8`}+^qYjXgfDX^g+l3yce($NLmA_ zy@H{s5H0yz5`t*3z{xcV0_Pykax9m`@`aG={hqe-AG5I|a=Pd&$=%(4u9)M5rgm(M zwCfF{NWA76>g*JJP_RliFVt_1yF6U$E!Eb=Eik-7?CIzm!aIxxgBg}J@ii}xM+`^9 zX=8Evn~3eIq}fj&-)Qw~A2C<>&?}-}u7w?vG443(-yTDSknQ>PO_#|3NF6ik5T0n- z!M94eC!<;vA~jR`*+zPOXHu(?#kv>&BR$khAY|OmYRP7MG+RuN;@BK43$n4m19Dq# zjNxoW-GcmO^3?rbMIkqGJDd_ZU&iLr39Z^h|;D=++U z*xF93piw{ip3BQ1BOvg)zurt~Pz)%hoho+vh9RXap9LU|GyKkWl?Q$!XsRB({4F0e zD0gx8UXORvO&V7fca~j}lj}k^b$utye$V?AQAlAayr@i1I7yZ02pB4{cC%N3c5c8; z{D<_ukcg1k4WA`ep3RH@AwJ-Bz`rfi#CrK|sLe9B$LQMOWtG>mr`emw7HQ%EyuNQJ zRCW-=@37>xK6Dd3(yl^EZpY-Zo0h0AWXB+9cz0Bv(jXIaBu1R+p~-o_G4E^Rbg4rc z%je#fQOY>(F`Sf)A}DXinx2%jn(Pu@7A?PtWvr7CB~6Z_IA9R;xI6R(=B6t{;Y=8_ zo+eEV^(@>s>K}y{nK7w`^�+>%Uh@8QcPy>$BN1eNP<69Sj-n=|aGi7`_;tN>t*d z`U)7MSXyoREc$mdcIu}m^I7QbaV<0ygU`n=nbK*(AGY&wAbWLr?Nu{i+FH?RE1C=w z7B|iYd)d2)iLp zEOoSd%oF-$g{pu}C@7Uh`gOdWT^9=*^;7UoNA4IDqc1*&%mP^etf79FcrV=reNohj z;m^^S0ytH*NXt32TrI(1JD1DOO9B^|1G+?skyf2sJk-#5IossomOsE~)|mMbmLOdS z^oJYuXNG;F2`Ge0$e*dGB(U+RefgdQGx4L z{t9#?qHRp*>HO7IFWw;PE_Eeercn3MV&3a=L7mMw-_=9WJ76@z;cMf|xP1h%u`2%j z9Z+vviP8^=8#=Evky19+AWE+U?aBJQPG~~S79>kmuW&yoI5sa8;tIIToIhd(lq9@e z;SHJ|awB}w&nH;1E>nY!qI`AMQtPvXP2PLT(sRz-OAkraBDzhil;Rzm-;w7<%pGQ# zOt`zfOxl02zqZJFR%|F$b-a9=nd=mxs$OTvlY-*KqVB>iL02-93~kn}W^P?;(~PRz zq8E0s1`8b?_jobsJwIBEp{vWqhhC|{W+0k2*B&Vr2s=0%W_Cl>Six*`#9_QKPfhc2C>TJph-?UFSHEecE)xF%uKY-Mu=+r*L zzWJnc($@ets_u2=Icmso@Cd7mclI3I|IK2uc;lc;>W`lXKrW5GGV8^|PIEnR6jJCo zIBLHzS0JA5J$z;x(3X$oVe(koWp?bmRYAld%6{b_XIOlb$|Zb$NiqTBnA}x=G_*#U z%xa2(o{c{-3j)mzWA!|LWI6iXccrrP^TM%azf}fL;y7h~dbr8wOgQ)P%pYh`-wqLM z^m4luR9ji*Gqi=|E(NM;cWI@y@Ts+lT@bkMbxJ>+)8s$i(H2j&huUXe}Sl#)0kCLKx%GPFEwWiCu@r)lu&XH1AZj$>$|-I_X*5 zqc8+pf_xZ!n_m8OtEOehoP%rZ`|e!s;qhw6NooyQE<2tyJ{Q!PJP_8AOlD2P@$y;m6UHyD~!^8+*agf z;{CAuRwD85AqfFQ_6$kt3mDXp>?X7`WLsWLGX?_b;R@6vNc}le=q@6v9Q4Kkox(kC@?9*5cnVOPOqfzWG8;cFKro* zS;X`}rBb}ibJ*v+z!MKufuZ%u5dKb3(OsWTqQ9K;%7ki$jCEp_o=LUz1pP3k{pWXu z+V&pn)UjquE>8|?ugU`!Ny#=txgZ74pyK|7(0K{DhfT!0K^r4sn721!f$El48VVu_C)z zAOdT`>e$f(-*MLvhIFZ&22C*I1?w5UKpGRZCtW7IyXA>Mi(YyFubN&2pm{nTbUf@l zLK1}?A9gTREU-Lz1lQ{!KCXW=N`B= z$sm>D-f|AHD&aO6A{x>SsxZLVU~7GoM#@3M|7H7&4`pu*R0HHBE(d&}2DrMj@*r_o6wQ_eg8%p`BWOtia5 z5v_uDJ(cT&*BY@LGMGW!N@=yFbz_Vqohvrp9j`4-*EZ|qAPekvW7cLG4;=dRrPJqZ zB=>qr0-NgJCMPm7X{Xn{pdit%K0t3oQEsRhIWET6-og z->s~~gwT>mX%D&N&Dm*)o{Khf(V}U3*X4(kugzM(t;-?H$iXIUo~MKcUb)r~+|!V! z(o9F3gn}Y@zhbKxBDFwDVv~Lc6=9pCqt<yH@YEAo=3Oi;lOi z4Jb3~^~=YLSBCA$$MXo+8RfRrv>oCOCpk-C@N-q|x-)s(;kQW4>#I}+N?k26-g}f1 z*@Fx*@Rh{6<4i(CsNX1=pD6e_9q#LsmgEb|X zG1uF&ueNj6Uqy0b$M@#%u9%;^gl^_oH5vNyBbtY4KdHPwM2y#jNE!s@Q6#Q>|GFeP zqLzsP(@G#32qP+_XUA1WKNmz8f>x!35E>mi{BoN#hA|@6!U#n~S>=x3i$0Q8w^Z|# zR`TJ9*i$m7gkd$3P?e8PLRB))59ceBr=NAXY@SJa&@0e_iUn^7;u-@8WUCa};ud%`Fy}FgTt?L*4$Z%flO`7SLq}Y%?Z~yF2BDClhWxcS6`#ezaFclaVzpYR z!7~+nBs#1kMD1-+&Mp9hJmTS$VoeCxYWVW`RP8Iy+O}zgc^b+R+4j&V&V_I0XE+a) zUrjVp7t7BBH)?Q}U(rOJX z2dS-L(H1k{pwNqwNn`HRd{B<*%)KNdmj@-HiB*cFrUx8Sm-R;82InXg5c?4b;r^=M z-dM)`WA6E}QM6$Zn{0kw75{7Ebu%9gGPmjjs|jtXW;^hyRTxddl}INvvsY9yakq+msQP@E&KWFd=u3`1;H`2X7_Xd{;m-iw`NJt z=)X3ZCd`TEN;^LB=kv+croWo)vv3v=@7*5%j70v{U3T~O`OvK9TN_uDJF;P_V;3(p zD9;?3!p?LUwP>W#637zdw<1jT+&UsPN!6HDu@6nP1hpeHFDKN} zQcK;8M=HtR%@}Bzf5;wuhO#n9pUx0%l!DRbK%-4 zvn$immWe>Ll>(>L>?c2=_q9?JJ1k*a64o)KnNTOGA>*gz_oh{q(=WD1fP#avuVX+_ z%eG_tUMNizIB5CT`Dzu`<>0?UD8JH!BL>^mz+=UHXyfc*pzET+ZQXw1Zgf`(*QLb3 zH!%YqI5z{aO}Hc<WUMHQ4 zFxEM4=lD0yIg`M#E%+gco7|`I_yF-XL-=`@B`@yddxLtkJlc#(nKJ*L(vV4KyKu^G zBKp3b`a)M%EBW=%gk%}U;%h9$Zro9odG;!cuEyVSm14T0)R6{V&@VI;9vPSA z*`8WO_hCs(PmV`#JJx!K($%}u%RXws8;EHgCq`^0-9YDxGkAAyHC0YS3d}5(Q>J00 zD&yi03^7E!0S_H=4aAmrbPR<26pEu9>cVu>(Vk!!AqyI&Mw5|BJ}ne2WEhnfsaZPP z*ukW2!vPk|GTYsBF=h_@^QcwNUrO(>7m*0w9f^rw)l?qvQlO(?VO@ zDd#4;X{7CmCIP|wb>(^2wJ4ZWOpkvX%ZJ82qETkXp$2>WV1euAH^|h83{3IqxLT=L z?kp%U*g`_eesu}D?W)P?xz16tA?M`8Cd$}H)yuI*7n?#*YUEfIm2<2bsjVSV#NMto z&WmWYO!(o~f6Coti*{h)Os%YuaDkI>3TSGk=Y>G~G7FUk$bxC&CbPL9g>4ClQ%9w? zw0%RrnLb?7xe&tE$JMAUA!Q24C=#o%)c4;Ikb-3cdg%S}C`aFLJw{LC^M|RIVDohW zZ}}-zuKN#O%<@F6G;_Q5)Nxb&E4~adj@+BoTfGIS(51z8}UE*b*Ix4Ln-6f{!k39)E^bx07GAi=s{IPOYE$xEI364N~T z3rjamYr$@{?=i|vPG|F_h!!=mQ|7lXGn@PO-@_9+H?zWdP;(`tM1c&5i2WIU^ndD@ zB35n89#F@`9>jmmY(*v*BG*>aR5RBYY-$Wi7V0^CLE&uE~h_-Ykx zfIlo>(|fc?e9QnMws3K&Uv1{M!2>DC@6NWZlDK~E?xA#v6@;o#=yaPZ`t31cvc-|gJ zmi{_{_4F|g-ru&=^(KiC9EWmFKsvUzpeK<6sX9eKme`FQ58TsjtClPvCTI}UaF-t1 z!lHWDp{4V=lxMx+w+0xc3I1&72OJ+xS-?$=JrQE98-pJ;CP$qm>3?O3%gJC>4}q zdheec7@BlQWY_rN>7XxvEr9q}en7<9aPjug$o6sT=pnblaAc4^yEcfkJHcxN!Sx5> zmFpy(quYIdmVCJtPEKSMi&>WneVsOBHEG3n^Pt5-?LzH?v#}!=aGZ17aiI2%J&`XO z_lVkvs3)nHrMX}D%I7PrYP$2zc+jDmgx|X0-y^Um1L^Y)BU*=ju%wzcf4mxSy_puZ9=slmR`{mS zne;=b-TzXstuKxO12gw-HcJss-}DLW8%TQwMQn0Fxfb}>Mllf+u9#knlOk@fW7LX0 z?|juXYlRN9^QzD5f2_KqXEz_kjYwi_PiJ;P;Y}P_3y>`HQ!PXJ`8CI>vT@(`raF6) zzG7z7ZBm`Z5kSH25r6okPJNgUqGnaZ*sd+7Y3+`)$uBr`B~IU6ITQ9$%XtZ+{*g-FDx_ z`zqUZ$O&N9b5`RQk|&P zXKwB7$-WcNCUIHbNfN?UOiE(Zg^1QFo1g8uWp1$bX6p7ehDPW#I#!e7^@B@Y?jRIe zj${Arh`^ zKkR+%2Y^CSX4%RojRW8WNPWwlIC`FbYCX{+KbWlTZX<}6qiAN7oLef|oJ@<>t2Gh~`mR+*wj}`ToVvzW7&L4^Z3-v)tydf@wJ+Ey_0M ze_TJ%2M|^)&f}!>3BpVHBXXfNQ!lmPyzjfYc#(+wDXfQUAsncqrXV9*>0t7deTtsI zU{8+e3o`V#`N~XyNQ)nUE09dFZ zd{JAF8XUR*nHMB`s}j43!y2bKS>AQr42-xOX_5TC%VE$$rQ|mKadzgagP&0Q3!Jj< zBQsD03VZ#n>feDu6#Q@-TSf7fS$jl!;<|91HZ%6sFzSr9O_Wqy`&*Hw>0Qda_d>|l z!>uH8Zx!3!mKg*OII%)Fy&{04#<)eh3#7B&1zEJ5Kqk;GB1h1p^cVHgd!jlwd=oR8 z68o$wPq``>8@_%YVt3eli9L{-4rb?g4hR6Mp5xF9)qXXwgRPQt07uT=S7{nwtBkzk z>2*Z@JtO#I5p`Ddc&9$o{C8+I$8UIg2a7=~ogqg3l^QcbCNCo&A}p;xdGc0SW4>E_ z2@*KikHn%^1qblS1aMIQh9a|suQByyN=`0QP9p!Zor(N1FaQYL?E1pH6)j263Fb@^ z>fvS|zF4(55@-aHV>*&?_3O(>`0{Mc(N zIx`l3Ax@uBha5Cy!v%{e6)kpubB=Xu4^GtaJ0Y#KoMsx*;AP(Sh?Gr8PJh?A5yl}= zb>LrSL4zi^HQc^A0OH7c1Mw062Ht2i!GG(b@o32@2B==U`3^3&8p;$RS=yhA*mWuw zEz{Z+Zc%%@UbEr8-$FP$oI~@vIWxcxM}oLcegf%yg>`Amm|CLz)&D32u&J30)P6m< zGw3$qRwvE?z%G1DZ$MXM? zTX{zwRh6-37TTMyVvw1d4(MtT@f66;+T%W42LP|clR;=)-K4uLNo3E^J&!8Dm@QPV;2KH%`@jNbT_O*t zl!tp*=jcyP#?7NDSg$P_9oa#4H#_H@A>y1-whE1k606Df#L2F0w6YCj{;11imgfYC zBq`e)%&~{GKS1DRF7aaCID}9?L``Z5pMfpWi=Vl1W&J;T?xtz$z z`@_dfePRSLFlm}mz<0T9X3c0%-h!~ITW!OanXdwD#WRtOO?i- zDQM4ewRyj)6XC%`F|l919>CWL@!<}ouV|{~A3sj}%K;!710ab^<_czc<*#Z5(Ig84 z-6-rV17NT07BBqw729;_qVV%^?Rtwff<7j`NUP0n+q=ZJJ**yM6a&$PggO;=H_&lR zzM>Y?t0s$O)+r+SV>(wr0_~)_sFkrrQ+L$(B|edll^m1494wxxV0d5CurDpc6D?~) zC5sT3Q?6=enZSLKAs*iz*%L*OBtbm<>FF}RVamGGvZ2l7FOYhY%iYhnf7a4Z4QnIr zWf+kO*|}{M^N=CR+fna@eUXB4sk<3$Pj6%+3gdV^ae&@!5>Shhi=+Q5xrzam06Bb) zR@l#;p7aMbDiJ?)rh+!c8DW&+WZGng?tA}rrcBI&@sDxu_)yZ-?`cL9%7c;3zqqsB zh8=HD6k*b-6obaId2pZ9I4Bmd8IK+zp8jtlnFWkNcQrYqPo6ab$$Q=zsc$kK8gqoT zN#%1v0TGT)rUOUDK}H?W)T9Kyzi!O{ki2O{{bmf1#?_wR()hsA;x)GGQ9GR7cEsVz zy`0;5FvENq=bnCTn2MuGeZNXn5uPbj5z)ONM;0w7-FA3ePFgwhZ1g7=G|9$9>(Q?^ zOF78xUQdUcC9DXXuK)8YsHY`Jlx$ytR6Qtgxs0ZEn-SOmP>h3diXG3Eo zn=s==VEbR{;F+8Vh)$98qtiBg7$z30qvBI65Gz5GOOHNXVfV&*NNa^tK5&N+%kaWj z6SupHtsvxi^u5b?I%`D6wk0$Av%!&%1%KElUe1rcydDy1bEMb7E2D#Np=Y^dj6@^} z>&79D=ck-q+!5ZrAD`YxIG=vAx573WC=tU!|2rsXAlDye48Gp%`RBgsejL4hB3jJ>x)LPs7N0eB6CscRW+#IXBSD@SETXi{vj4IAWc0y;NqyzPgz>TpgIW zo4$y;gna5W!`d8yM+(`&PeuR<*Ll2$hJxeo)t7>w=Ya-pOAGY6MMnt9ZutG- z0kXTHJx6+X3e^X3S~y96R8T&uA1~3TBJPAl=!*6b_$qf+!gkbjv7kd;oq$;)J<-Pl zuS#H;Fv|=^K2AdC?{rt-g2Wa8Sz_z`9n?=02W+L*#|J*3S^!0Cl7^opo7tX;D|qAW zoi0flCmearyDlk8;exS{4Q>fMb~){dfj1`Y=-HkJJU+9>&Rb(M)ow45VdI7a|HyB9 zgqeNknubQkU~f*O2bpi$b4;G3OPD!Mtf4P^_3DedhzFm^=2IwxR22f~M4`k;om93R z)WS~ox$Eqi6Qe%`m}a`e3b>yw-^zqF@A9+!;lZp`cmQq|d#PG;ieOCrk=C_*>-2Kv zU%i83Rt=jI+Ht&vd_ia>nSt)FFk=Jgek3vm3w9)@b;FdyWO4JH7a)TLyt+^W`4;uLHQ!psqG-dK#8K0Ey@7_B|f>G`)wMp5v%WLZsu248 z3&BmvF3RR?6YAKg*tcUoX5PK9cuxcOESyawT?9^9)L37lyFdO#-%mW6_IRqDRVLkZ zSre@F9M#RF-Yh4`@2OnO1Lh7S;LTu3E-!i;2NQvdI56e+onsFT5>u z4%$8X_2dHpsfX00YGoIPOC$u-<-Ju=LaPCdQk}JW*ZwL>?6ncILo5jCBN-L{+y zU*E-)d`|1`5JK=O_Wf(AH@mF$=fvV&Qb7gsAzDG1`S05&>X=to>WHfBH)OyT+clK^ z-+TeEgCGgW_;8HWf1!&kW9Z_yMgBnK)8HgIO#Qkeb%s};c*0bGEHknxUHXk=xJKutQ#($SRXpjX3W8sTFBov(|*Jgj9YWOoZjMHaV_^K;B8qmG#}s zVF94`Ic(gU%6c`o8SPKf@;tB}^6&H~v*q*Dk)`;)9N@?nF5#$XzXN0?5g=>=km3L1 zWB84ex8-bn-bh&He^O91*btc`A>VVPFH10~v%DUM3m+Y|Tpii8(Qh{GzO7U>qFY9b z$r@{`?|B#-Yv?;^8N}D}fl_*QJM*X%;KseWySix3)~SAbEZlmel$0=+g0@1E_bfQN zYu8##4}w4vCjv%TD4V2S6Kmjzu}4~^aYm5VMldTIB%Pe=f%zGsOz%myO}1o*2`-QQ z3#P_j)#w>8|48WzDS_EnV#WhSEb(Ps_sN2bw*wktMK?HX8Fm*ZT#XO}#LgU~RHiA( z%cIVtDlv!|bA`po3Fnc~t@j=S0b)T9!eG}=1v)$ulSyJp*%AwqfcawCx7GeTsV3gV z4*$rvoT8<0MaC+lK z@82@UPVFUX#Up*C&$0be5CE_R2)+tjx^XoBfUz3p!2O#rV3Ce);n&wE-E_4Yapig~ zHPdPfm*|uReP}bKNJ6DZ(W%cVf@9jIaf_EGqYylZ^KJ z(=O=bbln$B0y=+TppVk=b#;_tI>^r|C_j;&QPy|zz0$VIm7Mo_8+nhc%smoQIspcP zk^zFVSrgse#W0R*^Ys_A>1Fv+oiEtP&Y*|$RpKXlf?5H1r`u+j;z_V8hC_qLUjSg^ z@`j%nOY4Xw7=vWTdx#xT)V&K2jSAG$e#ZAHG4RVLQ&P2e+7=GiX_bv^SzNFq(=GNh zX>CN`c+>5bPG6^EUV<$NMO_$KD$Jf3qLB04EjR%QuRx4Xe}$r zCgR~B5@dn^=*6J(2Bkh%o0u$cMHsu)jA9YNZ~Hk*7~KyDz$0nA+UdKY(x@u%v>B7chb$@p z@xjj0K+V}ZEo*2Y)>OGGm2`sC1#peOirQS<$Au;6EVfNMaO%%?P=d#a<>ZKF23L(@ zt^rQNAEQb!3mu4bFt(t>nX3J}Ac`r_>jQ8abA|xqe02Y={fr7Ku3=AIJ-?6(Pd_q7 zJb#+*U`7DKZR@>3>U{5pizuv8e9CZc$6fXh7K@3(O6?cQyqtgRej7-OT71A#Y+EIJ znT`0oVk&IXMT3~Hx;a|(rR%+JUihSMzoAN&HW7^)0_+gT@2HD((PHov{?FWx$!M5Y1mKJEG0EMCMG64Due4Glqctgk>^RD zx|f+d^yqV>OdP zLq=dTc09ZcvAew*4$s}Vy0`tzr`SA@FdABcl&W>7tuVqLVU)@Xap;g132u{J}t{%nTmK~r@gvv< zNx8XmxG_EPFDSLGqV*wsjQqQb@j3Lo&@t;(34VvYRqHfd!FPySH7t0yt4W^GaPoTC zFG|O*_9}f%b-71NRTV2e1U7Gf4MzPTi=!W-hhXO&%;}ihbyik@vFSUAoVOo!ZO}z5 z+cum&DjXN-+>$Q)L`Hg4{2DA>=Au-&1rcFWWw?Ns-hFocPbF ziTY$Y2}@uWYJGiA+N~1f!Dr;&*go^vLuHoMAd?#uD89Hue|R<7DaJ8Jz~pZO?sW4j>ZIBXj;I?n;pW5^DIs{6WOQOP0|l<>Mnj z!e(e|3OYT`d^M75(YyEBQU2#ILRqs>lGG_{Veo_nM<#x5@It~#ZO^uq&JJ#IVZ8*9 zbfa3u6*Ll7dp22-VsCC=$)<5*OzY`YAHJdlP~@lBv0^z)eMhc#YZE`ulaQ5>X)|V9 z*(u2ExtX*)?%lPi%38n$!rO@xjz;+418Nii01j-J3ve8-? zs+6Z2RJd7;2=W)t`FX$Y`T|ZH>x`0N1uWV>ioZetf}^kcPwSsfC7#a@h&&i>4t+}I zwkH%MWPzH4V+!OwUs|o{w(Hn6rf#{i#RMiDst|^(vHs?ZWgkc=Smd@{^N6h4oA8D8 zUp;!P$B7Tpl?0Vux6Z#a;mz2)1<{CO|3O^wHGuY}yhl8``Y)da+5#Az7nIoPt*Kre zrjM+Q{z@NpkJvJrPKi4-0`mD|OXU9)`(#}~8v;Gw4QFhBB_A175l!5`=1p`=4uu+Q z>DrAEY6pg58gQmY>|gySVhWp26#wchn$ z1q$oAl}cicy;S4+H&$ko#VYDCo$bFB3aO1BP=>jBl#xjWg|T8~kJXP8fMfKkmFs9A z3&V8}NS(UgND4WPB~1PIfp`RPxn}KNXzF8-E;ta3m zTQ==fnNEn7O*0lt#B&jo_WWcYENV0o7%tORZRY_)n@Jn#KY8BOC>qe9P?kHN0> zh^W^@^uE^DY+xjNEClx7vN*7<;O7GaD6RWjbZ&c~7uV|Quuu5X)BOgdXrN--+Oa-B z)?_wox^L00gwtp55i@zGrK&}V2aE{j;YlFbMU{<&d~uZ2I~XZ^-I~obB;YJPxgC?>y#swQURU7fm&(3s{q(YeHx! zB)`pn`qC5-o4bt7ScT=Q@WX6uJvWZSIN7GzcQgkUKOq52r@sX0Pe{=3IW~9*&Z?7=`ofl+ zS(@RFq@Y~FudbWk#h(1C2o}?u)MQe~+0y=aH0;d$zt$+YZizv&+_zKiiOh;wdEoHg zF`%yW*QUPL7nz7nG=G6uEv8<*WcKN3XTE4pal{5PM7x3L4Vk6?pSYv&4k)&pT`CGc zsN&KqVpC@>=b$-Cv2111*3@L}Xp_XwcJ1rcUWgv6_b+bnND;PY!%vYR@a51Zt;pFx zc7=8^`Y&8(2P2l>L~KaVNN+SsWnvxkkq z5(>V|S9_A|@jpRXfMIog`$fcT1~C2^)&I`mAML>}e+Nbs@X|v5#(95p+W-7bfR~Y7 z0~h1}xo!Wp_Fr}hIA24+uYq22qdnpG|MN}1rPDTW@!^|kpHfo)myZI0EFhWboh|X- zq`m*|ZwmX3BC#xExGP6XKau;tt?B8ngjtcaK}P@{b9C+5&5!c`cqs%TG)^olGTvZ) zr4Hzb1wRT%J;J$IGx~RkPp|#&J5*eSWD6!U!o#VHfFvFp8v`)m|G$3))KK!KqcSD! zb+r5oPyhFi{O8j$vcf$~#>iqlY)n=-F#N_Lz{K139mkHfW9^yDnE(69X9-s!^(6;I z>h$4C>N1Y_hNzZEB+#iW+j7^BQ!sM~{y&Zo0QnM#*xr#D;jjhAsVQ%SCQid%r$r{_ z<>$jbOzxfgiJTOBW-L8;J|X`9+u?vD+O|$buxXMw_>A#Oy1KgBTCbx%;~sH;Rd#lE z*8db5nbjwBLi#(w`ac}?KaQA`5YqlQs9hiajuk)3ZR%J3Q9TTzt9Csm$&4h8*h hUj#Vgv+nXEgxV*(8WXHRk7vNYR}%8#<)Zrj{|A+>yBq)j literal 0 HcmV?d00001 diff --git a/keyboards/redox/keymaps/nrichers/readme.md b/keyboards/redox/keymaps/nrichers/readme.md new file mode 100755 index 000000000000..6189e8e9b26b --- /dev/null +++ b/keyboards/redox/keymaps/nrichers/readme.md @@ -0,0 +1,28 @@ +# A tweaked keymap for Redox + +This keymap modifies the [default keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/redox) for the awesome [Redox keyboard](https://github.com/mattdibi/redox-keyboard) designed by Mattia Dal Ben. + +![Modified Redox keymap](https://github.com/nrichers/qmk_firmware/blob/master/keyboards/redox/keymaps/nrichers/keymap.png) + +## Changes to the default keymap ![#99fcbe](https://placehold.it/15/99fcbe/000000?text=+) + +These keymap changes are meant to improve the usability of the layout in everyday use: + +- Move `GUI` (`SUPER`) key to where default left `CTRL` and right `ALT` are - gives you two frequently used `CMD` keys on macOS where my brain expects them +- Move `/?` into usual location next to right `SHIFT` - the default flash from Falbatech put `\|` here (might not be the Redox default?), which felt unintuitive +- Put `\|` into bottom-left spot where `GUI` (`SUPER`) was - had to go somewhere and this bottom-left placement sort of balances with the almost bottom-right `/?` +- Change default `ESC` into `ESC` on tap, `CTRL` on hold - Love the UNIX-ey `CTRL` key location and wanted to keep `ESC` in the original position +- Change default `'` above right `SHIFT` into `'` on tap, `CTRL` on hold - Love the UNIX-ey CTRL key location, but it can give you 'left claw hand', which a second, mirrored `CTRL` key fixes +- Add `F11` and `F12` keys to two layers - needed on macOS if you want to control volume up and down from your keyboard (not shown, on a different layer) +- On thumb clusters: + - Left: Move `SPACE` closest to left thumb and move `BACKSPACE` to the right of that - put the key for 'getting it right' closest to your thumb and reduce usage of my right hand (purely personal preference) + - Right: Move `ENTER` closest to right thumb and move `DEL` to the left of that - put the key for 'getting it right' closest to your thumb + +## Changes to the Redox layout ![#99e6fc](https://placehold.it/15/99e6fc/000000?text=+) + +These are physical keycap changes on the board that make reaching the `Layer 1` keys easier and that, subjectively, look more balanced visually: + +- Increase the `Layer 1` key sizes from 1U to 1.25U +- Decrease the 1.5 U key size for `[` and `]` to 1.25U + +You could even make `[` and `]` 1U so that you can use keycaps from a standard ANSI key set and also increase the size of the `Layer 2` keys to 1.5U. diff --git a/keyboards/zen/keymaps/xyverz/rules.mk b/keyboards/redox/keymaps/nrichers/rules.mk old mode 100644 new mode 100755 similarity index 50% rename from keyboards/zen/keymaps/xyverz/rules.mk rename to keyboards/redox/keymaps/nrichers/rules.mk index 73142a16803a..a81250cdf6d9 --- a/keyboards/zen/keymaps/xyverz/rules.mk +++ b/keyboards/redox/keymaps/nrichers/rules.mk @@ -1,3 +1,2 @@ RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = yes diff --git a/keyboards/rgbkb/sol/common/glcdfont.c b/keyboards/rgbkb/sol/common/glcdfont.c new file mode 100644 index 000000000000..f772e31811b6 --- /dev/null +++ b/keyboards/rgbkb/sol/common/glcdfont.c @@ -0,0 +1,240 @@ +#pragma once + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Helidox 8x6 font with RGBKB SOL Logo +// Online editor: http://teripom.x0.com/ + +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, + 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, 0xA4, 0xA4, 0x9C, 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, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 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, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x0C, 0x90, + 0xB0, 0xE0, 0x72, 0x31, 0x9B, 0xDE, + 0xCE, 0xEC, 0xEE, 0xE9, 0xE9, 0xEC, + 0xCF, 0xDA, 0x99, 0x3E, 0x62, 0xE4, + 0xC4, 0x70, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0xC0, 0xC0, 0x80, 0x80, 0x02, 0x85, + 0x85, 0x87, 0x85, 0x89, 0x89, 0x92, + 0xEA, 0xC6, 0xC4, 0x48, 0x50, 0x60, + 0x40, 0x40, 0x40, 0x40, 0xC0, 0xE0, + 0x50, 0x28, 0x10, 0x10, 0x60, 0xC0, + 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, + 0x80, 0x80, 0x80, 0xE0, 0xF8, 0xFC, + 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0xE0, 0xEC, 0xDF, + 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7F, 0x80, 0x80, + 0x80, 0x70, 0x0F, 0x00, 0x00, 0x80, + 0x7F, 0x00, 0x00, 0x7F, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x7F, + 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x21, 0x33, 0x3B, 0x7B, + 0xFF, 0x00, 0x7C, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x01, + 0xFF, 0xDE, 0x8C, 0x04, 0x0C, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x7F, 0x80, + 0x80, 0xBE, 0xBE, 0x80, 0x80, 0x80, + 0xC1, 0xFF, 0x80, 0x04, 0x32, 0x5E, + 0x1C, 0x3D, 0x26, 0x10, 0xC1, 0xFF, + 0x3E, 0x00, 0x00, 0x08, 0x36, 0xC1, + 0x08, 0x08, 0x14, 0x77, 0x94, 0x94, + 0x94, 0xF7, 0x94, 0xF7, 0x9C, 0x9C, + 0xFF, 0xFF, 0x1E, 0x00, 0x00, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, + 0x40, 0x7C, 0x3F, 0x3F, 0x23, 0x01, + 0x23, 0x3F, 0x37, 0x6C, 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, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x02, 0x06, + 0x4D, 0x4F, 0x8C, 0xF9, 0x73, 0x37, + 0x27, 0x2F, 0x2F, 0xAF, 0xEF, 0x6F, + 0x77, 0x17, 0x33, 0x79, 0xCC, 0x1F, + 0x31, 0x20, 0x21, 0x02, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0xE0, + 0xA0, 0xA0, 0xD0, 0x90, 0x48, 0x48, + 0x25, 0x2B, 0x11, 0x09, 0x05, 0x03, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x03, 0x02, 0x04, 0x03, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, + 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/rgbkb/sol/config.h b/keyboards/rgbkb/sol/config.h new file mode 100644 index 000000000000..a7317d9d9c68 --- /dev/null +++ b/keyboards/rgbkb/sol/config.h @@ -0,0 +1,92 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +#include "config_common.h" + +#define TAPPING_TERM 150 + +/* Select hand configuration */ +#define SOFT_SERIAL_PIN D3 +#define EE_HANDS + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, E6} + +// wiring of each half +#define MATRIX_COLS 7 +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7 } + +// Encoder support +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { D6 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B3 + +#ifdef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 40 +#elif RGBLIGHT_FULL_POWER + #define RGBLIGHT_LIMIT_VAL 255 +#else + #define RGBLIGHT_LIMIT_VAL 120 +#endif +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS RGBLIGHT_LIMIT_VAL + +#define LED_HITS_TO_REMEMBER 5 + +#define RGBLIGHT_ANIMATIONS + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for Helix keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 500 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* + * 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 diff --git a/keyboards/sol/keymaps/danielhklein/config.h b/keyboards/rgbkb/sol/keymaps/brianweyer/config.h similarity index 100% rename from keyboards/sol/keymaps/danielhklein/config.h rename to keyboards/rgbkb/sol/keymaps/brianweyer/config.h diff --git a/keyboards/sol/keymaps/brianweyer/keymap.c b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c old mode 100755 new mode 100644 similarity index 76% rename from keyboards/sol/keymaps/brianweyer/keymap.c rename to keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c index 2259e246d265..3ba52081d25d --- a/keyboards/sol/keymaps/brianweyer/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c @@ -3,9 +3,6 @@ #include "lufa.h" #include "split_util.h" #endif -#ifdef SSD1306OLED - #include "common/ssd1306.h" -#endif extern keymap_config_t keymap_config; @@ -14,8 +11,6 @@ extern keymap_config_t keymap_config; extern rgblight_config_t rgblight_config; #endif -extern uint8_t is_master; - // 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 @@ -62,8 +57,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------| LCTL, LALT, FN, LGUI, RGB_MOD, SPC, DEL, BSPC, SPC, ADJ, LGUI, FN, LALT, LCTL, //|--------+--------+--------+--------+--------+--+--------+--------| |--------+--+--------+--------+--------+--------+--------+--------| - VOLD, VOLU, SPC, ENT, ENT, SPC, DOWN, UP - // Rotary Left |--------+--------| |--------+-----------+ Rotary Right + SPC, ENT, ENT, SPC + // |--------+--------| |--------+-----------+ ), /* FN @@ -93,8 +88,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--+--------+--------| |--------+--+--------+--------+--------+--------+--------+--------| - VOLD, VOLU, _______, _______, _______, _______, UP, DOWN - // Rotary Left |--------+--------| |--------+-----------+ Rotary Right + _______, _______, _______, _______ + // |--------+--------| |--------+-----------+ ), /* ADJ @@ -125,8 +120,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ //|--------+--------+--------+--------+--------+--+--------+--------| |--------+--------+--+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______ \ - // Rotary Left |--------+--------| |--------+--------+ Rotary Right + _______, _______, _______, _______ \ + // |--------+--------| |--------+--------+ ) }; @@ -135,6 +130,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool TOG_STATUS = false; int RGB_current_mode; +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder*/ + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} +#endif + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { @@ -175,38 +188,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.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 +#ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; +#endif } -void matrix_scan_user(void) { - #ifdef SSD1306OLED - // led_test_init(); - iota_gfx_task(); // this is what updates the display continuously - #endif -} +// OLED Driver Logic +#ifdef OLED_DRIVER_ENABLE -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) + return OLED_ROTATION_180; // flip 180 for offhand + return rotation; +} -// hook point for 'led_test' keymap -// 'default' keymap's led_test_init() is empty function, do nothing -// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35); -__attribute__ ((weak)) -void led_test_init(void) {} +static void render_logo(void) { + static const char PROGMEM sol_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; -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; - } + oled_write_P(sol_logo, false); } //assign the right code to your layers for OLED display @@ -215,77 +218,52 @@ void matrix_update(struct CharacterMatrix *dest, #define L_ADJ (1<<_ADJ) #define L_ADJ_TRI (L_ADJ|L_FN) -static void render_logo(struct CharacterMatrix *matrix) { - - static char logo[]={ - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, - 0}; - matrix_write(matrix, logo); -} - - - -void render_status(struct CharacterMatrix *matrix) { - +static void render_status(void) { // Render to mode icon - static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; - if(keymap_config.swap_lalt_lgui==false){ - matrix_write(matrix, logo[0][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[0][1]); - }else{ - matrix_write(matrix, logo[1][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[1][1]); + static const char PROGMEM mode_logo[4][4] = { + {0x95,0x96,0x0a,0}, + {0xb5,0xb6,0x0a,0}, + {0x97,0x98,0x0a,0}, + {0xb7,0xb8,0x0a,0} }; + + if (keymap_config.swap_lalt_lgui != false) { + oled_write_P(mode_logo[0], false); + oled_write_P(mode_logo[1], false); + } else { + oled_write_P(mode_logo[2], false); + oled_write_P(mode_logo[3], false); } // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(matrix, PSTR("\nLayer: ")); - switch (layer_state) { - case L_BASE: - matrix_write_P(matrix, PSTR("Laser")); - break; - case L_FN: - matrix_write_P(matrix, PSTR("Function")); - break; - case L_ADJ: - case L_ADJ_TRI: - matrix_write_P(matrix, PSTR("Adjustment")); - break; - default: - matrix_write(matrix, buf); - } + + oled_write_P(PSTR("Layer: "), false); + switch (layer_state) { + case L_BASE: + oled_write_P(PSTR("Laser \n"), false); + break; + case L_FN: + oled_write_P(PSTR("Function \n"), false); + break; + case L_ADJ: + case L_ADJ_TRI: + oled_write_P(PSTR("Adjustment\n"), false); + break; + default: + oled_write_P(PSTR("Undefined \n"), false); + } // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1<display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } +static void render_logo(void) { + static const char PROGMEM sol_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(sol_logo, false); } //assign the right code to your layers for OLED display #define L_BASE 0 #define L_FN (1<<_FN) #define L_ADJ (1<<_ADJ) +#define L_ADJ_TRI (L_ADJ|L_FN) -static void render_logo(struct CharacterMatrix *matrix) { - - static char logo[]={ - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, - 0}; - matrix_write(matrix, logo); - //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); -} - - - -void render_status(struct CharacterMatrix *matrix) { - +static void render_status(void) { // Render to mode icon - static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; - if(keymap_config.swap_lalt_lgui==false){ - matrix_write(matrix, logo[0][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[0][1]); - }else{ - matrix_write(matrix, logo[1][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[1][1]); + static const char PROGMEM mode_logo[4][4] = { + {0x95,0x96,0x0a,0}, + {0xb5,0xb6,0x0a,0}, + {0x97,0x98,0x0a,0}, + {0xb7,0xb8,0x0a,0} }; + + if (keymap_config.swap_lalt_lgui != false) { + oled_write_P(mode_logo[0], false); + oled_write_P(mode_logo[1], false); + } else { + oled_write_P(mode_logo[2], false); + oled_write_P(mode_logo[3], false); } // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(matrix, PSTR("\nLayer: ")); - switch (layer_state) { - case L_BASE: - matrix_write_P(matrix, PSTR("Default")); - break; - case L_FN: - matrix_write_P(matrix, PSTR("FN")); - break; - case L_ADJ: - case L_ADJ_TRI: - matrix_write_P(matrix, PSTR("ADJ")); - break; - default: - matrix_write(matrix, buf); - } + oled_write_P(PSTR("Layer: "), false); + switch (layer_state) { + case L_BASE: + oled_write_P(PSTR("Default\n"), false); + break; + case L_FN: + oled_write_P(PSTR("FN \n"), false); + break; + case L_ADJ: + case L_ADJ_TRI: + oled_write_P(PSTR("ADJ \n"), false); + break; + default: + oled_write_P(PSTR("UNDEF \n"), false); + } // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1<. #pragma once -#define SSD1306OLED - // place overrides here diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c new file mode 100644 index 000000000000..ca73524822e7 --- /dev/null +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -0,0 +1,316 @@ +#include QMK_KEYBOARD_H + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +// 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 { + _QWERTY = 0, + _COLEMAK, + _FN, + _ADJ +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + FN, + ADJ, + BACKLIT, + RGBRST +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + + + +#define FN_ESC LT(_FN, KC_ESC) +#define FN_CAPS LT(_FN, KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty + * ,------------------------------------------------. ,------------------------------------------------. + * | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * |FN(CAPS)| A | S | D | F | G | ( | | ) | H | J | K | L | ; | ' | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * |Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | Space| DEL | | Enter| Space| + * `-------------' `-------------' + */ + [_QWERTY] = LAYOUT( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, 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_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, \ + KC_SPC, KC_DEL, KC_ENT, KC_SPC \ + ), + + /* Colemak + * ,------------------------------------------------. ,------------------------------------------------. + * | GESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Tab | Q | W | F | P | B | [ | | ] | J | L | U | Y | ; | \ | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * |FN(CAPS)| A | R | S | T | G | ( | | ) | K | N | E | I | O | ' | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * |Shift | Z | X | C | D | V | { | | } | M | H | , | . | / |Shift | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | Space| DEL | | Enter| Space| + * `-------------' `-------------' + */ + [_COLEMAK] = LAYOUT( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_LPRN, KC_RPRN, KC_K, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_LCBR, KC_RCBR, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, \ + KC_SPC, KC_DEL, KC_ENT, KC_SPC \ + ), + + /* FN + * ,------------------------------------------------. ,------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | PGDN | UP | PGUP | | | | | | | PGDN | UP | PGUP | PRINT| HOME | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | LEFT | DOWN | RIGHT| | | | | | | LEFT | DOWN | RIGHT|INSERT| END | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | |RGBMOD| | | | | | | PLAY | NEXT | MUTE | VOL- | VOL+ | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `-------------' + */ + [_FN] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ + _______, _______, _______, _______ \ + ), + + /* ADJ + * ,------------------------------------------------. ,------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | SAD | VAI | SAI | RESET| | | | | | | | | | | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | | HUD | VAD | HUI |RGBRST| | | | | |QWERTY|COLEMK| | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | | | | | |RGBTOG| HUI | SAI | VAI | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | |RGBMOD(| | | | | | | |RGBRMOD| HUD | SAD | VAD | + * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' + * | | | | | | + * `-------------' `-------------' + */ + + [_ADJ] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ + _______, _______, _______, _______ \ + ) +}; + + + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { /* Second encoder*/ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} +#endif + +// Setting ADJ 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)) { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); + #endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + //uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if(record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case FN: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(15); + #endif + } + layer_on(_FN); + } else { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + #endif + layer_off(_FN); + TOG_STATUS = false; + } + return false; + break; + case ADJ: + if (record->event.pressed) { + layer_on(_ADJ); + } else { + layer_off(_ADJ); + } + return false; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + +void matrix_init_user(void) { +#ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; +#endif +} + + +// OLED Driver Logic +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!has_usb()) + return OLED_ROTATION_180; // flip 180 for offhand + return rotation; +} + +static void render_logo(void) { + static const char PROGMEM sol_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(sol_logo, false); +} + +//assign the right code to your layers for OLED display +#define L_BASE 0 +#define L_FN (1<<_FN) +#define L_ADJ (1<<_ADJ) +#define L_ADJ_TRI (L_ADJ|L_FN) + +static void render_status(void) { + // Render to mode icon + static const char PROGMEM mode_logo[4][4] = { + {0x95,0x96,0x0a,0}, + {0xb5,0xb6,0x0a,0}, + {0x97,0x98,0x0a,0}, + {0xb7,0xb8,0x0a,0} }; + + if (keymap_config.swap_lalt_lgui != false) { + oled_write_P(mode_logo[0], false); + oled_write_P(mode_logo[1], false); + } else { + oled_write_P(mode_logo[2], false); + oled_write_P(mode_logo[3], false); + } + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + oled_write_P(PSTR("Layer: "), false); + switch (layer_state) { + case L_BASE: + oled_write_P(PSTR("Default\n"), false); + break; + case L_FN: + oled_write_P(PSTR("FN \n"), false); + break; + case L_ADJ: + case L_ADJ_TRI: + oled_write_P(PSTR("ADJ \n"), false); + break; + default: + oled_write_P(PSTR("UNDEF \n"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(led_usb_state & (1< +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER RGBKB +#define PRODUCT Sol +#define DESCRIPTION "An RGB, split, ortho-esque keyboard" + +#ifdef LED_MIRRORED + #define RGBLED_NUM 35 +#else + #define RGBLED_NUM 70 +#endif +#define DRIVER_LED_TOTAL RGBLED_NUM + +#define RGB_MATRIX_CENTER { 112, 35 } diff --git a/keyboards/sol/rev1/info.json b/keyboards/rgbkb/sol/rev1/info.json similarity index 91% rename from keyboards/sol/rev1/info.json rename to keyboards/rgbkb/sol/rev1/info.json index 40bc01f7ff1d..e252ea2e2df1 100644 --- a/keyboards/sol/rev1/info.json +++ b/keyboards/rgbkb/sol/rev1/info.json @@ -77,14 +77,10 @@ {"label":"R43", "x":13.5, "y":4}, {"label":"R44", "x":14.5, "y":4}, {"label":"R45", "x":15.5, "y":4, "w":1.5}, - {"label":"Left Encoder, Counter-Clockwise", "x":2.5, "y":5.5}, - {"label":"Left Encoder, Clockwise", "x":3.5, "y":5.5}, {"label":"L55", "x":6, "y":5.5}, {"label":"L56", "x":7, "y":5.5}, {"label":"R56", "x":9, "y":5.5}, - {"label":"R50", "x":10, "y":5.5}, - {"label":"Right Encoder, Counter-Clockwise", "x":12.5, "y":5.5}, - {"label":"Right Encoder, Clockwise", "x":13.5, "y":5.5} + {"label":"R50", "x":10, "y":5.5} ] } } diff --git a/keyboards/rgbkb/sol/rev1/rev1.c b/keyboards/rgbkb/sol/rev1/rev1.c new file mode 100644 index 000000000000..6ee4b610b3b1 --- /dev/null +++ b/keyboards/rgbkb/sol/rev1/rev1.c @@ -0,0 +1,46 @@ +#include "quantum.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6 }, + { 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20 }, + { 21, 22, 23, 24, 25, 26, 27 }, + { 28, 29, 30, 31, 32, 33, 34 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 33, 34 }, + { 35, 36, 37, 38, 39, 40, 41 }, + { 42, 43, 44, 45, 46, 47, 48 }, + { 49, 50, 51, 52, 53, 54, 55 }, + { 56, 57, 58, 59, 60, 61, 62 }, + { 63, 64, 65, 66, 67, 68, 68 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 68, 68 } +}, { + // Left Hand Mapped Left to Right + { 0, 0 }, { 21, 0 }, { 38, 0 }, { 56, 0 }, { 73, 0 }, { 91, 0 }, { 112, 0 }, + { 0, 18 }, { 21, 18 }, { 38, 18 }, { 56, 18 }, { 73, 18 }, { 91, 18 }, { 108, 13 }, + { 0, 35 }, { 21, 35 }, { 38, 35 }, { 56, 35 }, { 73, 35 }, { 91, 35 }, { 108, 31 }, + { 0, 52 }, { 21, 52 }, { 38, 52 }, { 56, 52 }, { 73, 52 }, { 91, 52 }, { 108, 48 }, + { 0, 70 }, { 21, 70 }, { 38, 70 }, { 56, 70 }, { 73, 70 }, { 89, 91 }, { 101, 103 }, + // Left Hand Mapped Right to Left + { 224, 0 }, { 203, 0 }, { 186, 0 }, { 168, 0 }, { 151, 0 }, { 133, 0 }, { 112, 0 }, + { 224, 18 }, { 203, 18 }, { 186, 18 }, { 168, 18 }, { 151, 18 }, { 133, 18 }, { 116, 13 }, + { 224, 35 }, { 203, 35 }, { 186, 35 }, { 168, 35 }, { 151, 35 }, { 133, 35 }, { 116, 31 }, + { 224, 52 }, { 203, 52 }, { 186, 52 }, { 168, 52 }, { 151, 52 }, { 133, 52 }, { 116, 48 }, + { 224, 70 }, { 203, 70 }, { 186, 70 }, { 168, 70 }, { 151, 70 }, { 135, 91 }, { 123, 103 }, +}, { + // Left Hand Mapped Left to Right + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, + // Left Hand Mapped Right to Left + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1 +} }; + +#endif + diff --git a/keyboards/rgbkb/sol/rev1/rev1.h b/keyboards/rgbkb/sol/rev1/rev1.h new file mode 100644 index 000000000000..6f70f09beec2 --- /dev/null +++ b/keyboards/rgbkb/sol/rev1/rev1.h @@ -0,0 +1 @@ +#pragma once diff --git a/keyboards/rgbkb/sol/rev1/rules.mk b/keyboards/rgbkb/sol/rev1/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/sol/rules.mk b/keyboards/rgbkb/sol/rules.mk similarity index 94% rename from keyboards/sol/rules.mk rename to keyboards/rgbkb/sol/rules.mk index aa18721b6ceb..62dd969aa7a3 100644 --- a/keyboards/sol/rules.mk +++ b/keyboards/rgbkb/sol/rules.mk @@ -1,7 +1,3 @@ -SRC += i2c.c \ - serial.c \ - common/ssd1306.c - # MCU name #MCU = at90usb1287 MCU = atmega32u4 @@ -47,6 +43,12 @@ BOOTLOADER = qmk-dfu # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Custom local font file +OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" + +SPLIT_KEYBOARD = yes +ENCODER_ENABLE = yes + # 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 @@ -61,6 +63,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -CUSTOM_MATRIX = yes - -DEFAULT_FOLDER = sol/rev1 +DEFAULT_FOLDER = rgbkb/sol/rev1 diff --git a/keyboards/sol/sol.c b/keyboards/rgbkb/sol/sol.c similarity index 100% rename from keyboards/sol/sol.c rename to keyboards/rgbkb/sol/sol.c diff --git a/keyboards/sol/rev1/rev1.h b/keyboards/rgbkb/sol/sol.h similarity index 73% rename from keyboards/sol/rev1/rev1.h rename to keyboards/rgbkb/sol/sol.h index 27b5ac8966c8..d26546006c76 100644 --- a/keyboards/sol/rev1/rev1.h +++ b/keyboards/rgbkb/sol/sol.h @@ -1,27 +1,10 @@ -#ifndef REV1_H -#define REV1_H +#pragma once -#include "sol.h" - -//void promicro_bootloader_jmp(bool program); #include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -//rgb led driver -#include "ws2812.h" +#ifdef KEYBOARD_rgbkb_sol_rev1 +#include "rev1.h" #endif -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif - -//void promicro_bootloader_jmp(bool program); -// LEL/LER/REL/RER are -// LeftEncoderLeft, LeftEncoderRight, RightEncoderLeft, and RightEncoderRight #define LAYOUT( \ L00, L01, L02, L03, L04, L05, L06, R06, R00, R01, R02, R03, R04, R05, \ @@ -29,7 +12,7 @@ L20, L21, L22, L23, L24, L25, L26, R26, R20, R21, R22, R23, R24, R25, \ L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \ L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45, \ - LEL, LER, L55, L56, R56, R50, REL, RER \ + L55, L56, R56, R50 \ ) \ { \ { L00, L01, L02, L03, L04, L05, L06 }, \ @@ -37,13 +20,13 @@ { L20, L21, L22, L23, L24, L25, L26 }, \ { L30, L31, L32, L33, L34, L35, L36 }, \ { L40, L41, L42, L43, L44, L45, L46 }, \ - { LEL, LER, KC_NO, KC_NO, KC_NO, L55, L56 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, L55, L56 }, \ { R05, R04, R03, R02, R01, R00, R06 }, \ { R15, R14, R13, R12, R11, R10, R16 }, \ { R25, R24, R23, R22, R21, R20, R26 }, \ { R35, R34, R33, R32, R31, R30, R36 }, \ { R45, R44, R43, R42, R41, R40, R46 }, \ - { REL, RER, KC_NO, KC_NO, KC_NO, R50, R56 } \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, R50, R56 } \ } #define KC________ KC_TRNS @@ -56,7 +39,7 @@ L20, L21, L22, L23, L24, L25, L26, R26, R20, R21, R22, R23, R24, R25, \ L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \ L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45, \ - LEL, LER, L55, L56, R56, R50, REL, RER \ + L55, L56, R56, R50 \ ) \ LAYOUT( \ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ @@ -64,7 +47,5 @@ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \ KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, \ - KC_##LEL, KC_##LER, KC_##L55, KC_##L56, KC_##R56, KC_##R50, KC_##REL, KC_##RER \ + KC_##L55, KC_##L56, KC_##R56, KC_##R50 \ ) - -#endif diff --git a/keyboards/rgbkb/zen/common/glcdfont.c b/keyboards/rgbkb/zen/common/glcdfont.c new file mode 100644 index 000000000000..3b4ccfa95c64 --- /dev/null +++ b/keyboards/rgbkb/zen/common/glcdfont.c @@ -0,0 +1,239 @@ +// This is the SOL 6x8 font + +#pragma once + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +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, + 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, 0xA4, 0xA4, 0x9C, 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, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 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, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x0C, 0x90, + 0xB0, 0xE0, 0x72, 0x31, 0x9B, 0xDE, + 0xCE, 0xEC, 0xEE, 0xE9, 0xE9, 0xEC, + 0xCF, 0xDA, 0x99, 0x3E, 0x62, 0xE4, + 0xC4, 0x70, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0xC0, 0xC0, 0x80, 0x80, 0x02, 0x85, + 0x85, 0x87, 0x85, 0x89, 0x89, 0x92, + 0xEA, 0xC6, 0xC4, 0x48, 0x50, 0x60, + 0x40, 0x40, 0x40, 0x40, 0xC0, 0xE0, + 0x50, 0x28, 0x10, 0x10, 0x60, 0xC0, + 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, + 0x80, 0x80, 0x80, 0xE0, 0xF8, 0xFC, + 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0xE0, 0xEC, 0xDF, + 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7F, 0x80, 0x80, + 0x80, 0x70, 0x0F, 0x00, 0x00, 0x80, + 0x7F, 0x00, 0x00, 0x7F, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x7F, + 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x21, 0x33, 0x3B, 0x7B, + 0xFF, 0x00, 0x7C, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x01, + 0xFF, 0xDE, 0x8C, 0x04, 0x0C, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x7F, 0x80, + 0x80, 0xBE, 0xBE, 0x80, 0x80, 0x80, + 0xC1, 0xFF, 0x80, 0x04, 0x32, 0x5E, + 0x1C, 0x3D, 0x26, 0x10, 0xC1, 0xFF, + 0x3E, 0x00, 0x00, 0x08, 0x36, 0xC1, + 0x08, 0x08, 0x14, 0x77, 0x94, 0x94, + 0x94, 0xF7, 0x94, 0xF7, 0x9C, 0x9C, + 0xFF, 0xFF, 0x1E, 0x00, 0x00, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, + 0x40, 0x7C, 0x3F, 0x3F, 0x23, 0x01, + 0x23, 0x3F, 0x37, 0x6C, 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, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x02, 0x06, + 0x4D, 0x4F, 0x8C, 0xF9, 0x73, 0x37, + 0x27, 0x2F, 0x2F, 0xAF, 0xEF, 0x6F, + 0x77, 0x17, 0x33, 0x79, 0xCC, 0x1F, + 0x31, 0x20, 0x21, 0x02, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0xE0, + 0xA0, 0xA0, 0xD0, 0x90, 0x48, 0x48, + 0x25, 0x2B, 0x11, 0x09, 0x05, 0x03, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x03, 0x02, 0x04, 0x03, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, + 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/zen/config.h b/keyboards/rgbkb/zen/config.h similarity index 79% rename from keyboards/zen/config.h rename to keyboards/rgbkb/zen/config.h index 4478062eb0ed..6868dc13541e 100644 --- a/keyboards/zen/config.h +++ b/keyboards/rgbkb/zen/config.h @@ -15,17 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif // CONFIG_H - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 16 - -#ifndef TAPPING_TERM -#define TAPPING_TERM 100 -#endif diff --git a/keyboards/rgbkb/zen/readme.md b/keyboards/rgbkb/zen/readme.md new file mode 100644 index 000000000000..0a2f9e3edf74 --- /dev/null +++ b/keyboards/rgbkb/zen/readme.md @@ -0,0 +1,27 @@ +# Zen Keyboard + +A split ergo keyboard with a few goals in mind: + +- Be as thin as possible. Other split KBs (Let's Split, Nyquist, Iris) are 15.2mm thick. The Zen rev2 is only 13.2mm thick *including switches and caps* when using Kailh Choc low-profile switches, and 22.1mm using standard MX switches and DSA keycaps. +- Layout designed for gaming. 1.5u pinky keys, ortho alphas, and angled thumb keys. After trying Ortholinear, Atreus62, and Ergodox, this is the best layout for gaming and typing. +- Per-key RGB lighting. 34 WS2812b LEDs per side make it exceptionally bright +- Price. Using Arduino Pro Micro, SK6812 LEDs, and PCB FR4 for the case, the cost of each half without switches or caps can be reduced to under $20 when purchased at volume. +- Options. The Zen rev2 comes with rotary encoder support, SSD1306 OLED pinout, USB-C or TRRS interconnect, and jumpers to enable compatibility with the [QMK Proton-C](https://olkb.com/parts/qmk-proton-c) and the [Keeb.io Elite-C](https://keeb.io/products/elite-c-usb-c-pro-micro-replacement-arduino-compatible-atmega32u4) + +Keyboard Maintainer: [Legonut](https://github.com/Legonut) +Hardware Supported: Zen rev1, Zen rev2 +Hardware Availability: [RGBKB.net](https://www.rgbkb.net/) + +A build guide and more info for this keyboard can be found here: [Zen Build Guide](https://rgbkb.gitbook.io/sol-build-guide/zygomorph-build-guide/untitled). + +Make example for this keyboard (after setting up your build environment): + + make rgbkb/zen/rev2:default + +To build for a Proton-C: + + make rgbkb/zen/rev2:default CTPC=yes + +**Note:** The Proton-C does not have split keyboard, or encoder support. Also OLED driver support is untested. Will update as status changes. + +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. diff --git a/keyboards/zen/rev1/config.h b/keyboards/rgbkb/zen/rev1/config.h similarity index 86% rename from keyboards/zen/rev1/config.h rename to keyboards/rgbkb/zen/rev1/config.h index f480cadcc517..88f39af4842a 100644 --- a/keyboards/zen/rev1/config.h +++ b/keyboards/rgbkb/zen/rev1/config.h @@ -15,15 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H - -#include QMK_KEYBOARD_CONFIG_H +#pragma once /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB -#define PRODUCT_ID 0x1256 -#define DEVICE_VER 0x0200 +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 #define MANUFACTURER Legonut #define PRODUCT Project Zen #define DESCRIPTION Split gaming keyboard @@ -40,12 +37,11 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define SOFT_SERIAL_PIN D0 + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 @@ -54,9 +50,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#define BACKLIGHT_PIN F4 -#define BACKLIGHT_LEVELS 5 - /* ws2812 RGB LED */ #define RGB_DI_PIN D1 @@ -79,5 +72,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/zen/info.json b/keyboards/rgbkb/zen/rev1/info.json similarity index 100% rename from keyboards/zen/info.json rename to keyboards/rgbkb/zen/rev1/info.json diff --git a/keyboards/zen/keymaps/333fred/config.h b/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h similarity index 100% rename from keyboards/zen/keymaps/333fred/config.h rename to keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h diff --git a/keyboards/zen/keymaps/333fred/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c similarity index 100% rename from keyboards/zen/keymaps/333fred/keymap.c rename to keyboards/rgbkb/zen/rev1/keymaps/333fred/keymap.c diff --git a/keyboards/zen/keymaps/333fred/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/333fred/rules.mk similarity index 85% rename from keyboards/zen/keymaps/333fred/rules.mk rename to keyboards/rgbkb/zen/rev1/keymaps/333fred/rules.mk index 38b715550429..1359e81c09ff 100644 --- a/keyboards/zen/keymaps/333fred/rules.mk +++ b/keyboards/rgbkb/zen/rev1/keymaps/333fred/rules.mk @@ -1,5 +1,4 @@ RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = no NKRO_ENABLE = yes KEY_LOCK_ENABLE = yes TAP_DANCE_ENABLE = yes diff --git a/keyboards/zen/keymaps/jwlawrence/config.h b/keyboards/rgbkb/zen/rev1/keymaps/default/config.h similarity index 95% rename from keyboards/zen/keymaps/jwlawrence/config.h rename to keyboards/rgbkb/zen/rev1/keymaps/default/config.h index 38e4d73f0d84..4a549c5b1f75 100644 --- a/keyboards/zen/keymaps/jwlawrence/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" @@ -37,5 +36,3 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/zen/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c similarity index 97% rename from keyboards/zen/keymaps/default/keymap.c rename to keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c index e9e7d798ca84..54462ec0ff13 100644 --- a/keyboards/zen/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/keymap.c @@ -6,8 +6,10 @@ extern keymap_config_t keymap_config; // 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. -#define _QWERTY 0 -#define _NAV 2 +enum layer_number { + _QWERTY = 0, + _NAV +}; enum custom_keycodes { @@ -16,10 +18,6 @@ enum custom_keycodes { }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -98,4 +96,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/rgbkb/zen/rev1/keymaps/default/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/default/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/nyquist/keymaps/mtdjr/config.h b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h similarity index 95% rename from keyboards/nyquist/keymaps/mtdjr/config.h rename to keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h index 0fa606f29653..d813085e46db 100644 --- a/keyboards/nyquist/keymaps/mtdjr/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h @@ -17,6 +17,8 @@ along with this program. If not, see . #pragma once +// place overrides here + /* Use I2C or Serial, not both */ #define USE_SERIAL @@ -30,7 +32,7 @@ along with this program. If not, see . #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 12 +#define RGBLED_NUM 16 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/zen/keymaps/jwlawrence/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c similarity index 98% rename from keyboards/zen/keymaps/jwlawrence/keymap.c rename to keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c index 1ca9b78c0ff4..13edd0db8da8 100644 --- a/keyboards/zen/keymaps/jwlawrence/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/keymap.c @@ -16,10 +16,6 @@ enum custom_keycodes { }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -98,4 +94,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //break; } return true; -} \ No newline at end of file +} diff --git a/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/zen/keymaps/kageurufu/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/kageurufu/keymap.c similarity index 98% rename from keyboards/zen/keymaps/kageurufu/keymap.c rename to keyboards/rgbkb/zen/rev1/keymaps/kageurufu/keymap.c index 761100dbe58d..75884635cdc4 100644 --- a/keyboards/zen/keymaps/kageurufu/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/kageurufu/keymap.c @@ -1,8 +1,8 @@ #include QMK_KEYBOARD_H #include "kageurufu.h" #ifdef PROTOCOL_LUFA -#include "lufa.h" -#include "split_util.h" + #include "lufa.h" + #include "split_util.h" #endif extern keymap_config_t keymap_config; diff --git a/keyboards/zen/keymaps/xyverz/config.h b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h similarity index 94% rename from keyboards/zen/keymaps/xyverz/config.h rename to keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h index 818f89989740..d3e21ea1726e 100644 --- a/keyboards/zen/keymaps/xyverz/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" @@ -31,5 +30,3 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/zen/keymaps/xyverz/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/keymap.c similarity index 98% rename from keyboards/zen/keymaps/xyverz/keymap.c rename to keyboards/rgbkb/zen/rev1/keymaps/xyverz/keymap.c index 8879fbb5ff06..6250086ed9db 100644 --- a/keyboards/zen/keymaps/xyverz/keymap.c +++ b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/keymap.c @@ -41,10 +41,6 @@ enum atreus52_keycodes { RAISE }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases to make the keymap clearer. #define CTLBSPC CTL_T(KC_BSPC) // CTRL when held, BSPC when tapped. #define RGB_SWR RGB_M_SW // Swirl Animation alias diff --git a/keyboards/rgbkb/zen/rev1/keymaps/xyverz/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/zen/rev1/rev1.c b/keyboards/rgbkb/zen/rev1/rev1.c similarity index 100% rename from keyboards/zen/rev1/rev1.c rename to keyboards/rgbkb/zen/rev1/rev1.c diff --git a/keyboards/zen/rev1/rev1.h b/keyboards/rgbkb/zen/rev1/rev1.h similarity index 96% rename from keyboards/zen/rev1/rev1.h rename to keyboards/rgbkb/zen/rev1/rev1.h index c2444f047f67..a12f2ea789ad 100644 --- a/keyboards/zen/rev1/rev1.h +++ b/keyboards/rgbkb/zen/rev1/rev1.h @@ -1,5 +1,4 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "zen.h" @@ -36,5 +35,3 @@ { k80, k81, k82, k83, k84, k85, KC_NO }, \ { k90, k91, k92, k93, k94, k95, k96 } \ } - -#endif diff --git a/keyboards/rgbkb/zen/rev1/rules.mk b/keyboards/rgbkb/zen/rev1/rules.mk new file mode 100644 index 000000000000..58e9a76b2302 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/rules.mk @@ -0,0 +1 @@ +BOOTLOADER = caterina diff --git a/keyboards/rgbkb/zen/rev2/config.h b/keyboards/rgbkb/zen/rev2/config.h new file mode 100644 index 000000000000..c56956108d79 --- /dev/null +++ b/keyboards/rgbkb/zen/rev2/config.h @@ -0,0 +1,86 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3061 +#define DEVICE_VER 0x0002 +#define MANUFACTURER Legonut +#define PRODUCT "Project Zen" +#define DESCRIPTION "Split gaming keyboard" + +/* key matrix size */ +// Rows are doubled-up + +// wiring of each half +#ifdef CONVERT_TO_PROTON_C + #define MATRIX_ROWS 5 + #define MATRIX_COLS 7 +#else + #define MATRIX_ROWS 10 + #define MATRIX_COLS 7 +#endif + +// Proton-C does pin conversion +#define MATRIX_ROW_PINS { C6, E6, B5, D7, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B3, B1, B2 } + +#define NUMBER_OF_ENCODERS 1 + +#define ENCODERS_PAD_A { D4 } +#define ENCODERS_PAD_B { D2 } + +#define RGB_DI_PIN B6 +#define SOFT_SERIAL_PIN D3 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +/* ws2812 RGB LED */ +#define RGBLED_NUM 34 // Number of LEDs +#define RGBLIGHT_ANIMATIONS + +/* + * 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 diff --git a/keyboards/rgbkb/zen/rev2/info.json b/keyboards/rgbkb/zen/rev2/info.json new file mode 100644 index 000000000000..8ed12de2b4ff --- /dev/null +++ b/keyboards/rgbkb/zen/rev2/info.json @@ -0,0 +1,361 @@ +{ + "keyboard_name": "Zen", + "url": "", + "maintainer": "qmk", + "width": 17, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "k00", + "x": 0.5, + "y": 0 + }, + { + "label": "k01", + "x": 1.5, + "y": 0 + }, + { + "label": "k02", + "x": 2.5, + "y": 0 + }, + { + "label": "k03", + "x": 3.5, + "y": 0 + }, + { + "label": "k04", + "x": 4.5, + "y": 0 + }, + { + "label": "k05", + "x": 5.5, + "y": 0 + }, + { + "label": "k55", + "x": 10.5, + "y": 0 + }, + { + "label": "k54", + "x": 11.5, + "y": 0 + }, + { + "label": "k53", + "x": 12.5, + "y": 0 + }, + { + "label": "k52", + "x": 13.5, + "y": 0 + }, + { + "label": "k51", + "x": 14.5, + "y": 0 + }, + { + "label": "k50", + "x": 15.5, + "y": 0 + }, + { + "label": "k10", + "x": 0, + "y": 1, + "w": 1.5 + }, + { + "label": "k11", + "x": 1.5, + "y": 1 + }, + { + "label": "k12", + "x": 2.5, + "y": 1 + }, + { + "label": "k13", + "x": 3.5, + "y": 1 + }, + { + "label": "k14", + "x": 4.5, + "y": 1 + }, + { + "label": "k15", + "x": 5.5, + "y": 1 + }, + { + "label": "k65", + "x": 10.5, + "y": 1 + }, + { + "label": "k64", + "x": 11.5, + "y": 1 + }, + { + "label": "k63", + "x": 12.5, + "y": 1 + }, + { + "label": "k62", + "x": 13.5, + "y": 1 + }, + { + "label": "k61", + "x": 14.5, + "y": 1 + }, + { + "label": "k60", + "x": 15.5, + "y": 1, + "w": 1.5 + }, + { + "label": "k20", + "x": 0, + "y": 2, + "w": 1.5 + }, + { + "label": "k21", + "x": 1.5, + "y": 2 + }, + { + "label": "k22", + "x": 2.5, + "y": 2 + }, + { + "label": "k23", + "x": 3.5, + "y": 2 + }, + { + "label": "k24", + "x": 4.5, + "y": 2 + }, + { + "label": "k25", + "x": 5.5, + "y": 2 + }, + { + "label": "k75", + "x": 10.5, + "y": 2 + }, + { + "label": "k74", + "x": 11.5, + "y": 2 + }, + { + "label": "k73", + "x": 12.5, + "y": 2 + }, + { + "label": "k72", + "x": 13.5, + "y": 2 + }, + { + "label": "k71", + "x": 14.5, + "y": 2 + }, + { + "label": "k70", + "x": 15.5, + "y": 2, + "w": 1.5 + }, + { + "label": "k30", + "x": 0, + "y": 3, + "w": 1.5 + }, + { + "label": "k31", + "x": 1.5, + "y": 3 + }, + { + "label": "k32", + "x": 2.5, + "y": 3 + }, + { + "label": "k33", + "x": 3.5, + "y": 3 + }, + { + "label": "k34", + "x": 4.5, + "y": 3 + }, + { + "label": "k35", + "x": 5.5, + "y": 3 + }, + { + "label": "k16", + "x": 6.5, + "y": 3 + }, + { + "label": "k66", + "x": 9.5, + "y": 3 + }, + { + "label": "k85", + "x": 10.5, + "y": 3 + }, + { + "label": "k84", + "x": 11.5, + "y": 3 + }, + { + "label": "k83", + "x": 12.5, + "y": 3 + }, + { + "label": "k82", + "x": 13.5, + "y": 3 + }, + { + "label": "k81", + "x": 14.5, + "y": 3 + }, + { + "label": "k80", + "x": 15.5, + "y": 3, + "w": 1.5 + }, + { + "label": "k40", + "x": 0, + "y": 4, + "w": 1.5 + }, + { + "label": "k41", + "x": 1.5, + "y": 4 + }, + { + "label": "k42", + "x": 2.5, + "y": 4 + }, + { + "label": "k43", + "x": 3.5, + "y": 4 + }, + { + "label": "k44", + "x": 4.5, + "y": 4 + }, + { + "label": "k36", + "x": 6, + "y": 4.5 + }, + { + "label": "k26", + "x": 7, + "y": 4.5 + }, + { + "label": "k76", + "x": 9, + "y": 4.5 + }, + { + "label": "k86", + "x": 10, + "y": 4.5 + }, + { + "label": "k94", + "x": 11.5, + "y": 4 + }, + { + "label": "k93", + "x": 12.5, + "y": 4 + }, + { + "label": "k92", + "x": 13.5, + "y": 4 + }, + { + "label": "k91", + "x": 14.5, + "y": 4 + }, + { + "label": "k90", + "x": 15.5, + "y": 4, + "w": 1.5 + }, + { + "label": "k45", + "x": 6, + "y": 5.5 + }, + { + "label": "k46", + "x": 7, + "y": 5.5 + }, + { + "label": "k96", + "x": 9, + "y": 5.5 + }, + { + "label": "k95", + "x": 10, + "y": 5.5 + } + ] + } + } + } diff --git a/keyboards/rgbkb/zen/rev2/keymaps/debug/keymap.c b/keyboards/rgbkb/zen/rev2/keymaps/debug/keymap.c new file mode 100644 index 000000000000..e2d3d6a3567d --- /dev/null +++ b/keyboards/rgbkb/zen/rev2/keymaps/debug/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H +#include + +// extern keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { { KC_TRNS } } }; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static char buf[10] = " "; + + if (record->event.pressed) { + snprintf(buf, 10, "C%dR%d ", record->event.key.col, record->event.key.row); + + send_string(buf); + } + return false; + + return true; +} diff --git a/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c new file mode 100644 index 000000000000..dba4a2ddd851 --- /dev/null +++ b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c @@ -0,0 +1,117 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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 { + _QWERTY = 0, + _NAV +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + NAV +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. .-----------------------------------------. + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |CAPS(NAV)|A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------..------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B |RGBPrv||RGBNxt| N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------||------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |RGBTOG| NAV |Space |Delete||Enter |Space | NAV | - | = | PGUP | PGDN | + * `----------------------------------+-------------''------------------------------------------------' + * |Space |Delete||Enter |Space | + * '-------------''-------------' + */ + [_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_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + LT(_NAV, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, RGB_RMOD,RGB_MOD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, MO(_NAV), KC_SPC, KC_DEL, KC_ENT, KC_SPACE, MO(_NAV), KC_MINS, KC_EQL, KC_PGUP, KC_PGDN, \ + KC_SPC, KC_DEL, KC_ENT, KC_SPACE \ + ), + + /* NAV + * ,-----------------------------------------. .-----------------------------------------. + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |CAPS(NAV)|A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------..------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | || | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------||------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt |RGBTOG| NAV |Space |Delete||Enter |Space | NAV | - | = | PGUP | PGDN | + * `----------------------------------+-------------''------------------------------------------------' + * |Space |Delete||Enter |Space | + * '-------------''-------------' + */ + [_NAV] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RGB_SAI, RGB_VAI, RGB_SAD, RESET, KC_LBRC, KC_RBRC, KC_PGUP, KC_UP, KC_PGDN, KC_INS, KC_HOME, \ + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_END, \ + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, KC_VOLD, \ + _______, _______, _______, _______ + ), + +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder from slave */ + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(1UL<<_QWERTY); + } + return false; + break; + //case COLEMAK: + //if (record->event.pressed) { + //set_single_persistent_default_layer(1UL<<_COLEMAK); + //} + //return false; + //break; + } + return true; +} + + +#if OLED_DRIVER_ENABLE +const char* layer_name_user(uint32_t layer) { + switch (layer) { + case _QWERTY: + return PSTR("QWRTY"); + case _NAV: + return PSTR("NAV\n"); + default: + return PSTR("UNDEF"); + } +} +#endif diff --git a/keyboards/rgbkb/zen/rev2/rev2.c b/keyboards/rgbkb/zen/rev2/rev2.c new file mode 100644 index 000000000000..28a5a9f203d2 --- /dev/null +++ b/keyboards/rgbkb/zen/rev2/rev2.c @@ -0,0 +1,66 @@ +#include "rev2.h" + +#ifdef OLED_DRIVER_ENABLE +#include "split_util.h" +#include "oled_driver.h" + +__attribute__((weak)) +void render_logo(void) { + static const char PROGMEM sol_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(sol_logo, false); +} + +__attribute__((weak)) +const char* layer_name_user(uint32_t layer) { + switch (layer) { + default: + return PSTR("UNDEF\n"); + } +} + +__attribute__((weak)) +void render_status(void) { + // Setup for 270 degree rendering because it's awesome! + // It can house 16 lines of text, with 5 letters each line + // Render to mode icon + static const char PROGMEM mode_logo[2][4] = { + {0x97,0x98,0x0a,0}, + {0xb7,0xb8,0x0a,0} }; + + oled_write_P(mode_logo[0], false); // Line 1 + oled_write_P(mode_logo[1], false); // Line 2 + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + oled_set_cursor(0, 3); // Line 3 + oled_write_P(PSTR("Layer"), false); // Line 4 + oled_write_P(layer_name_user(biton32(layer_state)), false); + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_set_cursor(0, oled_max_lines() - 4); // Line 13 + oled_write_P(led_usb_state & (1< +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#ifdef CONVERT_TO_PROTON_C + #define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k55, k54, k53, k52, k51, k50, \ + k10, k11, k12, k13, k14, k15, k65, k64, k63, k62, k61, k60, \ + k20, k21, k22, k23, k24, k25, k75, k74, k73, k72, k71, k70, \ + k30, k31, k32, k33, k34, k35, k16, k66, k85, k84, k83, k82, k81, k80, \ + k40, k41, k42, k43, k44, k36, k26, k76, k86, k94, k93, k92, k91, k90, \ + k45, k46, k96, k95 \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16 }, \ + { k20, k21, k22, k23, k24, k25, k26 }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, k44, k45, k46 } \ + } +#else + #define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k55, k54, k53, k52, k51, k50, \ + k10, k11, k12, k13, k14, k15, k65, k64, k63, k62, k61, k60, \ + k20, k21, k22, k23, k24, k25, k75, k74, k73, k72, k71, k70, \ + k30, k31, k32, k33, k34, k35, k16, k66, k85, k84, k83, k82, k81, k80, \ + k40, k41, k42, k43, k44, k36, k26, k76, k86, k94, k93, k92, k91, k90, \ + k45, k46, k96, k95 \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16 }, \ + { k20, k21, k22, k23, k24, k25, k26 }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, k44, k45, k46 }, \ + { k50, k51, k52, k53, k54, k55, KC_NO }, \ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, k74, k75, k76 }, \ + { k80, k81, k82, k83, k84, k85, k86 }, \ + { k90, k91, k92, k93, k94, k95, k96 } \ + } +#endif diff --git a/keyboards/rgbkb/zen/rev2/rules.mk b/keyboards/rgbkb/zen/rev2/rules.mk new file mode 100644 index 000000000000..e9d19a69aa9a --- /dev/null +++ b/keyboards/rgbkb/zen/rev2/rules.mk @@ -0,0 +1,9 @@ +ENCODER_ENABLE = yes + +OLED_DRIVER_ENABLE = no + +# Setup so that OLED can be turned on/off easily +ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) + # Custom local font file + OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" +endif diff --git a/keyboards/rgbkb/zen/rules.mk b/keyboards/rgbkb/zen/rules.mk new file mode 100644 index 000000000000..7473b61cfc59 --- /dev/null +++ b/keyboards/rgbkb/zen/rules.mk @@ -0,0 +1,42 @@ +# Pro Micro or Elite-C +# Automagically converted to Proton-C +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +BOOTLOADER = dfu +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +ifeq ($(strip $(CTPC)), yes) + CONVERT_TO_PROTON_C=yes +endif + +ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) + SPLIT_KEYBOARD = no # currently unsupported on ARM + RGBLIGHT_ENABLE = no # currently unsupported on ARM + + EXTRAFLAGS += -DUSE_PROTON_C +else + # Currently moved to Pro Micro only section because of lack of Proton-C support + SPLIT_KEYBOARD = yes + RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +endif + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +DEFAULT_FOLDER = rgbkb/zen/rev2 diff --git a/keyboards/zen/zen.c b/keyboards/rgbkb/zen/zen.c similarity index 100% rename from keyboards/zen/zen.c rename to keyboards/rgbkb/zen/zen.c diff --git a/keyboards/rgbkb/zen/zen.h b/keyboards/rgbkb/zen/zen.h new file mode 100644 index 000000000000..e51c3c831f73 --- /dev/null +++ b/keyboards/rgbkb/zen/zen.h @@ -0,0 +1,8 @@ +#pragma once + +#if KEYBOARD_rgbkb_zen_rev1 + #include "rev1.h" +#elif KEYBOARD_rgbkb_zen_rev2 + #include "rev2.h" +#endif +#include "quantum.h" diff --git a/keyboards/sol/common/glcdfont.c b/keyboards/rgbkb/zygomorph/common/glcdfont.c similarity index 100% rename from keyboards/sol/common/glcdfont.c rename to keyboards/rgbkb/zygomorph/common/glcdfont.c diff --git a/keyboards/quefrency/config.h b/keyboards/rgbkb/zygomorph/config.h similarity index 87% rename from keyboards/quefrency/config.h rename to keyboards/rgbkb/zygomorph/config.h index 8f0524f97262..93fd2261b185 100644 --- a/keyboards/quefrency/config.h +++ b/keyboards/rgbkb/zygomorph/config.h @@ -16,13 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" -#ifdef SUBPROJECT_rev1 - #include "rev1/config.h" -#endif - -#endif diff --git a/keyboards/rgbkb/zygomorph/keymaps/5x6pad/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/5x6pad/keymap.c new file mode 100644 index 000000000000..c6138b43a3f3 --- /dev/null +++ b/keyboards/rgbkb/zygomorph/keymaps/5x6pad/keymap.c @@ -0,0 +1,282 @@ +#include QMK_KEYBOARD_H +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "common/ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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 { + _QWERTY = 0, + _MACROPAD, + _FN, + _ADJ +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + MACROPAD, + FN, + ADJ, + BACKLIT, + RGBRST +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + + + +#define FN_ESC LT(_FN, KC_ESC) +#define FN_CAPS LT(_FN, KC_CAPS) +// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns + +#define BASE_LAYOUT( \ + _00, _01, _02, _03, _04, \ + _10, _11, _12, _13, _14, \ + _20, _21, _22, _23, _24, \ + _30, _31, _32, _33, _34 \ +) \ +LAYOUT_ortho_5x6( \ + KC_GESC, _00, _01, _02, _03, _04, \ + KC_TAB, _10, _11, _12, _13, _14, \ + FN_CAPS, _20, _21, _22, _23, _24, \ + KC_LSFT, _30, _31, _32, _33, _34, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC \ +) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = BASE_LAYOUT( \ + KC_1, KC_2, KC_3, KC_4, KC_5, \ + KC_Q, KC_W, KC_E, KC_R, KC_T, \ + KC_A, KC_S, KC_D, KC_F, KC_G, \ + KC_Z, KC_X, KC_C, KC_V, KC_B \ + ), + + [_MACROPAD] = BASE_LAYOUT( \ + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, \ + KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, \ + KC_A, KC_S, KC_D, KC_F, KC_G, \ + KC_Z, KC_X, KC_C, KC_V, KC_B \ + ), + + [_FN] = LAYOUT_ortho_5x6( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_MOD, _______, _______ \ + ), + + [_ADJ] = LAYOUT_ortho_5x6( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, \ + _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, \ + _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_MOD, _______, _______ \ + ) +}; + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; + +// Setting ADJ 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)) { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); + #endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + //uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case MACROPAD: + if(record->event.pressed) { + set_single_persistent_default_layer(_MACROPAD); + } + return false; + break; + case FN: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(15); + #endif + } + layer_on(_FN); + } else { + #ifdef RGBLIGHT_ENABLE + //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change + #endif + layer_off(_FN); + TOG_STATUS = false; + } + return false; + break; + case ADJ: + if (record->event.pressed) { + layer_on(_ADJ); + } else { + layer_off(_ADJ); + } + return false; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.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 + +// hook point for 'led_test' keymap +// 'default' keymap's led_test_init() is empty function, do nothing +// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35); +__attribute__ ((weak)) +void led_test_init(void) {} + +void matrix_scan_user(void) { + led_test_init(); + iota_gfx_task(); // this is what updates the display continuously +} + +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; + } +} + +//assign the right code to your layers for OLED display +#define L_BASE 0 +#define L_FN (1<<_FN) +#define L_ADJ (1<<_ADJ) + +static void render_logo(struct CharacterMatrix *matrix) { + + static char logo[]={ + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, + 0}; + matrix_write(matrix, logo); + //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); +} + + + +void render_status(struct CharacterMatrix *matrix) { + + // Render to mode icon + static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; + if(keymap_config.swap_lalt_lgui==false){ + matrix_write(matrix, logo[0][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write(matrix, logo[0][1]); + }else{ + matrix_write(matrix, logo[1][0]); + matrix_write_P(matrix, PSTR("\n")); + matrix_write(matrix, logo[1][1]); + } + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + char buf[40]; + snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); + matrix_write_P(matrix, PSTR("\nLayer: ")); + switch (layer_state) { + case L_BASE: + matrix_write_P(matrix, PSTR("Default")); + break; + case L_FN: + matrix_write_P(matrix, PSTR("FN")); + break; + case L_ADJ: + case L_ADJ_TRI: + matrix_write_P(matrix, PSTR("ADJ")); + break; + default: + matrix_write(matrix, buf); + } + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n%s %s %s", + (host_keyboard_leds() & (1< +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 . +*/ + +#pragma once + + +// place overrides here + diff --git a/keyboards/rgbkb/zygomorph/keymaps/default/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/default/keymap.c new file mode 100644 index 000000000000..f236e20a438d --- /dev/null +++ b/keyboards/rgbkb/zygomorph/keymaps/default/keymap.c @@ -0,0 +1,167 @@ +#include QMK_KEYBOARD_H + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +// 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 { + _QWERTY = 0, + _COLEMAK, + _FN, + _ADJ +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + FN, + ADJ, + RGBRST +}; + +#define FN_CAPS LT(_FN, KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* / QWERTY \ + * /-----------------------------------------\ /-----------------------------------------\ + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FNCAPS| A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_QWERTY] = LAYOUT_ortho_5x12( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSLS, \ + FN_CAPS, 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_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT \ + ), + + /* / Colemak \ + * /-----------------------------------------\ /-----------------------------------------\ + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | F | P | B | | J | L | U | Y | ; | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FNCAPS| A | R | S | T | G | | K | N | E | I | O | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | Z | X | C | D | V | | M | H | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_COLEMAK] = LAYOUT_ortho_5x12( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT \ + ), + + /* / FN \ + * /-----------------------------------------\ /-----------------------------------------\ + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PGDN | UP | PGUP | | | | | PGDN | UP | PGUP | PRINT| HOME | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | LEFT | DOWN | RIGHT| | | | | LEFT | DOWN | RIGHT|INSERT| END | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |RGBMOD| | | | | PLAY | NEXT | MUTE | VOL- | VOL+ | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_FN] = LAYOUT_ortho_5x12( \ + 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_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU \ + ), + + /* / ADJ \ + * /-----------------------------------------\ /-----------------------------------------\ + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | SAD | VAI | SAI | RESET| | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | HUD | VAD | HUI |RGBRST| | | |QWERTY|COLEMK| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | |RGBTOG| HUI | SAI | VAI | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |RGBNXT| | | | | |RGBPRV| HUD | SAD | VAD | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_ADJ] = LAYOUT_ortho_5x12( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD \ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder from slave */ + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if(record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case FN: + if (record->event.pressed) { + layer_on(_FN); + } else { + layer_off(_FN); + } + return false; + case ADJ: + if (record->event.pressed) { + layer_on(_ADJ); + } else { + layer_off(_ADJ); + } + return false; + case RGBRST: +#ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } +#endif + break; + } + return true; +} diff --git a/keyboards/rgbkb/zygomorph/keymaps/default/readme.md b/keyboards/rgbkb/zygomorph/keymaps/default/readme.md new file mode 100644 index 000000000000..e1d30b36b6a1 --- /dev/null +++ b/keyboards/rgbkb/zygomorph/keymaps/default/readme.md @@ -0,0 +1,121 @@ +# The Default Zygomorph Layout +## Layout + +### Base modifier layout +``` + * ,-----------------------------------------. ,-----------------------------------------. + * | GESC | | | | | | | | | | | | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | | | | | | | | | | | | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FN(CAPS)| | | | | | | | | | | | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | | | | | |Shift | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | + * `-----------------------------------------' `-----------------------------------------' +``` + +### Qwerty alphas +``` + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Q | W | E | R | T | | Y | U | I | O | P | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | A | S | D | F | G | | H | J | K | L | ; | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Z | X | C | V | B | | N | M | , | . | / | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' +``` + +### Colemak alphas +``` + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Q | W | F | P | G | | J | L | U | Y | ; | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | A | R | S | T | D | | H | N | E | I | O | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Z | X | C | V | B | | K | M | , | . | / | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' +``` + +### Function (FN) +``` + * ,-----------------------------------------. ,-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PGDN | UP | PGUP | | | | | PGDN | UP | PGUP | PRINT| HOME | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | LEFT | DOWN | RIGHT| | | | | LEFT | DOWN | RIGHT|INSERT| END | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |RGBMOD| | | | | PLAY | NEXT | MUTE | VOL- | VOL+ | + * `-----------------------------------------' `-----------------------------------------' +``` + +### Adjust (ADJ) +``` + * ,-----------------------------------------. ,-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | SAD | VAI | SAI | RESET| | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | HUD | VAD | HUI |RGBRST| | | |QWERTY|COLEMK| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | |RGBTOG| HUI | SAI | VAI | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |RGBMOD| | | | | |RGBRMOD| HUD | SAD | VAD | + * `-----------------------------------------' `-----------------------------------------' +``` + +## Customize + +see `qmk_firmware/keyboards/zygomorph/rev1/keymaps/default/rules.mk` + +``` + +# Variables you can set for Zygomorph + +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # 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 +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) +RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE = yes # Enable rotary encoder (+90) +OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000) +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + + +``` +## Compile + +go to qmk top directory. +``` +$ cd qmk_firmware +``` + +build +``` +$ make rgbkb/zygomorph:default +``` + +After the initial flash with AVRdudess, you should be able to flash using this: +``` +$ make rgbkb/zygomorph:default:dfu +``` diff --git a/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk new file mode 100644 index 000000000000..55d52d58e57f --- /dev/null +++ b/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk @@ -0,0 +1,42 @@ +# 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 +# + +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +RGBLIGHT_SPLIT_ENABLE = no # Split RGBLight Support +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. +RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE = yes # Enable rotary encoder +OLED_DRIVER_ENABLE = no # Enable the OLED Driver +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) +LINK_TIME_OPTIMIZATION_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. + +# Do not edit past here + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGBLIGHT_ANIMATIONS)), yes) + OPT_DEFS += -DRGBLIGHT_ANIMATIONS +endif + +ifeq ($(strip $(RGBLIGHT_SPLIT_ENABLE)), yes) + OPT_DEFS += -DRGBLIGHT_SPLIT_ENABLE +endif diff --git a/keyboards/rgbkb/zygomorph/keymaps/default_oled/config.h b/keyboards/rgbkb/zygomorph/keymaps/default_oled/config.h new file mode 100644 index 000000000000..452cdda82351 --- /dev/null +++ b/keyboards/rgbkb/zygomorph/keymaps/default_oled/config.h @@ -0,0 +1,25 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + + +// place overrides here + diff --git a/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c new file mode 100644 index 000000000000..d313bec8b098 --- /dev/null +++ b/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c @@ -0,0 +1,233 @@ +#include QMK_KEYBOARD_H + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +// 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 { + _QWERTY = 0, + _COLEMAK, + _FN, + _ADJ +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + FN, + ADJ, + RGBRST +}; + +#define FN_CAPS LT(_FN, KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* / QWERTY \ + * /-----------------------------------------\ /-----------------------------------------\ + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | O | P | \ | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FNCAPS| A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | Z | X | C | V | B | | N | M | , | . | / |Shift | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_QWERTY] = LAYOUT_ortho_5x12( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSLS, \ + FN_CAPS, 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_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT \ + ), + + /* / Colemak \ + * /-----------------------------------------\ /-----------------------------------------\ + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | F | P | B | | J | L | U | Y | ; | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FNCAPS| A | R | S | T | G | | K | N | E | I | O | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | Z | X | C | D | V | | M | H | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_COLEMAK] = LAYOUT_ortho_5x12( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT \ + ), + + /* / FN \ + * /-----------------------------------------\ /-----------------------------------------\ + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PGDN | UP | PGUP | | | | | PGDN | UP | PGUP | PRINT| HOME | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | LEFT | DOWN | RIGHT| | | | | LEFT | DOWN | RIGHT|INSERT| END | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |RGBMOD| | | | | PLAY | NEXT | MUTE | VOL- | VOL+ | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_FN] = LAYOUT_ortho_5x12( \ + 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_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU \ + ), + + /* / ADJ \ + * /-----------------------------------------\ /-----------------------------------------\ + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | SAD | VAI | SAI | RESET| | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | HUD | VAD | HUI |RGBRST| | | |QWERTY|COLEMK| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | |RGBTOG| HUI | SAI | VAI | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |RGBNXT| | | | | |RGBPRV| HUD | SAD | VAD | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_ADJ] = LAYOUT_ortho_5x12( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + _______, _______, _______, RGB_MOD, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD \ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder from slave */ + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case COLEMAK: + if(record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case FN: + if (record->event.pressed) { + layer_on(_FN); + } else { + layer_off(_FN); + } + return false; + case ADJ: + if (record->event.pressed) { + layer_on(_ADJ); + } else { + layer_off(_ADJ); + } + return false; + case RGBRST: +#ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } +#endif + break; + } + return true; +} + + +// SSD1306 OLED driver logic +#ifdef OLED_DRIVER_ENABLE + +static void render_logo(void) { + static const char PROGMEM rgbkb_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(rgbkb_logo, false); +} + +static void render_status(void) { + // Render to mode icon + static const char PROGMEM mode_logo[4][4] = { + {0x95,0x96,0}, + {0xb5,0xb6,0}, + {0x97,0x98,0}, + {0xb7,0xb8,0} }; + + if (keymap_config.swap_lalt_lgui != false) { + oled_write_ln_P(mode_logo[0], false); + oled_write_ln_P(mode_logo[1], false); + } else { + oled_write_ln_P(mode_logo[2], false); + oled_write_ln_P(mode_logo[3], false); + } + + // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("QWERTY"), false); + break; + case _COLEMAK: + oled_write_ln_P(PSTR("Colemak"), false); + break; + case _FN: + oled_write_ln_P(PSTR("Function"), false); + break; + case _ADJ: + oled_write_ln_P(PSTR("Adjust"), false); + break; + default: + oled_write_ln_P(PSTR("Undefined"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(led_usb_state & (1< +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 . +*/ + +#pragma once + +// place overrides here + diff --git a/keyboards/rgbkb/zygomorph/keymaps/kageurufu/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/keymap.c new file mode 100644 index 000000000000..29702b614abf --- /dev/null +++ b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/keymap.c @@ -0,0 +1,84 @@ +#include QMK_KEYBOARD_H +#include "kageurufu.h" + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +#define FN_CAPS LT(_FN, KC_CAPS) + +// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns + /* / Base Layout \ + * /-----------------------------------------\ /-----------------------------------------\ + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | | | | | | | | | | | | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FNCAPS| | | | | | | | | | | | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | | | | | |Shift | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Win | Alt | RGB | ADJ | Space| | Space| FN | Left | Down | Up |Right | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ +#define EXPAND_LAYOUT(...) LAYOUT_ortho_5x12(__VA_ARGS__) +#define _BASE_LAYOUT( \ + _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, \ + _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \ + _20, _21, _22, _23, _24, _25, _26, _27, _28, _29 \ +) \ +EXPAND_LAYOUT( \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_TAB, _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, KC_BSLS, \ + FN_CAPS, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, KC_QUOT, \ + KC_LSFT, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, KC_ENT, \ + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +) +#define BASE_LAYOUT(...) _BASE_LAYOUT(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = BASE_LAYOUT( \ + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, \ + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, \ + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ \ + ), + + [_COLEMAK] = BASE_LAYOUT( \ + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, \ + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, \ + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ \ + ), + + [_FN] = EXPAND_LAYOUT( \ + ________________FUNCTION_L1________________, ________________FUNCTION_R1________________, \ + ________________FUNCTION_L2________________, ________________FUNCTION_R2________________, \ + ________________FUNCTION_L3________________, ________________FUNCTION_R3________________, \ + ________________FUNCTION_L4________________, ________________FUNCTION_R4________________, \ + ________________FUNCTION_L5________________, ________________FUNCTION_R5________________ \ + ), + + [_ADJ] = EXPAND_LAYOUT( \ + _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, \ + _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, \ + _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, \ + _________________ADJUST_L4_________________, _________________ADJUST_R4_________________, \ + _________________ADJUST_L5_________________, _________________ADJUST_R5_________________ \ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder from slave */ + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} diff --git a/keyboards/sol/keymaps/default/readme.md b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/readme.md similarity index 97% rename from keyboards/sol/keymaps/default/readme.md rename to keyboards/rgbkb/zygomorph/keymaps/kageurufu/readme.md index f5f3845551dc..77e88a078fe9 100644 --- a/keyboards/sol/keymaps/default/readme.md +++ b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/readme.md @@ -1,4 +1,4 @@ -# The Default Sol Layout +# The Default Zygomorph Layout ## Layout ### Base modifier layout @@ -102,7 +102,6 @@ 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 RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix LED_ANIMATIONS = yes # LED animations -LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight (+8500) RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy (+1500) RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port @@ -124,10 +123,10 @@ $ cd qmk_firmware build ``` -$ make sol:default +$ make rgbkb/sol:default ``` After the initial flash with AVRdudess, you should be able to flash using this: ``` -$ make sol:default:dfu +$ make rgbkb/sol:default:dfu ``` diff --git a/keyboards/rgbkb/zygomorph/keymaps/kageurufu/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/rules.mk new file mode 100644 index 000000000000..61c7a07d6eb0 --- /dev/null +++ b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/rules.mk @@ -0,0 +1,44 @@ +# 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 +# + +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # 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 +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +RGBLIGHT_SPLIT_ENABLE = no # Split RGBLight Support +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. +RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE = yes # Enable rotary encoder +OLED_DRIVER_ENABLE = no # Enable the OLED Driver +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) + +# Do not edit past here + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGBLIGHT_ANIMATIONS)), yes) + OPT_DEFS += -DRGBLIGHT_ANIMATIONS +endif + +ifeq ($(strip $(RGBLIGHT_SPLIT_ENABLE)), yes) + OPT_DEFS += -DRGBLIGHT_SPLIT_ENABLE +endif + +# Link time optimization, should save on firmware size +EXTRAFLAGS += -flto diff --git a/keyboards/rgbkb/zygomorph/keymaps/xulkal/config.h b/keyboards/rgbkb/zygomorph/keymaps/xulkal/config.h new file mode 100644 index 000000000000..452cdda82351 --- /dev/null +++ b/keyboards/rgbkb/zygomorph/keymaps/xulkal/config.h @@ -0,0 +1,25 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + + +// place overrides here + diff --git a/keyboards/rgbkb/zygomorph/keymaps/xulkal/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/xulkal/keymap.c new file mode 100644 index 000000000000..f886cb454344 --- /dev/null +++ b/keyboards/rgbkb/zygomorph/keymaps/xulkal/keymap.c @@ -0,0 +1,87 @@ +#include QMK_KEYBOARD_H +#include "xulkal.h" + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif + +#define EXPAND_LAYOUT(...) LAYOUT_ortho_5x12(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* / QWERTY \ + * /-----------------------------------------\ /-----------------------------------------\ + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FN(CAPS)| A | S | D | F | G | | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Sft[ | Z | X | C | V | B | | N | M | , | . | / | Sft] | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctl- | Win | LOWER| RAISE| Alt | Space| | Space| Left | Up | Down | Right| Ctl= | + * \------+------+------+------+------+------/ \------+------+------+------+------+------/ + */ + [_QWERTY] = EXPAND_LAYOUT( \ + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, \ + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, \ + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, \ + _________________QWERTY_L4_________________, _________________QWERTY_R4_________________, \ + _________________QWERTY_L5_________________, _________________QWERTY_R5_________________ \ + ), + +#ifndef GAMELAYER_DISABLE + [_GAME] = EXPAND_LAYOUT( \ + ___________________GAME_L1_________________, ___________________GAME_R1_________________, \ + ___________________GAME_L2_________________, ___________________GAME_R2_________________, \ + ___________________GAME_L3_________________, ___________________GAME_R3_________________, \ + ___________________GAME_L4_________________, ___________________GAME_R4_________________, \ + ___________________GAME_L5_________________, ___________________GAME_R5_________________ \ + ), +#endif + + [_LOWER] = EXPAND_LAYOUT( \ + __________________LOWER_L1_________________, __________________LOWER_R1_________________, \ + __________________LOWER_L2_________________, __________________LOWER_R2_________________, \ + __________________LOWER_L3_________________, __________________LOWER_R3_________________, \ + __________________LOWER_L4_________________, __________________LOWER_R4_________________, \ + __________________LOWER_L5_________________, __________________LOWER_R5_________________ \ + ), + + [_RAISE] = EXPAND_LAYOUT( \ + __________________RAISE_L1_________________, __________________RAISE_R1_________________, \ + __________________RAISE_L2_________________, __________________RAISE_R2_________________, \ + __________________RAISE_L3_________________, __________________RAISE_R3_________________, \ + __________________RAISE_L4_________________, __________________RAISE_R4_________________, \ + __________________RAISE_L5_________________, __________________RAISE_R5_________________ \ + ), + +#ifdef TRILAYER_ENABLED + [_ADJUST] = EXPAND_LAYOUT( \ + _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, \ + _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, \ + _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, \ + _________________ADJUST_L4_________________, _________________ADJUST_R4_________________, \ + _________________ADJUST_L5_________________, _________________ADJUST_R5_________________ \ + ), +#endif +}; + +#ifdef ENCODER_ENABLE +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder from slave */ + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } +} +#endif diff --git a/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk new file mode 100644 index 000000000000..dc687cbbd348 --- /dev/null +++ b/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk @@ -0,0 +1,42 @@ +# 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 +# + +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable global lighting effects. Do not enable with RGB Matrix +RGBLIGHT_ANIMATIONS = yes # LED animations +RGBLIGHT_SPLIT_ENABLE = yes # Split RGBLight Support +RGB_MATRIX_ENABLE = no # Enable per-key coordinate based RGB effects. Do not enable with RGBlight +RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. +RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port +UNICODE_ENABLE = no # Unicode +SWAP_HANDS_ENABLE = no # Enable one-hand typing +ENCODER_ENABLE = no # Enable rotary encoder +OLED_DRIVER_ENABLE = no # Enable the OLED Driver +IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) +LINK_TIME_OPTIMIZATION_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. + +# Do not edit past here + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) + OPT_DEFS += -DRGBLIGHT_FULL_POWER +endif + +ifeq ($(strip $(RGB_MATRIX_KEYPRESSES)), yes) + OPT_DEFS += -DRGB_MATRIX_KEYPRESSES +endif + +ifeq ($(strip $(RGBLIGHT_ANIMATIONS)), yes) + OPT_DEFS += -DRGBLIGHT_ANIMATIONS +endif + +ifeq ($(strip $(RGBLIGHT_SPLIT_ENABLE)), yes) + OPT_DEFS += -DRGBLIGHT_SPLIT_ENABLE +endif diff --git a/keyboards/rgbkb/zygomorph/readme.md b/keyboards/rgbkb/zygomorph/readme.md new file mode 100644 index 000000000000..72ca737d35f0 --- /dev/null +++ b/keyboards/rgbkb/zygomorph/readme.md @@ -0,0 +1,15 @@ +# Zygomorph + +![Zygomorph](https://cdn.shopify.com/s/files/1/0008/8827/5005/products/20190107_004053_2048x2048.jpg?v=1549333933) + +Zygomorph is the thinnest keyboard with a fully enclosed case. It's only 3.2mm thick below the switches, including screws. It can be used in 5x6 and 4x6 split, or 5x12 and 4x12 combined. It has per-key RGB, supports Kailh Choc and MX switches, and has 10 rotary encoder positions per half (only one can be used per half). The board has pre-soldered components, including type C ports and ATmega32U4. The build guide can be found [here](https://rgbkb.gitbook.io/rgbkb-build-guides/zygomorph-build-guide/). + +Keyboard Maintainer: [Legonut](https://github.com/Legonut) +Hardware Supported: Zygomorph R1.0 +Hardware Availability: [RGBKB](https://www.rgbkb.net) + +Make example for this keyboard (after setting up your build environment): + + make rgbkb/zygomorph: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). diff --git a/keyboards/rgbkb/zygomorph/rev1/config.h b/keyboards/rgbkb/zygomorph/rev1/config.h new file mode 100644 index 000000000000..107e58c12367 --- /dev/null +++ b/keyboards/rgbkb/zygomorph/rev1/config.h @@ -0,0 +1,101 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER RGBKB +#define PRODUCT Zygomorph +#define DESCRIPTION "RGB, thin, ortholinear" + +/* Select hand configuration */ +#define EE_HANDS + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_ROW_PINS { F1, F5, F7, B5, B4 } + +// wiring of each half +#define MATRIX_COLS 6 +#define MATRIX_COL_PINS { F4, F6, C7, C6, B6, D4 } + +#define SOFT_SERIAL_PIN D3 + +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { D7 } + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN B7 +#ifndef RGBLIGHT_SPLIT_ENABLE + #define RGBLED_NUM 30 +#else + #define RGBLED_NUM 60 + #define RGBLED_SPLIT { 30, 30 } +#endif +#define DRIVER_LED_TOTAL 30 + +#ifdef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 40 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 40 +#elif RGBLIGHT_FULL_POWER + #define RGBLIGHT_LIMIT_VAL 255 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +#else + #define RGBLIGHT_LIMIT_VAL 120 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 +#endif + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for Helix keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 500 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* + * 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 diff --git a/keyboards/rgbkb/zygomorph/rev1/info.json b/keyboards/rgbkb/zygomorph/rev1/info.json new file mode 100644 index 000000000000..b79c028ec70a --- /dev/null +++ b/keyboards/rgbkb/zygomorph/rev1/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "Zygomorph", + "url": "https://www.rgbkb.net/pages/introducing-the-zygomorph-keyboard", + "maintainer": "Legonut", + "width": 17, + "height": 6.5, + "layouts": { + "LAYOUT_ortho_5x12": { + "layout": [{"label":"`", "x":0, "y":0}, {"label":"1", "x":1, "y":0}, {"label":"2", "x":2, "y":0}, {"label":"3", "x":3, "y":0}, {"label":"4", "x":4, "y":0}, {"label":"5", "x":5, "y":0}, {"label":"6", "x":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":"BKSP", "x":12, "y":0}, {"label":"Tab", "x":0, "y":1}, {"label":"Q", "x":1, "y":1}, {"label":"W", "x":2, "y":1}, {"label":"E", "x":3, "y":1}, {"label":"R", "x":4, "y":1}, {"label":"T", "x":5, "y":1}, {"label":"Y", "x":7, "y":1}, {"label":"U", "x":8, "y":1}, {"label":"I", "x":9, "y":1}, {"label":"O", "x":10, "y":1}, {"label":"P", "x":11, "y":1}, {"label":"\\|", "x":12, "y":1}, {"label":"Esc", "x":0, "y":2}, {"label":"A", "x":1, "y":2}, {"label":"S", "x":2, "y":2}, {"label":"D", "x":3, "y":2}, {"label":"F", "x":4, "y":2}, {"label":"G", "x":5, "y":2}, {"label":"H", "x":7, "y":2}, {"label":"J", "x":8, "y":2}, {"label":"K", "x":9, "y":2}, {"label":"L", "x":10, "y":2}, {"label":";:", "x":11, "y":2}, {"label":"'\"", "x":12, "y":2}, {"label":"Shift", "x":0, "y":3}, {"label":"Z", "x":1, "y":3}, {"label":"X", "x":2, "y":3}, {"label":"C", "x":3, "y":3}, {"label":"V", "x":4, "y":3}, {"label":"B", "x":5, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":",<", "x":9, "y":3}, {"label":".>", "x":10, "y":3}, {"label":"/?", "x":11, "y":3}, {"label":"Enter", "x":12, "y":3}, {"label":"Ctrl", "x":0, "y":4}, {"label":"Alt", "x":1, "y":4}, {"label":"Super", "x":2, "y":4}, {"label":"RGB", "x":3, "y":4}, {"label":"⇓", "x":4, "y":4}, {"x":5, "y":4}, {"x":7, "y":4}, {"label":"FN", "x":8, "y":4}, {"label":"Left", "x":9, "y":4}, {"label":"Down", "x":10, "y":4}, {"label":"Up", "x":11, "y":4}, {"label":"Right", "x":12, "y":4}] + }, + "LAYOUT_ortho_4x12": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":7, "y":0}, {"label":"U", "x":8, "y":0}, {"label":"I", "x":9, "y":0}, {"label":"O", "x":10, "y":0}, {"label":"P", "x":11, "y":0}, {"label":"\\|", "x":12, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"H", "x":7, "y":1}, {"label":"J", "x":8, "y":1}, {"label":"K", "x":9, "y":1}, {"label":"L", "x":10, "y":1}, {"label":";:", "x":11, "y":1}, {"label":"'\"", "x":12, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"label":"N", "x":7, "y":2}, {"label":"M", "x":8, "y":2}, {"label":",<", "x":9, "y":2}, {"label":".>", "x":10, "y":2}, {"label":"/?", "x":11, "y":2}, {"label":"Enter", "x":12, "y":2}, {"label":"Ctrl", "x":0, "y":3}, {"label":"Alt", "x":1, "y":3}, {"label":"Super", "x":2, "y":3}, {"label":"RGB", "x":3, "y":3}, {"label":"⇓", "x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"label":"FN", "x":8, "y":3}, {"label":"Left", "x":9, "y":3}, {"label":"Down", "x":10, "y":3}, {"label":"Up", "x":11, "y":3}, {"label":"Right", "x":12, "y":3}] + }, + "LAYOUT_ortho_5x6": { + "layout": [{"label":"`", "x":0, "y":0}, {"label":"1", "x":1, "y":0}, {"label":"2", "x":2, "y":0}, {"label":"3", "x":3, "y":0}, {"label":"4", "x":4, "y":0}, {"label":"5", "x":5, "y":0}, {"label":"Tab", "x":0, "y":1}, {"label":"Q", "x":1, "y":1}, {"label":"W", "x":2, "y":1}, {"label":"E", "x":3, "y":1}, {"label":"R", "x":4, "y":1}, {"label":"T", "x":5, "y":1}, {"label":"Esc", "x":0, "y":2}, {"label":"A", "x":1, "y":2}, {"label":"S", "x":2, "y":2}, {"label":"D", "x":3, "y":2}, {"label":"F", "x":4, "y":2}, {"label":"G", "x":5, "y":2}, {"label":"Shift", "x":0, "y":3}, {"label":"Z", "x":1, "y":3}, {"label":"X", "x":2, "y":3}, {"label":"C", "x":3, "y":3}, {"label":"V", "x":4, "y":3}, {"label":"B", "x":5, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1, "y":4}, {"label":"Alt", "x":2, "y":4}, {"label":"Super", "x":3, "y":4}, {"label":"⇓", "x":4, "y":4}, {"x":5, "y":4}] + }, + "LAYOUT_ortho_4x6": { + "layout": [{"label":"Tab", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Esc", "x":0, "y":1}, {"label":"A", "x":1, "y":1}, {"label":"S", "x":2, "y":1}, {"label":"D", "x":3, "y":1}, {"label":"F", "x":4, "y":1}, {"label":"G", "x":5, "y":1}, {"label":"Shift", "x":0, "y":2}, {"label":"Z", "x":1, "y":2}, {"label":"X", "x":2, "y":2}, {"label":"C", "x":3, "y":2}, {"label":"V", "x":4, "y":2}, {"label":"B", "x":5, "y":2}, {"x":0, "y":3}, {"label":"Ctrl", "x":1, "y":3}, {"label":"Alt", "x":2, "y":3}, {"label":"Super", "x":3, "y":3}, {"label":"⇓", "x":4, "y":3}, {"x":5, "y":3}] + } + } +} diff --git a/keyboards/rgbkb/zygomorph/rev1/rev1.c b/keyboards/rgbkb/zygomorph/rev1/rev1.c new file mode 100644 index 000000000000..3edf48c5d541 --- /dev/null +++ b/keyboards/rgbkb/zygomorph/rev1/rev1.c @@ -0,0 +1,73 @@ +#include "zygomorph.h" + + +#ifdef RGB_MATRIX_ENABLE +#define RGB_LEFT_HAND { { 0 | ( 5 << 4) }, { 102, 0 }, 4}, \ + { { 0 | ( 4 << 4) }, { 81, 0 }, 4}, \ + { { 0 | ( 3 << 4) }, { 61, 0 }, 4}, \ + { { 0 | ( 2 << 4) }, { 41, 0 }, 4}, \ + { { 0 | ( 1 << 4) }, { 20, 0 }, 4}, \ + { { 0 | ( 0 << 4) }, { 0, 0 }, 1}, \ + { { 1 | ( 5 << 4) }, { 102, 16 }, 4}, \ + { { 1 | ( 4 << 4) }, { 81, 16 }, 4}, \ + { { 1 | ( 3 << 4) }, { 61, 16 }, 4}, \ + { { 1 | ( 2 << 4) }, { 41, 16 }, 4}, \ + { { 1 | ( 1 << 4) }, { 20, 16 }, 4}, \ + { { 1 | ( 0 << 4) }, { 0, 16 }, 1}, \ + { { 2 | ( 5 << 4) }, { 102, 32 }, 4}, \ + { { 2 | ( 4 << 4) }, { 81, 32 }, 4}, \ + { { 2 | ( 3 << 4) }, { 61, 32 }, 4}, \ + { { 2 | ( 2 << 4) }, { 41, 32 }, 4}, \ + { { 2 | ( 1 << 4) }, { 20, 32 }, 4}, \ + { { 2 | ( 0 << 4) }, { 0, 32 }, 1}, \ + { { 3 | ( 5 << 4) }, { 102, 48 }, 4}, \ + { { 3 | ( 4 << 4) }, { 81, 48 }, 4}, \ + { { 3 | ( 3 << 4) }, { 61, 48 }, 4}, \ + { { 3 | ( 2 << 4) }, { 41, 48 }, 4}, \ + { { 3 | ( 1 << 4) }, { 20, 48 }, 4}, \ + { { 3 | ( 0 << 4) }, { 0, 48 }, 1}, \ + { { 4 | ( 5 << 4) }, { 102, 64 }, 1}, \ + { { 4 | ( 4 << 4) }, { 81, 64 }, 1}, \ + { { 4 | ( 3 << 4) }, { 61, 64 }, 1}, \ + { { 4 | ( 2 << 4) }, { 41, 64 }, 1}, \ + { { 4 | ( 1 << 4) }, { 20, 64 }, 1}, \ + { { 4 | ( 0 << 4) }, { 0, 64 }, 1} + +#define RGB_RIGHT_HAND { { 0 | (11 << 4) }, { 224, 0 }, 1}, \ + { { 0 | (10 << 4) }, { 204, 0 }, 4}, \ + { { 0 | ( 9 << 4) }, { 183, 0 }, 4}, \ + { { 0 | ( 8 << 4) }, { 163, 0 }, 4}, \ + { { 0 | ( 7 << 4) }, { 143, 0 }, 4}, \ + { { 0 | ( 6 << 4) }, { 122, 0 }, 4}, \ + { { 1 | (11 << 4) }, { 224, 16 }, 1}, \ + { { 1 | (10 << 4) }, { 204, 16 }, 4}, \ + { { 1 | ( 9 << 4) }, { 183, 16 }, 4}, \ + { { 1 | ( 8 << 4) }, { 163, 16 }, 4}, \ + { { 1 | ( 7 << 4) }, { 143, 16 }, 4}, \ + { { 1 | ( 6 << 4) }, { 122, 16 }, 4}, \ + { { 2 | (11 << 4) }, { 224, 32 }, 1}, \ + { { 2 | (10 << 4) }, { 204, 32 }, 4}, \ + { { 2 | ( 9 << 4) }, { 183, 32 }, 4}, \ + { { 2 | ( 8 << 4) }, { 163, 32 }, 4}, \ + { { 2 | ( 7 << 4) }, { 143, 32 }, 4}, \ + { { 2 | ( 6 << 4) }, { 122, 32 }, 4}, \ + { { 3 | (11 << 4) }, { 224, 48 }, 1}, \ + { { 3 | (10 << 4) }, { 204, 48 }, 4}, \ + { { 3 | ( 9 << 4) }, { 183, 48 }, 4}, \ + { { 3 | ( 8 << 4) }, { 163, 48 }, 4}, \ + { { 3 | ( 7 << 4) }, { 143, 48 }, 4}, \ + { { 3 | ( 6 << 4) }, { 122, 48 }, 4}, \ + { { 4 | (11 << 4) }, { 224, 64 }, 1}, \ + { { 4 | (10 << 4) }, { 204, 64 }, 1}, \ + { { 4 | ( 9 << 4) }, { 183, 64 }, 1}, \ + { { 4 | ( 8 << 4) }, { 163, 64 }, 1}, \ + { { 4 | ( 7 << 4) }, { 143, 64 }, 1}, \ + { { 4 | ( 6 << 4) }, { 122, 64 }, 1} + +rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { +// Left Hand +RGB_LEFT_HAND +// Right Hand +//RGB_RIGHT_HAND +}; +#endif diff --git a/keyboards/rgbkb/zygomorph/rev1/rev1.h b/keyboards/rgbkb/zygomorph/rev1/rev1.h new file mode 100644 index 000000000000..c667088d05aa --- /dev/null +++ b/keyboards/rgbkb/zygomorph/rev1/rev1.h @@ -0,0 +1,87 @@ +#pragma once + +#include "zygomorph.h" +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + +#define LAYOUT_ortho_5x6( \ + L00, L01, L02, L03, L04, L05, \ + L10, L11, L12, L13, L14, L15, \ + L20, L21, L22, L23, L24, L25, \ + L30, L31, L32, L33, L34, L35, \ + L40, L41, L42, L43, L44, L45 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + } + +#define LAYOUT_ortho_5x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45 } \ + } + +#define LAYOUT_ortho_4x6( \ + L00, L01, L02, L03, L04, L05, \ + L10, L11, L12, L13, L14, L15, \ + L20, L21, L22, L23, L24, L25, \ + L30, L31, L32, L33, L34, L35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + } + +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + } diff --git a/keyboards/rgbkb/zygomorph/rev1/rules.mk b/keyboards/rgbkb/zygomorph/rev1/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/rgbkb/zygomorph/rules.mk b/keyboards/rgbkb/zygomorph/rules.mk new file mode 100644 index 000000000000..9bafc7b1d63c --- /dev/null +++ b/keyboards/rgbkb/zygomorph/rules.mk @@ -0,0 +1,69 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = qmk-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +SPLIT_KEYBOARD = yes +LAYOUTS = ortho_4x12 ortho_5x12 + +DEFAULT_FOLDER = rgbkb/zygomorph/rev1 diff --git a/keyboards/rgbkb/zygomorph/zygomorph.c b/keyboards/rgbkb/zygomorph/zygomorph.c new file mode 100644 index 000000000000..9f029813bce3 --- /dev/null +++ b/keyboards/rgbkb/zygomorph/zygomorph.c @@ -0,0 +1 @@ +#include "zygomorph.h" diff --git a/keyboards/zen/zen.h b/keyboards/rgbkb/zygomorph/zygomorph.h similarity index 52% rename from keyboards/zen/zen.h rename to keyboards/rgbkb/zygomorph/zygomorph.h index 56fc64fe26b1..24198ed4c9f0 100644 --- a/keyboards/zen/zen.h +++ b/keyboards/rgbkb/zygomorph/zygomorph.h @@ -1,7 +1,4 @@ -#ifndef ZEN_H -#define ZEN_H +#pragma once #include "rev1.h" #include "quantum.h" - -#endif diff --git a/keyboards/romac/config.h b/keyboards/romac/config.h new file mode 100644 index 000000000000..b92785fd5256 --- /dev/null +++ b/keyboards/romac/config.h @@ -0,0 +1,40 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TheRoyalSweatshirt +#define PRODUCT romac +#define DESCRIPTION A *Plaid inspired twelve-key macropad +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 3 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F7, B1, B3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#define BACKLIGHT_LEVELS 0 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/romac/info.json b/keyboards/romac/info.json new file mode 100644 index 000000000000..305785991e09 --- /dev/null +++ b/keyboards/romac/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "RoMac", + "url": "", + "maintainer": "TheRoyalSweatshirt", + "width": 3, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 12, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}] + } + } +} diff --git a/keyboards/romac/keymaps/default/keymap.c b/keyboards/romac/keymaps/default/keymap.c new file mode 100644 index 000000000000..35636f36b3f7 --- /dev/null +++ b/keyboards/romac/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* Copyright 2018 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 . + */ + +#include QMK_KEYBOARD_H + +#define _BASE 0 +#define _FN1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT( + KC_7, KC_8, KC_9, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + MO(_FN1), KC_0, KC_ENT \ + ), + + [_FN1] = LAYOUT( + KC_TRNS, KC_HOME, KC_PGUP, \ + KC_TRNS, KC_END, KC_PGDN, \ + KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_DOT \ + ) +}; diff --git a/keyboards/romac/keymaps/stanrc85/config.h b/keyboards/romac/keymaps/stanrc85/config.h new file mode 100644 index 000000000000..722fd7e9e9c5 --- /dev/null +++ b/keyboards/romac/keymaps/stanrc85/config.h @@ -0,0 +1,11 @@ +#undef RGBLED_NUM +#define RGBLED_NUM 16 + +#define RGB_DI_PIN F4 +#ifdef RGB_DI_PIN + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_ANIMATIONS +#endif + diff --git a/keyboards/romac/keymaps/stanrc85/keymap.c b/keyboards/romac/keymaps/stanrc85/keymap.c new file mode 100644 index 000000000000..ecca61cae00f --- /dev/null +++ b/keyboards/romac/keymaps/stanrc85/keymap.c @@ -0,0 +1,78 @@ +/* Copyright 2019 Stanrc85 + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "stanrc85.h" + +enum keys { + U_LAYR = SAFE_RANGE, + D_LAYR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NUMPAD] = LAYOUT( + KC_7, KC_8, KC_9, + KC_4, KC_5, KC_6, + KC_1, KC_2, KC_3, + U_LAYR, KC_0, KC_ENT), + + [_NAVKEY] = LAYOUT( + KC_HOME, KC_INS, KC_PGUP, + KC_END, KC_UP, KC_PGDN, + KC_LEFT, KC_DOWN, KC_RGHT, + U_LAYR, TD_TWIN, D_LAYR), + + [_MEDIA] = LAYOUT( + KC_MUTE, KC_VOLD, KC_VOLU, + CA_QUOT, KC_MPLY, CA_SCLN, + CA_COPY, CA_PSTE, KC_NO, + U_LAYR, KC_NO, D_LAYR), + + [_RGB] = LAYOUT( + RGB_SAI, RGB_VAI, RGB_HUI, + RGB_SAD, RGB_VAD, RGB_HUD, + RGB_TOG, RGB_MOD, KC_NO, + U_LAYR, KC_NO, D_LAYR), + + [_FN1PAD] = LAYOUT( + KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, RESET, + KC_NO, KC_NO, KC_MAKE, + KC_NO, KC_LSFT, D_LAYR) +}; + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + keypos_t key; + uint8_t current_layer; + uint8_t next_layer; + switch (keycode) { + case U_LAYR: //cycles up the layers + if (!record->event.pressed) { + current_layer = layer_switch_get_layer(key); + next_layer = current_layer+1; + layer_move(next_layer); + } + break; + case D_LAYR: //cycles down the layers + if (!record->event.pressed) { + current_layer = layer_switch_get_layer(key); + next_layer = current_layer-1; + layer_move(next_layer); + } + break; + } + return true; +}; diff --git a/keyboards/romac/keymaps/stanrc85/rules.mk b/keyboards/romac/keymaps/stanrc85/rules.mk new file mode 100644 index 000000000000..1e3cebb14515 --- /dev/null +++ b/keyboards/romac/keymaps/stanrc85/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/romac/readme.md b/keyboards/romac/readme.md new file mode 100644 index 000000000000..98ed21502af7 --- /dev/null +++ b/keyboards/romac/readme.md @@ -0,0 +1,16 @@ + +# RoMac + +![RoMac](https://i.imgur.com/hAOyoqj.jpg) + +A “Plaid” Inspired 12-Key (3x4) Macropad. + +- Keyboard Maintainer: [Garret G.](https://github.com/TheRoyalSweatshirt) +- Hardware Supported: RoMac rev.1, rev.2, Pro Micro, Elite-C, Proton C, BlueMicro. +- Hardware Availability: Through GB or Direct Message (If extra stock is available). + +Make example for this keyboard (after setting up your build environment): + + make romac: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). diff --git a/keyboards/romac/romac.c b/keyboards/romac/romac.c new file mode 100644 index 000000000000..24f4c16333ab --- /dev/null +++ b/keyboards/romac/romac.c @@ -0,0 +1 @@ +#include "romac.h" diff --git a/keyboards/romac/romac.h b/keyboards/romac/romac.h new file mode 100644 index 000000000000..e6fb9694d2e8 --- /dev/null +++ b/keyboards/romac/romac.h @@ -0,0 +1,16 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, \ + K10, K11, K12, \ + K20, K21, K22, \ + K30, K31, K32 \ +) \ +{ \ + { K00, K01, K02 }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 }, \ + { K30, K31, K32 } \ +} diff --git a/keyboards/romac/rules.mk b/keyboards/romac/rules.mk new file mode 100644 index 000000000000..b500f1b885a1 --- /dev/null +++ b/keyboards/romac/rules.mk @@ -0,0 +1,57 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no + diff --git a/keyboards/satan/config.h b/keyboards/satan/config.h index dbe98e87ef63..c15e5c37c168 100644 --- a/keyboards/satan/config.h +++ b/keyboards/satan/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -26,7 +25,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0003 #define MANUFACTURER SATAN #define PRODUCT GH60 -#define DESCRIPTION QMK keyboard firmware for Satan GH60 with WS2812 support +#define DESCRIPTION 60% keyboard with backlight and WS2812 support /* key matrix size */ #define MATRIX_ROWS 5 @@ -58,12 +57,11 @@ along with this program. If not, see . */ #define BACKLIGHT_LEVELS 4 -/* Underlight configuration +/* Underglow configuration */ - #define RGB_DI_PIN E2 #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 // Number of LEDs +#define RGBLED_NUM 8 #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 @@ -85,5 +83,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/satan/keymaps/ben_iso/keymap.c b/keyboards/satan/keymaps/ben_iso/keymap.c index 7cc8efc96d96..5dfb2ae703c5 100644 --- a/keyboards/satan/keymaps/ben_iso/keymap.c +++ b/keyboards/satan/keymaps/ben_iso/keymap.c @@ -64,7 +64,6 @@ #define MYCM KC_MYCM // Open default file manager // increase readability -#define _______ KC_TRNS #define XXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/satan/keymaps/bri/keymap.c b/keyboards/satan/keymaps/bri/keymap.c index 7f38ba6f5f1c..1f9430a9f136 100644 --- a/keyboards/satan/keymaps/bri/keymap.c +++ b/keyboards/satan/keymaps/bri/keymap.c @@ -5,7 +5,6 @@ #define _FL 1 #define _NAV 2 -#define _______ KC_TRNS #define A_LEFT LALT(KC_LEFT) #define A_RGHT LALT(KC_RGHT) diff --git a/keyboards/satan/keymaps/chaser/keymap.c b/keyboards/satan/keymaps/chaser/keymap.c index ef1095fb7e78..edba9a3091f7 100644 --- a/keyboards/satan/keymaps/chaser/keymap.c +++ b/keyboards/satan/keymaps/chaser/keymap.c @@ -12,8 +12,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/satan/keymaps/colemak/keymap.c b/keyboards/satan/keymaps/colemak/keymap.c index d81ca08933bc..08d456d6ce81 100644 --- a/keyboards/satan/keymaps/colemak/keymap.c +++ b/keyboards/satan/keymaps/colemak/keymap.c @@ -3,7 +3,7 @@ // Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) // 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. @@ -12,7 +12,9 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer @@ -29,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_BL] = LAYOUT_60_ansi( - F(0), 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, \ + SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC,KC_BSLS, \ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ @@ -40,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | RESET| * |-----------------------------------------------------------| * | | | | | | | | | | | |BL-|BL+|BL | - * |--------------------------------------------ΩΩ---------------| + * |-----------------------------------------------------------| * | | | | | | | | | | | | | * |-----------------------------------------------------------| * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | @@ -64,21 +66,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -86,7 +78,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -94,6 +86,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/satan/keymaps/default/keymap.c b/keyboards/satan/keymaps/default/keymap.c index 76bb8bfcf1fe..77c1b5005c29 100644 --- a/keyboards/satan/keymaps/default/keymap.c +++ b/keyboards/satan/keymaps/default/keymap.c @@ -1,99 +1,54 @@ #include QMK_KEYBOARD_H - - -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - // 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. -#define _BL 0 -#define _FL 1 - -#define _______ KC_TRNS +enum layer_names { + _BL, + _FL +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | + * |Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backsp| * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | * |-----------------------------------------------------------| - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | + * | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | * |-----------------------------------------------------------| - * |Ctrl|Gui |Alt | Space |Alt |Gui |FN |Ctrl | + * |Ctrl|GUI |Alt | Space | Alt| GUI| Fn | Ctrl| * `-----------------------------------------------------------' */ -[_BL] = LAYOUT_60_ansi( - F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS, \ - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, MO(_FL),KC_RCTL), + [_BL] = LAYOUT_60_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL + ), /* Keymap _FL: Function Layer * ,-----------------------------------------------------------. - * | | | | | | | | | | | | | | RESET| + * | ` | | | | | | | | | | | | | Reset | * |-----------------------------------------------------------| - * | | | | | | | | | | | |BL-|BL+|BL | + * | | | | | | | | | | | |BL-|BL+| BL | * |-----------------------------------------------------------| - * | | | | | | | | | | | | | + * | | | | | | | | | | | | | | * |-----------------------------------------------------------| - * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | + * | | | | | | | | | | | | | * |-----------------------------------------------------------| * | | | | | | | | | * `-----------------------------------------------------------' */ -[_FL] = LAYOUT_60_ansi( - #ifdef RGBLIGHT_ENABLE - KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______, \ - _______,_______,_______, _______, _______,_______,_______, _______), - #else - KC_GRV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC, BL_INC,BL_TOGG, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______, _______, _______,_______,_______,_______), - #endif + [_FL] = LAYOUT_60_ansi( + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, BL_TOGG, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______ + ) }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/satan/keymaps/dende_iso/keymap.c b/keyboards/satan/keymaps/dende_iso/keymap.c index be1bfd23aada..e6187c161523 100644 --- a/keyboards/satan/keymaps/dende_iso/keymap.c +++ b/keyboards/satan/keymaps/dende_iso/keymap.c @@ -13,9 +13,6 @@ // dual-role shortcuts #define FN_CAPS LT(_MEDIA, KC_CAPSLOCK) -// increase readability -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer * ,------------------------------------------------------------. diff --git a/keyboards/satan/keymaps/fakb/keymap.c b/keyboards/satan/keymaps/fakb/keymap.c index 5744a109df7f..93e11a5de2e4 100644 --- a/keyboards/satan/keymaps/fakb/keymap.c +++ b/keyboards/satan/keymaps/fakb/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H - -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define LCTL_MA LCTL_T(KC_UP) #define LSFT_MA LSFT_T(KC_DOWN) #define RSFT_MA SFT_T(KC_DOWN) diff --git a/keyboards/satan/keymaps/isoHHKB/keymap.c b/keyboards/satan/keymaps/isoHHKB/keymap.c index e1d93a1c31e3..701095907e8a 100644 --- a/keyboards/satan/keymaps/isoHHKB/keymap.c +++ b/keyboards/satan/keymaps/isoHHKB/keymap.c @@ -13,9 +13,6 @@ #define KC_ENYE M(0) #define KC_CEDL M(1) -#define _______ KC_TRNS - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index d73a01aea7b8..f05c46ff9120 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -32,10 +32,6 @@ #define GER_BRC_L RALT(KC_8) // [ #define GER_BRC_R RALT(KC_9) // ] -// increase readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _DEF: Default Layer * ,-----------------------------------------------------------. @@ -113,36 +109,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SFX] = LAYOUT_60_iso_split_rshift( RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ - _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ - _______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ + _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), }; -enum function_id { - LAUNCH, - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL, -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_FUNCTION(LAUNCH), - [2] = ACTION_FUNCTION(RGBLED_TOGGLE), - [3] = ACTION_FUNCTION(RGBLED_STEP_MODE), - [4] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [5] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [6] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [7] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [8] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [9] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), - [10] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -160,49 +131,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } return MACRO_NONE; }; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGBLED_TOGGLE: - //led operations - if (record->event.pressed) { - rgblight_toggle(); - } - break; - case RGBLED_INCREASE_HUE: - if (record->event.pressed) { - rgblight_increase_hue(); - } - break; - case RGBLED_DECREASE_HUE: - if (record->event.pressed) { - rgblight_decrease_hue(); - } - break; - case RGBLED_INCREASE_SAT: - if (record->event.pressed) { - rgblight_increase_sat(); - } - break; - case RGBLED_DECREASE_SAT: - if (record->event.pressed) { - rgblight_decrease_sat(); - } - break; - case RGBLED_INCREASE_VAL: - if (record->event.pressed) { - rgblight_increase_val(); - } - break; - case RGBLED_DECREASE_VAL: - if (record->event.pressed) { - rgblight_decrease_val(); - } - break; - case RGBLED_STEP_MODE: - if (record->event.pressed) { - rgblight_step(); - } - break; - } -} diff --git a/keyboards/satan/keymaps/midi/keymap.c b/keyboards/satan/keymaps/midi/keymap.c index e8ac01ed4bb6..141bef3d6432 100644 --- a/keyboards/satan/keymaps/midi/keymap.c +++ b/keyboards/satan/keymaps/midi/keymap.c @@ -8,10 +8,6 @@ #define _BL 0 #define _ML 1 -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/satan/keymaps/no_caps_lock/keymap.c b/keyboards/satan/keymaps/no_caps_lock/keymap.c new file mode 100644 index 000000000000..48659bb66b02 --- /dev/null +++ b/keyboards/satan/keymaps/no_caps_lock/keymap.c @@ -0,0 +1,55 @@ +#include QMK_KEYBOARD_H + +// 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_names { + _BL, + _FL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,-----------------------------------------------------------. + * | ~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | + * |-----------------------------------------------------------| + * |ESC | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | + * |-----------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Alt |FL |Gui |FL(tgl)| + * `-----------------------------------------------------------' + */ + [_BL] = LAYOUT_60_ansi( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RGUI, TG(_FL) + ), + + /* Keymap _FL: Function Layer + * ,-----------------------------------------------------------. + * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| DEL | + * |-----------------------------------------------------------| + * | |Home|PgUp| | | | | | | | |BR- |BR+ | | + * |-----------------------------------------------------------| + * | |End|PgDn| | | |Left|Down|Up|Right|Prv|Nxt|Ply | + * |-----------------------------------------------------------| + * | | | | | | | | |Vdn|Vup|Mute| | + * |-----------------------------------------------------------| + * | | | | | | | | | + * `-----------------------------------------------------------' + * hjkl for arrows because vim + */ + [_FL] = LAYOUT_60_ansi( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F14, KC_F15, KC_TRNS, \ + KC_TRNS, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_MPRV, KC_MNXT, KC_MPLY, \ + 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 + ), +}; diff --git a/keyboards/satan/keymaps/no_caps_lock/readme.md b/keyboards/satan/keymaps/no_caps_lock/readme.md new file mode 100644 index 000000000000..b3bfe7988e93 --- /dev/null +++ b/keyboards/satan/keymaps/no_caps_lock/readme.md @@ -0,0 +1 @@ +Standard layout with caps lock replaced by esc. Navigation and multimedia keys are on the second layer. diff --git a/keyboards/satan/keymaps/olligranlund_iso/keymap.c b/keyboards/satan/keymaps/olligranlund_iso/keymap.c index 5016d4377960..789543b56dca 100644 --- a/keyboards/satan/keymaps/olligranlund_iso/keymap.c +++ b/keyboards/satan/keymaps/olligranlund_iso/keymap.c @@ -49,7 +49,6 @@ #define MYCM KC_MYCM // Open default file manager // increase readability -#define _______ KC_TRNS #define XXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/satan/keymaps/olligranlund_iso/rules.mk b/keyboards/satan/keymaps/olligranlund_iso/rules.mk index 73106b6749d6..3d886f14f58e 100644 --- a/keyboards/satan/keymaps/olligranlund_iso/rules.mk +++ b/keyboards/satan/keymaps/olligranlund_iso/rules.mk @@ -13,5 +13,5 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/satan/keymaps/poker/keymap.c b/keyboards/satan/keymaps/poker/keymap.c index b908e8c4ae1c..13251a5645b1 100644 --- a/keyboards/satan/keymaps/poker/keymap.c +++ b/keyboards/satan/keymaps/poker/keymap.c @@ -2,7 +2,7 @@ // Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) // 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. @@ -12,9 +12,9 @@ #define _FL 1 #define _RL 2 -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_BL] = LAYOUT_60_ansi( - F(0), 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, \ + SFT_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ @@ -89,21 +89,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -111,7 +101,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -119,6 +109,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/satan/keymaps/sethbc/keymap.c b/keyboards/satan/keymaps/sethbc/keymap.c index 21a4f1fe1221..2a25b2b6b461 100644 --- a/keyboards/satan/keymaps/sethbc/keymap.c +++ b/keyboards/satan/keymaps/sethbc/keymap.c @@ -11,9 +11,6 @@ #define _BL 0 #define _FL 1 -// Fillers to make layering more clear -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/satan/keymaps/smt/keymap.c b/keyboards/satan/keymaps/smt/keymap.c index e12b305276e1..8546211d5e71 100644 --- a/keyboards/satan/keymaps/smt/keymap.c +++ b/keyboards/satan/keymaps/smt/keymap.c @@ -20,9 +20,6 @@ enum planck_keycodes { DVORAK }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define ALT_GRV ALT_T(KC_GRV) // Tap for Backtick, hold for Alt #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl diff --git a/keyboards/satan/keymaps/spacemanspiff/keymap.c b/keyboards/satan/keymaps/spacemanspiff/keymap.c index 7dc1d3d788b6..8caa70e02abf 100644 --- a/keyboards/satan/keymaps/spacemanspiff/keymap.c +++ b/keyboards/satan/keymaps/spacemanspiff/keymap.c @@ -9,8 +9,6 @@ #define CTL_ESC MT(MOD_LCTL,KC_ESC) #define GUI_ENT MT(MOD_RGUI, KC_ENT) -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. diff --git a/keyboards/satan/keymaps/stanleylai/keymap.c b/keyboards/satan/keymaps/stanleylai/keymap.c index e5c5dc60e207..633719a88b1d 100644 --- a/keyboards/satan/keymaps/stanleylai/keymap.c +++ b/keyboards/satan/keymaps/stanleylai/keymap.c @@ -12,10 +12,6 @@ #define _FL 1 #define _RGBL 2 -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // See base_layer.png and rgb_layer.png for layout reference diff --git a/keyboards/satan/keymaps/unxmaal/keymap.c b/keyboards/satan/keymaps/unxmaal/keymap.c index 20641416b7ec..f311ebeebb59 100644 --- a/keyboards/satan/keymaps/unxmaal/keymap.c +++ b/keyboards/satan/keymaps/unxmaal/keymap.c @@ -13,8 +13,6 @@ #define _AL 1 #define _FL 2 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * ANSI Base, Mac style diff --git a/keyboards/satan/pinout.txt b/keyboards/satan/pinout.txt deleted file mode 100644 index d1ad4ac88350..000000000000 --- a/keyboards/satan/pinout.txt +++ /dev/null @@ -1 +0,0 @@ -For WS2812B LED strip support, connect DIN from strip to PE2 on ATmega32u4 controller (see reference image controller.jpg) \ No newline at end of file diff --git a/keyboards/satan/readme.md b/keyboards/satan/readme.md index a2552edf8db9..7eb272cf304b 100644 --- a/keyboards/satan/readme.md +++ b/keyboards/satan/readme.md @@ -1,15 +1,33 @@ -Satan GH60 -========== +# Satan GH60 -![controller](https://i.imgur.com/9vyRBoT.jpg) -![power](https://i.imgur.com/pHMZHLP.jpg) +A clone of the GH60 60% keyboard, with full backlighting support. Keyboard Maintainer: QMK Community Hardware Supported: Satan GH60 PCB -Hardware Availability: https://1upkeyboards.com/gh60-satan-pcb.html +Hardware Availability: https://www.1upkeyboards.com/shop/controllers/gh60-satan-pcb/ Make example for this keyboard (after setting up your build environment): make satan: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). + +## RGB Underglow (WS2812B LED Strip) + +This board also supports underglow with a slight mod. + +Connect the DIN pad of the LED strip to PE2 on the ATmega32U4, like so: + +![controller](https://i.imgur.com/9vyRBoT.jpg) + +Then connect VCC and GND to pins 1 and 6 at the bottom of the PCB: + +![power](https://i.imgur.com/pHMZHLP.jpg) + +## ISP Header + +If you want to flash another bootloader (such as QMK-DFU), or can't get into the bootloader in the first place, the row of pins at the bottom can be used to ISP flash the board: + +| 1 | 2 | 3 | 4 | 5 | 6 | 7 | +|---|----|---|----|-----|---|----| +|VCC|MISO|SCK|MOSI|RESET|GND|*NC*| diff --git a/keyboards/satan/rules.mk b/keyboards/satan/rules.mk index 98200ab02ca0..51161490e4d2 100644 --- a/keyboards/satan/rules.mk +++ b/keyboards/satan/rules.mk @@ -1,6 +1,4 @@ - # MCU name -#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. @@ -16,7 +14,6 @@ MCU = atmega32u4 # software delays. F_CPU = 16000000 - # # LUFA specific # @@ -39,7 +36,6 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Boot Section Size in *bytes* # Teensy halfKay 512 # Teensy++ halfKay 1024 @@ -48,21 +44,20 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # USBaspLoader 2048 OPT_DEFS += -DBOOTLOADER_SIZE=4096 - # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) 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 (+4870) BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE = no # MIDI controls +MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift \ No newline at end of file +LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift diff --git a/keyboards/satan/satan.c b/keyboards/satan/satan.c index d2c5d5c2054a..8542a57c43a7 100644 --- a/keyboards/satan/satan.c +++ b/keyboards/satan/satan.c @@ -1,30 +1,24 @@ #include "satan.h" -#include "led.h" void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); + matrix_init_user(); + led_init_ports(); }; void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - matrix_scan_user(); + matrix_scan_user(); }; void led_init_ports(void) { - // * Set our LED pins as output - DDRB |= (1<<2); + setPinOutput(B2); } void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. #define MATRIX_ROWS 5 #define MATRIX_COLS 17 -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/scarletbandana/keymaps/default/config.h b/keyboards/scarletbandana/keymaps/default/config.h index 36f483c11194..8533e6f6d642 100644 --- a/keyboards/scarletbandana/keymaps/default/config.h +++ b/keyboards/scarletbandana/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/scythe/config.h b/keyboards/scythe/config.h new file mode 100644 index 000000000000..76d3323645a7 --- /dev/null +++ b/keyboards/scythe/config.h @@ -0,0 +1,240 @@ +/* Copyright 2019 ENDO Katsuhiro + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3941 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kagizaraya +#define PRODUCT Scythe +#define DESCRIPTION Yet another 60% split keyboard + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F7, F6, F5, F4, D5 } +#define MATRIX_COL_PINS { D6, D7, B4, B5, B6, C6, C7 } +#define UNUSED_PINS + +#define SOFT_SERIAL_PIN D0 + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGBLIGHT_SPLIT 1 +#define RGB_DI_PIN F0 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 9 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) +*/ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +/* Serial settings */ +#define USE_SERIAL +//#define EE_HANDS +#define I2C_MASTER_LEFT +//#define I2C_MASTER_RIGHT + +#define TAPPING_TERM 120 + diff --git a/keyboards/scythe/info.json b/keyboards/scythe/info.json new file mode 100644 index 000000000000..864d5ee29ddc --- /dev/null +++ b/keyboards/scythe/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Scythe", + "url": "", + "maintainer": "ka2hiro", + "width": 19, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":2, "y":0}, {"label":"1", "x":3, "y":0}, {"label":"2", "x":4, "y":0}, {"label":"3", "x":5, "y":0}, {"label":"4", "x":6, "y":0}, {"label":"5", "x":7, "y":0}, {"label":"_", "x":8, "y":0}, {"label":"+", "x":9.5, "y":0}, {"label":"6", "x":10.5, "y":0}, {"label":"7", "x":11.5, "y":0}, {"label":"8", "x":12.5, "y":0}, {"label":"9", "x":13.5, "y":0}, {"label":"0", "x":14.5, "y":0}, {"label":"\\", "x":15.5, "y":0}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"{", "x":7.75, "y":1}, {"label":"}", "x":9.75, "y":1}, {"label":"Y", "x":10.75, "y":1}, {"label":"U", "x":11.75, "y":1}, {"label":"I", "x":12.75, "y":1}, {"label":"O", "x":13.75, "y":1}, {"label":"P", "x":14.75, "y":1}, {"label":"Backace", "x":15.75, "y":1, "w":1.5}, {"label":"Control", "x":0.75, "y":2, "w":1.75}, {"label":"A", "x":2.5, "y":2}, {"label":"S", "x":3.5, "y":2}, {"label":"D", "x":4.5, "y":2}, {"label":"F", "x":5.5, "y":2}, {"label":"G", "x":6.5, "y":2}, {"label":"~", "x":7.5, "y":2}, {"label":"\"", "x":10, "y":2}, {"label":"H", "x":11, "y":2}, {"label":"J", "x":12, "y":2}, {"label":"K", "x":13, "y":2}, {"label":"L", "x":14, "y":2}, {"label":":", "x":15, "y":2}, {"label":"Return", "x":16, "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":"Caps", "x":7.25, "y":3}, {"label":"Del", "x":10.25, "y":3}, {"label":"N", "x":11.25, "y":3}, {"label":"M", "x":12.25, "y":3}, {"label":"<", "x":13.25, "y":3}, {"label":">", "x":14.25, "y":3}, {"label":"?", "x":15.25, "y":3}, {"label":"Shift", "x":16.25, "y":3, "w":1.75}, {"label":"Fn", "x":18, "y":3}, {"label":"", "x":2.75, "y":4, "w":1.25}, {"label":"", "x":4, "y":4, "w":1.25}, {"label":"Fn", "x":5.25, "y":4, "w":1.25}, {"x":6.5, "y":4, "w":2}, {"x":10, "y":4, "w":2}, {"label":"Fn", "x":12, "y":4, "w":1.25}, {"label":"", "x":13.25, "y":4, "w":1.25}, {"label":"", "x":14.5, "y":4, "w":1.25}] + } + } +} + diff --git a/keyboards/scythe/keymaps/default/config.h b/keyboards/scythe/keymaps/default/config.h new file mode 100644 index 000000000000..cea12f905cd2 --- /dev/null +++ b/keyboards/scythe/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/scythe/keymaps/default/keymap.c b/keyboards/scythe/keymaps/default/keymap.c new file mode 100644 index 000000000000..56b6b32c8c60 --- /dev/null +++ b/keyboards/scythe/keymaps/default/keymap.c @@ -0,0 +1,75 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum layer_names { + _QWERTY, + _HAPPY, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + HAPPY, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * + * ,------------------------------------------------. ,------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | BkSp | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | ` | | ' | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------. + * |Shift | Z | X | C | V | B | Caps | | Del | N | M | , | . | / |Shift | Fn | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | LAlt | LGUI | Fn | Space| |Space | Fn | LGUI | LAlt | + * `---------------------------' `---------------------------' + */ +[_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, 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_GRV, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CAPS, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_HAPPY), + KC_LALT, KC_LGUI, MO(_HAPPY), KC_SPC, KC_SPC, MO(_HAPPY), KC_RGUI, KC_RALT +), + +/* Happy + * + * ,------------------------------------------------. ,------------------------------------------------. + * | Pwr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F0 | Del | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Caps | F11 | F12 |BLTOGG| |BL INC|BL DEC| | | | Psc | Slk | Pus | Up | Ins | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | Vol- | Vol+ | Mute |RGBHUI|RGBSAI|RGBVAI| | * | / | Home | PgUp | Left | Right| | + * |------+------+------+------+------+------+------| +------+------+------+------+------+------+------+------. + * | |RGBTOG|RGBMOD|RGBRMD|RGBHUD|RGBSAD|RGBVAD| | + | - | End | PgDn | Down | | | | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | | | | | | | | | | + * `---------------------------' `---------------------------' + */ +[_HAPPY] = LAYOUT( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + KC_CAPS, KC_F10, KC_F12, BL_TOGG, _______, BL_INC , BL_DEC , _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_INS, + _______, KC_VOLD, KC_VOLU, KC_MUTE, RGB_HUI, RGB_SAI, RGB_VAI, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + diff --git a/keyboards/scythe/keymaps/default/readme.md b/keyboards/scythe/keymaps/default/readme.md new file mode 100644 index 000000000000..c4d73c4e33d7 --- /dev/null +++ b/keyboards/scythe/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default keymap for scythe + diff --git a/keyboards/scythe/keymaps/forties/config.h b/keyboards/scythe/keymaps/forties/config.h new file mode 100644 index 000000000000..cea12f905cd2 --- /dev/null +++ b/keyboards/scythe/keymaps/forties/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/scythe/keymaps/forties/keymap.c b/keyboards/scythe/keymaps/forties/keymap.c new file mode 100644 index 000000000000..4d2fc882439d --- /dev/null +++ b/keyboards/scythe/keymaps/forties/keymap.c @@ -0,0 +1,205 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum layer_names { + _QWERTY, + _HAPPY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + HAPPY, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * + * ,------------------------------------------------. ,------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | \ | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | BkSp | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | ` | | ' | H | J | K | L | ; |Enter | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------. + * |Shift | Z | X | C | V | B | Caps | | Del | N | M | , | . | / |Shift | Fn | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | LAlt | LGUI | LOWER|Ctr/Esc| |Spc/Sft | RAISE| LGUI | LAlt | + * `---------------------------' `---------------------------' + */ +[_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, 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_GRV, KC_QUOT, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CAPS, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, HAPPY, + KC_LALT, KC_LGUI, LOWER, MT(MOD_LCTL, KC_ESC), MT(MOD_LSFT, KC_SPC), RAISE, KC_RGUI, KC_RALT +), + +/* Happy + * + * ,------------------------------------------------. ,------------------------------------------------. + * | Pwr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F0 | Del | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Caps | F11 | F12 |BLTOGG| |BL INC|BL DEC| | | | Psc | Slk | Pus | Up | Ins | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | Vol- | Vol+ | Mute |RGBHUI|RGBSAI|RGBVAI| | * | / | Home | PgUp | Left | Right| | + * |------+------+------+------+------+------+------| +------+------+------+------+------+------+------+------. + * | |RGBTOG|RGBMOD|RGBRMD|RGBHUD|RGBSAD|RGBVAD| | + | - | End | PgDn | Down | | | | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | | | | | | | | | | + * `---------------------------' `---------------------------' + */ +[_HAPPY] = LAYOUT( + KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + KC_CAPS, KC_F10, KC_F12, BL_TOGG, _______, BL_INC , BL_DEC , _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_INS, + _______, KC_VOLD, KC_VOLU, KC_MUTE, RGB_HUI, RGB_SAI, RGB_VAI, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, + _______, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + + +/* Raise + * + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | _ | + | | | ~ | | | | : | " | > | { | } | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------. + * | | | - | = | \ | ` | | | | ; | ' | < | [ | ] | | | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | | | | | | | | | | + * `---------------------------' `---------------------------' + */ +[_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD, _______, _______, KC_COLN, KC_DQUO, KC_GT, KC_LCBR, KC_RCBR, _______, + _______, _______, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, _______, _______, KC_SCLN, KC_QUOT, KC_LT, KC_LBRC, KC_RBRC, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + + +/* Lower + * + * ,------------------------------------------------. ,------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | | | | | Enter| | | Left | Down | Up | Right| | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------. + * | | | | | | | Del | | BkSp | | PgUp | PgDn | | | | | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | | | | | | | | | | + * `---------------------------' `---------------------------' + */ +[_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______, KC_ENT, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, KC_BSPC, _______, KC_PGUP, KC_PGDN, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +), + + +/* Adjust + * + * ,------------------------------------------------. ,------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F0 | Del | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | F11 | F12 |BLTOGG| |BL INC|BL DEC| | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | | | |RGBMOD|RGBHUI|RGBSAI|RGBVAI| | | | | | | | | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------+------. + * | | Reset| |RGBTOG|RGBHUD|RGBSAD|RGBVAD| | | Prev | Next | Vol- | Vol+ | Play | | | + * `--------------------+------+------+------+------| |------+------+------+------+------+------+------+------' + * | | | | | | | | | | + * `---------------------------' `---------------------------' + */ +[_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_F10, KC_F12, BL_TOGG, _______, BL_INC , BL_DEC , _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, + _______, RESET, _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + // persistant_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); + } + return false; + case HAPPY: + if (record->event.pressed) { + layer_on(_HAPPY); + } else { + layer_off(_HAPPY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/scythe/keymaps/forties/readme.md b/keyboards/scythe/keymaps/forties/readme.md new file mode 100644 index 000000000000..162792dc375a --- /dev/null +++ b/keyboards/scythe/keymaps/forties/readme.md @@ -0,0 +1,2 @@ +# The forty percent compatible keymap for scythe + diff --git a/keyboards/scythe/readme.md b/keyboards/scythe/readme.md new file mode 100644 index 000000000000..fed4a77e2fde --- /dev/null +++ b/keyboards/scythe/readme.md @@ -0,0 +1,15 @@ +# Scythe + +![Scythe](https://i.imgur.com/jBqQAAt.jpg) + +Yet another 60% symmetrical split keyboard. + +Keyboard Maintainer: [ka2hiro](https://github.com/ka2hiro) [@ka2hiro](https://twitter.com/ka2hiro) +Hardware Supported: Scythe PCB, ATMEGA32U4 +Hardware Availability: [@kagizaraya](https://twitter.com/kagizaraya) + +Make example for this keyboard (after setting up your build environment): + + make scythe:default:dfu + +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). diff --git a/keyboards/scythe/rules.mk b/keyboards/scythe/rules.mk new file mode 100644 index 000000000000..1ad80dc8980b --- /dev/null +++ b/keyboards/scythe/rules.mk @@ -0,0 +1,85 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +SPLIT_KEYBOARD = yes # Use shared split_common +RGBLIGHT_SPLIT = yes + diff --git a/keyboards/scythe/scythe.c b/keyboards/scythe/scythe.c new file mode 100644 index 000000000000..e8060ac278e2 --- /dev/null +++ b/keyboards/scythe/scythe.c @@ -0,0 +1,43 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#include "scythe.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/scythe/scythe.h b/keyboards/scythe/scythe.h new file mode 100644 index 000000000000..c13c63fdd030 --- /dev/null +++ b/keyboards/scythe/scythe.h @@ -0,0 +1,51 @@ +/* Copyright 2019 ENDO Katsuhiro + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +// readability +#define ___ KC_NO + +#define LAYOUT( \ + L01, L02, L03, L04, L05, L06, L07, R01, R02, R03, R04, R05, R06, R07, \ + L08, L09, L10, L11, L12, L13, L14, R08, R09, R10, R11, R12, R13, R14, \ + L15, L16, L17, L18, L19, L20, L21, R15, R16, R17, R18, R19, R20, R21, \ + L22, L23, L24, L25, L26, L27, L28, R22, R23, R24, R25, R26, R27, R28, R33, \ + L29, L30, L31, L32, R29, R30, R31, R32 \ + ) \ + { \ + { L01, L02, L03, L04, L05, L06, L07 }, \ + { L08, L09, L10, L11, L12, L13, L14 }, \ + { L15, L16, L17, L18, L19, L20, L21 }, \ + { L22, L23, L24, L25, L26, L27, L28 }, \ + { L29, L30, L31, L32, ___, ___, ___ }, \ + { R01, R02, R03, R04, R05, R06, R07 }, \ + { R08, R09, R10, R11, R12, R13, R14 }, \ + { R15, R16, R17, R18, R19, R20, R21 }, \ + { R22, R23, R24, R25, R26, R27, R28 }, \ + { R29, R30, R31, R32, ___, ___, R33 } \ + } + diff --git a/keyboards/sentraq/number_pad/config.h b/keyboards/sentraq/number_pad/config.h index 0769f9f3d219..f02e537b698a 100644 --- a/keyboards/sentraq/number_pad/config.h +++ b/keyboards/sentraq/number_pad/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { C7, D5, D1, D0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN B7 diff --git a/keyboards/sentraq/s60_x/default/config.h b/keyboards/sentraq/s60_x/default/config.h index f6b7f8d6833e..d7fb79625c75 100644 --- a/keyboards/sentraq/s60_x/default/config.h +++ b/keyboards/sentraq/s60_x/default/config.h @@ -1,15 +1,43 @@ -#ifndef DEFAULT_CONFIG_H -#define DEFAULT_CONFIG_H +#pragma once #include "config_common.h" +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Sentraq #define PRODUCT S60-X -#define DESCRIPTION q.m.k. keyboard firmware for S60-X +#define DESCRIPTION QMK keyboard firmware for S60-X +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ #define MATRIX_ROW_PINS { B7, B3, B2, B1, B0 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, E6, F1 } #define UNUSED_PINS { F0 } +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +#endif + +/* 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 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE @@ -17,4 +45,3 @@ #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -#endif diff --git a/keyboards/sentraq/s60_x/default/default.h b/keyboards/sentraq/s60_x/default/default.h index f3646f155902..e330d99bb0e4 100644 --- a/keyboards/sentraq/s60_x/default/default.h +++ b/keyboards/sentraq/s60_x/default/default.h @@ -17,16 +17,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef DEFAULT_H -#define DEFAULT_H +#pragma once #include "quantum.h" -#ifdef __INTELLISENSE__ -#define PROGMEM -#include "../config.h" -#endif - /* S60-X keymap definition macro * K31 is the extra key next to short left ISO shift * K2C is the moved key next to enter on ISO boards @@ -67,6 +61,19 @@ along with this program. If not, see . { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, XXX, } \ } +#define LAYOUT_60_hhkb( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K41, K42, K46, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, XXX, }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, XXX, }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, }, \ + { XXX, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, XXX, K4B, K4C, XXX, XXX, } \ +} #define LAYOUT_60_ansi_split_bs_rshift( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ @@ -114,5 +121,3 @@ along with this program. If not, see . { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E }, \ { KC_##K40, KC_##K41, KC_##K42, XXX, XXX, XXX, KC_##K46, XXX, XXX, XXX, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, XXX } \ } - -#endif diff --git a/keyboards/sentraq/s60_x/default/rules.mk b/keyboards/sentraq/s60_x/default/rules.mk index ce4064d1c6a3..af43bf6c5c61 100644 --- a/keyboards/sentraq/s60_x/default/rules.mk +++ b/keyboards/sentraq/s60_x/default/rules.mk @@ -1,5 +1,68 @@ -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # 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 -RGBLIGHT_ENABLE = no + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# 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 +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + + +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_hhkb \ No newline at end of file diff --git a/keyboards/sentraq/s60_x/default/info.json b/keyboards/sentraq/s60_x/info.json similarity index 87% rename from keyboards/sentraq/s60_x/default/info.json rename to keyboards/sentraq/s60_x/info.json index 1aa2dbf3e00a..1e4514ac8ed5 100644 --- a/keyboards/sentraq/s60_x/default/info.json +++ b/keyboards/sentraq/s60_x/info.json @@ -11,6 +11,9 @@ "LAYOUT_60_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":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, + "LAYOUT_60_hhkb": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}] + }, "LAYOUT_60_ansi_split_bs_rshift": { "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}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps 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":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] }, diff --git a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/config.h b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/config.h index aee65690f326..e960f8c5b733 100644 --- a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/config.h +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/config.h @@ -1,9 +1,5 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // keymap needs oneshot functionality #undef NO_ACTION_ONESHOT -#endif diff --git a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c index e4660e668876..08780a28c16e 100644 --- a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c @@ -16,10 +16,6 @@ along with this program. If not, see . #include QMK_KEYBOARD_H -//make keymap a little easier to read -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define ONESHOT_TAP_TOGGLE 2 #define ONESHOT_TIMEOUT 1 diff --git a/keyboards/sentraq/s60_x/keymaps/default/keymap.c b/keyboards/sentraq/s60_x/keymaps/default/keymap.c index c730505cdb1c..33789a569627 100644 --- a/keyboards/sentraq/s60_x/keymaps/default/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/default/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: Main layer @@ -16,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ * │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ + * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│ * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ /* 0: ANSI qwerty */ @@ -25,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_FN0, KC_APP, KC_RCTL \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL \ ), /* 1: Fn layer @@ -49,7 +45,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; diff --git a/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c b/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c index fdaa6065bd0f..e707a5d960d2 100644 --- a/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: Main layer @@ -16,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ * │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ + * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│ * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ /* 0: ANSI qwerty */ @@ -25,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_FN0, KC_APP, KC_RCTL \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL \ ), /* 1: Fn layer @@ -51,7 +47,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; diff --git a/keyboards/sentraq/s60_x/keymaps/iso/keymap.c b/keyboards/sentraq/s60_x/keymaps/iso/keymap.c index d10bfcc1365a..aec23f1aee22 100644 --- a/keyboards/sentraq/s60_x/keymaps/iso/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/iso/keymap.c @@ -10,7 +10,7 @@ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ │LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ -│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ +│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│ └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, NO, \ CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NUHS, ENT , \ LSFT, BSLS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \ - LCTL, LGUI, LALT, SPC, RALT, FN0, APP, RCTL), + LCTL, LGUI, LALT, SPC, RALT, MO(1),APP, RCTL), /* 1: Fn layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -42,7 +42,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; diff --git a/keyboards/sentraq/s60_x/keymaps/iso_rgb/keymap.c b/keyboards/sentraq/s60_x/keymaps/iso_rgb/keymap.c index d76055a82e7b..22651885d95b 100644 --- a/keyboards/sentraq/s60_x/keymaps/iso_rgb/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/iso_rgb/keymap.c @@ -10,7 +10,7 @@ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ │LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ -│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ +│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│ └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_NO, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT , \ KC_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_NO, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_FN0, KC_APP, KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL), /* 1: Fn layer UG = Underglow = RGB Backlighting @@ -44,7 +44,3 @@ BL = Backlighting = In-Switch LED KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; diff --git a/keyboards/sentraq/s60_x/readme.md b/keyboards/sentraq/s60_x/readme.md index 09ad068e7386..927a2f0401c0 100644 --- a/keyboards/sentraq/s60_x/readme.md +++ b/keyboards/sentraq/s60_x/readme.md @@ -1,16 +1,16 @@ -S60-x -===== +# S60-x + DIY compact keyboard designed by VinnyCordeiro for Sentraq. Most of the keymaps are based on GH60 code. This is a port from TMK to QMK based on the [original S60-X Repo](https://github.com/VinnyCordeiro/tmk_keyboard). Keyboard Maintainer: QMK Community Hardware Supported: S60-x PCB Hardware Availability: https://www.massdrop.com/buy/sentraq-60-diy-keyboard-kit?mode=guest_open -There are two versions of this keyboard, an RGB and a non RGB one. +There are two versions of this keyboard, an RGB and a non RGB one. Firmware built for one, will not work on the other. Make example for this keyboard (after setting up your build environment): - make sentraq/s60_x:default + make sentraq/s60_x/default:default Make example for rgb version of this keyboard: diff --git a/keyboards/sentraq/s60_x/rgb/config.h b/keyboards/sentraq/s60_x/rgb/config.h index d9c26658dfd9..0e231a722809 100644 --- a/keyboards/sentraq/s60_x/rgb/config.h +++ b/keyboards/sentraq/s60_x/rgb/config.h @@ -1,22 +1,43 @@ -#ifndef RBG_CONFIG_H -#define RBG_CONFIG_H +#pragma once #include "config_common.h" +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Sentraq #define PRODUCT S60-X-RGB -#define DESCRIPTION q.m.k. keyboard firmware for S60-X RGB +#define DESCRIPTION QMK keyboard firmware for S60-X RGB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 /* key matrix pins */ #define MATRIX_ROW_PINS { B5, B4, D7, D6, D4 } #define MATRIX_COL_PINS { D0, D1, D2, D3, D5, B6, C6, C7, F1, F0, E6, B3, B2, B1, B0 } #define UNUSED_PINS +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +#endif + /* 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 +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + #define RGB_DI_PIN F6 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS @@ -26,4 +47,3 @@ #define RGBLIGHT_VAL_STEP 8 #endif -#endif diff --git a/keyboards/sentraq/s60_x/rgb/info.json b/keyboards/sentraq/s60_x/rgb/info.json deleted file mode 100644 index 1aa2dbf3e00a..000000000000 --- a/keyboards/sentraq/s60_x/rgb/info.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "keyboard_name": "S60-X", - "url": "", - "maintainer": "qmk", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps 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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"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":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - "LAYOUT_60_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":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - "LAYOUT_60_ansi_split_bs_rshift": { - "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}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps 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":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - "LAYOUT_60_iso": { - "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"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":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - } - } -} \ No newline at end of file diff --git a/keyboards/sentraq/s60_x/rgb/rgb.h b/keyboards/sentraq/s60_x/rgb/rgb.h index d70473eeaaa2..59ffdfbbfa88 100644 --- a/keyboards/sentraq/s60_x/rgb/rgb.h +++ b/keyboards/sentraq/s60_x/rgb/rgb.h @@ -1,5 +1,4 @@ -#ifndef S60XRGB_H -#define S60XRGB_H +#pragma once #include "quantum.h" @@ -35,6 +34,19 @@ { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, XXX, } \ } +#define LAYOUT_60_hhkb( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K41, K42, K46, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, XXX, }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, XXX, }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, }, \ + { XXX, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, XXX, K4B, K4C, XXX, XXX, } \ +} #define LAYOUT_60_ansi_split_bs_rshift( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ @@ -82,5 +94,3 @@ { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E }, \ { KC_##K40, KC_##K41, KC_##K42, XXX, XXX, XXX, KC_##K46, XXX, XXX, XXX, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, XXX } \ } - -#endif diff --git a/keyboards/sentraq/s60_x/rgb/rules.mk b/keyboards/sentraq/s60_x/rgb/rules.mk index 42d45c332bda..409d60abf51f 100644 --- a/keyboards/sentraq/s60_x/rgb/rules.mk +++ b/keyboards/sentraq/s60_x/rgb/rules.mk @@ -1,5 +1,73 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +# 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 +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # 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 BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable RGB light \ No newline at end of file +RGBLIGHT_ENABLE = yes # Enable RGB light + + +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_hhkb \ No newline at end of file diff --git a/keyboards/sentraq/s60_x/s60_x.c b/keyboards/sentraq/s60_x/s60_x.c deleted file mode 100644 index 595418bfacc6..000000000000 --- a/keyboards/sentraq/s60_x/s60_x.c +++ /dev/null @@ -1 +0,0 @@ -#include "s60_x.h" \ No newline at end of file diff --git a/keyboards/sentraq/s60_x/s60_x.h b/keyboards/sentraq/s60_x/s60_x.h deleted file mode 100644 index 59c9741b5a87..000000000000 --- a/keyboards/sentraq/s60_x/s60_x.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef S60X_H -#define S60X_H - -#ifdef KEYBOARD_sentraq_s60_x_default - #include "default.h" -#endif -#ifdef KEYBOARD_sentraq_s60_x_rgb - #include "rgb.h" -#endif - -#include "quantum.h" - -#endif diff --git a/keyboards/signum/3_0/elitec/config.h b/keyboards/signum/3_0/elitec/config.h new file mode 100644 index 000000000000..3df07d17fcbb --- /dev/null +++ b/keyboards/signum/3_0/elitec/config.h @@ -0,0 +1,26 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xF1E7 +#define PRODUCT_ID 0x5163 +#define DEVICE_VER 0x0000 +#define MANUFACTURER troyfletcher +#define PRODUCT Signum +#define DESCRIPTION q.m.k. keyboard firmware for Signum 3.0 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D2, D1, F5, B5 } +#define MATRIX_COL_PINS { B4, D7, D0, E6, D4, F6, F4, F7, B1, B3, C6, B2 } +#define UNUSED_PINS + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/signum/3_0/elitec/elitec.c b/keyboards/signum/3_0/elitec/elitec.c new file mode 100644 index 000000000000..78195260b113 --- /dev/null +++ b/keyboards/signum/3_0/elitec/elitec.c @@ -0,0 +1 @@ +#include "elitec.h" diff --git a/keyboards/signum/3_0/elitec/elitec.h b/keyboards/signum/3_0/elitec/elitec.h new file mode 100644 index 000000000000..d28d3d476975 --- /dev/null +++ b/keyboards/signum/3_0/elitec/elitec.h @@ -0,0 +1,15 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_4x12( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ +} diff --git a/keyboards/signum/3_0/elitec/info.json b/keyboards/signum/3_0/elitec/info.json new file mode 100644 index 000000000000..53b88d553476 --- /dev/null +++ b/keyboards/signum/3_0/elitec/info.json @@ -0,0 +1,67 @@ +{ + "keyboard_name": "Signum 3.0", + "url": "http://troyfletcher.net/", + "maintainer": "jceb", + "width": 15, + "height": 6, + "layouts": { + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [ + + { "x": 0, "y": 0.5, "r": 15 }, + { "x": 1, "y": 0.5, "r": 15 }, + { "x": 2, "y": 0.25, "r": 15 }, + { "x": 3, "y": 0, "r": 15 }, + { "x": 4, "y": 0.25, "r": 15 }, + { "x": 5, "y": 0.5, "r": 15 }, + { "x": 9, "y": 0.5, "r": -15 }, + { "x": 10, "y": 0.25, "r": -15 }, + { "x": 11, "y": 0, "r": -15 }, + { "x": 12, "y": 0.25, "r": -15 }, + { "x": 13, "y": 0.5, "r": -15 }, + { "x": 14, "y": 0.5, "r": -15 }, + + { "x": 0, "y": 1.5, "r": 15 }, + { "x": 1, "y": 1.5, "r": 15 }, + { "x": 2, "y": 1.25, "r": 15 }, + { "x": 3, "y": 1, "r": 15 }, + { "x": 4, "y": 1.25, "r": 15 }, + { "x": 5, "y": 1.5, "r": 15 }, + { "x": 9, "y": 1.5, "r": -15 }, + { "x": 10, "y": 1.25, "r": -15 }, + { "x": 11, "y": 1, "r": -15 }, + { "x": 12, "y": 1.25, "r": -15 }, + { "x": 13, "y": 1.5, "r": -15 }, + { "x": 14, "y": 1.5, "r": -15 }, + + { "x": 0, "y": 2.5, "r": 15 }, + { "x": 1, "y": 2.5, "r": 15 }, + { "x": 2, "y": 2.25, "r": 15 }, + { "x": 3, "y": 2, "r": 15 }, + { "x": 4, "y": 2.25, "r": 15 }, + { "x": 5, "y": 2.5, "r": 15 }, + { "x": 9, "y": 2.5, "r": -15 }, + { "x": 10, "y": 2.25, "r": -15 }, + { "x": 11, "y": 2, "r": -15 }, + { "x": 12, "y": 2.25, "r": -15 }, + { "x": 13, "y": 2.5, "r": -15 }, + { "x": 14, "y": 2.5, "r": -15 }, + + { "x": 0, "y": 4, "r": 15 }, + { "x": 1, "y": 3.5, "r": 15 }, + { "x": 2, "y": 3.25, "r": 15 }, + { "x": 4, "y": 4.25, "r": 15, "h": 1.5 }, + { "x": 5, "y": 4, "r": 15, "h": 2 }, + { "x": 6, "y": 4.25, "r": 15, "h": 1.5 }, + { "x": 8, "y": 4.25, "r": -15, "h": 1.5 }, + { "x": 9, "y": 4, "r": -15, "h": 2 }, + { "x": 10, "y": 4.25, "r": -15, "h": 1.5 }, + { "x": 12, "y": 3.25, "r": -15 }, + { "x": 13, "y": 3.5, "r": -15 }, + { "x": 14, "y": 4, "r": -15 } + + ] + } + } +} diff --git a/keyboards/signum/3_0/elitec/keymaps/default/generate_km.py b/keyboards/signum/3_0/elitec/keymaps/default/generate_km.py new file mode 100755 index 000000000000..cfa8edf57a76 --- /dev/null +++ b/keyboards/signum/3_0/elitec/keymaps/default/generate_km.py @@ -0,0 +1,194 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +import json +import layout +import os +import re + + +def gen_uc_iter(): + length = len(layout.uc_dict) + for key, value in sorted(layout.uc_dict.items()): + length -= 1 + if length: + yield (key, value, False) + else: + yield (key, value, True) + + +def _translate(s): + if re.match("^[0-9]$", s): + return ("KC_{0}".format(s), " {0} ".format(s)) + elif re.match("^[a-z]$", s): + return ("KC_{0}".format(s.upper()), " {0} ".format(s)) + elif re.match("^[A-Z]$", s): + return ("S(KC_{0})".format(s), " {0} ".format(s)) + elif re.match("^F[0-9]{1,2}$", s): # Fn, works from F0 to F99 + return ("KC_{0}".format(s), "{0:^7}".format(s)) + elif re.match("^DF[0-9]{1,2}$", s): # DFn, works from DF0 to DF99 + return ("DF({0})".format(s[2:]), "{0:^7}".format(s)) + elif re.match("^MO[0-9]{1,2}$", s): # MOn, works from MO0 to MO99 + return ("MO({0})".format(s[2:]), "{0:^7}".format(s)) + elif re.match("^OSL[0-9]{1,2}$", s): # OSLn, works from OSL0 to OSL99 + return ("OSL({0})".format(s[3:]), "{0:^7}".format(s)) + elif re.match("^TG[0-9]{1,2}$", s): # TGn, works from TG0 to TG99 + return ("TG({0})".format(s[2:]), "{0:^7}".format(s)) + elif re.match("^TO[0-9]{1,2}$", s): # Tn, works from TO0 to TO99 + return ("TO({0})".format(s[2:]), "{0:^7}".format(s)) + elif re.match("^TT[0-9]{1,2}$", s): # Tn, works from TT0 to TT99 + return ("TT({0})".format(s[2:]), "{0:^7}".format(s)) + elif s in layout.uc_dict: + return ("X("+s+")", " {0} ".format(chr(int(layout.uc_dict[s], 0)))) + elif s in layout.qmk_dict: + return (layout.qmk_dict[s], "{0:^7}".format(s)) + elif s == s.upper() and s.startswith("KC_"): + return (s, "{0:^7}".format(s[2:])) + else: + return ("XXXXXXX", " {0} ".format(chr(128165))) + + +def toKC(s): + return _translate(s)[0] + + +def toLgd(s): + return _translate(s)[1] + + +def quoteC(text): + yield "/*" + for line in text: + yield " * " + line + yield " */\n" + + +def getKeymapText(id, layer, columns, rows): + keymap = [] + keymap.append("Layer %d" % id) + keymap.append("------------------------------------------------- -------------------------------------------------") + keymap.append("|{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|".format(*map(toLgd, layer[:12]))) + keymap.append("------------------------------------------------- -------------------------------------------------") + keymap.append("|{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|".format(*map(toLgd, layer[12:24]))) + keymap.append("------------------------------------------------- -------------------------------------------------") + keymap.append("|{0}|{1}|{2}|{3}|{4}|{5}| |{6}|{7}|{8}|{9}|{10}|{11}|".format(*map(toLgd, layer[24:36]))) + keymap.append("-----------------------------------------------------------------------------------------------------------------") + keymap.append(" {0} {1} {2} |{3}|{4}|{5}|{6}|{7}|{8}| {9} {10} {11}".format(*map(toLgd, layer[36:48])).rstrip()) + keymap.append(" -------------------------------------------------") + return keymap + + +def writeKeymap(f_template, f_keymap, layers, columns, rows): + doCopy = False + + for line in f_template: + doCopy = True + if line.startswith("//"): + doCopy = False + # f_keymap.write(str(layout.uc_dict)) + for k, v, isLast in gen_uc_iter(): + if isLast: + f_keymap.write(k + "\n") + else: + f_keymap.write(k + ",\n") + elif line.startswith("//"): + doCopy = False + for k, v, isLast in gen_uc_iter(): + if isLast: + f_keymap.write(u"\t[{0}] = {1} // {2}\n".format(k, v, chr(int(v, 0)))) + else: + f_keymap.write(u"\t[{0}] = {1}, // {2}\n".format(k, v, chr(int(v, 0)))) + elif line.startswith("//"): + doCopy = False + for layer, L in enumerate(layers): + r_counter = rows + f_keymap.write('\n'.join(quoteC(getKeymapText(layer, L, columns, rows)))) + + l_code = '\tLAYOUT_ortho_4x12(\n' + for r in range(r_counter): + r_counter -= 1 + c_counter = columns + l_code += '\t\t' + for c in range(c_counter): + c_counter -= 1 + if c != 0: + l_code += " " + l_code += "%s" % toKC(L[r*columns + columns-c_counter-1]) + if r_counter or c_counter: + l_code += "," + l_code += '\n' + if layer + 1 != len(layout.layers): + l_code += "\t),\n\n" + else: + l_code += "\t)\n" + f_keymap.write(l_code) + if doCopy: + f_keymap.write(line) + + +def getKeymapJSON(keyboard, keymap, layout, layers): + return json.dumps({ + 'keyboard': keyboard, + 'keymap': keymap, + 'layout': layout, + 'layers': layers + }, sort_keys=True, indent=4) + + +def getKeymapAsciidoc(title, layers, columns, rows): + yield '= ' + title + yield '' + for id, layer in enumerate(layers): + keymap = getKeymapText(id, layer, columns, rows) + if len(keymap): + yield '.' + keymap[0] + yield '--------------------------' + for line in keymap[1:]: + yield ' ' + line + yield '--------------------------' + yield '' + + +def layersToKC(layers): + return [list(map(toKC, layer)) for layer in layers] + + +def pathToKeymap(path): + head, keymap = os.path.split(path) + _, keymapsdir = os.path.split(head) + if keymapsdir == 'keymaps': + return keymap + + +def pathToKeyboard(path): + head, keymap = os.path.split(path) + head, keymapsdir = os.path.split(head) + if keymapsdir == 'keymaps': + head, dir = os.path.split(head) + while dir not in ('/', 'keyboards'): + yield dir + head, dir = os.path.split(head) + + +if __name__ == "__main__": + with open("km_template.txt", mode="r") as f_template: + with open("keymap.c", mode="w", encoding='utf-8') as f_keymap: + writeKeymap(f_template, f_keymap, layout.layers, columns=12, rows=4) + + abspath = os.path.dirname(os.path.abspath(__file__)) + keyboard = list(reversed(list(pathToKeyboard(abspath)))) + keymap = pathToKeymap(abspath) + keyboard_layout = 'LAYOUT_ortho_4x12' + with open("%s_%s.json" % ('_'.join(keyboard), keymap), mode="w") as f_keymapjson: + f_keymapjson.write( + getKeymapJSON( + '/'.join(keyboard), + keymap, + keyboard_layout, + layersToKC(layout.layers)) + ) + + with open("keymap.adoc", mode="w") as f_keymapasciidoc: + f_keymapasciidoc.write('\n'.join(getKeymapAsciidoc('Signum 3.0 %s_%s' % ('_'.join(keyboard), keymap), layout.layers, columns=12, rows=4))) + print("Run the following command to generate a PDF from the keymap") + print("a2x -f pdf --xsltproc-opts '--stringparam page.orientation landscape --stringparam body.font.master 12' --fop -v keymap.adoc") diff --git a/keyboards/signum/3_0/elitec/keymaps/default/keymap.c b/keyboards/signum/3_0/elitec/keymaps/default/keymap.c new file mode 100644 index 000000000000..02690779173b --- /dev/null +++ b/keyboards/signum/3_0/elitec/keymaps/default/keymap.c @@ -0,0 +1,761 @@ +/* keymap.c is auto-generated, don't edit it directly. + * Further instructions are provided in readme.md */ + +#include QMK_KEYBOARD_H + +enum unicode_name { +AB_ARC, +AB_LINE, +AB_VEC, +ACUTE, +AE, +ALEPH, +ALLA_BR, +ALPHA, +AND, +AND_, +ANGLE, +AST_MID, +A_SET, +BARLINE, +BARLINE_D, +BARLINE_FIN, +BETA, +BETH, +BICOND, +BIG_O, +BISHOP_B, +BISHOP_W, +BITCOIN, +BOTTOM, +BOWTIE, +BRA, +BULLET, +B_SET, +CENT, +CHI, +CIRCLE, +CIRC_MID, +CLUBS_B, +CLUBS_W, +CODA, +COMMON_T, +COPYR, +CORRESP, +CROSS, +CURRENCY, +C_CLEF, +C_SET, +DACAPO, +DALSEGNO, +DEFINE, +DEGREE, +DELTA, +DIAMS_B, +DIAMS_W, +DIGAMMA, +DIVISION, +DOTS, +DOT_OP, +DQT1, +DQT2, +DQT3, +DQT4, +DQT5, +EIGHTH_N, +EIGHTH_P, +EJECT, +EMBED, +EMDASH, +EMPTYSET, +EPSILON, +EQUIV, +ETA, +EURO, +EXISTS, +FEMALE, +FLAG_B, +FLAG_W, +FLAT, +FORALL, +FORWARD, +FOURIER, +FULL_OUTER, +F_CLEF, +F_SET, +GAMMA, +GREAT_GREAT, +GR_EQ, +G_CLEF, +HALF_N, +HALF_P, +HAMILTON, +HEARTS_B, +HEARTS_W, +HETA, +H_SET, +IMAG_P, +IMPL, +IMPL_REV, +IN, +INDICATOR, +INEQUAL, +INFO, +INFTY, +INTEGRAL, +INTERS, +INTERS_, +INV_EXCL, +INV_QST, +IOTA, +ISOMORPH, +KAPPA, +KET, +KEY, +KING_B, +KING_W, +KNIGHT_B, +KNIGHT_W, +KOPPA, +K_SET, +LAMBDA, +LAPLACE, +LEFT_CEIL, +LEFT_FLOOR, +LEFT_OUTER, +LENGTH, +LESS_LESS, +LETTER, +LOCK, +LOCK_OPEN, +LS_EQ, +LTIMES, +MALE, +MAPSTO, +MDOT, +MICRO, +MINUS_OP, +MINUS_PLUS, +MINUTE, +MODELS, +MY, +M_ANGLE, +NABLA, +NATURAL, +NO, +NOT, +NOTIN, +NOTSUBS, +NOT_DIV, +NOT_PARA, +NY, +N_SET, +N_TILDE, +OE, +OHM, +OMEGA, +OMIKRON, +OR, +OR_, +PARALLEL, +PARTIAL, +PAWN_B, +PAWN_W, +PEDAL, +PEDAL_UP, +PERMIL, +PHI, +PHONE, +PI, +PLAY, +PLUS_MINUS, +PLUS_OP, +POUND, +POWERSET, +PRED, +PROD_, +PROP_TO, +PR_SUBSET, +PSI, +QED, +QUART_N, +QUART_P, +QUEEN_B, +QUEEN_W, +Q_SET, +REAL_P, +REGTM, +REPEAT_E, +REPEAT_S, +REWIND, +RHO, +RIGHT_CEIL, +RIGHT_FLOOR, +RIGHT_OUTER, +RIGHT_TACK, +ROOK_B, +ROOK_W, +ROOT, +ROUGHLY, +RTIMES, +R_SET, +SAMPI, +SAN, +SCHO, +SECOND, +SECTION, +SEGNO, +SETMINUS, +SHARP, +SHOGI_B, +SHOGI_BD, +SHOGI_W, +SHOGI_WD, +SIGMA, +SIXT_N, +SIXT_P, +SNEK, +SPADES_B, +SPADES_W, +SPEAKER_DN, +SPEAKER_TG, +SPEAKER_UP, +SQT1, +SQT2, +SQT3, +SQT4, +SQT5, +SQUARE, +SQ_LS, +SQ_LS_EQ, +STAFF, +STIGMA, +STOP, +SUBSET, +SUBSET_REV, +SUCC, +SUM_, +SUP1, +SUP2, +SUP3, +SUP_A, +SUP_MIN, +SUP_O, +SZ, +TAU, +THETA, +TIMES, +TIMES_OP, +TMARK, +TO, +TOP, +TRIANGLE, +UE, +UNION, +UNION_, +U_SET, +WHOLE_N, +WHOLE_P, +XI, +YEN, +YES, +YPSI2, +YPSILON, +ZETA, +Z_SET, +ae, +alpha, +beta, +beta2, +chi, +delta, +digamma, +e_FUN, +epsi2, +epsilon, +eta, +gamma, +heta, +i_UNIT, +iota, +kappa, +kappa2, +koppa, +lambda, +my, +n_tilde, +ny, +oe, +omega, +omikron, +phi, +phi2, +pi, +pi2, +psi, +rho, +rho2, +sampi, +san, +scho, +sigma, +sigma2, +sigma3, +stigma, +sz, +tau, +theta, +theta2, +ue, +xi, +ypsilon, +zeta +}; + +const uint32_t PROGMEM unicode_map[] = { + [AB_ARC] = 0x0361, // ͡ + [AB_LINE] = 0x0305, // ̅ + [AB_VEC] = 0x20d7, // ⃗ + [ACUTE] = 0x00b4, // ´ + [AE] = 0x00c4, // Ä + [ALEPH] = 0x2135, // ℵ + [ALLA_BR] = 0x1d135, // 𝄵 + [ALPHA] = 0x0391, // Α + [AND] = 0x2227, // ∧ + [AND_] = 0x22c0, // ⋀ + [ANGLE] = 0x2220, // ∠ + [AST_MID] = 0x2217, // ∗ + [A_SET] = 0x1d538, // 𝔸 + [BARLINE] = 0x1d100, // 𝄀 + [BARLINE_D] = 0x1d101, // 𝄁 + [BARLINE_FIN] = 0x1d102, // 𝄂 + [BETA] = 0x0392, // Β + [BETH] = 0x2136, // ℶ + [BICOND] = 0x21d4, // ⇔ + [BIG_O] = 0x1d4aa, // 𝒪 + [BISHOP_B] = 0x265d, // ♝ + [BISHOP_W] = 0x2657, // ♗ + [BITCOIN] = 0x20bf, // ₿ + [BOTTOM] = 0x22a5, // ⊥ + [BOWTIE] = 0x22c8, // ⋈ + [BRA] = 0x27e8, // ⟨ + [BULLET] = 0x2022, // • + [B_SET] = 0x1d539, // 𝔹 + [CENT] = 0x00a2, // ¢ + [CHI] = 0x03a7, // Χ + [CIRCLE] = 0x25cb, // ○ + [CIRC_MID] = 0x2218, // ∘ + [CLUBS_B] = 0x2663, // ♣ + [CLUBS_W] = 0x2667, // ♧ + [CODA] = 0x1d10c, // 𝄌 + [COMMON_T] = 0x1d134, // 𝄴 + [COPYR] = 0x00a9, // © + [CORRESP] = 0x2259, // ≙ + [CROSS] = 0x2020, // † + [CURRENCY] = 0x00a4, // ¤ + [C_CLEF] = 0x1d121, // 𝄡 + [C_SET] = 0x2102, // ℂ + [DACAPO] = 0x1d10a, // 𝄊 + [DALSEGNO] = 0x1d109, // 𝄉 + [DEFINE] = 0x2254, // ≔ + [DEGREE] = 0x00b0, // ° + [DELTA] = 0x0394, // Δ + [DIAMS_B] = 0x2666, // ♦ + [DIAMS_W] = 0x2662, // ♢ + [DIGAMMA] = 0x03dc, // Ϝ + [DIVISION] = 0x00f7, // ÷ + [DOTS] = 0x2026, // … + [DOT_OP] = 0x2299, // ⊙ + [DQT1] = 0x00bb, // » + [DQT2] = 0x201e, // „ + [DQT3] = 0x201c, // “ + [DQT4] = 0x201d, // ” + [DQT5] = 0x00ab, // « + [EIGHTH_N] = 0x1d160, // 𝅘𝅥𝅮 + [EIGHTH_P] = 0x1d13e, // 𝄾 + [EJECT] = 0x23cf, // ⏏ + [EMBED] = 0x21aa, // ↪ + [EMDASH] = 0x2014, // — + [EMPTYSET] = 0x2205, // ∅ + [EPSILON] = 0x0395, // Ε + [EQUIV] = 0x2261, // ≡ + [ETA] = 0x0397, // Η + [EURO] = 0x20ac, // € + [EXISTS] = 0x2203, // ∃ + [FEMALE] = 0x2640, // ♀ + [FLAG_B] = 0x2691, // ⚑ + [FLAG_W] = 0x2690, // ⚐ + [FLAT] = 0x266d, // ♭ + [FORALL] = 0x2200, // ∀ + [FORWARD] = 0x23ed, // ⏭ + [FOURIER] = 0x2131, // ℱ + [FULL_OUTER] = 0x27d7, // ⟗ + [F_CLEF] = 0x1d122, // 𝄢 + [F_SET] = 0x1d53d, // 𝔽 + [GAMMA] = 0x0393, // Γ + [GREAT_GREAT] = 0x226b, // ≫ + [GR_EQ] = 0x2265, // ≥ + [G_CLEF] = 0x1d11e, // 𝄞 + [HALF_N] = 0x1d15e, // 𝅗𝅥 + [HALF_P] = 0x1d13c, // 𝄼 + [HAMILTON] = 0x210b, // ℋ + [HEARTS_B] = 0x2665, // ♥ + [HEARTS_W] = 0x2661, // ♡ + [HETA] = 0x0370, // Ͱ + [H_SET] = 0x210d, // ℍ + [IMAG_P] = 0x2111, // ℑ + [IMPL] = 0x21d2, // ⇒ + [IMPL_REV] = 0x21d0, // ⇐ + [IN] = 0x2208, // ∈ + [INDICATOR] = 0x1d7cf, // 𝟏 + [INEQUAL] = 0x2260, // ≠ + [INFO] = 0x1f6c8, // 🛈 + [INFTY] = 0x221e, // ∞ + [INTEGRAL] = 0x222b, // ∫ + [INTERS] = 0x2229, // ∩ + [INTERS_] = 0x22c2, // ⋂ + [INV_EXCL] = 0x00a1, // ¡ + [INV_QST] = 0x00bf, // ¿ + [IOTA] = 0x0399, // Ι + [ISOMORPH] = 0x2245, // ≅ + [KAPPA] = 0x039a, // Κ + [KET] = 0x27e9, // ⟩ + [KEY] = 0x1f511, // 🔑 + [KING_B] = 0x265a, // ♚ + [KING_W] = 0x2654, // ♔ + [KNIGHT_B] = 0x265e, // ♞ + [KNIGHT_W] = 0x2658, // ♘ + [KOPPA] = 0x03d8, // Ϙ + [K_SET] = 0x1d542, // 𝕂 + [LAMBDA] = 0x039b, // Λ + [LAPLACE] = 0x2112, // ℒ + [LEFT_CEIL] = 0x2308, // ⌈ + [LEFT_FLOOR] = 0x230a, // ⌊ + [LEFT_OUTER] = 0x27d5, // ⟕ + [LENGTH] = 0x2113, // ℓ + [LESS_LESS] = 0x226a, // ≪ + [LETTER] = 0x2709, // ✉ + [LOCK] = 0x1f512, // 🔒 + [LOCK_OPEN] = 0x1f513, // 🔓 + [LS_EQ] = 0x2264, // ≤ + [LTIMES] = 0x22c9, // ⋉ + [MALE] = 0x2642, // ♂ + [MAPSTO] = 0x27fc, // ⟼ + [MDOT] = 0x22c5, // ⋅ + [MICRO] = 0x00b5, // µ + [MINUS_OP] = 0x2296, // ⊖ + [MINUS_PLUS] = 0x2213, // ∓ + [MINUTE] = 0x02b9, // ʹ + [MODELS] = 0x22a7, // ⊧ + [MY] = 0x039c, // Μ + [M_ANGLE] = 0x2221, // ∡ + [NABLA] = 0x2207, // ∇ + [NATURAL] = 0x266e, // ♮ + [NO] = 0x2717, // ✗ + [NOT] = 0x00ac, // ¬ + [NOTIN] = 0x2209, // ∉ + [NOTSUBS] = 0x2288, // ⊈ + [NOT_DIV] = 0x2224, // ∤ + [NOT_PARA] = 0x2226, // ∦ + [NY] = 0x039d, // Ν + [N_SET] = 0x2115, // ℕ + [N_TILDE] = 0x00d1, // Ñ + [OE] = 0x00d6, // Ö + [OHM] = 0x2126, // Ω + [OMEGA] = 0x03a9, // Ω + [OMIKRON] = 0x039f, // Ο + [OR] = 0x2228, // ∨ + [OR_] = 0x22c1, // ⋁ + [PARALLEL] = 0x2225, // ∥ + [PARTIAL] = 0x2202, // ∂ + [PAWN_B] = 0x265f, // ♟ + [PAWN_W] = 0x2659, // ♙ + [PEDAL] = 0x1d1ae, // 𝆮 + [PEDAL_UP] = 0x1d1af, // 𝆯 + [PERMIL] = 0x2030, // ‰ + [PHI] = 0x03a6, // Φ + [PHONE] = 0x2706, // ✆ + [PI] = 0x03a0, // Π + [PLAY] = 0x23ef, // ⏯ + [PLUS_MINUS] = 0x00b1, // ± + [PLUS_OP] = 0x2295, // ⊕ + [POUND] = 0x00a3, // £ + [POWERSET] = 0x1d4ab, // 𝒫 + [PRED] = 0x227a, // ≺ + [PROD_] = 0x220f, // ∏ + [PROP_TO] = 0x221d, // ∝ + [PR_SUBSET] = 0x2282, // ⊂ + [PSI] = 0x03a8, // Ψ + [QED] = 0x220e, // ∎ + [QUART_N] = 0x1d15f, // 𝅘𝅥 + [QUART_P] = 0x1d13d, // 𝄽 + [QUEEN_B] = 0x265b, // ♛ + [QUEEN_W] = 0x2655, // ♕ + [Q_SET] = 0x211a, // ℚ + [REAL_P] = 0x211c, // ℜ + [REGTM] = 0x00ae, // ® + [REPEAT_E] = 0x1d107, // 𝄇 + [REPEAT_S] = 0x1d106, // 𝄆 + [REWIND] = 0x23ee, // ⏮ + [RHO] = 0x03a1, // Ρ + [RIGHT_CEIL] = 0x2309, // ⌉ + [RIGHT_FLOOR] = 0x230b, // ⌋ + [RIGHT_OUTER] = 0x27d6, // ⟖ + [RIGHT_TACK] = 0x22a2, // ⊢ + [ROOK_B] = 0x265c, // ♜ + [ROOK_W] = 0x2656, // ♖ + [ROOT] = 0x221a, // √ + [ROUGHLY] = 0x2248, // ≈ + [RTIMES] = 0x22ca, // ⋊ + [R_SET] = 0x211d, // ℝ + [SAMPI] = 0x0372, // Ͳ + [SAN] = 0x03fa, // Ϻ + [SCHO] = 0x03f7, // Ϸ + [SECOND] = 0x02ba, // ʺ + [SECTION] = 0x00a7, // § + [SEGNO] = 0x1d10b, // 𝄋 + [SETMINUS] = 0x2216, // ∖ + [SHARP] = 0x266f, // ♯ + [SHOGI_B] = 0x2617, // ☗ + [SHOGI_BD] = 0x26ca, // ⛊ + [SHOGI_W] = 0x2616, // ☖ + [SHOGI_WD] = 0x26c9, // ⛉ + [SIGMA] = 0x03a3, // Σ + [SIXT_N] = 0x1d161, // 𝅘𝅥𝅯 + [SIXT_P] = 0x1d13f, // 𝄿 + [SNEK] = 0x1f40d, // 🐍 + [SPADES_B] = 0x2660, // ♠ + [SPADES_W] = 0x2664, // ♤ + [SPEAKER_DN] = 0x1f509, // 🔉 + [SPEAKER_TG] = 0x1f507, // 🔇 + [SPEAKER_UP] = 0x1f50a, // 🔊 + [SQT1] = 0x203a, // › + [SQT2] = 0x201a, // ‚ + [SQT3] = 0x2018, // ‘ + [SQT4] = 0x2019, // ’ + [SQT5] = 0x2039, // ‹ + [SQUARE] = 0x25a1, // □ + [SQ_LS] = 0x228f, // ⊏ + [SQ_LS_EQ] = 0x2291, // ⊑ + [STAFF] = 0x1d11a, // 𝄚 + [STIGMA] = 0x03da, // Ϛ + [STOP] = 0x25fc, // ◼ + [SUBSET] = 0x2286, // ⊆ + [SUBSET_REV] = 0x2287, // ⊇ + [SUCC] = 0x227b, // ≻ + [SUM_] = 0x2211, // ∑ + [SUP1] = 0x00b9, // ¹ + [SUP2] = 0x00b2, // ² + [SUP3] = 0x00b3, // ³ + [SUP_A] = 0x00aa, // ª + [SUP_MIN] = 0x207b, // ⁻ + [SUP_O] = 0x00ba, // º + [SZ] = 0x1e9e, // ẞ + [TAU] = 0x03a4, // Τ + [THETA] = 0x0398, // Θ + [TIMES] = 0x00d7, // × + [TIMES_OP] = 0x2297, // ⊗ + [TMARK] = 0x2122, // ™ + [TO] = 0x27f6, // ⟶ + [TOP] = 0x22a4, // ⊤ + [TRIANGLE] = 0x25b3, // △ + [UE] = 0x00dc, // Ü + [UNION] = 0x222a, // ∪ + [UNION_] = 0x22c3, // ⋃ + [U_SET] = 0x1d54c, // 𝕌 + [WHOLE_N] = 0x1d15d, // 𝅝 + [WHOLE_P] = 0x1d13b, // 𝄻 + [XI] = 0x039e, // Ξ + [YEN] = 0x00a5, // ¥ + [YES] = 0x2713, // ✓ + [YPSI2] = 0x03d2, // ϒ + [YPSILON] = 0x03a5, // Υ + [ZETA] = 0x0396, // Ζ + [Z_SET] = 0x2124, // ℤ + [ae] = 0x00e4, // ä + [alpha] = 0x03b1, // α + [beta] = 0x03b2, // β + [beta2] = 0x03d0, // ϐ + [chi] = 0x03c7, // χ + [delta] = 0x03b4, // δ + [digamma] = 0x03dd, // ϝ + [e_FUN] = 0x0065, // e + [epsi2] = 0x03f5, // ϵ + [epsilon] = 0x03b5, // ε + [eta] = 0x03b7, // η + [gamma] = 0x03b3, // γ + [heta] = 0x0371, // ͱ + [i_UNIT] = 0x0069, // i + [iota] = 0x03b9, // ι + [kappa] = 0x03ba, // κ + [kappa2] = 0x03f0, // ϰ + [koppa] = 0x03d9, // ϙ + [lambda] = 0x03bb, // λ + [my] = 0x03bc, // μ + [n_tilde] = 0x00f1, // ñ + [ny] = 0x03bd, // ν + [oe] = 0x00f6, // ö + [omega] = 0x03c9, // ω + [omikron] = 0x03bf, // ο + [phi] = 0x03c6, // φ + [phi2] = 0x03d5, // ϕ + [pi] = 0x03c0, // π + [pi2] = 0x03d6, // ϖ + [psi] = 0x03c8, // ψ + [rho] = 0x03c1, // ρ + [rho2] = 0x03f1, // ϱ + [sampi] = 0x0373, // ͳ + [san] = 0x03fb, // ϻ + [scho] = 0x03f8, // ϸ + [sigma] = 0x03c3, // σ + [sigma2] = 0x03c2, // ς + [sigma3] = 0x03f2, // ϲ + [stigma] = 0x03db, // ϛ + [sz] = 0x00df, // ß + [tau] = 0x03c4, // τ + [theta] = 0x03b8, // θ + [theta2] = 0x03d1, // ϑ + [ue] = 0x00fc, // ü + [xi] = 0x03be, // ξ + [ypsilon] = 0x03c5, // υ + [zeta] = 0x03b6 // ζ +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * Layer 0 + * ------------------------------------------------- ------------------------------------------------- + * | Tab | q | w | e | r | t | | y | u | i | o | p | [ | + * ------------------------------------------------- ------------------------------------------------- + * |LCtTEsc| a | s | d | f | g | | h | j | k | l | ; | ' | + * ------------------------------------------------- ------------------------------------------------- + * |LShift(| z | x | c | v | b | | n | m | , | . | / |RShift)| + * ----------------------------------------------------------------------------------------------------------------- + * LCtrl LAlt LGui | TT2 |LT6_SPC|LT4_DEL|LT4_ENT| Space |LT2_BSP| RGui RAlt RCtrl + * ------------------------------------------------- + */ + 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_LBRC, + LCTL_T(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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCTL, KC_LALT, KC_LGUI, TT(2), LT(6,KC_SPC), LT(4,KC_DEL), LT(4,KC_ENT), KC_SPC, LT(2,KC_BSPC), KC_RGUI, KC_RALT, KC_RCTL + ), + +/* + * Layer 1 + * ------------------------------------------------- ------------------------------------------------- + * | Tab | q | w | f | p | g | | j | l | u | y | ; | [ | + * ------------------------------------------------- ------------------------------------------------- + * |LCtTEsc| a | r | s | t | d | | h | n | e | i | o | ' | + * ------------------------------------------------- ------------------------------------------------- + * |LShift(| z | x | c | v | b | | k | m | , | . | / |RShift)| + * ----------------------------------------------------------------------------------------------------------------- + * LCtrl LAlt LGui | TT2 |LT6_SPC|LT4_DEL|LT4_ENT| Space |LT2_BSP| RGui RAlt RCtrl + * ------------------------------------------------- + */ + LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, + LCTL_T(KC_ESC), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCTL, KC_LALT, KC_LGUI, TT(2), LT(6,KC_SPC), LT(4,KC_DEL), LT(4,KC_ENT), KC_SPC, LT(2,KC_BSPC), KC_RGUI, KC_RALT, KC_RCTL + ), + +/* + * Layer 2 + * ------------------------------------------------- ------------------------------------------------- + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ] | + * ------------------------------------------------- ------------------------------------------------- + * | | DF0 | DF1 | XXX | MO3 | MO3 | | 4 | 4 | 5 | 6 | - | = | + * ------------------------------------------------- ------------------------------------------------- + * | | MO5 | XXX | XXX | XXX | XXX | | 1 | 1 | 2 | 3 | \ | | + * ----------------------------------------------------------------------------------------------------------------- + * TG2 | | | Del | | 0 |BSpace | + * ------------------------------------------------- + */ + 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_RBRC, + KC_TRNS, DF(0), DF(1), KC_NO, MO(3), MO(3), KC_4, KC_4, KC_5, KC_6, KC_MINS, KC_EQL, + KC_TRNS, MO(5), KC_NO, KC_NO, KC_NO, KC_NO, KC_1, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_0, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS + ), + +/* + * Layer 3 + * ------------------------------------------------- ------------------------------------------------- + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | XXX | + * ------------------------------------------------- ------------------------------------------------- + * | | XXX | XXX | XXX | MO3 | MO3 | | F4 | F4 | F5 | F6 | F11 | XXX | + * ------------------------------------------------- ------------------------------------------------- + * | | XXX | XXX | XXX | XXX | XXX | | F1 | F1 | F2 | F3 | F12 | | + * ----------------------------------------------------------------------------------------------------------------- + * TG3 | | | | | | | + * ------------------------------------------------- + */ + LAYOUT_ortho_4x12( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, MO(3), MO(3), KC_F4, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F1, KC_F2, KC_F3, KC_F12, KC_TRNS, + TG(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +/* + * Layer 4 + * ------------------------------------------------- ------------------------------------------------- + * | Esc | Esc | Tab x | Tab n |CPg Dn |CPg Dn | |Pg Down| Home |^ Arrow|Insert |SInsert| Esc | + * ------------------------------------------------- ------------------------------------------------- + * | | Caps | < Gui |Gui Tab| > Gui | > Gui | |< Arrow|< Arrow|v Arrow|> Arrow| End |Pr Scr | + * ------------------------------------------------- ------------------------------------------------- + * | | XXX | XXX | XXX |CPg Up |CPg Up | | Pg Up | |v Arrow| XXX | App | | + * ----------------------------------------------------------------------------------------------------------------- + * TG4 | | | Del | |BSpace | | + * ------------------------------------------------- + */ + LAYOUT_ortho_4x12( + KC_ESC, KC_ESC, LCTL(KC_W), LCTL(KC_T), LCTL(KC_PGDN), LCTL(KC_PGDN), KC_PGDN, KC_HOME, KC_UP, KC_INS, LSFT(KC_INS), KC_ESC, + KC_TRNS, KC_CAPS, LGUI(KC_LEFT), LGUI(KC_TAB), LGUI(KC_RGHT), LGUI(KC_RGHT), KC_LEFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PSCR, + KC_TRNS, KC_NO, KC_NO, KC_NO, LCTL(KC_PGUP), LCTL(KC_PGUP), KC_PGUP, KC_TRNS, KC_DOWN, KC_NO, KC_APP, KC_TRNS, + TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +/* + * Layer 5 + * ------------------------------------------------- ------------------------------------------------- + * | | XXX |play/ps| Vol + | Vol + | XXX | | XXX | XXX | XXX | XXX |_reset | Power | + * ------------------------------------------------- ------------------------------------------------- + * | | XXX | |<< | Vol 0 | >>| | XXX | | XXX | XXX | XXX | XXX | XXX | Sleep | + * ------------------------------------------------- ------------------------------------------------- + * | | MO5 | XXX | Vol - | Vol - | XXX | | XXX | XXX | XXX | XXX | XXX | XXX | + * ----------------------------------------------------------------------------------------------------------------- + * TG5 | | | | | | | + * ------------------------------------------------- + */ + LAYOUT_ortho_4x12( + KC_TRNS, KC_NO, KC_MPLY, KC_VOLU, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RESET, KC_PWR, + KC_TRNS, KC_NO, KC_MPRV, KC_MUTE, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLEP, + KC_TRNS, MO(5), KC_NO, KC_VOLD, KC_VOLD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + TG(5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + +/* + * Layer 6 + * ------------------------------------------------- ------------------------------------------------- + * | | acc1 | XXX | XXX | XXX | XXX | |^ Wheel|< Wheel|^ Mouse|> Wheel| XXX | XXX | + * ------------------------------------------------- ------------------------------------------------- + * | | acc2 |Mouse 2|Mouse 3|Mouse 1|Mouse 1| |< Mouse|< Mouse|v Mouse|> Mouse| XXX | XXX | + * ------------------------------------------------- ------------------------------------------------- + * | | acc0 | XXX | XXX | XXX | XXX | |v Wheel| XXX |v Mouse| XXX | XXX | | + * ----------------------------------------------------------------------------------------------------------------- + * TG6 | | | | | | | + * ------------------------------------------------- + */ + LAYOUT_ortho_4x12( + KC_TRNS, KC_ACL1, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, KC_NO, KC_NO, + KC_TRNS, KC_ACL2, KC_BTN2, KC_BTN3, KC_BTN1, KC_BTN1, KC_MS_L, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, + KC_TRNS, KC_ACL0, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_D, KC_NO, KC_MS_D, KC_NO, KC_NO, KC_TRNS, + TG(6), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +/* vi: ft=c:tw=80:sw=2:ts=2:sts=2:et + */ diff --git a/keyboards/signum/3_0/elitec/keymaps/default/km_template.txt b/keyboards/signum/3_0/elitec/keymaps/default/km_template.txt new file mode 100644 index 000000000000..47b35ee5149a --- /dev/null +++ b/keyboards/signum/3_0/elitec/keymaps/default/km_template.txt @@ -0,0 +1,20 @@ +/* keymap.c is auto-generated, don't edit it directly. + * Further instructions are provided in readme.md */ + +#include QMK_KEYBOARD_H + +enum unicode_name { +// +}; + +const uint32_t PROGMEM unicode_map[] = { +// +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// +}; + +/* vi: ft=c:tw=80:sw=2:ts=2:sts=2:et + */ diff --git a/keyboards/signum/3_0/elitec/keymaps/default/layout.py b/keyboards/signum/3_0/elitec/keymaps/default/layout.py new file mode 100644 index 000000000000..635a6bb19294 --- /dev/null +++ b/keyboards/signum/3_0/elitec/keymaps/default/layout.py @@ -0,0 +1,494 @@ +# -*- coding: utf-8 -*- + +# Add all used Unicode symbols to this list. +# The key (e.g. "SNEK") is used in keymap.c for "enum", "unicode_map" and "keymaps", so it needs to be a valid C variable name. +# The key is also used in this file to define the layout, so use recognizeable names. +# The value (e.g. "0x1f40d") is used in keymap.c for "unicode_map" and to automatically generate the "ASCII"-art comments. +# When adding new Unicode names, use "0x1f40d" until you looked up the correct Unicode code point. +uc_dict = { + "SNEK": "0x1f40d", ## Error + ## qwertz + "ACUTE": "0x00b4", + ## QWERTZ + "INV_EXCL": "0x00a1", + "INV_QST": "0x00bf", + ## numpad + "SUP1": "0x00b9", + "SUP2": "0x00b2", + "SUP3": "0x00b3", + "SUP_MIN": "0x207b", + "ROOT": "0x221a", + "DEGREE": "0x00b0", + "MINUTE": "0x02b9", + "SECOND": "0x02ba", + "CURRENCY": "0x00a4", + "CENT": "0x00a2", + "YEN": "0x00a5", + "POUND": "0x00a3", + "EURO": "0x20ac", + "DIVISION": "0x00f7", + "MICRO": "0x00b5", + "OHM": "0x2126", + "BITCOIN": "0x20bf", + "SECTION": "0x00a7", + ## NAV_TYPO + "SQT1": "0x203a", + "SQT2": "0x201a", + "SQT3": "0x2018", + "SQT4": "0x2019", + "SQT5": "0x2039", + "SUP_A": "0x00aa", + "SUP_O": "0x00ba", + "TMARK": "0x2122", + "COPYR": "0x00a9", + "REGTM": "0x00ae", + "DOTS": "0x2026", + "CROSS": "0x2020", + "BULLET": "0x2022", + "EMDASH": "0x2014", + "PERMIL": "0x2030", + "DQT1": "0x00bb", + "DQT2": "0x201e", + "DQT3": "0x201c", + "DQT4": "0x201d", + "DQT5": "0x00ab", + ## lang + "ae": "0x00e4", + "oe": "0x00f6", + "ue": "0x00fc", + "sz": "0x00df", + "n_tilde": "0x00f1", + ## LANG + "AE": "0x00c4", + "OE": "0x00d6", + "UE": "0x00dc", + "SZ": "0x1e9e", + "N_TILDE": "0x00d1", + ## greek + "alpha": "0x03b1", + "beta": "0x03b2", + "gamma": "0x03b3", + "delta": "0x03b4", + "epsilon": "0x03b5", + "zeta": "0x03b6", + "eta": "0x03b7", + "theta": "0x03b8", + "iota": "0x03b9", + "kappa": "0x03ba", + "lambda": "0x03bb", + "my": "0x03bc", + "ny": "0x03bd", + "xi": "0x03be", + "omikron": "0x03bf", + "pi": "0x03c0", + "rho": "0x03c1", + "sigma": "0x03c3", + "tau": "0x03c4", + "ypsilon": "0x03c5", + "phi": "0x03c6", + "chi": "0x03c7", + "psi": "0x03c8", + "omega": "0x03c9", + # variants + "beta2": "0x03d0", + "epsi2": "0x03f5", + "theta2": "0x03d1", + "kappa2": "0x03f0", + "pi2": "0x03d6", + "rho2": "0x03f1", + "sigma2": "0x03c2", + "sigma3": "0x03f2", + "phi2": "0x03d5", + # non-standard + "digamma": "0x03dd", + "stigma": "0x03db", + "heta": "0x0371", + "san": "0x03fb", + "koppa": "0x03d9", + "sampi": "0x0373", + "scho": "0x03f8", + ## GREEK + "ALPHA": "0x0391", + "BETA": "0x0392", + "GAMMA": "0x0393", + "DELTA": "0x0394", + "EPSILON": "0x0395", + "ZETA": "0x0396", + "ETA": "0x0397", + "THETA": "0x0398", + "IOTA": "0x0399", + "KAPPA": "0x039a", + "LAMBDA": "0x039b", + "MY": "0x039c", + "NY": "0x039d", + "XI": "0x039e", + "OMIKRON": "0x039f", + "PI": "0x03a0", + "RHO": "0x03a1", + "SIGMA": "0x03a3", + "TAU": "0x03a4", + "YPSILON": "0x03a5", + "PHI": "0x03a6", + "CHI": "0x03a7", + "PSI": "0x03a8", + "OMEGA": "0x03a9", + # variants + "YPSI2": "0x03d2", + # non-standard + "DIGAMMA": "0x03dc", + "STIGMA": "0x03da", + "HETA": "0x0370", + "SAN": "0x03fa", + "KOPPA": "0x03d8", + "SAMPI": "0x0372", + "SCHO": "0x03f7", + ## symbol + "SHOGI_WD": "0x26c9", + "FLAG_W": "0x2690", + "LETTER": "0x2709", + "PHONE": "0x2706", + "INFO": "0x1f6c8", + "REWIND": "0x23ee", + "PLAY": "0x23ef", + "FORWARD": "0x23ed", + "STOP": "0x25fc", + "EJECT": "0x23cf", + "SHOGI_W": "0x2616", + "FEMALE": "0x2640", + "MALE": "0x2642", + "NO": "0x2717", + "YES": "0x2713", + "FLAT": "0x266d", + "NATURAL": "0x266e", + "SHARP": "0x266f", + "COMMON_T": "0x1d134", + "ALLA_BR": "0x1d135", + "PAWN_W": "0x2659", + "DIAMS_W": "0x2662", + "HEARTS_W": "0x2661", + "SPADES_W": "0x2664", + "CLUBS_W": "0x2667", + "WHOLE_N": "0x1d15d", + "HALF_N": "0x1d15e", + "QUART_N": "0x1d15f", + "EIGHTH_N": "0x1d160", + "SIXT_N": "0x1d161", + "ROOK_W": "0x2656", + "KNIGHT_W": "0x2658", + "BISHOP_W": "0x2657", + "QUEEN_W": "0x2655", + "KING_W": "0x2654", + "C_CLEF": "0x1d121", + "G_CLEF": "0x1d11e", + "F_CLEF": "0x1d122", + "PEDAL": "0x1d1ae", + "PEDAL_UP": "0x1d1af", + ## SYMBOL + "SHOGI_BD": "0x26ca", + "FLAG_B": "0x2691", + "SPEAKER_UP": "0x1f50a", + "SPEAKER_TG": "0x1f507", + "SPEAKER_DN": "0x1f509", + "SHOGI_B": "0x2617", + "KEY": "0x1f511", + "LOCK": "0x1f512", + "LOCK_OPEN": "0x1f513", + "STAFF": "0x1d11a", + "BARLINE": "0x1d100", + "BARLINE_D": "0x1d101", + "BARLINE_FIN": "0x1d102", + "CODA": "0x1d10c", + "PAWN_B": "0x265f", + "DIAMS_B": "0x2666", + "HEARTS_B": "0x2665", + "SPADES_B": "0x2660", + "CLUBS_B": "0x2663", + "WHOLE_P": "0x1d13b", + "HALF_P": "0x1d13c", + "QUART_P": "0x1d13d", + "EIGHTH_P": "0x1d13e", + "SIXT_P": "0x1d13f", + "ROOK_B": "0x265c", + "KNIGHT_B": "0x265e", + "BISHOP_B": "0x265d", + "QUEEN_B": "0x265b", + "KING_B": "0x265a", + "REPEAT_S": "0x1d106", + "REPEAT_E": "0x1d107", + "SEGNO": "0x1d10b", + "DALSEGNO": "0x1d109", + "DACAPO": "0x1d10a", + ## math + "EXISTS": "0x2203", + "FORALL": "0x2200", + "EQUIV": "0x2261", + "CORRESP": "0x2259", + "INEQUAL": "0x2260", + "DEFINE": "0x2254", + "TO": "0x27f6", + "MAPSTO": "0x27fc", + "SETMINUS": "0x2216", + "QED": "0x220e", + "OR_": "0x22c1", + "AND_": "0x22c0", + "OR": "0x2228", + "AND": "0x2227", + "NOT": "0x00ac", + "BICOND": "0x21d4", + "IMPL_REV": "0x21d0", + "IMPL": "0x21d2", + "TOP": "0x22a4", + "BOTTOM": "0x22a5", + "SUM_": "0x2211", + "PROD_": "0x220f", + "MDOT": "0x22c5", + "NOTIN": "0x2209", + "IN": "0x2208", + "LS_EQ": "0x2264", + "GR_EQ": "0x2265", + "INFTY": "0x221e", + "UNION_": "0x22c3", + "INTERS_": "0x22c2", + "UNION": "0x222a", + "INTERS": "0x2229", + "NOTSUBS": "0x2288", + "PR_SUBSET": "0x2282", + "SUBSET": "0x2286", + "SUBSET_REV": "0x2287", + "EMPTYSET": "0x2205", + ## MATHSCRIPT + "LEFT_CEIL": "0x2308", + "REAL_P": "0x211c", + "NABLA": "0x2207", + "RIGHT_CEIL": "0x2309", + "LEFT_FLOOR": "0x230a", + "BRA": "0x27e8", + "IMAG_P": "0x2111", + "KET": "0x27e9", + "RIGHT_FLOOR": "0x230b", + "Q_SET": "0x211a", + "e_FUN": "0x0065", + "R_SET": "0x211d", + "Z_SET": "0x2124", + "U_SET": "0x1d54c", + "i_UNIT": "0x0069", + "BIG_O": "0x1d4aa", + "POWERSET": "0x1d4ab", + "A_SET": "0x1d538", + "INTEGRAL": "0x222b", + "PARTIAL": "0x2202", + "F_SET": "0x1d53d", + "H_SET": "0x210d", + "K_SET": "0x1d542", + "LENGTH": "0x2113", + "ALEPH": "0x2135", + "BETH": "0x2136", + "C_SET": "0x2102", + "B_SET": "0x1d539", + "N_SET": "0x2115", + "INDICATOR": "0x1d7cf", + "FOURIER": "0x2131", + "HAMILTON": "0x210b", + "LAPLACE": "0x2112", + ## MATHEXT + "RIGHT_TACK": "0x22a2", + "MODELS": "0x22a7", + "AB_VEC": "0x20d7", + "AB_LINE": "0x0305", + "AB_ARC": "0x0361", + "LESS_LESS": "0x226a", + "PRED": "0x227a", + "EMBED": "0x21aa", + "SUCC": "0x227b", + "GREAT_GREAT": "0x226b", + "TRIANGLE": "0x25b3", + "SQUARE": "0x25a1", + "CIRCLE": "0x25cb", + "DOT_OP": "0x2299", + "PLUS_OP": "0x2295", + "MINUS_OP": "0x2296", + "ROUGHLY": "0x2248", + "ISOMORPH": "0x2245", + "LTIMES": "0x22c9", + "RTIMES": "0x22ca", + "BOWTIE": "0x22c8", + "M_ANGLE": "0x2221", + "ANGLE": "0x2220", + "CIRC_MID": "0x2218", + "AST_MID": "0x2217", + "TIMES": "0x00d7", + "PLUS_MINUS": "0x00b1", + "MINUS_PLUS": "0x2213", + "LEFT_OUTER": "0x27d5", + "RIGHT_OUTER": "0x27d6", + "FULL_OUTER": "0x27d7", + "SQ_LS": "0x228f", + "SQ_LS_EQ": "0x2291", + "PROP_TO": "0x221d", + "PARALLEL": "0x2225", + "NOT_PARA": "0x2226", + "TIMES_OP": "0x2297", + "NOT_DIV": "0x2224" +} + +# Add all used Keycodes to this list. +# The key (e.g. "a") is used in keymap.c to automatically generate the comments. The first 7 chars will show as a keycap legend. +qmk_dict = { + # test cases (These are handled in generate_km.py within toKC() and toLgd(), so these definitions will be ignored. + # If you find "BAD" in your keymaps, then something went wrong.) + "a": "BAD", "A": "BAD", "0": "BAD", + # Basic Keycodes + "XXX": "KC_NO", "": "KC_TRNS", + "!": "S(KC_1)", "@": "S(KC_2)", "#": "S(KC_3)", "$": "S(KC_4)", "%": "S(KC_5)", + "^": "S(KC_6)", "&": "S(KC_7)", "*": "S(KC_8)", "(": "S(KC_9)", ")": "S(KC_0)", + "Enter": "KC_ENT", "Esc": "KC_ESC", "BSpace": "KC_BSPC", "Tab": "KC_TAB", + "Space": "KC_SPC", "-": "KC_MINS", "_": "S(KC_MINS)", "=": "KC_EQL", + "+": "S(KC_EQL)", "[": "KC_LBRC", "{": "S(KC_LBRC)", "]": "KC_RBRC", + "}": "S(KC_RBRC)", "\\": "KC_BSLS", "|": "S(KC_BSLS)", ";": "KC_SCLN", + ":": "S(KC_SCLN)", "'": "KC_QUOT", "\"": "S(KC_QUOT)", "`": "KC_GRV", + "~": "S(KC_GRV)", ",": "KC_COMM", "<": "S(KC_COMM)", ".": "KC_DOT", + ">": "S(KC_DOT)", "/": "KC_SLSH", "?": "S(KC_SLSH)", "Caps": "KC_CAPS", + "Pr Scr": "KC_PSCR", "Scr Lck": "KC_SLCK", "Pause": "KC_BRK", "Insert": "KC_INS", "SInsert": "LSFT(KC_INS)", + "Home": "KC_HOME", "Pg Up": "KC_PGUP", "Del": "KC_DEL", "End": "KC_END", + "Pg Down": "KC_PGDN", "> Arrow": "KC_RGHT", "< Arrow": "KC_LEFT", + "v Arrow": "KC_DOWN", "^ Arrow": "KC_UP", + # Keypad keycodes missing + "App": "KC_APP", "Menu": "KC_MENU", + # Command keycodes missing (Execute, Help, ..., Find) + # Basic Keycodes missing from Print Screen onwards, included as fallback + # random Keycodes + "RGui": "KC_RGUI", "LGui": "KC_LGUI", "LAlt": "KC_LALT", "RAlt": "KC_RALT", "LShift": "KC_LSFT", "LCtrl": "KC_LCTL", "LCtTEsc": "LCTL_T(KC_ESC)", "RCtrl": "KC_RCTL", + "LShift(": "KC_LSPO", "RShift)": "KC_RSPC", + # "LShift(": "LSFT_T(KC_9)", "RShift)": "RSFT_T(RSFT(KC_0))", + "L1_ENT": "LT(1, KC_ENT)", "LT2_BSP": "LT(2,KC_BSPC)", "LT4_DEL": "LT(4,KC_DEL)", "LT4_ENT": "LT(4,KC_ENT)", "LT6_SPC": "LT(6,KC_SPC)", + "CPg Dn": "LCTL(KC_PGDN)", "CPg Up": "LCTL(KC_PGUP)", + "S_Enter": "S(KC_ENT)", "S_Tab": "S(KC_TAB)", "Compose": "KC_ALGR", + "RShift": "KC_RSFT", + "Vol 0": "KC_MUTE", "Vol +": "KC_VOLU", "Vol -": "KC_VOLD", + ">>|": "KC_MNXT", "|<<": "KC_MPRV", "play/ps": "KC_MPLY", + "Bri +": "KC_BRIU", "Bri -": "KC_BRID", + # Quantum Keycodes + "_reset": "RESET", "_debug": "DEBUG", "_eep_re": "EEP_RST", + # Audio Keys missing + # Backlighting + "Led 0": "BL_TOGG", "Led +": "BL_INC", "Led -": "BL_DEC", "Led ~": "BL_BRTG", + # Bootmagic missing + # Bluetooth + "OUT_AUTO": "OUT_AUTO", "OUT_USB": "OUT_USB", "OUT_BT": "OUT_BT", + # Layer Switching missing, Lx -> MO(x), Tx -> TG(x) + "qwertz": "DF(0)", "neo": "DF(2)", + # Mouse Keys + "^ Mouse": "KC_MS_U", "v Mouse": "KC_MS_D", "< Mouse": "KC_MS_L", + "> Mouse": "KC_MS_R", "Mouse 1": "KC_BTN1", "Mouse 2": "KC_BTN2", + "Mouse 3": "KC_BTN3", "Mouse 4": "KC_BTN4", "Mouse 5": "KC_BTN5", + "^ Wheel": "KC_WH_U", "v Wheel": "KC_WH_D", "< Wheel": "KC_WH_L", + "> Wheel": "KC_WH_R", "acc0": "KC_ACL0", "acc1": "KC_ACL1", + "acc2": "KC_ACL2", + # Modifiers missinng, add entry for each specific application + # Mod-Tap Keys missing, add entry for each specific application + "_Sh_swp": "LSFT_T(SH_TG)", + # RGB Lighting missing + # RGB Matrix Lighting missing + # Thermal Printer missing + # US ANSI Shifted Symbols done via S(), don't add KC_entries + # One Shot Keys missing + # Swap Hands + "_sp_swp": "SHT(KC_SPC)", + # Unicode support (via X()) included implicitly + # Switching Unicode Input Modes + "UC_win": "UC_M_WC", "UC_lnx": "UC_M_LN", "UC_osx": "UC_M_OS", + + # custom keys + "altF4": "LALT(KC_F4)", + "Undo": "LCTL(KC_Z)", "Cut": "LCTL(KC_X)", "Copy": "LCTL(KC_C)", "Paste": "LCTL(KC_V)", + "< Tab": "LCTL(S(KC_TAB))", "> Tab": "LCTL(KC_TAB)", + "Tab x": "LCTL(KC_W)", "Tab n": "LCTL(KC_T)", + "Gui Tab": "LGUI(KC_TAB)", "< Gui": "LGUI(KC_LEFT)", "> Gui": "LGUI(KC_RGHT)", + "C+A+Del": "LCTL(LALT(KC_DEL))", "Mic 0": "LCTL(KC_M)", + "Power": "KC_PWR", "Sleep": "KC_SLEP", + + # macros + "Macro 1": "KC_1", "Macro 2": "KC_2", "Macro 3": "KC_3", "Macro 4": "KC_4", "Macro 5": "KC_5", + + # custom layers + "GREEK": "GREEK", + "SYMBOL": "SYMBOL", + "MATH": "MATH", + "GAME": "GAME", + "MOUSE": "MOUSE", + "NEO": "TG(2)" +} + +# These keys are repeated in all layers. +# Generate a keymap.c with the python script and refer to the "ASCII"-art comments, to see which positions this concerns. +# If you want to put different keycodes in these positions for different layers, you need to modify the python script by yourself. +static = ["NEO", "GREEK", "GREEK", "GREEK", "GREEK", "MOUSE"] + +# mutex_layers = {"GREEK": 8, "GAME": 10, "MOUSE": 11} +# layer_graph = ... + +# 0 +qwerty = [ + "Tab", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "[", + "LCtTEsc", "a", "s", "d", "f", "g", "h", "j", "k", "l", ";", "'", + "LShift(", "z", "x", "c", "v", "b", "n", "m", ",", ".", "/", "RShift)", + "LCtrl", "LAlt", "LGui", "TT2", "LT6_SPC", "LT4_DEL", "LT4_ENT", "Space", "LT2_BSP", "RGui", "RAlt", "RCtrl", + ] + +# 1 +colemak = [ + "Tab", "q", "w", "f", "p", "g", "j", "l", "u", "y", ";", "[", + "LCtTEsc", "a", "r", "s", "t", "d", "h", "n", "e", "i", "o", "'", + "LShift(", "z", "x", "c", "v", "b", "k", "m", ",", ".", "/", "RShift)", + "LCtrl", "LAlt", "LGui", "TT2", "LT6_SPC", "LT4_DEL", "LT4_ENT", "Space", "LT2_BSP", "RGui", "RAlt", "RCtrl", + ] + +# 2 +numpad = [ + "`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "]", + "", "DF0", "DF1", "XXX", "MO3", "MO3", "4", "4", "5", "6", "-", "=", + "", "MO5", "XXX", "XXX", "XXX", "XXX", "1", "1", "2", "3", "\\", "", + "TG2", "", "", "", "", "Del", "", "0", "BSpace", "", "", "", + ] + +# 3 +fpad = [ + "", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "XXX", + "", "XXX", "XXX", "XXX", "MO3", "MO3", "F4", "F4", "F5", "F6", "F11", "XXX", + "", "XXX", "XXX", "XXX", "XXX", "XXX", "F1", "F1", "F2", "F3", "F12", "", + "TG3", "", "", "", "", "", "", "", "", "", "", "", + ] + +# 4 +movement = [ + "Esc", "Esc", "Tab x", "Tab n", "CPg Dn", "CPg Dn", "Pg Down", "Home", "^ Arrow", "Insert", "SInsert", "Esc", + "", "Caps", "< Gui", "Gui Tab", "> Gui", "> Gui", "< Arrow", "< Arrow", "v Arrow", "> Arrow", "End", "Pr Scr", + "", "XXX", "XXX", "XXX", "CPg Up", "CPg Up", "Pg Up", "", "v Arrow", "XXX", "App", "", + "TG4", "", "", "", "", "Del", "", "BSpace", "", "", "", "", + ] + +# 5 +media = [ + "", "XXX", "play/ps", "Vol +", "Vol +", "XXX", "XXX", "XXX", "XXX", "XXX", "_reset", "Power", + "", "XXX", "|<<", "Vol 0", ">>|", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX", "Sleep", + "", "MO5", "XXX", "Vol -", "Vol -", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX", "XXX", + "TG5", "", "", "", "", "", "", "", "", "", "", "", + ] + +# 6 +mouse = [ + "", "acc1", "XXX", "XXX", "XXX", "XXX", "^ Wheel", "< Wheel", "^ Mouse", "> Wheel", "XXX", "XXX", + "", "acc2", "Mouse 2", "Mouse 3", "Mouse 1", "Mouse 1", "< Mouse", "< Mouse", "v Mouse", "> Mouse", "XXX", "XXX", + "", "acc0", "XXX", "XXX", "XXX", "XXX", "v Wheel", "XXX", "v Mouse", "XXX", "XXX", "", + "TG6", "", "", "", "", "", "", "", "", "", "", "", + ] + +layers = [ + qwerty, + colemak, + numpad, + fpad, + movement, + media, + mouse + ] diff --git a/keyboards/signum/3_0/elitec/keymaps/default/readme.md b/keyboards/signum/3_0/elitec/keymaps/default/readme.md new file mode 100644 index 000000000000..be8cc30e8a0a --- /dev/null +++ b/keyboards/signum/3_0/elitec/keymaps/default/readme.md @@ -0,0 +1,24 @@ +# Default layout + +Layout created by: [Jan Christoph Ebersbach](https://github.com/jceb) + +The `generate_km.py` file automatically generates `keymap.c` with +additional comments that visually represent the layout. + +This layout is maintained as I am using it. You can also use it as a +starting point to create your own layouts for the Signum 3.0 with +`km_template.txt` and `generate_km.py`. + +# Customization + +- Customize `layout.py` to your liking. + - Attention 1: keycodes are either translated into symbols and + function calls via the `translate()` function in `generate_km.py` + or via user-defined mappings in the dictionary `qmk_dict` in + `layout.py`. Especially the latter might require adjustment for + uncommon qmk features + - Attention 2: additional C functions need to be put into + `km_template.txt` + +Run `./generate_km.py` to regenerate `keymap.c` and the JSON keymap +definition that should be copied to `qmk_configurator/public/keymaps`. diff --git a/keyboards/signum/3_0/elitec/keymaps/default/rules.mk b/keyboards/signum/3_0/elitec/keymaps/default/rules.mk new file mode 100644 index 000000000000..502b2def7623 --- /dev/null +++ b/keyboards/signum/3_0/elitec/keymaps/default/rules.mk @@ -0,0 +1 @@ +UNICODEMAP_ENABLE = yes diff --git a/keyboards/signum/3_0/elitec/readme.md b/keyboards/signum/3_0/elitec/readme.md new file mode 100644 index 000000000000..f60023f6d575 --- /dev/null +++ b/keyboards/signum/3_0/elitec/readme.md @@ -0,0 +1,14 @@ +# Signum 3.0 + +![Signum 3.0 Top](https://i.redd.it/vl54yl36bpz11.jpg) + +An ergonomic 40% PCB. + +Keyboard Maintainer: [Troy Fletcher](http://troyfletcher.net/) +Hardware available here: [Troy Fletcher](http://troyfletcher.net/keyboard_sales.html) + +Make example for this keyboard (after setting up your build environment): + + make signum/3_0/elitec: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). diff --git a/keyboards/signum/3_0/elitec/rules.mk b/keyboards/signum/3_0/elitec/rules.mk new file mode 100644 index 000000000000..6a68eb443bc8 --- /dev/null +++ b/keyboards/signum/3_0/elitec/rules.mk @@ -0,0 +1,64 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no + +UNICODEMAP_ENABLE = no + +LAYOUTS = ortho_4x12 diff --git a/keyboards/singa/config.h b/keyboards/singa/config.h index 54cacee2e90a..aca1153d7146 100644 --- a/keyboards/singa/config.h +++ b/keyboards/singa/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -25,7 +24,7 @@ along with this program. If not, see . #define MANUFACTURER Singa Keyboards #define PRODUCT Singa -#define RGBLED_NUM 16 +#define RGBLED_NUM 18 #define MATRIX_ROWS 7 #define MATRIX_COLS 15 @@ -40,7 +39,3 @@ along with this program. If not, see . #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS - -#define NO_UART 1 - -#endif diff --git a/keyboards/singa/i2c.c b/keyboards/singa/i2c.c deleted file mode 100644 index e8c4455ad1b4..000000000000 --- a/keyboards/singa/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/keyboards/singa/keymaps/amnesia0287/config.h b/keyboards/singa/keymaps/amnesia0287/config.h index 0f756350514c..e176ed34798c 100644 --- a/keyboards/singa/keymaps/amnesia0287/config.h +++ b/keyboards/singa/keymaps/amnesia0287/config.h @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 amnesia0287 * * 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 diff --git a/keyboards/singa/keymaps/amnesia0287/keymap.c b/keyboards/singa/keymaps/amnesia0287/keymap.c index cb0ceac1a817..dc52122db6b1 100644 --- a/keyboards/singa/keymaps/amnesia0287/keymap.c +++ b/keyboards/singa/keymaps/amnesia0287/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 amnesia0287 * * 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 diff --git a/keyboards/singa/keymaps/default/config.h b/keyboards/singa/keymaps/default/config.h index 0f756350514c..93b81b57ba4d 100644 --- a/keyboards/singa/keymaps/default/config.h +++ b/keyboards/singa/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 amnesia0287 * * 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 @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/singa/keymaps/default/keymap.c b/keyboards/singa/keymaps/default/keymap.c index d201f413b772..7beef8a64d8a 100644 --- a/keyboards/singa/keymaps/default/keymap.c +++ b/keyboards/singa/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 amnesia0287 * * 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 diff --git a/keyboards/singa/keymaps/test/config.h b/keyboards/singa/keymaps/test/config.h index 0f756350514c..e176ed34798c 100644 --- a/keyboards/singa/keymaps/test/config.h +++ b/keyboards/singa/keymaps/test/config.h @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 amnesia0287 * * 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 diff --git a/keyboards/singa/keymaps/test/keymap.c b/keyboards/singa/keymaps/test/keymap.c index 30f8de3b3de5..a8f31b49c198 100644 --- a/keyboards/singa/keymaps/test/keymap.c +++ b/keyboards/singa/keymaps/test/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 amnesia0287 * * 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 diff --git a/keyboards/singa/matrix.c b/keyboards/singa/matrix.c deleted file mode 100644 index 245813dfd2de..000000000000 --- a/keyboards/singa/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/keyboards/singa/readme.md b/keyboards/singa/readme.md index bdde361a8e7e..4400717c800e 100644 --- a/keyboards/singa/readme.md +++ b/keyboards/singa/readme.md @@ -4,7 +4,7 @@ ![Singa](https://i.imgur.com/VVO27Tr.jpg) -A short description of the keyboard/project +75% Custom Keyboard. Keyboard Maintainer: [amnesia0287](https://github.com/amnesia0287) @@ -38,9 +38,9 @@ macOS: ``` 3. Install the following packages: ``` - brew install python - brew install pyusb - brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb 4. Place your keyboard into reset. 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. diff --git a/keyboards/singa/rules.mk b/keyboards/singa/rules.mk index 68d50aec67a1..7e46696891c1 100644 --- a/keyboards/singa/rules.mk +++ b/keyboards/singa/rules.mk @@ -31,20 +31,18 @@ F_CPU = 12000000 BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = yes +BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes RGBLIGHT_CUSTOM_DRIVER = yes OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = i2c_master.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/singa/singa.c b/keyboards/singa/singa.c index 0f5ec471a8ee..ee49ba65c100 100644 --- a/keyboards/singa/singa.c +++ b/keyboards/singa/singa.c @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 amnesia0287 * * 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 @@ -13,32 +13,76 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include QMK_KEYBOARD_H - -#include -#include "action_layer.h" -#include "i2c.h" +#include "rgblight.h" +#include "i2c_master.h" #include "quantum.h" +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} +#endif -// for keyboard subdirectory level init functions -// @Override void matrix_init_kb(void) { - // call user level keymaps, if any - matrix_init_user(); +#ifdef RGBLIGHT_ENABLE + if (rgblight_config.enable) { + i2c_init(); + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + } +#endif + // call user level keymaps, if any + matrix_init_user(); } void matrix_scan_kb(void) { - matrix_scan_user(); - /* Nothing else for now. */ +#ifdef RGBLIGHT_ENABLE + rgblight_task(); +#endif + matrix_scan_user(); + /* Nothing else for now. */ } -__attribute__((weak)) // overridable -void matrix_init_user(void) { - +__attribute__ ((weak)) +void matrix_scan_user(void) { } -__attribute__((weak)) // overridable -void matrix_scan_user(void) { +void backlight_init_ports(void) { + // initialize pins D0, D1, D4 and D6 as output + setPinOutput(D0); + setPinOutput(D1); + setPinOutput(D4); + setPinOutput(D6); + + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); +} +void backlight_set(uint8_t level) { + if (level == 0) { + // turn backlight LEDs off + writePinLow(D0); + writePinLow(D1); + writePinLow(D4); + writePinLow(D6); + } else { + // turn backlight LEDs on + writePinHigh(D0); + writePinHigh(D1); + writePinHigh(D4); + writePinHigh(D6); + } } diff --git a/keyboards/singa/singa.h b/keyboards/singa/singa.h index 8221176c156f..03b68488860e 100644 --- a/keyboards/singa/singa.h +++ b/keyboards/singa/singa.h @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2018 amnesia0287 * * 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 @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef SINGA_H -#define SINGA_H +#pragma once #include "quantum.h" @@ -139,5 +138,3 @@ { k74, k81, k75, KC_NO, KC_NO, k76, KC_NO, KC_NO, k77, KC_NO, k82, KC_NO, k78, k79, k80 }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k15, k30 } \ } - -#endif diff --git a/keyboards/singa/usbconfig.h b/keyboards/singa/usbconfig.h index d2d848fcdc8f..54a7d20f1427 100644 --- a/keyboards/singa/usbconfig.h +++ b/keyboards/singa/usbconfig.h @@ -8,8 +8,7 @@ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ */ -#ifndef __usbconfig_h_included__ -#define __usbconfig_h_included__ +#pragma once #include "config.h" @@ -392,5 +391,3 @@ section at the end of this file). /* #define USB_INTR_PENDING EIFR */ #define USB_INTR_PENDING_BIT INTF1 #define USB_INTR_VECTOR INT1_vect - -#endif /* __usbconfig_h_included__ */ diff --git a/keyboards/sirius/unigo66/README.md b/keyboards/sirius/unigo66/README.md deleted file mode 100644 index 78a02ed09e29..000000000000 --- a/keyboards/sirius/unigo66/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# UniGo66 - -![UniGo66](https://i.imgur.com/ZKlcncg.png) - -The UniGo66 is an ergonomic wireless keyboard designed by Sirius and manufactured by ALF Studios. - -Join ALF Studios on [Discord](https://discord.gg/GJ8bdM) - -Make example: - - make sirius/unigo66: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). - -To get the U2U into DFU flashing mode, insert the U2U into the computer and press the button in the red circle shown below - -![U2U](https://i.imgur.com/WKwgDjZ.png) \ No newline at end of file diff --git a/keyboards/sirius/unigo66/config.h b/keyboards/sirius/unigo66/config.h index 883de44a2a3c..66f7f9542f77 100644 --- a/keyboards/sirius/unigo66/config.h +++ b/keyboards/sirius/unigo66/config.h @@ -20,20 +20,19 @@ along with this program. If not, see . #define CUSTOM_MATRIX 2 /* USB Device descriptor parameter */ -#define VENDOR_ID 0x5369 -#define PRODUCT_ID 0x005B -#define DEVICE_VER 0x0814 +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1001 +#define DEVICE_VER 0x1901 #define MANUFACTURER Sirius #define PRODUCT UniGo66 #define DESCRIPTION UniGo66 Wireless Split keyboard - /* size of virtual matrix */ #define MATRIX_ROWS 16 #define MATRIX_COLS 16 /* matrix scanning is done in custom_matrix.cpp */ -#define DIODE_DIRECTION CUSTOM_MATRIX +//#define DIODE_DIRECTION /* * Feature disable options diff --git a/keyboards/sirius/unigo66/info.json b/keyboards/sirius/unigo66/info.json index f343cc3ead06..7482ef5b8113 100644 --- a/keyboards/sirius/unigo66/info.json +++ b/keyboards/sirius/unigo66/info.json @@ -41,8 +41,6 @@ {"label":"D", "x":3.5, "y":2}, {"label":"F", "x":4.5, "y":2}, {"label":"G", "x":5.5, "y":2}, - {"label":"PgDn", "x":6.5, "y":2.5, "h":1.5}, - {"label":"]", "x":9.5, "y":2.5, "h":1.5}, {"label":"H", "x":10.5, "y":2}, {"label":"J", "x":11.5, "y":2}, {"label":"K", "x":12.5, "y":2}, @@ -55,6 +53,8 @@ {"label":"C", "x":3.5, "y":3}, {"label":"V", "x":4.5, "y":3}, {"label":"B", "x":5.5, "y":3}, + {"label":"PgDn", "x":6.5, "y":2.5, "h":1.5}, + {"label":"]", "x":9.5, "y":2.5, "h":1.5}, {"label":"N", "x":10.5, "y":3}, {"label":"M", "x":11.5, "y":3}, {"label":",", "x":12.5, "y":3}, @@ -68,14 +68,84 @@ {"label":"Down", "x":14.5, "y":4}, {"label":"Right", "x":15.5, "y":4}, {"label":"Space", "x":5.5, "y":5}, - {"label":"Space", "x":5.5, "y":6}, {"label":"Ins", "x":6.5, "y":5}, - {"label":"Del", "x":6.5, "y":6}, {"label":"Home", "x":9.5, "y":5}, - {"label":"End", "x":9.5, "y":6}, {"label":"Space", "x":10.5, "y":5}, + {"label":"Space", "x":5.5, "y":6}, + {"label":"Del", "x":6.5, "y":6}, + {"label":"End", "x":9.5, "y":6}, {"label":"Space", "x":10.5, "y":6} ] + }, + "LAYOUT_beta_pcb": { + "layout": [ + {"label":"Esc", "x":0, "y":0, "w":1.5}, + {"label":"1", "x":1.5, "y":0}, + {"label":"2", "x":2.5, "y":0}, + {"label":"3", "x":3.5, "y":0}, + {"label":"4", "x":4.5, "y":0}, + {"label":"5", "x":5.5, "y":0}, + {"label":"-", "x":6.5, "y":0}, + {"label":"=", "x":9.5, "y":0}, + {"label":"6", "x":10.5, "y":0}, + {"label":"7", "x":11.5, "y":0}, + {"label":"8", "x":12.5, "y":0}, + {"label":"9", "x":13.5, "y":0}, + {"label":"0", "x":14.5, "y":0}, + {"label":"Bspc", "x":15.5, "y":0, "w":1.5}, + {"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":"PgUp", "x":6.5, "y":1, "h":1.5}, + {"label":"[", "x":9.5, "y":1, "h":1.5}, + {"label":"Y", "x":10.5, "y":1}, + {"label":"U", "x":11.5, "y":1}, + {"label":"I", "x":12.5, "y":1}, + {"label":"O", "x":13.5, "y":1}, + {"label":"P", "x":14.5, "y":1}, + {"label":"\\", "x":15.5, "y":1, "w":1.5}, + {"label":"Caps", "x":0, "y":2, "w":1.5}, + {"label":"A", "x":1.5, "y":2}, + {"label":"S", "x":2.5, "y":2}, + {"label":"D", "x":3.5, "y":2}, + {"label":"F", "x":4.5, "y":2}, + {"label":"G", "x":5.5, "y":2}, + {"label":"H", "x":10.5, "y":2}, + {"label":"J", "x":11.5, "y":2}, + {"label":"K", "x":12.5, "y":2}, + {"label":"L", "x":13.5, "y":2}, + {"label":";", "x":14.5, "y":2}, + {"label":"Enter", "x":15.5, "y":2, "w":1.5}, + {"label":"Shift", "x":0, "y":3, "w":1.5}, + {"label":"Z", "x":1.5, "y":3}, + {"label":"X", "x":2.5, "y":3}, + {"label":"C", "x":3.5, "y":3}, + {"label":"V", "x":4.5, "y":3}, + {"label":"B", "x":5.5, "y":3}, + {"label":"PgDn", "x":6.5, "y":2.5, "h":1.5}, + {"label":"]", "x":9.5, "y":2.5, "h":1.5}, + {"label":"N", "x":10.5, "y":3}, + {"label":"M", "x":11.5, "y":3}, + {"label":",", "x":12.5, "y":3}, + {"label":".", "x":13.5, "y":3}, + {"label":"Up", "x":14.5, "y":3}, + {"label":"Shift", "x":15.5, "y":3, "w":1.5}, + {"label":"Ctrl", "x":0.5, "y":4}, + {"label":"Super", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4}, + {"label":"Left", "x":13.5, "y":4}, + {"label":"Down", "x":14.5, "y":4}, + {"label":"Right", "x":15.5, "y":4}, + {"label":"Space", "x":5.5, "y":5, "h":2}, + {"label":"Ins", "x":6.5, "y":5}, + {"label":"Home", "x":9.5, "y":5}, + {"label":"Space", "x":10.5, "y":5, "h":2}, + {"label":"Del", "x":6.5, "y":6}, + {"label":"End", "x":9.5, "y":6} + ] } } } diff --git a/keyboards/sirius/unigo66/main.c b/keyboards/sirius/unigo66/main.c index 4d167d9f7e6c..b4f2a91e49dd 100644 --- a/keyboards/sirius/unigo66/main.c +++ b/keyboards/sirius/unigo66/main.c @@ -78,19 +78,12 @@ int main(void) */ sei(); -/* Some keyboards bootup quickly and cannot be initialized with this startup wait. +/* Some keyboards bootup quickly and cannot be initialized with this startup wait.*/ // wait for startup of sendchar routine while (USB_DeviceState != DEVICE_STATE_Configured) ; if (debug_enable) { _delay_ms(1000); } -*/ - - /* wait for USB startup to get ready for debug output */ - uint8_t timeout = 255; // timeout when USB is not available(Bluetooth) - while (timeout-- && USB_DeviceState != DEVICE_STATE_Configured) { - _delay_ms(4); - } debug("init: done\n"); diff --git a/keyboards/sirius/unigo66/readme.md b/keyboards/sirius/unigo66/readme.md index 78a02ed09e29..1dae0f994969 100644 --- a/keyboards/sirius/unigo66/readme.md +++ b/keyboards/sirius/unigo66/readme.md @@ -14,4 +14,4 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to To get the U2U into DFU flashing mode, insert the U2U into the computer and press the button in the red circle shown below -![U2U](https://i.imgur.com/WKwgDjZ.png) \ No newline at end of file +![U2U](https://i.imgur.com/WKwgDjZ.png) diff --git a/keyboards/sirius/unigo66/rules.mk b/keyboards/sirius/unigo66/rules.mk index 7cdb3839ac60..c35487b18c3e 100644 --- a/keyboards/sirius/unigo66/rules.mk +++ b/keyboards/sirius/unigo66/rules.mk @@ -15,7 +15,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Build Options # comment out to disable the options. # -# BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) # MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) # CONSOLE_ENABLE = yes # Console for debug(+400) @@ -26,4 +26,5 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) USB_HID_ENABLE = yes CUSTOM_MATRIX = yes -SRC = custom_matrix.cpp +SRC += custom_matrix.cpp\ + main.c diff --git a/keyboards/sirius/unigo66/unigo66.h b/keyboards/sirius/unigo66/unigo66.h index cc7f3faece22..186aa2b633a2 100644 --- a/keyboards/sirius/unigo66/unigo66.h +++ b/keyboards/sirius/unigo66/unigo66.h @@ -120,4 +120,22 @@ along with this program. If not, see . KE1,KC_NO,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,KC_NO, KC_NO,KE5, K52, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO, \ KE0,KE3,KE2,KC_NO,KC_NO, K2C, KC_NO,KC_NO,KC_NO,KE6,KC_NO,KC_NO,KE4, K50,K51,K4F, KC_NO, KC_NO,KC_NO, KC_NO,KC_NO \ ) -#endif + +#define LAYOUT_beta_pcb( \ + K1E, K1F, K30, K2F, K45, K3B, KE6, KE2, K3A, K39, K14, K04, K09, K07, \ + K29, K15, K3C, K3D, K3E, K3F, K58, K50, K2C, K11, K05, K55, K10, K06, \ + K31, K5F, K5E, K61, K2A, K38, K4C, K57, K53, K5B, K5A, K08, \ + K35, K5D, K17, K1B, K1A, K52, K56, K51, K4D, K23, K1C, K13, K2E, K0C, \ + K5C, K0A, K0F, K36, K0E, K37, \ + KE4, K49, K4B, KE0, \ + KE5, KE1\ +) LAYOUT_all( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,K45, KC_NO,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K35,K1E,K1F,KC_NO,KC_NO,KC_NO,K23,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,K2E,KC_NO, K2A, K49,KC_NO,K4B, K53,KC_NO,K55,K56, KC_NO, KC_NO, \ + KC_NO,K14,K1A,K08,K15,K17,K1C,KC_NO,K0C,KC_NO,K13,K2F,K30, K31, K4C,K4D,KC_NO, K5F,KC_NO,K61,K57, KC_NO, KC_NO, \ + K39,K04,KC_NO,K07,K09,K0A,KC_NO,KC_NO,K0E,K0F,KC_NO,KC_NO, KC_NO, KC_NO, K5C,K5D,K5E,KC_NO, KC_NO, KC_NO, \ + KE1,KC_NO, KC_NO,K1B,K06,KC_NO,K05,K11,K10,K36,K37,K38, KC_NO, KE5, K52, KC_NO,K5A,K5B,KC_NO, KC_NO, KC_NO, \ + KE0,KC_NO,KE2,KC_NO,KC_NO,K2C,KC_NO,KC_NO,KC_NO,KE6,KC_NO,KC_NO, KE4, K50,K51,KC_NO, KC_NO, KC_NO,K58, KC_NO, KC_NO \ +) +#endif \ No newline at end of file diff --git a/keyboards/sixkeyboard/matrix.c b/keyboards/sixkeyboard/matrix.c index 860452ebd8fe..64b46e9b0c84 100644 --- a/keyboards/sixkeyboard/matrix.c +++ b/keyboards/sixkeyboard/matrix.c @@ -1,10 +1,5 @@ /* -Note for ErgoDox EZ customizers: Here be dragons! -This is not a file you want to be messing with. -All of the interesting stuff for you is under keymaps/ :) -Love, Erez - Copyright 2013 Oleg Kostyuk This program is free software: you can redistribute it and/or modify diff --git a/keyboards/sol/common/knob_v2.c b/keyboards/sol/common/knob_v2.c deleted file mode 100644 index f22f7c5d8629..000000000000 --- a/keyboards/sol/common/knob_v2.c +++ /dev/null @@ -1,71 +0,0 @@ -#include "knob_v2.h" - -bool knob_prev_a = false; -static knob_report_t knob_report = {.dir = 0, .phase = 0}; - -void knob_init(void) { - // I use pins D1 (ISR1) & D4 for a knob. - - // Set pin mode for D4 as input. - DDRD &= ~(0UL << ENCODER_PIN_2); - - // Enable internal pull-up for D4. - // This is done by "writing" 1 to a pin that has its mode set to input. - PORTD |= (1 << ENCODER_PIN_2); - - // Enable interrupt for D1 - // For more info on the below flags see this awesome section 11.1 (pages 89-90) here: - // https://cdn-shop.adafruit.com/datasheets/atmel-7766-8-bit-avr-atmega16u4-32u4_datasheet.pdf - // Set pin mode & pull-up. - DDRD &= ~(0UL << ENCODER_PIN_1); - PORTD |= (1UL << ENCODER_PIN_1); - - // INT: 33221100 - EICRA |= 0b00010000; // 0b01 - any edge - // INT: 6 3210 - EIMSK |= 0b00000100; -} - -ISR(ENCODER_INT) { - bool a = PIND & (1 << ENCODER_PIN_1); - - if (knob_prev_a != a) { - // "A" channel has REALLY changed. - knob_report.phase = a; - knob_prev_a = a; - bool b = PIND & (1 << ENCODER_PIN_2); - if (a == b) { - // Halfway through CCW rotation (A == B) - // - // +---YOU ARE HERE (A=1, B=1) - // | +---OR HERE (A=0, B=0) - // | | - // v v - // A: _____/^^^^^\__ - // B: __/^^^^^\_____ - knob_report.dir++; - } else { - // Halfway through CW rotation (A != B) - // - // +---YOU ARE HERE (A=1, B=0) - // | +---OR HERE (A=0, B=1) - // | | - // v v - // A: _____/^^^^^\_____ - // B: ________/^^^^^\__ - knob_report.dir--; - } - } -} - -knob_report_t knob_report_read(void) { - // Return knob report. - return knob_report; -} - -void knob_report_reset(void) { - // Call this ASAP once you've processed the previous knob report. - // TODO: This should probably be called within `knob_report_read`. - knob_report.dir = 0; - knob_report.phase = 0; -} diff --git a/keyboards/sol/common/knob_v2.h b/keyboards/sol/common/knob_v2.h deleted file mode 100644 index 45196eb1a668..000000000000 --- a/keyboards/sol/common/knob_v2.h +++ /dev/null @@ -1,28 +0,0 @@ -// Rotary knob implementation - Version 2. -// Uses 2 digital pins - D2 (via interrupt) & D6. -// #include "rev1.h" -#include -#include -#include - -#ifndef ENCODER_PIN_1 - #define ENCODER_PIN_1 PD2 -#endif -#ifndef ENCODER_PIN_2 - #define ENCODER_PIN_2 PD6 -#endif -#ifndef ENCODER_INT - #define ENCODER_INT INT2_vect -#endif - -typedef struct knob_report_t { - int8_t dir; // Contains number of rotations that happened - int8_t phase; // Contains 0 if last rotation happened on 90 degrees, 1 if on 270 -} knob_report_t; - -void knob_init(void); -knob_report_t knob_report_read(void); -void knob_report_reset(void); - -bool knob_prev_a; -int8_t knob_dir; diff --git a/keyboards/sol/keymaps/default/keymap.c b/keyboards/sol/keymaps/default/keymap.c deleted file mode 100644 index 799507f66fbc..000000000000 --- a/keyboards/sol/keymaps/default/keymap.c +++ /dev/null @@ -1,362 +0,0 @@ -#include QMK_KEYBOARD_H -#include "bootloader.h" -#ifdef PROTOCOL_LUFA -#include "lufa.h" -#include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "common/ssd1306.h" -#endif - -extern keymap_config_t keymap_config; - -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - -extern uint8_t is_master; - -// 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 { - _QWERTY = 0, - _COLEMAK, - _FN, - _ADJ -}; - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - FN, - ADJ, - BACKLIT, - RGBRST -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - - - -#define FN_ESC LT(_FN, KC_ESC) -#define FN_CAPS LT(_FN, KC_CAPS) - -// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns - /* Base Layout - * ,------------------------------------------------. ,------------------------------------------------. - * | GESC | | | | | | - | | = | | | | | | BkSp | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | Tab | | | | | | [ | | ] | | | | | | \ | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * |FN(CAPS)| | | | | | ( | | ) | | | | | | ' | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Shift | | | | | | { | | } | | | | | |Shift | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | Win | Alt | RGB | ADJ | Space| DEL | | Enter| Space| FN | Left | Down | Up |Right | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------' - * | Space| DEL | | Enter| Space| - * `-------------' `-------------' - */ -#define BASE_LAYOUT( \ - _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, \ - _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \ - _20, _21, _22, _23, _24, _25, _26, _27, _28, _29 \ -) \ -LAYOUT( \ - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ - KC_TAB, _00, _01, _02, _03, _04, KC_LBRC, KC_RBRC, _05, _06, _07, _08, _09, KC_BSLS, \ - FN_CAPS, _10, _11, _12, _13, _14, KC_LPRN, KC_RPRN, _15, _16, _17, _18, _19, KC_QUOT, \ - KC_LSFT, _20, _21, _22, _23, _24, KC_LCBR, KC_RCBR, _25, _26, _27, _28, _29, KC_ENT, \ - KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, \ - KC_VOLU, KC_VOLD, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_VOLU, KC_VOLD \ -) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Qwerty - * ,------------------------------------------------. ,------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | Q | W | E | R | T | | | | Y | U | I | O | P | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | A | S | D | F | G | | | | H | J | K | L | ; | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | Z | X | C | V | B | | | | N | M | , | . | / | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' - * | | | | | | - * `-------------' `--------=----' - */ - [_QWERTY] = BASE_LAYOUT( \ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH \ - ), - - /* Colemak - * ,------------------------------------------------. ,------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | Q | W | F | P | G | | | | J | L | U | Y | ; | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | A | R | S | T | D | | | | H | N | E | I | O | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | Z | X | C | V | B | | | | K | M | , | . | / | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' - * | | | | | | - * `-------------' `--------=----' - */ - [_COLEMAK] = BASE_LAYOUT( \ - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ - KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, \ - KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH \ - ), - - - /* FN - * ,------------------------------------------------. ,------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | PGDN | UP | PGUP | | | | | | | PGDN | UP | PGUP | PRINT| HOME | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | LEFT | DOWN | RIGHT| | | | | | | LEFT | DOWN | RIGHT|INSERT| END | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | |RGBMOD| | | | | | | PLAY | NEXT | MUTE | VOL- | VOL+ | - * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' - * | | | | | | - * `-------------' `-------------' - */ - [_FN] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, _______, _______, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, \ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ - KC_VOLU, KC_VOLD, _______, _______, _______, _______, KC_VOLU, KC_VOLD \ - ), - - /* ADJ - * ,------------------------------------------------. ,------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | SAD | VAI | SAI | RESET| | | | | | | | | | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | HUD | VAD | HUI |RGBRST| | | | | |QWERTY|COLEMK| | | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | |RGBTOG| HUI | SAI | VAI | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | |RGBMOD(| | | | | | | |RGBRMOD| HUD | SAD | VAD | - * `------+------+------+------+------+------+------| |------+------+------+------+------+------+------' - * | | | | | | - * `-------------' `-------------' - */ - - [_ADJ] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ - KC_VOLU, KC_VOLD, _______, _______, _______, _______, KC_VOLU, KC_VOLD \ - ) -}; - - - -// define variables for reactive RGB -bool TOG_STATUS = false; -int RGB_current_mode; - -// Setting ADJ 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)) { - #ifdef RGBLIGHT_ENABLE - //rgblight_mode(RGB_current_mode); - #endif - layer_on(layer3); - } else { - layer_off(layer3); - } -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - //uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if(record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case FN: - if (record->event.pressed) { - //not sure how to have keyboard check mode and set it to a variable, so my work around - //uses another variable that would be set to true after the first time a reactive key is pressed. - if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false - } else { - TOG_STATUS = !TOG_STATUS; - #ifdef RGBLIGHT_ENABLE - //rgblight_mode(15); - #endif - } - layer_on(_FN); - } else { - #ifdef RGBLIGHT_ENABLE - //rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change - #endif - layer_off(_FN); - TOG_STATUS = false; - } - return false; - break; - case ADJ: - if (record->event.pressed) { - layer_on(_ADJ); - } else { - layer_off(_ADJ); - } - return false; - break; - //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released - case RGBRST: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - RGB_current_mode = rgblight_config.mode; - } - #endif - break; - } - return true; -} - -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.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 - -// hook point for 'led_test' keymap -// 'default' keymap's led_test_init() is empty function, do nothing -// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35); -__attribute__ ((weak)) -void led_test_init(void) {} - -void matrix_scan_user(void) { - led_test_init(); - iota_gfx_task(); // this is what updates the display continuously -} - -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; - } -} - -//assign the right code to your layers for OLED display -#define L_BASE 0 -#define L_FN (1<<_FN) -#define L_ADJ (1<<_ADJ) - -static void render_logo(struct CharacterMatrix *matrix) { - - static char logo[]={ - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, - 0}; - matrix_write(matrix, logo); - //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); -} - - - -void render_status(struct CharacterMatrix *matrix) { - - // Render to mode icon - static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; - if(keymap_config.swap_lalt_lgui==false){ - matrix_write(matrix, logo[0][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[0][1]); - }else{ - matrix_write(matrix, logo[1][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[1][1]); - } - - // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(matrix, PSTR("\nLayer: ")); - switch (layer_state) { - case L_BASE: - matrix_write_P(matrix, PSTR("Default")); - break; - case L_FN: - matrix_write_P(matrix, PSTR("FN")); - break; - case L_ADJ: - case L_ADJ_TRI: - matrix_write_P(matrix, PSTR("ADJ")); - break; - default: - matrix_write(matrix, buf); - } - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1< -#include -#include -#include -#include -#include -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" -#include "serial.h" - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - #if defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { - serial_master_init(); -} - -static void keyboard_slave_setup(void) { - serial_slave_init(); -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< -#include -#include -#include -#include "serial.h" - -#ifdef USE_SERIAL - -#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) - -// Serial pulse period in microseconds. -#define SELECT_SERIAL_SPEED 1 -#if SELECT_SERIAL_SPEED == 0 - // Very High speed - #define SERIAL_DELAY 4 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#elif SELECT_SERIAL_SPEED == 1 - // High speed - #define SERIAL_DELAY 6 // micro sec - #define READ_WRITE_START_ADJUST 23 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#elif SELECT_SERIAL_SPEED == 2 - // Middle speed - #define SERIAL_DELAY 12 // micro sec - #define READ_WRITE_START_ADJUST 25 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#elif SELECT_SERIAL_SPEED == 3 - // Low speed - #define SERIAL_DELAY 24 // micro sec - #define READ_WRITE_START_ADJUST 25 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#elif SELECT_SERIAL_SPEED == 4 - // Very Low speed - #define SERIAL_DELAY 50 // micro sec - #define READ_WRITE_START_ADJUST 25 // cycles - #define READ_WRITE_WIDTH_ADJUST 10 // cycles -#else -#error Illegal Serial Speed -#endif - - -#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) -#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) - -#define SLAVE_INT_WIDTH 1 -#define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_delay_half1(void) { - _delay_us(SERIAL_DELAY_HALF1); -} - -inline static -void serial_delay_half2(void) { - _delay_us(SERIAL_DELAY_HALF2); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input_with_pullup(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input_with_pullup(); - - -// Enable INT3 -EIMSK |= _BV(INT3); -// Trigger on falling edge of INT3 -EICRA &= ~(_BV(ISC30) | _BV(ISC31)); - -} - -// Used by the sender to synchronize timing with the reciver. -static -void sync_recv(void) { - for (int i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { - } - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); -} - -// Used by the reciver to send a synchronization signal to the sender. -static -void sync_send(void) { - serial_low(); - serial_delay(); - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - _delay_sub_us(READ_WRITE_START_ADJUST); - for ( uint8_t i = 0; i < 8; ++i) { - serial_delay_half1(); // read the middle of pulses - byte = (byte << 1) | serial_read_pin(); - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - } - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 1<<7; - while( b ) { - if(data & b) { - serial_high(); - } else { - serial_low(); - } - b >>= 1; - serial_delay(); - } - serial_low(); // sync_send() / senc_recv() need raise edge -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - serial_output(); - - // slave send phase - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - sync_send(); - serial_write_byte(serial_slave_buffer[i]); - checksum += serial_slave_buffer[i]; - } - sync_send(); - serial_write_byte(checksum); - - // slave switch to input - sync_send(); //0 - serial_delay_half1(); //1 - serial_low(); //2 - serial_input_with_pullup(); //2 - serial_delay_half1(); //3 - - // slave recive phase - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - sync_recv(); - serial_master_buffer[i] = serial_read_byte(); - checksum_computed += serial_master_buffer[i]; - } - sync_recv(); - uint8_t checksum_received = serial_read_byte(); - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } - - sync_recv(); //weit master output to high -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -// 2 => checksum error -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(SLAVE_INT_WIDTH); - - // wait for the slaves response - serial_input_with_pullup(); - _delay_us(SLAVE_INT_RESPONSE_TIME); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - sei(); - return 1; - } - - // master recive phase - // if the slave is present syncronize with it - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - sync_recv(); - serial_slave_buffer[i] = serial_read_byte(); - checksum_computed += serial_slave_buffer[i]; - } - sync_recv(); - uint8_t checksum_received = serial_read_byte(); - - if (checksum_computed != checksum_received) { - serial_output(); - serial_high(); - sei(); - return 2; - } - - // master switch to output - sync_recv(); //0 - serial_delay(); //1 - serial_low(); //3 - serial_output(); // 3 - serial_delay_half1(); //4 - - // master send phase - uint8_t checksum = 0; - - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - sync_send(); - serial_write_byte(serial_master_buffer[i]); - checksum += serial_master_buffer[i]; - } - sync_send(); - serial_write_byte(checksum); - - // always, release the line when not in use - sync_send(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/sol/serial.h b/keyboards/sol/serial.h deleted file mode 100644 index cd6bcc76bc5e..000000000000 --- a/keyboards/sol/serial.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H - -#include - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD3) //SErial pin goes here, D0-D3 -#define SERIAL_PIN_INTERRUPT INT3_vect //"INT#" of your serial pin - - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/sol/sol.h b/keyboards/sol/sol.h deleted file mode 100644 index 8f451ce56b06..000000000000 --- a/keyboards/sol/sol.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef SOL_H -#define SOL_H - -#include "rev1.h" -#include "quantum.h" - -#endif diff --git a/keyboards/speedo/config.h b/keyboards/speedo/config.h index 8670cceca89e..ac9d5e4f14f5 100644 --- a/keyboards/speedo/config.h +++ b/keyboards/speedo/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, D0, B7, B3, B2, B1, B0 } #define UNUSED_PINS { D5, D4, D6, D7, B4 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/speedo/info.json b/keyboards/speedo/info.json index b0bb87b6e485..3f4b7b27997b 100644 --- a/keyboards/speedo/info.json +++ b/keyboards/speedo/info.json @@ -4,7 +4,7 @@ "maintainer": "qmk", "bootloader": "", "width": 15, - "height": 6, + "height": 6.5, "layouts": { "LAYOUT": { "layout": [{"label":"k00", "x":0, "y":0.375}, {"label":"k01", "x":1, "y":0.375}, {"label":"k02", "x":2, "y":0.25}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0.25}, {"label":"k05", "x":5, "y":0.5}, {"label":"k06", "x":9, "y":0.5}, {"label":"k07", "x":10, "y":0.25}, {"label":"k08", "x":11, "y":0}, {"label":"k09", "x":12, "y":0.25}, {"label":"k10", "x":13, "y":0.375}, {"label":"k11", "x":14, "y":0.375}, {"label":"k12", "x":0, "y":1.375}, {"label":"k13", "x":1, "y":1.375}, {"label":"k14", "x":2, "y":1.25}, {"label":"k15", "x":3, "y":1}, {"label":"k16", "x":4, "y":1.25}, {"label":"k17", "x":5, "y":1.5}, {"label":"k18", "x":7, "y":2}, {"label":"k19", "x":9, "y":1.5}, {"label":"k20", "x":10, "y":1.25}, {"label":"k21", "x":11, "y":1}, {"label":"k22", "x":12, "y":1.25}, {"label":"k23", "x":13, "y":1.375}, {"label":"k24", "x":14, "y":1.375}, {"label":"k25", "x":0, "y":2.375}, {"label":"k26", "x":1, "y":2.375}, {"label":"k27", "x":2, "y":2.25}, {"label":"k28", "x":3, "y":2}, {"label":"k29", "x":4, "y":2.25}, {"label":"k30", "x":5, "y":2.5}, {"label":"k31", "x":7, "y":3}, {"label":"k32", "x":9, "y":2.5}, {"label":"k33", "x":10, "y":2.25}, {"label":"k34", "x":11, "y":2}, {"label":"k35", "x":12, "y":2.25}, {"label":"k36", "x":13, "y":2.375}, {"label":"k37", "x":14, "y":2.375}, {"label":"k38", "x":0, "y":3.375}, {"label":"k39", "x":1, "y":3.375}, {"label":"k40", "x":2, "y":3.25}, {"label":"k41", "x":3, "y":3}, {"label":"k42", "x":4, "y":3.25}, {"label":"k43", "x":5, "y":3.5}, {"label":"k44", "x":6.5, "y":4}, {"label":"k45", "x":7.5, "y":4}, {"label":"k46", "x":9, "y":3.5}, {"label":"k47", "x":10, "y":3.25}, {"label":"k48", "x":11, "y":3}, {"label":"k49", "x":12, "y":3.25}, {"label":"k50", "x":13, "y":3.375}, {"label":"k51", "x":14, "y":3.375}, {"label":"k52", "x":0, "y":4.375}, {"label":"k53", "x":1, "y":4.375}, {"label":"k54", "x":2, "y":4.25}, {"label":"k55", "x":3, "y":4}, {"label":"k56", "x":4, "y":4.25}, {"label":"k57", "x":5.5, "y":5}, {"label":"k58", "x":6.5, "y":5.5}, {"label":"k59", "x":7.5, "y":5.5}, {"label":"k60", "x":8.5, "y":5}, {"label":"k61", "x":10, "y":4.25}, {"label":"k62", "x":11, "y":4}, {"label":"k63", "x":12, "y":4.25}, {"label":"k64", "x":13, "y":4.375}, {"label":"k65", "x":14, "y":4.375}] diff --git a/keyboards/speedo/keymaps/default/config.h b/keyboards/speedo/keymaps/default/config.h index 112836e5e74c..0ab49e8bc480 100644 --- a/keyboards/speedo/keymaps/default/config.h +++ b/keyboards/speedo/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/speedo/keymaps/default/keymap.c b/keyboards/speedo/keymaps/default/keymap.c index 7c9685d3d3a6..ccfc608565c9 100644 --- a/keyboards/speedo/keymaps/default/keymap.c +++ b/keyboards/speedo/keymaps/default/keymap.c @@ -15,7 +15,6 @@ */ #include QMK_KEYBOARD_H -#define _______ KC_TRNS #define FN MO(_FN) #define TORST TO(_RESET) #define TODFT TO(_DEFAULT) diff --git a/keyboards/standaside/config.h b/keyboards/standaside/config.h new file mode 100644 index 000000000000..fa3576ca5b6c --- /dev/null +++ b/keyboards/standaside/config.h @@ -0,0 +1,204 @@ + + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xF7E0 +#define PRODUCT_ID 0x0412 +#define DEVICE_VER 0x0003 +#define MANUFACTURER Fate Everywhere +#define PRODUCT Stand Aside +#define DESCRIPTION A compact 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D1, F4, F6, F7, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { F5, D0, D4, C6, D7, E6, B4, B5 } +#define UNUSED_PINS {} + + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN C7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Enable RGB Underlighting + */ +#define RGB_DI_PIN C7 +#define RGBLED_NUM 12 +#define RGBLIGHT_ANIMATIONS + +/* 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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + diff --git a/keyboards/standaside/keymaps/default/config.h b/keyboards/standaside/keymaps/default/config.h new file mode 100644 index 000000000000..d533d806c90c --- /dev/null +++ b/keyboards/standaside/keymaps/default/config.h @@ -0,0 +1,5 @@ + + +#pragma once + +// place overrides here diff --git a/keyboards/standaside/keymaps/default/keymap.c b/keyboards/standaside/keymaps/default/keymap.c new file mode 100644 index 000000000000..0f13cb763296 --- /dev/null +++ b/keyboards/standaside/keymaps/default/keymap.c @@ -0,0 +1,77 @@ + +#include QMK_KEYBOARD_H + +#define _MAIN 0 +#define _RAISE 1 +#define _LOWER 2 + +// Readability keycodes +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +/* MAIN + * .-----------------------------------------------------------------------------------------------------------------------------------------------. + * | TAB | Q | W | E | R | T | Y | U | I | O | P | Backsp | Delete | 7 | 8 | 9 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | PgUp | 4 | 5 | 6 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | SHIFT | Z | X | C | V | B | N | M | , | . | / | ENTER | PgDn | 1 | 2 | 3 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LCTRL | PAUS | GUI | ALT | Lower | Space | Space | Raise | Left | Down | Up | Right | Shift | 0 | . | ENTER | + * '-----------------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_MAIN] = LAYOUT_ortho_4x16( + 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_DEL, KC_KP_7, KC_KP_8, KC_KP_9, + 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_PGUP, KC_KP_4, KC_KP_5, KC_KP_6, + 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_PGDN, KC_KP_1, KC_KP_2, KC_KP_3, + KC_LCTL, KC_PAUS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RSFT, KC_KP_0, KC_KP_DOT, KC_PENT + ), + +/* RAISE + * .-----------------------------------------------------------------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | Insert | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | - | = | [ | ] | \ | Home | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | PScr | End | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | Next | Vol- | Vol+ | Play | NumLok | | | | + * '-----------------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_RAISE] = LAYOUT_ortho_4x16( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_INS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_END, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_NLCK, _______, _______, _______ + ), + +/* LOWER + * .-----------------------------------------------------------------------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | RGBPWR | Mode | Reset | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | | HUE+ | SAT+ | VAL+ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | | | HUE- | SAT- | VAL- | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | Mute | | Plain | Rainbo | Larsen | + * '-----------------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_LOWER] = LAYOUT_ortho_4x16( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, RGB_TOG, RGB_MOD, RESET, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, RGB_HUI, RGB_SAI, RGB_VAI, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, RGB_M_P, RGB_M_R, RGB_M_K + ), + +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} \ No newline at end of file diff --git a/keyboards/standaside/readme.md b/keyboards/standaside/readme.md new file mode 100644 index 000000000000..ca1cfb2763de --- /dev/null +++ b/keyboards/standaside/readme.md @@ -0,0 +1,15 @@ +# Stand Aside + +![Stand Aside](https://i.imgur.com/X6Katar.png) + +A compact 60% keyboard designed by Fate Everywhere. Born out of the desire for a Planck with a numpad for technical work. Available for sale (kit and completed) once the store comes up. + +Keyboard Maintainer: [Fate Everywhere](https://github.com/fateeverywhere) +Hardware Supported: Mark 3 Stand Aside. +Hardware Availability: Seven Store (https://store.7storm.org). + +Make example for this keyboard (after setting up your build environment): + + make standaside: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). \ No newline at end of file diff --git a/keyboards/standaside/rules.mk b/keyboards/standaside/rules.mk new file mode 100644 index 000000000000..a7ebc21fa484 --- /dev/null +++ b/keyboards/standaside/rules.mk @@ -0,0 +1,73 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = atmel_dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +RGBLIGHT_ENABLE = yes # Enable RGB underlighting support + diff --git a/keyboards/standaside/standaside.c b/keyboards/standaside/standaside.c new file mode 100644 index 000000000000..904e92d335cc --- /dev/null +++ b/keyboards/standaside/standaside.c @@ -0,0 +1,14 @@ + +#include "standaside.h" +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/standaside/standaside.h b/keyboards/standaside/standaside.h new file mode 100644 index 000000000000..b6616963979d --- /dev/null +++ b/keyboards/standaside/standaside.h @@ -0,0 +1,29 @@ + +#ifndef STANDASIDE_H +#define STANDASIDE_H + +#include "quantum.h" +#define ___ KC_NO + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_ortho_4x16( \ + 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, \ + K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62, K63 \ +) \ +{ \ + { K00, K02, K04, K06, K08, K10, K12, K14 }, \ + { K01, K03, K05, K07, K09, K11, K13, K15 }, \ + { K16, K18, K20, K22, K24, K26, K28, K30 }, \ + { K17, K19, K21, K23, K25, K27, K29, K31 }, \ + { K32, K34, K36, K38, K40, K42, K44, K46 }, \ + { K33, K35, K37, K39, K41, K43, K45, K47 }, \ + { K48, K50, K52, K54, K56, K58, K60, K62 }, \ + { K49, K51, K53, K55, K57, K59, K61, K63 } \ +} + +#endif diff --git a/keyboards/staryu/backlight_staryu.c b/keyboards/staryu/backlight_staryu.c deleted file mode 100644 index 6fb9713f3a76..000000000000 --- a/keyboards/staryu/backlight_staryu.c +++ /dev/null @@ -1,52 +0,0 @@ -#include "backlight.h" -#include - -/* backlighting */ -void init_backlight_led(void) -{ - DDRC |= (1< +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. -void init_backlight_led(void); +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. -void backlight_led_on(uint8_t index); +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once -void backlight_led_off(uint8_t index); +// Add backwards compatibility for existing keymaps +static inline void backlight_set_value(uint8_t index, uint8_t level) { + static const uint8_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PINS; + if (level) { + setPinOutput(backlight_pins[index]); + } else { + setPinInput(backlight_pins[index]); + } +} -#endif +#define backlight_led_off(i) backlight_set_value(i, 0) +#define backlight_led_on(i) backlight_set_value(i, 1) diff --git a/keyboards/staryu/config.h b/keyboards/staryu/config.h index 268fe991acf1..05131b68b587 100755 --- a/keyboards/staryu/config.h +++ b/keyboards/staryu/config.h @@ -14,8 +14,7 @@ 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 . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -28,47 +27,49 @@ along with this program. If not, see . #define DESCRIPTION 5-key macropad /* key matrix size */ -#define MATRIX_ROWS 1 -#define MATRIX_COLS 5 +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 /* key matrix pins */ -#define MATRIX_ROW_PINS { } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D4 } +#define DIRECT_PINS { \ + { NO_PIN, D0, D1 }, \ + { D4, D3, D2 }, \ +} #define UNUSED_PINS -// from light_ws2812_config @ -// https://github.com/kairyu/tmk_keyboard_custom/tree/master/keyboard/staryu #define RGB_DI_PIN C6 -#define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 1 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_LIMIT_VAL 200 +// #ifdef RGB_DI_PIN +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW +#undef BACKLIGHT_PIN +#define BACKLIGHT_PINS { C2, C7, D5, D6, B0 } +#define BACKLIGHT_LED_COUNT 5 +#define BACKLIGHT_LEVELS 10 +#define BACKLIGHT_ON_STATE 1 /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 -// TODO backlighting -#define BACKLIGHT_LEVELS 10 -// #define BACKLIGHT_PIN B7 -/* -Backlight: C2, C7, D5, D6, B0 -switch (index) { - case 0: - PORTC &= ~(1<. */ #include QMK_KEYBOARD_H -#include "action_layer.h" enum layers { _LAYER0, _LAYER1, _LAYER2, - _LAYER3 + _LAYER3, + _LAYER4 }; +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_LAYER0] = LAYOUT( +/* ┌─────────┬─────────┬─────────┐ */ + KC_UP, TO(_LAYER1), +/* ├─────────┼─────────┼─────────┤ */ + KC_LEFT, KC_DOWN, KC_RIGHT +/* └─────────┴─────────┴─────────┘ */ + ), + + [_LAYER1] = LAYOUT( +/* ┌─────────┬─────────┬─────────┐ */ + KC_PGUP, TO(_LAYER2), +/* ├─────────┼─────────┼─────────┤ */ + KC_HOME, KC_PGDN, KC_END +/* └─────────┴─────────┴─────────┘ */ + ), + + [_LAYER2] = LAYOUT( +/* ┌─────────┬─────────┬─────────┐ */ + KC_MSEL, TO(_LAYER3), +/* ├─────────┼─────────┼─────────┤ */ + KC_MPRV, KC_MPLY, KC_MNXT +/* └─────────┴─────────┴─────────┘ */ + ), + + [_LAYER3] = LAYOUT( +/* ┌─────────┬─────────┬─────────┐ */ + KC_MS_U, TO(_LAYER4), +/* ├─────────┼─────────┼─────────┤ */ + KC_MS_L, KC_MS_D, KC_MS_R +/* └─────────┴─────────┴─────────┘ */ + ), + + [_LAYER4] = LAYOUT( +/* ┌─────────┬─────────┬─────────┐ */ + XXXXXXX, TO(_LAYER0), +/* ├─────────┼─────────┼─────────┤ */ + RGB_TOG, BL_TOGG, BL_STEP +/* └─────────┴─────────┴─────────┘ */ + ), -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - /* Keymap 0 - * ,-----------. - * | |Up |Fn0| - * |---+---+---| - * |Lef|Dow|Rig| - * `-----------' - */ - LAYOUT( KC_UP, TO(_LAYER1), KC_LEFT,KC_DOWN,KC_RIGHT ), - /* Keymap 1 - * ,-----------. - * | |PgU|Fn1| - * |---+---+---| - * |Hom|PgD|End| - * `-----------' - */ - LAYOUT( KC_PGUP,TO(_LAYER2), KC_HOME,KC_PGDN,KC_END ), - /* Keymap 2 - * ,-----------. - * | |Sel|Fn2| - * |---+---+---| - * |Pre|Pla|Nex| - * `-----------' - */ - LAYOUT( KC_MSEL,TO(_LAYER3), KC_MPRV,KC_MPLY,KC_MNXT ), - /* Keymap 3 - * ,-----------. - * | |MsU|Fn3| - * |---+---+---| - * |MsL|MsD|MsR| - * `-----------' - */ - LAYOUT( KC_MS_U,TO(_LAYER0), KC_MS_L,KC_MS_D,KC_MS_R ), - // /* Keymap 4 - // * ,-----------. - // * | |Fn6|Fn4| - // * |---+---+---| - // * |Fn7|Fn5|Fn8| - // * `-----------' - // */ - // LAYOUT( FN6, FN4, FN7, FN5, FN8 ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} +void eeconfig_init_user(void) { + // use the non noeeprom versions, to write these values to EEPROM too + rgblight_enable(); + rgblight_mode(RGBLIGHT_MODE_BREATHING+1); -void matrix_init_user(void) { + backlight_enable(); } -void matrix_scan_user(void) { +void keyboard_post_init_user(void) { + //layer_state_set_user is not called for inital state - set it here + rgblight_sethsv_noeeprom_white(); } -void led_set_user(uint8_t usb_led) { +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _LAYER1: + rgblight_sethsv_noeeprom_cyan(); + break; + case _LAYER2: + rgblight_sethsv_noeeprom_magenta(); + break; + case _LAYER3: + rgblight_sethsv_noeeprom_red(); + break; + case _LAYER4: + rgblight_sethsv_noeeprom_orange(); + break; + case _LAYER0: + default: // for any other layers, or the default layer + rgblight_sethsv_noeeprom_white(); + break; + } + return state; } diff --git a/keyboards/staryu/keymaps/krusli/keymap.c b/keyboards/staryu/keymaps/krusli/keymap.c index c0fcd00d5d83..cdfa9fe8fed4 100644 --- a/keyboards/staryu/keymaps/krusli/keymap.c +++ b/keyboards/staryu/keymaps/krusli/keymap.c @@ -58,9 +58,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = LAYOUT( \ KC_ESC, TO(_LAYER1), \ diff --git a/keyboards/staryu/rules.mk b/keyboards/staryu/rules.mk index 3e043bbcd5ba..ad4873a39a0e 100755 --- a/keyboards/staryu/rules.mk +++ b/keyboards/staryu/rules.mk @@ -1,10 +1,6 @@ # MCU name MCU = atmega32u2 -BOOTLOADER = lufa-dfu - -SRC = backlight_staryu.c - # Processor frequency. # This will define a symbol, F_CPU, in all source code files equal to the # processor frequency in Hz. You can then use this symbol in your source code to @@ -40,21 +36,43 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = lufa-dfu + -# Boot Section Size in *bytes* -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # In-switch LEDs -AUDIO_ENABLE = no # There is no available timer or pin for audio on the NovelPad -RGBLIGHT_ENABLE = yes # RGB LEDs for underglow, installed and enabled by default for the NovelPad +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/staryu/staryu.c b/keyboards/staryu/staryu.c index 6dcaaea0e859..4adadf201566 100755 --- a/keyboards/staryu/staryu.c +++ b/keyboards/staryu/staryu.c @@ -15,12 +15,3 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "staryu.h" -#include "backlight_staryu.h" - -// for keyboard subdirectory level init functions -// @Override -void matrix_init_kb(void) { - // call user level keymaps, if any - init_backlight_led(); - matrix_init_user(); -} diff --git a/keyboards/staryu/staryu.h b/keyboards/staryu/staryu.h index 12b8be92e71f..bdce5806f730 100755 --- a/keyboards/staryu/staryu.h +++ b/keyboards/staryu/staryu.h @@ -14,15 +14,15 @@ 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 . */ -#ifndef KB_H -#define KB_H +#pragma once + #include "quantum.h" +#define ___ KC_NO #define LAYOUT( \ - K00, K01, \ - K10, K11, K12 \ + K01, K02, \ + K10, K11, K12 \ ) { \ - { K00, K01, K12, K11, K10 }, \ + { ___, K01, K02 }, \ + { K10, K11, K12 } \ } - -#endif diff --git a/keyboards/subatomic/keymaps/default/config.h b/keyboards/subatomic/keymaps/default/config.h index 4c61581993c3..5352ef06c9f2 100644 --- a/keyboards/subatomic/keymaps/default/config.h +++ b/keyboards/subatomic/keymaps/default/config.h @@ -1,7 +1,6 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" +// place overrides here /* * MIDI options @@ -25,5 +24,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#endif \ No newline at end of file diff --git a/keyboards/subatomic/keymaps/default/keymap.c b/keyboards/subatomic/keymaps/default/keymap.c index c5041f6e1fd0..8def46961a15 100644 --- a/keyboards/subatomic/keymaps/default/keymap.c +++ b/keyboards/subatomic/keymaps/default/keymap.c @@ -1,9 +1,4 @@ -#include "subatomic.h" -#include "action_layer.h" -#include "eeconfig.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif +#include QMK_KEYBOARD_H // 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. @@ -25,10 +20,6 @@ enum subatomic_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/sx60/keymaps/default/config.h b/keyboards/sx60/keymaps/default/config.h index a5568e400def..271f48d0011b 100644 --- a/keyboards/sx60/keymaps/default/config.h +++ b/keyboards/sx60/keymaps/default/config.h @@ -1 +1,3 @@ -#include "../../config.h" +#pragma once + +// place overrides here diff --git a/keyboards/tada68/keymaps/amnesia0287/keymap.c b/keyboards/tada68/keymaps/amnesia0287/keymap.c index 46cbf177a076..bf84462de582 100644 --- a/keyboards/tada68/keymaps/amnesia0287/keymap.c +++ b/keyboards/tada68/keymaps/amnesia0287/keymap.c @@ -10,8 +10,6 @@ #define _HL 3 #define _XL 4 -#define _______ KC_TRNS - enum hype_keycodes { FN_HLa = SAFE_RANGE, FN_HLb diff --git a/keyboards/tada68/keymaps/ardakilic/keymap.c b/keyboards/tada68/keymaps/ardakilic/keymap.c index fc5b596d8395..6c3475cb2080 100755 --- a/keyboards/tada68/keymaps/ardakilic/keymap.c +++ b/keyboards/tada68/keymaps/ardakilic/keymap.c @@ -12,8 +12,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/bazooka/keymap.c b/keyboards/tada68/keymaps/bazooka/keymap.c index 4105f981d132..dfe0feb12f37 100644 --- a/keyboards/tada68/keymaps/bazooka/keymap.c +++ b/keyboards/tada68/keymaps/bazooka/keymap.c @@ -9,7 +9,6 @@ #define _FUNC 2 #define _MOUSE 3 -#define _______ KC_TRNS #define MAC_TOG TG(_MAC) enum { diff --git a/keyboards/tada68/keymaps/default/keymap.c b/keyboards/tada68/keymaps/default/keymap.c index 5a9a99794995..9a36e87a2a92 100755 --- a/keyboards/tada68/keymaps/default/keymap.c +++ b/keyboards/tada68/keymaps/default/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/fakb/keymap.c b/keyboards/tada68/keymaps/fakb/keymap.c index 88a9d4b370c0..743c30ad624b 100755 --- a/keyboards/tada68/keymaps/fakb/keymap.c +++ b/keyboards/tada68/keymaps/fakb/keymap.c @@ -5,8 +5,6 @@ // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define LCTL_MA LCTL_T(KC_UP) #define LSFT_MA LSFT_T(KC_DOWN) #define RSFT_MA SFT_T(KC_UP) diff --git a/keyboards/tada68/keymaps/fezzant/keymap.c b/keyboards/tada68/keymaps/fezzant/keymap.c index d38e4b3b6469..fdc2b6ac8c1c 100644 --- a/keyboards/tada68/keymaps/fezzant/keymap.c +++ b/keyboards/tada68/keymaps/fezzant/keymap.c @@ -7,9 +7,6 @@ #define _NUM 2 #define _BSPC 3 -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Macros // name macros here for keymap reference enum { diff --git a/keyboards/tada68/keymaps/iso-nor/keymap.c b/keyboards/tada68/keymaps/iso-nor/keymap.c index c26932b0e4e0..ae0fccccc82b 100644 --- a/keyboards/tada68/keymaps/iso-nor/keymap.c +++ b/keyboards/tada68/keymaps/iso-nor/keymap.c @@ -3,8 +3,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. @@ -16,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |----------------------------------------------------------------| * |Shif| <>| Z| X| C| V| B| N| M| ,| .| -| Shift| Up|PgDn| * |----------------------------------------------------------------| - * |Ctrl|Alt |Cmd | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | * `----------------------------------------------------------------' */ [_BL] = LAYOUT_iso( diff --git a/keyboards/tada68/keymaps/iso-uk/keymap.c b/keyboards/tada68/keymaps/iso-uk/keymap.c index c843595dc347..f4aa09f65b81 100644 --- a/keyboards/tada68/keymaps/iso-uk/keymap.c +++ b/keyboards/tada68/keymaps/iso-uk/keymap.c @@ -3,8 +3,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/isoish/keymap.c b/keyboards/tada68/keymaps/isoish/keymap.c index efe0063c7c99..adbf32251b7d 100644 --- a/keyboards/tada68/keymaps/isoish/keymap.c +++ b/keyboards/tada68/keymaps/isoish/keymap.c @@ -3,8 +3,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. @@ -48,4 +46,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -}; \ No newline at end of file +}; diff --git a/keyboards/tada68/keymaps/kbp-v60/keymap.c b/keyboards/tada68/keymaps/kbp-v60/keymap.c new file mode 100755 index 000000000000..e7eef9019781 --- /dev/null +++ b/keyboards/tada68/keymaps/kbp-v60/keymap.c @@ -0,0 +1,53 @@ +#include QMK_KEYBOARD_H + +// 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. +#define _BL 0 +#define _FL 1 + +// Tilde is shift-grave +#define KC_TLDE S(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Del | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Home| + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_BL] = LAYOUT_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, 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_HOME,\ + MO(_FL), 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_PGUP,\ + 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_PGDN,\ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, MO(_FL), KC_ALGR, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + * ,----------------------------------------------------------------. + * | ` | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Ins | + * |----------------------------------------------------------------| + * | | |Up | |Prt|Bks|PgU|Hom|End|Pau| Up| | | |end | + * |----------------------------------------------------------------| + * | |Lef|Dow|Rig|Scl|Del|PgD| ~ |Ins|Lef|Dow|Rig| |Prt | + * |----------------------------------------------------------------| + * | | | |Bl-|BL |BL+| |VU-|VU+|MUT| | McL|MsU|McR | + * |----------------------------------------------------------------| + * | | | | | | | |MsL|MsD|MsR | + * `----------------------------------------------------------------' + */ +[_FL] = LAYOUT_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, \ + KC_CAPS, _______, KC_UP, _______, KC_BSPC, KC_PSCR, KC_PGUP, KC_HOME, KC_END, KC_PAUS, KC_UP, _______, _______, _______, KC_END, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_SLCK, KC_PGDN, KC_TLDE, KC_INS, KC_LEFT, KC_DOWN, KC_RIGHT, _______, KC_PSCR,\ + _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, KC_BTN1, KC_MS_U, KC_BTN2,\ + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R), +}; diff --git a/keyboards/tada68/keymaps/kbp-v60/readme.md b/keyboards/tada68/keymaps/kbp-v60/readme.md new file mode 100755 index 000000000000..f15b2781999c --- /dev/null +++ b/keyboards/tada68/keymaps/kbp-v60/readme.md @@ -0,0 +1,3 @@ +# KBP V60 like TADA68 layout + +This layout resembles the KBParadise V60 FN layer and moves around some keys. diff --git a/keyboards/tada68/keymaps/kbp-v60/rules.mk b/keyboards/tada68/keymaps/kbp-v60/rules.mk new file mode 100644 index 000000000000..53644093d6c4 --- /dev/null +++ b/keyboards/tada68/keymaps/kbp-v60/rules.mk @@ -0,0 +1,18 @@ +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + diff --git a/keyboards/tada68/keymaps/laas/keymap.c b/keyboards/tada68/keymaps/laas/keymap.c index 25b990a72ac1..1a8cd6f0c107 100755 --- a/keyboards/tada68/keymaps/laas/keymap.c +++ b/keyboards/tada68/keymaps/laas/keymap.c @@ -6,7 +6,6 @@ // entirely and just use numbers. #define _BL 0 #define _FL 1 -#define _______ KC_TRNS LEADER_EXTERNS(); diff --git a/keyboards/tada68/keymaps/mattdicarlo/keymap.c b/keyboards/tada68/keymaps/mattdicarlo/keymap.c index 378da62da8aa..8fad86b0be95 100755 --- a/keyboards/tada68/keymaps/mattdicarlo/keymap.c +++ b/keyboards/tada68/keymaps/mattdicarlo/keymap.c @@ -4,8 +4,6 @@ #define BASE_LAYER 0 #define FUNC_LAYER 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Base layer, always active. diff --git a/keyboards/tada68/keymaps/mattgemmell/config.h b/keyboards/tada68/keymaps/mattgemmell/config.h new file mode 100644 index 000000000000..f4b045cd32e3 --- /dev/null +++ b/keyboards/tada68/keymaps/mattgemmell/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define GRAVE_ESC_GUI_OVERRIDE diff --git a/keyboards/tada68/keymaps/mattgemmell/keymap.c b/keyboards/tada68/keymaps/mattgemmell/keymap.c new file mode 100644 index 000000000000..f2afd3cd48dc --- /dev/null +++ b/keyboards/tada68/keymaps/mattgemmell/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | § | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |Del | + * |------------------------------------------------------- -----| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| \ |Entr|PgUp| + * |----------------------------------------------------------------| + * |Shift| ` | Z| X| C| V| B| N| M| ,| .| /|Rshift|Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Alt |LGUI| Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ + [_BL] = LAYOUT_iso( + 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_NUBS, \ + 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_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_NUHS, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_GRV, 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_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Keymap _FL1: Function Layer 1 + * ,----------------------------------------------------------------. + * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |BR↑ | + * |----------------------------------------------------------------| + * | | | | | | | | |Prn|Scl|Pau|Up | | |BR↓ | + * |------------------------------------------------------- -----| + * | | V+| V-|Mut| | | | |Hom|PgU|Lft|Rig| | |Home| + * |----------------------------------------------------------------| + * | | | | | L+|LED| L-| | |End|PgDn|Dow| | ↑ | End| + * |----------------------------------------------------------------| + * | | | | | | | | ← | ↓ | → | + * `----------------------------------------------------------------' + */ + [_FL] = LAYOUT_iso( + _______, 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_BRMU, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, KC_BRMD, \ + _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______, KC_HOME, \ + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, KC_MS_U, KC_END, \ + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ), +}; diff --git a/keyboards/tada68/keymaps/mattgemmell/readme.md b/keyboards/tada68/keymaps/mattgemmell/readme.md new file mode 100644 index 000000000000..de8e0c4980ab --- /dev/null +++ b/keyboards/tada68/keymaps/mattgemmell/readme.md @@ -0,0 +1,14 @@ +# Custom TADA68 layout for ISO UK with Apple-specific tweaks + +This layout is based on the [ISO UK](../iso-uk) layout, with changes to make it +more user friendly when used on Apple devices, like iPads and the Mac. + + +## Installation + +Please see the [Tada68 readme](../../readme.md). Make the firmware wih the +following command: + +``` +make tada68:mattgemmell:flashbin +``` diff --git a/keyboards/tada68/keymaps/mattgemmell/rules.mk b/keyboards/tada68/keymaps/mattgemmell/rules.mk new file mode 100644 index 000000000000..020d12635d3b --- /dev/null +++ b/keyboards/tada68/keymaps/mattgemmell/rules.mk @@ -0,0 +1,16 @@ +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/tada68/keymaps/mlechner/keymap.c b/keyboards/tada68/keymaps/mlechner/keymap.c index 01ba3352ca3d..710ff9dcbefc 100755 --- a/keyboards/tada68/keymaps/mlechner/keymap.c +++ b/keyboards/tada68/keymaps/mlechner/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - enum custom_keycodes { MAC_AE = SAFE_RANGE, MAC_OE, diff --git a/keyboards/tada68/keymaps/pascamel/keymap.c b/keyboards/tada68/keymaps/pascamel/keymap.c index a836cefd21f7..1e7499f66b86 100755 --- a/keyboards/tada68/keymaps/pascamel/keymap.c +++ b/keyboards/tada68/keymaps/pascamel/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/raylas/keymap.c b/keyboards/tada68/keymaps/raylas/keymap.c index e2ea33ec6082..2845163a2f29 100755 --- a/keyboards/tada68/keymaps/raylas/keymap.c +++ b/keyboards/tada68/keymaps/raylas/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/rbong/keymap.c b/keyboards/tada68/keymaps/rbong/keymap.c index ffed2caa29b9..03c4d7839248 100644 --- a/keyboards/tada68/keymaps/rbong/keymap.c +++ b/keyboards/tada68/keymaps/rbong/keymap.c @@ -7,7 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS // Dual bind caps to left ctrl and escape when held #define CAPSDUAL CTL_T(KC_ESC) diff --git a/keyboards/tada68/keymaps/rgb/keymap.c b/keyboards/tada68/keymaps/rgb/keymap.c index 00a02e40ad91..dde3521f192e 100755 --- a/keyboards/tada68/keymaps/rgb/keymap.c +++ b/keyboards/tada68/keymaps/rgb/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/rys/keymap.c b/keyboards/tada68/keymaps/rys/keymap.c index c37f03075027..012f2cc05c72 100644 --- a/keyboards/tada68/keymaps/rys/keymap.c +++ b/keyboards/tada68/keymaps/rys/keymap.c @@ -3,8 +3,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - enum rys_keycodes { PSTOKEN = SAFE_RANGE, QSTOKEN diff --git a/keyboards/tada68/keymaps/stephengrier/keymap.c b/keyboards/tada68/keymaps/stephengrier/keymap.c index a19642ce151b..96f6b2bf22f3 100755 --- a/keyboards/tada68/keymaps/stephengrier/keymap.c +++ b/keyboards/tada68/keymaps/stephengrier/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/trashcat/keymap.c b/keyboards/tada68/keymaps/trashcat/keymap.c index da6bf6a1e977..5c7019731d3e 100644 --- a/keyboards/tada68/keymaps/trashcat/keymap.c +++ b/keyboards/tada68/keymaps/trashcat/keymap.c @@ -9,8 +9,6 @@ #define _GM 2 #define _GF 3 -#define _______ KC_TRNS - // Tap dance declarations (These must go above the keymaps) enum { TD_F1 = 0, diff --git a/keyboards/tada68/keymaps/tshack/keymap.c b/keyboards/tada68/keymaps/tshack/keymap.c index 177cc4bd1296..3bffa36dc49e 100755 --- a/keyboards/tada68/keymaps/tshack/keymap.c +++ b/keyboards/tada68/keymaps/tshack/keymap.c @@ -3,8 +3,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/unix/keymap.c b/keyboards/tada68/keymaps/unix/keymap.c index 554abd0243cf..c7073fa694a2 100644 --- a/keyboards/tada68/keymaps/unix/keymap.c +++ b/keyboards/tada68/keymaps/unix/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. diff --git a/keyboards/tada68/keymaps/wamsm_tada/keymap.c b/keyboards/tada68/keymaps/wamsm_tada/keymap.c index 475555ded9e2..3b5e9d373ba1 100755 --- a/keyboards/tada68/keymaps/wamsm_tada/keymap.c +++ b/keyboards/tada68/keymaps/wamsm_tada/keymap.c @@ -7,8 +7,6 @@ #define _BL 0 #define _FL 1 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. @@ -49,4 +47,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,KC_LEFT,KC_DOWN,KC_RIGHT,KC_MPLY,_______,_______,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______, _______,KC_HOME, \ _______,KC_VOLD, KC_VOLU, KC_MUTE, _______,_______, _______, _______,BL_DEC, BL_INC, BL_TOGG,KC_CAPS,_______,KC_END, \ _______,_______,_______, _______, _______,_______,_______,KC_MRWD, KC_MPLY, KC_MFFD), -}; \ No newline at end of file +}; diff --git a/keyboards/tanuki/keymaps/default/keymap.c b/keyboards/tanuki/keymaps/default/keymap.c index 59f5843ea941..29c9071bfa1a 100644 --- a/keyboards/tanuki/keymaps/default/keymap.c +++ b/keyboards/tanuki/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "rgblight.h" //Layer definitions #define _BL 0 diff --git a/keyboards/telophase/keymaps/default/keymap.c b/keyboards/telophase/keymaps/default/keymap.c index 1e692ba12dd5..9cc6c1bb00df 100644 --- a/keyboards/telophase/keymaps/default/keymap.c +++ b/keyboards/telophase/keymaps/default/keymap.c @@ -1,7 +1,7 @@ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "telophase.h" +#include QMK_KEYBOARD_H // 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. @@ -15,7 +15,7 @@ enum telophase_layers _ADJUST, }; -enum telophase_keycodes +enum telophase_keycodes { LOWER = SAFE_RANGE, RAISE, @@ -25,10 +25,6 @@ enum telophase_keycodes #define LONGPRESS_DELAY 150 #define LAYER_TOGGLE_DELAY 300 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = { /*QWERTY*/ {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, @@ -101,4 +97,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_scan_user(void) { return; }; - diff --git a/keyboards/tetris/config.h b/keyboards/tetris/config.h old mode 100644 new mode 100755 index 20ec2e655a7e..2cc7d2951d99 --- a/keyboards/tetris/config.h +++ b/keyboards/tetris/config.h @@ -10,17 +10,12 @@ #define PRODUCT Tetris #define DESCRIPTION Planck mit -#define QMK_ESC_OUTPUT B0 -#define QMK_ESC_INPUT D7 -#define QMK_LED B7 -#define QMK_SPEAKER B5 - /* key matrix size */ -#define MATRIX_ROWS 4 +#define MATRIX_ROWS 5 #define MATRIX_COLS 12 /* key matrix pins */ -#define MATRIX_ROW_PINS { B3, B2, B1, B0 } +#define MATRIX_ROW_PINS { B3, B2, B1, B0, E6 } #define MATRIX_COL_PINS { D7, B4, B6, C6, C7, F6, F7, D4, D2, D3, D5, D6 } #define UNUSED_PINS @@ -39,19 +34,22 @@ #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -#define TAPPING_TERM 200 - #ifdef AUDIO_ENABLE #define B5_AUDIO #define STARTUP_SONG SONG(ONE_UP_SOUND) #define NO_MUSIC_MODE #endif -#if RGBLIGHT_ENABLE +#define NUMBER_OF_ENCODERS 2 +#define ENCODERS_PAD_A { D1,F1 } +#define ENCODERS_PAD_B { D0,F0 } + #define RGB_DI_PIN F5 #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_SLEEP #define RGBLED_NUM 47 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 12 -//#define RGBLIGHT_LIMIT_VAL 128 -#endif + diff --git a/keyboards/tetris/info.json b/keyboards/tetris/info.json index b21a46d632b8..c58e9be52f42 100644 --- a/keyboards/tetris/info.json +++ b/keyboards/tetris/info.json @@ -3,10 +3,10 @@ "url": "", "maintainer": "qmk", "width": 12, - "height": 4, + "height": 5, "layouts": { "LAYOUT_planck_mit": { - "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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + "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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":10, "y":4}, {"x":11, "y":4}] + } } - } } diff --git a/keyboards/tetris/keymaps/default/keymap.c b/keyboards/tetris/keymaps/default/keymap.c old mode 100644 new mode 100755 index 5f48bd07ab9c..c1b5ad2b1f38 --- a/keyboards/tetris/keymaps/default/keymap.c +++ b/keyboards/tetris/keymaps/default/keymap.c @@ -1,833 +1,186 @@ #include QMK_KEYBOARD_H -#ifdef AUDIO_ENABLE - #include "audio.h" - float tone_caps[][2] = SONG( CAPS_LOCK_ON_SOUND ); - float tone_taps[][2] = SONG( E__NOTE( _A6 ) ); -#endif - -/* Fillers to make layering more clear */ -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -#define _BASE 0 -#define _CODE 1 -#define _NAVI 2 -#define _FUNC 3 -#define _SYMB 4 -#define _NUMB 5 -#define _MARO 6 -#define _RGB 7 -#define _ADJUST 8 -#define _GAME 9 - -/* RGB colors */ -#define RGB_Layer_1_Base_Color 0, 128, 0 -#define RGB_Layer_2_Base_Color 0,0,0 -#define RGB_Layer_3_Base_Color 0,0,0 -#define RGB_Layer_4_Base_Color 0,0,0 -#define RGB_Layer_5_Base_Color 0,0,0 -#define RGB_Layer_6_Base_Color 64, 0, 64 -#define RGB_Layer_7_Base_Color 0, 0,0 -#define RGB_Layer_8_Base_Color 0,0,0 -#define RGB_Layer_9_Base_Color 0,0,0 -#define RGB_Caps_Color 6,50,50 -#define RGB_TAP_On_Color 0,128,0 -#define RGB_TAP_Off_Color 128,0,0 -#define RGB_TAP_Base_Color 0,0,0 - -extern rgblight_config_t rgblight_config; -bool NUMLAY_STATUS = false; -int RGB_LAYER0_mode = 6; -bool RGB_TAP_STATE = false; -static uint8_t current_layer = 0; -static bool has_layer_changed = true; -static bool save_rgbmode = true; -static bool caps = false; - -/* Tap Dance function */ -void dance_cln_finished( qk_tap_dance_state_t* state, void* user_data ) -{ - if ( state->count == 1 ) - { - register_code( KC_LSFT ); - } else { - layer_on( _SYMB ); - #ifdef AUDIO_ENABLE - PLAY_SONG( tone_taps ); - #endif - } -} - - -void dance_cln_reset( qk_tap_dance_state_t* state, void* user_data ) -{ - if ( state->count == 1 ) - { - unregister_code( KC_LSFT ); - }else { - uint8_t layer = biton32( layer_state ); - if ( layer == _SYMB ) - { - layer_off( _SYMB ); - rgblight_mode( RGB_LAYER0_mode ); - } - } -} - -enum my_keycodes { - RGB_TAP = SAFE_RANGE, - KC_00 -}; - -/* Tap Dance Declarations */ -enum { - TD_Mute_Next = 0, - TD_SFT, - TD_LBRC, - TD_RBRC -}; - -/* Tap Dance Definitions */ -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_Mute_Next] = ACTION_TAP_DANCE_DOUBLE( KC_MUTE, KC_MNXT ) - ,[TD_SFT] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, dance_cln_finished, dance_cln_reset ) - ,[TD_LBRC] = ACTION_TAP_DANCE_DOUBLE( KC_LBRC, KC_LCBR ) - ,[TD_RBRC] = ACTION_TAP_DANCE_DOUBLE( KC_RBRC, KC_RCBR ) -}; - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* BASE - QWERTY - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | BS | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * shift + Esc = ~ --> | Esc | A | S | D | F | G | H | J | K | L | ; | Enter| <-- shift + Enter = " - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / | Mute | - * |------+------+------+------+------+------+------+------+------+------+------+------| <-- tap: 1.Mute 2.Next - * | Ctrl | GUI | Alt | [ | - | Space | = | ] | Fx | \ | Del | - * `-----------------------------------------------------------------------------------' - */ - -[_BASE] = LAYOUT_planck_mit( - LT( _ADJUST,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - LT( _NUMB,KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT( _RGB, KC_L ), KC_SCLN, KC_ENT, - TD( TD_SFT ), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, TD( TD_Mute_Next ), - KC_LCTL, KC_LGUI, KC_LALT, TD( TD_LBRC ), LT( _NAVI, KC_MINS ), LT( _CODE, KC_SPC ), LT( _FUNC, KC_EQL ), TD( TD_RBRC ), KC_LEFT, KC_DOWN, KC_RGHT ), - -/* Code - * ,-----------------------------------------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ` | < | [ | { | ( | & | Left | Down | Up | Down | ; | ' | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | > | ] | } | ) | | | | | , | . | / | Play | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | [ | BkSp | ======= | Del | ] | | \ | | - * `-----------------------------------------------------------------------------------' - */ - -[_CODE] = LAYOUT_planck_mit( /* 1 - Code */ - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - KC_GRV, KC_LABK, KC_LBRC, KC_LCBR, KC_LPRN, KC_AMPR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_QUOT, - _______, KC_RABK, KC_RBRC, KC_RCBR, KC_RPRN, KC_PIPE, XXXXXXX, XXXXXXX, _______, _______, KC_SLSH, KC_MPLY, - _______, _______, _______, KC_LBRC, KC_BSPC, _______, KC_DEL, KC_RBRC, _______, KC_BSLS, _______ ), - -/* Navi - * ,-----------------------------------------------------------------------------------. - * | | | | PgUp | | | | |Insert| |Prtsc | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ~ | | Home | PgDn | End | | | | |SrcLck| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | Break| | | | | PgUp | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | Home | PgDn | End | - * `-----------------------------------------------------------------------------------' - */ - -[_NAVI] = LAYOUT_planck_mit( - _______, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, _______, - KC_TILD, XXXXXXX, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, _______, _______, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ), - -/* Func - * ,-----------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | F11 | F12 | | | | | | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ - -[_FUNC] = LAYOUT_planck_mit( - _______ , KC_F1, KC_F2 , KC_F3, KC_F4, KC_F5, KC_F6 , KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______ , KC_F12, KC_F12 , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - _______ , XXXXXXX, XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - _______ , _______, _______ , _______, _______, _______, _______ , _______, _______, _______, _______ ), - - -/* Symb - double tap shift - * ,-----------------------------------------------------------------------------------. - * | | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | : | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | < | > | ? | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | { | _ | | + | } | | | | - * `-----------------------------------------------------------------------------------' - */ - -[_SYMB] = LAYOUT_planck_mit( - KC_PIPE, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_COLN, KC_DQUO, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LABK, KC_RABK, KC_QUES, _______, - _______, _______, _______, KC_LCBR, KC_UNDS, _______, KC_PLUS, KC_RCBR, _______, KC_PIPE, _______ ), - -/* Number - * ,-----------------------------------------------------------------------------------. - * | | + | - | | | | | 7 | 8 | 9 | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | * | / | = | | | | 4 | 5 | 6 | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | 1 | 2 | 3 | |Layer0| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | 0 | 00 | . | | | - * `-----------------------------------------------------------------------------------' - */ - -[_NUMB] = LAYOUT_planck_mit( /* 5 - Numpad */ - _______, KC_PPLS, KC_PMNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, _______, - _______, KC_PAST, KC_PSLS, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, _______, - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, XXXXXXX, TO( 0 ), - _______, _______, _______, _______, _______, XXXXXXX, KC_0, KC_00, KC_DOT, XXXXXXX, _______ ), - -/* MARO Empty - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ - -[_MARO] = LAYOUT_planck_mit( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - -/* RGB - * ,-----------------------------------------------------------------------------------. - * | | | | | | _TAP | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | MOD | M_R | M_SW | M_K | M_X | M_G | | | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | HUI | SAI | VAI | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | HUD | SAD | VAD | | | RGB_TOG | | | | | | - * `-----------------------------------------------------------------------------------' - */ - -[_RGB] = LAYOUT_planck_mit( - _______, _______, _______, _______, _______, RGB_TAP, _______, _______, _______, _______, _______, _______, - RGB_MOD, RGB_M_R, RGB_M_SW, RGB_M_K, RGB_M_X, RGB_M_G, _______, _______, _______, _______, _______, _______, - RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, RGB_TOG, _______, _______, _______, _______, _______ ), - -/* Func - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | |Layer0| Rest | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | | | | | Game | | | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | Numb | Music| | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ - -[_ADJUST] = LAYOUT_planck_mit( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO( 0 ), RESET , - KC_CAPS, _______, _______, _______, _______, TO(_GAME), _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, TO(_NUMB), MU_TOG, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - -[_GAME] = LAYOUT_planck_mit( - XXXXXXX,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, - XXXXXXX,KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX,KC_LCTL, KC_A, KC_S, KC_D, KC_B, KC_N, KC_M, XXXXXXX, XXXXXXX, KC_UP, TO( 0 ), - XXXXXXX,KC_LSFT, KC_Z, KC_X, KC_C, KC_SPC, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT ), + [0] = LAYOUT_planck_mit( + 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_LBRC, KC_MINS, LT(1, KC_SPC), KC_EQL, KC_RBRC, KC_LEFT, KC_DOWN, KC_RGHT, + KC_VOLD, KC_VOLU, KC_PGDN, KC_PGUP), + [1] = LAYOUT_planck_mit( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSPC, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; -/* Encoder */ -static uint8_t encoder_state = 0; -static int8_t encoder_value = 0; -static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 }; - -/* Timer */ -static uint16_t TAP_RGB_timer; +extern rgblight_config_t rgblight_config; +int RGB_LAYER0_mode = 6; +static uint8_t current_layer = 0; +static bool has_layer_changed = true; +uint16_t i = 0; +uint16_t j = 0; static uint16_t RGB_encoder_timer; +static uint16_t RGB_encoder_timer2; +static uint8_t RGB_encoder_dir = 0; -/* Encoder state RGB_display */ -static uint8_t RGB_encoder_count=6; -static bool RGB_encoder_bool = false; - -/* RGB tap HUE */ -static uint16_t Type_Hue=270; - -void matrix_init_user( void ) -{ - wait_ms( 200 ); - - /* Encoder init */ - encoder_state = PIND & 0x3; +const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = { + 30, + 5, + -5 +}; - /* Timer init */ - RGB_encoder_timer= timer_read(); - TAP_RGB_timer= timer_read(); +void matrix_init_user(void) { + RGB_encoder_timer = timer_read(); + RGB_encoder_timer2 = timer_read(); } +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); -void matrix_scan_user( void ) -{ -/* Layer */ - uint8_t layer = biton32( layer_state ); - -/* Encoder */ - encoder_state <<= 2; - encoder_state |= (PIND & 0x3); - encoder_value += encoder_LUT[encoder_state & 0xF]; - -/* Encoder state RGB display */ - if (RGB_encoder_bool){ - if (timer_elapsed(RGB_encoder_timer) > 2500) { - RGB_encoder_bool=false; - if (RGB_TAP_STATE) { - rgblight_mode( 1 ); - rgblight_setrgb( RGB_TAP_Base_Color ); - }else{ - rgblight_mode( RGB_LAYER0_mode ); - } - } - } - -/* Display the Caps state */ - if (caps==true){ - rgblight_setrgb_at(RGB_Caps_Color,12); - } - -/* Start of Encoder clockwise */ - if ( encoder_value >= 4 ) { - - /* Start of Encoder state RGB_display */ - if (!RGB_encoder_bool){ - RGB_encoder_timer=timer_read(); - RGB_encoder_bool=true; - RGB_encoder_count=5; - rgblight_mode(1); - rgblight_setrgb( 0,0,0 ); - }else if (RGB_encoder_bool && timer_elapsed(RGB_encoder_timer) < 800) { - RGB_encoder_timer=timer_read(); - RGB_encoder_count-=1; - if (RGB_encoder_count>5 || RGB_encoder_count<1){ - RGB_encoder_count=5; + if (RGB_encoder_dir != 0) { + if (timer_elapsed(RGB_encoder_timer) > 1400) { + RGB_encoder_dir = 0; + rgblight_mode(RGB_LAYER0_mode); + } else { + if (timer_elapsed(RGB_encoder_timer2) > 700) { rgblight_setrgb(0, 0, 0); + RGB_encoder_timer2 = timer_read(); } - } - rgblight_setrgb_at(0,255,0,5); - if (RGB_encoder_count<1) {RGB_encoder_count=1;} - switch (RGB_encoder_count) { - case 5: - rgblight_setrgb_at(0, 255, 0,4); - break; - case 4: - rgblight_setrgb_at(0, 255, 0,3); - break; - case 3: - rgblight_setrgb_at(0, 255, 0,2); - break; - case 2: - rgblight_setrgb_at(0, 255, 0,1); - break; - case 1: - rgblight_setrgb_at(0, 255, 0,0); - break; + if (timer_elapsed(RGB_encoder_timer2) > 80) { + if (RGB_encoder_dir == 1) { + rgblight_setrgb_at(128, 128, 0, 19); + } else { + rgblight_setrgb_at(128, 128, 0, 16); + } } - /* End of Encoder state RGB_display */ - - /* Start of Set Encoder Keycode */ - switch ( layer ) - { - case 0: - tap_code( KC_VOLD ); - break; - case _CODE: - tap_code( KC_LEFT ); - break; - case _RGB: - rgblight_decrease_val(); - break; - case _NUMB: - tap_code( KC_LEFT ); - break; - case _MARO: - tap_code( KC_UP ); - break; - default: - tap_code( KC_VOLD ); - } - /* End of Set Encoder Keycode */ - - } - -/* End of Encoder clockwise */ - -/* Start of Encoder anti-clockwise */ - if ( encoder_value <= -4 ) - { - /* Start of Encoder state RGB_display */ - if (!RGB_encoder_bool){ - RGB_encoder_timer=timer_read(); - RGB_encoder_bool=true; - RGB_encoder_count=6; - rgblight_mode(1); - rgblight_setrgb( 0,0,0 ); - }else if (RGB_encoder_bool && timer_elapsed(RGB_encoder_timer) < 800) { - RGB_encoder_timer=timer_read(); - RGB_encoder_count+=1; - if (RGB_encoder_count<6 || RGB_encoder_count> 10){ - RGB_encoder_count=6; - rgblight_setrgb(0, 0, 0); + if (timer_elapsed(RGB_encoder_timer2) > 180) { + if (RGB_encoder_dir == 1) { + rgblight_setrgb_at(160, 160, 0, 8); + } else { + rgblight_setrgb_at(160, 160, 0, 3); + } + } + if (timer_elapsed(RGB_encoder_timer2) > 280) { + if (RGB_encoder_dir == 1) { + rgblight_setrgb_at(192, 192, 0, 9); + } else { + rgblight_setrgb_at(192, 192, 0, 2); + } + } + if (timer_elapsed(RGB_encoder_timer2) > 400) { + if (RGB_encoder_dir == 1) { + rgblight_setrgb_at(224, 224, 0, 10); + } else { + rgblight_setrgb_at(224, 224, 0, 1); + } } - } - rgblight_setrgb_at(0, 0,255,6); - if (RGB_encoder_count>11) { - RGB_encoder_count=11; - } - switch (RGB_encoder_count) { - case 6: - rgblight_setrgb_at(0, 0,255,7); - break; - case 7: - rgblight_setrgb_at(0, 0,255,8); - break; - case 8: - rgblight_setrgb_at(0, 0,255,9); - break; - case 9: - rgblight_setrgb_at(0, 0,255,10); - break; - case 10: - rgblight_setrgb_at(0, 0,128,11); - break; - } - /* End of Encoder state RGB_display */ - - /* Start of Set Encoder Keycode */ - switch ( layer ) - { - case 0: - tap_code( KC_VOLU ); - break; - case _CODE: - tap_code( KC_RGHT ); - break; - case _RGB: - rgblight_increase_val(); - break; - case _NUMB: - tap_code( KC_RGHT ); - break; - case _MARO: - tap_code( KC_DOWN ); - break; - default: - tap_code( KC_VOLU ); - } - /* End of Set Encoder Keycode */ - -} - -/* End of Encoder anti-clockwise */ - - encoder_value %= 4; - -/* Start of RGB with Layer change */ - - /* Save the Layer0 RGB state */ - if ( save_rgbmode == true ) { - if (RGB_TAP_STATE==false) - { - RGB_LAYER0_mode = rgblight_config.mode; } } - save_rgbmode = false; - /* When the layer is changed */ - if ( layer != current_layer && caps == false) { - has_layer_changed = true; - current_layer = layer; /* update layer information */ + /* layer rgb */ + if (layer != current_layer) { + has_layer_changed = true; + current_layer = layer; } - /* Check for layer change, and apply color if its changed since last check */ - if ( has_layer_changed ) - { - /* change backlight based on layer. These should be numbers or whatever you defined the layers as */ - switch ( layer ) - { - case 0: - - /* if the key tap RGB effect is enable */ - if (RGB_TAP_STATE==true){ - rgblight_mode(1); - rgblight_setrgb( RGB_TAP_Base_Color ); - } - else{ - rgblight_mode( RGB_LAYER0_mode ); + if (has_layer_changed) { + if (layer == 0) { + rgblight_mode(RGB_LAYER0_mode); + } else { + rgblight_mode(1); + for (i = 0; i < 48; i++) { + (i > 41) ? (j = i - 1) : (j = i); + uint16_t kc = keymap_key_to_keycode(layer, (keypos_t) {.row = 0, .col = i + }); + if (kc == KC_TRNS) { + setrgb(5, 5, 5, (LED_TYPE * ) & led[j]); /* TRNS color 0-255*/ + } else if (kc == KC_NO) { + setrgb(0, 0, 0, (LED_TYPE * ) & led[j]); /* NO color 0-255*/ + } else { + if (layer == 1) { + setrgb(128, 64, 0, (LED_TYPE * ) & led[j]); /* 1 layer 0-255*/ + } else if (layer == 2) { + setrgb(0, 64, 128, (LED_TYPE * ) & led[j]); /* 2*/ + } else if (layer == 3) { + setrgb(64, 128, 0, (LED_TYPE * ) & led[j]); /* 3*/ + } else if (layer == 4) { + setrgb(0, 128, 64, (LED_TYPE * ) & led[j]); /* 4*/ + } else if (layer == 5) { + setrgb(128, 0, 128, (LED_TYPE * ) & led[j]); /* 5*/ + } else if (layer == 6) { + setrgb(128, 0, 128, (LED_TYPE * ) & led[j]); /* 6*/ + } else if (layer == 7) { + setrgb(128, 128, 0, (LED_TYPE * ) & led[j]); /* 7*/ + } else if (layer == 8) { + setrgb(0, 128, 128, (LED_TYPE * ) & led[j]); /* 8*/ + } else if (layer == 9) { + setrgb(128, 192, 64, (LED_TYPE * ) & led[j]); /* 9*/ + } else if (layer == 10) { + setrgb(64, 192, 128, (LED_TYPE * ) & led[j]); /* 10*/ + } else if (layer == 11) { + setrgb(128, 64, 192, (LED_TYPE * ) & led[j]); /* 11*/ + } else if (layer == 12) { + setrgb(64, 128, 192, (LED_TYPE * ) & led[j]); /* 12*/ + } else if (layer == 13) { + setrgb(128, 192, 0, (LED_TYPE * ) & led[j]); /* 13*/ + } else if (layer == 14) { + setrgb(192, 0, 128, (LED_TYPE * ) & led[j]); /* 14*/ + } else if (layer == 15) { + setrgb(0, 192, 128, (LED_TYPE * ) & led[j]); /* 15*/ + } } - break; - - case _CODE: //1 -/* Save Layer0 RGB state */ - RGB_LAYER0_mode = rgblight_config.mode; - -/* set all the RGB color under the switch */ - rgblight_mode( 1 ); - rgblight_setrgb(RGB_Layer_1_Base_Color); - - /* set each of the RGB led color under the switch */ - rgblight_setrgb_at(64, 64, 64,1); // Q - rgblight_setrgb_at(64, 64, 64,2); // W - rgblight_setrgb_at(64, 64, 64,3); // E - rgblight_setrgb_at(64, 64, 64,4); // R - rgblight_setrgb_at(64, 64, 64,5); // T - rgblight_setrgb_at(64, 64, 64,6); // Y - rgblight_setrgb_at(64, 64, 64,7); // U - rgblight_setrgb_at(64, 64, 64,8); // I - rgblight_setrgb_at(64, 64, 64,9); // O - rgblight_setrgb_at(64, 64, 64,10); // P - rgblight_setrgb_at(64, 0, 0,40); // - - rgblight_setrgb_at(64, 0, 0,42); // = - break; - - case _NAVI: //2 - RGB_LAYER0_mode = rgblight_config.mode; - - rgblight_mode( 1 ); - rgblight_setrgb(RGB_Layer_2_Base_Color); - - rgblight_setrgb_at(64, 0, 64,3); - rgblight_setrgb_at(64, 0, 64,14); - rgblight_setrgb_at(64, 0, 64,15); - rgblight_setrgb_at(64, 0, 64,16); - rgblight_setrgb_at(64, 64, 0,8); - rgblight_setrgb_at(64, 64, 0,10); - rgblight_setrgb_at(64, 64, 0,21); - rgblight_setrgb_at(64, 64, 0,29); - rgblight_setrgb_at(64, 0, 0,11); - rgblight_setrgb_at(0, 0, 64,34); - rgblight_setrgb_at(0, 0, 64,44); - rgblight_setrgb_at(0, 0, 64,45); - rgblight_setrgb_at(0, 0, 64,46); - break; - case _FUNC: //3 - RGB_LAYER0_mode = rgblight_config.mode; - - rgblight_mode( 1 ); - rgblight_setrgb(RGB_Layer_3_Base_Color); - - rgblight_setrgb_at(0, 0, 64,1); - rgblight_setrgb_at(0, 0, 64,2); - rgblight_setrgb_at(0, 0, 64,3); - rgblight_setrgb_at(0, 0, 64,4); - rgblight_setrgb_at(0, 0, 64,5); - rgblight_setrgb_at(0, 0, 64,6); - rgblight_setrgb_at(0, 0, 64,7); - rgblight_setrgb_at(0, 0, 64,8); - rgblight_setrgb_at(0, 0, 64,9); - rgblight_setrgb_at(0, 0, 64,10); - rgblight_setrgb_at(0, 0, 64,13); - rgblight_setrgb_at(0, 0, 64,14); - break; - - case _SYMB: //4 - RGB_LAYER0_mode = rgblight_config.mode; - - rgblight_mode( 1 ); - rgblight_setrgb(RGB_Layer_4_Base_Color); - - rgblight_setrgb_at(0, 64, 64,1); - rgblight_setrgb_at(0, 64, 64,2); - rgblight_setrgb_at(0, 64, 64,3); - rgblight_setrgb_at(0, 64, 64,4); - rgblight_setrgb_at(0, 64, 64,5); - rgblight_setrgb_at(0, 64, 64,6); - rgblight_setrgb_at(0, 64, 64,7); - rgblight_setrgb_at(0, 64, 64,8); - rgblight_setrgb_at(0, 64, 64,9); - rgblight_setrgb_at(0, 64, 64,10); - rgblight_setrgb_at(0, 64, 64,12); - rgblight_setrgb_at(0, 64, 64,22); - rgblight_setrgb_at(0, 64, 64,23); - rgblight_setrgb_at(0, 64, 64,32); - rgblight_setrgb_at(0, 64, 64,33); - rgblight_setrgb_at(0, 64, 64,34); - rgblight_setrgb_at(0, 64, 64,39); - rgblight_setrgb_at(0, 64, 64,40); - rgblight_setrgb_at(0, 64, 64,42); - rgblight_setrgb_at(0, 64, 64,43); - break; - - case _NUMB: //5 - RGB_LAYER0_mode = rgblight_config.mode; - - rgblight_mode( 1 ); - rgblight_setrgb(RGB_Layer_5_Base_Color); - - rgblight_setrgb_at(0,64,0,1); - rgblight_setrgb_at(0,64,0,2); - rgblight_setrgb_at(0,64,0,13); - rgblight_setrgb_at(0,64,0,14); - rgblight_setrgb_at(0,64,64,15); - rgblight_setrgb_at(64,64,64,7); - rgblight_setrgb_at(64,64,64,8); - rgblight_setrgb_at(64,64,64,9); - rgblight_setrgb_at(64,64,64,19); - rgblight_setrgb_at(64,64,64,20); - rgblight_setrgb_at(64,64,64,21); - rgblight_setrgb_at(64,64,64,31); - rgblight_setrgb_at(64,64,64,32); - rgblight_setrgb_at(64,64,64,33); - rgblight_setrgb_at(64,64,64,42); - rgblight_setrgb_at(64,64,64,43); - rgblight_setrgb_at(0,128,0,44); - break; - case _MARO: //6 - RGB_LAYER0_mode = rgblight_config.mode; - - rgblight_mode( 1 ); - rgblight_setrgb(RGB_Layer_6_Base_Color); - break; - - case _RGB: //7 - RGB_LAYER0_mode = rgblight_config.mode; - - rgblight_mode( 1 ); - rgblight_setrgb(RGB_Layer_7_Base_Color); - - rgblight_setrgb_at(1,143,225,0); - rgblight_setrgb_at(39,21,107,1); - rgblight_setrgb_at(208,0,0,2); - rgblight_setrgb_at(64,64,64,21); - break; - case _ADJUST: //8 - RGB_LAYER0_mode = rgblight_config.mode; - - rgblight_mode( 1 ); - rgblight_setrgb(RGB_Layer_8_Base_Color); - - rgblight_setrgb_at(0,64,0,10); - rgblight_setrgb_at(64,0,0,11); - rgblight_setrgb_at(0,64,0,17); - rgblight_setrgb_at(0,64,0,30); - rgblight_setrgb_at(6,50,50,12); - break; - - case _GAME: //9 - RGB_LAYER0_mode = rgblight_config.mode; - - rgblight_mode( 1 ); - rgblight_setrgb(RGB_Layer_9_Base_Color); - - rgblight_setrgb_at(0,0,64,15); - rgblight_setrgb_at(0,0,64,26); - rgblight_setrgb_at(0,0,64,27); - rgblight_setrgb_at(0,0,64,28); - rgblight_setrgb_at(64,0,0,35); - break; - - default: - rgblight_mode( RGB_LAYER0_mode ); + } + rgblight_set(); } has_layer_changed = false; } -/* End of RGB with Layer change */ - -} // End of matrix_scan_user - - - -/* shift + enter = " from:https://github.com/qmk/qmk_firmware/blob/e899cb8940da04fa2610604f0aab417db7fac119/keyboards/mitosis/keymaps/datagrok/keymap.c */ - -bool comm_shifted = false; -bool ques_shifted = false; -static uint8_t key_index = 0; -uint8_t shifted; -uint16_t s_keycode; -bool *k_shifted; - -bool process_record_user( uint16_t keycode, keyrecord_t *record ){ - -/* Start of key tap RGB effect */ - if ( RGB_TAP_STATE ==true ) { - key_index=(record->event.key.col)+(record->event.key.row)*12; - -/* Change the Hue of the RGB color with the type speed */ - if (timer_elapsed(TAP_RGB_timer) >10000){ - TAP_RGB_timer=timer_read(); - Type_Hue=270; - }else if (timer_elapsed(TAP_RGB_timer) >1000){ - Type_Hue+=30; - if (Type_Hue>270) { - Type_Hue=270;} - }else{ - TAP_RGB_timer=timer_read(); - Type_Hue-=10; - if (Type_Hue<10) { - Type_Hue=10;} - } - if (key_index>42){ //fix the RGB index of the MIT layout position - key_index=key_index-1; - } - if ( record->event.pressed ) { - rgblight_sethsv_at(Type_Hue,255,255,key_index); - } else { - rgblight_setrgb_at(RGB_TAP_Base_Color,key_index); - } - } -/* End of key tap RGB effect */ - - switch ( keycode ) - { - /* save the RGB state when set the new */ - case RGB_M_R: - save_rgbmode = true; - break; - case RGB_M_SW: - save_rgbmode = true; - break; - case RGB_M_X: - save_rgbmode = true; - break; - case RGB_M_G: - save_rgbmode = true; - break; - case RGB_MODE_KNIGHT: - save_rgbmode = true; - break; - -/* Define a New Keycode: double zero */ - case KC_00: - if (record->event.pressed) { - // Do something when pressed - } else { - tap_code( KC_0 ); // send 0 - tap_code( KC_0 ); // send 0 twice without macro - } - return false; // Skip all further processing of this key - - /* when the REST key is pressed the 'R' key will RED,the "Bottom Left"(esc of qmk-dfu) will be GREEN */ - case RESET: - rgblight_mode( 1 ); - rgblight_setrgb( 0, 0, 0 ); - rgblight_setrgb_at(128, 0, 0,4); // R - rgblight_setrgb_at(6, 128, 24,36); // Bottom Left key - break; - -/* Define a New Keycode: key tap RGB effect toggle */ - case RGB_TAP: - if ( !(record->event.pressed)) { - /* If enable,the 'On' key will be green */ - if (RGB_TAP_STATE) { - RGB_TAP_STATE=false; - rgblight_mode( 1 ); - rgblight_setrgb( RGB_TAP_Base_Color ); - rgblight_setrgb_at(RGB_TAP_Off_Color,16); // O - on - }else{ - /* If disenable,the 'oFf' key will be red */ - RGB_TAP_STATE=true; - rgblight_mode( 1 ); - rgblight_setrgb( RGB_TAP_Base_Color ); - rgblight_setrgb_at(RGB_TAP_On_Color,9); // F - off - } - } - break; + /* end of layer rgb */ +} -/* special shift keys */ - case KC_ENT: - s_keycode = KC_QUOT; - k_shifted = &ques_shifted; - break; - case KC_UP: - s_keycode = KC_SLSH; - k_shifted = &ques_shifted; - break; - case KC_DOWN: - s_keycode = KC_BSLS; - k_shifted = &ques_shifted; +bool process_record_user(uint16_t keycode, keyrecord_t * record) { + switch (keycode) { + case RGB_MOD: + RGB_LAYER0_mode = rgblight_config.mode; break; default: - return(true); + return (true); } + return (true); +} - shifted = get_mods() & (MOD_BIT( KC_LSHIFT ) | MOD_BIT( KC_RSHIFT ) ); - - /* Keydown. If shift is currently pressed, register its alternate keycode. */ - if ( record->event.pressed && shifted ) - { - *k_shifted = true; - register_code( s_keycode ); - return(false); - /* - * Keyup. If shift was pressed back when the key was pressed, unregister - * its alternate keycode. - */ - } else if ( !(record->event.pressed) && *k_shifted ) { - *k_shifted = false; - unregister_code( s_keycode ); - return(false); - /* Otherwise, behave as normal. */ +void encoder_update_user(uint8_t index, bool clockwise) { + RGB_encoder_timer = timer_read(); + RGB_encoder_timer2 = timer_read(); + uint8_t layer = biton32(layer_state); + if (clockwise) { + RGB_encoder_dir = 1; } else { - return(true); + RGB_encoder_dir = -1; } - -} // End ofprocess_record_user - - -void led_set_user( uint8_t usb_led ) -{ - static uint8_t old_usb_led = 0; - wait_ms( 10 ); /* gets rid of tick */ - - if ( (usb_led & (1 << USB_LED_CAPS_LOCK) ) && !(old_usb_led & (1 << USB_LED_CAPS_LOCK) ) ) { -/* CAPS on */ - caps= true; - rgblight_setrgb( 0,0,0 ); - rgblight_setrgb_at(RGB_Caps_Color,12); // caps key - #ifdef AUDIO_ENABLE - PLAY_SONG( tone_caps ); - #endif - }else if ( !(usb_led & (1 << USB_LED_CAPS_LOCK) ) && (old_usb_led & (1 << USB_LED_CAPS_LOCK) ) ) { - -/* CAPS off */ - caps= false; - if (RGB_TAP_STATE==false){ - rgblight_mode( RGB_LAYER0_mode ); - }else{ - rgblight_mode(1); - rgblight_setrgb( 0,0,0 ); + if (index == 0) /* Right encoder */ { + if (clockwise) { + register_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 11 + })); + unregister_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 11 + })); + } else { + register_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 10 + })); + unregister_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 10 + })); + } + } else if (index == 1) /* Left encoder */ { + if (clockwise) { + register_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 1 + })); + unregister_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 1 + })); + } else { + register_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 0 + })); + unregister_code(keymap_key_to_keycode(layer, (keypos_t) {.row = 4, .col = 0 + })); } - #ifdef AUDIO_ENABLE - PLAY_SONG( tone_caps ); - #endif } - old_usb_led = usb_led; -} // End of led_set_user +} diff --git a/keyboards/tetris/readme.md b/keyboards/tetris/readme.md index b2741caf1c03..260d453a84cc 100644 --- a/keyboards/tetris/readme.md +++ b/keyboards/tetris/readme.md @@ -2,6 +2,8 @@ Tetris === A compact 40% (12x4) ortholinear keyboard (Planck Mit layout) with per switch RGB and encoder made by Fengz. +Fake keys on the 5th row are for configuring the encoder's keycode. + ![TetrisPhoto](https://i.imgur.com/quwEY0f.jpg) More: [Imgur](https://imgur.com/gallery/Azq2zUm). @@ -12,4 +14,4 @@ Make example for this keyboard (after setting up your build environment): make tetris: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. \ No newline at end of file +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. diff --git a/keyboards/tetris/rules.mk b/keyboards/tetris/rules.mk old mode 100644 new mode 100755 index 4741c162bda0..c3e641c8f218 --- a/keyboards/tetris/rules.mk +++ b/keyboards/tetris/rules.mk @@ -36,16 +36,18 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + # Boot Section Size in *bytes* #OPT_DEFS += -DBOOTLOADER_SIZE=4096 BOOTLOADER =qmk-dfu + # Build Options # comment out to disable the options. # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration @@ -54,8 +56,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = yes RGBLIGHT_ENABLE = yes -TAP_DANCE_ENABLE = no - -EXTRAFLAGS += -flto # Make the hex smaller - -LAYOUTS = planck_mit +EXTRAFLAGS = -flto +ENCODER_ENABLE = yes diff --git a/keyboards/tetris/tetris.c b/keyboards/tetris/tetris.c old mode 100644 new mode 100755 index 8d494c17f3eb..f78de2f7be63 --- a/keyboards/tetris/tetris.c +++ b/keyboards/tetris/tetris.c @@ -1 +1 @@ -#include "tetris.h" +#include QMK_KEYBOARD_H diff --git a/keyboards/tetris/tetris.h b/keyboards/tetris/tetris.h old mode 100644 new mode 100755 index 0a036ec3b338..f5d13e5c2f8e --- a/keyboards/tetris/tetris.h +++ b/keyboards/tetris/tetris.h @@ -7,12 +7,14 @@ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \ + K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311, \ + K400, K401, K410, K411 \ ) { \ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 } \ + { K300, K301, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 }, \ + { K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K410, K411 } \ } -#endif \ No newline at end of file +#endif diff --git a/keyboards/the_ruler/keymaps/default/config.h b/keyboards/the_ruler/keymaps/default/config.h index df06a2620627..271f48d0011b 100644 --- a/keyboards/the_ruler/keymaps/default/config.h +++ b/keyboards/the_ruler/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif \ No newline at end of file diff --git a/keyboards/the_ruler/keymaps/default/keymap.c b/keyboards/the_ruler/keymaps/default/keymap.c index e7af797b9dd0..8b0f44b5edeb 100644 --- a/keyboards/the_ruler/keymaps/default/keymap.c +++ b/keyboards/the_ruler/keymaps/default/keymap.c @@ -1,6 +1,4 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -18,10 +16,6 @@ enum custom_keycodes { FN_2 }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Defines for task manager and such #define CALTDEL LCTL(LALT(KC_DEL)) #define TSKMGR LCTL(LSFT(KC_ESC)) diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/default/config.h b/keyboards/thevankeyboards/bananasplit/keymaps/default/config.h index 060f5922f2c3..b89b05009a64 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/default/config.h +++ b/keyboards/thevankeyboards/bananasplit/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c index cc4f23979272..437b1881a4d8 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c @@ -43,9 +43,6 @@ uint16_t tap_dance_keys[] = { [BE_TD_ALT] = KC_LALT, }; -// Fillers to make layering more clear -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT_arrow_command( /* Qwerty */ L2_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, diff --git a/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c index baa266e63534..ee8653520e1f 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/budi/keymap.c @@ -81,10 +81,6 @@ extern keymap_config_t keymap_config; #define XBACK LGUI(LALT(KC_LEFT)) #define XFFWD LGUI(LALT(KC_RIGHT)) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define xxxxxxx KC_NO - enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here SWTCH diff --git a/keyboards/thevankeyboards/minivan/keymaps/core/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/core/keymap.c index 6a069713faea..95987e1ca856 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/core/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/core/keymap.c @@ -4,9 +4,6 @@ #define _L1 1 #define _L2 2 -// Fillers to make layering more clear -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT( /* Qwerty */ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/config.h b/keyboards/thevankeyboards/minivan/keymaps/default/config.h index df06a2620627..271f48d0011b 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/default/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c index 13ef62406b48..bc6c213f05df 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c @@ -24,10 +24,6 @@ extern keymap_config_t keymap_config; #define L_CURBR LSFT(KC_LBRC) #define R_CURBR LSFT(KC_RBRC) -// Fillers to make layering more clear -#define _______ KC_TRNS - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = LAYOUT( /* Qwerty */ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, diff --git a/keyboards/thevankeyboards/minivan/keymaps/jeebak/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/jeebak/keymap.c index 0ec9485c724b..a7ace39e39c6 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/jeebak/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/jeebak/keymap.c @@ -46,10 +46,6 @@ enum macro_keycodes { KC_AG_TAB_R, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c new file mode 100644 index 000000000000..6b1e1769ef25 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/king/keymap.c @@ -0,0 +1,114 @@ +#include QMK_KEYBOARD_H + + +enum layer_names { + _ML, + _FL, + _NL, + _SL, + _RL +}; + + +#define SPC_FUN LT(_FL, KC_SPC) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* 0: Main Layer + + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ + * │ ESC │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ENTER │ + * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ + * │ TAB │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │' │ + * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ + * │ LSHFT │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │MO(SL│ + * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ + * │LCTRL │ LGUI │ LALT│SPACE(_NL) │MO(_NL) │BKSPC│ │MO(RL │ + * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ + */ + [_ML] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_SL), + KC_LCTL, KC_LGUI, KC_LALT, SPC_FUN, MO(_NL), KC_BSPC, XXXXXXX, MO(_RL) + ), + + + /* 1: Function Layer + + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ + * │ │ │HOME │ UP │END │PGUP │ │ F1 │ F2 │ F3 │ F4 │ │ + * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ + * │ CAPS │ │LEFT │DOWN │RIGHT│PGDN │ │ F5 │ F6 │ F7 │ F8 │ │ + * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ + * │ │ │ │ DEL │ INS │ │ │ F9 │ F10 │ F11 │ F12 │ │ + * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ + * │ │ │ │ │ │ │ │ │ + * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ + */ + [_FL] = LAYOUT( + _______, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, _______, + KC_CAPS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, _______, + _______, XXXXXXX, XXXXXXX, KC_DEL, KC_INS, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + + + /* 2: Number Layer + + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ + * │ ~ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ( │ ) │ │ + * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 8 │ 0 │ │ + * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ + * │ │ │ │ │ │ │ │ │ + * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ + */ + [_NL] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* 3: Symbol Layer + + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ + * │ │ _ │ + │ { │ } │ | │ │ │ │ │ │ │ + * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ + * │ │ - │ = │ [ │ ] │ \ │ │ DEL │ INS │ │ │ │ + * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ + * │ │ │ │ │ │ │ │ │ + * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ + */ + [_SL] = LAYOUT( + _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, XXXXXXX, KC_DEL, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* 4: Reset Layer + + * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────────┐ + * │RESET│ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────┴┬────────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬─────┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────────┬┴─────┴─┬───┴─┬───┴─────┴──┬──┴─────┴─────┴─┬───┴─┬───┴─┬───┴─────┤ + * │ │ │ │ │ │ │ │ │ + * └────────┴────────┴─────┴────────────┴────────────────┴─────┴─────┴─────────┘ + */ + [_RL] = LAYOUT( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + diff --git a/keyboards/thevankeyboards/minivan/keymaps/king/readme.md b/keyboards/thevankeyboards/minivan/keymaps/king/readme.md new file mode 100644 index 000000000000..edcf5f43e9f7 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/king/readme.md @@ -0,0 +1,4 @@ +# King's KUMO layout + +Currently uses the fewest key layout (three keys on both sides of the bottom row) for the KUMO/minivan + diff --git a/keyboards/thevankeyboards/minivan/keymaps/king/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/king/rules.mk new file mode 100644 index 000000000000..9865184abb8d --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/king/rules.mk @@ -0,0 +1,6 @@ +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/config.h b/keyboards/thevankeyboards/minivan/keymaps/like_jis/config.h new file mode 100644 index 000000000000..4c4e6d37b510 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/config.h @@ -0,0 +1,43 @@ +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// 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 + +// LED Setting: if you have KUMO you can use RGBLIGHT_ENABLE = yes +#ifdef RGBLIGHT_ENABLE + #define RGB_DI_PIN D0 + #define RGBLIGHT_TIMER + #define RGBLED_NUM 3 +#endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c new file mode 100644 index 000000000000..3d282e182b38 --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/keymap.c @@ -0,0 +1,173 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST, + KANJI, + RGBRST +}; + +enum tapdances{ + TD_SCCL = 0, +}; + +// Layer Mode aliases +#define KC_TBSF LSFT_T(KC_TAB) +#define KC_ROSF RSFT_T(KC_RO) +#define KC_ALAP LALT_T(KC_APP) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) +#define KC_MLAD MO(_ADJUST) + +#define KC_SCCL TD(TD_SCCL) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------. + // Esc Q W E R T Y U I O P - + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + //Tab/Shift A S D F G H J K L ;/: Enter + KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Shift Z X C V B N M , . / yen + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ROSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Ctrl Alt GUI/Comm BackSpace/Lower Space/Raise Alt Menu Ctrl + KC_LCTL, KC_LALT, KC_LGUI, KC_BSLO, KC_SPRA, KC_RALT, KC_ALAP, KC_RCTL + //`-----------------------------------------------------------------------------------------------------------' + ), + + [_LOWER] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------. + // F1 F2 F3 F4 F5 - ^ \ @ [ Delete + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // F6 F7 F8 F9 F10 ; : ] + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _______, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // F11 F12 Kana/Kanji Enter Delete + _______, KC_F11, KC_F12, XXXXXXX, KANJI, KC_ENT, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Adjust + _______, _______, _______, _______, KC_MLAD, _______, _______, _______ + //`-----------------------------------------------------------------------------------------------------------' + ), + + [_RAISE] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------. + // 1 2 3 4 5 6 7 8 9 0 - + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Left Down Up Right + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, _______, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // , . / yen + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_ROSF, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______ + //`-----------------------------------------------------------------------------------------------------------' + ), + + [_ADJUST] = LAYOUT( + //,-----------------------------------------------------------------------------------------------------------. + // Reset LEDReset MacMode WinMode Home PageDown PageUp End + _______, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // LED On/Off Hue/Saturation/Value Increment Mouse Left Down Up Right + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, _______, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // LED Mode Hue/Saturation/Value Decrement Mouse Button Left Right + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______ + //`-----------------------------------------------------------------------------------------------------------' + ) +}; + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/readme.md b/keyboards/thevankeyboards/minivan/keymaps/like_jis/readme.md new file mode 100644 index 000000000000..d7c1a091e65f --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/readme.md @@ -0,0 +1,63 @@ +# The LikeJIS is Japanese Keyboard like keymap + +This keymap use for KUMO. Therefore it can use full color LED indicators used by D0 pin. But this keymap as use as Illumination :) + +## Keymap Description + +- Tab/Shift ...... Tab key is one tap, Shift key is long push. +- ;/: ...... ; key is one tap, : key is double tap. +- BackSpace/Lower ...... Backspace key is one tap, Move to Lower layer with long push. +- Space/Raise ...... Space key is one tap, Move to Raise layer with . +- Kanji ...... Japanese IME toggle key. + +## How to move to Ajdust Layer + +At first, Move to Lower layer with long push. After that Adjust key with long push. Now you have into Adjust layer state. + +```c +Base Layer + //,-----------------------------------------------------------------------------------------------------------. + // Esc Q W E R T Y U I O P - + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + //Tab/Shift A S D F G H J K L ;/: Enter + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Shift Z X C V B N M , . / \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Ctrl Alt GUI BackSpace/Lower Space/Raise Alt Menu Ctrl + //`-----------------------------------------------------------------------------------------------------------' + +Lower Layer + //,-----------------------------------------------------------------------------------------------------------. + // F1 F2 F3 F4 F5 - ^ \ @ [ Delete + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // F6 F7 F8 F9 F10 ; : ] + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // F11 F12 Kanji Enter Delete + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Adjust + //`-----------------------------------------------------------------------------------------------------------' + +Raise Layer + //,-----------------------------------------------------------------------------------------------------------. + // 1 2 3 4 5 6 7 8 9 0 - + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // Left Down Up Right + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // , . / \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // + //`-----------------------------------------------------------------------------------------------------------' + +Adjust Layer + //,-----------------------------------------------------------------------------------------------------------. + // Reset LEDReset MacMode WinMode Home PageDown PageUp End + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // LED On/Off Hue Saturation Value Increment MouseLeft Down Up Right + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // LED Mode Hue Saturation Value Decrement Button L R + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------| + // + //`-----------------------------------------------------------------------------------------------------------' + }; + +``` diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/like_jis/rules.mk new file mode 100644 index 000000000000..07f71d6dbb1d --- /dev/null +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/rules.mk @@ -0,0 +1,25 @@ +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes + +LED_ANIMATIONS = yes # LED animations + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c index 8f0fba11dcc6..10e9b9dcdf4b 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/mjt/keymap.c @@ -20,17 +20,14 @@ enum planck_keycodes { DYNAMIC_MACRO_RANGE, }; -// Fillers to make layering more clear -#define _______ KC_TRNS #define FKEYS F(_FKEYS) -#define NUMSYM F(_NUMSYM) +#define NUMSYM TT(_NUMSYM) #define FKEYGRV F(_FKEYGRV) #define MACSLEEP M(5) #define PLOVER M(6) #define LAYERRESET M(7) #define BACKLIT M(8) #define ADJUST M(9) -#define XXXXXXX KC_NO #include "dynamic_macro.h" @@ -88,7 +85,6 @@ void persistant_default_layer_set(uint16_t default_layer) { const uint16_t PROGMEM fn_actions[] = { [_FKEYS] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_TAB), [_FKEYGRV] = ACTION_LAYER_TAP_KEY(_FKEYS, KC_GRV), - [_NUMSYM] = ACTION_LAYER_TAP_TOGGLE(_NUMSYM), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/thevankeyboards/minivan/keymaps/smt/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/smt/keymap.c index ee117e47bd7c..371bcd4719a3 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/smt/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/smt/keymap.c @@ -23,10 +23,6 @@ enum planck_keycodes { BACKLIT }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift diff --git a/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c index 220cc8c61b1d..0c97954494c6 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/tong92/keymap.c @@ -25,11 +25,8 @@ enum tv44_keycodes { EXT_MOUSE }; -// Fillers to make layering more clear -#define _______ KC_TRNS #define LOWER F(_LOWER) #define RAISE F(_RAISE) -#define XXXXXXX KC_NO #define WINDOW_SHORTCUT MO(_WINDOW_SHORTCUT) #define MAC_SHORTCUT MO(_MAC_SHORTCUT) diff --git a/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c index ec0d270070b6..059b7eb46e29 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/xyverz/keymap.c @@ -20,10 +20,6 @@ enum planck_keycodes { ADJUST }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases for some other things I want to try out #define RAI_ESC LT(_RAISE, KC_ESC) #define LOW_QUQ LT(_LOWER, KC_QUOT) diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/config.h b/keyboards/thevankeyboards/roadkit/keymaps/default/config.h index df06a2620627..271f48d0011b 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/default/config.h +++ b/keyboards/thevankeyboards/roadkit/keymaps/default/config.h @@ -1,8 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c index ecd25be48f63..7aa7bcafb2ac 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c @@ -12,11 +12,6 @@ extern keymap_config_t keymap_config; // Macro name shortcuts #define NUMPAD M(_NP) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NP] = LAYOUT_numpad_4x4( /* Numpad */ KC_P7, KC_P8, KC_P9, KC_PPLS, \ diff --git a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c index d541b1a579f7..b00cf80f5c2b 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c @@ -40,10 +40,6 @@ enum roadkit_keycodes { #include "dynamic_macro.h" -// Fillers to make keymaps cleaner looking -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMPAD] = LAYOUT_numpad_4x4( /* Numpad */ KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \ diff --git a/keyboards/thevankeyboards/roadkit/keymaps/khord/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/khord/keymap.c index 9111f4f898aa..674f3f37abec 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/khord/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/khord/keymap.c @@ -6,10 +6,6 @@ extern keymap_config_t keymap_config; #define _L1 1 #define _L2 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum custom_keycodes { NUMPAD = SAFE_RANGE, ADMIN, diff --git a/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c index e7f6485e2353..18454d56496f 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c @@ -38,11 +38,6 @@ enum minivan_keycodes { #include "dynamic_macro.h" -// Fillers to make keymaps cleaner looking -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMPAD] = LAYOUT_numpad_4x4( /* Numpad */ KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \ diff --git a/keyboards/thevankeyboards/roadkit/keymaps/singles/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/singles/keymap.c index fd5d99503dee..9263ddbf1ebb 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/singles/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/singles/keymap.c @@ -14,11 +14,6 @@ extern keymap_config_t keymap_config; #define NUMPAD M(_NP) #define LAYER1 M(_L1) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NP] = LAYOUT_ortho_4x4( /* Numpad */ KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, \ diff --git a/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/keymap.c index 853bb783a507..e5c14eec8dcd 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/keymap.c @@ -18,10 +18,6 @@ extern keymap_config_t keymap_config; #define LAYER2 M(_L2) #define LAYER3 M(_L3) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - void matrix_init_user(void) { backlight_level(4); } diff --git a/keyboards/tmo50/config.h b/keyboards/tmo50/config.h index 780a530263f9..3af322e9b032 100644 --- a/keyboards/tmo50/config.h +++ b/keyboards/tmo50/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D1, D4, F0, F1, F4, F5, F6, F7, D6, D7, B4, B5, B6, C6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* number of backlight levels */ diff --git a/keyboards/tmo50/keymaps/olivia/keymap.c b/keyboards/tmo50/keymaps/olivia/keymap.c new file mode 100644 index 000000000000..c1e86f9b902e --- /dev/null +++ b/keyboards/tmo50/keymaps/olivia/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2019 funderburker + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define LT1_SPC LT(1, KC_SPC) +#define LT1_BSPC LT(1, KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default layer + [0] = LAYOUT_all( + KC_VOLU, 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_VOLD, MT(MOD_LCTL, 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_ENT, + KC_MUTE, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2), + KC_MPLY, KC_LALT, KC_LGUI, LT1_BSPC, LT1_SPC, KC_RALT, MO(3) + ), + + // Fn1 layer + [1] = LAYOUT_all( + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn2 layer + [2] = LAYOUT_all( + KC_BRIU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_UP, KC_TRNS, KC_TRNS, KC_DEL, + KC_BRID, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn3 layer + [3] = LAYOUT_all( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, KC_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP, BL_DEC, 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 + ), +}; diff --git a/keyboards/tmo50/keymaps/pyrol/keymap.c b/keyboards/tmo50/keymaps/pyrol/keymap.c new file mode 100644 index 000000000000..f67d26092f6a --- /dev/null +++ b/keyboards/tmo50/keymaps/pyrol/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 funderburker + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define CALTDEL LCA(KC_DEL) +#define TSKMGR C(S(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Default layer + [0] = LAYOUT_all( + KC_VOLU, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_EQL, KC_BSPC, + KC_VOLD, KC_LCTRL, 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_MPLY, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), + KC_MUTE, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(2, KC_SPC), KC_RALT, MO(4) + ), + + // Fn1 layer + [1] = LAYOUT_all( + A(KC_TAB), KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_RBRC, KC_LBRC, KC_DEL, + C(KC_C), KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_TRNS, + C(KC_V), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, + C(KC_X), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + //Fn2 layer + [2] = LAYOUT_all( + A(KC_TAB), KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, KC_LBRC, KC_DEL, + C(KC_C), KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TILD, KC_TRNS, + C(KC_V), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, + C(KC_X), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn3 layer + [3] = LAYOUT_all( + CALTDEL, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, + TSKMGR, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, TO(5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + // Fn4 layer + [4] = LAYOUT_all( + RESET, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + // Game layer! + [5] = LAYOUT_all( + KC_VOLU, KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_EQL, KC_BSPC, + KC_VOLD, KC_LCTRL, 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_MPLY, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(3), + KC_F12, KC_F13, KC_LALT, KC_SPC, LT(2, KC_SPC), KC_RALT, TO(0) + ), +}; diff --git a/keyboards/touchpad/info.json b/keyboards/touchpad/info.json new file mode 100644 index 000000000000..625bbffd8e04 --- /dev/null +++ b/keyboards/touchpad/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "touchpad", + "url": "", + "maintainer": "qmk", + "width": 6, + "height": 6, + "layouts": { + "LAYOUT_ortho_6x6": { + "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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, + {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, + {"x":0, "y":5}, {"x":1, "y":5}, {"x":2, "y":5}, {"x":3, "y":5}, {"x":4, "y":5}, {"x":5, "y":5} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/touchpad/keymaps/default/keymap.c b/keyboards/touchpad/keymaps/default/keymap.c index 92f772aaa8c9..7fcaa70c5d45 100644 --- a/keyboards/touchpad/keymaps/default/keymap.c +++ b/keyboards/touchpad/keymaps/default/keymap.c @@ -18,13 +18,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { - { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F }, - { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F }, - { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F }, - { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F }, - { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F }, - { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F } -} + [0] = LAYOUT_ortho_6x6( + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F + ) }; diff --git a/keyboards/touchpad/touchpad.h b/keyboards/touchpad/touchpad.h index 010d4b1383a0..97b59a033c4f 100644 --- a/keyboards/touchpad/touchpad.h +++ b/keyboards/touchpad/touchpad.h @@ -1,2 +1,19 @@ #pragma once #include "quantum.h" + +#define LAYOUT_ortho_6x6( \ + 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 \ +) \ +{ \ + { 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 } \ +} diff --git a/keyboards/treadstone32/config.h b/keyboards/treadstone32/config.h new file mode 100644 index 000000000000..6151d6e8295d --- /dev/null +++ b/keyboards/treadstone32/config.h @@ -0,0 +1,103 @@ +/* +Copyright 2019 marksard + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xDFA5 +#define DEVICE_VER 0x0010 +#define MANUFACTURER marksard +#define PRODUCT treadstone32 +#define DESCRIPTION Minimal Symmetrical staggered 32-Key Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F1, F0, E6, B2, B4, D7, D6, D4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, C7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +#define RGBLED_NUM 6 + +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 200 + #define RGBLIGHT_VAL_STEP 17 +#else + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for treadstone32 keyboard +// 120 RGBoff +// 330 RGB 6 +// 300 RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +/* + * 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 diff --git a/keyboards/treadstone32/info.json b/keyboards/treadstone32/info.json new file mode 100644 index 000000000000..2ac18be86e2b --- /dev/null +++ b/keyboards/treadstone32/info.json @@ -0,0 +1,175 @@ +{ + "keyboard_name": "Treadstone32", + "url": "https://github.com/marksard/Keyboards", + "maintainer": "marksard", + "width": 10.5, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "Q", + "x": 0, + "y": 0 + }, + { + "label": "W", + "x": 1, + "y": 0 + }, + { + "label": "E", + "x": 2, + "y": 0 + }, + { + "label": "R", + "x": 3, + "y": 0 + }, + { + "label": "T", + "x": 4, + "y": 0 + }, + { + "label": "Y", + "x": 5.5, + "y": 0 + }, + { + "label": "U", + "x": 6.5, + "y": 0 + }, + { + "label": "I", + "x": 7.5, + "y": 0 + }, + { + "label": "O", + "x": 8.5, + "y": 0 + }, + { + "label": "P", + "x": 9.5, + "y": 0 + }, + { + "label": "A", + "x": 0.25, + "y": 1 + }, + { + "label": "S", + "x": 1.25, + "y": 1 + }, + { + "label": "D", + "x": 2.25, + "y": 1 + }, + { + "label": "F", + "x": 3.25, + "y": 1 + }, + { + "label": "G", + "x": 4.25, + "y": 1 + }, + { + "label": "H", + "x": 5.25, + "y": 1 + }, + { + "label": "J", + "x": 6.25, + "y": 1 + }, + { + "label": "K", + "x": 7.25, + "y": 1 + }, + { + "label": "L", + "x": 8.25, + "y": 1 + }, + { + "label": "enter", + "x": 9.25, + "y": 1 + }, + { + "label": "Z", + "x": 0, + "y": 2 + }, + { + "label": "X", + "x": 1, + "y": 2 + }, + { + "label": "C", + "x": 2, + "y": 2 + }, + { + "label": "V", + "x": 3, + "y": 2 + }, + { + "label": "B", + "x": 4, + "y": 2 + }, + { + "label": "N", + "x": 5.5, + "y": 2 + }, + { + "label": "M", + "x": 6.5, + "y": 2 + }, + { + "label": ",", + "x": 7.5, + "y": 2 + }, + { + "label": ".", + "x": 8.5, + "y": 2 + }, + { + "label": "/", + "x": 9.5, + "y": 2 + }, + { + "label": "backspace", + "x": 3.25, + "y": 3, + "w": 2 + }, + { + "label": "space", + "x": 5.25, + "y": 3, + "w": 2 + } + ] + } + } +} diff --git a/keyboards/treadstone32/keymaps/default/config.h b/keyboards/treadstone32/keymaps/default/config.h new file mode 100644 index 000000000000..a6363f9b9a5f --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/config.h @@ -0,0 +1,58 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// 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 diff --git a/keyboards/treadstone32/keymaps/default/keymap.c b/keyboards/treadstone32/keymaps/default/keymap.c new file mode 100644 index 000000000000..a7b908c9de62 --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/keymap.c @@ -0,0 +1,170 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +// 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, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +// enum tapdances{ +// TD_CODO = 0, +// TD_SLRO, +// }; + +// Layer Mode aliases +#define KC_MLAD MO(_ADJUST) + +// Base layer mod tap +#define KC_A_SF LSFT_T(KC_A) +#define KC_Z_CT LCTL_T(KC_Z) +#define KC_X_AL LALT_T(KC_X) +#define KC_C_GU LGUI_T(KC_C) +#define KC_SSCT LCTL_T(KC_SLSH) +#define KC_ENSF LSFT_T(KC_ENT) + +// Lower layer mod tap +#define KC_F6SF LSFT_T(KC_F6) +#define KC_BSSF LSFT_T(KC_BSLS) +#define KC_11CT LCTL_T(KC_F11) +#define KC_12AL LALT_T(KC_F12) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) + +// Tap dance +// #define KC_CODO TD(TD_CODO) +// #define KC_SLRO TD(TD_SLRO) + +// qk_tap_dance_action_t tap_dance_actions[] = { +// [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), +// [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +// }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_A_SF, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_Z_CT, KC_X_AL, KC_C_GU, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SSCT, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + KC_BSLO, KC_SPRA + // `---------|---------' + ), + + [_LOWER] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_F6SF, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_11CT, KC_12AL, KC_ESC, KC_TAB, KANJI, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_GRV, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, KC_MLAD + // `---------|---------' + ), + + [_RAISE] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_SSCT, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______ + // `---------|---------' + ), + + [_ADJUST] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______ + // `---------|---------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/treadstone32/keymaps/default/readme.md b/keyboards/treadstone32/keymaps/default/readme.md new file mode 100644 index 000000000000..387efc0d45a8 --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default keymap for treadstone32 + +## Description + +## How to use diff --git a/keyboards/treadstone32/keymaps/default/readme_jp.md b/keyboards/treadstone32/keymaps/default/readme_jp.md new file mode 100644 index 000000000000..ff078dcc8a61 --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/readme_jp.md @@ -0,0 +1,55 @@ +# US配列ライクデフォルトキーマップ + +## 概要 + + US配列ライクなデフォルトキーマップです。 + +## キーマップの見かた + +qmk_firmware\tmk_core\common\keycode.h +に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。 + +Leyer Tap、Mod TapというQMKの機能を使っています。 + +Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。 +例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動 + +Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。 +例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト + +もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。 + +## 機能 + + QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。 + Lowerを最初し続けながらRaiseを同時押しするとAdjustレイヤーを使うことが出来ます。 + +## OS切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です +- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください + +## IME切り替え方法 + + Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。 + +## ソフトウェアリセットについて + + キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRESETを押下するとリセットがかかります。 + +## LEDの点灯切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- RGBRST: LEDのリセット +- RGB_TOG: LEDのON/OFF切り替え +- RGB_MOD: LEDの光り方の変更 +- RGB_HUI: Hue+ 色合いを変更 +- RGB_HUD: Hue- 色合いを変更 +- RGB_SAI: Saturation+ 色の濃さを変更 +- RGB_SAD: Saturation- 色の濃さを変更 +- RGB_VAI: Value+ 明るさを変更 +- RGB_VAD: Value- 明るさを変更 diff --git a/keyboards/treadstone32/keymaps/default/rules.mk b/keyboards/treadstone32/keymaps/default/rules.mk new file mode 100644 index 000000000000..8c4541fa197b --- /dev/null +++ b/keyboards/treadstone32/keymaps/default/rules.mk @@ -0,0 +1,25 @@ + +# 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 +# +TAP_DANCE_ENABLE = no + +# If your custom treadstone32 pcb, you can rewrite to yes. +RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/treadstone32/keymaps/like_jis/config.h b/keyboards/treadstone32/keymaps/like_jis/config.h new file mode 100644 index 000000000000..a6363f9b9a5f --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/config.h @@ -0,0 +1,58 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// place overrides here +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_LAYER_TERM 150 // Custom LT Tapping term +#define TAPPING_TERM_PER_KEY + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// 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 diff --git a/keyboards/treadstone32/keymaps/like_jis/keymap.c b/keyboards/treadstone32/keymaps/like_jis/keymap.c new file mode 100644 index 000000000000..891f484469c5 --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/keymap.c @@ -0,0 +1,170 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +// 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, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + LOWER, + RAISE, + KANJI, +}; + +// enum tapdances{ +// TD_CODO = 0, +// TD_SLRO, +// }; + +// Layer Mode aliases +#define KC_MLAD MO(_ADJUST) + +// Base layer mod tap +#define KC_A_SF LSFT_T(KC_A) +#define KC_Z_CT LCTL_T(KC_Z) +#define KC_X_AL LALT_T(KC_X) +#define KC_C_GU LGUI_T(KC_C) +#define KC_SSCT LCTL_T(KC_SLSH) +#define KC_ENSF LSFT_T(KC_ENT) + +// Lower layer mod tap +#define KC_F6SF LSFT_T(KC_F6) +#define KC_BSSF LSFT_T(KC_BSLS) +#define KC_11CT LCTL_T(KC_F11) +#define KC_12AL LALT_T(KC_F12) + +// Layer tap +#define KC_BSLO LT(_LOWER, KC_BSPC) +#define KC_SPRA LT(_RAISE, KC_SPC) + +// Tap dance +// #define KC_CODO TD(TD_CODO) +// #define KC_SLRO TD(TD_SLRO) + +// qk_tap_dance_action_t tap_dance_actions[] = { +// [TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT), +// [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +// }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_A_SF, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_Z_CT, KC_X_AL, KC_C_GU, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SSCT, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + KC_BSLO, KC_SPRA + // `---------|---------' + ), + + [_LOWER] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_F6SF, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, KC_BSSF, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_11CT, KC_12AL, KC_ESC, KC_TAB, KANJI, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_RO, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, KC_MLAD + // `---------|---------' + ), + + [_RAISE] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LSFT, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, XXXXXXX, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_SSCT, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______ + // `---------|---------' + ), + + [_ADJUST] = LAYOUT( + //,---------------------------------------------------------------------------------------------------. + RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX, + //|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, + //`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' + _______, _______ + // `---------|---------' + ) +}; + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case KC_BSLO: + return TAPPING_LAYER_TERM; + case KC_SPRA: + return TAPPING_LAYER_TERM; + default: + return TAPPING_TERM; + } +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + bool result = false; + switch (keycode) { + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + return result; +} + +void keyboard_post_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} diff --git a/keyboards/treadstone32/keymaps/like_jis/readme.md b/keyboards/treadstone32/keymaps/like_jis/readme.md new file mode 100644 index 000000000000..206133ee7c89 --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/readme.md @@ -0,0 +1,5 @@ +# The like jis type keyboard keymap for treadstone32 + +## Description + +## How to use diff --git a/keyboards/treadstone32/keymaps/like_jis/readme_jp.md b/keyboards/treadstone32/keymaps/like_jis/readme_jp.md new file mode 100644 index 000000000000..3242f101e24a --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/readme_jp.md @@ -0,0 +1,55 @@ +# JISキーボードライクなキーマップ + +## 概要 + + デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。 + +## キーマップの見かた + +qmk_firmware\tmk_core\common\keycode.h +に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。 + +Leyer Tap、Mod TapというQMKの機能を使っています。 + +Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。 +例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動 + +Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。 +例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト + +もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。 + +## 機能 + + QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。 + Lowerを最初し続けながらRaiseを同時押しするとAdjustレイヤーを使うことが出来ます。 + +## OS切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です +- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください + +## IME切り替え方法 + + Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。 + +## ソフトウェアリセットについて + + キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRESETを押下するとリセットがかかります。 + +## LEDの点灯切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- RGBRST: LEDのリセット +- RGB_TOG: LEDのON/OFF切り替え +- RGB_MOD: LEDの光り方の変更 +- RGB_HUI: Hue+ 色合いを変更 +- RGB_HUD: Hue- 色合いを変更 +- RGB_SAI: Saturation+ 色の濃さを変更 +- RGB_SAD: Saturation- 色の濃さを変更 +- RGB_VAI: Value+ 明るさを変更 +- RGB_VAD: Value- 明るさを変更 diff --git a/keyboards/treadstone32/keymaps/like_jis/rules.mk b/keyboards/treadstone32/keymaps/like_jis/rules.mk new file mode 100644 index 000000000000..8c4541fa197b --- /dev/null +++ b/keyboards/treadstone32/keymaps/like_jis/rules.mk @@ -0,0 +1,25 @@ + +# 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 +# +TAP_DANCE_ENABLE = no + +# If your custom treadstone32 pcb, you can rewrite to yes. +RGBLIGHT_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/treadstone32/readme.md b/keyboards/treadstone32/readme.md new file mode 100644 index 000000000000..989a29c204bd --- /dev/null +++ b/keyboards/treadstone32/readme.md @@ -0,0 +1,18 @@ +# treadstone32 + +![treadstone32](https://github.com/marksard/Keyboards/raw/master/_image/20190421-P4210001.jpg) + +A 32-key Symmetric staggered keyboard. + +Keyboard Maintainer: [marksard](https://github.com/marksard) +Hardware Supported: The PCBs, controllers supported +Hardware Availability: links to where you can find this hardware + +Make example for this keyboard (after setting up your build environment): + + make treadstone32:default:dfu + +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). + +[Build guide](https://github.com/marksard/Keyboards/blob/master/treadstone32/documents/treadstone32_buildguide.md) +[Firmware](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/treadstone32) diff --git a/keyboards/treadstone32/rules.mk b/keyboards/treadstone32/rules.mk new file mode 100644 index 000000000000..1d37dfc69f77 --- /dev/null +++ b/keyboards/treadstone32/rules.mk @@ -0,0 +1,64 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +LEADER_ENABLE = no + diff --git a/keyboards/treadstone32/treadstone32.c b/keyboards/treadstone32/treadstone32.c new file mode 100644 index 000000000000..9d27f86ffedb --- /dev/null +++ b/keyboards/treadstone32/treadstone32.c @@ -0,0 +1,43 @@ +/* Copyright 2019 marksard + * + * 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 . + */ +#include "treadstone32.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/treadstone32/treadstone32.h b/keyboards/treadstone32/treadstone32.h new file mode 100644 index 000000000000..90181124c098 --- /dev/null +++ b/keyboards/treadstone32/treadstone32.h @@ -0,0 +1,45 @@ +/* Copyright 2019 marksard. + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define K_N KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L09, L08, L07, L06, L05, L04, L03, L02, L01, L00, \ + L19, L18, L17, L16, L15, L14, L13, L12, L11, L10, \ + L29, L28, L27, L26, L25, L24, L23, L22, L21, L20, \ + L35, L34 \ + ) \ + { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { K_N, K_N, K_N, K_N, L34 }, \ + { L05, L06, L07, L08, L09 }, \ + { L15, L16, L17, L18, L19 }, \ + { L25, L26, L27, L28, L29 }, \ + { L35, K_N, K_N, K_N, K_N } \ + } diff --git a/keyboards/treadstone48/common/glcdfont.c b/keyboards/treadstone48/common/glcdfont.c new file mode 100644 index 000000000000..32c688e2bb38 --- /dev/null +++ b/keyboards/treadstone48/common/glcdfont.c @@ -0,0 +1,244 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// 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, + 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, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 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, 0x10, 0x10, 0x10, 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, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +#endif // FONT5X7_H diff --git a/keyboards/treadstone48/common/oled_helper.c b/keyboards/treadstone48/common/oled_helper.c new file mode 100644 index 000000000000..500d3c0dc10c --- /dev/null +++ b/keyboards/treadstone48/common/oled_helper.c @@ -0,0 +1,83 @@ +#ifdef SSD1306OLED +#include QMK_KEYBOARD_H +#include "ssd1306.h" + +void render_logo(struct CharacterMatrix *matrix) { + + const char logo_buf[]={ + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, + 0}; + + matrix_write(matrix, logo_buf); +} + +static char keylog_buf[24] = "Key state ready."; +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', ' ', '-', ' ', '@', ' ', ' ', + ' ', ';', ':', ' ', ',', '.', '/', ' ', ' ', ' '}; + +void update_key_status(uint16_t keycode, keyrecord_t *record) { + + if (!record->event.pressed) return; + + char name = (keycode < 60) ? code_to_name[keycode] : ' '; + snprintf(keylog_buf, sizeof(keylog_buf) - 1, "Key:%dx%d %2x %c", + record->event.key.row, record->event.key.col, + (uint16_t)keycode, name); +} + +void render_key_status(struct CharacterMatrix *matrix) { + + matrix_write(matrix, keylog_buf); +} + +static char lock_buf[24] = "Lock state ready.\n"; +void update_lock_status(void) { + + uint8_t leds = host_keyboard_leds(); + char *num_lock = (leds & (1< +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 . +*/ + +#pragma once + +#include "config_common.h" + +// GCC include 'config.h" sequence in qmk_firmware/keyboards/treadstone48/ +// -include keyboards/treadstone48/config.h +// -include keyboards/treadstone48/rev?/config.h +// -include keyboards/treadstone48/rev?/keymaps/MAPNAME/config.h +// XXXX.c + +#include + +// GCC include search path in qmk_firmare/keyboards/treadstone48/ +// #include "..." search starts here: +// #include <...> search starts here: +// keyboards/treadstone48/rev?/keymaps/MAPNAME +// keyboards/treadstone48 +// keyboards/treadstone48/rev? +// . +// ./tmk_core +// ...... + +// MACRO and FUNCTION are features that are depreciated. +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/ergodash/i2c.c b/keyboards/treadstone48/i2c.c similarity index 98% rename from keyboards/ergodash/i2c.c rename to keyboards/treadstone48/i2c.c index 084c890c405f..4bee5c639829 100644 --- a/keyboards/ergodash/i2c.c +++ b/keyboards/treadstone48/i2c.c @@ -34,7 +34,7 @@ void i2c_delay(void) { // _delay_us(100); } -// Setup twi to run at 100kHz +// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK) void i2c_master_init(void) { // no prescaler TWSR = 0; diff --git a/keyboards/bfo9000/i2c.h b/keyboards/treadstone48/i2c.h similarity index 94% rename from keyboards/bfo9000/i2c.h rename to keyboards/treadstone48/i2c.h index c15b6bc5065e..710662c7abd6 100644 --- a/keyboards/bfo9000/i2c.h +++ b/keyboards/treadstone48/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include @@ -15,7 +14,7 @@ #define SLAVE_BUFFER_SIZE 0x10 -// i2c SCL clock frequency +// i2c SCL clock frequency 400kHz #define SCL_CLOCK 400000L extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/treadstone48/keymaps/default/config.h b/keyboards/treadstone48/keymaps/default/config.h new file mode 100644 index 000000000000..3f63a0cfbbd2 --- /dev/null +++ b/keyboards/treadstone48/keymaps/default/config.h @@ -0,0 +1,60 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// place overrides here + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 225 +// #define PREVENT_STUCK_MODIFIERS +// #define IGNORE_MOD_TAP_INTERRUPT + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// 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 diff --git a/keyboards/treadstone48/keymaps/default/keymap.c b/keyboards/treadstone48/keymaps/default/keymap.c new file mode 100644 index 000000000000..406f11292124 --- /dev/null +++ b/keyboards/treadstone48/keymaps/default/keymap.c @@ -0,0 +1,278 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" +#include "../common/oled_helper.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST, + KANJI, + RGBRST +}; + +enum tapdances{ + TD_SCCL = 0, + TD_SLRO, +}; + +// Layer Mode aliases +#define _____ KC_TRNS +#define XXXXX KC_NO + +#define KC_TBSF LSFT_T(KC_TAB) +// #define KC_SPSF LSFT_T(KC_SPC) +#define KC_ALAP LALT_T(KC_APP) +#define KC_JEQL LSFT(KC_MINS) + +#define KC_SCCL TD(TD_SCCL) +#define KC_SLRO TD(TD_SLRO) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT), + [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT,\ + //`-------------------------------------------------------------------------------------------------------------------' + KC_DEL \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_LOWER] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, XXXXX, KC_SCLN, KC_QUOT, _____,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, KC_F11, KC_F12, XXXXX, KANJI, KC_ENT, XXXXX, XXXXX, KC_COMM, KC_DOT, KC_GRV, KC_PGUP, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END,\ + //`-------------------------------------------------------------------------------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_RAISE] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + _____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_4, KC_5, KC_6, KC_QUOT, _____,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_1, KC_2, KC_3, KC_RO, XXXXX, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, _____, _____, _____, _____, _____, _____, KC_0, KC_DOT, KC_COMM, KC_SLSH,\ + //`-------------------------------------------------------------------------------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_ADJUST] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + XXXXX, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXX, XXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + XXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXX, XXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXX, XXXXX, XXXXX, KC_BTN1, KC_BTN2, XXXXX, KC_MS_U, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, _____, _____, _____, XXXXX, XXXXX, _____, XXXXX, KC_MS_L, KC_MS_D, KC_MS_R,\ + //`-------------------------------------------------------------------------------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ) +}; + +#define L_BASE _BASE +#define L_LOWER (1<<_LOWER) +#define L_RAISE (1<<_RAISE) +#define L_ADJUST (1<<_ADJUST) +#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) + +#ifdef SSD1306OLED +typedef struct { + uint8_t state; + char name[8]; +}LAYER_DISPLAY_NAME; + +#define LAYER_DISPLAY_MAX 5 +const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = { + {L_BASE, "Base"}, + {L_BASE + 1, "Base"}, + {L_LOWER, "Lower"}, + {L_RAISE, "Raise"}, + {L_ADJUST_TRI, "Adjust"} +}; + +static inline const char* get_leyer_status(void) { + + for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) { + if (layer_state == 0 && layer_display_name[i].state == default_layer_state) { + + return layer_display_name[i].name; + } else if (layer_state != 0 && layer_display_name[i].state == layer_state) { + + return layer_display_name[i].name; + } + } + + return "?"; +} + +static char layer_status_buf[24] = "Layer state ready.\n"; +static inline void update_keymap_status(void) { + + snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n", + keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status()); +} + +static inline void render_keymap_status(struct CharacterMatrix *matrix) { + + matrix_write(matrix, layer_status_buf); +} + +#define UPDATE_KEYMAP_STATUS() update_keymap_status() +#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a) + +#else + +#define UPDATE_KEYMAP_STATUS() +#define RENDER_KEYMAP_STATUS(a) + +#endif + +static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + + pressed ? layer_on(layer1) : layer_off(layer1); + IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + UPDATE_KEY_STATUS(keycode, record); + + bool result = false; + switch (keycode) { + case LOWER: + update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); + break; + case RAISE: + update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); + break; + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + UPDATE_KEYMAP_STATUS(); + return result; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.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 + +void matrix_scan_user(void) { + iota_gfx_task(); // this is what updates the display continuously +} + +static inline 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; + } +} + +static inline void render_status(struct CharacterMatrix *matrix) { + + UPDATE_LED_STATUS(); + RENDER_LED_STATUS(matrix); + RENDER_KEYMAP_STATUS(matrix); + UPDATE_LOCK_STATUS(); + RENDER_LOCK_STATUS(matrix); + RENDER_KEY_STATUS(matrix); +} + +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 diff --git a/keyboards/treadstone48/keymaps/default/readme.md b/keyboards/treadstone48/keymaps/default/readme.md new file mode 100644 index 000000000000..bb835d169c1a --- /dev/null +++ b/keyboards/treadstone48/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default keymap for treadstone48 + +## Description + +## How to use diff --git a/keyboards/treadstone48/keymaps/default/readme_jp.md b/keyboards/treadstone48/keymaps/default/readme_jp.md new file mode 100644 index 000000000000..6043c93cbce0 --- /dev/null +++ b/keyboards/treadstone48/keymaps/default/readme_jp.md @@ -0,0 +1,80 @@ +# US配列ライクデフォルトキーマップ + +## 概要 + + US配列ライクなデフォルトキーマップです。 + +## キーマップの見かた + +qmk_firmware\tmk_core\common\keycode.h +に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。 +キーマップに書くときは「KC_」を省略して書いています。 +例:KC_A → A + +Leyer Tap、Mod Tap、Tap DanceというQMKの機能を使っています。 + +Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。 +例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動 + +Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。 +例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト + +Tap Danceは指定した二つのキーをシングルタップ、ダブルタップで切り替えられます。 +例:[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT) → シングルタップでCOMM、ダブルタップでDOT + +もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。 + +## 機能 + + QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + DOTの横、SLROと書いてあるのはシングルタップで/記号、ダブルタップで\記号が入力出来るようになっています。 + Lの横、SCCLと書いてあるのはシングルタップで;記号、ダブルタップで:記号が入力出来るようになっています。 + マウスキーの割り当てがありますので、もし使用したい場合はrules.mkでMOUSEKEY_ENABLE = yesにしてmakeすると使用することができます。 + +## 48キー目について + + このキーボードはEnterキーの上の2Uキーを1Ux2個にして使用する事が出来るようになっています。 使用する場合はキーマップの書き換えが必要です。 + + 各レイヤーの最下段の + +```c + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. +``` + + のXXXXXに任意のキーを入れることでPの右隣のキーとして動作するようになっています。その右隣りに従来のキーが配置されています。 + +## OS切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です +- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください + +## NUMPADモードについて + + Lower + DLNPキーを一度押下するとNumpadモードになります。通常モードに戻す場合はDLBSキーを押下してください。 + +## IME切り替え方法 + + Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。 + +## ソフトウェアリセットについて + + キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRESETを押下するとリセットがかかります。 + +## LEDの点灯切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- RGBRST: LEDのリセット +- RGB_TOG: LEDのON/OFF切り替え +- RGB_MOD: LEDの光り方の変更 +- RGB_HUI: Hue+ 色合いを変更 +- RGB_HUD: Hue- 色合いを変更 +- RGB_SAI: Saturation+ 色の濃さを変更 +- RGB_SAD: Saturation- 色の濃さを変更 +- RGB_VAI: Value+ 明るさを変更 +- RGB_VAD: Value- 明るさを変更 diff --git a/keyboards/treadstone48/keymaps/default/rules.mk b/keyboards/treadstone48/keymaps/default/rules.mk new file mode 100644 index 000000000000..c53226431d33 --- /dev/null +++ b/keyboards/treadstone48/keymaps/default/rules.mk @@ -0,0 +1,67 @@ + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +TAP_DANCE_ENABLE = yes + +# If your custom treadstone48 pcb, you can rewrite to yes. +OLED_ENABLE = no # OLED_ENABLE +LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c" +# RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes. +ANGELINA_KEYMAP = no # If Alfa verstion use set to yes. + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + +# ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes) +# OPT_DEFS += -DRHYMESTONE_RIGHTHAND +# endif + +ifeq ($(strip $(ANGELINA_KEYMAP)), yes) + OPT_DEFS += -DANGELINA_KEYMAP +endif + +# 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 you want to change the display of OLED, you need to change here +SRC += ./common/oled_helper.c \ diff --git a/keyboards/treadstone48/keymaps/like_jis/config.h b/keyboards/treadstone48/keymaps/like_jis/config.h new file mode 100644 index 000000000000..3f63a0cfbbd2 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis/config.h @@ -0,0 +1,60 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// place overrides here + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 225 +// #define PREVENT_STUCK_MODIFIERS +// #define IGNORE_MOD_TAP_INTERRUPT + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// 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 diff --git a/keyboards/treadstone48/keymaps/like_jis/keymap.c b/keyboards/treadstone48/keymaps/like_jis/keymap.c new file mode 100644 index 000000000000..b63b0c9f4958 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis/keymap.c @@ -0,0 +1,278 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" +#include "../common/oled_helper.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST, + KANJI, + RGBRST +}; + +enum tapdances{ + TD_SCCL = 0, + TD_SLRO, +}; + +// Layer Mode aliases +#define _____ KC_TRNS +#define XXXXX KC_NO + +#define KC_TBSF LSFT_T(KC_TAB) +// #define KC_SPSF LSFT_T(KC_SPC) +#define KC_ALAP LALT_T(KC_APP) +#define KC_JEQL LSFT(KC_MINS) + +#define KC_SCCL TD(TD_SCCL) +#define KC_SLRO TD(TD_SLRO) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT), + [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT,\ + //`-------------------------------------------------------------------------------------------------------------------' + KC_DEL \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_LOWER] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _____,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, KC_F11, KC_F12, XXXXX, KANJI, KC_ENT, XXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_PGUP, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END,\ + //`-------------------------------------------------------------------------------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_RAISE] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + _____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_4, KC_5, KC_6, KC_QUOT, _____,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_1, KC_2, KC_3, KC_RO, XXXXX, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, _____, _____, _____, _____, _____, _____, KC_0, KC_DOT, KC_COMM, KC_SLSH,\ + //`-------------------------------------------------------------------------------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_ADJUST] = LAYOUT_base( \ + //,--------------------------------------------------------------------------------------------------------------------. + XXXXX, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXX, XXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| + XXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXX, XXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXX, XXXXX, XXXXX, KC_BTN1, KC_BTN2, XXXXX, KC_MS_U, \ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| + _____, _____, _____, _____, XXXXX, XXXXX, _____, XXXXX, KC_MS_L, KC_MS_D, KC_MS_R,\ + //`-------------------------------------------------------------------------------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ) +}; + +#define L_BASE _BASE +#define L_LOWER (1<<_LOWER) +#define L_RAISE (1<<_RAISE) +#define L_ADJUST (1<<_ADJUST) +#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) + +#ifdef SSD1306OLED +typedef struct { + uint8_t state; + char name[8]; +}LAYER_DISPLAY_NAME; + +#define LAYER_DISPLAY_MAX 5 +const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = { + {L_BASE, "Base"}, + {L_BASE + 1, "Base"}, + {L_LOWER, "Lower"}, + {L_RAISE, "Raise"}, + {L_ADJUST_TRI, "Adjust"} +}; + +static inline const char* get_leyer_status(void) { + + for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) { + if (layer_state == 0 && layer_display_name[i].state == default_layer_state) { + + return layer_display_name[i].name; + } else if (layer_state != 0 && layer_display_name[i].state == layer_state) { + + return layer_display_name[i].name; + } + } + + return "?"; +} + +static char layer_status_buf[24] = "Layer state ready.\n"; +static inline void update_keymap_status(void) { + + snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n", + keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status()); +} + +static inline void render_keymap_status(struct CharacterMatrix *matrix) { + + matrix_write(matrix, layer_status_buf); +} + +#define UPDATE_KEYMAP_STATUS() update_keymap_status() +#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a) + +#else + +#define UPDATE_KEYMAP_STATUS() +#define RENDER_KEYMAP_STATUS(a) + +#endif + +static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + + pressed ? layer_on(layer1) : layer_off(layer1); + IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + UPDATE_KEY_STATUS(keycode, record); + + bool result = false; + switch (keycode) { + case LOWER: + update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); + break; + case RAISE: + update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); + break; + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + UPDATE_KEYMAP_STATUS(); + return result; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.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 + +void matrix_scan_user(void) { + iota_gfx_task(); // this is what updates the display continuously +} + +static inline 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; + } +} + +static inline void render_status(struct CharacterMatrix *matrix) { + + UPDATE_LED_STATUS(); + RENDER_LED_STATUS(matrix); + RENDER_KEYMAP_STATUS(matrix); + UPDATE_LOCK_STATUS(); + RENDER_LOCK_STATUS(matrix); + RENDER_KEY_STATUS(matrix); +} + +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 diff --git a/keyboards/treadstone48/keymaps/like_jis/readme.md b/keyboards/treadstone48/keymaps/like_jis/readme.md new file mode 100644 index 000000000000..796df6c4cd78 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis/readme.md @@ -0,0 +1,5 @@ +# The like jis type keyboard keymap for treadstone48 + +## Description + +## How to use diff --git a/keyboards/treadstone48/keymaps/like_jis/readme_jp.md b/keyboards/treadstone48/keymaps/like_jis/readme_jp.md new file mode 100644 index 000000000000..305ded471da8 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis/readme_jp.md @@ -0,0 +1,80 @@ +# JISキーボードライクなキーマップ + +## 概要 + + デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。 + +## キーマップの見かた + +qmk_firmware\tmk_core\common\keycode.h +に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。 +キーマップに書くときは「KC_」を省略して書いています。 +例:KC_A → A + +Leyer Tap、Mod Tap、Tap DanceというQMKの機能を使っています。 + +Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。 +例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動 + +Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。 +例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト + +Tap Danceは指定した二つのキーをシングルタップ、ダブルタップで切り替えられます。 +例:[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT) → シングルタップでCOMM、ダブルタップでDOT + +もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。 + +## 機能 + + QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + DOTの横、SLROと書いてあるのはシングルタップで/記号、ダブルタップで\記号が入力出来るようになっています。 + Lの横、SCCLと書いてあるのはシングルタップで;記号、ダブルタップで:記号が入力出来るようになっています。 + マウスキーの割り当てがありますので、もし使用したい場合はrules.mkでMOUSEKEY_ENABLE = yesにしてmakeすると使用することができます。 + +## 48キー目について + + このキーボードはEnterキーの上の2Uキーを1Ux2個にして使用する事が出来るようになっています。 使用する場合はキーマップの書き換えが必要です。 + + 各レイヤーの最下段の + +```c + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. +``` + + のXXXXXに任意のキーを入れることでPの右隣のキーとして動作するようになっています。その右隣りに従来のキーが配置されています。 + +## OS切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です +- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください + +## NUMPADモードについて + + Lower + DLNPキーを一度押下するとNumpadモードになります。通常モードに戻す場合はDLBSキーを押下してください。 + +## IME切り替え方法 + + Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。 + +## ソフトウェアリセットについて + + キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRSTを押下するとリセットがかかります。 + +## LEDの点灯切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- RGBRST: LEDのリセット +- RGB_TOG: LEDのON/OFF切り替え +- RGB_MOD: LEDの光り方の変更 +- RGB_HUI: Hue+ 色合いを変更 +- RGB_HUD: Hue- 色合いを変更 +- RGB_SAI: Saturation+ 色の濃さを変更 +- RGB_SAD: Saturation- 色の濃さを変更 +- RGB_VAI: Value+ 明るさを変更 +- RGB_VAD: Value- 明るさを変更 diff --git a/keyboards/treadstone48/keymaps/like_jis/rules.mk b/keyboards/treadstone48/keymaps/like_jis/rules.mk new file mode 100644 index 000000000000..c53226431d33 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis/rules.mk @@ -0,0 +1,67 @@ + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +TAP_DANCE_ENABLE = yes + +# If your custom treadstone48 pcb, you can rewrite to yes. +OLED_ENABLE = no # OLED_ENABLE +LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c" +# RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes. +ANGELINA_KEYMAP = no # If Alfa verstion use set to yes. + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + +# ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes) +# OPT_DEFS += -DRHYMESTONE_RIGHTHAND +# endif + +ifeq ($(strip $(ANGELINA_KEYMAP)), yes) + OPT_DEFS += -DANGELINA_KEYMAP +endif + +# 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 you want to change the display of OLED, you need to change here +SRC += ./common/oled_helper.c \ diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/config.h b/keyboards/treadstone48/keymaps/like_jis_rs/config.h new file mode 100644 index 000000000000..e8acd5c76d4d --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis_rs/config.h @@ -0,0 +1,60 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +// place overrides here + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 225 +#define PREVENT_STUCK_MODIFIERS +#define IGNORE_MOD_TAP_INTERRUPT + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 1 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 4 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +// 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 diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c b/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c new file mode 100644 index 000000000000..0e4ec063ccb6 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis_rs/keymap.c @@ -0,0 +1,342 @@ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" +#include "../common/oled_helper.h" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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, + _BASES, + _LOWER, + _LOWRS, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + BASE = SAFE_RANGE, + BASES, + LOWER, + LOWRS, + RAISE, + ADJUST, + KANJI, + RGBRST +}; + +enum tapdances{ + TD_SCCL = 0, + TD_SLRO, +}; + +// Layer Mode aliases +#define _____ KC_TRNS +#define XXXXX KC_NO + +#define KC_TBSF LSFT_T(KC_TAB) +// #define KC_SPSF LSFT_T(KC_SPC) +#define KC_ALAP LALT_T(KC_APP) +#define KC_JEQL LSFT(KC_MINS) +#define KC_SFUC LSFT(KC_RO) +#define KC_RSBR LSFT(KC_8) +#define KC_REBR LSFT(KC_9) + +#define KC_ZSFT LSFT_T(KC_Z) +#define KC_ESCT LCTL_T(KC_ESC) +#define KC_TBAL LALT_T(KC_TAB) +#define KC_11SF LSFT_T(KC_F11) + +#define KC_SCCL TD(TD_SCCL) +#define KC_SLRO TD(TD_SLRO) + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SCCL] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT), + [TD_SLRO] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_RO), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_rs( \ + // Treadstone48 Rhymestone + //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_P7, KC_P8, KC_P9, KC_PSLS, KC_NLCK,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------| + KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PAST, KC_TAB,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PENT,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT, LOWER, KC_P0, KC_PDOT, KC_PPLS, KC_BSPC,\ + //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------' + KC_DEL \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_LOWER] = LAYOUT_rs( \ + // Treadstone48 Rhymestone + //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------. + _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL, KC_A, KC_B, KC_C, KC_JYEN, KC_HASH,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------| + _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _____, KC_D, KC_E, KC_F, KC_PERC, KC_SFUC,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, KC_F11, KC_F12, BASES, KANJI, KC_ENT, XXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_PGUP, KC_RSBR, KC_REBR, KC_RBRC, KC_QUOT, _____,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END, _____, XXXXX, KC_COMM, KC_JEQL, KC_DEL,\ + //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_BASES] = LAYOUT_rs( \ + // Treadstone48 Rhymestone + //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_Q, KC_W, KC_E, KC_R, KC_T,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------| + KC_TBSF, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCCL, KC_ENT, KC_A, KC_S, KC_D, KC_F, KC_G,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLRO, KC_UP, KC_ZSFT, KC_X, KC_C, KC_V, KC_B,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + KC_LCTRL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_ALAP, KC_LEFT, KC_DOWN, KC_RGHT, KC_ESCT, KC_TBAL, KC_LGUI, LOWRS, KC_BSPC,\ + //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------' + KC_DEL \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_LOWRS] = LAYOUT_rs( \ + // Treadstone48 Rhymestone + //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------. + _____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_JYEN, KC_LBRC, KC_RBRC, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------| + _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXX, XXXXX, KC_SCLN, KC_QUOT, KC_BSLS, _____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, KC_F11, KC_F12, BASE, KANJI, KC_ENT, XXXXX, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_PGUP, KC_11SF, KC_F12, BASE, KANJI, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, _____, _____, _____, KC_DEL, _____, _____, XXXXX, KC_HOME, KC_PGDN, KC_END, _____, _____, _____, _____, KC_DEL,\ + //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_RAISE] = LAYOUT_rs( \ + // Treadstone48 Rhymestone + //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------. + _____, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_4, KC_5, KC_6, KC_QUOT, _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, KC_1, KC_2, KC_3, KC_RO, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, _____, _____, _____, _____, _____, _____, KC_0, KC_DOT, KC_COMM, KC_SLSH, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ), + + [_ADJUST] = LAYOUT_rs( \ + // Treadstone48 Rhymestone + //,--------------------------------------------------------------------------------------------------------------------. --------------------------------------------. + XXXXX, RESET, RGBRST, AG_NORM, AG_SWAP, XXXXX, XXXXX, KC_WH_L, KC_WH_U, KC_HOME, KC_PGUP, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+-----------------| --------+--------+--------+--------+--------| + XXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXX, XXXXX, KC_WH_R, KC_WH_D, KC_END, KC_PGDN, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXX, XXXXX, XXXXX, KC_BTN1, KC_BTN2, XXXXX, KC_MS_U, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|--------+--------+--------+--------+--------+--------|--------+--------+--------+--------+--------+--------+--------| --------+--------+--------+--------+--------| + _____, _____, _____, _____, XXXXX, XXXXX, _____, XXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //`--------------------------------------------------------------------------------------------------------------------' --------------------------------------------' + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. + ) +}; + +#define L_BASE _BASE +#define L_BASES (1<<_BASES) +#define L_LOWER (1<<_LOWER) +#define L_LOWRS (1<<_LOWRS) +#define L_RAISE (1<<_RAISE) +#define L_ADJUST (1<<_ADJUST) +#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) + +#ifdef SSD1306OLED +typedef struct { + uint8_t state; + char name[8]; +}LAYER_DISPLAY_NAME; + +#define LAYER_DISPLAY_MAX 7 +const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = { + {L_BASE, "Base"}, + {L_BASE + 1, "Base"}, + {L_BASES, "BaseSpl"}, + {L_LOWER, "Lower"}, + {L_LOWRS, "LowrSpl"}, + {L_RAISE, "Raise"}, + {L_ADJUST_TRI, "Adjust"} +}; + +static inline const char* get_leyer_status(void) { + + for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) { + if (layer_state == 0 && layer_display_name[i].state == default_layer_state) { + + return layer_display_name[i].name; + } else if (layer_state != 0 && layer_display_name[i].state == layer_state) { + + return layer_display_name[i].name; + } + } + + return "?"; +} + +static char layer_status_buf[24] = "Layer state ready.\n"; +static inline void update_keymap_status(void) { + + snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n", + keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status()); +} + +static inline void render_keymap_status(struct CharacterMatrix *matrix) { + + matrix_write(matrix, layer_status_buf); +} + +#define UPDATE_KEYMAP_STATUS() update_keymap_status() +#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a) + +#else + +#define UPDATE_KEYMAP_STATUS() +#define RENDER_KEYMAP_STATUS(a) + +#endif + +void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) { + + pressed ? layer_on(layer1) : layer_off(layer1); + IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3); +} + +int RGB_current_mode; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + UPDATE_KEY_STATUS(keycode, record); + + bool result = false; + switch (keycode) { + case LOWER: + update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST); + break; + case RAISE: + update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST); + break; + case BASE: + if (record->event.pressed) { + default_layer_set(L_BASE); + } + break; + case BASES: + if (record->event.pressed) { + default_layer_set(L_BASES); + } + break; + case LOWRS: + update_change_layer(record->event.pressed, _LOWRS, _RAISE, _ADJUST); + break; + case KANJI: + if (record->event.pressed) { + if (keymap_config.swap_lalt_lgui == false) { + register_code(KC_LANG2); + } else { + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + break; + #ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + break; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + break; + #endif + default: + result = true; + break; + } + + UPDATE_KEYMAP_STATUS(); + return result; +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.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 + +void matrix_scan_user(void) { + iota_gfx_task(); // this is what updates the display continuously +} + +static inline 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; + } +} + +static inline void render_status(struct CharacterMatrix *matrix) { + + UPDATE_LED_STATUS(); + RENDER_LED_STATUS(matrix); + RENDER_KEYMAP_STATUS(matrix); + UPDATE_LOCK_STATUS(); + RENDER_LOCK_STATUS(matrix); + RENDER_KEY_STATUS(matrix); +} + +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 diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/readme.md b/keyboards/treadstone48/keymaps/like_jis_rs/readme.md new file mode 100644 index 000000000000..796df6c4cd78 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis_rs/readme.md @@ -0,0 +1,5 @@ +# The like jis type keyboard keymap for treadstone48 + +## Description + +## How to use diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md b/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md new file mode 100644 index 000000000000..5a6fc1d73b83 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis_rs/readme_jp.md @@ -0,0 +1,84 @@ +# JISキーボードライクなキーマップ + +## 概要 + + デフォルトキーマップの記号類をJISライクな配置に揃えなおしたものです。 + オプションのRhymestone用のマップを使用するために拡張しています。RhymestoneのpromicroにもTreadstone48のキーマップを入れてください。 + Rhymestoneは基本的には左手側を使うことを想定していますが、右手側を使用する場合はrules.mkにあるRHYMESTONE_RIGHTHAND設定をyesにすれば使えるようになります。 + +```RHYMESTONE_RIGHTHAND=yes``` + +## キーマップの見かた + +qmk_firmware\tmk_core\common\keycode.h +に基本的なキーコードがあります。また、Keymap.cの上部にカスタムしたKC_で始まるものを登録しています。 +キーマップに書くときは「KC_」を省略して書いています。 +例:KC_A → A + +Leyer Tap、Mod Tap、Tap DanceというQMKの機能を使っています。 + +Layer Tapはタップで指定したキー、長押しで指定したレイヤーに移動します。 +例:LT(RAISE, KC_V) → タップでV、長押しでRAISEレイヤー移動 + +Mod Tapはタップで視程したキー、長押しで視程したレイヤーに移動します。 +例:LSFT_T(KC_Z) → タップでZ、長押しで左シフト + +Tap Danceは指定した二つのキーをシングルタップ、ダブルタップで切り替えられます。 +例:[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT) → シングルタップでCOMM、ダブルタップでDOT + +もう少し詳しい内容についてはQMK Documentをお読みいただくかネットを検索すれば情報が載っていますので別途検索してみてください。 + +## 機能 + + QWERTYキーマップをベースにしていて、LowerレイヤーとRaiseレイヤーに他のキーを配置しています。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + DOTの横、SLROと書いてあるのはシングルタップで/記号、ダブルタップで\記号が入力出来るようになっています。 + Lの横、SCCLと書いてあるのはシングルタップで;記号、ダブルタップで:記号が入力出来るようになっています。 + マウスキーの割り当てがありますので、もし使用したい場合はrules.mkでMOUSEKEY_ENABLE = yesにしてmakeすると使用することができます。 + +## 48キー目について + + このキーボードはEnterキーの上の2Uキーを1Ux2個にして使用する事が出来るようになっています。 使用する場合はキーマップの書き換えが必要です。 + + 各レイヤーの最下段の + +```c + XXXXX \ + // ExtraKey: Split backspace key or it is below the enter key. +``` + + のXXXXXに任意のキーを入れることでPの右隣のキーとして動作するようになっています。その右隣りに従来のキーが配置されています。 + +## OS切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- KNRM: QMKのノーマル状態です。macだと正常に使える(はず)です +- KSWP: ノーマル状態のままWindowsで使用するとALTキーとGUI(win)キーが逆ですので、それを入れ換えます。Windowsユーザーはこちらのモードにしてください + +## NUMPADモードについて + + Lower + DLNPキーを一度押下するとNumpadモードになります。通常モードに戻す場合はDLBSキーを押下してください。 + +## IME切り替え方法 + + Winの場合、LowerレイヤーにKANJIキー(半角/全角 漢字)がありますので、Lower+KANJIで切り替えてください。 + +## ソフトウェアリセットについて + + キーボードにはハードウェアのリセットボタンが付いていますが、ソフトウェアリセットをかけられます。 + LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来、AdjustレイヤーのRSTを押下するとリセットがかかります。 + +## LEDの点灯切り替え方法 + + Adjustレイヤーにあります。LowerとRaiseを同時押しでAdjustレイヤーを使うことが出来ます。 + +- RGBRST: LEDのリセット +- RGB_TOG: LEDのON/OFF切り替え +- RGB_MOD: LEDの光り方の変更 +- RGB_HUI: Hue+ 色合いを変更 +- RGB_HUD: Hue- 色合いを変更 +- RGB_SAI: Saturation+ 色の濃さを変更 +- RGB_SAD: Saturation- 色の濃さを変更 +- RGB_VAI: Value+ 明るさを変更 +- RGB_VAD: Value- 明るさを変更 diff --git a/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk b/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk new file mode 100644 index 000000000000..c34bb2e34a03 --- /dev/null +++ b/keyboards/treadstone48/keymaps/like_jis_rs/rules.mk @@ -0,0 +1,67 @@ + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +TAP_DANCE_ENABLE = yes + +# If your custom treadstone48 pcb, you can rewrite to yes. +OLED_ENABLE = no # OLED_ENABLE +LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations + +# Other selectable option +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +LOCAL_GLCDFONT = no # use each keymaps "font.h" insted of "common/glcdfont.c" +RHYMESTONE_RIGHTHAND = no # If connect right hand side of the Rhymestone, set to yes. +ANGELINA_KEYMAP = no # If Alfa verstion use set to yes. + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + # OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + +ifeq ($(strip $(RHYMESTONE_RIGHTHAND)), yes) + OPT_DEFS += -DRHYMESTONE_RIGHTHAND +endif + +ifeq ($(strip $(ANGELINA_KEYMAP)), yes) + OPT_DEFS += -DANGELINA_KEYMAP +endif + +# 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 you want to change the display of OLED, you need to change here +SRC += ./common/oled_helper.c \ diff --git a/keyboards/treadstone48/pro_micro.h b/keyboards/treadstone48/pro_micro.h new file mode 100644 index 000000000000..f9e7ed75d9d5 --- /dev/null +++ b/keyboards/treadstone48/pro_micro.h @@ -0,0 +1,362 @@ +/* + pins_arduino.h - Pin definition functions for Arduino + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2007 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ +*/ + +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +// Workaround for wrong definitions in "iom32u4.h". +// This should be fixed in the AVR toolchain. +#undef UHCON +#undef UHINT +#undef UHIEN +#undef UHADDR +#undef UHFNUM +#undef UHFNUML +#undef UHFNUMH +#undef UHFLEN +#undef UPINRQX +#undef UPINTX +#undef UPNUM +#undef UPRST +#undef UPCONX +#undef UPCFG0X +#undef UPCFG1X +#undef UPSTAX +#undef UPCFG2X +#undef UPIENX +#undef UPDATX +#undef TCCR2A +#undef WGM20 +#undef WGM21 +#undef COM2B0 +#undef COM2B1 +#undef COM2A0 +#undef COM2A1 +#undef TCCR2B +#undef CS20 +#undef CS21 +#undef CS22 +#undef WGM22 +#undef FOC2B +#undef FOC2A +#undef TCNT2 +#undef TCNT2_0 +#undef TCNT2_1 +#undef TCNT2_2 +#undef TCNT2_3 +#undef TCNT2_4 +#undef TCNT2_5 +#undef TCNT2_6 +#undef TCNT2_7 +#undef OCR2A +#undef OCR2_0 +#undef OCR2_1 +#undef OCR2_2 +#undef OCR2_3 +#undef OCR2_4 +#undef OCR2_5 +#undef OCR2_6 +#undef OCR2_7 +#undef OCR2B +#undef OCR2_0 +#undef OCR2_1 +#undef OCR2_2 +#undef OCR2_3 +#undef OCR2_4 +#undef OCR2_5 +#undef OCR2_6 +#undef OCR2_7 + +#define NUM_DIGITAL_PINS 30 +#define NUM_ANALOG_INPUTS 12 + +#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) +#define TXLED0 PORTD |= (1<<5) +#define TXLED1 PORTD &= ~(1<<5) +#define RXLED0 PORTB |= (1<<0) +#define RXLED1 PORTB &= ~(1<<0) + +static const uint8_t SDA = 2; +static const uint8_t SCL = 3; +#define LED_BUILTIN 13 + +// Map SPI port to 'new' pins D14..D17 +static const uint8_t SS = 17; +static const uint8_t MOSI = 16; +static const uint8_t MISO = 14; +static const uint8_t SCK = 15; + +// Mapping of analog pins as digital I/O +// A6-A11 share with digital pins +static const uint8_t ADC0 = 18; +static const uint8_t ADC1 = 19; +static const uint8_t ADC2 = 20; +static const uint8_t ADC3 = 21; +static const uint8_t ADC4 = 22; +static const uint8_t ADC5 = 23; +static const uint8_t ADC6 = 24; // D4 +static const uint8_t ADC7 = 25; // D6 +static const uint8_t ADC8 = 26; // D8 +static const uint8_t ADC9 = 27; // D9 +static const uint8_t ADC10 = 28; // D10 +static const uint8_t ADC11 = 29; // D12 + +#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) +#define digitalPinToPCICRbit(p) 0 +#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) +#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) + +// __AVR_ATmega32U4__ has an unusual mapping of pins to channels +extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; +#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) + +#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) + +#ifdef ARDUINO_MAIN + +// On the Arduino board, digital pins are also used +// for the analog output (software PWM). Analog input +// pins are a separate set. + +// ATMEL ATMEGA32U4 / ARDUINO LEONARDO +// +// D0 PD2 RXD1/INT2 +// D1 PD3 TXD1/INT3 +// D2 PD1 SDA SDA/INT1 +// D3# PD0 PWM8/SCL OC0B/SCL/INT0 +// D4 A6 PD4 ADC8 +// D5# PC6 ??? OC3A/#OC4A +// D6# A7 PD7 FastPWM #OC4D/ADC10 +// D7 PE6 INT6/AIN0 +// +// D8 A8 PB4 ADC11/PCINT4 +// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 +// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 +// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 +// D12 A11 PD6 T1/#OC4D/ADC9 +// D13# PC7 PWM10 CLK0/OC4A +// +// A0 D18 PF7 ADC7 +// A1 D19 PF6 ADC6 +// A2 D20 PF5 ADC5 +// A3 D21 PF4 ADC4 +// A4 D22 PF1 ADC1 +// A5 D23 PF0 ADC0 +// +// New pins D14..D17 to map SPI port to digital pins +// +// MISO D14 PB3 MISO,PCINT3 +// SCK D15 PB1 SCK,PCINT1 +// MOSI D16 PB2 MOSI,PCINT2 +// SS D17 PB0 RXLED,SS/PCINT0 +// +// Connected LEDs on board for TX and RX +// TXLED D24 PD5 XCK1 +// RXLED D17 PB0 +// HWB PE2 HWB + +// these arrays map port names (e.g. port B) to the +// appropriate addresses for various functions (e.g. reading +// and writing) +const uint16_t PROGMEM port_to_mode_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &DDRB, + (uint16_t) &DDRC, + (uint16_t) &DDRD, + (uint16_t) &DDRE, + (uint16_t) &DDRF, +}; + +const uint16_t PROGMEM port_to_output_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &PORTB, + (uint16_t) &PORTC, + (uint16_t) &PORTD, + (uint16_t) &PORTE, + (uint16_t) &PORTF, +}; + +const uint16_t PROGMEM port_to_input_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &PINB, + (uint16_t) &PINC, + (uint16_t) &PIND, + (uint16_t) &PINE, + (uint16_t) &PINF, +}; + +const uint8_t PROGMEM digital_pin_to_port_PGM[] = { + PD, // D0 - PD2 + PD, // D1 - PD3 + PD, // D2 - PD1 + PD, // D3 - PD0 + PD, // D4 - PD4 + PC, // D5 - PC6 + PD, // D6 - PD7 + PE, // D7 - PE6 + + PB, // D8 - PB4 + PB, // D9 - PB5 + PB, // D10 - PB6 + PB, // D11 - PB7 + PD, // D12 - PD6 + PC, // D13 - PC7 + + PB, // D14 - MISO - PB3 + PB, // D15 - SCK - PB1 + PB, // D16 - MOSI - PB2 + PB, // D17 - SS - PB0 + + PF, // D18 - A0 - PF7 + PF, // D19 - A1 - PF6 + PF, // D20 - A2 - PF5 + PF, // D21 - A3 - PF4 + PF, // D22 - A4 - PF1 + PF, // D23 - A5 - PF0 + + PD, // D24 - PD5 + PD, // D25 / D6 - A7 - PD7 + PB, // D26 / D8 - A8 - PB4 + PB, // D27 / D9 - A9 - PB5 + PB, // D28 / D10 - A10 - PB6 + PD, // D29 / D12 - A11 - PD6 +}; + +const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { + _BV(2), // D0 - PD2 + _BV(3), // D1 - PD3 + _BV(1), // D2 - PD1 + _BV(0), // D3 - PD0 + _BV(4), // D4 - PD4 + _BV(6), // D5 - PC6 + _BV(7), // D6 - PD7 + _BV(6), // D7 - PE6 + + _BV(4), // D8 - PB4 + _BV(5), // D9 - PB5 + _BV(6), // D10 - PB6 + _BV(7), // D11 - PB7 + _BV(6), // D12 - PD6 + _BV(7), // D13 - PC7 + + _BV(3), // D14 - MISO - PB3 + _BV(1), // D15 - SCK - PB1 + _BV(2), // D16 - MOSI - PB2 + _BV(0), // D17 - SS - PB0 + + _BV(7), // D18 - A0 - PF7 + _BV(6), // D19 - A1 - PF6 + _BV(5), // D20 - A2 - PF5 + _BV(4), // D21 - A3 - PF4 + _BV(1), // D22 - A4 - PF1 + _BV(0), // D23 - A5 - PF0 + + _BV(5), // D24 - PD5 + _BV(7), // D25 / D6 - A7 - PD7 + _BV(4), // D26 / D8 - A8 - PB4 + _BV(5), // D27 / D9 - A9 - PB5 + _BV(6), // D28 / D10 - A10 - PB6 + _BV(6), // D29 / D12 - A11 - PD6 +}; + +const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + TIMER0B, /* 3 */ + NOT_ON_TIMER, + TIMER3A, /* 5 */ + TIMER4D, /* 6 */ + NOT_ON_TIMER, + + NOT_ON_TIMER, + TIMER1A, /* 9 */ + TIMER1B, /* 10 */ + TIMER0A, /* 11 */ + + NOT_ON_TIMER, + TIMER4A, /* 13 */ + + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, +}; + +const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { + 7, // A0 PF7 ADC7 + 6, // A1 PF6 ADC6 + 5, // A2 PF5 ADC5 + 4, // A3 PF4 ADC4 + 1, // A4 PF1 ADC1 + 0, // A5 PF0 ADC0 + 8, // A6 D4 PD4 ADC8 + 10, // A7 D6 PD7 ADC10 + 11, // A8 D8 PB4 ADC11 + 12, // A9 D9 PB5 ADC12 + 13, // A10 D10 PB6 ADC13 + 9 // A11 D12 PD6 ADC9 +}; + +#endif /* ARDUINO_MAIN */ + +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_MONITOR Serial +#define SERIAL_PORT_USBVIRTUAL Serial +#define SERIAL_PORT_HARDWARE Serial1 +#define SERIAL_PORT_HARDWARE_OPEN Serial1 + +#endif /* Pins_Arduino_h */ diff --git a/keyboards/treadstone48/readme.md b/keyboards/treadstone48/readme.md new file mode 100644 index 000000000000..eef39c39b334 --- /dev/null +++ b/keyboards/treadstone48/readme.md @@ -0,0 +1,18 @@ +# treadstone48 + +![treadstone48](https://github.com/marksard/Keyboards/raw/master/_image/20181219-PC190003.jpg) + +A 47 (or 48) keys Symmetric Staggered keyboard. + +Keyboard Maintainer: [marksard](https://github.com/marksard) +Hardware Supported: The PCBs, controllers supported +Hardware Availability: links to where you can find this hardware + +Make example for this keyboard (after setting up your build environment): + + make treadstone48: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). + +[Build guide](https://github.com/marksard/Keyboards/blob/master/treadstpne48/documents/treadstone48_buildguide.md) +[Firmware](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/treadstone48) diff --git a/keyboards/sol/rev1/config.h b/keyboards/treadstone48/rev1/config.h similarity index 64% rename from keyboards/sol/rev1/config.h rename to keyboards/treadstone48/rev1/config.h index bfdadf9f6c69..d8ecf170dddd 100644 --- a/keyboards/sol/rev1/config.h +++ b/keyboards/treadstone48/rev1/config.h @@ -21,44 +21,40 @@ along with this program. If not, see . /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER RGBKB -#define PRODUCT Sol -#define DESCRIPTION "An RGB, split, ortho-esque keyboard" +#define PRODUCT_ID 0xDFA3 +#define DEVICE_VER 0x0010 +#define MANUFACTURER marksard +#define PRODUCT treadstone48 +#define DESCRIPTION Symmetrical staggered 47+1 Keys Keyboard #define PREVENT_STUCK_MODIFIERS #define TAPPING_FORCE_HOLD #define TAPPING_TERM 150 +/* Use I2C or Serial */ #define USE_I2C #define USE_SERIAL -#define USE_SERIAL_PD3 +//#define USE_MATRIX_I2C /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -// Helix keyboard OLED support +// OLED support // see ./rules.mk: OLED_ENABLE=yes or no #ifdef OLED_ENABLE #define SSD1306OLED #endif -/* Select rows configuration */ -// Rows are 4 or 5 -// #define HELIX_ROWS 5 see ./rules.mk - /* key matrix size */ // Rows are doubled-up -#define MATRIX_ROWS 12 -#define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, E6} +#define MATRIX_ROWS 16 +#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } // wiring of each half -#define MATRIX_COLS 7 -#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7 } -// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order +#define MATRIX_COLS 6 +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -75,51 +71,35 @@ along with this program. If not, see . //#define LOCKING_RESYNC_ENABLE /* ws2812 RGB LED */ -#define RGB_DI_PIN B3 +#define RGB_DI_PIN D3 #define RGBLIGHT_TIMER //#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h #define ws2812_PORTREG PORTD #define ws2812_DDRREG DDRD -#define DRIVER_COUNT 2 -#define DRIVER_LED_TOTAL 70 -// #define RGB_MATRIX_KEYPRESSES -#define BACKLIGHT_PIN B7 -#define BACKLIGHT_LEVELS 5 - -#ifdef LED_MIRRORED - #define RGBLED_NUM 35 -#else - #define RGBLED_NUM 70 -#endif - -#define RGBLIGHT_RAINBOW_SWIRL_RANGE 1950 +// treadstone48 keyboard RGB LED support +//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no +// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes +#define RGBLED_NUM 12 -#ifdef IOS_DEVICE_ENABLE - #define RGBLIGHT_LIMIT_VAL 40 - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 40 -#elif RGBLIGHT_FULL_POWER - #define RGBLIGHT_LIMIT_VAL 255 - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +#ifndef IOS_DEVICE_ENABLE + #define RGBLIGHT_LIMIT_VAL 180 + #define RGBLIGHT_VAL_STEP 17 #else - #define RGBLIGHT_LIMIT_VAL 120 - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 + #define RGBLIGHT_LIMIT_VAL 50 + #define RGBLIGHT_VAL_STEP 4 #endif - -#define RGBLIGHT_VAL_STEP (RGBLIGHT_LIMIT_VAL / 10) #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_ANIMATIONS - #if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) -// USB_MAX_POWER_CONSUMPTION value for Helix keyboard +// USB_MAX_POWER_CONSUMPTION value for treadstone48 keyboard // 120 RGBoff, OLEDoff // 120 OLED // 330 RGB 6 // 300 RGB 32 // 310 OLED & RGB 32 - #define USB_MAX_POWER_CONSUMPTION 500 + #define USB_MAX_POWER_CONSUMPTION 400 #else // fix iPhone and iPad power adapter issue // iOS device need lessthan 100 @@ -144,4 +124,5 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION + #endif diff --git a/keyboards/treadstone48/rev1/info.json b/keyboards/treadstone48/rev1/info.json new file mode 100644 index 000000000000..df9e7591b509 --- /dev/null +++ b/keyboards/treadstone48/rev1/info.json @@ -0,0 +1,261 @@ +{ + "keyboard_name": "Treadstone48", + "url": "https://github.com/marksard/Keyboards", + "maintainer": "marksard", + "width": 14.75, + "height": 4, + "layouts": { + "LAYOUT_base": { + "layout": [ + { + "label": "Esc", + "x": 1, + "y": 0 + }, + { + "label": "Q", + "x": 2.25, + "y": 0 + }, + { + "label": "W", + "x": 3.25, + "y": 0 + }, + { + "label": "E", + "x": 4.25, + "y": 0 + }, + { + "label": "R", + "x": 5.25, + "y": 0 + }, + { + "label": "T", + "x": 6.25, + "y": 0 + }, + { + "label": "Y", + "x": 7.75, + "y": 0 + }, + { + "label": "U", + "x": 8.75, + "y": 0 + }, + { + "label": "I", + "x": 9.75, + "y": 0 + }, + { + "label": "O", + "x": 10.75, + "y": 0 + }, + { + "label": "P", + "x": 11.75, + "y": 0 + }, + { + "label": "-", + "x": 13.75, + "y": 0 + }, + { + "label": "Tab", + "x": 1, + "y": 1, + "w": 1.5 + }, + { + "label": "A", + "x": 2.5, + "y": 1 + }, + { + "label": "S", + "x": 3.5, + "y": 1 + }, + { + "label": "D", + "x": 4.5, + "y": 1 + }, + { + "label": "F", + "x": 5.5, + "y": 1 + }, + { + "label": "G", + "x": 6.5, + "y": 1 + }, + { + "label": "H", + "x": 7.5, + "y": 1 + }, + { + "label": "J", + "x": 8.5, + "y": 1 + }, + { + "label": "K", + "x": 9.5, + "y": 1 + }, + { + "label": "L", + "x": 10.5, + "y": 1 + }, + { + "label": ":", + "x": 11.5, + "y": 1 + }, + { + "label": "Enter", + "x": 12.5, + "y": 1, + "w": 2.25 + }, + { + "label": "Shift", + "x": 0, + "y": 2, + "w": 2.25 + }, + { + "label": "Z", + "x": 2.25, + "y": 2 + }, + { + "label": "X", + "x": 3.25, + "y": 2 + }, + { + "label": "C", + "x": 4.25, + "y": 2 + }, + { + "label": "V", + "x": 5.25, + "y": 2 + }, + { + "label": "B", + "x": 6.25, + "y": 2 + }, + { + "label": "N", + "x": 7.75, + "y": 2 + }, + { + "label": "M", + "x": 8.75, + "y": 2 + }, + { + "label": "<", + "x": 9.75, + "y": 2 + }, + { + "label": ">", + "x": 10.75, + "y": 2 + }, + { + "label": "?", + "x": 11.75, + "y": 2 + }, + { + "label": "\u2191", + "x": 12.75, + "y": 2 + }, + { + "label": "Ctrl", + "x": 0.75, + "y": 3, + "w": 1.25 + }, + { + "label": "Win", + "x": 2, + "y": 3, + "w": 1.25 + }, + { + "label": "Alt", + "x": 3.25, + "y": 3, + "w": 1.25 + }, + { + "label": "Lower", + "x": 4.5, + "y": 3 + }, + { + "label": "BackSpace", + "x": 5.5, + "y": 3, + "w": 2 + }, + { + "x": 7.5, + "y": 3, + "w": 2 + }, + { + "label": "Raise", + "x": 9.5, + "y": 3 + }, + { + "label": "Menu", + "x": 10.5, + "y": 3, + "w": 1.25 + }, + { + "label": "\u2190", + "x": 11.75, + "y": 3 + }, + { + "label": "\u2193", + "x": 12.75, + "y": 3 + }, + { + "label": "\u2192", + "x": 13.75, + "y": 3 + }, + { + "label": "_", + "x": 12.75, + "y": 0 + } + ] + } + } +} diff --git a/keyboards/orthodox/matrix.c b/keyboards/treadstone48/rev1/matrix.c similarity index 72% rename from keyboards/orthodox/matrix.c rename to keyboards/treadstone48/rev1/matrix.c index 2ca5f4d87abc..8685a8125e49 100644 --- a/keyboards/orthodox/matrix.c +++ b/keyboards/treadstone48/rev1/matrix.c @@ -20,10 +20,7 @@ along with this program. If not, see . */ #include #include -#ifdef USE_I2C -// provides memcpy for copying TWI slave buffer -// #include -#endif +#include #include #include #include @@ -34,12 +31,11 @@ along with this program. If not, see . #include "matrix.h" #include "split_util.h" #include "pro_micro.h" -#include "config.h" -#ifdef USE_I2C +#ifdef USE_MATRIX_I2C # include "i2c.h" #else // USE_SERIAL -# include "serial.h" +# include "split_scomm.h" #endif #ifndef DEBOUNCE @@ -51,6 +47,7 @@ along with this program. If not, see . static uint8_t debouncing = DEBOUNCE; static const int ROWS_PER_HAND = MATRIX_ROWS/2; static uint8_t error_count = 0; +uint8_t is_master = 0 ; static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; @@ -63,6 +60,7 @@ static matrix_row_t read_cols(void); static void init_cols(void); static void unselect_rows(void); static void select_row(uint8_t row); +static uint8_t matrix_master_scan(void); __attribute__ ((weak)) @@ -105,6 +103,8 @@ void matrix_init(void) init_cols(); TX_RX_LED_INIT; + TXLED0; + RXLED0; // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { @@ -112,12 +112,14 @@ void matrix_init(void) matrix_debouncing[i] = 0; } + is_master = has_usb(); + matrix_init_quantum(); } uint8_t _matrix_scan(void) { - // Right hand is stored after the left in the matrix so, we need to offset it + // Right hand is stored after the left in the matirx so, we need to offset it int offset = isLeftHand ? 0 : (ROWS_PER_HAND); for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { @@ -144,7 +146,7 @@ uint8_t _matrix_scan(void) return 1; } -#ifdef USE_I2C +#ifdef USE_MATRIX_I2C // Get rows from other half over i2c int i2c_transaction(void) { @@ -162,31 +164,14 @@ int i2c_transaction(void) { if (err) goto i2c_error; if (!err) { - /* - // read from TWI byte-by-byte into matrix_row_t memory space - size_t i; - for (i = 0; i < SLAVE_BUFFER_SIZE-1; ++i) { - *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_ACK); + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); } - // last byte to be read / end of chunk - *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_NACK); - */ - - // kludge for column #9: unpack bits for keys (2,9) and (3,9) from (1,7) and (1,8) - // i2c_master_read(I2C_ACK); - matrix[slaveOffset+0] = i2c_master_read(I2C_ACK); - // i2c_master_read(I2C_ACK); - matrix[slaveOffset+1] = (matrix_row_t)i2c_master_read(I2C_ACK)\ - | (matrix[slaveOffset+0]&0x40U)<<2; - // i2c_master_read(I2C_ACK); - matrix[slaveOffset+2] = (matrix_row_t)i2c_master_read(I2C_NACK)\ - | (matrix[slaveOffset+0]&0x80U)<<1; - // clear highest two bits on row 1, where the col9 bits were transported - matrix[slaveOffset+0] &= 0x3F; - + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); i2c_master_stop(); } else { -i2c_error: // the cable is disconnected, or something else went wrong +i2c_error: // the cable is disconnceted, or something else went wrong i2c_reset_state(); return err; } @@ -196,30 +181,64 @@ int i2c_transaction(void) { #else // USE_SERIAL -int serial_transaction(void) { +int serial_transaction(int master_changed) { int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { +#ifdef SERIAL_USE_MULTI_TRANSACTION + int ret=serial_update_buffers(master_changed); +#else + int ret=serial_update_buffers(); +#endif + if (ret ) { + if(ret==2) RXLED1; return 1; } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } + RXLED0; + memcpy(&matrix[slaveOffset], + (void *)serial_slave_buffer, sizeof(serial_slave_buffer)); return 0; } #endif uint8_t matrix_scan(void) { + if (is_master) { + matrix_master_scan(); + }else{ + matrix_slave_scan(); + int offset = (isLeftHand) ? ROWS_PER_HAND : 0; + memcpy(&matrix[offset], + (void *)serial_master_buffer, sizeof(serial_master_buffer)); + matrix_scan_quantum(); + } + return 1; +} + + +uint8_t matrix_master_scan(void) { + int ret = _matrix_scan(); + int mchanged = 1; + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; +#ifdef USE_MATRIX_I2C +// for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ +// i2c_slave_buffer[i] = matrix[offset+i]; +// } +#else // USE_SERIAL + #ifdef SERIAL_USE_MULTI_TRANSACTION + mchanged = memcmp((void *)serial_master_buffer, + &matrix[offset], sizeof(serial_master_buffer)); + #endif + memcpy((void *)serial_master_buffer, + &matrix[offset], sizeof(serial_master_buffer)); +#endif -#ifdef USE_I2C +#ifdef USE_MATRIX_I2C if( i2c_transaction() ) { #else // USE_SERIAL - if( serial_transaction() ) { + if( serial_transaction(mchanged) ) { #endif // turn on the indicator led when halves are disconnected TXLED1; @@ -247,29 +266,25 @@ void matrix_slave_scan(void) { int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; -#ifdef USE_I2C - // SLAVE_BUFFER_SIZE is from i2c.h - // (MATRIX_ROWS/2*sizeof(matrix_row_t)) - // memcpy((void*)i2c_slave_buffer, (const void*)&matrix[offset], (ROWS_PER_HAND*sizeof(matrix_row_t))); - - // kludge for column #9: put bits for keys (2,9) and (3,9) into (1,7) and (1,8) - i2c_slave_buffer[0] = (uint8_t)(matrix[offset+0])\ - | (matrix[offset+1]&0x100U)>>2\ - | (matrix[offset+2]&0x100U)>>1; - i2c_slave_buffer[1] = (uint8_t)(matrix[offset+1]); - i2c_slave_buffer[2] = (uint8_t)(matrix[offset+2]); - // note: looks like a possible operator-precedence bug here, in last version? - /* - i2c_slave_buffer[1] = (uint8_t)matrix[offset+0]; - i2c_slave_buffer[2] = (uint8_t)(matrix[offset+1]>>8); - i2c_slave_buffer[3] = (uint8_t)(matrix[offset+1]>>8); - i2c_slave_buffer[4] = (uint8_t)(matrix[offset+2]>>8); - i2c_slave_buffer[5] = (uint8_t)matrix[offset+2]; - */ +#ifdef USE_MATRIX_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ + i2c_slave_buffer[i] = matrix[offset+i]; + } #else // USE_SERIAL + #ifdef SERIAL_USE_MULTI_TRANSACTION + int change = 0; + #endif for (int i = 0; i < ROWS_PER_HAND; ++i) { + #ifdef SERIAL_USE_MULTI_TRANSACTION + if( serial_slave_buffer[i] != matrix[offset+i] ) + change = 1; + #endif serial_slave_buffer[i] = matrix[offset+i]; } + #ifdef SERIAL_USE_MULTI_TRANSACTION + slave_buffer_change_count += change; + #endif #endif } diff --git a/keyboards/sol/rev1/rev1.c b/keyboards/treadstone48/rev1/rev1.c similarity index 89% rename from keyboards/sol/rev1/rev1.c rename to keyboards/treadstone48/rev1/rev1.c index 01ab577d4577..2637864271a8 100644 --- a/keyboards/sol/rev1/rev1.c +++ b/keyboards/treadstone48/rev1/rev1.c @@ -1,4 +1,4 @@ -#include "sol.h" +#include "treadstone48.h" #ifdef SSD1306OLED diff --git a/keyboards/treadstone48/rev1/rev1.h b/keyboards/treadstone48/rev1/rev1.h new file mode 100644 index 000000000000..c6145398dd89 --- /dev/null +++ b/keyboards/treadstone48/rev1/rev1.h @@ -0,0 +1,202 @@ +#ifndef REV1_H +#define REV1_CONFIG_H + +#include "../treadstone48.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +// full Keymap +// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) +#define LAYOUT_full( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R00, R01, R02, R03, R04, R05, R40, R41, R42, R43, R44, R45, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R10, R11, R12, R13, R14, R15, R50, R51, R52, R53, R54, R55, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R20, R21, R22, R23, R24, R25, R60, R61, R62, R63, R64, R65, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R30, R31, R32, R33, R34, R35, R70, R71, R72, R73, R74, R75 \ + ) \ + { \ + { L45, L44, L43, L42, L41, L40 }, \ + { L55, L54, L53, L52, L51, L50 }, \ + { L65, L64, L63, L62, L61, L60 }, \ + { L75, L74, L73, L72, L71, L70 }, \ + { L05, L04, L03, L02, L01, L00 }, \ + { L15, L14, L13, L12, L11, L10 }, \ + { L25, L24, L23, L22, L21, L20 }, \ + { L35, L34, L33, L32, L31, L30 }, \ + { R45, R44, R43, R42, R41, R40 }, \ + { R55, R54, R53, R52, R51, R50 }, \ + { R65, R64, R63, R62, R61, R60 }, \ + { R75, R74, R73, R72, R71, R70 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 }, \ + } + +#define K_N KC_NO + +////////////////////////////////////////////////////////////////////////////// +// When only use Treadstone48. +// L75 is ExtraKey +////////////////////////////////////////////////////////////////////////////// +#define LAYOUT_base( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \ + ) \ + LAYOUT_full( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N \ + ) + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_base_kc( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \ + ) \ + LAYOUT_base( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75 \ + ) +////////////////////////////////////////////////////////////////////////////// + + +////////////////////////////////////////////////////////////////////////////// +// When connecting Rhymestone to Treadstone48. +// L75 is ExtraKey +////////////////////////////////////////////////////////////////////////////// +#define LAYOUT_rs( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, R70, R71, R72, R73, R74, L75 \ + ) \ + LAYOUT_full( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R44, R43, R42, R41, R40, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R54, R53, R52, R51, R50, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R64, R63, R62, R61, R60, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R74, R73, R72, R71, R70 \ + ) + +// When use right hand side of the Rhymestone. +#ifdef RHYMESTONE_RIGHTHAND +#undef LAYOUT_rs +#define LAYOUT_rs( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, R70, R71, R72, R73, R74, L75 \ + ) \ + LAYOUT_full( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R40, R41, R42, R43, R44, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R50, R51, R52, R53, R54, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R60, R61, R62, R63, R64, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R70, R71, R72, R73, R74 \ + ) +#endif + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_rs_kc( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74 \ + ) \ + LAYOUT_rs( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, KC_##R60, KC_##R61, KC_##R62, KC_##R63, KC_##R64, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75, KC_##R70, KC_##R71, KC_##R72, KC_##R73, KC_##R74 \ + ) +////////////////////////////////////////////////////////////////////////////// + + + +////////////////////////////////////////////////////////////////////////////// +// Alpha version keymap. +// L30 is ExtraKey +////////////////////////////////////////////////////////////////////////////// +#ifdef ANGELINA_KEYMAP +#undef LAYOUT_base +#undef LAYOUT_base_kc +#undef LAYOUT_rs +#undef LAYOUT_rs_kc + +#define LAYOUT_base( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ + L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, L30 \ + ) \ + LAYOUT_full( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N, K_N \ + ) + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_base_kc( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75 \ + ) \ + LAYOUT_base( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75 \ + ) + +#define LAYOUT_rs( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ + L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74, L30 \ + ) \ + LAYOUT_full( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R44, R43, R42, R41, R40, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R54, R53, R52, R51, R50, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R64, R63, R62, R61, R60, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, K_N, K_N, K_N, K_N, K_N, K_N, K_N, R74, R73, R72, R71, R70 \ + ) + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_rs_kc( \ + L00, L01, L02, L03, L04, L05, L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, \ + L10, L11, L12, L13, L14, L15, L50, L51, L52, L53, L54, L55, R50, R51, R52, R53, R54, \ + L20, L21, L22, L23, L24, L25, L60, L61, L62, L63, L64, L65, R60, R61, R62, R63, R64, \ + L30, L31, L32, L33, L34, L35, L70, L71, L72, L73, L74, L75, R70, R71, R72, R73, R74 \ + ) \ + LAYOUT_rs( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L60, KC_##L61, KC_##L62, KC_##L63, KC_##L64, KC_##L65, KC_##R60, KC_##R61, KC_##R62, KC_##R63, KC_##R64, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L70, KC_##L71, KC_##L72, KC_##L73, KC_##L74, KC_##L75, KC_##R70, KC_##R71, KC_##R72, KC_##R73, KC_##R74 \ + ) + +#endif +////////////////////////////////////////////////////////////////////////////// + +#endif diff --git a/keyboards/treadstone48/rev1/rules.mk b/keyboards/treadstone48/rev1/rules.mk new file mode 100644 index 000000000000..6028b5a5b95a --- /dev/null +++ b/keyboards/treadstone48/rev1/rules.mk @@ -0,0 +1,3 @@ +SRC += rev1/matrix.c +SRC += rev1/split_util.c +SRC += rev1/split_scomm.c diff --git a/keyboards/treadstone48/rev1/serial_config.h b/keyboards/treadstone48/rev1/serial_config.h new file mode 100644 index 000000000000..37135213d55f --- /dev/null +++ b/keyboards/treadstone48/rev1/serial_config.h @@ -0,0 +1,8 @@ +//// #error rev2 serial config + +#ifndef SOFT_SERIAL_PIN +/* Soft Serial defines */ +#define SOFT_SERIAL_PIN D2 + +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/treadstone48/rev1/serial_config_simpleapi.h b/keyboards/treadstone48/rev1/serial_config_simpleapi.h new file mode 100644 index 000000000000..e2d22a41e7bc --- /dev/null +++ b/keyboards/treadstone48/rev1/serial_config_simpleapi.h @@ -0,0 +1,8 @@ +#ifndef SERIAL_CONFIG_SIMPLEAPI_H +#define SERIAL_CONFIG_SIMPLEAPI_H + +#undef SERIAL_USE_MULTI_TRANSACTION +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 + +#endif // SERIAL_CONFIG_SIMPLEAPI_H diff --git a/keyboards/treadstone48/rev1/split_scomm.c b/keyboards/treadstone48/rev1/split_scomm.c new file mode 100644 index 000000000000..ada7867960b9 --- /dev/null +++ b/keyboards/treadstone48/rev1/split_scomm.c @@ -0,0 +1,92 @@ +#ifdef USE_SERIAL +#ifdef SERIAL_USE_MULTI_TRANSACTION +/* --- USE flexible API (using multi-type transaction function) --- */ + +#include +#include +#include +#include +#include "serial.h" +#ifdef CONSOLE_ENABLE + #include +#endif + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; +uint8_t volatile status_com = 0; +uint8_t volatile status1 = 0; +uint8_t slave_buffer_change_count = 0; +uint8_t s_change_old = 0xff; +uint8_t s_change_new = 0xff; + +SSTD_t transactions[] = { +#define GET_SLAVE_STATUS 0 + /* master buffer not changed, only recive slave_buffer_change_count */ + { (uint8_t *)&status_com, + 0, NULL, + sizeof(slave_buffer_change_count), &slave_buffer_change_count, + }, +#define PUT_MASTER_GET_SLAVE_STATUS 1 + /* master buffer changed need send, and recive slave_buffer_change_count */ + { (uint8_t *)&status_com, + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + sizeof(slave_buffer_change_count), &slave_buffer_change_count, + }, +#define GET_SLAVE_BUFFER 2 + /* recive serial_slave_buffer */ + { (uint8_t *)&status1, + 0, NULL, + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + } +}; + +void serial_master_init(void) +{ + soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); +} + +void serial_slave_init(void) +{ + soft_serial_target_init(transactions, TID_LIMIT(transactions)); +} + +// 0 => no error +// 1 => slave did not respond +// 2 => checksum error +int serial_update_buffers(int master_update) +{ + int status, smatstatus; + static int need_retry = 0; + + if( s_change_old != s_change_new ) { + smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); + if( smatstatus == TRANSACTION_END ) { + s_change_old = s_change_new; +#ifdef CONSOLE_ENABLE + uprintf("slave matrix = %b %b %b %b %b\n", + serial_slave_buffer[0], serial_slave_buffer[1], + serial_slave_buffer[2], serial_slave_buffer[3], + serial_slave_buffer[4] ); +#endif + } + } else { + // serial_slave_buffer dosen't change + smatstatus = TRANSACTION_END; // dummy status + } + + if( !master_update && !need_retry) { + status = soft_serial_transaction(GET_SLAVE_STATUS); + } else { + status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); + } + if( status == TRANSACTION_END ) { + s_change_new = slave_buffer_change_count; + need_retry = 0; + } else { + need_retry = 1; + } + return smatstatus; +} + +#endif // SERIAL_USE_MULTI_TRANSACTION +#endif /* USE_SERIAL */ diff --git a/keyboards/treadstone48/rev1/split_scomm.h b/keyboards/treadstone48/rev1/split_scomm.h new file mode 100644 index 000000000000..16887eb74f7b --- /dev/null +++ b/keyboards/treadstone48/rev1/split_scomm.h @@ -0,0 +1,21 @@ +#pragma once + +#ifndef SERIAL_USE_MULTI_TRANSACTION +/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ +#include "serial.h" + +#else +/* --- USE flexible API (using multi-type transaction function) --- */ +// Buffers for master - slave communication +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 + +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; +extern uint8_t slave_buffer_change_count; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(int master_changed); + +#endif diff --git a/keyboards/bfo9000/split_util.c b/keyboards/treadstone48/rev1/split_util.c similarity index 79% rename from keyboards/bfo9000/split_util.c rename to keyboards/treadstone48/rev1/split_util.c index 7f200e6c9420..e1ff8b4379dc 100644 --- a/keyboards/bfo9000/split_util.c +++ b/keyboards/treadstone48/rev1/split_util.c @@ -7,13 +7,11 @@ #include "split_util.h" #include "matrix.h" #include "keyboard.h" -#include "config.h" -#include "timer.h" -#ifdef USE_I2C +#ifdef USE_MATRIX_I2C # include "i2c.h" #else -# include "serial.h" +# include "split_scomm.h" #endif volatile bool isLeftHand = true; @@ -32,19 +30,17 @@ static void setup_handedness(void) { } static void keyboard_master_setup(void) { -#ifdef USE_I2C + +#ifdef USE_MATRIX_I2C i2c_master_init(); -#ifdef SSD1306OLED - matrix_master_OLED_init(); -#endif #else serial_master_init(); #endif } static void keyboard_slave_setup(void) { - timer_init(); -#ifdef USE_I2C + +#ifdef USE_MATRIX_I2C i2c_slave_init(SLAVE_I2C_ADDRESS); #else serial_slave_init(); @@ -68,19 +64,7 @@ void split_keyboard_setup(void) { sei(); } -void keyboard_slave_loop(void) { - matrix_init(); - - while (1) { - matrix_slave_scan(); - } -} - // this code runs before the usb and keyboard is initialized void matrix_setup(void) { split_keyboard_setup(); - - if (!has_usb()) { - keyboard_slave_loop(); - } } diff --git a/keyboards/sol/rev1/split_util.h b/keyboards/treadstone48/rev1/split_util.h similarity index 79% rename from keyboards/sol/rev1/split_util.h rename to keyboards/treadstone48/rev1/split_util.h index 59b362415299..f593047560a4 100644 --- a/keyboards/sol/rev1/split_util.h +++ b/keyboards/treadstone48/rev1/split_util.h @@ -1,9 +1,10 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H +#pragma once #include #include "eeconfig.h" +#define SLAVE_I2C_ADDRESS 0x32 + extern volatile bool isLeftHand; // slave version of matix scan, defined in matrix.c @@ -13,5 +14,3 @@ void split_keyboard_setup(void); bool has_usb(void); void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/treadstone48/rules.mk b/keyboards/treadstone48/rules.mk new file mode 100644 index 000000000000..6ddbdaf80eb5 --- /dev/null +++ b/keyboards/treadstone48/rules.mk @@ -0,0 +1,73 @@ +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SUBPROJECT_rev1 = no +USE_I2C = yes +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes + +DEFAULT_FOLDER = treadstone48/rev1 diff --git a/keyboards/treadstone48/serial.c b/keyboards/treadstone48/serial.c new file mode 100644 index 000000000000..6006ebf1bdb2 --- /dev/null +++ b/keyboards/treadstone48/serial.c @@ -0,0 +1,590 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + * + * 2018-10-28 checked + * avr-gcc 4.9.2 + * avr-gcc 5.4.0 + * avr-gcc 7.3.0 + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include +#include "serial.h" +//#include + +#ifdef SOFT_SERIAL_PIN + +#ifdef __AVR_ATmega32U4__ + // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. + #ifdef USE_I2C + #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 + #error Using ATmega32U4 I2C, so can not use PD0, PD1 + #endif + #endif + + #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 + #define SERIAL_PIN_DDR DDRD + #define SERIAL_PIN_PORT PORTD + #define SERIAL_PIN_INPUT PIND + #if SOFT_SERIAL_PIN == D0 + #define SERIAL_PIN_MASK _BV(PD0) + #define EIMSK_BIT _BV(INT0) + #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) + #define SERIAL_PIN_INTERRUPT INT0_vect + #elif SOFT_SERIAL_PIN == D1 + #define SERIAL_PIN_MASK _BV(PD1) + #define EIMSK_BIT _BV(INT1) + #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) + #define SERIAL_PIN_INTERRUPT INT1_vect + #elif SOFT_SERIAL_PIN == D2 + #define SERIAL_PIN_MASK _BV(PD2) + #define EIMSK_BIT _BV(INT2) + #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) + #define SERIAL_PIN_INTERRUPT INT2_vect + #elif SOFT_SERIAL_PIN == D3 + #define SERIAL_PIN_MASK _BV(PD3) + #define EIMSK_BIT _BV(INT3) + #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) + #define SERIAL_PIN_INTERRUPT INT3_vect + #endif + #elif SOFT_SERIAL_PIN == E6 + #define SERIAL_PIN_DDR DDRE + #define SERIAL_PIN_PORT PORTE + #define SERIAL_PIN_INPUT PINE + #define SERIAL_PIN_MASK _BV(PE6) + #define EIMSK_BIT _BV(INT6) + #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) + #define SERIAL_PIN_INTERRUPT INT6_vect + #else + #error invalid SOFT_SERIAL_PIN value + #endif + +#else + #error serial.c now support ATmega32U4 only +#endif + +//////////////// for backward compatibility //////////////////////////////// +#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) +/* --- USE OLD API (compatible with let's split serial.c) */ + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; + #endif + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + #endif + uint8_t volatile status0 = 0; + +SSTD_t transactions[] = { + { (uint8_t *)&status0, + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + #else + 0, (uint8_t *)NULL, + #endif + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + #else + 0, (uint8_t *)NULL, + #endif + } +}; + +void serial_master_init(void) +{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } + +void serial_slave_init(void) +{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } + +// 0 => no error +// 1 => slave did not respond +// 2 => checksum error +int serial_update_buffers() +{ + int result; + result = soft_serial_transaction(); + return result; +} + +#endif // end of OLD API (compatible with let's split serial.c) +//////////////////////////////////////////////////////////////////////////// + +#define ALWAYS_INLINE __attribute__((always_inline)) +#define NO_INLINE __attribute__((noinline)) +#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) + +// parity check +#define ODD_PARITY 1 +#define EVEN_PARITY 0 +#define PARITY EVEN_PARITY + +#ifdef SERIAL_DELAY + // custom setup in config.h + // #define TID_SEND_ADJUST 2 + // #define SERIAL_DELAY 6 // micro sec + // #define READ_WRITE_START_ADJUST 30 // cycles + // #define READ_WRITE_WIDTH_ADJUST 8 // cycles +#else +// ============ Standard setups ============ + +#ifndef SELECT_SOFT_SERIAL_SPEED +#define SELECT_SOFT_SERIAL_SPEED 1 +// 0: about 189kbps +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +#endif + +#if __GNUC__ < 6 + #define TID_SEND_ADJUST 14 +#else + #define TID_SEND_ADJUST 2 +#endif + +#if SELECT_SOFT_SERIAL_SPEED == 0 + // Very High speed + #define SERIAL_DELAY 4 // micro sec + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 34 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 1 + // High speed + #define SERIAL_DELAY 6 // micro sec + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 30 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 2 + // Middle speed + #define SERIAL_DELAY 12 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 3 + // Low speed + #define SERIAL_DELAY 24 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 4 + // Very Low speed + #define SERIAL_DELAY 36 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 5 + // Ultra Low speed + #define SERIAL_DELAY 48 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#else +#error invalid SELECT_SOFT_SERIAL_SPEED value +#endif /* SELECT_SOFT_SERIAL_SPEED */ +#endif /* SERIAL_DELAY */ + +#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) +#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) + +#define SLAVE_INT_WIDTH_US 1 +#ifndef SERIAL_USE_MULTI_TRANSACTION + #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY +#else + #define SLAVE_INT_ACK_WIDTH_UNIT 2 + #define SLAVE_INT_ACK_WIDTH 4 +#endif + +static SSTD_t *Transaction_table = NULL; +static uint8_t Transaction_table_size = 0; + +inline static void serial_delay(void) ALWAYS_INLINE; +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static void serial_delay_half1(void) ALWAYS_INLINE; +inline static +void serial_delay_half1(void) { + _delay_us(SERIAL_DELAY_HALF1); +} + +inline static void serial_delay_half2(void) ALWAYS_INLINE; +inline static +void serial_delay_half2(void) { + _delay_us(SERIAL_DELAY_HALF2); +} + +inline static void serial_output(void) ALWAYS_INLINE; +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static void serial_input_with_pullup(void) ALWAYS_INLINE; +inline static +void serial_input_with_pullup(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static void serial_low(void) ALWAYS_INLINE; +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static void serial_high(void) ALWAYS_INLINE; +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_output(); + serial_high(); +} + +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_input_with_pullup(); + + // Enable INT0-INT3,INT6 + EIMSK |= EIMSK_BIT; +#if SERIAL_PIN_MASK == _BV(PE6) + // Trigger on falling edge of INT6 + EICRB &= EICRx_BIT; +#else + // Trigger on falling edge of INT0-INT3 + EICRA &= EICRx_BIT; +#endif +} + +// Used by the sender to synchronize timing with the reciver. +static void sync_recv(void) NO_INLINE; +static +void sync_recv(void) { + for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { + } + // This shouldn't hang if the target disconnects because the + // serial line will float to high if the target does disconnect. + while (!serial_read_pin()); +} + +// Used by the reciver to send a synchronization signal to the sender. +static void sync_send(void) NO_INLINE; +static +void sync_send(void) { + serial_low(); + serial_delay(); + serial_high(); +} + +// Reads a byte from the serial line +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { + uint8_t byte, i, p, pb; + + _delay_sub_us(READ_WRITE_START_ADJUST); + for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { + serial_delay_half1(); // read the middle of pulses + if( serial_read_pin() ) { + byte = (byte << 1) | 1; p ^= 1; + } else { + byte = (byte << 1) | 0; p ^= 0; + } + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + } + /* recive parity bit */ + serial_delay_half1(); // read the middle of pulses + pb = serial_read_pin(); + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + + *pterrcount += (p != pb)? 1 : 0; + + return byte; +} + +// Sends a byte with MSB ordering +void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; +void serial_write_chunk(uint8_t data, uint8_t bit) { + uint8_t b, p; + for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { + if(data & b) { + serial_high(); p ^= 1; + } else { + serial_low(); p ^= 0; + } + serial_delay(); + } + /* send parity bit */ + if(p & 1) { serial_high(); } + else { serial_low(); } + serial_delay(); + + serial_low(); // sync_send() / senc_recv() need raise edge +} + +static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +void serial_send_packet(uint8_t *buffer, uint8_t size) { + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + data = buffer[i]; + sync_send(); + serial_write_chunk(data,8); + } +} + +static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { + uint8_t pecount = 0; + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + sync_recv(); + data = serial_read_chunk(&pecount, 8); + buffer[i] = data; + } + return pecount == 0; +} + +inline static +void change_sender2reciver(void) { + sync_send(); //0 + serial_delay_half1(); //1 + serial_low(); //2 + serial_input_with_pullup(); //2 + serial_delay_half1(); //3 +} + +inline static +void change_reciver2sender(void) { + sync_recv(); //0 + serial_delay(); //1 + serial_low(); //3 + serial_output(); //3 + serial_delay_half1(); //4 +} + +static inline uint8_t nibble_bits_count(uint8_t bits) +{ + bits = (bits & 0x5) + (bits >> 1 & 0x5); + bits = (bits & 0x3) + (bits >> 2 & 0x3); + return bits; +} + +// interrupt handle to be used by the target device +ISR(SERIAL_PIN_INTERRUPT) { + +#ifndef SERIAL_USE_MULTI_TRANSACTION + serial_low(); + serial_output(); + SSTD_t *trans = Transaction_table; +#else + // recive transaction table index + uint8_t tid, bits; + uint8_t pecount = 0; + sync_recv(); + bits = serial_read_chunk(&pecount,7); + tid = bits>>3; + bits = (bits&7) != nibble_bits_count(tid); + if( bits || pecount> 0 || tid > Transaction_table_size ) { + return; + } + serial_delay_half1(); + + serial_high(); // response step1 low->high + serial_output(); + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); + SSTD_t *trans = &Transaction_table[tid]; + serial_low(); // response step2 ack high->low +#endif + + // target send phase + if( trans->target2initiator_buffer_size > 0 ) + serial_send_packet((uint8_t *)trans->target2initiator_buffer, + trans->target2initiator_buffer_size); + // target switch to input + change_sender2reciver(); + + // target recive phase + if( trans->initiator2target_buffer_size > 0 ) { + if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size) ) { + *trans->status = TRANSACTION_ACCEPTED; + } else { + *trans->status = TRANSACTION_DATA_ERROR; + } + } else { + *trans->status = TRANSACTION_ACCEPTED; + } + + sync_recv(); //weit initiator output to high +} + +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) +// +// Returns: +// TRANSACTION_END +// TRANSACTION_NO_RESPONSE +// TRANSACTION_DATA_ERROR +// this code is very time dependent, so we need to disable interrupts +#ifndef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_transaction(void) { + SSTD_t *trans = Transaction_table; +#else +int soft_serial_transaction(int sstd_index) { + if( sstd_index > Transaction_table_size ) + return TRANSACTION_TYPE_ERROR; + SSTD_t *trans = &Transaction_table[sstd_index]; +#endif + cli(); + + // signal to the target that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(SLAVE_INT_WIDTH_US); + +#ifndef SERIAL_USE_MULTI_TRANSACTION + // wait for the target response + serial_input_with_pullup(); + _delay_us(SLAVE_INT_RESPONSE_TIME); + + // check if the target is present + if (serial_read_pin()) { + // target failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + +#else + // send transaction table index + int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); + sync_send(); + _delay_sub_us(TID_SEND_ADJUST); + serial_write_chunk(tid, 7); + serial_delay_half1(); + + // wait for the target response (step1 low->high) + serial_input_with_pullup(); + while( !serial_read_pin() ) { + _delay_sub_us(2); + } + + // check if the target is present (step2 high->low) + for( int i = 0; serial_read_pin(); i++ ) { + if (i > SLAVE_INT_ACK_WIDTH + 1) { + // slave failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); + } +#endif + + // initiator recive phase + // if the target is present syncronize with it + if( trans->target2initiator_buffer_size > 0 ) { + if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, + trans->target2initiator_buffer_size) ) { + serial_output(); + serial_high(); + *trans->status = TRANSACTION_DATA_ERROR; + sei(); + return TRANSACTION_DATA_ERROR; + } + } + + // initiator switch to output + change_reciver2sender(); + + // initiator send phase + if( trans->initiator2target_buffer_size > 0 ) { + serial_send_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size); + } + + // always, release the line when not in use + sync_send(); + + *trans->status = TRANSACTION_END; + sei(); + return TRANSACTION_END; +} + +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index) { + SSTD_t *trans = &Transaction_table[sstd_index]; + cli(); + int retval = *trans->status; + *trans->status = 0;; + sei(); + return retval; +} +#endif + +#endif + +// Helix serial.c history +// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) +// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) +// (adjusted with avr-gcc 4.9.2) +// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) +// (adjusted with avr-gcc 4.9.2) +// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) +// (adjusted with avr-gcc 4.9.2) +// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) +// (adjusted with avr-gcc 7.3.0) +// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) +// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/treadstone48/serial.h b/keyboards/treadstone48/serial.h new file mode 100644 index 000000000000..5deaf789e30c --- /dev/null +++ b/keyboards/treadstone48/serial.h @@ -0,0 +1,86 @@ +#pragma once + +#include + +// ///////////////////////////////////////////////////////////////// +// Need Soft Serial defines in config.h +// ///////////////////////////////////////////////////////////////// +// ex. +// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 +// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 +// // 1: about 137kbps (default) +// // 2: about 75kbps +// // 3: about 39kbps +// // 4: about 26kbps +// // 5: about 20kbps +// +// //// USE OLD API (compatible with let's split serial.c) +// ex. +// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +// #define SERIAL_MASTER_BUFFER_LENGTH 1 +// +// //// USE NEW API +// //// USE simple API (using signle-type transaction function) +// #define SERIAL_USE_SINGLE_TRANSACTION +// //// USE flexible API (using multi-type transaction function) +// #define SERIAL_USE_MULTI_TRANSACTION +// +// ///////////////////////////////////////////////////////////////// + + +//////////////// for backward compatibility //////////////////////////////// +#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION) +/* --- USE OLD API (compatible with let's split serial.c) */ + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; + #endif + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; + #endif + + void serial_master_init(void); + void serial_slave_init(void); + int serial_update_buffers(void); + +#endif // end of USE OLD API +//////////////////////////////////////////////////////////////////////////// + +// Soft Serial Transaction Descriptor +typedef struct _SSTD_t { + uint8_t *status; + uint8_t initiator2target_buffer_size; + uint8_t *initiator2target_buffer; + uint8_t target2initiator_buffer_size; + uint8_t *target2initiator_buffer; +} SSTD_t; +#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) + +// initiator is transaction start side +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); +// target is interrupt accept side +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); + +// initiator resullt +#define TRANSACTION_END 0 +#define TRANSACTION_NO_RESPONSE 0x1 +#define TRANSACTION_DATA_ERROR 0x2 +#define TRANSACTION_TYPE_ERROR 0x4 +#ifndef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_transaction(void); +#else +int soft_serial_transaction(int sstd_index); +#endif + +// target status +// *SSTD_t.status has +// initiator: +// TRANSACTION_END +// or TRANSACTION_NO_RESPONSE +// or TRANSACTION_DATA_ERROR +// target: +// TRANSACTION_DATA_ERROR +// or TRANSACTION_ACCEPTED +#define TRANSACTION_ACCEPTED 0x8 +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index); +#endif diff --git a/keyboards/sol/common/ssd1306.c b/keyboards/treadstone48/ssd1306.c similarity index 95% rename from keyboards/sol/common/ssd1306.c rename to keyboards/treadstone48/ssd1306.c index b3e55a67c201..dd3290ba0cc8 100644 --- a/keyboards/sol/common/ssd1306.c +++ b/keyboards/treadstone48/ssd1306.c @@ -1,3 +1,4 @@ + #ifdef SSD1306OLED #include "ssd1306.h" @@ -27,12 +28,17 @@ //static uint16_t last_battery_update; //static uint32_t vbat; //#define BatteryUpdateInterval 10000 /* milliseconds */ -#define ScreenOffInterval 300000 /* milliseconds */ + +// 'last_flush' is declared as uint16_t, +// so this must be less than 65535 +#define ScreenOffInterval 60000 /* milliseconds */ #if DEBUG_TO_SCREEN static uint8_t displaying; #endif static uint16_t last_flush; +static bool force_dirty = true; + // Write command sequence. // Returns true on success. static inline bool _send_cmd1(uint8_t cmd) { @@ -318,12 +324,19 @@ void iota_gfx_task_user(void) { void iota_gfx_task(void) { iota_gfx_task_user(); - if (display.dirty) { + if (display.dirty|| force_dirty) { iota_gfx_flush(); + force_dirty = false; } if (timer_elapsed(last_flush) > ScreenOffInterval) { iota_gfx_off(); } } + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { + force_dirty = true; + return true; +} + #endif diff --git a/keyboards/sol/common/ssd1306.h b/keyboards/treadstone48/ssd1306.h similarity index 95% rename from keyboards/sol/common/ssd1306.h rename to keyboards/treadstone48/ssd1306.h index 77ce7c211a04..49f258efa921 100644 --- a/keyboards/sol/common/ssd1306.h +++ b/keyboards/treadstone48/ssd1306.h @@ -1,9 +1,9 @@ -#ifndef SSD1306_H -#define SSD1306_H +#pragma once #include #include #include "pincontrol.h" +#include "action.h" enum ssd1306_cmds { DisplayOff = 0xAE, @@ -87,6 +87,4 @@ void matrix_write(struct CharacterMatrix *matrix, const char *data); void matrix_write_P(struct CharacterMatrix *matrix, const char *data); void matrix_render(struct CharacterMatrix *matrix); - - -#endif +bool process_record_gfx(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/treadstone48/treadstone48.c b/keyboards/treadstone48/treadstone48.c new file mode 100644 index 000000000000..faadb269065a --- /dev/null +++ b/keyboards/treadstone48/treadstone48.c @@ -0,0 +1 @@ +#include "treadstone48.h" diff --git a/keyboards/treadstone48/treadstone48.h b/keyboards/treadstone48/treadstone48.h new file mode 100644 index 000000000000..3123d1de5315 --- /dev/null +++ b/keyboards/treadstone48/treadstone48.h @@ -0,0 +1,15 @@ +#pragma once + +#ifdef KEYBOARD_treadstone48_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" + +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif diff --git a/keyboards/treasure/type9/config.h b/keyboards/treasure/type9/config.h index 435325f6c4ae..6115880d06fe 100644 --- a/keyboards/treasure/type9/config.h +++ b/keyboards/treasure/type9/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D1, D0, D4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL #define BACKLIGHT_PIN B5 diff --git a/keyboards/ut472/config.h b/keyboards/ut472/config.h new file mode 100644 index 000000000000..8f0d76271fae --- /dev/null +++ b/keyboards/ut472/config.h @@ -0,0 +1,60 @@ +/* +Copyright 2018 Carlos Filoteo + +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 . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Keyhive +#define PRODUCT UT47.2 +#define DESCRIPTION An awesome 40% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D1, D2, D3, D4 } +#define MATRIX_COL_PINS { C4, C5, B7, B6, B5, B4, B3, B2, B1, B0, D6, D5 } +#define UNUSED_PINS + + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN C6 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/ut472/info.json b/keyboards/ut472/info.json new file mode 100644 index 000000000000..40f769ae2ad2 --- /dev/null +++ b/keyboards/ut472/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "UT47.2", + "url": "", + "maintainer": "qmk", + "width": 12.5, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 47, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"Backspace", "x":11, "y":0, "w":1.5}, {"label":"LT(3) / Tab", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"\"", "x":11.25, "y":1, "w":1.25}, {"label":"Shift", "x":0, "y":2, "w":1.5}, {"label":"Z", "x":1.5, "y":2}, {"label":"X", "x":2.5, "y":2}, {"label":"C", "x":3.5, "y":2}, {"label":"V", "x":4.5, "y":2}, {"label":"B", "x":5.5, "y":2}, {"label":"N", "x":6.5, "y":2}, {"label":"M", "x":7.5, "y":2}, {"label":"<", "x":8.5, "y":2}, {"label":">", "x":9.5, "y":2}, {"label":"?", "x":10.5, "y":2}, {"label":"Shift / Enter", "x":11.5, "y":2}, {"label":"Ctrl", "x":0, "y":3}, {"label":"Alt", "x":1, "y":3}, {"label":"GUI", "x":2, "y":3}, {"label":"Menu", "x":3, "y":3}, {"label":"MO(2)", "x":4, "y":3, "w":1.25}, {"x":5.25, "y":3, "w":2}, {"label":"MO(1)", "x":7.25, "y":3, "w":1.25}, {"label":"\u2190", "x":8.5, "y":3}, {"label":"\u2193", "x":9.5, "y":3}, {"label":"\u2191", "x":10.5, "y":3}, {"label":"\u2192", "x":11.5, "y":3}] + } + } +} diff --git a/keyboards/ut472/keymaps/default/config.h b/keyboards/ut472/keymaps/default/config.h new file mode 100644 index 000000000000..f88ebf7e8037 --- /dev/null +++ b/keyboards/ut472/keymaps/default/config.h @@ -0,0 +1,21 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +// place overrides here diff --git a/keyboards/ut472/keymaps/default/keymap.c b/keyboards/ut472/keymaps/default/keymap.c new file mode 100644 index 000000000000..883eb5a22871 --- /dev/null +++ b/keyboards/ut472/keymaps/default/keymap.c @@ -0,0 +1,100 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define LT3_TAB LT(3, KC_TAB) + + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * ,-------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P |Bspace | + * |-------------------------------------------------------------------------+ + * |Tab/L3| A | S | D | F | G | H | J | K | L | ; | ' | + * |-------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |Sh/En| + * |-------------------------------------------------------------------------+ + * | Ctrl| Alt | Gui | App | L2 | Space | L1 | Left| Down| Up |Right| + * `-------------------------------------------------------------------------' + */ + +LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT3_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_APP, MO(2), KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + + /* FN Layer 1 + * ,-------------------------------------------------------------------------. + * | ` ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | | - | = | [ | ] | \ | + * |-------------------------------------------------------------------------+ + * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | Home| PgDn| PgUp| End | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Right */ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE, + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + + /* FN Layer 2 + * ,-------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |Delete| + * |-------------------------------------------------------------------------+ + * | | | | | | | | _ | + | { | } | | | + * |-------------------------------------------------------------------------+ + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |-------------------------------------------------------------------------+ + * | | | |Capsl| | | | Home| PgDn| PgUp| End | + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Left */ + KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_UNDERSCORE, KC_PLUS, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + + /* FN Layer 2 + * ,-------------------------------------------------------------------------. + * | Esc | Calc|Webhm| Mail| Comp| | | | | |PrtSc| | + * |-------------------------------------------------------------------------+ + * | | | | | | | | | | | | | + * |-------------------------------------------------------------------------+ + * | | | | | | | | | | | | | + * |-------------------------------------------------------------------------+ + * | | | | | | | |MousL|MousD|MousU|MousR| + * `-------------------------------------------------------------------------' + */ + +LAYOUT( /* Tab */ + KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R +), +}; diff --git a/keyboards/ut472/keymaps/default/readme.md b/keyboards/ut472/keymaps/default/readme.md new file mode 100644 index 000000000000..e3dcee467e5f --- /dev/null +++ b/keyboards/ut472/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# UT47 default keymap + +![UT47 layout image](https://i.imgur.com/Tsz5qsF.png) + +[KLE](http://www.keyboard-layout-editor.com/##@@_y:0%3B&=Esc&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&_w:1.5%3B&=Back%20Space&_x:0.25&a:4&f:4&w:4&h:4&d:true%3B&=%3Cb%3EGNAP!%3C%2F%2Fb%3E%3Cp%3E%3Cp%3EMinimum%20stagger%3Cp%3E47%20key%20layout%3B&@_a:7&f:3&w:1.25%3B&=Tab&=A&=S&=D&=F&=G&=H&=J&=K&=L&=%2F%3B&_w:1.25%3B&=%27%3B&@_w:1.5%3B&=Shift&=Z&=X&=C&=V&=B&=N&=M&=,&=.&=%2F%2F&=Return%3B&@=Ctrl&=Alt&=Super&=Menu&_w:1.25%3B&=%2F&dArr%2F%3B&_w:2%3B&=&_w:1.25%3B&=%2F&uArr%2F%3B&=%2F&larr%2F%3B&=%2F&darr%2F%3B&=%2F&uarr%2F%3B&=%2F&rarr%2F%3B%3B&=undefined) diff --git a/keyboards/ut472/readme.md b/keyboards/ut472/readme.md new file mode 100644 index 000000000000..25f40d783abe --- /dev/null +++ b/keyboards/ut472/readme.md @@ -0,0 +1,20 @@ +# ut47.2 + +Somewhere between ortholinear and standard offset. Created to have all the same functions on a Planck in a keyboard but with a more conventional keyboard row stagger. + +Keyboard Maintainer: [filoxo](https://github.com/filoxo), [network_operations](https://www.keyhive.xyz) + +The keyboard files can be found here: https://github.com/ai03-2725/UT47.2 +or purchased at keyhive.xyz + +## Instructions + +To create a hex file for the UT47.2, run: + + make ut472:default + +## Layout + +Go to the [default layout README](keymaps/default/readme.md) 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). diff --git a/keyboards/ut472/rules.mk b/keyboards/ut472/rules.mk new file mode 100644 index 000000000000..c7b2efedca36 --- /dev/null +++ b/keyboards/ut472/rules.mk @@ -0,0 +1,69 @@ +# MCU name +MCU = atmega32u2 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 +RGBLIGHT_ENABLE = yes diff --git a/keyboards/ut472/ut472.c b/keyboards/ut472/ut472.c new file mode 100644 index 000000000000..c0686d661aaf --- /dev/null +++ b/keyboards/ut472/ut472.c @@ -0,0 +1,13 @@ +#include "ut472.h" + +void matrix_init_kb(void) { + // Keyboard start-up code goes here + // Runs once when the firmware starts up + matrix_init_user(); +}; + +void matrix_scan_kb(void) { + // Looping keyboard code goes here + // This runs every cycle (a lot) + matrix_scan_user(); +}; diff --git a/keyboards/ut472/ut472.h b/keyboards/ut472/ut472.h new file mode 100644 index 000000000000..1068dd7041f7 --- /dev/null +++ b/keyboards/ut472/ut472.h @@ -0,0 +1,34 @@ +/* Copyright 2018 Carlos Filoteo + * + * 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 . + */ + + #pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ + K30, K31, K32, K33, K34, K35, K37, K38, K39, K3a, K3b \ +) \ + { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b }, \ + { K30, K31, K32, K33, K34, K35, K35, K37, K38, K39, K3a, K3b } \ + } + + diff --git a/keyboards/v60_type_r/config.h b/keyboards/v60_type_r/config.h index 34eb128537f8..e3e00a9f80de 100644 --- a/keyboards/v60_type_r/config.h +++ b/keyboards/v60_type_r/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 REPLACE_WITH_YOUR_NAME +Copyright 2017 benlyall, MechMerlin 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 @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN F7 @@ -190,5 +189,3 @@ along with this program. If not, see . /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - -#endif diff --git a/keyboards/v60_type_r/keymaps/default/config.h b/keyboards/v60_type_r/keymaps/default/config.h index 9561b0255f2c..744bea207b3b 100644 --- a/keyboards/v60_type_r/keymaps/default/config.h +++ b/keyboards/v60_type_r/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 benlyall, MechMerlin * * 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 @@ -13,14 +13,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#pragma once -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +// place overrides here -#include "../../config.h" #ifdef V60_POLESTAR #undef V60_POLESTAR #endif - -#endif diff --git a/keyboards/v60_type_r/keymaps/default/keymap.c b/keyboards/v60_type_r/keymaps/default/keymap.c index 77546c0a6549..831def0789bd 100644 --- a/keyboards/v60_type_r/keymaps/default/keymap.c +++ b/keyboards/v60_type_r/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 benlyall, MechMerlin * * 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 diff --git a/keyboards/v60_type_r/keymaps/default/readme.md b/keyboards/v60_type_r/keymaps/default/readme.md index 57ac901ada0b..9b3c6f064330 100644 --- a/keyboards/v60_type_r/keymaps/default/readme.md +++ b/keyboards/v60_type_r/keymaps/default/readme.md @@ -1,5 +1,4 @@ -KB Paradise V60 Type R Default Layout -====================== +# KB Paradise V60 Type R Default Layout This is the default layout as defined by the KBP V60 Type R manual/keycaps @@ -9,4 +8,4 @@ This is the default layout as defined by the KBP V60 Type R manual/keycaps ### Build -To build this keymap, simply run `make KEYMAP=default`. \ No newline at end of file +To build this keymap, simply run `make v60_type_r:default`. diff --git a/keyboards/ergodash/rev2/rules.mk b/keyboards/v60_type_r/keymaps/default/rules.mk similarity index 100% rename from keyboards/ergodash/rev2/rules.mk rename to keyboards/v60_type_r/keymaps/default/rules.mk diff --git a/keyboards/v60_type_r/keymaps/vimouse/config.h b/keyboards/v60_type_r/keymaps/vimouse/config.h index 3937420d00db..285cb4fa2385 100644 --- a/keyboards/v60_type_r/keymaps/vimouse/config.h +++ b/keyboards/v60_type_r/keymaps/vimouse/config.h @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 benlyall, MechMerlin * * 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 @@ -14,10 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once #define V60_POLESTAR @@ -27,5 +24,3 @@ #define MOUSEKEY_TIME_TO_MAX 60 #define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 - -#endif diff --git a/keyboards/v60_type_r/keymaps/vimouse/keymap.c b/keyboards/v60_type_r/keymaps/vimouse/keymap.c index 2586683127f6..8b0019e7ba1b 100644 --- a/keyboards/v60_type_r/keymaps/vimouse/keymap.c +++ b/keyboards/v60_type_r/keymaps/vimouse/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 benlyall, MechMerlin * * 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 diff --git a/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c b/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c index ec337bb22e78..82a7e528080c 100644 --- a/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c +++ b/keyboards/v60_type_r/keymaps/xtonhasvim/keymap.c @@ -18,7 +18,6 @@ #include "xtonhasvim.h" #include "fancylighting.h" -#define _______ KC_TRNS #define X_____X KC_NO enum layers { diff --git a/keyboards/v60_type_r/readme.md b/keyboards/v60_type_r/readme.md index 06ff749b8660..76cb5f39fc4a 100644 --- a/keyboards/v60_type_r/readme.md +++ b/keyboards/v60_type_r/readme.md @@ -13,17 +13,6 @@ Please note that other variants of the KBP V60 are not fully programmable. Backlight and RGB Underglow are both supported. -To use the backlight and/or RGB underglow: -* Create a new keymap -* Create a rules.mk file in the keymap -* Add RGBLIGHT_ENABLE = yes and/or BACKLIGHT_ENABLE = yes to the rules.mk -* Setup your keymap to your preference. Use [the `vimouse` keymap](keymaps/vimouse/keymap.c) as a starting point -* Some extra keys are defined to allow you to set the red, green and blue values of the underglow directly, rather than using the HSV spectrum. These are RGB_RI, RGB_RD, RGB_GI, RGB_GD, RGB_BI, RGB_BD for increase and decrease of the red, green and blue channels respectively. - -The provided `default` keymap pretty closely matches the default V60 Type R keymap, minus the backlight and underglow control keys. The `vimouse` keymap is completely customised and makes use of many of the possibilities, including mouse keys, backlighting, RGB underglow, etc. - -Note for those customising: The configuration used in the `vimouse` keymap results in about 93% of the available flash being utilised. Keep that in mind if you're adding functionality. - Note: By default the V60 Type R uses TMK. You should know what you're doing and none of this is guaranteed to work. If you want to stick with the TMK default, then the KB Paradise preferred way of creating the hex file is by using https://tkg.io/, selecting Fantastic60 and then defining your keymap. You will then have to use tkg-toolkit to finish the flashing @@ -40,7 +29,4 @@ or make v60_type_r:vimouse -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). diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk index 7a1340a1aca7..54a20a78154b 100644 --- a/keyboards/v60_type_r/rules.mk +++ b/keyboards/v60_type_r/rules.mk @@ -52,21 +52,21 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +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 +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 on B7 by default -RGBLIGHT_ENABLE ?= no # Enable the RGB Underglow -MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config) -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 +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable the RGB Underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 = 60_ansi diff --git a/keyboards/v60_type_r/v60_type_r.c b/keyboards/v60_type_r/v60_type_r.c index 86d87e12da2a..41eb75807d08 100644 --- a/keyboards/v60_type_r/v60_type_r.c +++ b/keyboards/v60_type_r/v60_type_r.c @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 benlyall, MechMerlin * * 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 diff --git a/keyboards/v60_type_r/v60_type_r.h b/keyboards/v60_type_r/v60_type_r.h index 3d7aef7eaf09..25097ed48e8e 100644 --- a/keyboards/v60_type_r/v60_type_r.h +++ b/keyboards/v60_type_r/v60_type_r.h @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 benlyall, MechMerlin * * 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 @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef V60_TYPE_R_H -#define V60_TYPE_R_H +#pragma once #include "quantum.h" @@ -106,4 +105,3 @@ enum my_keycodes { { k40, k41, k42, k43, k44, k45, k46, k47 } \ } -#endif diff --git a/keyboards/vinta/config.h b/keyboards/vinta/config.h index 81a661f168b5..54be2a87f18e 100644 --- a/keyboards/vinta/config.h +++ b/keyboards/vinta/config.h @@ -17,7 +17,7 @@ #define MATRIX_ROW_PINS { A10, A9, B0, A7, A6 } #define MATRIX_COL_PINS { A5, A4, A3, A2, A1, A0, F1, F0, B7, B6, B5, B4, B3, A15, A14, A13 } -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/vinta/rules.mk b/keyboards/vinta/rules.mk index 9d89d9663635..3ddb8d5bc0db 100644 --- a/keyboards/vinta/rules.mk +++ b/keyboards/vinta/rules.mk @@ -33,6 +33,7 @@ OPT_DEFS = # Options to pass to dfu-util when flashing DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p DF11 -v 0483 # Build Options # comment out to disable the options. diff --git a/keyboards/vision_division/keymaps/default/config.h b/keyboards/vision_division/keymaps/default/config.h index efd43f41b4e7..694ab6a6963f 100644 --- a/keyboards/vision_division/keymaps/default/config.h +++ b/keyboards/vision_division/keymaps/default/config.h @@ -1,7 +1,7 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once + +// place overrides here -#include "../../config.h" #include "matrix_types.h" /* USB Device descriptor parameter */ @@ -77,5 +77,3 @@ KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, HOMING k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, KC_NO \ ) */ - -#endif \ No newline at end of file diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c index 31b1076611a1..18fb7c16d76a 100644 --- a/keyboards/vision_division/keymaps/default/keymap.c +++ b/keyboards/vision_division/keymaps/default/keymap.c @@ -1,13 +1,6 @@ -#include "vision_division.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H #include "led.h" -#ifdef AUDIO_ENABLE - #include "audio.h" - #include "song_list.h" -#endif - enum keyboard_layers { LAYER_QWERTY = 0, LAYER_UPPER, @@ -121,7 +114,7 @@ enum keyboard_macros { #define M_CP_CT M(MACRO_COPY_CUT) -#define M_COPY KC_FN1 +#define M_COPY MACROTAP(MACRO_COPY_CUT) #define SC_UNDO LCTL(KC_Z) #define SC_REDO LCTL(KC_Y) @@ -135,10 +128,8 @@ enum keyboard_macros { #define SC_CCLS LCTL(KC_F4) #define TG_NKRO MAGIC_TOGGLE_NKRO -#define OS_SHFT KC_FN0 +#define OS_SHFT OSM(MOD_LSFT) -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX @@ -305,11 +296,6 @@ void persistent_default_layer_set(uint16_t default_layer) default_layer_set(default_layer); } -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_LSFT), - [1] = ACTION_MACRO_TAP(MACRO_COPY_CUT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { @@ -619,4 +605,4 @@ void music_scale_user(void) PLAY_SONG(music_scale); } -#endif /* AUDIO_ENABLE */ \ No newline at end of file +#endif /* AUDIO_ENABLE */ diff --git a/keyboards/vitamins_included/keymaps/default/keymap.c b/keyboards/vitamins_included/keymaps/default/keymap.c index 13b48e7640b5..782490572031 100644 --- a/keyboards/vitamins_included/keymaps/default/keymap.c +++ b/keyboards/vitamins_included/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/vitamins_included/keymaps/juno/keymap.c b/keyboards/vitamins_included/keymaps/juno/keymap.c new file mode 100644 index 000000000000..5fa8b4cf7104 --- /dev/null +++ b/keyboards/vitamins_included/keymaps/juno/keymap.c @@ -0,0 +1,293 @@ +#include QMK_KEYBOARD_H +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +#define _FN1 5 +#define _DPAD 6 +#define _DPADNUM 7 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, + + FN1, + DP_ON, + DP_OFF +}; + +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ESC | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | App | Ctrl | GUI | Alt |Lower | SpaceFn |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), \ + KC_APP, KC_LCTL, KC_LGUI, KC_LALT, LOWER, LT(_FN1, KC_SPC), + LT(_FN1, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |RESET | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = 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, \ + RESET, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |RESET | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = 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, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | |RGB_MOD| + * `-----------------------------------------------------------------------------------' + */ + +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD \ +), + +// Two personal additional layers below +// There's no brite key + +/* Function (personal function layer) + * ,-----------------------------------------------------------------------------------. + * | | Vol+ | PgUp | Up | PdDn | Ins | | | Up | | PScr | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Vol- | Left | Down | Right| Home | | Left | Down |Right | | Del | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Prev | Play | Next | | End | | | Vol- | Vol+ | Mute | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Caps | | | | | Space | | DP_ON| | | | + * `-----------------------------------------------------------------------------------' + */ + +[_FN1] = LAYOUT_ortho_4x12( \ + _______, KC_VOLU, KC_PGUP, KC_UP, KC_PGDN, KC_INS, _______, _______, KC_UP, _______, KC_PSCR, _______, \ + _______, KC_VOLD, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL, \ + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_END, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, \ + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, DP_ON, _______, _______, _______ \ +), + +/* DPAD layer, for active arrow cluster at the bottom right corner + + * ,-----------------------------------------------------------------------------------. + * | ESC | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | |DNUM | Space | |DP_OFF| Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ + +[_DPAD] = LAYOUT_ortho_4x12( \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT , \ + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, MO(_DPADNUM), + KC_SPC, KC_SPC, LOWER, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT \ +), + +// Extended layer for weapon switchings + +[_DPADNUM] = LAYOUT_ortho_4x12( \ + XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX , \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6 , \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 , \ + _______, _______, _______, XXXXXXX, MO(_DPADNUM), + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +) + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + + // Additional personal custom functions + + case KC_CAPS: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + if (host_keyboard_leds() & (1<event.pressed) { + + } else { + // activated upon release + #ifdef AUDIO_ENABLE + // PLAY_SONG(dpad_song_on); + #endif + + layer_off(_FN1); + layer_on(_DPAD); + } + + case DP_OFF: + if (record->event.pressed) { + // deactivated upon pressdown + #ifdef AUDIO_ENABLE + // PLAY_SONG(dpad_song_off); + #endif + + //layer_off(_FN1); // do not put in this line + layer_off(_DPAD); + } + } + return true; +} diff --git a/keyboards/vitamins_included/keymaps/juno/rules.mk b/keyboards/vitamins_included/keymaps/juno/rules.mk new file mode 100644 index 000000000000..424b208b6613 --- /dev/null +++ b/keyboards/vitamins_included/keymaps/juno/rules.mk @@ -0,0 +1,16 @@ +MIDI_ENABLE=no +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no + +NKRO_ENABLE = no # USB Nkey Rollover +AUDIO_ENABLE = no + +## BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) + +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration + +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend \ No newline at end of file diff --git a/keyboards/vitamins_included/keymaps/numpad/config.h b/keyboards/vitamins_included/keymaps/numpad/config.h new file mode 100644 index 000000000000..aba9fa7d403c --- /dev/null +++ b/keyboards/vitamins_included/keymaps/numpad/config.h @@ -0,0 +1,39 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +//#define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#ifdef AUDIO_ENABLE + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(DVORAK_SOUND), \ + SONG(COLEMAK_SOUND) \ + } +#endif diff --git a/keyboards/vitamins_included/keymaps/numpad/keymap.c b/keyboards/vitamins_included/keymaps/numpad/keymap.c new file mode 100644 index 000000000000..1767851feb9b --- /dev/null +++ b/keyboards/vitamins_included/keymaps/numpad/keymap.c @@ -0,0 +1,75 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. +#define _NUMPAD 0 +#define _ADJUST 3 + +enum custom_keycodes { + NUMPAD = SAFE_RANGE, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Numpad + * ,-----------------------------------------------------------------------------------. + * | 0 | 1 | 4 | 7 | nlck | esc | 0 | 1 | 4 | 7 | nlck | esc | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | , | 2 | 5 | 8 | / | adj | , | 2 | 5 | 8 | / | adj | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | . | 3 | 6 | 9 | * | adj | . | 3 | 6 | 9 | * | adj | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Enter| adj | - | + |bckspc| adj | Enter| adj | - | + |bckspc| adj | + * `-----------------------------------------------------------------------------------' + */ +[_NUMPAD] = LAYOUT_ortho_4x12( \ + KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_ESC, KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_NUMLOCK, KC_ESC, \ + KC_KP_COMMA, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, ADJUST, KC_KP_COMMA, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, ADJUST, \ + KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, ADJUST, KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, ADJUST , \ + KC_KP_ENTER, ADJUST, KC_KP_MINUS, KC_KP_PLUS, KC_BSPACE, ADJUST, KC_KP_ENTER, ADJUST, KC_KP_MINUS, KC_KP_PLUS, KC_BSPACE, ADJUST \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | RESET RESET | | | | |RGB_MOD| + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_4x12( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, RGB_MOD \ +) + + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/viterbi/keymaps/drashna_old/config.h b/keyboards/viterbi/keymaps/drashna_old/config.h deleted file mode 100644 index ddf9d1a40f43..000000000000 --- a/keyboards/viterbi/keymaps/drashna_old/config.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright 2017 Danny Nguyen - -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 . -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H - - -#ifdef RGBLIGHT_ENABLE -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 12 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 -#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 300 -#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 -#endif // RGBLIGHT_ENABLE - - -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE - -#ifndef NO_DEBUG -#define NO_DEBUG -#endif // !NO_DEBUG -#ifndef NO_PRINT -#define NO_PRINT -#endif // !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 - -#undef PRODUCT -#define PRODUCT Drashnas Viterbi Macro Pad - -#define USE_I2C - -#ifdef AUDIO_ENABLE -#define C6_AUDIO -#define NO_MUSIC_MODE -#endif - -#define LAYOUT_ortho_5x7( \ - L00, L01, L02, L03, L04, L05, L06, \ - L10, L11, L12, L13, L14, L15, L16, \ - L20, L21, L22, L23, L24, L25, L26, \ - L30, L31, L32, L33, L34, L35, L36, \ - L40, L41, L42, L43, L44, L45, L46 \ - ) \ - LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ - ) - -#endif - -#define QMK_ESC_OUTPUT F5 // usually COL -#define QMK_ESC_INPUT D4 // usually ROW -#define QMK_LED B0 -#define QMK_SPEAKER C6 diff --git a/keyboards/viterbi/keymaps/drashna_old/rules.mk b/keyboards/viterbi/keymaps/drashna_old/rules.mk deleted file mode 100644 index 14ac6a6b3c0b..000000000000 --- a/keyboards/viterbi/keymaps/drashna_old/rules.mk +++ /dev/null @@ -1,28 +0,0 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -TAP_DANCE_ENABLE = no -RGBLIGHT_ENABLE = yes -AUDIO_ENABLE = yes -NKRO_ENABLE = yes - -NO_SECRETS = yes -MACROS_ENABLED = yes -INDICATOR_LIGHTS = no -RGBLIGHT_TWINKLE = no - -LAYOUTS = ortho_5x7 - -# SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC)) -# SRC := $(filter-out serial.c,$(SRC)) -# SRC := $(filter-out matrix.c,$(SRC)) -# SRC := $(filter-out i2c.c,$(SRC)) -# SRC := $(filter-out split_util.c,$(SRC)) -# SRC += quantum/matrix.c - -USER_NAME := drashna -SRC += ../drashna/keymap.c - -BOOTLOADER = qmk-dfu diff --git a/keyboards/waldo/config.h b/keyboards/waldo/config.h new file mode 100644 index 000000000000..c460e7c27408 --- /dev/null +++ b/keyboards/waldo/config.h @@ -0,0 +1,77 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Greenwald Designs +#define PRODUCT Waldo +#define DESCRIPTION A 60% board +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS { F7, D5, D3, D2, B3, B2, C7, C6, B6, B5, B4, D7, D6, D4, B1 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +/* + * 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 + +// RGB LED +#define RGB_DI_PIN B0 // The pin the LED strip is connected to +#define RGBLED_NUM 10 // Number of LEDs in your strip diff --git a/keyboards/waldo/info.json b/keyboards/waldo/info.json new file mode 100644 index 000000000000..5cdc12d5ef53 --- /dev/null +++ b/keyboards/waldo/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "", + "url": "", + "maintainer": "qmk", + "width": 15, + "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}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":2, "w":1.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, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_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":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_hhkb": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}] + }, + + "LAYOUT_60_ansi_split_bs_rshift": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/waldo/keymaps/default/keymap.c b/keyboards/waldo/keymaps/default/keymap.c new file mode 100644 index 000000000000..2fcb3a1afbcf --- /dev/null +++ b/keyboards/waldo/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2015-2017 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 . + */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum waldo_layers { + _BASE, + _FUNCTION +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_60_ansi( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FUNCTION), KC_RCTL \ + ), + + [_FUNCTION] = LAYOUT_60_ansi( \ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 \ + ) + +}; diff --git a/keyboards/waldo/keymaps/default/readme.md b/keyboards/waldo/keymaps/default/readme.md new file mode 100644 index 000000000000..440961939c8f --- /dev/null +++ b/keyboards/waldo/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The Default Waldo Layout + diff --git a/keyboards/waldo/keymaps/default/rules.mk b/keyboards/waldo/keymaps/default/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/chocopad/keymaps/khord/config.h b/keyboards/waldo/keymaps/default_split_shft_bck/config.h similarity index 67% rename from keyboards/chocopad/keymaps/khord/config.h rename to keyboards/waldo/keymaps/default_split_shft_bck/config.h index 7fa3bf328ec9..19a485296eb0 100644 --- a/keyboards/chocopad/keymaps/khord/config.h +++ b/keyboards/waldo/keymaps/default_split_shft_bck/config.h @@ -1,6 +1,5 @@ #ifndef CONFIG_USER_H #define CONFIG_USER_H -#include "../../config.h" #endif diff --git a/keyboards/waldo/keymaps/default_split_shft_bck/keymap.c b/keyboards/waldo/keymaps/default_split_shft_bck/keymap.c new file mode 100644 index 000000000000..4ef7da001917 --- /dev/null +++ b/keyboards/waldo/keymaps/default_split_shft_bck/keymap.c @@ -0,0 +1,97 @@ +/* Copyright 2015-2017 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 . + */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum waldo_layers { + _QWERTY, + _FUNC +}; + +enum waldo_keycodes { + QWERTY = SAFE_RANGE, + BACKLIT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | Del | + * |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Backspace | + * |------------------------------------------------------------------------------------------| + * | Control | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |------------------------------------------------------------------------------------------| + * | L Shift | Z | X | C | V | B | N | M | , | . | / | R Shift | Fn | + * |------------------------+-----------------------------------------------------------------| + * | Ctrl | GUI | Alt | Space | GUI | Menu | Ctrl | + * `------------------------------------------------------------------------------------------' + */ + +[_QWERTY] = LAYOUT_60_ansi_split_bs_rshift( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FUNC), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL \ +), + +/* Function + * ,------------------------------------------------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | | + * |------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | | | Up | | | Vol+| | | Prnt| PgUp|PgDwn| Up | | | + * |------------------------------------------------------------------------------------------| + * | Caps | left| down|right| | Vol-| | | Home| End | left|right| | + * |------------------------------------------------------------------------------------------| + * | |GBTOG|GBMOD|GBHUD|GBHUI|GBSAD|GBSAI|GBVAD|GBVAI| | down| | Fn | + * |------------------------+-----------------------------------------------------------------| + * | Backlit| | | | | | | + * `------------------------------------------------------------------------------------------' + */ + +[_FUNC] = LAYOUT_60_ansi_split_bs_rshift( \ + KC_TILD, 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_UP, _______, _______, KC_VOLU, _______, _______, KC_PSCR, KC_PGUP, KC_PGDN, KC_UP, _______, _______, \ + KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_VOLD, _______, _______, KC_HOME, KC_END, KC_LEFT, KC_RGHT, _______, \ + _______, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DOWN, _______, KC_TRNS, \ + BACKLIT, _______, _______, _______, XXXXXXX, _______, _______, _______ \ +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } + return false; + break; + } + return true; +} diff --git a/keyboards/waldo/keymaps/default_split_shft_bck/readme.md b/keyboards/waldo/keymaps/default_split_shft_bck/readme.md new file mode 100644 index 000000000000..bb4d32898ee2 --- /dev/null +++ b/keyboards/waldo/keymaps/default_split_shft_bck/readme.md @@ -0,0 +1,2 @@ +# The Default Waldo Layout w/ Split backspace, split shift, and 7u space + diff --git a/keyboards/waldo/keymaps/default_split_shft_bck/rules.mk b/keyboards/waldo/keymaps/default_split_shft_bck/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/waldo/readme.md b/keyboards/waldo/readme.md new file mode 100644 index 000000000000..987b1fa4973f --- /dev/null +++ b/keyboards/waldo/readme.md @@ -0,0 +1,12 @@ +# Waldo + +A 60% Keyboard for use in the Holz case by Greenwald Designs + +Keyboard Maintainer: [That-Canadian](https://github.com/that-canadian) +Hardware Availability: https://store.projectkeyboard.com/products/waldo-pcb-60 + +Make example for this keyboard (after setting up your build environment): + + make waldo: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). diff --git a/keyboards/waldo/rules.mk b/keyboards/waldo/rules.mk new file mode 100644 index 000000000000..40ac48474eda --- /dev/null +++ b/keyboards/waldo/rules.mk @@ -0,0 +1,65 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = atmel-dfu + + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +API_SYSEX_ENABLE = no + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/waldo/waldo.c b/keyboards/waldo/waldo.c new file mode 100644 index 000000000000..33093d4bbd77 --- /dev/null +++ b/keyboards/waldo/waldo.c @@ -0,0 +1 @@ +#include "waldo.h" \ No newline at end of file diff --git a/keyboards/waldo/waldo.h b/keyboards/waldo/waldo.h new file mode 100644 index 000000000000..f683ca82ff0d --- /dev/null +++ b/keyboards/waldo/waldo.h @@ -0,0 +1,63 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_60_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k46, k49, k4a, k4c, k4d \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, KC_NO }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, k49, k4a, KC_NO, k4c, k4d, KC_NO } \ +} + +#define LAYOUT_60_hhkb( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k41, k42, k46, k49, k4a \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ + { KC_NO, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, k49, k4a, KC_NO, KC_NO, KC_NO, C_NO } \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k46, k49, k4a, k4c, k4d \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO, k2d, KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ + { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, k49, k4a, KC_NO, k4c, k4d, KC_NO } \ +} + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k44, k46, k48, k49, k4a, k4c, k4d \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \ + { k40, k41, k42, KC_NO, k44, KC_NO, k46, KC_NO, k48, k49, k4a, KC_NO, k4c, k4d } \ +} diff --git a/keyboards/wasdat/config.h b/keyboards/wasdat/config.h new file mode 100644 index 000000000000..73dcdc536d7e --- /dev/null +++ b/keyboards/wasdat/config.h @@ -0,0 +1,256 @@ +/* +Copyright 2019 Maarten Dekkers + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Wasdat +#define DESCRIPTION Custom controller for the WASD v2 TKL and 104 + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D6, D4, F6, F7, F4, F5, F0, F1 } +#define MATRIX_COL_PINS { } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +// For QMK DFU +#define QMK_ESC_OUTPUT D6 +#define QMK_ESC_INPUT D7 +#define QMK_LED B0 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/wasdat/info.json b/keyboards/wasdat/info.json new file mode 100644 index 000000000000..8f931f46cf7a --- /dev/null +++ b/keyboards/wasdat/info.json @@ -0,0 +1,459 @@ +{ + "keyboard_name": "Wasdat", + "url": "https://maartenwut.com/product/wasdat/", + "maintainer": "Maartenwut", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_fullsize_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"~", "x":0, "y":1.5}, + {"label":"1", "x":1, "y":1.5}, + {"label":"2", "x":2, "y":1.5}, + {"label":"3", "x":3, "y":1.5}, + {"label":"4", "x":4, "y":1.5}, + {"label":"5", "x":5, "y":1.5}, + {"label":"6", "x":6, "y":1.5}, + {"label":"7", "x":7, "y":1.5}, + {"label":"8", "x":8, "y":1.5}, + {"label":"9", "x":9, "y":1.5}, + {"label":"0", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + + {"label":"Num Lock", "x":18.5, "y":1.5}, + {"label":"/", "x":19.5, "y":1.5}, + {"label":"*", "x":20.5, "y":1.5}, + {"label":"-", "x":21.5, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"|", "x":13.5, "y":2.5, "w":1.5}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + + {"label":"7", "x":18.5, "y":2.5}, + {"label":"8", "x":19.5, "y":2.5}, + {"label":"9", "x":20.5, "y":2.5}, + {"label":"+", "x":21.5, "y":2.5, "h":2}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + + {"label":"4", "x":18.5, "y":3.5}, + {"label":"5", "x":19.5, "y":3.5}, + {"label":"6", "x":20.5, "y":3.5}, + + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"1", "x":18.5, "y":4.5}, + {"label":"2", "x":19.5, "y":4.5}, + {"label":"3", "x":20.5, "y":4.5}, + {"label":"Enter", "x":21.5, "y":4.5, "h":2}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5}, + + {"label":"0", "x":18.5, "y":5.5, "w":2}, + {"label":".", "x":20.5, "y":5.5} + ] + }, + "LAYOUT_fullsize_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"\u00ac", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"\"", "x":2, "y":1.5}, + {"label":"\u00a3", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + + {"label":"Num Lock", "x":18.5, "y":1.5}, + {"label":"/", "x":19.5, "y":1.5}, + {"label":"*", "x":20.5, "y":1.5}, + {"label":"-", "x":21.5, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + + {"label":"7", "x":18.5, "y":2.5}, + {"label":"8", "x":19.5, "y":2.5}, + {"label":"9", "x":20.5, "y":2.5}, + {"label":"+", "x":21.5, "y":2.5, "h":2}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"@", "x":11.75, "y":3.5}, + {"label":"~", "x":12.75, "y":3.5}, + + {"label":"4", "x":18.5, "y":3.5}, + {"label":"5", "x":19.5, "y":3.5}, + {"label":"6", "x":20.5, "y":3.5}, + + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"|", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"1", "x":18.5, "y":4.5}, + {"label":"2", "x":19.5, "y":4.5}, + {"label":"3", "x":20.5, "y":4.5}, + {"label":"Enter", "x":21.5, "y":4.5, "h":2}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5}, + + {"label":"0", "x":18.5, "y":5.5, "w":2}, + {"label":".", "x":20.5, "y":5.5} + ] + }, + "LAYOUT_tkl_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"~", "x":0, "y":1.5}, + {"label":"1", "x":1, "y":1.5}, + {"label":"2", "x":2, "y":1.5}, + {"label":"3", "x":3, "y":1.5}, + {"label":"4", "x":4, "y":1.5}, + {"label":"5", "x":5, "y":1.5}, + {"label":"6", "x":6, "y":1.5}, + {"label":"7", "x":7, "y":1.5}, + {"label":"8", "x":8, "y":1.5}, + {"label":"9", "x":9, "y":1.5}, + {"label":"0", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"Page Up", "x":17.25, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"|", "x":13.5, "y":2.5, "w":1.5}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"\"", "x":11.75, "y":3.5}, + {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, + + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5} + ] + }, + "LAYOUT_tkl_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + + {"label":"\u00ac", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"\"", "x":2, "y":1.5}, + {"label":"\u00a3", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + + {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, + {"label":"A", "x":1.75, "y":3.5}, + {"label":"S", "x":2.75, "y":3.5}, + {"label":"D", "x":3.75, "y":3.5}, + {"label":"F", "x":4.75, "y":3.5}, + {"label":"G", "x":5.75, "y":3.5}, + {"label":"H", "x":6.75, "y":3.5}, + {"label":"J", "x":7.75, "y":3.5}, + {"label":"K", "x":8.75, "y":3.5}, + {"label":"L", "x":9.75, "y":3.5}, + {"label":":", "x":10.75, "y":3.5}, + {"label":"@", "x":11.75, "y":3.5}, + {"label":"~", "x":12.75, "y":3.5}, + + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"|", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + + {"label":"\u2191", "x":16.25, "y":4.5}, + + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"x":3.75, "y":5.5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + + {"label":"\u2190", "x":15.25, "y":5.5}, + {"label":"\u2193", "x":16.25, "y":5.5}, + {"label":"\u2192", "x":17.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/wasdat/keymaps/default/keymap.c b/keyboards/wasdat/keymaps/default/keymap.c new file mode 100644 index 000000000000..967947ada4d1 --- /dev/null +++ b/keyboards/wasdat/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp| |Ins|Hom|PgU| |Num| / | * | - | + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │  \  │ |Del|End|PgD| │ 7 │ 8 │ 9 │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │  Enter │               │ 4 │ 5 │ 6 │   │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐     ├───┼───┼───┼───┤ + * │ Shift  │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │    Shift │     │ ↑ │     │ 1 │ 2 │ 3 │   │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│GUI │Alt │                        │ Alt│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │   0   │ . │   │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + LAYOUT_fullsize_ansi( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + + KC_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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_P7, KC_P8, KC_P9, KC_PPLS, + 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_P4, KC_P5, KC_P6, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; diff --git a/keyboards/wasdat/keymaps/default/readme.md b/keyboards/wasdat/keymaps/default/readme.md new file mode 100644 index 000000000000..66cf593892c7 --- /dev/null +++ b/keyboards/wasdat/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default ANSI keymap for the Wasdat diff --git a/keyboards/wasdat/keymaps/default_iso/keymap.c b/keyboards/wasdat/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..00a45d746ac8 --- /dev/null +++ b/keyboards/wasdat/keymaps/default_iso/keymap.c @@ -0,0 +1,44 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│   │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp| |Ins|Hom|PgU| |Num| / | * | - | + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │     │ |Del|End|PgD| │ 7 │ 8 │ 9 │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │    │               │ 4 │ 5 │ 6 │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤     ┌───┐     ├───┼───┼───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │    Shift │     │ ↑ │     │ 1 │ 2 │ 3 │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│GUI │Alt │                        │AlGr│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │   0   │ . │   │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + LAYOUT_fullsize_iso( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ) +}; diff --git a/keyboards/wasdat/keymaps/default_iso/readme.md b/keyboards/wasdat/keymaps/default_iso/readme.md new file mode 100644 index 000000000000..e36d76420166 --- /dev/null +++ b/keyboards/wasdat/keymaps/default_iso/readme.md @@ -0,0 +1 @@ +# The default ISO keymap for the Wasdat diff --git a/keyboards/wasdat/matrix.c b/keyboards/wasdat/matrix.c new file mode 100644 index 000000000000..b481e5394d54 --- /dev/null +++ b/keyboards/wasdat/matrix.c @@ -0,0 +1,484 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +//static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +//Deprecated. +bool matrix_is_modified(void) +{ + if (debounce_active()) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< + * + * 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 . + */ +#include "wasdat.h" + +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); + led_init_ports(); +} + +void led_init_ports(void) { + setPinOutput(B0); + setPinOutput(B1); + setPinOutput(B2); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B0); + } else { + writePinHigh(B0); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinLow(B1); + } else { + writePinHigh(B1); + } + + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinLow(B2); + } else { + writePinHigh(B2); + } + + led_set_user(usb_led); +} diff --git a/keyboards/wasdat/wasdat.h b/keyboards/wasdat/wasdat.h new file mode 100644 index 000000000000..508ada485313 --- /dev/null +++ b/keyboards/wasdat/wasdat.h @@ -0,0 +1,104 @@ +/* Copyright 2019 Maarten Dekkers + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_fullsize_ansi( \ + K05, K44, K42, K32, K02, K21, K0A, K3E, K4E, K4D, K2D, K0D, K7D, K23, K53, K51, \ + K45, K25, K24, K22, K20, K40, K48, K28, K2A, K2E, K2F, K4F, K4A, K3D, K47, K4C, K46, K69, K67, K66, K76, \ + K35, K55, K54, K52, K50, K30, K38, K58, K5A, K5E, K5F, K3F, K3A, K1D, K49, K2C, K26, K59, K57, K56, K5C, \ + K34, K15, K14, K12, K10, K00, K08, K18, K1A, K1E, K1F, K0F, K6D, K39, K37, K36, \ + K3B, K65, K64, K62, K60, K70, K78, K68, K6A, K6E, K7F, K1B, K0C, K19, K17, K16, K1C, \ + K41, K31, K03, K09, K73, K11, K33, K61, K7C, K79, K77, K07, K06 \ +) \ +{ \ + { K00, XXX, K02, K03, XXX, K05, K06, K07, K08, K09, K0A, XXX, K0C, K0D, XXX, K0F }, \ + { K10, K11, K12, XXX, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, XXX, K28, XXX, K2A, XXX, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, K3F }, \ + { K40, K41, K42, XXX, K44, K45, K46, K47, K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, XXX, K5C, XXX, K5E, K5F }, \ + { K60, K61, K62, XXX, K64, K65, K66, K67, K68, K69, K6A, XXX, XXX, K6D, K6E, XXX }, \ + { K70, XXX, XXX, K73, XXX, XXX, K76, K77, K78, K79, XXX, XXX, K7C, K7D, XXX, K7F } \ +} + +#define LAYOUT_fullsize_iso( \ + K05, K44, K42, K32, K02, K21, K0A, K3E, K4E, K4D, K2D, K0D, K7D, K23, K53, K51, \ + K45, K25, K24, K22, K20, K40, K48, K28, K2A, K2E, K2F, K4F, K4A, K3D, K47, K4C, K46, K69, K67, K66, K76, \ + K35, K55, K54, K52, K50, K30, K38, K58, K5A, K5E, K5F, K3F, K3A, K49, K2C, K26, K59, K57, K56, K5C, \ + K34, K15, K14, K12, K10, K00, K08, K18, K1A, K1E, K1F, K0F, K1D, K6D, K39, K37, K36, \ + K3B, K04, K65, K64, K62, K60, K70, K78, K68, K6A, K6E, K7F, K1B, K0C, K19, K17, K16, K1C, \ + K41, K31, K03, K09, K73, K11, K33, K61, K7C, K79, K77, K07, K06 \ +) \ +{ \ + { K00, XXX, K02, K03, K04, K05, K06, K07, K08, K09, K0A, XXX, K0C, K0D, XXX, K0F }, \ + { K10, K11, K12, XXX, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, XXX, K28, XXX, K2A, XXX, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, K3F }, \ + { K40, K41, K42, XXX, K44, K45, K46, K47, K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, XXX, K5C, XXX, K5E, K5F }, \ + { K60, K61, K62, XXX, K64, K65, K66, K67, K68, K69, K6A, XXX, XXX, K6D, K6E, XXX }, \ + { K70, XXX, XXX, K73, XXX, XXX, K76, K77, K78, K79, XXX, XXX, K7C, K7D, XXX, K7F } \ +} + +#define LAYOUT_tkl_ansi( \ + K05, K44, K42, K32, K02, K21, K0A, K3E, K4E, K4D, K2D, K0D, K7D, K23, K53, K51, \ + K45, K25, K24, K22, K20, K40, K48, K28, K2A, K2E, K2F, K4F, K4A, K3D, K47, K4C, K46, \ + K35, K55, K54, K52, K50, K30, K38, K58, K5A, K5E, K5F, K3F, K3A, K1D, K49, K2C, K26, \ + K34, K15, K14, K12, K10, K00, K08, K18, K1A, K1E, K1F, K0F, K6D, \ + K3B, K65, K64, K62, K60, K70, K78, K68, K6A, K6E, K7F, K1B, K0C, \ + K41, K31, K03, K09, K73, K11, K33, K61, K7C, K79, K77 \ +) \ +{ \ + { K00, XXX, K02, K03, XXX, K05, XXX, XXX, K08, K09, K0A, XXX, K0C, K0D, XXX, K0F }, \ + { K10, K11, K12, XXX, K14, K15, XXX, XXX, K18, XXX, K1A, K1B, XXX, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, XXX, K28, XXX, K2A, XXX, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, XXX, XXX, K38, XXX, K3A, K3B, XXX, K3D, K3E, K3F }, \ + { K40, K41, K42, XXX, K44, K45, K46, K47, K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, XXX, XXX, K58, XXX, K5A, XXX, XXX, XXX, K5E, K5F }, \ + { K60, K61, K62, XXX, K64, K65, XXX, XXX, K68, XXX, K6A, XXX, XXX, K6D, K6E, XXX }, \ + { K70, XXX, XXX, K73, XXX, XXX, XXX, K77, K78, K79, XXX, XXX, K7C, K7D, XXX, K7F } \ +} + +#define LAYOUT_tkl_iso( \ + K05, K44, K42, K32, K02, K21, K0A, K3E, K4E, K4D, K2D, K0D, K7D, K23, K53, K51, \ + K45, K25, K24, K22, K20, K40, K48, K28, K2A, K2E, K2F, K4F, K4A, K3D, K47, K4C, K46, \ + K35, K55, K54, K52, K50, K30, K38, K58, K5A, K5E, K5F, K3F, K3A, K49, K2C, K26, \ + K34, K15, K14, K12, K10, K00, K08, K18, K1A, K1E, K1F, K0F, K1D, K6D, \ + K3B, K04, K65, K64, K62, K60, K70, K78, K68, K6A, K6E, K7F, K1B, K0C, \ + K41, K31, K03, K09, K73, K11, K33, K61, K7C, K79, K77 \ +) \ +{ \ + { K00, XXX, K02, K03, K04, K05, XXX, XXX, K08, K09, K0A, XXX, K0C, K0D, XXX, K0F }, \ + { K10, K11, K12, XXX, K14, K15, XXX, XXX, K18, XXX, K1A, K1B, XXX, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, XXX, K28, XXX, K2A, XXX, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, XXX, XXX, K38, XXX, K3A, K3B, XXX, K3D, K3E, K3F }, \ + { K40, K41, K42, XXX, K44, K45, K46, K47, K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, XXX, XXX, K58, XXX, K5A, XXX, XXX, XXX, K5E, K5F }, \ + { K60, K61, K62, XXX, K64, K65, XXX, XXX, K68, XXX, K6A, XXX, XXX, K6D, K6E, XXX }, \ + { K70, XXX, XXX, K73, XXX, XXX, XXX, K77, K78, K79, XXX, XXX, K7C, K7D, XXX, K7F } \ +} diff --git a/keyboards/westfoxtrot/aanzee/aanzee.h b/keyboards/westfoxtrot/aanzee/aanzee.h index b2a04a9d2ab4..aa1b9165606e 100644 --- a/keyboards/westfoxtrot/aanzee/aanzee.h +++ b/keyboards/westfoxtrot/aanzee/aanzee.h @@ -33,30 +33,30 @@ #define LAYOUT_ansi( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0F, K0D, K0E, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, K2D, K2E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ + K40, K41, K42, K46, K49, K4A, K4C, K4D, K4E \ ) \ { \ {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F}, \ {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, ___}, \ - {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, ___, K2C, K2D, K2E, ___}, \ + {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, ___, K2D, K2E, ___}, \ {K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, ___}, \ - {K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, K4B, K4C, K4D, K4E, ___} \ + {K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, ___, K4C, K4D, K4E, ___} \ } #define LAYOUT_iso( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D, K1E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ + K40, K41, K42, K46, K49, K4A, K4C, K4D, K4E \ ) \ { \ {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, ___}, \ - {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, ___, K1D, K1E, ___}, \ + {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, ___, K1E, ___}, \ {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, ___}, \ {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, ___}, \ - {K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, K4B, K4C, K4D, K4E, ___} \ + {K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, ___, K4C, K4D, K4E, ___} \ } void matrix_init_user(void); diff --git a/keyboards/westfoxtrot/aanzee/info.json b/keyboards/westfoxtrot/aanzee/info.json index d6734d620b42..96d0c1c36c32 100644 --- a/keyboards/westfoxtrot/aanzee/info.json +++ b/keyboards/westfoxtrot/aanzee/info.json @@ -12,7 +12,6 @@ "LAYOUT_iso": { "key_count": 68, "layout": [{"label":"Esc", "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":"Home", "x":15, "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}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"label":"PgUp", "x":15, "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}, {"x":12.75, "y":2}, {"label":"PgDn", "x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"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":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"Fn", "x":15, "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, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] - }, + } } } -} diff --git a/keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c b/keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c index 4b7a9f208090..e2b75bc860b8 100644 --- a/keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c +++ b/keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c @@ -25,14 +25,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_END, \ 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_PGUP, \ 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_PGDN, \ - KC_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_F1),KC_RCTL,KC_LEFT,KC_DOWN, KC_RGHT), + KC_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_F1), KC_LEFT,KC_DOWN,KC_RGHT), [_F1] = LAYOUT_ansi( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,_______,_______, \ _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______,_______,_______, _______, \ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______,_______,_______, _______, _______,_______,_______,_______,_______, _______) + _______,_______,_______, _______, _______,_______,_______,_______, _______) }; void matrix_init_user(void) { diff --git a/keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c index 79628eb9012a..4ea02795805d 100644 --- a/keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c +++ b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c @@ -25,14 +25,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_END, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT,KC_NUHS, KC_ENT, KC_PGUP, \ KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH,KC_RSFT, KC_UP, KC_PGDN, \ - KC_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_F1),KC_RCTL,KC_LEFT,KC_DOWN, KC_RGHT), + KC_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_F1), KC_LEFT,KC_DOWN, KC_RGHT), [_F1] = LAYOUT_iso( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,_______, \ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ - _______,_______,_______, _______, _______,_______,_______,_______,_______,_______) + _______,_______,_______, _______, _______,_______,_______,_______,_______) }; void matrix_init_user(void) { diff --git a/keyboards/westfoxtrot/aanzee/keymaps/via/keymap.c b/keyboards/westfoxtrot/aanzee/keymaps/via/keymap.c index 4b7a9f208090..1ac5c77fff17 100644 --- a/keyboards/westfoxtrot/aanzee/keymaps/via/keymap.c +++ b/keyboards/westfoxtrot/aanzee/keymaps/via/keymap.c @@ -25,14 +25,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_END, \ 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_PGUP, \ 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_PGDN, \ - KC_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_F1),KC_RCTL,KC_LEFT,KC_DOWN, KC_RGHT), + KC_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_F1) ,KC_LEFT,KC_DOWN, KC_RGHT), [_F1] = LAYOUT_ansi( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,_______,_______, \ _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______,_______,_______, _______, \ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______,_______,_______, _______, _______,_______,_______,_______,_______, _______) + _______,_______,_______, _______, _______,_______ ,_______,_______, _______) }; void matrix_init_user(void) { diff --git a/keyboards/westfoxtrot/cyclops/config.h b/keyboards/westfoxtrot/cyclops/config.h index 65107c30a14c..b9a8fb28b140 100644 --- a/keyboards/westfoxtrot/cyclops/config.h +++ b/keyboards/westfoxtrot/cyclops/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { D3, D2, D5, D6, B6, B1, B2, B3, C6, C7, F7, F6, F4, F5, F1 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/westfoxtrot/cyclops/cyclops.h b/keyboards/westfoxtrot/cyclops/cyclops.h index f32d2fd44152..d82c56744cdc 100644 --- a/keyboards/westfoxtrot/cyclops/cyclops.h +++ b/keyboards/westfoxtrot/cyclops/cyclops.h @@ -29,9 +29,9 @@ #define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K4D, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ + K40, K41, K42, K46, K4A, K4B, K4C, K4E, K2E \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ diff --git a/keyboards/westfoxtrot/cypher/config.h b/keyboards/westfoxtrot/cypher/config.h new file mode 100644 index 000000000000..48ff816f9bac --- /dev/null +++ b/keyboards/westfoxtrot/cypher/config.h @@ -0,0 +1,66 @@ +/* +Copyright 2019 westfoxtrot + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x21FF +#define PRODUCT_ID 0xAA97 +#define DEVICE_VER 0x0001 +#define MANUFACTURER westfoxtrot +#define PRODUCT cypher +#define DESCRIPTION Cypher + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 10 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, F6, B6, B7, C6, C7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7, E6, F0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 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 diff --git a/keyboards/westfoxtrot/cypher/cypher.c b/keyboards/westfoxtrot/cypher/cypher.c new file mode 100644 index 000000000000..d2407525ea5e --- /dev/null +++ b/keyboards/westfoxtrot/cypher/cypher.c @@ -0,0 +1,56 @@ +/* Copyright 2019 westfoxtrot + * + * 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 . + */ +#include "cypher.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(F4); + } else { + writePinLow(F4); + } + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(F1); + } else { + writePinLow(F1); + } + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(F5); + } else { + writePinLow(F5); + } + led_set_user(usb_led); +} diff --git a/keyboards/westfoxtrot/cypher/cypher.h b/keyboards/westfoxtrot/cypher/cypher.h new file mode 100644 index 000000000000..fdff12e9b18d --- /dev/null +++ b/keyboards/westfoxtrot/cypher/cypher.h @@ -0,0 +1,68 @@ +/* Copyright 2019 westfoxtrot + * + * 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 . + */ +#pragma once + +#define ___ KC_NO + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, K51, K52, K53, K54, K55, K56, K57, K58,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K60, K61, K62, K63, K65, K66, K67, K68, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K70, K71, K73, K75, K76, K77, K78, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K80, K81, K82, K83, K85, K86, K87, K88, \ + K40, K41, K42, K46, K49, K90, K91, K92, K93, K95, K96, K97, K98 \ +) \ +{ \ + { 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, ___, K32, K33, K34, K35, K36, K37, K38, K39 }, \ + { K40, K41, K42, ___, ___, ___, K46, ___, ___, K49 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, K63, ___, K65, K66, K67, K68 }, \ + { K70, K71, ___, K73, ___, K75, K76, K77, K78 }, \ + { K80, K81, K82, K83, ___, K85, K86, K87, K88 }, \ + { K90, K91, K92, K93, ___, K95, K96, K97, K98 } \ +} + +#define LAYOUT_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K50, K51, K52, K53, K54, K55, K56, K57, K58,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K60, K61, K62, K65, K66, K67, K68, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K70, K71, K72, K73, K75, K76, K77, K78, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K80, K81, K82, K83, K85, K86, K87, K88, \ + K40, K41, K42, K46, K49, K90, K91, K92, K93, K95, K96, K97, K98 \ +) \ +{ \ + { 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, ___, ___, ___, K46, ___, ___, K49 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ + { K60, K61, K62, ___, ___, K65, K66, K67, K68 }, \ + { K70, K71, K72, K73, ___, K75, K76, K77, K78 }, \ + { K80, K81, K82, K83, ___, K85, K86, K87, K88 }, \ + { K90, K91, K92, K93, ___, K95, K96, K97, K98 } \ +} diff --git a/keyboards/westfoxtrot/cypher/info.json b/keyboards/westfoxtrot/cypher/info.json new file mode 100644 index 000000000000..ddf4e9d5a81c --- /dev/null +++ b/keyboards/westfoxtrot/cypher/info.json @@ -0,0 +1,207 @@ +{ + "keyboard_name": "Cypher", + "width": 19.5, + "height": 5, + "layouts": { + "LAYOUT_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}, + {"label":"~","x":14,"y":0}, + + {"label":"Num Lock","x":15.5,"y":0}, + {"label":"/","x":16.5,"y":0}, + {"label":"*","x":17.5,"y":0}, + {"label":"-","x":18.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":"7","x":15.5,"y":1}, + {"label":"8","x":16.5,"y":1}, + {"label":"9","x":17.5,"y":1}, + {"label":"+","x":18.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":"4","x":15.5,"y":2}, + {"label":"5","x":16.5,"y":2}, + {"label":"6","x":17.5,"y":2}, + {"label":"=","x":18.5,"y":2}, + + {"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":1.75}, + + {"label":"Up","x":14.25,"y":3.25}, + + {"label":"1","x":15.5,"y":3}, + {"label":"2","x":16.5,"y":3}, + {"label":"3","x":17.5,"y":3}, + {"label":"Enter","x":18.5,"y":3}, + + {"label":"Ctrl","x":0,"y":4,"w":1.25}, + {"label":"Win","x":1.25,"y":4}, + {"label":"Alt","x":2.25,"y":4,"w":1.25}, + {"label":"Space","x":3.5,"y":4,"w":6}, + {"label":"Alt","x":9.5,"y":4,"w":1.25}, + {"label":"Win","x":10.75,"y":4}, + {"label":"Ctrl","x":11.75,"y":4,"w":1.25}, + + {"label":"Left","x":13.25,"y":4.25}, + {"label":"Down","x":14.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":"Backspace","x":18.5,"y":4} + ] + }, + + "LAYOUT_iso": { + "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}, + {"label":"~","x":14,"y":0}, + + {"label":"Num Lock","x":15.5,"y":0}, + {"label":"/","x":16.5,"y":0}, + {"label":"*","x":17.5,"y":0}, + {"label":"-","x":18.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":"7","x":15.5,"y":1}, + {"label":"8","x":16.5,"y":1}, + {"label":"9","x":17.5,"y":1}, + {"label":"+","x":18.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":"~","x":12.75,"y":2}, + {"label":"Enter","x":13.75,"y":1,"w":1.25,"h":2}, + + {"label":"4","x":15.5,"y":2}, + {"label":"5","x":16.5,"y":2}, + {"label":"6","x":17.5,"y":2}, + {"label":"=","x":18.5,"y":2}, + + {"label":"Shift","x":0,"y":3,"w":1.25}, + {"label":"|","x":1.25,"y":3}, + {"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":1.75}, + + {"label":"Up","x":14.25,"y":3.25}, + + {"label":"1","x":15.5,"y":3}, + {"label":"2","x":16.5,"y":3}, + {"label":"3","x":17.5,"y":3}, + {"label":"Enter","x":18.5,"y":3}, + + {"label":"Ctrl","x":0,"y":4,"w":1.25}, + {"label":"Win","x":1.25,"y":4}, + {"label":"Alt","x":2.25,"y":4,"w":1.25}, + {"label":"Space","x":3.5,"y":4,"w":6}, + {"label":"Alt","x":9.5,"y":4,"w":1.25}, + {"label":"Win","x":10.75,"y":4}, + {"label":"Ctrl","x":11.75,"y":4,"w":1.25}, + + {"label":"Left","x":13.25,"y":4.25}, + {"label":"Down","x":14.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":"Backspace","x":18.5,"y":4} + ] + } + } +} diff --git a/keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h b/keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h new file mode 100644 index 000000000000..41d70907ebd8 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/default-iso/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 westfoxtrot + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c b/keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c new file mode 100644 index 000000000000..2a08ae853b57 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/default-iso/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 westfoxtrot + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _MA 0 +#define _F1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_iso( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\ + 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_P7, KC_P8, KC_P9, KC_PPLS,\ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PEQL,\ + 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_P1, KC_P2, KC_P3, KC_PENT,\ + KC_LCTRL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_F1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT, KC_BSPC), + +[_F1] = LAYOUT_iso( /* Function Layer */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______,\ + _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______, _______, _______, _______, _______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______, _______, _______, _______,\ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______,_______, _______, _______,_______,_______, _______,_______,_______, _______, _______, _______), + +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md b/keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md new file mode 100644 index 000000000000..81a4a677fd70 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/default-iso/readme.md @@ -0,0 +1 @@ +# The default iso keymap for cypher diff --git a/keyboards/westfoxtrot/cypher/keymaps/default/config.h b/keyboards/westfoxtrot/cypher/keymaps/default/config.h new file mode 100644 index 000000000000..41d70907ebd8 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 westfoxtrot + * + * 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 . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/westfoxtrot/cypher/keymaps/default/keymap.c b/keyboards/westfoxtrot/cypher/keymaps/default/keymap.c new file mode 100644 index 000000000000..1906f939694e --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2019 westfoxtrot + * + * 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 . + */ +#include QMK_KEYBOARD_H + +#define _MA 0 +#define _F1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = LAYOUT_ansi( /* Base */ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\ + 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_P7, KC_P8, KC_P9, KC_PPLS,\ + 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_P4, KC_P5, KC_P6, KC_PEQL,\ + 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_P1, KC_P2, KC_P3, KC_PENT,\ + KC_LCTRL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(_F1), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT, KC_BSPC), + +[_F1] = LAYOUT_ansi( /* Function Layer */ + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______,\ + _______, BL_TOGG,BL_STEP,BL_ON,BL_OFF,BL_INC,BL_DEC,BL_BRTG,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______,_______, _______, _______,_______,_______, _______,_______,_______, _______, _______, _______), + +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/westfoxtrot/cypher/keymaps/default/readme.md b/keyboards/westfoxtrot/cypher/keymaps/default/readme.md new file mode 100644 index 000000000000..05c370026669 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for cypher \ No newline at end of file diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/config.h b/keyboards/westfoxtrot/cypher/keymaps/kwer/config.h new file mode 100644 index 000000000000..947e340c3239 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/kwer/config.h @@ -0,0 +1,33 @@ +/* Copyright 2018 westfoxtrot + * + * 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 . + */ + +#pragma once + +#define RGB_DI_PIN F7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 15 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 15 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 5 + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #endif + +// place overrides here diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c b/keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c new file mode 100644 index 000000000000..2d7bf2a5e218 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/kwer/keymap.c @@ -0,0 +1,79 @@ +/* Copyright 2018 westfoxtrot + * Copyright 2019 kwerdenker + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "keymap_german.h" + +#define _DL 0 +#define _FN 1 +#define _LE 2 + +#define SPECIAL LT(_FN, DE_CIRC) //capslock layer switch + stargate key on tap + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DL] = LAYOUT_iso ( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, KC_BSPC, _______, KC_NLCK, KC_PSCR,KC_PSLS,KC_PAST, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, KC_P7, KC_P8, KC_P9, KC_PMNS, + SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, _______, KC_LALT, KC_SPC, _______, KC_RALT, TG(_LE), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_NO + ), + + [_FN] = LAYOUT_iso ( + DE_RING, 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_LE] = LAYOUT_iso ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_RMOD,_______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + + + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + // Insert custom handling for CAPS_LOCK, NUM_LOCK, SCROLL_LOCK here + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(F4); + writePinHigh(F1); + writePinHigh(F5); + } else { + writePinLow(F4); + writePinLow(F1); + writePinLow(F5); + } +} diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md b/keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md new file mode 100644 index 000000000000..c1a132e713b4 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/kwer/readme.md @@ -0,0 +1,39 @@ +# The kwer keymap and RGB MOD for cypher + +![](https://i.imgur.com/b7snIju.jpg) + +## Hardware +To make this mod, all you need a piece of WS2812b RGB strip (I used one with 144 LEDs per meter, so it's rather dense), some wiring (I used 0.6mm solid core wire) and steady hands for soldering to the MCU pin. + +**Installed mod** +![](https://i.imgur.com/IKcFd0k.jpg) + +As you can see, the wiring is relatively simple. VCC and GND can be easily accessed through the ISP header on the right side of the spacebar while the DATA line can be routed relatively easy through one of the stabilizer holes. While it isn't important where exactly you solder the VCC/GND wires to their respective lines on the strip, you have to keep the direction of the data line in mind. Most strip have arrows printed on them to show you in which direction the data is shifted through the LEDs and your should always solder your DATA line on the _from_ side, as seen in the above picture. + +**Close-up for the VCC/GND connections** +![](https://i.imgur.com/K0OibwW.jpg) + +Since there is no pinout availble for the pin we're gonna use to control the strip, the line has to be soldered to the MCU directly. While this is not a very complex process, you should have a fine tipped soldering irong and a steady hand. Make sure you do not bridge any of the neighboring pins when soldering the wire to the MCU pin. As shown in the picture below, you want to connect the DATA line to the third pin from the right on the top of the controller chip. + +**Close-up for the DATA connection** +![](https://i.imgur.com/zkD3RjF.jpg) + +## Software +To enable your RGB strip in QMK, you have to add change/add the following lines + +**rules.​mk** +``` +[...] +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +[...] +``` + +**config.h** +``` +[...] +#define RGB_DI_PIN F7 +#define RGBLED_NUM 15 // Change this number to the amount of LEDs on the strip you soldered +#define RGBLIGHT_ANIMATIONS +[...] +``` +To control the RGB color, animation, etc. you need to add the appropriate keycodes to your keymap. Either see [my keymap](./keymap.c) or the [official QMK documentation](https://docs.qmk.fm/#/feature_rgblight?id=keycodes) for references. diff --git a/keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk b/keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk new file mode 100644 index 000000000000..df87c59a233a --- /dev/null +++ b/keyboards/westfoxtrot/cypher/keymaps/kwer/rules.mk @@ -0,0 +1,2 @@ +# Build options override +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/westfoxtrot/cypher/readme.md b/keyboards/westfoxtrot/cypher/readme.md new file mode 100644 index 000000000000..6db417fae887 --- /dev/null +++ b/keyboards/westfoxtrot/cypher/readme.md @@ -0,0 +1,15 @@ +# cypher + +![cypher](https://github.com/westfoxtrot/Cypher_PCB) + +PCB for the cypher keyboard + +Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) +Hardware Supported: Cypher PCB +Hardware Availability: with group buy + Files released here (https://github.com/westfoxtrot/Cypher_PCB) + +Make example for this keyboard (after setting up your build environment): + + make westfoxtrot/cypher: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). diff --git a/keyboards/westfoxtrot/cypher/rules.mk b/keyboards/westfoxtrot/cypher/rules.mk new file mode 100644 index 000000000000..ab03dc9f9dee --- /dev/null +++ b/keyboards/westfoxtrot/cypher/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/whitefox/keymaps/billypython/config.h b/keyboards/whitefox/keymaps/billypython/config.h index 275f8effba79..4b511eb8484f 100644 --- a/keyboards/whitefox/keymaps/billypython/config.h +++ b/keyboards/whitefox/keymaps/billypython/config.h @@ -1,17 +1,3 @@ #pragma once -#define FORCE_NKRO - -#define MAGIC_KEY_LAYER0_ALT1 BSLS -#define MAGIC_KEY_BOOTLOADER ESC - -#define MOUSEKEY_DELAY 50 -#define MOUSEKEY_INTERVAL 15 -#define MOUSEKEY_MAX_SPEED 4 -#define MOUSEKEY_TIME_TO_MAX 50 -#define MOUSEKEY_WHEEL_MAX_SPEED 1 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 - -#define PERMISSIVE_HOLD -#define TAPPING_TERM 200 -#define TAPPING_TOGGLE 2 +#define LAYER_FN diff --git a/keyboards/whitefox/keymaps/billypython/keymap.c b/keyboards/whitefox/keymaps/billypython/keymap.c index dfc7d6a967f0..79758de80732 100644 --- a/keyboards/whitefox/keymaps/billypython/keymap.c +++ b/keyboards/whitefox/keymaps/billypython/keymap.c @@ -1,95 +1,5 @@ #include QMK_KEYBOARD_H - -#define TOP LCTL(KC_HOME) -#define BOTTOM LCTL(KC_END) - -#define FN MO(L_FN) -#define FN_CAPS LT(L_FN, KC_CAPS) -#define FN_FNLK TT(L_FN) - -#define RSF_RCT TD(TD_RSF_RCT) - -#define COMMA UC(0x002C) -#define L_PAREN UC(0x0028) -#define R_PAREN UC(0x0029) -#define EQUALS UC(0x003D) -#define TIMES UC(0x00D7) -#define DIVIDE UC(0x00F7) -#define MINUS UC(0x2212) - -void eeconfig_init_user(void) { - set_unicode_input_mode(UC_LNX); -} - -enum layers { - L_BASE, - L_FN, - L_NUMPAD, -}; - -enum custom_keycodes { - CLEAR = SAFE_RANGE, - NUMPAD, -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case CLEAR: - if (record->event.pressed) { - SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); - } - return false; - - case NUMPAD: - if (record->event.pressed) { - layer_invert(L_NUMPAD); - bool num_lock = host_keyboard_leds() & 1<count == 1 || state->count == 3) { - register_code(mods->kc1); - } else if (state->count == 2) { - unregister_code(mods->kc1); - register_code(mods->kc2); - } - // Prevent tap dance from sending kc1 and kc2 as weak mods - state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2)); -} - -void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; - if (state->count == 1 || state->count > 2) { - unregister_code(mods->kc1); - } - if (state->count >= 2) { - unregister_code(mods->kc2); - } -} - -enum tap_dance { - TD_RSF_RCT, -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL), -}; +#include "billypython.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base layer @@ -106,11 +16,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_BASE] = LAYOUT_truefox( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_PSCR, \ - 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_DEL, \ - FN_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_PGUP, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,RSF_RCT, KC_UP, KC_PGDN, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,FN_FNLK, KC_LEFT,KC_DOWN,KC_RGHT \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PSCR, \ + 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_DEL, \ + FN_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_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSF_RCT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT \ ), /* Function layer @@ -127,31 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_FN] = LAYOUT_truefox( \ - _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK,KC_PAUS, \ - KC_BTN4,KC_BTN2,KC_MS_U,KC_BTN1,KC_BTN3,KC_BTN5,_______,KC_PGUP,KC_UP, KC_PGDN,KC_MPLY,KC_MPRV,KC_MNXT,CLEAR, KC_INS, \ - _______,KC_MS_L,KC_MS_D,KC_MS_R,KC_WH_U,_______,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_END, _______, _______, TOP, \ - _______, KC_ACL0,KC_ACL2,KC_WH_L,KC_WH_R,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,KC_APP, KC_PGUP,BOTTOM, \ - _______,_______,_______, KC_WH_D, _______,_______, KC_HOME,KC_PGDN,KC_END \ - ), - - /* Numpad layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │Num│ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │Num│ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ - * │ │ │ │ │ │ │ │P4 │P5 │P6 │P+ │ ( │ ) │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ - * │ │ │ │ │ │ │ │P1 │P2 │P3 │P* │ × │ PEnter │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ │ │ │ │ │ │P0 │P0 │ , │P. │P/ │ ÷ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ - */ - [L_NUMPAD] = LAYOUT_truefox( \ - NUMPAD, _______,_______,_______,_______,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,MINUS, EQUALS, NUMPAD, _______,_______, \ - _______,_______,_______,_______,_______,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,L_PAREN,R_PAREN,_______, _______, \ - _______,_______,_______,_______,_______,_______,_______,KC_P1, KC_P2, KC_P3, KC_PAST,TIMES, KC_PENT, _______, \ - _______, _______,_______,_______,_______,_______,KC_P0, KC_P0, COMMA, KC_PDOT,KC_PSLS,DIVIDE, _______,_______, \ - _______,_______,_______, _______, _______,_______, _______,_______,_______ \ + _______, 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_NLCK, KC_SLCK, KC_PAUS, \ + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, KC_PGUP, KC_UP, KC_PGDN, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \ + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, _______, TOP, \ + _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, \ + _______, _______, _______, KC_WH_D, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), }; diff --git a/keyboards/whitefox/keymaps/billypython/rules.mk b/keyboards/whitefox/keymaps/billypython/rules.mk index 8fbc1f3af489..133c7af542f6 100644 --- a/keyboards/whitefox/keymaps/billypython/rules.mk +++ b/keyboards/whitefox/keymaps/billypython/rules.mk @@ -1,15 +1,6 @@ -AUDIO_ENABLE = no BACKLIGHT_ENABLE = no -BLUETOOTH_ENABLE = no BOOTMAGIC_ENABLE = no COMMAND_ENABLE = yes CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MIDI_ENABLE = no -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -RGBLIGHT_ENABLE = no -SLEEP_LED_ENABLE = no TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes VISUALIZER_ENABLE = no diff --git a/keyboards/whitefox/keymaps/default/keymap.c b/keyboards/whitefox/keymaps/default/keymap.c index ad66ec103100..61cc4eca0f34 100644 --- a/keyboards/whitefox/keymaps/default/keymap.c +++ b/keyboards/whitefox/keymaps/default/keymap.c @@ -35,7 +35,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_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_NUHS,KC_ENT, KC_PGUP,\ KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_FN0, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(1), KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ ), [1] = LAYOUT( \ KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,KC_TRNS,KC_MUTE,\ @@ -45,7 +45,3 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \ ), }; - -const uint16_t fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), -}; diff --git a/keyboards/whitefox/keymaps/kim-kim/keymap.c b/keyboards/whitefox/keymaps/kim-kim/keymap.c index 459ec6437133..1e6149899fbd 100644 --- a/keyboards/whitefox/keymaps/kim-kim/keymap.c +++ b/keyboards/whitefox/keymaps/kim-kim/keymap.c @@ -20,9 +20,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c index e37097361a2e..c8c8c790c77b 100644 --- a/keyboards/whitefox/keymaps/konstantin/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -2,66 +2,66 @@ #include "konstantin.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │PSc│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ - * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │Del│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ - * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RCtRSf│ ↑ │PgD│ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ - * │LCtl│LGui│LAlt│ Space │RAlG│FnLk│ │ ← │ ↓ │ → │ - * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ - */ - [L_BASE] = LAYOUT_truefox( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PSCR, \ - 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_DEL, \ - FN_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_PGUP, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCT_RSF, KC_UP, KC_PGDN, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT \ - ), + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │PSc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │Del│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RCtRSf│ ↑ │PgD│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │RAlG│FnLk│ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [L_BASE] = LAYOUT_truefox( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_PSCR, + 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_DEL, + FN_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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCT_RSF, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT + ), - /* Function layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Num│Scr│Pau│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ - * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│Ins│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ - * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │Top│ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ │MA0│MA2│MW←│MW→│ │ │ │VoD│VoU│Mut│ App │PgU│Btm│ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ - * │ │Dstp│Dst←│ MW↓ │Dst→│ │ │Hom│PgD│End│ - * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ - */ - [L_FN] = LAYOUT_truefox( \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK, KC_PAUS, \ - KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \ - _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP, \ - _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, \ - _______, DESKTOP, DSKTP_L, KC_WH_D, DSKTP_R, _______, KC_HOME, KC_PGDN, KC_END \ - ), + /* Function layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│Num│SLk│Pau│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │UCM│ │Stp│Ply│Prv│Nxt│Clear│Ins│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │M← │M↓ │M→ │MW↑│ │ │ │ │ │ │ │ │Top│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│ App │PgU│Btm│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │DtPR│DtNA│ MW↓ │ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [L_FN] = LAYOUT_truefox( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK, KC_PAUS, + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, UC_MOD, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, TOP, + _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, + _______, DST_P_R, DST_N_A, KC_WH_D, _______, _______, KC_HOME, KC_PGDN, KC_END + ), - /* Numpad layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │ │ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │Num│ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ - * │ │ │ │ │ │ │ │P4 │P5 │P6 │P+ │ ( │ ) │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ - * │ │ │ │ │ │ │ │P1 │P2 │P3 │P* │ × │ PEnter │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ │ │ │ │ │ │P0 │P0 │ , │P. │P/ │ ÷ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ - */ - [L_NUMPAD] = LAYOUT_truefox( \ - _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, MINUS, EQUALS, NUMPAD, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, L_PAREN, R_PAREN, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PAST, TIMES, KC_PENT, _______, \ - _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, COMMA, KC_PDOT, KC_PSLS, DIVIDE, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), + /* Numpad layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │Num│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ │ │ │ │ │ │ │P4 │P5 │P6 │P+ │ ( │ ) │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │P1 │P2 │P3 │P* │ × │ PEnter │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │P0 │P0 │ , │P. │P/ │ ÷ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + [L_NUMPAD] = LAYOUT_truefox( + _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, MINUS, EQUALS, NUMPAD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, L_PAREN, R_PAREN, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PAST, TIMES, KC_PENT, _______, + _______, _______, _______, _______, _______, _______, KC_P0, KC_P0, COMMA, KC_PDOT, KC_PSLS, DIVIDE, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index 1302f14ca84e..625ef346c8d5 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -1,2 +1,11 @@ +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +TAP_DANCE_ENABLE = yes +UNICODEMAP_ENABLE = yes + BACKLIGHT_ENABLE = no VISUALIZER_ENABLE = no diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index 9f222bf4f300..d9aa911c54e5 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -55,6 +55,7 @@ ARMV = 7 OPT_DEFS = DFU_ARGS = -d 1c11:b007 +DFU_SUFFIX_ARGS = -p b007 -v 1c11 # Build Options # comment out to disable the options. diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index 0ca896d5ec36..405685093e45 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/wilba_tech/wt60_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..566736f5e3bf --- /dev/null +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +// Default layout for WT60-A +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_60_ansi( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + +// Fn1 Layer +[1] = LAYOUT_60_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL , + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 Layer +[3] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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), + +}; diff --git a/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..76a07d7a44ac --- /dev/null +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_a/readme.md b/keyboards/wilba_tech/wt60_a/readme.md index d7a73165d4a4..bf9da9ada140 100644 --- a/keyboards/wilba_tech/wt60_a/readme.md +++ b/keyboards/wilba_tech/wt60_a/readme.md @@ -1,6 +1,6 @@ # WILBA.TECH WT60-A -![WILBA.TECH WT60-A](https://wilba.tech) +![WILBA.TECH WT60-A](https://cdn.shopify.com/s/files/1/0015/5084/3975/products/no.160_PCB_1_of_1_2d7414ed-7cc5-46a5-b245-6fb7a197232d_720x.jpg?v=1546475122) WT60-A is a keyboard PCB supporting 60% layout. [More info at wilba.tech](https://wilba.tech/) diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index 76a07d7a44ac..e41f2186b3a3 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/rules.mk @@ -66,6 +66,3 @@ 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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index 59c1d04a1bad..a9da35eaa599 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/wilba_tech/wt65_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..c5ae81168097 --- /dev/null +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, 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_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + 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 Layer + [3] = LAYOUT_all( + 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), +}; + diff --git a/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..76a07d7a44ac --- /dev/null +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_a/readme.md b/keyboards/wilba_tech/wt65_a/readme.md index 1551b55b57a4..9e0c630c0e06 100644 --- a/keyboards/wilba_tech/wt65_a/readme.md +++ b/keyboards/wilba_tech/wt65_a/readme.md @@ -1,8 +1,8 @@ # WILBA.TECH WT65-A -![WILBA.TECH WT65-A](https://wilba.tech) +![WILBA.TECH WT65-A](https://cdn.shopify.com/s/files/1/0015/5084/3975/products/no.165_PCB_1_of_1_a85e9af1-174f-497a-aadb-bb53ce74ef8c_720x.jpg?v=1546475185) -WT65-A is a keyboard PCB supporting 65% layout with 0.25U blocker. [More info at wilba.tech](https://wilba.tech/) +WT65-A is a keyboard PCB supporting 65% layout with 0.5U blocker. [More info at wilba.tech](https://wilba.tech/) Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) Hardware Supported: WILBA.TECH WT65-A diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index 76a07d7a44ac..e41f2186b3a3 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/rules.mk @@ -66,6 +66,3 @@ 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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt69_a/config.h b/keyboards/wilba_tech/wt69_a/config.h new file mode 100644 index 000000000000..69425e8e4cb1 --- /dev/null +++ b/keyboards/wilba_tech/wt69_a/config.h @@ -0,0 +1,203 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6582 // wilba.tech +#define PRODUCT_ID 0x069A // 69-A +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT69-A +#define DESCRIPTION wilba.tech WT69-A + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 17 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, E6, F4, F6, F7 } +#define MATRIX_COL_PINS { B7, B0, F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* 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 + +// Does not use WT_MONO_BACKLIGHT +//#define WT_MONO_BACKLIGHT + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*5*17*2)) = (35+680) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 715 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 309 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt69_a/info.json b/keyboards/wilba_tech/wt69_a/info.json new file mode 100644 index 000000000000..df7af63c2946 --- /dev/null +++ b/keyboards/wilba_tech/wt69_a/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "wilba.tech WT69-A", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "bootloader": "atmel-dfu", + "width": 18.25, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "x":2.25, "y":0}, {"label":"!", "x":3.25, "y":0}, {"label":"@", "x":4.25, "y":0}, {"label":"#", "x":5.25, "y":0}, {"label":"$", "x":6.25, "y":0}, {"label":"%", "x":7.25, "y":0}, {"label":"^", "x":8.25, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"BkSp", "x":15.25, "y":0}, {"label":"BkSp", "x":16.25, "y":0}, {"label":"Home", "x":17.25, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2.25, "y":1, "w":1.5}, {"label":"Q", "x":3.75, "y":1}, {"label":"W", "x":4.75, "y":1}, {"label":"E", "x":5.75, "y":1}, {"label":"R", "x":6.75, "y":1}, {"label":"T", "x":7.75, "y":1}, {"label":"Y", "x":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"{", "x":13.75, "y":1}, {"label":"}", "x":14.75, "y":1}, {"label":"|", "x":15.75, "y":1, "w":1.5}, {"label":"PgUp", "x":17.25, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, {"label":"A", "x":4, "y":2}, {"label":"S", "x":5, "y":2}, {"label":"D", "x":6, "y":2}, {"label":"F", "x":7, "y":2}, {"label":"G", "x":8, "y":2}, {"label":"H", "x":9, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"PgDn", "x":17.25, "y":2}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2.25, "y":3, "w":2.25}, {"label":"Z", "x":4.5, "y":3}, {"label":"X", "x":5.5, "y":3}, {"label":"C", "x":6.5, "y":3}, {"label":"V", "x":7.5, "y":3}, {"label":"B", "x":8.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"\u2191", "x":16.25, "y":3}, {"label":"End", "x":17.25, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Control", "x":2.25, "y":4, "w":1.5}, {"label":"Win", "x":3.75, "y":4}, {"label":"Alt", "x":4.75, "y":4, "w":1.5}, {"x":6.25, "y":4, "w":7}, {"label":"Fn", "x":13.25, "y":4, "w":1.5}, {"label":"\u2190", "x":15.25, "y":4}, {"label":"\u2193", "x":16.25, "y":4}, {"label":"\u2192", "x":17.25, "y":4}] + } + } +} diff --git a/keyboards/wilba_tech/wt69_a/keymaps/default/keymap.c b/keyboards/wilba_tech/wt69_a/keymaps/default/keymap.c new file mode 100644 index 000000000000..c9fc5dd0716b --- /dev/null +++ b/keyboards/wilba_tech/wt69_a/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME, + KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_F7, KC_F8, 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_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, 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), + + // Fn2 Layer + [2] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; \ No newline at end of file diff --git a/keyboards/wilba_tech/wt69_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt69_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..c9fc5dd0716b --- /dev/null +++ b/keyboards/wilba_tech/wt69_a/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME, + KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_F7, KC_F8, 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_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, 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), + + // Fn2 Layer + [2] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; \ No newline at end of file diff --git a/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..f072c67198c2 --- /dev/null +++ b/keyboards/wilba_tech/wt69_a/keymaps/via/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt69_a/readme.md b/keyboards/wilba_tech/wt69_a/readme.md new file mode 100644 index 000000000000..03ab90d0984b --- /dev/null +++ b/keyboards/wilba_tech/wt69_a/readme.md @@ -0,0 +1,15 @@ +# WILBA.TECH WT69-A + +![WILBA.TECH WT69-A](https://images.squarespace-cdn.com/content/5b267e429772ae4372e3b65f/1556352502542-AKHBF9R6CP5HVHOZYJHM/i69_g.png?content-type=image%2Fpng) + +WT69-A is a keyboard PCB supporting 65% layout with 0.5U blocker and left side function keys. [More info at wilba.tech](https://wilba.tech/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: WILBA.TECH WT69-A +Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt69_a: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). diff --git a/keyboards/wilba_tech/wt69_a/rules.mk b/keyboards/wilba_tech/wt69_a/rules.mk new file mode 100644 index 000000000000..f1c632289cca --- /dev/null +++ b/keyboards/wilba_tech/wt69_a/rules.mk @@ -0,0 +1,65 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 diff --git a/keyboards/wilba_tech/wt69_a/wt69_a.c b/keyboards/wilba_tech/wt69_a/wt69_a.c new file mode 100644 index 000000000000..ccff6d62c94b --- /dev/null +++ b/keyboards/wilba_tech/wt69_a/wt69_a.c @@ -0,0 +1,17 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +// Nothing to see here, move along... ;-) diff --git a/keyboards/wilba_tech/wt69_a/wt69_a.h b/keyboards/wilba_tech/wt69_a/wt69_a.h new file mode 100644 index 000000000000..057936094d32 --- /dev/null +++ b/keyboards/wilba_tech/wt69_a/wt69_a.h @@ -0,0 +1,36 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K215, K016, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, \ + K300, K301, K302, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, \ + K400, K401, K402, K403, K404, K408, K413, K414, K415, K416 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216 }, \ + { K300, K301, K302, ____, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316 }, \ + { K400, K401, K402, K403, K404, ____, ____, ____, K408, ____, ____, ____, ____, K413, K414, K415, K416 } \ +} + diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h new file mode 100644 index 000000000000..8400447f0d6c --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -0,0 +1,202 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6582 // wilba.tech +#define PRODUCT_ID 0x075A // 75-A +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT75-A +#define DESCRIPTION wilba.tech WT75-A + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* 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 + +#define WT_MONO_BACKLIGHT + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt75_a/info.json b/keyboards/wilba_tech/wt75_a/info.json new file mode 100644 index 000000000000..d9c54a63a6ba --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "wilba.tech WT75-A", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "bootloader": "atmel-dfu", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.5, "y":0}, {"label":"F2", "x":2.5, "y":0}, {"label":"F3", "x":3.5, "y":0}, {"label":"F4", "x":4.5, "y":0}, {"label":"F5", "x":5.75, "y":0}, {"label":"F6", "x":6.75, "y":0}, {"label":"F7", "x":7.75, "y":0}, {"label":"F8", "x":8.75, "y":0}, {"label":"F9", "x":10, "y":0}, {"label":"F10", "x":11, "y":0}, {"label":"F11", "x":12, "y":0}, {"label":"F12", "x":13, "y":0}, {"label":"Del", "x":15, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Bksp", "x":13, "y":1.25}, {"label":"Bksp", "x":14, "y":1.25}, {"label":"Home", "x":15, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"PgUp", "x":15, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"PgDn", "x":15, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14, "y":4.25}, {"label":"End", "x":15, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"label":"6.25U", "x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"\u2190", "x":13, "y":5.25}, {"label":"\u2193", "x":14, "y":5.25}, {"label":"\u2192", "x":15, "y":5.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_a/keymaps/default/keymap.c b/keyboards/wilba_tech/wt75_a/keymaps/default/keymap.c new file mode 100644 index 000000000000..77a534a2329f --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + 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_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, 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_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + 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, 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), + + // Fn2 Layer + [2] = LAYOUT_all( + 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, 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 Layer + [3] = LAYOUT_all( + 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, 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), +}; + diff --git a/keyboards/wilba_tech/wt75_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt75_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..77a534a2329f --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + 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_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, 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_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + 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, 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), + + // Fn2 Layer + [2] = LAYOUT_all( + 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, 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 Layer + [3] = LAYOUT_all( + 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, 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), +}; + diff --git a/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..76a07d7a44ac --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_a/readme.md b/keyboards/wilba_tech/wt75_a/readme.md new file mode 100644 index 000000000000..027081360d8b --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/readme.md @@ -0,0 +1,15 @@ +# WILBA.TECH WT75-A + +![WILBA.TECH WT75-A](https://wilba.tech) + +WT75-A is a keyboard PCB supporting 75% layout with 0.25U blocker. [More info at wilba.tech](https://wilba.tech/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: WILBA.TECH WT75-A +Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt75_a: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). \ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk new file mode 100644 index 000000000000..e41f2186b3a3 --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 diff --git a/keyboards/wilba_tech/wt75_a/wt75_a.c b/keyboards/wilba_tech/wt75_a/wt75_a.c new file mode 100644 index 000000000000..ccff6d62c94b --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/wt75_a.c @@ -0,0 +1,17 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +// Nothing to see here, move along... ;-) diff --git a/keyboards/wilba_tech/wt75_a/wt75_a.h b/keyboards/wilba_tech/wt75_a/wt75_a.h new file mode 100644 index 000000000000..4ddd1aabf994 --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/wt75_a.h @@ -0,0 +1,43 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +// Right switch of split backspace is at 2,13 and is the only switch +// whose physical position doesn't match switch matrix position :-( +// However, it also makes no sense to view the physical as 16 columns, +// so the numbering goes 00 to 14. Deal with it. + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K313, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \ + K500, K501, K502, K506, K510, K511, K512, K513, K514 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, ____, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, ____, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ + { K500, K501, K502, ____, ____, ____, K506, ____, ____, ____, K510, K511, K512, K513, K514 } \ +} + diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 36f5c957468d..7bdcf7f7049f 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4, B7, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL // #define BACKLIGHT_PIN B7 diff --git a/keyboards/wilba_tech/wt80_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt80_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..9cbe7ff6241a --- /dev/null +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + 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, 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), + + [2] = LAYOUT_all( + 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, 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), + + [3] = LAYOUT_all( + 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, 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), + +}; + diff --git a/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..76a07d7a44ac --- /dev/null +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index 76a07d7a44ac..e41f2186b3a3 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/rules.mk @@ -66,6 +66,3 @@ 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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt8_a/config.h b/keyboards/wilba_tech/wt8_a/config.h index 1c8522a1b50a..c4d18918330c 100644 --- a/keyboards/wilba_tech/wt8_a/config.h +++ b/keyboards/wilba_tech/wt8_a/config.h @@ -44,7 +44,7 @@ #define MATRIX_COL_PINS { F4, F1, B2, B6, F6, F7, D5, B4 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c b/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c new file mode 100644 index 000000000000..bf0dda0fa8dc --- /dev/null +++ b/keyboards/wilba_tech/wt8_a/keymaps/rys/keymap.c @@ -0,0 +1,84 @@ +#include QMK_KEYBOARD_H + +#define _BL0 0 +#define _FL1 1 +#define _FL2 2 +#define _FL3 3 + +#define MACOSLK LCTL(LGUI(KC_Q)) // CTRL+CMD+Q == screen lock in macOS 10.13+ + +enum rys_keycodes { + STOKEN1 = SAFE_RANGE, + STOKEN2, + STOKEN3, + STOKEN4 +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case STOKEN1: + if (record->event.pressed) { + SEND_STRING(RYS_STOKEN1); + } + break; + case STOKEN2: + if (record->event.pressed) { + SEND_STRING(RYS_STOKEN2); + } + break; + case STOKEN3: + if (record->event.pressed) { + SEND_STRING(RYS_STOKEN3); + } + break; + case STOKEN4: + if (record->event.pressed) { + SEND_STRING(RYS_STOKEN4); + } + break; + } + return true; +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap base layer (_BL0) - default layer + * ,---------------------------. + * | ST1 | ST2 | ST3 | ST4 | + * |---------------------------| + * | | LOCK | VOL- | VOL+ | + * `---------------------------' + */ + [_BL0] = LAYOUT( + STOKEN1, STOKEN2, STOKEN3, STOKEN4, + _______, MACOSLK, KC__VOLDOWN, KC__VOLUP), + /* Keymap base layer (_FL1) - function layer 1 + * ,---------------------------. + * | | | | | + * |---------------------------| + * | | | | | + * `---------------------------' + */ + [_FL1] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______), + /* Keymap base layer (_FL2) - function layer 2 + * ,---------------------------. + * | | | | | + * |---------------------------| + * | | | | | + * `---------------------------' + */ + [_FL2] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______), + /* Keymap base layer (_FL3) - function layer 3 + * ,---------------------------. + * | | | | | + * |---------------------------| + * | | | | | + * `---------------------------' + */ + [_FL3] = LAYOUT( + _______, _______, _______, _______, + _______, _______, _______, _______), +}; diff --git a/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk b/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk new file mode 100644 index 000000000000..60cbf8bfc4b6 --- /dev/null +++ b/keyboards/wilba_tech/wt8_a/keymaps/rys/rules.mk @@ -0,0 +1,9 @@ +RYS_STOKEN1 = "$(shell security find-generic-password -a qmk -s wt8a-1 -w)" +RYS_STOKEN2 = "$(shell security find-generic-password -a qmk -s wt8a-2 -w)" +RYS_STOKEN3 = "$(shell security find-generic-password -a qmk -s wt8a-3 -w)" +RYS_STOKEN4 = "$(shell security find-generic-password -a qmk -s wt8a-4 -w)" + +CFLAGS += -DRYS_STOKEN1=\"$(RYS_STOKEN1)\" +CFLAGS += -DRYS_STOKEN2=\"$(RYS_STOKEN2)\" +CFLAGS += -DRYS_STOKEN3=\"$(RYS_STOKEN3)\" +CFLAGS += -DRYS_STOKEN4=\"$(RYS_STOKEN4)\" diff --git a/keyboards/wilba_tech/wt8_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt8_a/keymaps/via/keymap.c new file mode 100644 index 000000000000..a9f40362c7de --- /dev/null +++ b/keyboards/wilba_tech/wt8_a/keymaps/via/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8 ), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) }; + diff --git a/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk new file mode 100644 index 000000000000..f072c67198c2 --- /dev/null +++ b/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index f072c67198c2..f1c632289cca 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/rules.mk @@ -63,6 +63,3 @@ 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 - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/bface/README.md b/keyboards/winkeyless/bface/README.md similarity index 82% rename from keyboards/bface/README.md rename to keyboards/winkeyless/bface/README.md index 0dac7caf308f..f1789b04cfaf 100644 --- a/keyboards/bface/README.md +++ b/keyboards/winkeyless/bface/README.md @@ -8,7 +8,7 @@ Hardware Availability: [Winkeyless](https://winkeyless.kr/product/b-face-x2-pcb/ Make example for this keyboard (after setting up your build environment): - make bface:default + make winkeyless/bface:default Flashing @@ -41,4 +41,4 @@ macOS: 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. -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). diff --git a/keyboards/bface/backlight_ps2avrGB.c b/keyboards/winkeyless/bface/backlight_ps2avrGB.c similarity index 100% rename from keyboards/bface/backlight_ps2avrGB.c rename to keyboards/winkeyless/bface/backlight_ps2avrGB.c diff --git a/keyboards/bface/backlight_ps2avrGB.h b/keyboards/winkeyless/bface/backlight_ps2avrGB.h similarity index 100% rename from keyboards/bface/backlight_ps2avrGB.h rename to keyboards/winkeyless/bface/backlight_ps2avrGB.h diff --git a/keyboards/bface/bface.c b/keyboards/winkeyless/bface/bface.c similarity index 100% rename from keyboards/bface/bface.c rename to keyboards/winkeyless/bface/bface.c diff --git a/keyboards/bface/bface.h b/keyboards/winkeyless/bface/bface.h similarity index 100% rename from keyboards/bface/bface.h rename to keyboards/winkeyless/bface/bface.h diff --git a/keyboards/bface/config.h b/keyboards/winkeyless/bface/config.h similarity index 100% rename from keyboards/bface/config.h rename to keyboards/winkeyless/bface/config.h diff --git a/keyboards/bface/i2c.c b/keyboards/winkeyless/bface/i2c.c similarity index 100% rename from keyboards/bface/i2c.c rename to keyboards/winkeyless/bface/i2c.c diff --git a/keyboards/bface/i2c.h b/keyboards/winkeyless/bface/i2c.h similarity index 100% rename from keyboards/bface/i2c.h rename to keyboards/winkeyless/bface/i2c.h diff --git a/keyboards/bface/info.json b/keyboards/winkeyless/bface/info.json similarity index 100% rename from keyboards/bface/info.json rename to keyboards/winkeyless/bface/info.json diff --git a/keyboards/bface/keymaps/default/keymap.c b/keyboards/winkeyless/bface/keymaps/default/keymap.c similarity index 100% rename from keyboards/bface/keymaps/default/keymap.c rename to keyboards/winkeyless/bface/keymaps/default/keymap.c diff --git a/keyboards/bface/keymaps/kpeatt/keymap.c b/keyboards/winkeyless/bface/keymaps/kpeatt/keymap.c similarity index 100% rename from keyboards/bface/keymaps/kpeatt/keymap.c rename to keyboards/winkeyless/bface/keymaps/kpeatt/keymap.c diff --git a/keyboards/bface/keymaps/kpeatt/readme.md b/keyboards/winkeyless/bface/keymaps/kpeatt/readme.md similarity index 100% rename from keyboards/bface/keymaps/kpeatt/readme.md rename to keyboards/winkeyless/bface/keymaps/kpeatt/readme.md diff --git a/keyboards/bface/matrix.c b/keyboards/winkeyless/bface/matrix.c similarity index 100% rename from keyboards/bface/matrix.c rename to keyboards/winkeyless/bface/matrix.c diff --git a/keyboards/bface/rules.mk b/keyboards/winkeyless/bface/rules.mk similarity index 94% rename from keyboards/bface/rules.mk rename to keyboards/winkeyless/bface/rules.mk index 95b6c8a97a6c..369ccf2edac8 100644 --- a/keyboards/bface/rules.mk +++ b/keyboards/winkeyless/bface/rules.mk @@ -44,6 +44,5 @@ CUSTOM_MATRIX = yes SRC = matrix.c i2c.c backlight_ps2avrGB.c # programming options -PROGRAM_CMD = ./keyboards/bface/program .build/$(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex -LAYOUTS = 60_ansi diff --git a/keyboards/bface/usbconfig.h b/keyboards/winkeyless/bface/usbconfig.h similarity index 100% rename from keyboards/bface/usbconfig.h rename to keyboards/winkeyless/bface/usbconfig.h diff --git a/keyboards/bmini/bmini.c b/keyboards/winkeyless/bmini/bmini.c similarity index 100% rename from keyboards/bmini/bmini.c rename to keyboards/winkeyless/bmini/bmini.c diff --git a/keyboards/bmini/bmini.h b/keyboards/winkeyless/bmini/bmini.h similarity index 100% rename from keyboards/bmini/bmini.h rename to keyboards/winkeyless/bmini/bmini.h diff --git a/keyboards/bmini/config.h b/keyboards/winkeyless/bmini/config.h similarity index 100% rename from keyboards/bmini/config.h rename to keyboards/winkeyless/bmini/config.h diff --git a/keyboards/bmini/i2c.c b/keyboards/winkeyless/bmini/i2c.c similarity index 100% rename from keyboards/bmini/i2c.c rename to keyboards/winkeyless/bmini/i2c.c diff --git a/keyboards/bmini/i2c.h b/keyboards/winkeyless/bmini/i2c.h similarity index 100% rename from keyboards/bmini/i2c.h rename to keyboards/winkeyless/bmini/i2c.h diff --git a/keyboards/bmini/info.json b/keyboards/winkeyless/bmini/info.json similarity index 100% rename from keyboards/bmini/info.json rename to keyboards/winkeyless/bmini/info.json diff --git a/keyboards/bmini/keymaps/default/keymap.c b/keyboards/winkeyless/bmini/keymaps/default/keymap.c similarity index 100% rename from keyboards/bmini/keymaps/default/keymap.c rename to keyboards/winkeyless/bmini/keymaps/default/keymap.c diff --git a/keyboards/bmini/matrix.c b/keyboards/winkeyless/bmini/matrix.c similarity index 100% rename from keyboards/bmini/matrix.c rename to keyboards/winkeyless/bmini/matrix.c diff --git a/keyboards/winkeyless/bmini/readme.md b/keyboards/winkeyless/bmini/readme.md new file mode 100644 index 000000000000..3401b9744484 --- /dev/null +++ b/keyboards/winkeyless/bmini/readme.md @@ -0,0 +1,43 @@ +# B.mini + +A 75% keyboard with RGB + +Keyboard Maintainer: QMK Community +Hardware Supported: B.mini PCB +Hardware Availability: http://winkeyless.kr/product/b-mini-x2-pcb/ + +Make example for this keyboard (after setting up your build environment): + + make winkeyless/bmini:default + +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python + brew install pyusb + brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + +4. Place your keyboard into reset. +5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. + + +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). diff --git a/keyboards/bmini/rules.mk b/keyboards/winkeyless/bmini/rules.mk similarity index 100% rename from keyboards/bmini/rules.mk rename to keyboards/winkeyless/bmini/rules.mk diff --git a/keyboards/bmini/usbconfig.h b/keyboards/winkeyless/bmini/usbconfig.h similarity index 100% rename from keyboards/bmini/usbconfig.h rename to keyboards/winkeyless/bmini/usbconfig.h diff --git a/keyboards/bminiex/backlight.c b/keyboards/winkeyless/bminiex/backlight.c similarity index 100% rename from keyboards/bminiex/backlight.c rename to keyboards/winkeyless/bminiex/backlight.c diff --git a/keyboards/bminiex/backlight_custom.h b/keyboards/winkeyless/bminiex/backlight_custom.h similarity index 100% rename from keyboards/bminiex/backlight_custom.h rename to keyboards/winkeyless/bminiex/backlight_custom.h diff --git a/keyboards/bminiex/bminiex.c b/keyboards/winkeyless/bminiex/bminiex.c similarity index 100% rename from keyboards/bminiex/bminiex.c rename to keyboards/winkeyless/bminiex/bminiex.c diff --git a/keyboards/bminiex/bminiex.h b/keyboards/winkeyless/bminiex/bminiex.h similarity index 100% rename from keyboards/bminiex/bminiex.h rename to keyboards/winkeyless/bminiex/bminiex.h diff --git a/keyboards/bminiex/breathing_custom.h b/keyboards/winkeyless/bminiex/breathing_custom.h similarity index 100% rename from keyboards/bminiex/breathing_custom.h rename to keyboards/winkeyless/bminiex/breathing_custom.h diff --git a/keyboards/bminiex/config.h b/keyboards/winkeyless/bminiex/config.h similarity index 100% rename from keyboards/bminiex/config.h rename to keyboards/winkeyless/bminiex/config.h diff --git a/keyboards/bminiex/i2c.c b/keyboards/winkeyless/bminiex/i2c.c similarity index 100% rename from keyboards/bminiex/i2c.c rename to keyboards/winkeyless/bminiex/i2c.c diff --git a/keyboards/bminiex/i2c.h b/keyboards/winkeyless/bminiex/i2c.h similarity index 100% rename from keyboards/bminiex/i2c.h rename to keyboards/winkeyless/bminiex/i2c.h diff --git a/keyboards/bminiex/info.json b/keyboards/winkeyless/bminiex/info.json similarity index 100% rename from keyboards/bminiex/info.json rename to keyboards/winkeyless/bminiex/info.json diff --git a/keyboards/bminiex/keymaps/ansi/keymap.c b/keyboards/winkeyless/bminiex/keymaps/ansi/keymap.c similarity index 100% rename from keyboards/bminiex/keymaps/ansi/keymap.c rename to keyboards/winkeyless/bminiex/keymaps/ansi/keymap.c diff --git a/keyboards/bminiex/keymaps/ansi/readme.md b/keyboards/winkeyless/bminiex/keymaps/ansi/readme.md similarity index 100% rename from keyboards/bminiex/keymaps/ansi/readme.md rename to keyboards/winkeyless/bminiex/keymaps/ansi/readme.md diff --git a/keyboards/bminiex/keymaps/default/keymap.c b/keyboards/winkeyless/bminiex/keymaps/default/keymap.c similarity index 100% rename from keyboards/bminiex/keymaps/default/keymap.c rename to keyboards/winkeyless/bminiex/keymaps/default/keymap.c diff --git a/keyboards/bminiex/keymaps/iso/keymap.c b/keyboards/winkeyless/bminiex/keymaps/iso/keymap.c similarity index 100% rename from keyboards/bminiex/keymaps/iso/keymap.c rename to keyboards/winkeyless/bminiex/keymaps/iso/keymap.c diff --git a/keyboards/bminiex/keymaps/iso/readme.md b/keyboards/winkeyless/bminiex/keymaps/iso/readme.md similarity index 100% rename from keyboards/bminiex/keymaps/iso/readme.md rename to keyboards/winkeyless/bminiex/keymaps/iso/readme.md diff --git a/keyboards/bminiex/matrix.c b/keyboards/winkeyless/bminiex/matrix.c similarity index 100% rename from keyboards/bminiex/matrix.c rename to keyboards/winkeyless/bminiex/matrix.c diff --git a/keyboards/bminiex/readme.md b/keyboards/winkeyless/bminiex/readme.md similarity index 89% rename from keyboards/bminiex/readme.md rename to keyboards/winkeyless/bminiex/readme.md index 204bcbbb1b77..7dbabedbaf3d 100644 --- a/keyboards/bminiex/readme.md +++ b/keyboards/winkeyless/bminiex/readme.md @@ -1,5 +1,4 @@ -B.mini EX -========= +# B.mini EX A compact fullsize keyboard with RGB @@ -9,6 +8,6 @@ Hardware Availability: https://winkeyless.kr/product/b-mini-ex-x2-pcb/ Make example for this keyboard (after setting up your build environment): - make bminiex:default + make winkeyless/bminiex: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). \ No newline at end of file +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). diff --git a/keyboards/bminiex/rules.mk b/keyboards/winkeyless/bminiex/rules.mk similarity index 100% rename from keyboards/bminiex/rules.mk rename to keyboards/winkeyless/bminiex/rules.mk diff --git a/keyboards/bminiex/usbconfig.h b/keyboards/winkeyless/bminiex/usbconfig.h similarity index 100% rename from keyboards/bminiex/usbconfig.h rename to keyboards/winkeyless/bminiex/usbconfig.h diff --git a/keyboards/winkeyless/readme.md b/keyboards/winkeyless/readme.md new file mode 100644 index 000000000000..e6cb45fc4741 --- /dev/null +++ b/keyboards/winkeyless/readme.md @@ -0,0 +1,7 @@ +# Winkeyless + +[Winkeyless](https://www.winkeyless.kr) is a Korean keyboard company popular for creating the Boot Mapper Client (BMC) firmware. Most Winkeyless boards were low profile and constructed out of acrylic showcasing their RGB underglow capabilities. + +In late 2018, Winkeyless closed its doors due to the numerous unlicensed implementations of its hardware and software. + +This directory contains official Winkeyless boards that have had QMK ported to work with them. diff --git a/keyboards/xd60/keymaps/default/keymap.c b/keyboards/xd60/keymaps/default/keymap.c index f8b44dc0a73b..b49803fa849c 100644 --- a/keyboards/xd60/keymaps/default/keymap.c +++ b/keyboards/xd60/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -9,7 +8,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer LAYOUT_all( @@ -17,15 +16,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, KC_INS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd60/keymaps/iso/keymap.c b/keyboards/xd60/keymaps/iso/keymap.c index 2ca2ea807b0a..4ece241efbfb 100644 --- a/keyboards/xd60/keymaps/iso/keymap.c +++ b/keyboards/xd60/keymaps/iso/keymap.c @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_NO, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,KC_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer [_FL] = LAYOUT_all( @@ -20,15 +20,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, KC_NO, \ KC_NO, KC_MPLY, KC_MSTP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ KC_LSFT, RGB_TOG, RGB_MOD, KC_CUT, KC_COPY,KC_PASTE,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, KC_HOME, KC_PGUP, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_NO, KC_PGDOWN, KC_NO), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_NO, KC_PGDOWN, KC_NO), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd60/keymaps/krusli/keymap.c b/keyboards/xd60/keymaps/krusli/keymap.c index 6a460cd34ab7..b34b4dfbcf67 100644 --- a/keyboards/xd60/keymaps/krusli/keymap.c +++ b/keyboards/xd60/keymaps/krusli/keymap.c @@ -1,8 +1,6 @@ #include QMK_KEYBOARD_H #include "action_layer.h" -#define _______ KC_TRNS - #define _BASE 0 #define _FN 1 diff --git a/keyboards/xd60/keymaps/rooski/keymap.c b/keyboards/xd60/keymaps/rooski/keymap.c index bea96a30d99d..624c118bf380 100644 --- a/keyboards/xd60/keymaps/rooski/keymap.c +++ b/keyboards/xd60/keymaps/rooski/keymap.c @@ -8,9 +8,6 @@ // Define tapping term #define TAPPING_TERM 150 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO // Layer definitions~ #define _BL 0 #define _FL 1 @@ -79,4 +76,4 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // Loop void matrix_scan_user(void) { // Empty -}; \ No newline at end of file +}; diff --git a/keyboards/xd60/keymaps/styr/keymap.c b/keyboards/xd60/keymaps/styr/keymap.c new file mode 100644 index 000000000000..2fbfe2563a63 --- /dev/null +++ b/keyboards/xd60/keymaps/styr/keymap.c @@ -0,0 +1,56 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 +#define _LL 2 + +enum custom_keycodes { + MACRO_STRING +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base Layer + [_BL] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, 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, \ + MO(_LL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO(_FL), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT), + + // 1: Function Layer + [_FL] = LAYOUT_all( + XXXXXXX, 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_F13, KC_F14, \ + XXXXXXX, RGB_TOG, RGB_MOD, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, RGB_HUD, XXXXXXX, RGB_VAI, RGB_VAD, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, \ + XXXXXXX, XXXXXXX, XXXXXXX, MACRO_STRING, XXXXXXX, F(0), KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT), + + [_LL] = LAYOUT_all( + XXXXXXX, 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_F13, KC_F14, \ + XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC__MUTE, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MPLY, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, F(0), KC_MRWD, KC_VOLD, KC_MFFD), + + +}; + +// Macros +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MACRO_STRING: + if(record->event.pressed){ + SEND_STRING("My Custom String"); + } + return false; + break; + default: + return true; + } +} + +// Loop +void matrix_scan_user(void) { + // Empty +}; diff --git a/keyboards/xd60/keymaps/styr/readme.md b/keyboards/xd60/keymaps/styr/readme.md new file mode 100644 index 000000000000..8d9edf7c48ce --- /dev/null +++ b/keyboards/xd60/keymaps/styr/readme.md @@ -0,0 +1,7 @@ +# Keyboard Layout by Styr + +## Additional Notes +Default Keymap for XD60 as indicated on the original sale page. + +## Build +To build the default keymap, simply run `make xd60/rev3:styr`. diff --git a/keyboards/xd60/readme.md b/keyboards/xd60/readme.md index 24f07c47bc73..b9862428c777 100644 --- a/keyboards/xd60/readme.md +++ b/keyboards/xd60/readme.md @@ -6,11 +6,16 @@ Compact 60% with arrows. ![Top View of a pair of XD60 Keyboard](https://i.imgur.com/3Jq2743.jpg) Keyboard Maintainer: QMK Community -Hardware Supported: XD60 PCB +Hardware Supported: XD60 PCB rev2 & rev3 Hardware Availability: https://www.massdrop.com/buy/xd60-xd64-custom-mechanical-keyboard-kit?mode=guest_open -Make example for this keyboard (after setting up your build environment): +With the implementation of Rev3 you need to specify the Rev you want to build. +To build for a Rev2 with a default keymap: - make xd60:default +```make xd60/rev2: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. +To build for a Rev3 with a default keymap: + +```make xd60/rev3: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). diff --git a/keyboards/xd60/config.h b/keyboards/xd60/rev2/config.h similarity index 100% rename from keyboards/xd60/config.h rename to keyboards/xd60/rev2/config.h diff --git a/keyboards/xd60/rules.mk b/keyboards/xd60/rev2/rules.mk similarity index 100% rename from keyboards/xd60/rules.mk rename to keyboards/xd60/rev2/rules.mk diff --git a/keyboards/xd60/rev3/config.h b/keyboards/xd60/rev3/config.h new file mode 100644 index 000000000000..d88330cf7b36 --- /dev/null +++ b/keyboards/xd60/rev3/config.h @@ -0,0 +1,71 @@ +/* +Copyright 2019 Rodrigo Feijao + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6363 +#define DEVICE_VER 0x0001 +#define MANUFACTURER XIUDI +#define PRODUCT XD60rev3 +#define DESCRIPTION XD60 rev3 Keyboard PCB by XIUDI + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* Backlight Setup */ +#define BACKLIGHT_PIN F5 +#define BACKLIGHT_LEVELS 6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* RGB Underglow + * F6 PIN for XD60v3 that has pre-soldered LEDs + */ +#define RGB_DI_PIN F6 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* 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 diff --git a/keyboards/xd60/rev3/rules.mk b/keyboards/xd60/rev3/rules.mk new file mode 100644 index 000000000000..f33fff76cef0 --- /dev/null +++ b/keyboards/xd60/rev3/rules.mk @@ -0,0 +1,67 @@ +# MCU name +# MCU = at90usb1287 +MCU = atmega32u4 + + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# LUFA specific +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = atmel-dfu + + +# Build Options +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = 60_ansi diff --git a/keyboards/xd75/config.h b/keyboards/xd75/config.h index 482edc9c1ddc..bc1f1860f921 100644 --- a/keyboards/xd75/config.h +++ b/keyboards/xd75/config.h @@ -46,7 +46,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN F5 diff --git a/keyboards/xd75/keymaps/adi/config.h b/keyboards/xd75/keymaps/adi/config.h index 244c75c77c45..08bed9ccb9a1 100644 --- a/keyboards/xd75/keymaps/adi/config.h +++ b/keyboards/xd75/keymaps/adi/config.h @@ -14,12 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // Disable backlight #undef BACKLIGHT_ENABLE - -#endif diff --git a/keyboards/xd75/keymaps/adi/keymap.c b/keyboards/xd75/keymaps/adi/keymap.c index 24b450c8d4e0..4f9e414c1c05 100644 --- a/keyboards/xd75/keymaps/adi/keymap.c +++ b/keyboards/xd75/keymaps/adi/keymap.c @@ -13,12 +13,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _QW 0 diff --git a/keyboards/xd75/keymaps/adi/rules.mk b/keyboards/xd75/keymaps/adi/rules.mk index 52a8f38d45ff..a0c4fc967849 100644 --- a/keyboards/xd75/keymaps/adi/rules.mk +++ b/keyboards/xd75/keymaps/adi/rules.mk @@ -13,3 +13,4 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +BACKLIGHT_ENABLE = no diff --git a/keyboards/xd75/keymaps/atomic_style/config.h b/keyboards/xd75/keymaps/atomic_style/config.h index f52a97bbc865..a72596783dd1 100644 --- a/keyboards/xd75/keymaps/atomic_style/config.h +++ b/keyboards/xd75/keymaps/atomic_style/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/atomic_style/keymap.c b/keyboards/xd75/keymaps/atomic_style/keymap.c index c40d89bc79d5..bdbbc4af3360 100644 --- a/keyboards/xd75/keymaps/atomic_style/keymap.c +++ b/keyboards/xd75/keymaps/atomic_style/keymap.c @@ -13,12 +13,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _QW 0 diff --git a/keyboards/xd75/keymaps/bbaserdem/config.h b/keyboards/xd75/keymaps/bbaserdem/config.h index 28d32e562828..271f48d0011b 100644 --- a/keyboards/xd75/keymaps/bbaserdem/config.h +++ b/keyboards/xd75/keymaps/bbaserdem/config.h @@ -1,6 +1,3 @@ -#ifndef CONFIG_KEYMAP_H -#define CONFIG_KEYMAP_H +#pragma once -#include "../../config.h" - -#endif +// place overrides here diff --git a/keyboards/xd75/keymaps/bbaserdem/keymap.c b/keyboards/xd75/keymaps/bbaserdem/keymap.c index 68071d018e2a..6f8576b09b41 100644 --- a/keyboards/xd75/keymaps/bbaserdem/keymap.c +++ b/keyboards/xd75/keymaps/bbaserdem/keymap.c @@ -1,4 +1,4 @@ -#include "xd75.h" +#include QMK_KEYBOARD_H #include "bbaserdem.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/xd75/keymaps/billypython/config.h b/keyboards/xd75/keymaps/billypython/config.h index 275f8effba79..36e6b6785170 100644 --- a/keyboards/xd75/keymaps/billypython/config.h +++ b/keyboards/xd75/keymaps/billypython/config.h @@ -2,9 +2,6 @@ #define FORCE_NKRO -#define MAGIC_KEY_LAYER0_ALT1 BSLS -#define MAGIC_KEY_BOOTLOADER ESC - #define MOUSEKEY_DELAY 50 #define MOUSEKEY_INTERVAL 15 #define MOUSEKEY_MAX_SPEED 4 diff --git a/keyboards/xd75/keymaps/bramver/keymap.c b/keyboards/xd75/keymaps/bramver/keymap.c index 142d8efd2b1d..0d6091523197 100644 --- a/keyboards/xd75/keymaps/bramver/keymap.c +++ b/keyboards/xd75/keymaps/bramver/keymap.c @@ -15,10 +15,6 @@ */ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Layer shorthand #define _BASE 0 #define _LOWER 1 diff --git a/keyboards/xd75/keymaps/bramver/README.md b/keyboards/xd75/keymaps/bramver/readme.md similarity index 100% rename from keyboards/xd75/keymaps/bramver/README.md rename to keyboards/xd75/keymaps/bramver/readme.md diff --git a/keyboards/xd75/keymaps/c4software_bepo/config.h b/keyboards/xd75/keymaps/c4software_bepo/config.h index 39845f15b7a7..6605bbf93f72 100644 --- a/keyboards/xd75/keymaps/c4software_bepo/config.h +++ b/keyboards/xd75/keymaps/c4software_bepo/config.h @@ -16,4 +16,4 @@ # pragma once -#include "../../config.h" +// place overrides here diff --git a/keyboards/xd75/keymaps/c4software_bepo/README.md b/keyboards/xd75/keymaps/c4software_bepo/readme.md similarity index 100% rename from keyboards/xd75/keymaps/c4software_bepo/README.md rename to keyboards/xd75/keymaps/c4software_bepo/readme.md diff --git a/keyboards/xd75/keymaps/cbbrowne/config.h b/keyboards/xd75/keymaps/cbbrowne/config.h index cc583f0aed9a..0ff61e1f4272 100644 --- a/keyboards/xd75/keymaps/cbbrowne/config.h +++ b/keyboards/xd75/keymaps/cbbrowne/config.h @@ -14,9 +14,9 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once +// place overrides here #ifndef NO_DEBUG #define NO_DEBUG #endif @@ -24,8 +24,6 @@ #define NO_PRINT #endif -#include "../../config.h" - #define LEADER_TIMEOUT 300 #define BACKLIGHT_BREATHING @@ -34,11 +32,3 @@ #define randadd 53 #define randmul 181 #define randmod 167 - -/* Filler to make layering a bit clearer * - * borrowed from basic keymap */ - -#define _______ KC_TRNS -#define _____ KC_NO - -#endif diff --git a/keyboards/xd75/keymaps/cbbrowne/keymap.c b/keyboards/xd75/keymaps/cbbrowne/keymap.c index 322fffdadb44..6c356ac80340 100644 --- a/keyboards/xd75/keymaps/cbbrowne/keymap.c +++ b/keyboards/xd75/keymaps/cbbrowne/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2017 REPLACE_WITH_YOUR_NAME +/* Copyright 2017 Christopher B Browne * * 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 @@ -13,12 +13,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H /* Fillers to make layering more clear */ -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO /* Layer shorthand */ @@ -64,12 +62,7 @@ enum macro_id { #define FUNCTION MO(_FUNCTION) #define MRAISE MO(_RAISE) #define MLOWER MO(_LOWER) -#define ALTBSP ALT_T(KC_BSPC) - -/* More modifiers for QCENT2... */ -#define PALT MT(KC_RALT, KC_P) -#define SCTL MT(KC_RCTL, KC_SCLN) -#define SSHF MT(KC_RSFT, KC_SLSH) +#define ALTPLUS ALT_T(KC_PLUS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -86,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | * '--------------------------------------------------------------------------------------------------------------------------------------' */ - + /* layout for centred keypad + qwerty... |ESC| 1 | 2 | 3 | 4 | 5 | ? | ? | ? | ? | 6 | 7 | 8 | 9 | 0 | @@ -96,40 +89,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |ALT|LED| | | | | | | | | | | | | | - - keys needing to be assigned: -11 - KC_TAB - tab -52 - ROT_LED - rotate LED +51 - KC_TAB - tab + - ROT_LED - rotate LED 15 - KC_LALT - Left ALT - - KC_LGUI - this is the windows/command key, which I think I do not use... - - M_LOWER - switch to LOWER layer - - KC_SPC - space - - M_UPPER - switch to UPPER layer, maybe unneeded for 15x5 - - KC_LEFT - famous arrows - - KC_DOWN - famous arrows - - KC_UP - famous arrows - - KC_RIGHT - famous arrows - - KC_ENT - enter +53,55 - M_RAISE - switch to RAISE layer +5b - M_LOWER - switch to LOWER layer +56,59,5a - KC_SPC - space +5c - KC_LEFT - famous arrows +5d - KC_DOWN - famous arrows +5e - KC_UP - famous arrows +5f - KC_RIGHT - famous arrows +3f - KC_ENT - enter - KC_GRV - leftwards quote - - KC_QUOT - rightwards quote - - KC_BSPC - backspace - - KC_ESC +4f - KC_QUOT - rightwards quote +1f - KC_BSPC - backspace +11 - KC_ESC +19 - KC_GRV - ` - raised +19 - KC_TILD - ~ - lowered -Missing still... - KC_LBRC and KC_LCBR - KC_RBRC and KC_RCBR + */ - */ +[_QWERTY] = LAYOUT_ortho_5x15( /* QWERTY, with keypad in the centre */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC , + KC_LALT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_8, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, ALTPLUS , + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC,KC_MINS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, KC_EQL, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE , + KC_TAB, FUNCTION, MRAISE, FUNCTION, MRAISE, KC_SPC,KC_PGDN, KC_MINS, KC_SPC, KC_SPC, MLOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), - [_QWERTY] = { /* QWERTY, with keypad in the centre */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, RESET, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC }, - { KC_LALT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_8, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PLUS }, - { KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_4, KC_5, KC_MINS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_1, KC_2, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE }, - { KC_TAB, FUNCTION, MRAISE, FUNCTION, MRAISE, KC_SPC, KC_0, KC_MINS, KC_SPC, KC_SPC, MLOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT } - }, - /* LOWER * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | @@ -144,13 +132,13 @@ Missing still... * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [_LOWER] = { /* LOWERED */ - { ___T___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, - { ___T___, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_INS }, - { ___T___, 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, _______, _______, _______, _______, _______, ___T___, ___T___, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - }, +[_LOWER] = LAYOUT_ortho_5x15( /* LOWERED */ + ___T___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_TILD, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 , + ___T___, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_INS , + ___T___, 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, _______, _______, _______, _______, _______, ___T___, ___T___, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), /* RAISED * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. @@ -166,13 +154,13 @@ Missing still... * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [_RAISE] = { /* RAISED */ - { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___ }, - { KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, _______, KC_INS }, - { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___ }, - { KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, ___T___, ___T___, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - }, +[_RAISE] = LAYOUT_ortho_5x15 ( /* RAISED */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MVERSION, _______, KC_GRV, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___ , + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, USERNAME, _______, KC_7, KC_8, KC_LCBR, KC_RCBR, _______, _______, KC_INS , + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RANDDIG, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___ , + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RANDALP, _______, _______, _______, _______, ___T___, ___T___, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), /* FUNCTION * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. @@ -180,21 +168,21 @@ Missing still... * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | + * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX | | WHEEL+ | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX . | MOUS Un | WHEEL- | + * | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX | | MOUS U | WHEEL- | * |--------+--------+--------+--------+--------+-- 2u -----------+--------+--------+--------+--------+-----------------+--------+--------| * | RESET | | QWERTY | COLEMK | DVORAK | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [_FUNCTION] = { /* FUNCTION */ - { KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___, ___T___ }, - { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, - { KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U }, - { RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, ___T___, ___T___, KC_MS_U, KC_WH_D }, - { RESET , _______, DF(_QWERTY), DF(_QWERTY), DF(_QWERTY), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, - }, +[_FUNCTION] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET, RESET, + KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR , + KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U , + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, ___T___, ___T___, KC_MS_U, KC_WH_D , + RESET , _______, DF(_QWERTY), DF(_QWERTY), DF(_QWERTY), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ) }; /* This bit of logic seeds a wee linear congruential random number generator */ @@ -225,8 +213,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case M_VERSION: if (record->event.pressed) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@"); - // SEND_STRING(QMK_VERSION "@" QMK_BUILDDATE); + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP); } break; case M_RANDDIGIT: @@ -291,3 +278,33 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } return MACRO_NONE; }; + +void matrix_init_user(void) { + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(325,255,255); +} + +uint32_t layer_state_set_user(uint32_t state) { + switch(biton32(state)) { + case _QWERTY: + rgblight_sethsv_white(); + break; + case _LOWER: + rgblight_sethsv_blue(); + break; + case _RAISE: + rgblight_sethsv_green(); + break; + case _ADJUST: + rgblight_sethsv_orange(); + break; + case _FUNCTION: + rgblight_sethsv_red(); + break; + default: + rgblight_sethsv(325,255,255); + break; + } + return state; +} diff --git a/keyboards/xd75/keymaps/cbbrowne/rules.mk b/keyboards/xd75/keymaps/cbbrowne/rules.mk new file mode 100644 index 000000000000..eb2f87063486 --- /dev/null +++ b/keyboards/xd75/keymaps/cbbrowne/rules.mk @@ -0,0 +1,20 @@ +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # 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 +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +API_SYSEX_ENABLE = no # Enable SYSEX API (+5390) + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/xd75/keymaps/colinta/config.h b/keyboards/xd75/keymaps/colinta/config.h index 3b39bee81c90..354c9c918607 100644 --- a/keyboards/xd75/keymaps/colinta/config.h +++ b/keyboards/xd75/keymaps/colinta/config.h @@ -14,15 +14,12 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" +// place overrides here // QMK customization: // - after 1.5s, turn off one-shot keys #define ONESHOT_TIMEOUT 1500 // - TT(layer) only needs one press #define TAPPING_TOGGLE 1 - -#endif diff --git a/keyboards/xd75/keymaps/colinta/keymap.c b/keyboards/xd75/keymaps/colinta/keymap.c index a50a02c36043..257caad339f6 100644 --- a/keyboards/xd75/keymaps/colinta/keymap.c +++ b/keyboards/xd75/keymaps/colinta/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H #ifdef IS_COLINTA #include "secrets.h" @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--/RRND----/MUTE----/FFWD-------------------------------------------------------------------------------------------------------------' */ - [LAYER_COLEMAK] = KEYMAP( + [LAYER_COLEMAK] = LAYOUT( KC_GRV, TH_F1, TH_F2, TH_F3, TH_F4, TH_F5, MM_0, MM_1, KC_DEL, TH_F6, TH_F7, TH_F8, TH_F9, TH_F10, KC_MINS, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, MM_2, GOTO_FN, KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL, OSCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LBRC, KC_RBRC, KC_ENT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, @@ -113,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [LAYER_RECORD] = KEYMAP( + [LAYER_RECORD] = LAYOUT( _____, _____, _____, _____, _____, _____, DYN_REC_STOP, DYN_REC_STOP, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, DYN_REC_STOP, DYN_REC_STOP, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, @@ -135,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [LAYER_QWERTY] = KEYMAP( + [LAYER_QWERTY] = LAYOUT( _____, _____, _____, _____, _____, _____, MM_0, MM_1, _____, _____, _____, _____, _____, _____, _____, _____, KC_Q, KC_W, KC_E, KC_R, KC_T, MM_2, GOTO_FN, _____, KC_Y, KC_U, KC_I, KC_O, KC_P, _____, MOD_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, _____, _____, _____, KC_H, KC_J, KC_K, KC_L, KC_SCLN, _____, @@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [LAYER_FN] = KEYMAP( + [LAYER_FN] = LAYOUT( GOTO_CM, GOTO_QW, KC_NO, KC_NO, KC_NO, KC_NO, DYN_REC_START1, DYN_REC_START2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, diff --git a/keyboards/xd75/keymaps/davidrambo/config.h b/keyboards/xd75/keymaps/davidrambo/config.h index f219147034d4..6e6349c7cf67 100644 --- a/keyboards/xd75/keymaps/davidrambo/config.h +++ b/keyboards/xd75/keymaps/davidrambo/config.h @@ -14,12 +14,9 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" +// place overrides here #define TAPPING_TERM 200 #define PERMISSIVE_HOLD - -#endif diff --git a/keyboards/xd75/keymaps/davidrambo/keymap.c b/keyboards/xd75/keymaps/davidrambo/keymap.c index 5d09dfa27cc6..7be197a81c71 100644 --- a/keyboards/xd75/keymaps/davidrambo/keymap.c +++ b/keyboards/xd75/keymaps/davidrambo/keymap.c @@ -1,53 +1,53 @@ -#include "xd75.h" +#include QMK_KEYBOARD_H //aliases for clarity in layering -#define _______ KC_TRNS #define A_BSPC LALT(KC_BSPC) // delete whole word in Mac -// #define C_BSPS LCTL(KC_BSPC) // delete whole word in PC; currently not in use +#define C_BSPC LCTL(KC_BSPC) // delete whole word in PC #define A_LEFT LALT(KC_LEFT) #define A_RGHT LALT(KC_RGHT) #define C_RGHT LCTL(KC_RGHT) #define C_LEFT LCTL(KC_LEFT) #define SftEnt SFT_T(KC_ENT) -#define GBSPC LGUI_T(KC_BSPC) -#define CBSPC LCTL_T(KC_BSPC) +#define BS_GUI LGUI_T(KC_BSPC) +#define BS_CTL LCTL_T(KC_BSPC) -//internet browser tab shortcuts and window swapping for Mac and Win +// internet browser tab shortcuts and window/application swapping for Mac and Win #define GSL LGUI(S(KC_LEFT)) // back one tab in Safari #define GSR LGUI(S(KC_RGHT)) // forward one tab in Safari #define CTLPGDN LCTL(KC_PGDN) // back one tab on Windows #define CTLPGUP LCTL(KC_PGUP) // forward one tab on Windows -#define G_TAB LGUI(KC_TAB) // MAC: switch applications -#define G_GRV LGUI(KC_GRV) // MAC: switch between windows within an application +#define G_TAB LGUI(KC_TAB) // Mac: switch applications +#define G_GRV LGUI(KC_GRV) // Mac: switch between windows within an application #define A_TAB LALT(KC_TAB) #define C_TAB LCTL(KC_TAB) -// -#define NAV LT(3, KC_TAB) -#define NAVPC LT(4, KC_TAB) +// navigation layers for both Mac OS X and Windows +#define NAV LT(4, KC_TAB) +#define NAVPC LT(5, KC_TAB) // Layer shorthand #define _COLEMAK 0 #define _PC 1 -#define _SYMBOL 2 //Function keys, numbers, symbols, Backlighting -#define _NAV 3 //Navigation Layer on Mac -#define _NAVPC 4 //Navigation Layer on Win +#define _GAME 2 // Gaming layer +#define _SYMBOL 3 // Function keys, numbers, symbols, Backlighting +#define _NAV 4 // Navigation Layer on Mac +#define _NAVPC 5 // Navigation Layer on Win -//tapdance declarations +// tapdance declarations enum { SFT_LCK }; -//alias for tapdance +// alias for tapdance #define SftLck TD(SFT_LCK) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* COLEMAK * .--------------------------------------------------------------------------------------------------------------------------------------. - * | `~ | 1 | 2 | 3 | 4 | 5 | - | SWITCH | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * | `~ | 1 | 2 | 3 | 4 | 5 | -_ | PC | =+ | 6 | 7 | 8 | 9 | 0 | BACKSP | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | ESC/`~ | Q | W | F | P | G | [ | \ | ] | J | L | U | Y | ; | BACKSP | + * | ESC/`~ | Q | W | F | P | G | [ | \| | ] | J | L | U | Y | ; | BACKSP | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| * | NAVTAB | A | S | D | F | G | PgUp |PlayPaus| ENTER | H | N | E | I | O | ' | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| @@ -57,24 +57,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [_COLEMAK] = { /* COLEMAK */ - { KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, TG(1) , KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC }, - { KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC }, - { NAV , KC_A, KC_R, KC_S, KC_T, KC_D, KC_PGUP, KC_ESC , KC_ENT , KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT }, - { SftLck , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_UP , KC_ENT , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt }, - { KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, GBSPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(2) , KC_RGUI, KC_RALT, KC_RCTL, BL_STEP }, - }, + [_COLEMAK] = LAYOUT_ortho_5x15( /* COLEMAK */ + KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, TG(1) , KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_BSLS, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + NAV , KC_A, KC_R, KC_S, KC_T, KC_D, KC_PGUP, KC_ESC , KC_ENT , KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + SftLck , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_UP , KC_ENT , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SftEnt , + KC_DEL , KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI, BS_GUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(3) , KC_RGUI, KC_RALT, KC_RCTL, BL_STEP + ), // Windows Layer: essentially swaps Control and GUI - [_PC] = { /* WINDOWS */ - { _______, _______, _______, _______, _______, _______, _______, TG(0) , _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { NAVPC , _______, _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, _______, _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______ }, - }, - + [_PC] = LAYOUT_ortho_5x15( /* WINDOWS */ + _______, _______, _______, _______, _______, _______, _______, TG(2) , _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + NAVPC , _______, _______, _______, _______, _______, _______, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LCTL, KC_LGUI, _______, KC_LCTL, BS_CTL , _______, _______, _______, _______, _______, KC_RCTL, KC_RALT, KC_RGUI, _______ + ), + + [_GAME] = LAYOUT_ortho_5x15( /* Gaming Layer */ + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_F10 , KC_F11 , KC_F12 , _______, _______, _______, _______, _______, TO(0) , + KC_ESC , KC_T , KC_Q , KC_W , KC_E , KC_R , KC_F7 , KC_F8 , KC_F9 , KC_Y , KC_U , KC_I , KC_O , KC_P , _______, + KC_TAB , KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_F4 , KC_F5 , KC_F6 , KC_H , KC_J , KC_K , KC_L , KC_SCLN, _______, + KC_LALT, KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_F1 , KC_F2 , KC_F3 , KC_N , KC_M , _______, _______, _______, KC_ENT , + _______, _______, _______, KC_G , KC_B , KC_SPC , KC_I , KC_M , _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______ + ), + /* SYMBOL * .--------------------------------------------------------------------------------------------------------------------------------------. * | F12 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | @@ -89,30 +97,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [_SYMBOL] = { /* SYMBOL */ - { _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , _______, _______, _______, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , _______}, - { KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , _______, _______, _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC}, - { _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL }, - { _______, KC_HOME, KC_END , BL_OFF , BL_ON , KC_F11 , _______, _______, _______, KC_F12 , KC_MINS, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, A_BSPC , _______, _______, _______, _______, _______, _______, _______, _______, _______}, - }, + [_SYMBOL] = LAYOUT_ortho_5x15( /* SYMBOL */ + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , _______, _______, _______, KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , + KC_LBRC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , _______, _______, _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_RBRC, + _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_EQL , + _______, KC_HOME, KC_END , BL_OFF , BL_ON , KC_F11 , _______, _______, _______, KC_F12 , KC_MINS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, A_BSPC , _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), - [_NAV] = { /* NAVIGATION for Mac */ - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, G_TAB , ABSPC , KC_HOME, KC_END , G_GRV , _______}, - { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - }, - - [_NAVPC] = { /* NAVIGATION FOR WINDOWS: replaces Alt with Control, GUI with Alt, and browser tab shortcuts*/ - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , C_LEFT, KC_UP, C_RGHT , KC_DEL , _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, CTLPGUP, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGDN, _______}, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , CBSPC , KC_HOME, KC_END , _______, _______}, - { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - } + [_NAV] = LAYOUT_ortho_5x15( /* NAVIGATION for Mac */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , A_LEFT, KC_UP, A_RGHT , KC_DEL , _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, GSL , KC_LEFT, KC_DOWN, KC_RGHT, GSR , _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, G_TAB , A_BSPC , KC_HOME, KC_END , G_GRV , _______, + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_NAVPC] = LAYOUT_ortho_5x15( /* NAVIGATION FOR WINDOWS: replaces Alt with Control, GUI with Alt, and browser tab shortcuts*/ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, C_TAB , C_LEFT, KC_UP, C_RGHT , KC_DEL , _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, CTLPGUP, KC_LEFT, KC_DOWN, KC_RGHT, CTLPGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, A_TAB , C_BSPC , KC_HOME, KC_END , _______, _______, + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; // Shift vs capslock function. From bbaserdem's Planck keymap. diff --git a/keyboards/xd75/keymaps/davidrambo/readme.md b/keyboards/xd75/keymaps/davidrambo/readme.md index 17b928c501f1..a53abc8afc87 100644 --- a/keyboards/xd75/keymaps/davidrambo/readme.md +++ b/keyboards/xd75/keymaps/davidrambo/readme.md @@ -1,4 +1,7 @@ -# A Colemak layout for XD75 with both Mac and Windows layers. -# These two layers share momentary toggle access to a "Symbol" layer, which is modeled after my Planck layout. -# Each of the base Colemak layers have their own Navigation layers for the right hand to use arrows and shortcuts for both text editing and web browsing. -# The rules.mk file overrides the XD75's "BACKLIGHT_ENABLE" with YES and also adds tap dance functionality. \ No newline at end of file +# XD75 + +This is a Colemak layout for XD75 with both Mac and Windows layers. +These two layers share momentary toggle access to a "Symbol" layer, which is modeled after my Planck layout (see planck/keymaps/davidrambo). +Each of the base Colemak layers have their own Navigation layers for the right hand to use arrows and shortcuts for both text editing and web browsing. + +The rules.mk file overrides the XD75's "BACKLIGHT_ENABLE" with YES and also adds tap dance functionality. \ No newline at end of file diff --git a/keyboards/xd75/keymaps/default/config.h b/keyboards/xd75/keymaps/default/config.h index 015377b5f8f7..e6975da8a201 100644 --- a/keyboards/xd75/keymaps/default/config.h +++ b/keyboards/xd75/keymaps/default/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/default/keymap.c b/keyboards/xd75/keymaps/default/keymap.c index 03f605385320..0e5c7dbaaaff 100644 --- a/keyboards/xd75/keymaps/default/keymap.c +++ b/keyboards/xd75/keymaps/default/keymap.c @@ -13,12 +13,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H // Layer shorthand #define _QW 0 #define _FN 1 +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY @@ -35,13 +41,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '--------------------------------------------------------------------------------------------------------------------------------------' */ - [_QW] = { /* QWERTY */ - { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC }, - { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT }, - { KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT }, - { KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL }, - }, + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL + ), /* FUNCTION * .--------------------------------------------------------------------------------------------------------------------------------------. @@ -56,30 +62,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | RGB TG | FN | RGB RMD| RGB MD | P0 | | P. | PENT | PENT | FN | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ - - [_FN] = { /* FUNCTION */ - { KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, - { KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS }, - { KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______ }, - { KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______ }, - { _______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______ }, - } + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, + KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______, + KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______, + _______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______ + ) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - break; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released } - return MACRO_NONE; -}; + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/xd75/keymaps/developper_bepo/config.h b/keyboards/xd75/keymaps/developper_bepo/config.h index 78357b5bc4fc..0183e024271b 100644 --- a/keyboards/xd75/keymaps/developper_bepo/config.h +++ b/keyboards/xd75/keymaps/developper_bepo/config.h @@ -16,4 +16,4 @@ #pragma once -#include "../../config.h" +// place overrides here diff --git a/keyboards/xd75/keymaps/developper_bepo/README.md b/keyboards/xd75/keymaps/developper_bepo/readme.md similarity index 100% rename from keyboards/xd75/keymaps/developper_bepo/README.md rename to keyboards/xd75/keymaps/developper_bepo/readme.md diff --git a/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h b/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h index 015377b5f8f7..e6975da8a201 100644 --- a/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h +++ b/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c b/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c index 594e5c41cfa1..cf4bfb4dc5a1 100644 --- a/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c +++ b/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H enum planck_keycodes { DUMMY = SAFE_RANGE, diff --git a/keyboards/xd75/keymaps/emilyh/config.h b/keyboards/xd75/keymaps/emilyh/config.h index f52a97bbc865..a72596783dd1 100644 --- a/keyboards/xd75/keymaps/emilyh/config.h +++ b/keyboards/xd75/keymaps/emilyh/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/emilyh/keymap.c b/keyboards/xd75/keymaps/emilyh/keymap.c index 04c239636d5c..bea9863d5bc7 100644 --- a/keyboards/xd75/keymaps/emilyh/keymap.c +++ b/keyboards/xd75/keymaps/emilyh/keymap.c @@ -13,13 +13,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H #include "backlight.h" // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _QW 0 diff --git a/keyboards/xd75/keymaps/fabian/config.h b/keyboards/xd75/keymaps/fabian/config.h index 59de3fa55f65..a72596783dd1 100644 --- a/keyboards/xd75/keymaps/fabian/config.h +++ b/keyboards/xd75/keymaps/fabian/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/fabian/keymap.c b/keyboards/xd75/keymaps/fabian/keymap.c index 3a330ca96dd0..7c515626868b 100644 --- a/keyboards/xd75/keymaps/fabian/keymap.c +++ b/keyboards/xd75/keymaps/fabian/keymap.c @@ -41,9 +41,6 @@ enum custom_keycodes { EXT_PLV }; -#define XXXXXXX KC_NO -#define _______ KC_TRNS - #define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift) #define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift) diff --git a/keyboards/xd75/keymaps/french/config.h b/keyboards/xd75/keymaps/french/config.h index 015377b5f8f7..e6975da8a201 100644 --- a/keyboards/xd75/keymaps/french/config.h +++ b/keyboards/xd75/keymaps/french/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/french/keymap.c b/keyboards/xd75/keymaps/french/keymap.c index 1ffec2202ef7..547a67b6efd3 100644 --- a/keyboards/xd75/keymaps/french/keymap.c +++ b/keyboards/xd75/keymaps/french/keymap.c @@ -1,5 +1,5 @@ #include "keymap_french.c" -#include "xd75.h" +#include QMK_KEYBOARD_H // Layer shorthand diff --git a/keyboards/xd75/keymaps/french/README.md b/keyboards/xd75/keymaps/french/readme.md similarity index 100% rename from keyboards/xd75/keymaps/french/README.md rename to keyboards/xd75/keymaps/french/readme.md diff --git a/keyboards/xd75/keymaps/germanized/config.h b/keyboards/xd75/keymaps/germanized/config.h index dd3f32275be7..65ab6a0dcba4 100644 --- a/keyboards/xd75/keymaps/germanized/config.h +++ b/keyboards/xd75/keymaps/germanized/config.h @@ -14,10 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here @@ -118,4 +115,3 @@ // Launchy #define ALT_SPC LALT(KC_SPC) -#endif diff --git a/keyboards/xd75/keymaps/germanized/keymap.c b/keyboards/xd75/keymaps/germanized/keymap.c index b7c9620c13d2..bba1172eca65 100644 --- a/keyboards/xd75/keymaps/germanized/keymap.c +++ b/keyboards/xd75/keymaps/germanized/keymap.c @@ -1,6 +1,6 @@ /* Copyright 2017 Kolja Brauns */ -#include "xd75.h" +#include QMK_KEYBOARD_H #ifndef KEYMAP_GERMAN #define KEYMAP_GERMAN diff --git a/keyboards/xd75/keymaps/kim-kim-xd73/config.h b/keyboards/xd75/keymaps/kim-kim-xd73/config.h index e2390f770cbe..0c8015e22714 100644 --- a/keyboards/xd75/keymaps/kim-kim-xd73/config.h +++ b/keyboards/xd75/keymaps/kim-kim-xd73/config.h @@ -14,12 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H +#pragma once // place overrides here #undef BACKLIGHT_BREATHING - -#endif diff --git a/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c b/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c index 8820b4ef5072..61e5c73ab309 100644 --- a/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c +++ b/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c @@ -16,9 +16,7 @@ #include QMK_KEYBOARD_H // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _QW 0 diff --git a/keyboards/xd75/keymaps/kim-kim/config.h b/keyboards/xd75/keymaps/kim-kim/config.h index e2390f770cbe..0c8015e22714 100644 --- a/keyboards/xd75/keymaps/kim-kim/config.h +++ b/keyboards/xd75/keymaps/kim-kim/config.h @@ -14,12 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H +#pragma once // place overrides here #undef BACKLIGHT_BREATHING - -#endif diff --git a/keyboards/xd75/keymaps/kim-kim/keymap.c b/keyboards/xd75/keymaps/kim-kim/keymap.c index c67ce2287182..f46c0b659067 100644 --- a/keyboards/xd75/keymaps/kim-kim/keymap.c +++ b/keyboards/xd75/keymaps/kim-kim/keymap.c @@ -16,9 +16,7 @@ #include QMK_KEYBOARD_H // Fillers to make layering more clear -#define _______ KC_TRNS #define ___T___ KC_TRNS -#define XXXXXXX KC_NO // Layer shorthand #define _QW 0 diff --git a/keyboards/xd75/keymaps/kloki/config.h b/keyboards/xd75/keymaps/kloki/config.h index 015377b5f8f7..e6975da8a201 100644 --- a/keyboards/xd75/keymaps/kloki/config.h +++ b/keyboards/xd75/keymaps/kloki/config.h @@ -14,11 +14,6 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here - -#endif diff --git a/keyboards/xd75/keymaps/kloki/keymap.c b/keyboards/xd75/keymaps/kloki/keymap.c index 340d9a8dc63a..b9bb2c66d416 100644 --- a/keyboards/xd75/keymaps/kloki/keymap.c +++ b/keyboards/xd75/keymaps/kloki/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H // Layer shorthand #define _WO 0 diff --git a/keyboards/xd75/keymaps/markus/config.h b/keyboards/xd75/keymaps/markus/config.h index bde866636f64..a3e1631715d2 100644 --- a/keyboards/xd75/keymaps/markus/config.h +++ b/keyboards/xd75/keymaps/markus/config.h @@ -1,4 +1,4 @@ -/* Copyright 2018 Markus Weimar +/* Copyright 2019 Markus Weimar * * 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 @@ -14,21 +14,35 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H +#pragma once // place overrides here -// Mousekeys -#define MOUSEKEY_MOVE_DELTA 1 -#define MOUSEKEY_WHEEL_DELTA 1 -#define MOUSEKEY_DELAY 90 -#define MOUSEKEY_INTERVAL 16 -#define MOUSEKEY_MAX_SPEED 20 -#define MOUSEKEY_TIME_TO_MAX 0 -#define MOUSEKEY_WHEEL_MAX_SPEED 1 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 - -#endif +// Mouse keys (accelerated) +//#define MOUSEKEY_MOVE_DELTA 1 +//#define MOUSEKEY_WHEEL_DELTA 1 +//#define MOUSEKEY_DELAY 90 +//#define MOUSEKEY_INTERVAL 16 +//#define MOUSEKEY_MAX_SPEED 20 +//#define MOUSEKEY_TIME_TO_MAX 0 +//#define MOUSEKEY_WHEEL_MAX_SPEED 1 +//#define MOUSEKEY_WHEEL_TIME_TO_MAX 0 +// Mouse keys (constant) +#define MK_3_SPEED +#define MK_MOMENTARY_ACCEL +#define MK_C_OFFSET_UNMOD 18 +#define MK_C_INTERVAL_UNMOD 16 +#define MK_C_OFFSET_0 2 +#define MK_C_INTERVAL_0 16 +#define MK_C_OFFSET_1 6 +#define MK_C_INTERVAL_1 16 +#define MK_C_OFFSET_2 36 +#define MK_C_INTERVAL_2 16 +#define MK_W_OFFSET_UNMOD 1 +#define MK_W_INTERVAL_UNMOD 40 +#define MK_W_OFFSET_0 1 +#define MK_W_INTERVAL_0 360 +#define MK_W_OFFSET_1 1 +#define MK_W_INTERVAL_1 120 +#define MK_W_OFFSET_2 1 +#define MK_W_INTERVAL_2 20 diff --git a/keyboards/xd75/keymaps/markus/keymap.c b/keyboards/xd75/keymaps/markus/keymap.c index e61fb09b1b96..9b8ab52fc358 100644 --- a/keyboards/xd75/keymaps/markus/keymap.c +++ b/keyboards/xd75/keymaps/markus/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2018 Markus Weimar +/* Copyright 2019 Markus Weimar * * 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 @@ -14,35 +14,34 @@ * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H #include "keymap_german.h" #define ________ KC_TRNS #define ___xx___ KC_NO -#define NKRO_TG MAGIC_TOGGLE_NKRO enum my_layers { - _QWZ, - _QWY, - _GAM, - _FN1, - _FN2, - _FN3, + _QWZ, + _QWY, + _GAM, + _FN1, + _FN2, + _FN3, }; enum my_keycodes { - QWERTZ = SAFE_RANGE, - QWERTY, - GAMING, - FN1, - FN2, - FN3 + QWERTZ = SAFE_RANGE, + QWERTY, + GAMING, + FN1, + FN2, + FN3 }; enum my_ucis { - UNI_LNX, - UNI_MAC, - UNI_WIN, + UNI_LNX, + UNI_MAC, + UNI_WIN, }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -118,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | | " | ' | ‚ | ‘ | ’ | | | | | | [ | ] | ! | ? | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | ° | ^ | „ | “ | ” | | | | # | < | > | … | – | | + * | | ° | ^ | „ | “ | ” | | | | # | < | > | … | – EN | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | | | | | | | | | | | | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' @@ -133,19 +132,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* FN2 * .--------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | % | ( | ) | P/ | P* | P- | Print | Scroll | Pause | ẞ | | + * | | | | | % | ( | ) | P/ | P* | P- | Print | Scroll | Pause | ẞ | − MNS | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | | | Mute | Vol- | Vol+ | Bspc | P7 | P8 | P9 | P+ | WH_U | MS_U | WH_D | × | ÷ | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | App | ACL0 | ACL1 | ACL2 | Space | P4 | P5 | P6 | WH_L | MS_L | MS_D | MS_R | WH_R | | + * | | App | ACL2 | ACL1 | ACL0 | Space | P4 | P5 | P6 | WH_L | MS_L | MS_D | MS_R | WH_R | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | Prev | Play | Next | Tab | P1 | P2 | P3 | PEnter | BTN1 | BTN2 | BTN3 | — | | + * | | | Prev | Play | Next | Tab | P1 | P2 | P3 | PEnter | BTN1 | BTN2 | BTN3 | — EM | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | Fn2 | | | | | PEnter | P0 | . : | P, | BTN1 | BTN2 | BTN3 | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ [_FN2] = { -{ ___xx___, ___xx___, ___xx___, ___xx___, DE_PERC, DE_LPRN, DE_RPRN, KC_PSLS, KC_PAST, KC_PMNS, KC_PSCR, KC_LSCR, KC_PAUS, UC(L'ẞ'), ___xx___ }, +{ ___xx___, ___xx___, ___xx___, ___xx___, DE_PERC, DE_LPRN, DE_RPRN, KC_PSLS, KC_PAST, KC_PMNS, KC_PSCR, KC_LSCR, KC_PAUS, UC(L'ẞ'), UC(L'−') }, { ________, ___xx___, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_WH_U, KC_MS_U, KC_WH_D, UC(L'×'), UC(L'÷') }, { ________, KC_APP, KC_ACL2, KC_ACL1, KC_ACL0, KC_SPC, KC_P4, KC_P5, KC_P6, KC_WH_L, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_R, ________ }, { ________, ___xx___, KC_MPRV, KC_MPLY, KC_MNXT, KC_TAB, KC_P1, KC_P2, KC_P3, KC_PENT, KC_BTN1, KC_BTN2, KC_BTN3, UC(L'—'), ________ }, @@ -156,61 +155,61 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * .--------------------------------------------------------------------------------------------------------------------------------------. * | F13 | F14 | F15 | F16 | F17 | F18 | U LNX | U WIN | U MAC | F19 | F20 | F21 | F22 | F23 | F24 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | QWERTZ | QWERTY | | NKRO | ThinSp | L TOG | L MP | L MOD | | Pg Up | Up | Pg Dn | | | + * | | QWERTZ | QWERTY | GAMING | | | L TOG | L MP | L MOD | | Pg Up | Up | Pg Dn | | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | NaNbSp | | › | ‹ | GAMING | L HUI | L SAI | L VAI | Home | Left | Down | Right | End | | + * | | | | › | ‹ | | L HUI | L SAI | L VAI | Home | Left | Down | Right | End | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | » | « | | L HUD | L SAD | L VAD | FigSp | | | | NbHyph | | + * | | | | » | « | | L HUD | L SAD | L VAD | NumSp | ThinSp | NaNbSp | NbSp | NbHyph | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | Reset | | NbSp | | | | | | + * | | | | | | | | Reset | | | | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ [_FN3] = { { KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, UNI_LNX, UNI_WIN, UNI_MAC, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24 }, -{ ________, QWERTZ, QWERTY, ___xx___, NKRO_TG, UC(L' '), RGB_TOG, RGB_M_P, RGB_MOD, ___xx___, KC_PGUP, KC_UP, KC_PGDN, ___xx___, ___xx___ }, -{ ________, UC(L' '), ___xx___, UC(L'›'), UC(L'‹'), GAMING, RGB_HUI, RGB_SAI, RGB_VAI, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, ________ }, -{ ________, ___xx___, ___xx___, UC(L'»'), UC(L'«'), ___xx___, RGB_HUD, RGB_SAD, RGB_VAD, UC(L' '), ___xx___, ___xx___, ___xx___, UC(L'‑'), ________ }, -{ ___xx___, ________, ________, ________, ________, ________, ________, RESET, ________, UC(L' '), ________, ________, ________, ________, ________ }, +{ ________, QWERTZ, QWERTY, GAMING, ___xx___, ___xx___, RGB_TOG, RGB_M_P, RGB_MOD, ___xx___, KC_PGUP, KC_UP, KC_PGDN, ___xx___, ___xx___ }, +{ ________, ___xx___, ___xx___, UC(L'›'), UC(L'‹'), ___xx___, RGB_HUI, RGB_SAI, RGB_VAI, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, ________ }, +{ ________, ___xx___, ___xx___, UC(L'»'), UC(L'«'), ___xx___, RGB_HUD, RGB_SAD, RGB_VAD, UC(L' '), UC(L' '), UC(L' '), UC(L' '), UC(L'‑'), ________ }, +{ ___xx___, ________, ________, ________, ________, ________, ________, RESET, ________, ________, ________, ________, ________, ________, ________ }, }, }; void matrix_init_user(){ - set_unicode_input_mode(UC_LNX); + set_unicode_input_mode(UC_LNX); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case QWERTZ: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWZ); - } - return false; - break; - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWY); - } - return false; - break; - case GAMING: - if (record->event.pressed) { - set_single_persistent_default_layer(_GAM); - } - return false; - break; - case UNI_LNX: - set_unicode_input_mode(UC_LNX); - return false; - break; - case UNI_WIN: - set_unicode_input_mode(UC_WINC); - return false; - break; - case UNI_MAC: - set_unicode_input_mode(UC_OSX); - return false; - break; - } - return true; + switch(keycode) { + case QWERTZ: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWZ); + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWY); + } + return false; + break; + case GAMING: + if (record->event.pressed) { + set_single_persistent_default_layer(_GAM); + } + return false; + break; + case UNI_LNX: + set_unicode_input_mode(UC_LNX); + return false; + break; + case UNI_WIN: + set_unicode_input_mode(UC_WINC); + return false; + break; + case UNI_MAC: + set_unicode_input_mode(UC_OSX); + return false; + break; + } + return true; } diff --git a/keyboards/xd75/keymaps/markus/readme.md b/keyboards/xd75/keymaps/markus/readme.md index 926281240559..fc5959bcdc75 100644 --- a/keyboards/xd75/keymaps/markus/readme.md +++ b/keyboards/xd75/keymaps/markus/readme.md @@ -2,15 +2,15 @@ This keymap has three base layers (QWERTZ, QWERTY, Gaming) and three function layers (Fn1, Fn2, Fn3). -QWERTY is identical to QWERTZ except `z` and `y` are swapped. +QWERTY is identical to QWERTZ, except `z` and `y` are swapped. Gaming is a modified QWERTY layer for left-hand usage. The function layers contain: -* Symbols (standard and Unicode) +* Symbols +* Unicode characters (e.g. dashes, figure space, non-breaking space and hyphen) * Unicode input mode switches * Numpad * Function keys -* Media, mouse, LED control -* Non-breaking characters +* Media, mouse and LED controls diff --git a/keyboards/xd75/keymaps/markus/rules.mk b/keyboards/xd75/keymaps/markus/rules.mk index d0ed9a73ae15..22befc53496a 100644 --- a/keyboards/xd75/keymaps/markus/rules.mk +++ b/keyboards/xd75/keymaps/markus/rules.mk @@ -1,23 +1,13 @@ -# 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 -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # 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 -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODEMAP_ENABLE = no # This allows sending unicode symbols using X() in your keymap. -UNICODE_ENABLE = yes # Unicode -UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for details on Windows). -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +NKRO_ENABLE = yes +BACKLIGHT_ENABLE = no +MIDI_ENABLE = no +AUDIO_ENABLE = no +UNICODE_ENABLE = yes +BLUETOOTH_ENABLE = no +RGBLIGHT_ENABLE = yes +SLEEP_LED_ENABLE = no diff --git a/keyboards/xd75/keymaps/msiu/config.h b/keyboards/xd75/keymaps/msiu/config.h new file mode 100644 index 000000000000..4fbd59becc80 --- /dev/null +++ b/keyboards/xd75/keymaps/msiu/config.h @@ -0,0 +1,18 @@ +/* Copyright 2017 Benjamin Kesselring + * + * 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 . + */ + +#pragma once +// place overrides here diff --git a/keyboards/xd75/keymaps/msiu/keymap.c b/keyboards/xd75/keymaps/msiu/keymap.c new file mode 100644 index 000000000000..c4cc456a9079 --- /dev/null +++ b/keyboards/xd75/keymaps/msiu/keymap.c @@ -0,0 +1,120 @@ +/* Copyright 2017 Benjamin Kesselring + * + * 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 . + */ + +/* What this layout is: QWERTY layout with the standard 40% layers. For easy + * switching between my xd75 and contra + */ + +#include QMK_KEYBOARD_H + +// Layer shorthand +#define _QW 0 +#define _DV 1 +#define _LW 2 +#define _RS 3 +#define _FN 4 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | - | = | \ | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | TAB | Q | W | E | R | T | 7 | 8 | 9 | Y | U | I | O | P | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ESC | A | S | D | F | G | 4 | 5 | 6 | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LSHIFT | Z | X | C | V | B | 1 | 2 | 3 | N | M | , | . | / | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | HYPER | LALT | LGUI | LOWER | FN | 0 | | . | SPACE | RAISE | LEFT | DOWN | UP | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = { /* QWERTY */ + { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_PLUS, KC_MINS, KC_ASTR, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC }, + { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_8, KC_9 , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL }, + { LCTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_4, KC_5, KC_6 , 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_1, KC_2, KC_3 , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + { KC_LCTL, KC_HYPR, KC_LALT, KC_LGUI, MO(_LW), MO(_FN), KC_0, _______, KC_DOT , KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }, + }, + + /* Dvorak */ + + [_DV] = { /* Dvorak */ + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, _______, _______, _______, KC_F, KC_G, KC_C, KC_R, KC_L, _______ }, + { _______, KC_A, KC_O, KC_E, KC_U, KC_I, _______, _______, _______, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH }, + { _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, _______, _______, _______, KC_B, KC_M, KC_W, KC_V, KC_Z, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, + + +/* LOWERED + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ~ | ! | @ | # | $ | % | | VOLU | | ^ | & | * | ( | ) | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F1 | F2 | F3 | F4 | F5 | PREV | PLAY | NEXT | F6 | _ | + | { | } | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | | F7 | F8 | F9 | F10 | F11 | | VOLD | | F12 | PAGEDW | PAGEUP | HOME | END | MUTE | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | MUTE | | PLAY | | PREV | VOLD | VOLU | NEXT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_LW] = { /* LOWERED */ + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL }, + { KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, KC_VOLU, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MPRV, KC_MPLY, KC_MNXT, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE }, + { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_VOLD, _______, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE }, + { _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT }, + }, + +/* RAISED + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ` | 1 | 2 | 3 | 4 | 5 | | VOLU | | 6 | 7 | 8 | 9 | 0 | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F1 | F2 | F3 | F4 | F5 | PREV | PLAY | NEXT | F6 | - | = | [ | ] | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F7 | F8 | F9 | F10 | F11 | | VOLD | | F12 | PAGEUP | PAGEDW | HOME | END | MUTE | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | MUTE | | PLAY | | PREV | VOLD | VOLU | NEXT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_RS] = { /* RAISED */ + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL }, + { KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_VOLU, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL }, + { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MPRV, KC_MPLY, KC_MNXT, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS }, + { _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, KC_VOLD, _______, KC_F12, KC_PGDN, KC_PGUP, KC_HOME, KC_END , KC_MUTE }, + { _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, KC_MPLY, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT }, + }, + +/* FUNCTION */ + + [_FN] = { /* FUNCTION */ + { RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, KC_PSCR, _______ }, + { _______, _______, _______, TO(_DV), TO(_QW), _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______ }, + { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + { RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + }, +}; + + diff --git a/keyboards/xd75/keymaps/msiu/readme.md b/keyboards/xd75/keymaps/msiu/readme.md new file mode 100644 index 000000000000..d53c0f34a87a --- /dev/null +++ b/keyboards/xd75/keymaps/msiu/readme.md @@ -0,0 +1 @@ +# The default keymap for xd75 diff --git a/keyboards/xd75/keymaps/mtdjr/config.h b/keyboards/xd75/keymaps/mtdjr/config.h index 7e2227c874d8..0ceba236fed4 100644 --- a/keyboards/xd75/keymaps/mtdjr/config.h +++ b/keyboards/xd75/keymaps/mtdjr/config.h @@ -14,10 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here #undef MANUFACTURER @@ -25,5 +22,3 @@ #define MANUFACTURER mtdjr #define PRODUCT XD75 #define DESCRIPTION XD75Re - -#endif diff --git a/keyboards/xd75/keymaps/mtdjr/keymap.c b/keyboards/xd75/keymaps/mtdjr/keymap.c index 074cf7335a3a..e56d918fd5f4 100644 --- a/keyboards/xd75/keymaps/mtdjr/keymap.c +++ b/keyboards/xd75/keymaps/mtdjr/keymap.c @@ -3,7 +3,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KC_KEYMAP( + [_QWERTY] = LAYOUT_kc( // .--------------------------------------------------------------------------. EXC, 1 , 2 , 3 , 4 , 5 ,PGUP,MPNT,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' ), - [_LOWER] = KC_KEYMAP( + [_LOWER] = LAYOUT_kc( // .--------------------------------------------------------------------------. xxxx, F1 , F2 , F3 , F4 , F5 , F6 ,xxxx, F7 , F8 , F9 , F10, F11, F12, DEL, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' ), -[_RAISE] = KC_KEYMAP( +[_RAISE] = LAYOUT_kc( // .--------------------------------------------------------------------------. xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| diff --git a/keyboards/xd75/keymaps/tdl-jturner/config.h b/keyboards/xd75/keymaps/tdl-jturner/config.h index 985247bb2e3f..596aaff66597 100644 --- a/keyboards/xd75/keymaps/tdl-jturner/config.h +++ b/keyboards/xd75/keymaps/tdl-jturner/config.h @@ -16,10 +16,9 @@ // additional config optoinsa vailable at https://docs.qmk.fm/reference/config-options#the-config.h-file -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" +// place overrides here // place overrides here //#define TAPPING_TERM 200 @@ -33,5 +32,3 @@ #define MOUSEKEY_TIME_TO_MAX 60 #define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 - -#endif diff --git a/keyboards/xd75/keymaps/tdl-jturner/keymap.c b/keyboards/xd75/keymaps/tdl-jturner/keymap.c index 9789d9a8678b..593e54f14d7d 100644 --- a/keyboards/xd75/keymaps/tdl-jturner/keymap.c +++ b/keyboards/xd75/keymaps/tdl-jturner/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "xd75.h" +#include QMK_KEYBOARD_H enum xd75_layers { _QWERTY, diff --git a/keyboards/xd75/readme.md b/keyboards/xd75/readme.md index e11ce7dca9a4..fc5b8972c85a 100644 --- a/keyboards/xd75/readme.md +++ b/keyboards/xd75/readme.md @@ -1,32 +1,25 @@ -xd75 keyboard firmware -====================== +# XD75 -The XD75Re is a 15x5 full-grid ortholinear keyboard manufactured by XIUDI. This port of the QMK firmware is my first shot at using QMK, so if you see any features done wrong (or just plain missing), feel free to fix them and put in a pull request! +![XD75](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB1MzOISXXXXXXgXpXXq6xXFXXXO_1024x1024.jpg) -## Quantum MK Firmware +The XD75Re is a 15x5 full-grid ortholinear keyboard manufactured by XIUDI. This port of the QMK firmware is my first shot at using QMK, so if you see any features done wrong (or just plain missing), feel free to fix them and put in a pull request! -For more info on this firmware (and how to make it your own), head over to [qmk.fm](http://qmk.fm). +Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +Hardware Supported: XD75Re +Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd75re-xd75am-xd75-xiudi-60-custom-keyboard-pcb), [AliExpress](https://www.aliexpress.com/item/xd75re-Custom-Mechanical-Keyboard-75-keys-TKG-TOOLS-Underglow-RGB-PCB-GH60-60-programmed-gh60-kle/32818745981.html) -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the -keyboards/xd75 folder. Once your dev env is setup, you'll be able to -type `make` to generate your .hex - you can then use the Teensy Loader -to install the resulting .hex file, or have the `make` process install -it using DFU. + make xd75:default -### Default +Flashing example: -To build with the default keymap, simply run `make xd75:default` from the root directory (i.e. two levels above this file), and to install via DFU, `make xd75:default:dfu`, also from the root directory. + make xd75:default:dfu -Note that DFU is likely to require root permissions, so installing the -firmware likely requires a command line like: +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). -``` -$ sudo make xd75:default:dfu -``` -### LED control +## LED control There are 3 individual LEDs that can be turned on and off, plus the keycap LEDs (which are all wired into the same pin). The functions are named according to how they're labeled on the PCB. @@ -65,23 +58,3 @@ GP103_LED F4 KEYCAPS_LED F5 GP100_LED F7 ``` - -### Other Keymaps - -The "default" keymap included is basically the OLKB Atomic keymap with -a few buttons added for RGB underglow control. This should be usable -as a starting point, but most people will be best served creating -their own keymap and flashing it - more info on creating your own -keymap is available in [the official QMK -documentation](https://docs.qmk.fm). - -Keymaps follow the format **__\.c__** and are stored in -subdirectories under `keyboards/xd75/keymaps` - -To build the firmware binary hex file for a specific keymap, and -install it, using DFU, just do `make` with a keymap like this: - -``` -$ make xd75:[default|] -``` - diff --git a/keyboards/xd75/xd75.h b/keyboards/xd75/xd75.h index e278066900c9..c27930a8453f 100644 --- a/keyboards/xd75/xd75.h +++ b/keyboards/xd75/xd75.h @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef XD75_H -#define XD75_H +#pragma once #include "quantum.h" @@ -22,7 +21,7 @@ // The following is an example using the Planck MIT layout // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ +#define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\ @@ -36,7 +35,7 @@ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E } \ } -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\ @@ -50,7 +49,7 @@ { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \ } -#define LAYOUT_ortho_5x15 KEYMAP +#define LAYOUT_ortho_5x15 LAYOUT void capslock_led_init(void); void capslock_led_off(void); @@ -67,5 +66,3 @@ void gp103_led_on(void); void keycaps_led_init(void); void keycaps_led_off(void); void keycaps_led_on(void); - -#endif diff --git a/keyboards/xd84/config.h b/keyboards/xd84/config.h new file mode 100644 index 000000000000..abb9f17a580b --- /dev/null +++ b/keyboards/xd84/config.h @@ -0,0 +1,243 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x4084 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPrepublic +#define PRODUCT XD84 +#define DESCRIPTION KPrepublic XD84 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +//#define MATRIX_ROW_PINS { D0, D5 } +//#define MATRIX_COL_PINS { F1, F0, B0 } +//#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +//#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 10 +// #define BACKLIGHT_BREATHING + +#define RGB_DI_PIN C7 +#define RGBLED_NUM 7 +#define RGBLIGHT_ANIMATIONS +// #ifdef RGB_DI_PIN +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +// LTO options +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/xd84/custom_matrix_helper.c b/keyboards/xd84/custom_matrix_helper.c new file mode 100644 index 000000000000..a6a0a041d9da --- /dev/null +++ b/keyboards/xd84/custom_matrix_helper.c @@ -0,0 +1,112 @@ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +//_____COMMON__________________________________________________________________ +// user-defined overridable functions +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } +__attribute__((weak)) void matrix_init_user(void) {} +__attribute__((weak)) void matrix_scan_user(void) {} + + +//_____COULD BE COMMON_________________________________________________________ +/* matrix state(1:on, 0:off) */ +/*static*/ matrix_row_t raw_matrix[MATRIX_ROWS]; +/*static*/ matrix_row_t matrix[MATRIX_ROWS]; + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +__attribute__ ((weak)) +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +__attribute__ ((weak)) +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +__attribute__ ((weak)) +matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +__attribute__ ((weak)) +uint8_t matrix_key_count(void) { + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += matrix_bitpop(i); + } + return count; +} + +__attribute__ ((weak)) +void matrix_print(void) { + print_matrix_header(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); print(": "); + print_matrix_row(row); + print("\n"); + } +} + + +//_____CUSTOM MATRIX 'LITE'____________________________________________________ +__attribute__ ((weak)) +void custom_matrix_init(void) { +} + +__attribute__ ((weak)) +bool custom_matrix_scan(matrix_row_t current_matrix[]) { + bool changed = true; + return changed; +} + +__attribute__ ((weak)) +void matrix_init(void) { + + custom_matrix_init(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +__attribute__ ((weak)) +uint8_t matrix_scan(void) { + bool changed = custom_matrix_scan(raw_matrix); + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + return 1; +} diff --git a/keyboards/xd84/dev.md b/keyboards/xd84/dev.md new file mode 100644 index 000000000000..536b01d06ba5 --- /dev/null +++ b/keyboards/xd84/dev.md @@ -0,0 +1,136 @@ +# XD84 + +Development docs covering the following: +- Kimera core +- RGB +- Backlight +- Light Through Cat + +## Kimera core +![Kimera core](https://gd2.alicdn.com/imgextra/i4/159916802/TB2qsIgdrJkpuFjy1zcXXa5FFXa_!!159916802.jpg) + +What little available info that was available for the qmk port +- atmega32u4 16Mhz + - board seems to have a 6Mhz crystal +- 2x PCA9555 I2C IO expander + +Links: +- [Schematic, BOM, Gerbers](/kairyu/kimera/blob/master/kimera_core) +- [Original firmware](https://github.com/kairyu/tmk_keyboard_custom/tree/master/keyboard/kimera) + +```c +/* +Kimera_core_v1.0 Components + + U1 (atmega32u4) + ,----------------. + TX --| TX0(PD3) RAW |-- + RX --| RX1(PD2) GND |-- + --| GND RESET |-- RST + --| GND VCC |-- + SDA --| 2(PD1) (PF4)A3 |-- + SCL --| 3(PD0) (PF5)A2 |-- + (INT) --| 4(PD4) (PF6)A1 |-- + --| 5(PC6) (PF7)A0 |-- + --| 6(PD7) (PB1)15 |-- SCK + LED2 --| 7(PE6) (PB3)14 |-- MISO + LED1 --| 8(PB4) (PB2)16 |-- MOSI + LED3 --| 9(PB5) (PB6)10 |-- LED4 + `----------------' + + IC1 (PCA9555) IC2 (PCA9555) + ,----------. ,----------. + SDA --| SDA P00 |-- P1 SDA --| SDA P00 |-- P17 + SCL --| SCL P01 |-- P2 SCL --| SCL P01 |-- P18 + INT --| INT P02 |-- P3 INT --| INT P02 |-- P19 + | P03 |-- P4 | P03 |-- P20 + GND --| A0 P04 |-- P5 VCC --| A0 P04 |-- P21 + SJ1 --| A1 P05 |-- P6 SJ1 --| A1 P05 |-- P22 + SJ2 --| A2 P06 |-- P7 SJ2 --| A2 P06 |-- P23 + | P07 |-- P8 | P07 |-- P24 + | | | | + | P10 |-- P9 | P10 |-- P25 + | P11 |-- P10 | P11 |-- P26 + | P12 |-- P11 | P12 |-- P27 + | P13 |-- P12 | P13 |-- P28 + | P14 |-- P13 | P14 |-- P29 + | P15 |-- P14 | P15 |-- P30 + | P16 |-- P15 | P16 |-- P31 + | P17 |-- P16 | P17 |-- P32 + `----------' `----------' +*/ + +``` + +### Bootloader +Default bootloader is `atmel-dfu`. +Reboot to bootloader via magnetic switch next to icsp header. +Flash using regular dfu methods. + +### XD84 pin mappings +Taken from [kimera-config.json](https://github.com/kairyu/tkg/blob/master/keyboard/config/kimera-config.json) + + "row_mapping": [ 1, 2, 3, 4, 5, 6 ], + "col_mapping": [ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ], + +# RGB +- PIN C7 +- Number of RGB LED 7 + +# Backlight +- PIN B6 + +# Light Through Cat + TODO - PWM C6 + +## Assumptions +### Pin/Port mappings +- All cols are on the same IC +- All rows are on the same IC and port +- Pins mapped sequentially +- Each port only does row or column not a mixture of both + - No need to have complex port config + - + +| ROW index | Kimera Pin | PCA9555 | +| ----------|------------|-------------------| +| 0 | 1 | IC1 Port 0 pin 0 | +| 1 | 2 | IC1 Port 0 pin 1 | +| 2 | 3 | IC1 Port 0 pin 2 | +| 3 | 4 | IC1 Port 0 pin 3 | +| 4 | 5 | IC1 Port 0 pin 4 | +| 5 | 6 | IC1 Port 0 pin 5 | + +- Safe enough to assume `row_index == pin` + + +| COL index | Kimera Pin | PCA9555 | +| ----------|------------|-------------------| +| 0 | 17 | IC2 Port 0 pin 0 | +| 1 | 18 | IC2 Port 0 pin 1 | +| 2 | 19 | IC2 Port 0 pin 2 | +| 3 | 20 | IC2 Port 0 pin 3 | +| 4 | 21 | IC2 Port 0 pin 4 | +| 5 | 22 | IC2 Port 0 pin 5 | +| 6 | 23 | IC2 Port 0 pin 6 | +| 7 | 24 | IC2 Port 0 pin 7 | +| 8 | 25 | IC2 Port 1 pin 0 | +| 9 | 26 | IC2 Port 1 pin 1 | +| 10 | 27 | IC2 Port 1 pin 2 | +| 11 | 28 | IC2 Port 1 pin 3 | +| 12 | 29 | IC2 Port 1 pin 4 | +| 13 | 30 | IC2 Port 1 pin 5 | +| 14 | 31 | IC2 Port 1 pin 6 | + +- Safe enough to assume here col_index does not need to be converted to pin +- Reading both ports one after the other gives us the same sequential behavior + - maps to the usual practice of reading matrix columns + - while this technically gives 16 column reads, the 16th column can never be set so is safely ignored + +## Notes +[pca9555 datasheet](https://www.ti.com/lit/ds/symlink/pca9555.pdf) + +- Other Kimera based boards with non sequential pin mappings, pins mapped across ICs, or mixed row/col configs will need more complicated `pin -> i2c_addr,port,pin` logic as well as rather more complex pin functions. + +## Return to stock firmware +Not tested but original firmware seems to be available in the [kairyu/tkg-firmware](https://github.com/kairyu/tkg-firmware/blob/master/kimera-core.hex) repo. diff --git a/keyboards/xd84/info.json b/keyboards/xd84/info.json new file mode 100644 index 000000000000..b701db1b79e5 --- /dev/null +++ b/keyboards/xd84/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "XD84", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_75_ansi": { + "key_count": 84, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"1", "x":1, "y":1}, {"label":"2", "x":2, "y":1}, {"label":"3", "x":3, "y":1}, {"label":"4", "x":4, "y":1}, {"label":"5", "x":5, "y":1}, {"label":"6", "x":6, "y":1}, {"label":"7", "x":7, "y":1}, {"label":"8", "x":8, "y":1}, {"label":"9", "x":9, "y":1}, {"label":"0", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"delete", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + }, + + "LAYOUT_75_iso": { + "key_count": 85, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"1", "x":1, "y":1}, {"label":"2", "x":2, "y":1}, {"label":"3", "x":3, "y":1}, {"label":"4", "x":4, "y":1}, {"label":"5", "x":5, "y":1}, {"label":"6", "x":6, "y":1}, {"label":"7", "x":7, "y":1}, {"label":"8", "x":8, "y":1}, {"label":"9", "x":9, "y":1}, {"label":"0", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"delete", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + } + } +} \ No newline at end of file diff --git a/keyboards/xd84/keymaps/default/keymap.c b/keyboards/xd84/keymaps/default/keymap.c new file mode 100644 index 000000000000..b122fbddc304 --- /dev/null +++ b/keyboards/xd84/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +#define L1_RGUI LM(1, MOD_RGUI) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_75_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PAUS, KC_DEL, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + 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_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_BSLS, 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_ENT, KC_PGDN, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, L1_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_75_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/xd84/keymaps/default_iso/keymap.c b/keyboards/xd84/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..87b4bfeea1d4 --- /dev/null +++ b/keyboards/xd84/keymaps/default_iso/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +#define L1_RGUI LM(1, MOD_RGUI) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_75_iso( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + 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_PAUS, KC_DEL, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + 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_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_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_NUHS, KC_ENT, KC_PGDN, +/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */ + 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_END, +/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, L1_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_75_iso( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴───────┬─┴───────┬─┴───────┬─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/xd84/matrix.c b/keyboards/xd84/matrix.c new file mode 100644 index 000000000000..a3590504777a --- /dev/null +++ b/keyboards/xd84/matrix.c @@ -0,0 +1,94 @@ +/* Copyright 2019 + * + * 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 . + */ +#include +#include +#include +#include +#include "matrix.h" +#include "pca9555.h" +#include "quantum.h" + +#include "debug.h" + +// PCA9555 slave addresses +#define IC1 0x20 +#define IC2 0x21 + +//_____Utility funcs___________________________________________________________ + +static void init_pins(void) { + // init all cols high - IC2 all input + pca9555_set_config(IC2, PCA9555_PORT0, ALL_INPUT);//same as initial state + pca9555_set_config(IC2, PCA9555_PORT1, ALL_INPUT);//same as initial state + + // init all rows - IC1 port0 input + pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT);//same as initial state +} + +static void select_row(uint8_t row) { + // For the XD84 all rows are on the same IC and port + // so its safe enough to assume here row == pin + uint8_t pin = row; + uint8_t mask = 1 << pin; + + pca9555_set_output(IC1, PCA9555_PORT0, ALL_HIGH & (~mask)); + pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT & (~mask)); +} + +static uint16_t read_cols(void) { + uint16_t state_1 = pca9555_readPins(IC2, PCA9555_PORT0); + uint16_t state_2 = pca9555_readPins(IC2, PCA9555_PORT1); + + // For the XD84 all cols are on the same IC and mapped sequentially + // while this technically gives 16 column reads, + // the 16th column can never be set so is safely ignored + return ~((state_2 << 8) | state_1); +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + current_matrix[current_row] = read_cols(); + + // No need to Unselect row as the next `select_row` will blank everything + + return (last_row_value != current_matrix[current_row]); +} + +//_____CUSTOM MATRIX IMPLEMENTATION____________________________________________________ + +void custom_matrix_init(void) { + pca9555_init(IC1); + pca9555_init(IC2); + + init_pins(); +} + +bool custom_matrix_scan(matrix_row_t current_matrix[]) { + bool changed = false; + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } + return changed; +} \ No newline at end of file diff --git a/keyboards/xd84/pca9555.c b/keyboards/xd84/pca9555.c new file mode 100644 index 000000000000..df4631e9d74d --- /dev/null +++ b/keyboards/xd84/pca9555.c @@ -0,0 +1,63 @@ +#include "i2c_master.h" +#include "pca9555.h" + +#include "debug.h" + +#define SLAVE_TO_ADDR(n) (n<<1) +#define TIMEOUT 100 + +enum { + CMD_INPUT_0 = 0, + CMD_INPUT_1, + CMD_OUTPUT_0, + CMD_OUTPUT_1, + CMD_INVERSION_0, + CMD_INVERSION_1, + CMD_CONFIG_0, + CMD_CONFIG_1 +}; + +void pca9555_init(uint8_t slave_addr) { + static uint8_t s_init = 0; + if (!s_init) { + i2c_init(); + + s_init=1; + } + + // TODO: could check device connected + //i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); + //i2c_stop(); +} + +void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_set_config::FAILED\n"); + } +} + +void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_set_output::FAILED\n"); + } +} + +uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; + + uint8_t data = 0; + i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_readPins::FAILED\n"); + } + return data; +} diff --git a/keyboards/xd84/pca9555.h b/keyboards/xd84/pca9555.h new file mode 100644 index 000000000000..6aaee8a6f88a --- /dev/null +++ b/keyboards/xd84/pca9555.h @@ -0,0 +1,55 @@ +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +/* + PCA9555 + ,----------. + SDA --| SDA P00 |-- P1 + SCL --| SCL P01 |-- P2 + INT --| INT P02 |-- P3 + | P03 |-- P4 + A0 --| A0 P04 |-- P5 + A1 --| A1 P05 |-- P6 + A2 --| A2 P06 |-- P7 + | P07 |-- P8 + | | + | P10 |-- P10 + | P11 |-- P11 + | P12 |-- P12 + | P13 |-- P13 + | P14 |-- P14 + | P15 |-- P15 + | P16 |-- P16 + | P17 |-- P17 + `----------' +*/ + +#define PCA9555_PORT0 0 +#define PCA9555_PORT1 1 + +#define ALL_OUTPUT 0 +#define ALL_INPUT 0xFF +#define ALL_LOW 0 +#define ALL_HIGH 0xFF + +void pca9555_init(uint8_t slave_addr); + +void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf); + +void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); + +uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port); \ No newline at end of file diff --git a/keyboards/xd84/readme.md b/keyboards/xd84/readme.md new file mode 100644 index 000000000000..38b4efcba29f --- /dev/null +++ b/keyboards/xd84/readme.md @@ -0,0 +1,23 @@ +# XD84 + +![XD84](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB17eeJSXXXXXbIXFXXq6xXFXXXp_1024x1024.jpg?v=1515505994) + +Compact With 84 Keys & RGB LED Underglow +- Designed by Xiudi +- Up to 87 keys + - iso and ansi support +- Uses Kimera core + +Keyboard Maintainer: QMK Community +Hardware Supported: XD84 +Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd84-xiudi-70-custom-keyboard-pcb) + +Make example for this keyboard (after setting up your build environment): + + make xd84:default + +Install examples: + + make xd84:default:dfu + +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). diff --git a/keyboards/xd84/rules.mk b/keyboards/xd84/rules.mk new file mode 100644 index 000000000000..283d4babc7a7 --- /dev/null +++ b/keyboards/xd84/rules.mk @@ -0,0 +1,88 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = i2c_master.c custom_matrix_helper.c pca9555.c matrix.c + +EXTRAFLAGS += -flto + +LAYOUTS = 75_ansi 75_iso \ No newline at end of file diff --git a/keyboards/xd84/xd84.c b/keyboards/xd84/xd84.c new file mode 100644 index 000000000000..eaf531421b64 --- /dev/null +++ b/keyboards/xd84/xd84.c @@ -0,0 +1,32 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "xd84.h" + +void keyboard_pre_init_kb(void) { + setPinOutput(B6); + + keyboard_pre_init_user(); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(B6); + } else { + writePinHigh(B6); + } + + led_set_user(usb_led); +} diff --git a/keyboards/xd84/xd84.h b/keyboards/xd84/xd84.h new file mode 100644 index 000000000000..d59956f691d7 --- /dev/null +++ b/keyboards/xd84/xd84.h @@ -0,0 +1,59 @@ +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define ____ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_75_ansi( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K416, \ + K501, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, \ + K601, K602, K603, K607, K611, K612, K613, K614, K615, K616 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, ____, K414, K416 }, \ + { K501, ____, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516 }, \ + { K601, K602, K603, ____, ____, K607, K115, ____, K613, ____, K611, K612, K614, K615, K616 } \ +} + +#define LAYOUT_75_iso( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K316, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, \ + K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, \ + K601, K602, K603, K607, K611, K612, K613, K614, K615, K616 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, ____, K316 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416 }, \ + { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516 }, \ + { K601, K602, K603, ____, ____, K607, K115, ____, K613, ____, K611, K612, K614, K615, K616 } \ +} diff --git a/keyboards/xd87/config.h b/keyboards/xd87/config.h index 7af3d03579ac..4fb52be6ed90 100644 --- a/keyboards/xd87/config.h +++ b/keyboards/xd87/config.h @@ -47,7 +47,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B5, B6, C6, D4, D6, D7, B4, B2, B3, D2 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW #define BACKLIGHT_PIN D0 diff --git a/keyboards/xd87/info.json b/keyboards/xd87/info.json index 3837358cd320..488f31927533 100644 --- a/keyboards/xd87/info.json +++ b/keyboards/xd87/info.json @@ -3,7 +3,7 @@ "url": "", "maintainer": "qmk", "width": 18.25, - "height": 7.25, + "height": 6.25, "layouts": { "LAYOUT_all": { "layout": [ diff --git a/keyboards/xd96/config.h b/keyboards/xd96/config.h new file mode 100644 index 000000000000..df21205f8d2a --- /dev/null +++ b/keyboards/xd96/config.h @@ -0,0 +1,244 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x4096 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPrepublic +#define PRODUCT XD96 +#define DESCRIPTION KPrepublic XD96 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +//#define MATRIX_ROW_PINS { D0, D5 } +//#define MATRIX_COL_PINS { F1, F0, B0 } +//#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +//#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 10 +// #define BACKLIGHT_BREATHING + +#define RGB_DI_PIN C7 +#define RGBLED_NUM 16 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_LIMIT_VAL 50 +// #ifdef RGB_DI_PIN +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_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 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +// LTO options +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/xd96/custom_matrix_helper.c b/keyboards/xd96/custom_matrix_helper.c new file mode 100644 index 000000000000..a4c5b6afa547 --- /dev/null +++ b/keyboards/xd96/custom_matrix_helper.c @@ -0,0 +1,127 @@ +/* Copyright 2019 + * + * 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 . + */ +#include +#include +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +//_____COMMON__________________________________________________________________ +// user-defined overridable functions +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } +__attribute__((weak)) void matrix_init_user(void) {} +__attribute__((weak)) void matrix_scan_user(void) {} + + +//_____COULD BE COMMON_________________________________________________________ +/* matrix state(1:on, 0:off) */ +/*static*/ matrix_row_t raw_matrix[MATRIX_ROWS]; +/*static*/ matrix_row_t matrix[MATRIX_ROWS]; + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +__attribute__ ((weak)) +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +__attribute__ ((weak)) +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +__attribute__ ((weak)) +matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +__attribute__ ((weak)) +uint8_t matrix_key_count(void) { + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += matrix_bitpop(i); + } + return count; +} + +__attribute__ ((weak)) +void matrix_print(void) { + print_matrix_header(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); print(": "); + print_matrix_row(row); + print("\n"); + } +} + + +//_____CUSTOM MATRIX 'LITE'____________________________________________________ +__attribute__ ((weak)) +void custom_matrix_init(void) { +} + +__attribute__ ((weak)) +bool custom_matrix_scan(matrix_row_t current_matrix[]) { + bool changed = true; + return changed; +} + +__attribute__ ((weak)) +void matrix_init(void) { + + custom_matrix_init(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +__attribute__ ((weak)) +uint8_t matrix_scan(void) { + bool changed = custom_matrix_scan(raw_matrix); + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + return 1; +} diff --git a/keyboards/xd96/info.json b/keyboards/xd96/info.json new file mode 100644 index 000000000000..f180682735f7 --- /dev/null +++ b/keyboards/xd96/info.json @@ -0,0 +1,17 @@ +{ + "keyboard_name": "xd96", + "url": "", + "maintainer": "qmk", + "width": 19, + "height": 6, + "layouts": { + "LAYOUT_96_ansi": { + "key_count": 99, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Insert", "x":13, "y":0}, {"label":"Delete", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"End", "x":16, "y":0}, {"label":"PgUp", "x":17, "y":0}, {"label":"PgDn", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}] + }, + "LAYOUT_96_iso": { + "key_count": 100, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Insert", "x":13, "y":0}, {"label":"Delete", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"End", "x":16, "y":0}, {"label":"PgUp", "x":17, "y":0}, {"label":"PgDn", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"\"", "x":2, "y":1}, {"label":"\u00a3", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"-", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2, "h":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"label":"|", "x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}] + } + } +} diff --git a/keyboards/xd96/keymaps/default/keymap.c b/keyboards/xd96/keymaps/default/keymap.c new file mode 100644 index 000000000000..45588f18c4b3 --- /dev/null +++ b/keyboards/xd96/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +#define L1_RALT LM(1, MOD_RALT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_96_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */ + 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */ + 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_P7, KC_P8, KC_P9, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────├─────────├─────────├ ┤ */ + 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_P4, KC_P5, KC_P6, KC_PPLS, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┼─────────┼─────────┼─────────┤ */ + 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_P1, KC_P2, KC_P3, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, L1_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_96_ansi( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──────────────├─────────├─────────├─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────────────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───────────┬─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/xd96/keymaps/default_iso/keymap.c b/keyboards/xd96/keymaps/default_iso/keymap.c new file mode 100644 index 000000000000..cdd1f496798b --- /dev/null +++ b/keyboards/xd96/keymaps/default_iso/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +#define L1_RALT LM(1, MOD_RALT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_96_iso( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + 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_INS, KC_DEL, KC_HOME, KC_END, KC_PGUP, KC_PGDN, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */ + 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */ + 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_P7, KC_P8, KC_P9, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────├─────────├─────────├ ┤ */ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, +/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┼─────────┼─────────┼─────────┤ */ + 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_P1, KC_P2, KC_P3, +/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, L1_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ), + + [1] = LAYOUT_96_iso( +/* ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ */ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┴─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├─────────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬────┴────┬──────────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├──────────────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬──────┴──┬ ├─────────├─────────├─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴───┬─────┴─────────┴─┬─────────┼─────────┼─────────┼─────────┼─────────┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +/* ├───────────┼─────────┴─┬───────┴───┬─────┴─────────┴─────────┴─────────┴─────────┴─────────┴───────┬─┴─────────┴──┬──────┴───────┬─────────┼─────────┼─────────┼─────────┼─────────┼ ┤ */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +/* └───────────┴───────────┴───────────┴───────────────────────────────────────────────────────────────┴──────────────┴──────────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘ */ + ) +}; diff --git a/keyboards/xd96/matrix.c b/keyboards/xd96/matrix.c new file mode 100644 index 000000000000..550dae4d02e8 --- /dev/null +++ b/keyboards/xd96/matrix.c @@ -0,0 +1,96 @@ +/* Copyright 2019 + * + * 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 . + */ +#include +#include +#include +#include +#include "matrix.h" +#include "pca9555.h" +#include "quantum.h" + +#include "debug.h" + +// PCA9555 slave addresses +#define IC1 0x20 +#define IC2 0x21 + +//_____Utility funcs___________________________________________________________ + +static void init_pins(void) { + // init all cols high - IC2 all input + pca9555_set_config(IC2, PCA9555_PORT0, ALL_INPUT);//same as initial state + pca9555_set_config(IC2, PCA9555_PORT1, ALL_INPUT);//same as initial state + pca9555_set_config(IC1, PCA9555_PORT1, ALL_INPUT);//same as initial state + + // init all rows - IC1 port0 input + pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT);//same as initial state +} + +static void select_row(uint8_t row) { + // For the XD96 all rows are on the same IC and port + // so its safe enough to assume here row == pin + uint8_t pin = row; + uint8_t mask = 1 << pin; + + pca9555_set_output(IC1, PCA9555_PORT0, ALL_HIGH & (~mask)); + pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT & (~mask)); +} + +static uint32_t read_cols(void) { + uint32_t state_1 = pca9555_readPins(IC2, PCA9555_PORT0); + uint32_t state_2 = pca9555_readPins(IC2, PCA9555_PORT1); + uint32_t state_3 = pca9555_readPins(IC1, PCA9555_PORT1); + + // For the XD96 the pins are mapped to port expanders as follows: + // all 8 pins port 0 IC2, first 6 pins port 1 IC2, first 4 pins port 1 IC1 + uint32_t state = (((state_3 & 0b00001111) << 14) | ((state_2 & 0b00111111) << 8) | state_1); + return (~state) & 0b111111111111111111; +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + current_matrix[current_row] = read_cols(); + + // No need to Unselect row as the next `select_row` will blank everything + + return (last_row_value != current_matrix[current_row]); +} + +//_____CUSTOM MATRIX IMPLEMENTATION____________________________________________________ + +void custom_matrix_init(void) { + pca9555_init(IC1); + pca9555_init(IC2); + + init_pins(); +} + +bool custom_matrix_scan(matrix_row_t current_matrix[]) { + bool changed = false; + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } + return changed; +} \ No newline at end of file diff --git a/keyboards/xd96/pca9555.c b/keyboards/xd96/pca9555.c new file mode 100644 index 000000000000..960df4f4e523 --- /dev/null +++ b/keyboards/xd96/pca9555.c @@ -0,0 +1,78 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "i2c_master.h" +#include "pca9555.h" + +#include "debug.h" + +#define SLAVE_TO_ADDR(n) (n<<1) +#define TIMEOUT 100 + +enum { + CMD_INPUT_0 = 0, + CMD_INPUT_1, + CMD_OUTPUT_0, + CMD_OUTPUT_1, + CMD_INVERSION_0, + CMD_INVERSION_1, + CMD_CONFIG_0, + CMD_CONFIG_1 +}; + +void pca9555_init(uint8_t slave_addr) { + static uint8_t s_init = 0; + if (!s_init) { + i2c_init(); + + s_init=1; + } + + // TODO: could check device connected + //i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE); + //i2c_stop(); +} + +void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_set_config::FAILED\n"); + } +} + +void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0; + + i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_set_output::FAILED\n"); + } +} + +uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port) { + uint8_t addr = SLAVE_TO_ADDR(slave_addr); + uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0; + + uint8_t data = 0; + i2c_status_t ret = i2c_readReg(addr, cmd, &data, sizeof(data), TIMEOUT); + if (ret != I2C_STATUS_SUCCESS) { + print("pca9555_readPins::FAILED\n"); + } + return data; +} diff --git a/keyboards/xd96/pca9555.h b/keyboards/xd96/pca9555.h new file mode 100644 index 000000000000..6aaee8a6f88a --- /dev/null +++ b/keyboards/xd96/pca9555.h @@ -0,0 +1,55 @@ +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +/* + PCA9555 + ,----------. + SDA --| SDA P00 |-- P1 + SCL --| SCL P01 |-- P2 + INT --| INT P02 |-- P3 + | P03 |-- P4 + A0 --| A0 P04 |-- P5 + A1 --| A1 P05 |-- P6 + A2 --| A2 P06 |-- P7 + | P07 |-- P8 + | | + | P10 |-- P10 + | P11 |-- P11 + | P12 |-- P12 + | P13 |-- P13 + | P14 |-- P14 + | P15 |-- P15 + | P16 |-- P16 + | P17 |-- P17 + `----------' +*/ + +#define PCA9555_PORT0 0 +#define PCA9555_PORT1 1 + +#define ALL_OUTPUT 0 +#define ALL_INPUT 0xFF +#define ALL_LOW 0 +#define ALL_HIGH 0xFF + +void pca9555_init(uint8_t slave_addr); + +void pca9555_set_config(uint8_t slave_addr, uint8_t port, uint8_t conf); + +void pca9555_set_output(uint8_t slave_addr, uint8_t port, uint8_t conf); + +uint8_t pca9555_readPins(uint8_t slave_addr, uint8_t port); \ No newline at end of file diff --git a/keyboards/xd96/readme.md b/keyboards/xd96/readme.md new file mode 100644 index 000000000000..237d7a05165f --- /dev/null +++ b/keyboards/xd96/readme.md @@ -0,0 +1,22 @@ +# XD96 + +![XD96](https://cdn.shopify.com/s/files/1/2711/4238/products/xd96_pcb_1024x1024.jpg?v=1515425370) + +Compact With 96 Keys & RGB LED Underglow +- Designed by Xiudi +- ISO and ANSI support +- Uses Kimera core + +Keyboard Maintainer: QMK Community +Hardware Supported: XD96 +Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd96-pcb-90-custom-mechanical-keyboard-supports-tkg-tools-underglow-rgb-programmed); [AliExpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html) + +Make example for this keyboard (after setting up your build environment): + + make xd96:default + +Install examples: + + make xd96:default:dfu + +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). diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk new file mode 100644 index 000000000000..c9f804471291 --- /dev/null +++ b/keyboards/xd96/rules.mk @@ -0,0 +1,86 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = i2c_master.c custom_matrix_helper.c pca9555.c matrix.c + +EXTRAFLAGS += -flto diff --git a/keyboards/xd96/xd96.c b/keyboards/xd96/xd96.c new file mode 100644 index 000000000000..45cfb3b1f179 --- /dev/null +++ b/keyboards/xd96/xd96.c @@ -0,0 +1,34 @@ +/* Copyright 2019 + * + * 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 . + */ +#include "xd96.h" + +#define CAPS_PIN B6 + +void keyboard_pre_init_kb(void) { + setPinOutput(CAPS_PIN); + + keyboard_pre_init_user(); +} + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinLow(CAPS_PIN); + } else { + writePinHigh(CAPS_PIN); + } + + led_set_user(usb_led); +} diff --git a/keyboards/xd96/xd96.h b/keyboards/xd96/xd96.h new file mode 100644 index 000000000000..04c2cc46e2ea --- /dev/null +++ b/keyboards/xd96/xd96.h @@ -0,0 +1,59 @@ +/* Copyright 2019 + * + * 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 . + */ +#pragma once + +#include "quantum.h" +#define ____ KC_NO + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_96_ansi( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K416, K417, K418, K419, \ + K501, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, \ + K601, K602, K603, K607, K611, K612, K614, K615, K616, K617, K618, K619 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116, K117, K118, K119 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, K419 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, ____, K414, K416, K417, K418, ____ }, \ + { K501, ____, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K619 }, \ + { K601, K602, K603, ____, ____, K607, K115, ____, K612, ____, K611, K612, K614, K615, K616, K617, K618, ____ } \ +} + +#define LAYOUT_96_iso( \ + K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ + K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K316, K317, K318, \ + K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, K417, K418, K419, \ + K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, \ + K601, K602, K603, K607, K611, K612, K614, K615, K616, K617, K618, K619 \ +) { \ + { K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K116, K117, K118, K119 }, \ + { K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, K219 }, \ + { K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, ____, K316, K317, K318, K419 }, \ + { K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, K415, K416, K417, K418, ____ }, \ + { K501, K502, K503, K504, K505, K506, K507, K508, K509, K510, K511, K512, K513, K515, K516, K517, K518, K619 }, \ + { K601, K602, K603, ____, ____, K607, K115, ____, K612, ____, K611, K612, K614, K615, K616, K617, K618, ____ } \ +} diff --git a/keyboards/yd60mq/config.h b/keyboards/yd60mq/config.h new file mode 100644 index 000000000000..2a899fa3ec5c --- /dev/null +++ b/keyboards/yd60mq/config.h @@ -0,0 +1,47 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER YMDK +#define PRODUCT YD60MQ +#define DESCRIPTION Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, F7, B5, B4, D7, D6, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 5 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* prevent stuck modifiers */ + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + diff --git a/keyboards/yd60mq/keymaps/default/keymap.c b/keyboards/yd60mq/keymaps/default/keymap.c new file mode 100644 index 000000000000..a5a0145eec94 --- /dev/null +++ b/keyboards/yd60mq/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + 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_DEL, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL, + KC_TRNS, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, 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), + +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} diff --git a/keyboards/yd60mq/keymaps/krusli/keymap.c b/keyboards/yd60mq/keymaps/krusli/keymap.c new file mode 100644 index 000000000000..d9c2765659b3 --- /dev/null +++ b/keyboards/yd60mq/keymaps/krusli/keymap.c @@ -0,0 +1,19 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, KC_RSFT, MO(1), + KC_LCTL, KC_LALT, KC_LGUI, _______, KC_SPC, _______, _______, KC_RALT, _______, KC_RGUI, KC_RCTL), + + LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, RESET, + _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, _______, + _______, KC_NO, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + +}; diff --git a/keyboards/yd60mq/readme.md b/keyboards/yd60mq/readme.md new file mode 100644 index 000000000000..78f442d88928 --- /dev/null +++ b/keyboards/yd60mq/readme.md @@ -0,0 +1,20 @@ +YD60MQ +====== + +![YD60MQ PCB](https://ae01.alicdn.com/kf/HTB1PVQ2X_HuK1RkSndVq6xVwpXaO.jpg) + +Customizable 60% PCB by [YMDK](https://ymdk.aliexpress.com/store/429151?spm=2114.10010108.0.0.3ab23641lIkgzm). + +Keyboard Maintainer: QMK Community +Hardware Supported: YD60MQ +Hardware Availability: YMDK - [AliExpress](https://www.aliexpress.com/item/YMDK-60-YD60MQ-QMK-Programmable-Underglow-RGB-Led-PCB-Plate-Stabilizers-For-DIY-Mechanical-Keyboard-Interchange/32869207240.html) + +Make example for this keyboard (after setting up your build environment): + + make yd60mq:default + +The keyboard uses a DFU bootloader. To make a keymap and use dfu-util to flash it: + + make yd60mq:default:dfu + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk new file mode 100644 index 000000000000..2a8963011690 --- /dev/null +++ b/keyboards/yd60mq/rules.mk @@ -0,0 +1,61 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/yd60mq/yd60mq.c b/keyboards/yd60mq/yd60mq.c new file mode 100644 index 000000000000..96306d6a6602 --- /dev/null +++ b/keyboards/yd60mq/yd60mq.c @@ -0,0 +1,13 @@ +#include "yd60mq.h" + +void led_set_kb(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + setPinOutput(F4); + writePinLow(F4); + } else { + setPinInput(F4); + writePinLow(F4); + } + + led_set_user(usb_led); +} diff --git a/keyboards/yd60mq/yd60mq.h b/keyboards/yd60mq/yd60mq.h new file mode 100644 index 000000000000..5f5d8a2422c4 --- /dev/null +++ b/keyboards/yd60mq/yd60mq.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K402, K403, K407, K408, K409, K410, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, K402, K403, KC_NO, KC_NO, KC_NO, K407, K408, K409, K410, K411, K412, K413, KC_NO } \ +} + diff --git a/keyboards/yd68/config.h b/keyboards/yd68/config.h index 811e35c0d224..4caedb0b570c 100644 --- a/keyboards/yd68/config.h +++ b/keyboards/yd68/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B6, F7, F6, F5, F4, F1, F0, E6, B0, B7, D0, D1, D2, D3, D5 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 diff --git a/keyboards/ymd75/README.md b/keyboards/ymd75/README.md index eed6ce13eed7..d1c4e95ae7b7 100644 --- a/keyboards/ymd75/README.md +++ b/keyboards/ymd75/README.md @@ -37,7 +37,7 @@ $ brew cask install crosspack-avr $ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb ``` -In order to use the `./program` script, which can reboot the board into +In order to use the `./util/atmega32a_program.py` script, which can reboot the board into the bootloader, you'll need Python 2 with PyUSB installed: ``` diff --git a/keyboards/ymd75/program b/keyboards/ymd75/program deleted file mode 100644 index a88d9cd9b042..000000000000 --- a/keyboards/ymd75/program +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Luiz Ribeiro -# -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -print('Searching for ps2avrGB... ', end='') - -dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D) -if dev is None: - raise ValueError('Device not found') - -print('Found', end='\n\n') - -print('Device Information:') -print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) -print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) -print('Manufacturer: %s' % (dev.iManufacturer)) -print('Serial: %s' % (dev.iSerialNumber)) -print('Product: %s' % (dev.iProduct), end='\n\n') - -print('Transferring control to bootloader... ', end='') - -dev.set_configuration() - -request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - -USBRQ_HID_SET_REPORT = 0x09 -HID_REPORT_OPTION = 0x0301 - - -try: - dev.ctrl_transfer( - request_type, - USBRQ_HID_SET_REPORT, - HID_REPORT_OPTION, - 0, - [0, 0, 0xFF] + [0] * 5 - ) -except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - -# wait a bit until bootloader starts up -time.sleep(2) - -print('OK') -print('Programming...') -if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0: - print('\nDone!') diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk index 9697a76f1e86..9d09d3da94b8 100644 --- a/keyboards/ymd75/rules.mk +++ b/keyboards/ymd75/rules.mk @@ -59,4 +59,4 @@ SRC = matrix.c i2c.c backlight.c # programming options -PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/ymd96/info.json b/keyboards/ymd96/info.json new file mode 100644 index 000000000000..73edfd894f00 --- /dev/null +++ b/keyboards/ymd96/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "ymd96", + "url": "", + "maintainer": "sparkyman215", + + "width": 19, + "height": 6, + "layouts": { + "LAYOUT_default": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Print Screen", "x":13, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15, "y":0}, {"label":"Insert", "x":16, "y":0}, {"label":"Delete", "x":17, "y":0}, {"label":"Page Up", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"PgDn", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"+", "x":18, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"+", "x":18, "y":3},{"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":2.75}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Fn", "x":10, "y":5}, {"label":"Win", "x":11, "y":5}, {"label":"\u2190", "x":12, "y":5}, {"label":"\u2193", "x":13, "y":5}, {"label":"\u2191", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}] + }, + "LAYOUT_custom": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"Print Screen", "x":13, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15, "y":0}, {"label":"Insert", "x":16, "y":0}, {"label":"Delete", "x":17, "y":0}, {"label":"Page Up", "x":18, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"PgDn", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"-", "x":18, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"+", "x":18, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"Fn", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Menu", "x":11, "y":5}, {"label":"Prnt Scr", "x":12, "y":5}, {"label":"Ctrl", "x":13, "y":5}, {"label":"Scroll Lock", "x":14, "y":5}, {"label":"0", "x":15, "y":5, "w":2}, {"label":".", "x":17, "y":5}] + }, + "LAYOUT_iso": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15, "y":0}, {"label":"Insert", "x":16, "y":0}, {"label":"Delete", "x":17, "y":0}, {"label":"PgUp", "x":18, "y":0}, {"label":"\u00ac", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"\"", "x":2, "y":1}, {"label":"\u00a3", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Num Lock", "x":15, "y":1}, {"label":"/", "x":16, "y":1}, {"label":"*", "x":17, "y":1}, {"label":"PgDn", "x":18, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"7", "x":15, "y":2}, {"label":"8", "x":16, "y":2}, {"label":"9", "x":17, "y":2}, {"label":"-", "x":18, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"@", "x":11.75, "y":3}, {"label":"~", "x":12.75, "y":3}, {"label":"4", "x":15, "y":3}, {"label":"5", "x":16, "y":3}, {"label":"6", "x":17, "y":3}, {"label":"+", "x":18, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"label":"|", "x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"Up", "x":14, "y":4}, {"label":"1", "x":15, "y":4}, {"label":"2", "x":16, "y":4}, {"label":"3", "x":17, "y":4}, {"label":"Enter", "x":18, "y":4, "h":2}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"AltGr", "x":10, "y":5, "w":1.5}, {"label":"Win", "x":11.5, "y":5, "w":1.5}, {"label":"Left", "x":13, "y":5}, {"label":"Down", "x":14, "y":5}, {"label":"Right", "x":15, "y":5}, {"label":"0", "x":16, "y":5}, {"label":".", "x":17, "y":5}] + } + } +} \ No newline at end of file diff --git a/keyboards/ymd96/keymaps/default/keymap.c b/keyboards/ymd96/keymaps/default/keymap.c index 9d0a8261dc0b..c540972f10a8 100644 --- a/keyboards/ymd96/keymaps/default/keymap.c +++ b/keyboards/ymd96/keymaps/default/keymap.c @@ -16,18 +16,16 @@ You should have received a copy of the GNU General Public LicensezZZ along with this program. If not, see . */ -#include "ymd96.h" -#include "action_layer.h" -#include "rgblight.h" +#include QMK_KEYBOARD_H #define ______ KC_TRNS #define _DEFLT 0 #define _RAISE 1 -#define KEYMAP KEYMAP_DEFAULT +#define KEYMAP LAYOUT_default const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - + /* Layer 0, default layer * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Print | Home | End |Insert|Delete| PgUp | 19 keys * | ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BkSpc |NumLck| / | * | PgDn | 18 keys @@ -36,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | LShft | Z | X | C | V | B | N | M | , | . | / | RShft | 1 | 2 | 3 | En | 16 keys * | Ctrl | Win | Alt | Space | Fn | Win | Left | Down | Up | Right| 0 | . | | 12 keys */ - + [_DEFLT] = KEYMAP( 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_HOME, KC_END, KC_INSERT, KC_DELETE, KC_PGUP, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_PGDN, \ @@ -52,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | | | | | * | | | | | | | | | VolDn| VolUp| Mute | Play/Pause | | | | | * | | | | | | |MPrev | | | MNext| | | | - */ + */ [_RAISE] = KEYMAP( ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ @@ -61,4 +59,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, ______, ______, ______, ______, ______, ______, ______, KC_VOLD,KC_VOLU, KC_MUTE, KC_MPLY, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, KC_MPRV, ______, ______, KC_MNXT, ______, ______ \ ) -}; \ No newline at end of file +}; diff --git a/keyboards/ymd96/keymaps/epx/keymap.c b/keyboards/ymd96/keymaps/epx/keymap.c index b9d3f6df228c..09ec665a3a7b 100644 --- a/keyboards/ymd96/keymaps/epx/keymap.c +++ b/keyboards/ymd96/keymaps/epx/keymap.c @@ -24,7 +24,7 @@ along with this program. If not, see . #define _AR 1 #define _RAISE 2 -#define KEYMAP KEYMAP_DEFAULT +#define KEYMAP LAYOUT_default const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0, default layer diff --git a/keyboards/ymd96/keymaps/hgoel89/keymap.c b/keyboards/ymd96/keymaps/hgoel89/keymap.c index 81addf69f4d9..f612f79bafcd 100644 --- a/keyboards/ymd96/keymaps/hgoel89/keymap.c +++ b/keyboards/ymd96/keymaps/hgoel89/keymap.c @@ -27,7 +27,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { #define _DEFLT 0 #define _RAISE 1 -#define KEYMAP KEYMAP_CUSTOM +#define KEYMAP LAYOUT_custom const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -45,8 +45,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_PMNS, \ 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_P7, KC_P8, KC_P9, KC_NO, \ 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_P4, KC_P5, KC_P6, KC_PPLS, \ - 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_P1, KC_P2, KC_P3, KC_PENT, \ - KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RGUI , KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, MO(_RAISE), KC_P0, KC_PDOT \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,MO(_RAISE), KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RGUI , KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_P0, KC_PDOT \ ), /* Layer 1, raise layer * | | | | | | | | | | | | | | | | | | | | diff --git a/keyboards/ymd96/program b/keyboards/ymd96/program deleted file mode 100644 index a88d9cd9b042..000000000000 --- a/keyboards/ymd96/program +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python -# Copyright 2017 Luiz Ribeiro -# -# 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 . - -from __future__ import print_function - -import os -import sys -import time -import usb - -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) - -print('Searching for ps2avrGB... ', end='') - -dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D) -if dev is None: - raise ValueError('Device not found') - -print('Found', end='\n\n') - -print('Device Information:') -print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) -print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) -print('Manufacturer: %s' % (dev.iManufacturer)) -print('Serial: %s' % (dev.iSerialNumber)) -print('Product: %s' % (dev.iProduct), end='\n\n') - -print('Transferring control to bootloader... ', end='') - -dev.set_configuration() - -request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) - -USBRQ_HID_SET_REPORT = 0x09 -HID_REPORT_OPTION = 0x0301 - - -try: - dev.ctrl_transfer( - request_type, - USBRQ_HID_SET_REPORT, - HID_REPORT_OPTION, - 0, - [0, 0, 0xFF] + [0] * 5 - ) -except usb.core.USBError: - # for some reason I keep getting USBError, but it works! - pass - -# wait a bit until bootloader starts up -time.sleep(2) - -print('OK') -print('Programming...') -if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0: - print('\nDone!') diff --git a/keyboards/ymd96/tools/README.md b/keyboards/ymd96/tools/README.md deleted file mode 100644 index 081984ed44bc..000000000000 --- a/keyboards/ymd96/tools/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# JJ40 Tools - -## usb_detach.c - -When trying to flash on Linux, you may encounter a "Resource Unavailable" error. This means that Linux's HID driver has taken exclusive control of the keyboard, and the program script can't flash it. -This program can force Linux to give up a device, so that the programming script can reset it. - -### To compile: -``` -gcc usb_detach.c -o usb_detach -``` - -### To run: -1. Use `lsusb` to discover the Bus and Device numbers for your keyboard. -2. Run the program: `sudo ./usb_detach /dev/bus/usb//`. -3. Build and program the firmware as normal. diff --git a/keyboards/ymd96/tools/usb_detach.c b/keyboards/ymd96/tools/usb_detach.c deleted file mode 100644 index c21e47a7a439..000000000000 --- a/keyboards/ymd96/tools/usb_detach.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Found at https://www.linuxquestions.org/questions/linux-hardware-18/how-to-unclaim-usb-device-558138/#post3406986 */ -#include -#include -#include -#include -#include -#include - -int main(int argc, char**argv) -{ - struct usbdevfs_ioctl command; - int ret; - int fd; - int i; - if (argc>1) { - fd = open(argv[1],O_RDWR); - if (fd<1){ - perror("unable to open file"); - return 1; - } - for (i=0;i<255;i++){ // hack: should fetch how many interface there is. - command.ifno = i; - command.ioctl_code = USBDEVFS_DISCONNECT; - command.data = NULL; - ret = ioctl(fd, USBDEVFS_IOCTL, &command); - if(ret!=-1) - printf("un claimed interface %d %d\n",i,ret); - } - } else { - printf ("usage: %s /dev/bus/usb/BUS/DEVICE\n",argv[0]); - printf("Release all interfaces of this usb device for usage in virtualisation\n"); - } -} \ No newline at end of file diff --git a/keyboards/ymd96/ymd96.h b/keyboards/ymd96/ymd96.h index 9c25f2219288..ebf01b1d6127 100644 --- a/keyboards/ymd96/ymd96.h +++ b/keyboards/ymd96/ymd96.h @@ -26,7 +26,7 @@ along with this program. If not, see . void matrix_init_user(void); // TODO port this to other PS2AVRGB boards -#define KEYMAP_DEFAULT( \ +#define LAYOUT_default( \ K500, K502, K503, K504, K505, K600, K610, K710, K700, K511, K512, K513, K514, K113, K214, K013, K706, K709, K708, \ K400, K401, K402, K403, K404, K405, K601, K611, K711, K701, K410, K411, K412, K414, K406, K407, K408, K409, \ K300, K301, K302, K303, K304, K305, K602, K612, K712, K702, K310, K311, K312, K313, K306, K307, K308, K309, \ @@ -44,13 +44,13 @@ void matrix_init_user(void); // TODO port this to other PS2AVRGB boards { K700, K701, K702, K703, K704, K705, K706, KC_NO, K708, K709, K710, K711, K712, K713, K714 } \ } -#define KEYMAP_CUSTOM( \ +#define LAYOUT_custom( \ K500, K502, K503, K504, K505, K600, K610, K710, K700, K511, K512, K513, K514, K113, K214, K013, K706, K709, K708, \ K400, K401, K402, K403, K404, K405, K601, K611, K711, K701, K410, K411, K412, K414, K406, K407, K408, K409, \ K300, K301, K302, K303, K304, K305, K602, K612, K712, K702, K310, K311, K312, K313, K306, K307, K308, K309, \ K200, K201, K202, K203, K204, K205, K603, K613, K713, K703, K210, K211, K213, K206, K207, K208, K209, \ - K100, K101, K102, K103, K104, K105, K604, K614, K714, K704, K110, K111, K106, K107, K108, K009, \ - K000, K001, K002, K605, K705, K010, K011, K606, K607, KC_NO, K006, K008 \ + K100, K101, K102, K103, K104, K105, K604, K614, K714, K704, K110, K111, K608,K106, K107, K108, K009, \ + K000, K001, K002, K605, K705, K010, K011, K606, K607, K006, K008 \ ) { \ { K000, K001, K002, KC_NO, KC_NO, KC_NO, K006, KC_NO, K008, K009, K010, K011, KC_NO, K013, KC_NO, }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, KC_NO, K110, K111, KC_NO, K113, KC_NO, }, \ @@ -58,7 +58,7 @@ void matrix_init_user(void); // TODO port this to other PS2AVRGB boards { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, }, \ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K414, }, \ { K500, KC_NO, K502, K503, K504, K505, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K511, K512, K513, K514, }, \ - { K600, K601, K602, K603, K604, K605, K606, K607, KC_NO, KC_NO, K610, K611, K612, K613, K614, }, \ + { K600, K601, K602, K603, K604, K605, K606, K607, K608, KC_NO, K610, K611, K612, K613, K614, }, \ { K700, K701, K702, K703, K704, K705, K706, KC_NO, K708, K709, K710, K711, K712, K713, K714 } \ } diff --git a/keyboards/yosino58/config.h b/keyboards/yosino58/config.h new file mode 100644 index 000000000000..4357a218d4ac --- /dev/null +++ b/keyboards/yosino58/config.h @@ -0,0 +1,34 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +#include "config_common.h" +#include + +#define USE_I2C +#define USE_SERIAL + +#ifdef USE_Link_Time_Optimization + // LTO has issues with macros (action_get_macro) and "functions" (fn_actions), + // so just disable them + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION + + #define DISABLE_LEADER +#endif // USE_Link_Time_Optimization diff --git a/keyboards/orthodox/i2c.c b/keyboards/yosino58/i2c.c similarity index 98% rename from keyboards/orthodox/i2c.c rename to keyboards/yosino58/i2c.c index 084c890c405f..4bee5c639829 100644 --- a/keyboards/orthodox/i2c.c +++ b/keyboards/yosino58/i2c.c @@ -34,7 +34,7 @@ void i2c_delay(void) { // _delay_us(100); } -// Setup twi to run at 100kHz +// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK) void i2c_master_init(void) { // no prescaler TWSR = 0; diff --git a/keyboards/orthodox/i2c.h b/keyboards/yosino58/i2c.h similarity index 90% rename from keyboards/orthodox/i2c.h rename to keyboards/yosino58/i2c.h index 2af843ff60ad..710662c7abd6 100644 --- a/keyboards/orthodox/i2c.h +++ b/keyboards/yosino58/i2c.h @@ -1,8 +1,6 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include -#include "matrix.h" #ifndef F_CPU #define F_CPU 16000000UL @@ -16,8 +14,8 @@ #define SLAVE_BUFFER_SIZE 0x10 -// i2c SCL clock frequency -#define SCL_CLOCK 100000UL +// i2c SCL clock frequency 400kHz +#define SCL_CLOCK 400000L extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; @@ -46,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/yosino58/info.json b/keyboards/yosino58/info.json new file mode 100644 index 000000000000..c591a41dece0 --- /dev/null +++ b/keyboards/yosino58/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "yosino58 rev. 1", + "url": "https://github.com/sakurachari/yosino58", + "maintainer": "sakuranbo0046", + "width": 16.75, + "height": 6.25, + "layouts": { + "LAYOUT": { + "key_count": 58, + "layout": [ + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":0.25}, {"x":3, "y":0}, {"x":4, "y":0.25}, {"x":5, "y":0.5}, {"x":10.75, "y":0.5}, {"x":11.75, "y":0.25}, {"x":12.75, "y":0}, {"x":13.75, "y":0.25}, {"x":14.75, "y":1}, {"x":15.75, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":1.25}, {"x":3, "y":1}, {"x":4, "y":1.25}, {"x":5, "y":1.5}, {"x":10.75, "y":1.5}, {"x":11.75, "y":1.25}, {"x":12.75, "y":1}, {"x":13.75, "y":1.25}, {"x":14.75, "y":2}, {"x":15.75, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":2.25}, {"x":3, "y":2}, {"x":4, "y":2.25}, {"x":5, "y":2.5}, {"x":10.75, "y":2.5}, {"x":11.75, "y":2.25}, {"x":12.75, "y":2}, {"x":13.75, "y":2.25}, {"x":14.75, "y":3}, {"x":15.75, "y":3}, + {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":3.25}, {"x":3, "y":3}, {"x":4, "y":3.25}, {"x":5, "y":3.5}, {"x":6.5, "y":4.25}, {"x":7.5, "y":4.25, "h":2}, {"x":8.5, "y":4.25, "h":2}, {"x":9.5, "y":4.25}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.25}, {"x":12.75, "y":3}, {"x":13.75, "y":3.25}, {"x":14.75, "y":4}, {"x":15.75, "y":4}, + {"x":3.75, "y":4.25}, {"x":4.75, "y":4.5}, {"x":6.5, "y":5.25}, {"x":9.5, "y":5.25}, {"x":11, "y":4.5}, {"x":12, "y":4.25} + ] + } + } +} + diff --git a/keyboards/yosino58/keymaps/default/config.h b/keyboards/yosino58/keymaps/default/config.h new file mode 100644 index 000000000000..21fc2d3b547b --- /dev/null +++ b/keyboards/yosino58/keymaps/default/config.h @@ -0,0 +1,43 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED +// #define SSD1306_128X64 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 \ No newline at end of file diff --git a/keyboards/yosino58/keymaps/default/keymap.c b/keyboards/yosino58/keymaps/default/keymap.c new file mode 100644 index 000000000000..79b50756965a --- /dev/null +++ b/keyboards/yosino58/keymaps/default/keymap.c @@ -0,0 +1,337 @@ +#include QMK_KEYBOARD_H +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + RGBRST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LShift| A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LCTRL | Z | X | C | V | B |-------.-------. ,---------------| N | M | , | . | / | \ | + * `-----------------------------------------/ Del / / \ \ Bksp \----------------------------------------' + * | LAlt |ADJUST| /-------/ Space / \ Enter \-------\ | [ | ] | + * | | |/ LOWER / / \ \ RAISE \ | | | + * `-----------------------------' '------------------------------' + */ + [_QWERTY] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, \ + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_SPC, KC_ENT, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, \ + KC_LALT, ADJUST, LOWER, RAISE, KC_LBRC, KC_RBRC\ + ), + +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | / | - | 7 | 8 | 9 | | ! | @ | # | $ | % | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LShift| * | + | 4 | 5 | 6 | | ^ | & | * | ( | ) | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LCTRL | . | 0 | 1 | 2 | 3 |-------.-------. ,---------------| | _ | + | { | } | | | + * `-----------------------------------------/ F11 / / \ \ F12 \----------------------------------------' + * | LAlt | LGUI | /-------/ Space / \ Enter \-------\ | Caps | Num | + * | | |/ LOWER / / \ \ \ | | | + * `-----------------------------' '------------------------------' + */ + [_LOWER] = 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_PSLS, KC_PMNS, KC_P7, KC_P8, KC_P9, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_F12, \ + _______, KC_PAST, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TILD, \ + _______, KC_PDOT, KC_P0, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_LGUI, _______, XXXXXXX, KC_CLCK, KC_NLCK\ + + ), + +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | | �� | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F7 | F8 | F9 | F10 | F11 | F12 |-------.-------. ,---------------| �� | �� | �� | | | | + * `-----------------------------------------/ / / \ \ \----------------------------------------' + * | | | /-------/ Space / \ Enter \-------\ | | | + * | | |/ / / \ \ RAISE \ | | | + * `-----------------------------' '------------------------------' + */ + [_RAISE] = LAYOUT( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX \ + ), + +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * |RESET | | | | | | | Mute | Vol+ | Play | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | PSCR | SLCK | Pause| | Prev | Vol- | Next | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Insert| Home |PageUP| | | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | Del | End |PageDN|-------.-------. ,---------------| |RGB Re| MODE | HUE- | SAT- | VAL- | + * `-----------------------------------------/ / / \ \ \----------------------------------------' + * | |ADJUST| /-------/ Space / \ Enter \-------\ | | | + * | | |/ / / \ \ \ | | | + * `-----------------------------' '------------------------------' + */ + [_ADJUST] = LAYOUT( \ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLU, KC_MPLY, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, KC_MPRV, KC_VOLD, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_HOME, KC_PGUP, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + XXXXXXX, XXXXXXX, XXXXXXX, KC_DEL, KC_END, KC_PGDN, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, RGBRST, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \ + XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ) +}; + + +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// 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_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + #ifdef SSD1306_128X64 + iota_gfx_init(false); // turns on the display + #else + iota_gfx_init(!has_usb()); // turns on the display + #endif + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +//assign the right code to your layers for OLED display +#define L_QWERTY 0 +#define L_LOWER 2 +#define L_RAISE 4 +#define L_ADJUST 8 + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_logo(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + static char indctr[2][20][5]= + { + // white icon + { + {0x80,0x81,0x82,0x83,0}, + {0x88,0x89,0x8A,0x8B,0}, + {0x90,0x91,0x92,0x93,0}, + {0x98,0x99,0x9A,0x9B,0}, + {0x01,0x02,0x03,0x04,0}, + {0xA0,0xA1,0xA2,0xA3,0}, + {0xA8,0xA9,0xAA,0xAB,0}, + {0xB0,0xB1,0xB2,0xB3,0}, + {0xB8,0xB9,0xBA,0xBB,0}, + {0x21,0x22,0x23,0x24,0}, + {0xC0,0xC1,0xC2,0xC3,0}, + {0xC8,0xC9,0xCA,0xCB,0}, + {0xD0,0xD1,0xD2,0xD3,0}, + {0xD8,0xD9,0xDA,0xDB,0}, + {0x41,0x42,0x43,0x44,0}, + {0xE0,0xE1,0xE2,0xE3,0}, + {0xE8,0xE9,0xEA,0xEB,0}, + {0xF0,0xF1,0xF2,0xF3,0}, + {0xF8,0xF9,0xFA,0xFB,0}, + {0x61,0x62,0x63,0x64,0} + }, + // Black icon + { + {0x84,0x85,0x86,0x87,0}, + {0x8C,0x8D,0x8E,0x8F,0}, + {0x94,0x95,0x96,0x97,0}, + {0x9C,0x9D,0x9E,0x9F,0}, + {0x05,0x06,0x07,0x08,0}, + {0xA4,0xA5,0xA6,0xA7,0}, + {0xAC,0xAD,0xAE,0xAF,0}, + {0xB4,0xB5,0xB6,0xB7,0}, + {0xBC,0xBD,0xBE,0xBF,0}, + {0x25,0x26,0x27,0x28,0}, + {0xC4,0xC5,0xC6,0xC7,0}, + {0xCC,0xCD,0xCE,0xCF,0}, + {0xD4,0xD5,0xD6,0xD7,0}, + {0xDC,0xDD,0xDE,0xDF,0}, + {0x45,0x46,0x47,0x48,0}, + {0xE4,0xE5,0xE6,0xE7,0}, + {0xEC,0xED,0xEE,0xEF,0}, + {0xF4,0xF5,0xF6,0xF7,0}, + {0xFC,0xFD,0xFE,0xFF,0}, + {0x65,0x66,0x67,0x68,0} + } + }; + + int rown = 0; + int rowc = 0; + int rowl = 0; + int rowr = 0; + int rowa = 0; + + //Set Indicator icon + if (host_keyboard_leds() & (1<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) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + diff --git a/keyboards/yosino58/keymaps/default/rules.mk b/keyboards/yosino58/keymaps/default/rules.mk new file mode 100644 index 000000000000..131f5e1f8a69 --- /dev/null +++ b/keyboards/yosino58/keymaps/default/rules.mk @@ -0,0 +1,30 @@ +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# 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 you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/logo_reader.c \ + # ./lib/rgb_state_reader.c \ + # ./lib/layer_state_reader.c \ + # ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/yosino58/keymaps/sakura/config.h b/keyboards/yosino58/keymaps/sakura/config.h new file mode 100644 index 000000000000..64962b0d20dd --- /dev/null +++ b/keyboards/yosino58/keymaps/sakura/config.h @@ -0,0 +1,50 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +#define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED +#define SSD1306_128X64 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 29 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define MOUSEKEY_DELAY 50 +#define MOUSEKEY_INTERVAL 10 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 20 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 diff --git a/keyboards/yosino58/keymaps/sakura/keymap.c b/keyboards/yosino58/keymaps/sakura/keymap.c new file mode 100644 index 000000000000..0996f0e4e7c7 --- /dev/null +++ b/keyboards/yosino58/keymaps/sakura/keymap.c @@ -0,0 +1,337 @@ +#include QMK_KEYBOARD_H +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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. +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + RGBRST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LShift| A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LCTRL | Z | X | C | V | B |-------.-------. ,---------------| N | M | , | . | / | \ | + * `-----------------------------------------/ Del / / \ \ Bksp \----------------------------------------' + * | LAlt | LGUI | /-------/ Space / \ Enter \-------\ | [ | ] | + * | | |/ LOWER / / \ \ RAISE \ | | | + * `-----------------------------' '------------------------------' + */ + [_QWERTY] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, \ + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, KC_SPC, KC_ENT, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS, \ + KC_LALT, KC_LGUI, LOWER, RAISE, KC_LBRC, KC_RBRC\ + ), + +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | / | - | 7 | 8 | 9 | | PSCR | SLCK | Pause| | �� | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LShift| * | + | 4 | 5 | 6 | |Insert| Home |PageUP| | �� | �� | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LCTRL | . | 0 | 1 | 2 | 3 |-------.-------. ,---------------| Del | End |PageDN| �� | Num | Caps | + * `-----------------------------------------/ F11 / / \ \ F12 \----------------------------------------' + * | LAlt | LGUI | /-------/ Space / \ Enter \-------\ | | | + * | | |/ LOWER / / \ \ \ | | | + * `-----------------------------' '------------------------------' + */ + [_LOWER] = LAYOUT( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, \ + _______, KC_PSLS, KC_PMNS, KC_P7, KC_P8, KC_P9, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, KC_UP, XXXXXXX, \ + _______, KC_PAST, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_INS, KC_HOME, KC_PGUP, XXXXXXX, KC_DOWN, KC_RGHT, \ + _______, KC_PDOT, KC_P0, KC_P1, KC_P2, KC_P3, KC_F11, _______, _______, KC_F12, KC_DEL, KC_END, KC_PGDN, KC_LEFT, KC_NLCK, KC_CLCK, \ + _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX\ + ), + +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * |RESET | | | | | | | Mute | Vol+ | Play | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | Prev | Vol- | Next | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |MS_Bt1| MS_U |MS_Bt2|MS_WhU|MS_WhL| | | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | MS_L | MS_D | MS_R |MS_WhD|MS_WhR|-------.-------. ,---------------| | | MODE | HUE- | SAT- | VAL- | + * `-----------------------------------------/ / / \ \ \----------------------------------------' + * | | | /-------/ Space / \ Enter \-------\ | | | + * | | |/ / / \ \ RAISE \ | | | + * `-----------------------------' '------------------------------' + */ + [_RAISE] = LAYOUT( \ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLU, KC_MPLY, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_VOLD, KC_MNXT, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, KC_WH_L, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, KC_WH_R, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, RGBRST, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \ + XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX \ + ) + +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * |RESET | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------.-------. ,---------------| | | | | | | + * `-----------------------------------------/ / / \ \ \----------------------------------------' + * | | | /-------/ / \ \-------\ | | | + * | | |/ / / \ \ \ | | | + * `-----------------------------' '------------------------------' + + [_ADJUST] = LAYOUT( \ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ) +*/ +}; + + +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// 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_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + #ifdef SSD1306_128X64 + iota_gfx_init(false); // turns on the display + #else + iota_gfx_init(!has_usb()); // turns on the display + #endif + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +//assign the right code to your layers for OLED display +#define L_QWERTY 0 +#define L_LOWER 2 +#define L_RAISE 4 +#define L_ADJUST 8 + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_logo(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + static char indctr[2][20][5]= + { + // white icon + { + {0x80,0x81,0x82,0x83,0}, + {0x88,0x89,0x8A,0x8B,0}, + {0x90,0x91,0x92,0x93,0}, + {0x98,0x99,0x9A,0x9B,0}, + {0x01,0x02,0x03,0x04,0}, + {0xA0,0xA1,0xA2,0xA3,0}, + {0xA8,0xA9,0xAA,0xAB,0}, + {0xB0,0xB1,0xB2,0xB3,0}, + {0xB8,0xB9,0xBA,0xBB,0}, + {0x21,0x22,0x23,0x24,0}, + {0xC0,0xC1,0xC2,0xC3,0}, + {0xC8,0xC9,0xCA,0xCB,0}, + {0xD0,0xD1,0xD2,0xD3,0}, + {0xD8,0xD9,0xDA,0xDB,0}, + {0x41,0x42,0x43,0x44,0}, + {0xE0,0xE1,0xE2,0xE3,0}, + {0xE8,0xE9,0xEA,0xEB,0}, + {0xF0,0xF1,0xF2,0xF3,0}, + {0xF8,0xF9,0xFA,0xFB,0}, + {0x61,0x62,0x63,0x64,0} + }, + // Black icon + { + {0x84,0x85,0x86,0x87,0}, + {0x8C,0x8D,0x8E,0x8F,0}, + {0x94,0x95,0x96,0x97,0}, + {0x9C,0x9D,0x9E,0x9F,0}, + {0x05,0x06,0x07,0x08,0}, + {0xA4,0xA5,0xA6,0xA7,0}, + {0xAC,0xAD,0xAE,0xAF,0}, + {0xB4,0xB5,0xB6,0xB7,0}, + {0xBC,0xBD,0xBE,0xBF,0}, + {0x25,0x26,0x27,0x28,0}, + {0xC4,0xC5,0xC6,0xC7,0}, + {0xCC,0xCD,0xCE,0xCF,0}, + {0xD4,0xD5,0xD6,0xD7,0}, + {0xDC,0xDD,0xDE,0xDF,0}, + {0x45,0x46,0x47,0x48,0}, + {0xE4,0xE5,0xE6,0xE7,0}, + {0xEC,0xED,0xEE,0xEF,0}, + {0xF4,0xF5,0xF6,0xF7,0}, + {0xFC,0xFD,0xFE,0xFF,0}, + {0x65,0x66,0x67,0x68,0} + } + }; + + int rown = 0; + int rowc = 0; + int rowl = 0; + int rowr = 0; + int rowa = 0; + + //Set Indicator icon + if (host_keyboard_leds() & (1<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) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + diff --git a/keyboards/yosino58/keymaps/sakura/rules.mk b/keyboards/yosino58/keymaps/sakura/rules.mk new file mode 100644 index 000000000000..296e53287ae2 --- /dev/null +++ b/keyboards/yosino58/keymaps/sakura/rules.mk @@ -0,0 +1,30 @@ +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +# 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 you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/logo_reader.c \ + # ./lib/rgb_state_reader.c \ + # ./lib/layer_state_reader.c \ + # ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/yosino58/lib/glcdfont.c b/keyboards/yosino58/lib/glcdfont.c new file mode 100644 index 000000000000..01b656cc6266 --- /dev/null +++ b/keyboards/yosino58/lib/glcdfont.c @@ -0,0 +1,275 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFC, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x81, 0xC1, 0xE1, 0xF1, 0xF9, + 0xF9, 0xF9, 0xF9, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x02, 0xFC, + 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, + 0x07, 0x07, 0x07, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x03, 0x03, 0x01, 0x00, 0xFF, + 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFC, 0xFC, 0xFC, 0xFE, 0xFF, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFC, 0xFE, 0xFC, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, + 0xFE, 0x00, 0x00, 0x80, 0xF8, 0xFC, + 0x7C, 0x3E, 0x1E, 0x1E, 0x1E, 0x1E, + 0x1E, 0x3E, 0x7C, 0xFC, 0xF8, 0x80, + 0x00, 0x00, 0xC0, 0xF8, 0x7C, 0x3C, + 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, + 0x3C, 0x3C, 0x18, 0x00, 0x38, 0x7C, + 0x7C, 0x7C, 0x7C, 0x7C, 0xFC, 0xFC, + 0x7C, 0x7C, 0x7C, 0x7C, 0x38, 0x00, + 0x00, 0xC0, 0xF0, 0xF8, 0x7C, 0x3C, + 0x1E, 0x1E, 0x1E, 0x3C, 0x7C, 0xF8, + 0xF0, 0xC0, 0x00, 0x00, 0x80, 0xF8, + 0xFC, 0x7C, 0x3E, 0x1E, 0x1E, 0x1E, + 0x1E, 0x1E, 0x3E, 0x7C, 0xFC, 0xF8, + 0x80, 0x00, 0x00, 0x00, 0xFC, 0xFE, + 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, + 0x1E, 0x1E, 0x1E, 0x1E, 0x1C, 0x00, + 0xE0, 0xF8, 0xFC, 0x3E, 0x1E, 0x1E, + 0x1E, 0x1E, 0x1E, 0x1E, 0x3E, 0xFC, + 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x0F, 0x1F, 0x3C, 0x3C, + 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0xFF, + 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, + 0x00, 0x00, 0x03, 0x0F, 0x1E, 0x3C, + 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, + 0x7C, 0xF8, 0xC0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0x00, 0x07, 0x0F, + 0x0F, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, + 0x1E, 0x1E, 0xFE, 0xFC, 0xF0, 0x00, + 0xC0, 0xF7, 0xFF, 0x3F, 0x3E, 0x1C, + 0x1C, 0x1C, 0x1C, 0x3E, 0x3F, 0xFF, + 0xF7, 0xC0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3F, 0x40, 0x80, 0x80, 0x80, 0x80, + 0x9C, 0x9E, 0x9E, 0x9E, 0x9E, 0x9F, + 0x9F, 0x9F, 0x9F, 0x9E, 0x9E, 0x9E, + 0x9E, 0x9C, 0x80, 0x80, 0x40, 0x3F, + 0x3F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xE3, 0xE1, 0xE1, 0xE1, 0xE1, 0xE0, + 0xE0, 0xE0, 0xE0, 0xE1, 0xE1, 0xE1, + 0xE1, 0xE3, 0xFF, 0xFF, 0x7F, 0x3F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x18, 0x3C, 0x3C, 0x3C, 0x3C, + 0x3C, 0x3C, 0x3C, 0x3C, 0x1F, 0x0F, + 0x07, 0x00, 0x00, 0x00, 0x0F, 0x1F, + 0x1F, 0x3E, 0x3C, 0x3C, 0x3C, 0x3C, + 0x3C, 0x3E, 0x1F, 0x1F, 0x0F, 0x00, + 0x00, 0x00, 0x18, 0x3C, 0x3C, 0x3C, + 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, + 0x3E, 0x1F, 0x03, 0x00, 0x1C, 0x3E, + 0x3E, 0x3E, 0x3E, 0x3E, 0x3F, 0x3F, + 0x3E, 0x3E, 0x3E, 0x3E, 0x1C, 0x00, + 0x00, 0x3F, 0x3F, 0x1F, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, + 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x0F, + 0x1F, 0x1F, 0x3E, 0x3C, 0x3C, 0x3C, + 0x3C, 0x3C, 0x3E, 0x1F, 0x1F, 0x0F, + 0x00, 0x00, 0x00, 0x00, 0x06, 0x1F, + 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, + 0x1F, 0x1F, 0x0F, 0x07, 0x03, 0x00, + 0x01, 0x07, 0x0F, 0x1E, 0x3C, 0x3C, + 0x3C, 0x3C, 0x3C, 0x3C, 0x1E, 0x0F, + 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, + 0xFC, 0x02, 0x01, 0x79, 0x79, 0x79, + 0x79, 0xF9, 0xF9, 0xF9, 0x79, 0x79, + 0x79, 0x79, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x02, 0xFC, + 0xFC, 0xFE, 0xFF, 0x87, 0x87, 0x87, + 0x87, 0x07, 0x07, 0x07, 0x87, 0x87, + 0x87, 0x87, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, + 0xFC, 0x02, 0x01, 0xE1, 0xE1, 0xE1, + 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, 0xE1, + 0xE1, 0xE1, 0xE1, 0xE1, 0xC1, 0xC1, + 0x81, 0x01, 0x01, 0x01, 0x02, 0xFC, + 0xFC, 0xFE, 0xFF, 0x1F, 0x1F, 0x1F, + 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, + 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, 0x3F, + 0x7F, 0xFF, 0xFF, 0xFF, 0xFE, 0xFC, + 0xFC, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x09, + 0x89, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, + 0xF9, 0x09, 0x09, 0x01, 0x02, 0xFC, + 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, + 0x77, 0x07, 0x07, 0x07, 0x07, 0x07, + 0x07, 0xF7, 0xF7, 0xFF, 0xFE, 0xFC, + 0xFC, 0x02, 0x01, 0x01, 0x01, 0x01, + 0x81, 0xC1, 0xE1, 0xF1, 0xF1, 0xF9, + 0x79, 0x79, 0xF9, 0xF9, 0xF1, 0xF1, + 0xE1, 0x81, 0x01, 0x01, 0x02, 0xFC, + 0xFC, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, + 0x7F, 0x3F, 0x1F, 0x0F, 0x0F, 0x07, + 0x87, 0x87, 0x07, 0x07, 0x0F, 0x0F, + 0x1F, 0x7F, 0xFF, 0xFF, 0xFE, 0xFC, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0xC0, 0xC0, 0xC0, 0xC0, + 0xC0, 0xC0, 0xC0, 0xC0, 0xE1, 0xFF, + 0x7F, 0x1F, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0x00, 0x00, 0x3F, 0x3F, 0x3F, 0x3F, + 0x3F, 0x3F, 0x3F, 0x3F, 0x1E, 0x00, + 0x80, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xC0, 0xF0, 0xFC, 0xFC, 0x3F, + 0x0F, 0x03, 0x01, 0x01, 0xFF, 0xFF, + 0xFF, 0xF8, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x3F, 0x0F, 0x03, 0x03, 0xC0, + 0xF0, 0xFC, 0xFE, 0xFE, 0x00, 0x00, + 0x00, 0x07, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0xE0, 0xFC, 0xFF, + 0xFF, 0xFF, 0xFF, 0x1F, 0x03, 0x00, + 0x00, 0x00, 0x18, 0x1F, 0x1F, 0x1F, + 0x1F, 0x0F, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0xFF, 0x1F, 0x03, 0x00, + 0x00, 0x00, 0x00, 0xE0, 0xFC, 0xFF, + 0xFF, 0xFF, 0xE7, 0xE0, 0xE0, 0xE0, + 0xE0, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x00, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x7F, 0x3F, 0x1F, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0x01, 0x01, 0x01, 0x01, + 0x03, 0x0F, 0x3F, 0xFD, 0xF1, 0xC0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, + 0x00, 0x00, 0xFE, 0xFE, 0xFE, 0xFE, + 0xFC, 0xF0, 0xC0, 0x02, 0x0F, 0x3F, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0x00, 0xF0, 0xFC, + 0xFF, 0xFF, 0xFF, 0x73, 0x70, 0x70, + 0x70, 0x70, 0x70, 0x70, 0xFF, 0xFF, + 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x03, + 0x00, 0x00, 0x00, 0x8C, 0x8F, 0x8F, + 0x8F, 0x8F, 0x8F, 0x8F, 0x00, 0x00, + 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF, + 0xFF, 0x00, 0x00, 0x3F, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xC0, 0x80, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0xF8, 0xF0, + 0x20, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0xFF, 0xC0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x3F, 0x7F, 0xFF, + 0xFF, 0x7F, 0x3F, 0x1F, 0x07, 0x0F, + 0xDF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0x3F, 0x40, 0x80, 0x8F, 0x8F, 0x8F, + 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, + 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, 0x8F, + 0x8F, 0x87, 0x83, 0x81, 0x40, 0x3F, + 0x3F, 0x7F, 0xFF, 0xF0, 0xF0, 0xF0, + 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, + 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, + 0xF0, 0xF8, 0xFC, 0xFE, 0x7F, 0x3F, + 0x3F, 0x40, 0x80, 0x8E, 0x8E, 0x8F, + 0x8F, 0x8F, 0x8E, 0x8E, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x83, 0x8F, + 0x8F, 0x8E, 0x8E, 0x80, 0x40, 0x3F, + 0x3F, 0x7F, 0xFF, 0xF1, 0xF1, 0xF0, + 0xF0, 0xF0, 0xF1, 0xF1, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, + 0xF0, 0xF1, 0xF1, 0xFF, 0x7F, 0x3F, + 0x3F, 0x40, 0x80, 0x80, 0x9F, 0x9F, + 0x9F, 0x9F, 0x9F, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x9F, 0x9F, + 0x9F, 0x9F, 0x9F, 0x80, 0x40, 0x3F, + 0x3F, 0x7F, 0xFF, 0xFF, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, 0xE0, + 0xE0, 0xE0, 0xE0, 0xFF, 0x7F, 0x3F, + 0x3F, 0x40, 0x80, 0x80, 0x80, 0x81, + 0x83, 0x87, 0x87, 0x8F, 0x8F, 0x8F, + 0x8F, 0x87, 0x87, 0x83, 0x81, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x40, 0x3F, + 0x3F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFE, + 0xFC, 0xF8, 0xF8, 0xF0, 0xF0, 0xF0, + 0xF0, 0xF8, 0xF8, 0xFC, 0xFE, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x3F +}; +#endif // FONT5X7_H diff --git a/keyboards/yosino58/lib/glcdfont_.c b/keyboards/yosino58/lib/glcdfont_.c new file mode 100644 index 000000000000..122b26afa361 --- /dev/null +++ b/keyboards/yosino58/lib/glcdfont_.c @@ -0,0 +1,243 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFE, 0x01, 0x01, 0x0D, 0xFD, + 0xFD, 0x0D, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x01, 0xFE, 0x00, 0x00, + 0x00, 0xFE, 0x01, 0x01, 0x0D, 0xFD, + 0xFD, 0x8D, 0x8D, 0x8D, 0x8D, 0xF9, + 0x71, 0x01, 0x01, 0xFE, 0x00, 0x00, + 0x00, 0xFE, 0x01, 0x01, 0x01, 0xC1, + 0xF1, 0x39, 0x0D, 0x3D, 0xFD, 0xC1, + 0x01, 0x01, 0x01, 0xFE, 0x00, 0x00, + 0x00, 0xFE, 0x01, 0x01, 0x01, 0x01, + 0x21, 0x31, 0xF9, 0xF9, 0x01, 0x01, + 0x01, 0x01, 0x01, 0xFE, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x80, 0xC0, 0xE0, + 0xF0, 0xF0, 0x00, 0xC0, 0x80, 0x00, + 0x80, 0xC0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x06, 0xEC, 0xD8, 0xB4, + 0x6E, 0xDE, 0x82, 0x7A, 0x76, 0xAC, + 0xD8, 0xF0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xB0, 0x70, + 0xBC, 0x7C, 0xBC, 0x7C, 0xBC, 0x70, + 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF0, 0x90, + 0x9C, 0x84, 0x84, 0x84, 0x9C, 0x90, + 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x7F, 0x80, 0x80, 0x98, 0x9F, + 0x9F, 0x98, 0x98, 0x98, 0x98, 0x9C, + 0x9E, 0x80, 0x80, 0x7F, 0x00, 0x00, + 0x00, 0x7F, 0x80, 0x80, 0x98, 0x9F, + 0x9F, 0x99, 0x81, 0x83, 0x87, 0x9C, + 0x98, 0x98, 0x80, 0x7F, 0x00, 0x00, + 0x00, 0x7F, 0x80, 0x80, 0x9F, 0x9F, + 0x86, 0x86, 0x86, 0x86, 0x9F, 0x9F, + 0x80, 0x80, 0x80, 0x7F, 0x00, 0x00, + 0x00, 0x7F, 0x80, 0x80, 0x80, 0x80, + 0x98, 0x98, 0x9F, 0x9F, 0x98, 0x98, + 0x80, 0x80, 0x80, 0x7F, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x03, 0x07, 0x0F, + 0x1F, 0x1F, 0x00, 0x0C, 0x07, 0x03, + 0x07, 0x0C, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1F, 0x2F, 0x77, + 0xFB, 0xFC, 0x81, 0xBB, 0xD6, 0x6D, + 0x1B, 0x37, 0x60, 0xC0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1B, 0x37, + 0x3B, 0x37, 0x3B, 0x37, 0x3B, 0x37, + 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1B, 0x37, + 0x3B, 0x37, 0x3B, 0x37, 0x3B, 0x37, + 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFE, 0xFF, 0xFF, 0xF3, 0x03, + 0x03, 0xF3, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, + 0x00, 0xFE, 0xFF, 0xFF, 0xF3, 0x03, + 0x03, 0x73, 0x73, 0x73, 0x73, 0x07, + 0x8F, 0xFF, 0xFF, 0xFE, 0x00, 0x00, + 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x3F, + 0x0F, 0xC7, 0xF3, 0xC3, 0x03, 0x3F, + 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, + 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, + 0xDF, 0xCF, 0x07, 0x07, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0x80, 0xC0, 0xE0, + 0xF0, 0xF0, 0x00, 0x20, 0x20, 0x10, + 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xF0, 0xE8, 0xDC, + 0xBE, 0x7E, 0x02, 0xFA, 0x76, 0xAC, + 0xD8, 0xF0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, + 0x1C, 0x04, 0x04, 0x04, 0x1C, 0x10, + 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x04, 0xF8, 0x30, + 0x5C, 0x84, 0x04, 0x04, 0x1C, 0x10, + 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x7F, 0xFF, 0xFF, 0xE7, 0xE0, + 0xE0, 0xE7, 0xE7, 0xE7, 0xE7, 0xE7, + 0xE3, 0xE1, 0xFF, 0x7F, 0x00, 0x00, + 0x00, 0x7F, 0xFF, 0xFF, 0xE7, 0xE0, + 0xE0, 0xE6, 0xFE, 0xFC, 0xF8, 0xE3, + 0xE7, 0xE7, 0xFF, 0x7F, 0x00, 0x00, + 0x00, 0x7F, 0xFF, 0xFF, 0xE0, 0xE0, + 0xF9, 0xF9, 0xF9, 0xF9, 0xE0, 0xE0, + 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, + 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, + 0xE7, 0xE7, 0xE0, 0xE0, 0xE7, 0xE7, + 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x03, 0x07, 0x0F, + 0x1F, 0x1F, 0x00, 0x09, 0x09, 0x11, + 0x11, 0x21, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1F, 0x2F, 0x77, + 0xFB, 0xFD, 0x80, 0xBE, 0xDD, 0x6B, + 0x37, 0x1F, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1F, 0x38, + 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, + 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1F, 0x20, + 0x20, 0x20, 0x21, 0x22, 0x24, 0x28, + 0x1F, 0x20, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +#endif // FONT5X7_H diff --git a/keyboards/yosino58/lib/host_led_state_reader.c b/keyboards/yosino58/lib/host_led_state_reader.c new file mode 100644 index 000000000000..2a17e0a33b8b --- /dev/null +++ b/keyboards/yosino58/lib/host_led_state_reader.c @@ -0,0 +1,15 @@ +#include +#include "yosino58.h" + +char host_led_state_str[24]; + +const char *read_host_led_state(void) +{ + uint8_t leds = host_keyboard_leds(); + snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s", + (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ", + (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ", + (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "); + + return host_led_state_str; +} diff --git a/keyboards/yosino58/lib/keylogger.c b/keyboards/yosino58/lib/keylogger.c new file mode 100644 index 000000000000..c50de94c208f --- /dev/null +++ b/keyboards/yosino58/lib/keylogger.c @@ -0,0 +1,45 @@ +#include +#include "yosino58.h" + +char keylog_str[24] = {}; +char keylogs_str[21] = {}; +int keylogs_str_idx = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ', + ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); + + // update keylogs + if (keylogs_str_idx == sizeof(keylogs_str) - 1) { + keylogs_str_idx = 0; + for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { + keylogs_str[i] = ' '; + } + } + + keylogs_str[keylogs_str_idx] = name; + keylogs_str_idx++; +} + +const char *read_keylog(void) { + return keylog_str; +} + +const char *read_keylogs(void) { + return keylogs_str; +} diff --git a/keyboards/yosino58/lib/layer_state_reader.c b/keyboards/yosino58/lib/layer_state_reader.c new file mode 100644 index 000000000000..7e5747cb75af --- /dev/null +++ b/keyboards/yosino58/lib/layer_state_reader.c @@ -0,0 +1,35 @@ + +#include QMK_KEYBOARD_H +#include +#include "yosino58.h" + +#define L_BASE 0 +#define L_LOWER 8 +#define L_RAISE 16 +#define L_ADJUST 65536 +#define L_ADJUST_TRI 65560 + +char layer_state_str[24]; + +const char *read_layer_state(void) { + switch (layer_state) + { + case L_BASE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default"); + break; + case L_RAISE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise"); + break; + case L_LOWER: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower"); + break; + case L_ADJUST: + case L_ADJUST_TRI: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); + break; + default: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state); + } + + return layer_state_str; +} diff --git a/keyboards/yosino58/lib/logo_reader.c b/keyboards/yosino58/lib/logo_reader.c new file mode 100644 index 000000000000..96c9b897ef5a --- /dev/null +++ b/keyboards/yosino58/lib/logo_reader.c @@ -0,0 +1,11 @@ +#include "yosino58.h" + +const char *read_logo(void) { + static char logo[] = { + 0x2B,0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C,0x3D,0x3E,0x3F, + 0x4B,0x4C,0x4D,0x4E,0x4F,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5A,0x5B,0x5C,0x5D,0x5E,0x5F, + 0x6B,0x6C,0x6D,0x6E,0x6F,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7A,0x7B,0x7C,0x7D,0x7E,0x7F, + 0}; + + return logo; +} diff --git a/keyboards/yosino58/lib/mode_icon_reader.c b/keyboards/yosino58/lib/mode_icon_reader.c new file mode 100644 index 000000000000..865d9537ded4 --- /dev/null +++ b/keyboards/yosino58/lib/mode_icon_reader.c @@ -0,0 +1,15 @@ +#include +#include "yosino58.h" + +char mode_icon[24]; + +const char *read_mode_icon(bool swap) { + static char logo[][2][3] = {{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}}; + if (swap == false) { + snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[0][0], logo[0][1]); + } else { + snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[1][0], logo[1][1]); + } + + return mode_icon; +} diff --git a/keyboards/yosino58/lib/rgb_state_reader.c b/keyboards/yosino58/lib/rgb_state_reader.c new file mode 100644 index 000000000000..e0efe2e5288f --- /dev/null +++ b/keyboards/yosino58/lib/rgb_state_reader.c @@ -0,0 +1,15 @@ +#ifdef RGBLIGHT_ENABLE + +#include QMK_KEYBOARD_H +#include + +extern rgblight_config_t rgblight_config; +char rbf_info_str[24]; +const char *read_rgb_info(void) { + + snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d", + rgblight_config.enable ? "on" : "- ", rgblight_config.mode, + rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + return rbf_info_str; +} +#endif diff --git a/keyboards/yosino58/lib/timelogger.c b/keyboards/yosino58/lib/timelogger.c new file mode 100644 index 000000000000..ce8b0c270fe4 --- /dev/null +++ b/keyboards/yosino58/lib/timelogger.c @@ -0,0 +1,16 @@ +#include +#include "yosino58.h" + +char timelog_str[24] = {}; +int last_time = 0; +int elapsed_time = 0; + +void set_timelog(void) { + elapsed_time = timer_elapsed(last_time); + last_time = timer_read(); + snprintf(timelog_str, sizeof(timelog_str), "lt:%5d, et:%5d", last_time, elapsed_time); +} + +const char *read_timelog(void) { + return timelog_str; +} diff --git a/keyboards/yosino58/pro_micro.h b/keyboards/yosino58/pro_micro.h new file mode 100644 index 000000000000..366633372716 --- /dev/null +++ b/keyboards/yosino58/pro_micro.h @@ -0,0 +1,358 @@ +/* + pins_arduino.h - Pin definition functions for Arduino + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2007 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ +*/ +#pragma once + +#include + +// Workaround for wrong definitions in "iom32u4.h". +// This should be fixed in the AVR toolchain. +#undef UHCON +#undef UHINT +#undef UHIEN +#undef UHADDR +#undef UHFNUM +#undef UHFNUML +#undef UHFNUMH +#undef UHFLEN +#undef UPINRQX +#undef UPINTX +#undef UPNUM +#undef UPRST +#undef UPCONX +#undef UPCFG0X +#undef UPCFG1X +#undef UPSTAX +#undef UPCFG2X +#undef UPIENX +#undef UPDATX +#undef TCCR2A +#undef WGM20 +#undef WGM21 +#undef COM2B0 +#undef COM2B1 +#undef COM2A0 +#undef COM2A1 +#undef TCCR2B +#undef CS20 +#undef CS21 +#undef CS22 +#undef WGM22 +#undef FOC2B +#undef FOC2A +#undef TCNT2 +#undef TCNT2_0 +#undef TCNT2_1 +#undef TCNT2_2 +#undef TCNT2_3 +#undef TCNT2_4 +#undef TCNT2_5 +#undef TCNT2_6 +#undef TCNT2_7 +#undef OCR2A +#undef OCR2_0 +#undef OCR2_1 +#undef OCR2_2 +#undef OCR2_3 +#undef OCR2_4 +#undef OCR2_5 +#undef OCR2_6 +#undef OCR2_7 +#undef OCR2B +#undef OCR2_0 +#undef OCR2_1 +#undef OCR2_2 +#undef OCR2_3 +#undef OCR2_4 +#undef OCR2_5 +#undef OCR2_6 +#undef OCR2_7 + +#define NUM_DIGITAL_PINS 30 +#define NUM_ANALOG_INPUTS 12 + +#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) +#define TXLED0 PORTD |= (1<<5) +#define TXLED1 PORTD &= ~(1<<5) +#define RXLED0 PORTB |= (1<<0) +#define RXLED1 PORTB &= ~(1<<0) + +static const uint8_t SDA = 2; +static const uint8_t SCL = 3; +#define LED_BUILTIN 13 + +// Map SPI port to 'new' pins D14..D17 +static const uint8_t SS = 17; +static const uint8_t MOSI = 16; +static const uint8_t MISO = 14; +static const uint8_t SCK = 15; + +// Mapping of analog pins as digital I/O +// A6-A11 share with digital pins +static const uint8_t ADC0 = 18; +static const uint8_t ADC1 = 19; +static const uint8_t ADC2 = 20; +static const uint8_t ADC3 = 21; +static const uint8_t ADC4 = 22; +static const uint8_t ADC5 = 23; +static const uint8_t ADC6 = 24; // D4 +static const uint8_t ADC7 = 25; // D6 +static const uint8_t ADC8 = 26; // D8 +static const uint8_t ADC9 = 27; // D9 +static const uint8_t ADC10 = 28; // D10 +static const uint8_t ADC11 = 29; // D12 + +#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) +#define digitalPinToPCICRbit(p) 0 +#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) +#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) + +// __AVR_ATmega32U4__ has an unusual mapping of pins to channels +extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; +#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) + +#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) + +#ifdef ARDUINO_MAIN + +// On the Arduino board, digital pins are also used +// for the analog output (software PWM). Analog input +// pins are a separate set. + +// ATMEL ATMEGA32U4 / ARDUINO LEONARDO +// +// D0 PD2 RXD1/INT2 +// D1 PD3 TXD1/INT3 +// D2 PD1 SDA SDA/INT1 +// D3# PD0 PWM8/SCL OC0B/SCL/INT0 +// D4 A6 PD4 ADC8 +// D5# PC6 ??? OC3A/#OC4A +// D6# A7 PD7 FastPWM #OC4D/ADC10 +// D7 PE6 INT6/AIN0 +// +// D8 A8 PB4 ADC11/PCINT4 +// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 +// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 +// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 +// D12 A11 PD6 T1/#OC4D/ADC9 +// D13# PC7 PWM10 CLK0/OC4A +// +// A0 D18 PF7 ADC7 +// A1 D19 PF6 ADC6 +// A2 D20 PF5 ADC5 +// A3 D21 PF4 ADC4 +// A4 D22 PF1 ADC1 +// A5 D23 PF0 ADC0 +// +// New pins D14..D17 to map SPI port to digital pins +// +// MISO D14 PB3 MISO,PCINT3 +// SCK D15 PB1 SCK,PCINT1 +// MOSI D16 PB2 MOSI,PCINT2 +// SS D17 PB0 RXLED,SS/PCINT0 +// +// Connected LEDs on board for TX and RX +// TXLED D24 PD5 XCK1 +// RXLED D17 PB0 +// HWB PE2 HWB + +// these arrays map port names (e.g. port B) to the +// appropriate addresses for various functions (e.g. reading +// and writing) +const uint16_t PROGMEM port_to_mode_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &DDRB, + (uint16_t) &DDRC, + (uint16_t) &DDRD, + (uint16_t) &DDRE, + (uint16_t) &DDRF, +}; + +const uint16_t PROGMEM port_to_output_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &PORTB, + (uint16_t) &PORTC, + (uint16_t) &PORTD, + (uint16_t) &PORTE, + (uint16_t) &PORTF, +}; + +const uint16_t PROGMEM port_to_input_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &PINB, + (uint16_t) &PINC, + (uint16_t) &PIND, + (uint16_t) &PINE, + (uint16_t) &PINF, +}; + +const uint8_t PROGMEM digital_pin_to_port_PGM[] = { + PD, // D0 - PD2 + PD, // D1 - PD3 + PD, // D2 - PD1 + PD, // D3 - PD0 + PD, // D4 - PD4 + PC, // D5 - PC6 + PD, // D6 - PD7 + PE, // D7 - PE6 + + PB, // D8 - PB4 + PB, // D9 - PB5 + PB, // D10 - PB6 + PB, // D11 - PB7 + PD, // D12 - PD6 + PC, // D13 - PC7 + + PB, // D14 - MISO - PB3 + PB, // D15 - SCK - PB1 + PB, // D16 - MOSI - PB2 + PB, // D17 - SS - PB0 + + PF, // D18 - A0 - PF7 + PF, // D19 - A1 - PF6 + PF, // D20 - A2 - PF5 + PF, // D21 - A3 - PF4 + PF, // D22 - A4 - PF1 + PF, // D23 - A5 - PF0 + + PD, // D24 - PD5 + PD, // D25 / D6 - A7 - PD7 + PB, // D26 / D8 - A8 - PB4 + PB, // D27 / D9 - A9 - PB5 + PB, // D28 / D10 - A10 - PB6 + PD, // D29 / D12 - A11 - PD6 +}; + +const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { + _BV(2), // D0 - PD2 + _BV(3), // D1 - PD3 + _BV(1), // D2 - PD1 + _BV(0), // D3 - PD0 + _BV(4), // D4 - PD4 + _BV(6), // D5 - PC6 + _BV(7), // D6 - PD7 + _BV(6), // D7 - PE6 + + _BV(4), // D8 - PB4 + _BV(5), // D9 - PB5 + _BV(6), // D10 - PB6 + _BV(7), // D11 - PB7 + _BV(6), // D12 - PD6 + _BV(7), // D13 - PC7 + + _BV(3), // D14 - MISO - PB3 + _BV(1), // D15 - SCK - PB1 + _BV(2), // D16 - MOSI - PB2 + _BV(0), // D17 - SS - PB0 + + _BV(7), // D18 - A0 - PF7 + _BV(6), // D19 - A1 - PF6 + _BV(5), // D20 - A2 - PF5 + _BV(4), // D21 - A3 - PF4 + _BV(1), // D22 - A4 - PF1 + _BV(0), // D23 - A5 - PF0 + + _BV(5), // D24 - PD5 + _BV(7), // D25 / D6 - A7 - PD7 + _BV(4), // D26 / D8 - A8 - PB4 + _BV(5), // D27 / D9 - A9 - PB5 + _BV(6), // D28 / D10 - A10 - PB6 + _BV(6), // D29 / D12 - A11 - PD6 +}; + +const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + TIMER0B, /* 3 */ + NOT_ON_TIMER, + TIMER3A, /* 5 */ + TIMER4D, /* 6 */ + NOT_ON_TIMER, + + NOT_ON_TIMER, + TIMER1A, /* 9 */ + TIMER1B, /* 10 */ + TIMER0A, /* 11 */ + + NOT_ON_TIMER, + TIMER4A, /* 13 */ + + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, +}; + +const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { + 7, // A0 PF7 ADC7 + 6, // A1 PF6 ADC6 + 5, // A2 PF5 ADC5 + 4, // A3 PF4 ADC4 + 1, // A4 PF1 ADC1 + 0, // A5 PF0 ADC0 + 8, // A6 D4 PD4 ADC8 + 10, // A7 D6 PD7 ADC10 + 11, // A8 D8 PB4 ADC11 + 12, // A9 D9 PB5 ADC12 + 13, // A10 D10 PB6 ADC13 + 9 // A11 D12 PD6 ADC9 +}; + +#endif /* ARDUINO_MAIN */ + +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_MONITOR Serial +#define SERIAL_PORT_USBVIRTUAL Serial +#define SERIAL_PORT_HARDWARE Serial1 +#define SERIAL_PORT_HARDWARE_OPEN Serial1 diff --git a/keyboards/yosino58/readme.md b/keyboards/yosino58/readme.md new file mode 100644 index 000000000000..50c95bb995f7 --- /dev/null +++ b/keyboards/yosino58/readme.md @@ -0,0 +1,16 @@ +# yosino58 + +![yosino58](https://booth.pximg.net/4b06a4ec-3a3f-49c5-a9b2-46aa086c82b0/i/1278362/5596aecd-418d-4f28-be64-d8344db22e72_base_resized.jpg) + +yosino58 is a 58-key, Column-Staggered split keyboard. +Compatible with Cherry MX and Kailh low profile switches. Optional support for OLED and Backlight LED. + +Keyboard Maintainer: [sakurachari](https://github.com/sakurachari) +Hardware Supported: yosino58 +Hardware Availability: https://booth.pm/ja/items/1278362 + +Make example for this keyboard (after setting up your build environment): + + make yosino58: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). diff --git a/keyboards/yosino58/rev1/config.h b/keyboards/yosino58/rev1/config.h new file mode 100644 index 000000000000..8a0cf151b7f2 --- /dev/null +++ b/keyboards/yosino58/rev1/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x0F6A +#define PRODUCT_ID 0x01B8 +#define DEVICE_VER 0x0001 +#define MANUFACTURER sakuranbo0046 +#define PRODUCT yosino58 +#define DESCRIPTION yosino58 is 6x4+5keys column-staggered split keyboard. + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLED_NUM 12 // Number of LEDs + +/* + * 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 diff --git a/keyboards/sol/rev1/matrix.c b/keyboards/yosino58/rev1/matrix.c similarity index 71% rename from keyboards/sol/rev1/matrix.c rename to keyboards/yosino58/rev1/matrix.c index 804d8b98096a..718cc574481a 100644 --- a/keyboards/sol/rev1/matrix.c +++ b/keyboards/yosino58/rev1/matrix.c @@ -20,6 +20,7 @@ along with this program. If not, see . */ #include #include +#include #include #include #include @@ -29,18 +30,18 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" #include "split_util.h" -#include +#include "pro_micro.h" -#include "serial.h" +#ifdef USE_MATRIX_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "split_scomm.h" +#endif #ifndef DEBOUNCE # define DEBOUNCE 5 #endif -#ifdef ENCODER_ENABLE_CUSTOM - #include "common/knob_v2.h" -#endif - #define ERROR_DISCONNECT_COUNT 5 static uint8_t debouncing = DEBOUNCE; @@ -102,6 +103,8 @@ void matrix_init(void) init_cols(); TX_RX_LED_INIT; + TXLED0; + RXLED0; // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { @@ -111,9 +114,6 @@ void matrix_init(void) is_master = has_usb(); - #ifdef ENCODER_ENABLE_CUSTOM - knob_init(); //FOR ENCODER - #endif matrix_init_quantum(); } @@ -143,36 +143,61 @@ uint8_t _matrix_scan(void) } } - #ifdef ENCODER_ENABLE_CUSTOM - knob_report_t knob_report = knob_report_read(); + return 1; +} + +#ifdef USE_MATRIX_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; - knob_report_reset(); + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; - matrix[5 + offset] &= 0b11111100; - if (knob_report.phase) { // I check for phase to avoid handling the rotation twice (on 90 and 270 degrees). - if (knob_report.dir > 0) { - matrix[5 + offset] |= 0b00000001; - } else if (knob_report.dir < 0) { - matrix[5 + offset] |= 0b00000010; + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); } - } - #endif + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } - return 1; + return 0; } -int serial_transaction(void) { +#else // USE_SERIAL + +int serial_transaction(int master_changed) { int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; +#ifdef SERIAL_USE_MULTI_TRANSACTION + int ret=serial_update_buffers(master_changed); +#else int ret=serial_update_buffers(); +#endif if (ret ) { + if(ret==2) RXLED1; return 1; } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } + RXLED0; + memcpy(&matrix[slaveOffset], + (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH); return 0; } +#endif uint8_t matrix_scan(void) { @@ -180,13 +205,9 @@ uint8_t matrix_scan(void) matrix_master_scan(); }else{ matrix_slave_scan(); - int offset = (isLeftHand) ? ROWS_PER_HAND : 0; - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[offset+i] = serial_master_buffer[i]; - } - + memcpy(&matrix[offset], + (void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH); matrix_scan_quantum(); } return 1; @@ -196,14 +217,29 @@ uint8_t matrix_scan(void) uint8_t matrix_master_scan(void) { int ret = _matrix_scan(); + int mchanged = 1; int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_master_buffer[i] = matrix[offset+i]; - } +#ifdef USE_MATRIX_I2C +// for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ +// i2c_slave_buffer[i] = matrix[offset+i]; +// } +#else // USE_SERIAL + #ifdef SERIAL_USE_MULTI_TRANSACTION + mchanged = memcmp((void *)serial_master_buffer, + &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); + #endif + memcpy((void *)serial_master_buffer, + &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); +#endif - if( serial_transaction() ) { +#ifdef USE_MATRIX_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction(mchanged) ) { +#endif // turn on the indicator led when halves are disconnected TXLED1; @@ -230,9 +266,26 @@ void matrix_slave_scan(void) { int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; +#ifdef USE_MATRIX_I2C for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else // USE_SERIAL + #ifdef SERIAL_USE_MULTI_TRANSACTION + int change = 0; + #endif + for (int i = 0; i < ROWS_PER_HAND; ++i) { + #ifdef SERIAL_USE_MULTI_TRANSACTION + if( serial_slave_buffer[i] != matrix[offset+i] ) + change = 1; + #endif serial_slave_buffer[i] = matrix[offset+i]; } + #ifdef SERIAL_USE_MULTI_TRANSACTION + slave_buffer_change_count += change; + #endif +#endif } bool matrix_is_modified(void) diff --git a/keyboards/yosino58/rev1/rev1.c b/keyboards/yosino58/rev1/rev1.c new file mode 100644 index 000000000000..ef1f13e41339 --- /dev/null +++ b/keyboards/yosino58/rev1/rev1.c @@ -0,0 +1,8 @@ +#include "yosino58.h" + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + //led_set_user(usb_led); +} +#endif diff --git a/keyboards/yosino58/rev1/rev1.h b/keyboards/yosino58/rev1/rev1.h new file mode 100644 index 000000000000..84d90737d532 --- /dev/null +++ b/keyboards/yosino58/rev1/rev1.h @@ -0,0 +1,40 @@ +#pragma once + +#include "../yosino58.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, LT4, LT5, RT5, RT4, R30, R31, R32, R33, R34, R35, \ + LT1, LT2, LT3, RT3, RT2, RT1 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { KC_NO, LT1, LT2, LT3, LT4, LT5 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 }, \ + { KC_NO, RT1,RT2, RT3, RT4, RT5 }, \ + } diff --git a/keyboards/yosino58/rev1/rules.mk b/keyboards/yosino58/rev1/rules.mk new file mode 100644 index 000000000000..6028b5a5b95a --- /dev/null +++ b/keyboards/yosino58/rev1/rules.mk @@ -0,0 +1,3 @@ +SRC += rev1/matrix.c +SRC += rev1/split_util.c +SRC += rev1/split_scomm.c diff --git a/keyboards/yosino58/rev1/serial_config.h b/keyboards/yosino58/rev1/serial_config.h new file mode 100644 index 000000000000..4fab8e8ddfcf --- /dev/null +++ b/keyboards/yosino58/rev1/serial_config.h @@ -0,0 +1,4 @@ +#ifndef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/yosino58/rev1/serial_config_simpleapi.h b/keyboards/yosino58/rev1/serial_config_simpleapi.h new file mode 100644 index 000000000000..0e1dd9e4acb2 --- /dev/null +++ b/keyboards/yosino58/rev1/serial_config_simpleapi.h @@ -0,0 +1,5 @@ +#pragma once + +#undef SERIAL_USE_MULTI_TRANSACTION +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 diff --git a/keyboards/yosino58/rev1/split_scomm.c b/keyboards/yosino58/rev1/split_scomm.c new file mode 100644 index 000000000000..a1fe6ba5b823 --- /dev/null +++ b/keyboards/yosino58/rev1/split_scomm.c @@ -0,0 +1,91 @@ +#ifdef USE_SERIAL +#ifdef SERIAL_USE_MULTI_TRANSACTION +/* --- USE flexible API (using multi-type transaction function) --- */ + +#include +#include +#include +#include +#include "serial.h" +#ifdef CONSOLE_ENABLE + #include +#endif + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; +uint8_t volatile status_com = 0; +uint8_t volatile status1 = 0; +uint8_t slave_buffer_change_count = 0; +uint8_t s_change_old = 0xff; +uint8_t s_change_new = 0xff; + +SSTD_t transactions[] = { +#define GET_SLAVE_STATUS 0 + /* master buffer not changed, only recive slave_buffer_change_count */ + { (uint8_t *)&status_com, + 0, NULL, + sizeof(slave_buffer_change_count), &slave_buffer_change_count, + }, +#define PUT_MASTER_GET_SLAVE_STATUS 1 + /* master buffer changed need send, and recive slave_buffer_change_count */ + { (uint8_t *)&status_com, + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + sizeof(slave_buffer_change_count), &slave_buffer_change_count, + }, +#define GET_SLAVE_BUFFER 2 + /* recive serial_slave_buffer */ + { (uint8_t *)&status1, + 0, NULL, + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + } +}; + +void serial_master_init(void) +{ + soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); +} + +void serial_slave_init(void) +{ + soft_serial_target_init(transactions, TID_LIMIT(transactions)); +} + +// 0 => no error +// 1 => slave did not respond +// 2 => checksum error +int serial_update_buffers(int master_update) +{ + int status, smatstatus; + static int need_retry = 0; + + if( s_change_old != s_change_new ) { + smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); + if( smatstatus == TRANSACTION_END ) { + s_change_old = s_change_new; +#ifdef CONSOLE_ENABLE + uprintf("slave matrix = %b %b %b %b\n", + serial_slave_buffer[0], serial_slave_buffer[1], + serial_slave_buffer[2], serial_slave_buffer[3]); +#endif + } + } else { + // serial_slave_buffer dosen't change + smatstatus = TRANSACTION_END; // dummy status + } + + if( !master_update && !need_retry) { + status = soft_serial_transaction(GET_SLAVE_STATUS); + } else { + status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); + } + if( status == TRANSACTION_END ) { + s_change_new = slave_buffer_change_count; + need_retry = 0; + } else { + need_retry = 1; + } + return smatstatus; +} + +#endif // SERIAL_USE_MULTI_TRANSACTION +#endif /* USE_SERIAL */ diff --git a/keyboards/yosino58/rev1/split_scomm.h b/keyboards/yosino58/rev1/split_scomm.h new file mode 100644 index 000000000000..873d8939d81f --- /dev/null +++ b/keyboards/yosino58/rev1/split_scomm.h @@ -0,0 +1,24 @@ +#ifndef SPLIT_COMM_H +#define SPLIT_COMM_H + +#ifndef SERIAL_USE_MULTI_TRANSACTION +/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ +#include "serial.h" + +#else +/* --- USE flexible API (using multi-type transaction function) --- */ +// Buffers for master - slave communication +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 + +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; +extern uint8_t slave_buffer_change_count; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(int master_changed); + +#endif + +#endif /* SPLIT_COMM_H */ diff --git a/keyboards/zen/split_util.c b/keyboards/yosino58/rev1/split_util.c similarity index 79% rename from keyboards/zen/split_util.c rename to keyboards/yosino58/rev1/split_util.c index 346cbc908949..e1ff8b4379dc 100644 --- a/keyboards/zen/split_util.c +++ b/keyboards/yosino58/rev1/split_util.c @@ -7,13 +7,11 @@ #include "split_util.h" #include "matrix.h" #include "keyboard.h" -#include "config.h" -#include "timer.h" -#ifdef USE_I2C +#ifdef USE_MATRIX_I2C # include "i2c.h" #else -# include "serial.h" +# include "split_scomm.h" #endif volatile bool isLeftHand = true; @@ -32,19 +30,17 @@ static void setup_handedness(void) { } static void keyboard_master_setup(void) { -#ifdef USE_I2C + +#ifdef USE_MATRIX_I2C i2c_master_init(); -#ifdef SSD1306OLED - matrix_master_OLED_init (); -#endif #else serial_master_init(); #endif } static void keyboard_slave_setup(void) { - timer_init(); -#ifdef USE_I2C + +#ifdef USE_MATRIX_I2C i2c_slave_init(SLAVE_I2C_ADDRESS); #else serial_slave_init(); @@ -68,19 +64,7 @@ void split_keyboard_setup(void) { sei(); } -void keyboard_slave_loop(void) { - matrix_init(); - - while (1) { - matrix_slave_scan(); - } -} - // this code runs before the usb and keyboard is initialized void matrix_setup(void) { split_keyboard_setup(); - - if (!has_usb()) { - keyboard_slave_loop(); - } } diff --git a/keyboards/zen/split_util.h b/keyboards/yosino58/rev1/split_util.h similarity index 91% rename from keyboards/zen/split_util.h rename to keyboards/yosino58/rev1/split_util.h index 595a0659e1dd..687ca19bd3e5 100644 --- a/keyboards/zen/split_util.h +++ b/keyboards/yosino58/rev1/split_util.h @@ -13,7 +13,6 @@ void matrix_slave_scan(void); void split_keyboard_setup(void); bool has_usb(void); -void keyboard_slave_loop(void); void matrix_master_OLED_init (void); diff --git a/keyboards/yosino58/rules.mk b/keyboards/yosino58/rules.mk new file mode 100644 index 000000000000..f2934454d994 --- /dev/null +++ b/keyboards/yosino58/rules.mk @@ -0,0 +1,76 @@ +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c + +# if firmware size over limit, try this option +# CFLAGS += -flto + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SUBPROJECT_rev1 = no +USE_I2C = yes +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes + +DEFAULT_FOLDER = yosino58/rev1 diff --git a/keyboards/yosino58/serial.c b/keyboards/yosino58/serial.c new file mode 100644 index 000000000000..325c29a3f704 --- /dev/null +++ b/keyboards/yosino58/serial.c @@ -0,0 +1,590 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + * + * 2018-10-28 checked + * avr-gcc 4.9.2 + * avr-gcc 5.4.0 + * avr-gcc 7.3.0 + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include +#include "serial.h" +//#include + +#ifdef SOFT_SERIAL_PIN + +#ifdef __AVR_ATmega32U4__ + // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. + #ifdef USE_I2C + #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 + #error Using ATmega32U4 I2C, so can not use PD0, PD1 + #endif + #endif + + #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 + #define SERIAL_PIN_DDR DDRD + #define SERIAL_PIN_PORT PORTD + #define SERIAL_PIN_INPUT PIND + #if SOFT_SERIAL_PIN == D0 + #define SERIAL_PIN_MASK _BV(PD0) + #define EIMSK_BIT _BV(INT0) + #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) + #define SERIAL_PIN_INTERRUPT INT0_vect + #elif SOFT_SERIAL_PIN == D1 + #define SERIAL_PIN_MASK _BV(PD1) + #define EIMSK_BIT _BV(INT1) + #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) + #define SERIAL_PIN_INTERRUPT INT1_vect + #elif SOFT_SERIAL_PIN == D2 + #define SERIAL_PIN_MASK _BV(PD2) + #define EIMSK_BIT _BV(INT2) + #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) + #define SERIAL_PIN_INTERRUPT INT2_vect + #elif SOFT_SERIAL_PIN == D3 + #define SERIAL_PIN_MASK _BV(PD3) + #define EIMSK_BIT _BV(INT3) + #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) + #define SERIAL_PIN_INTERRUPT INT3_vect + #endif + #elif SOFT_SERIAL_PIN == E6 + #define SERIAL_PIN_DDR DDRE + #define SERIAL_PIN_PORT PORTE + #define SERIAL_PIN_INPUT PINE + #define SERIAL_PIN_MASK _BV(PE6) + #define EIMSK_BIT _BV(INT6) + #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) + #define SERIAL_PIN_INTERRUPT INT6_vect + #else + #error invalid SOFT_SERIAL_PIN value + #endif + +#else + #error serial.c now support ATmega32U4 only +#endif + +//////////////// for backward compatibility //////////////////////////////// +#ifndef SERIAL_USE_MULTI_TRANSACTION +/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; + #endif + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; + #endif + uint8_t volatile status0 = 0; + +SSTD_t transactions[] = { + { (uint8_t *)&status0, + #if SERIAL_MASTER_BUFFER_LENGTH > 0 + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + #else + 0, (uint8_t *)NULL, + #endif + #if SERIAL_SLAVE_BUFFER_LENGTH > 0 + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + #else + 0, (uint8_t *)NULL, + #endif + } +}; + +void serial_master_init(void) +{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } + +void serial_slave_init(void) +{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } + +// 0 => no error +// 1 => slave did not respond +// 2 => checksum error +int serial_update_buffers() +{ + int result; + result = soft_serial_transaction(); + return result; +} + +#endif // end of Simple API (OLD API, compatible with let's split serial.c) +//////////////////////////////////////////////////////////////////////////// + +#define ALWAYS_INLINE __attribute__((always_inline)) +#define NO_INLINE __attribute__((noinline)) +#define _delay_sub_us(x) __builtin_avr_delay_cycles(x) + +// parity check +#define ODD_PARITY 1 +#define EVEN_PARITY 0 +#define PARITY EVEN_PARITY + +#ifdef SERIAL_DELAY + // custom setup in config.h + // #define TID_SEND_ADJUST 2 + // #define SERIAL_DELAY 6 // micro sec + // #define READ_WRITE_START_ADJUST 30 // cycles + // #define READ_WRITE_WIDTH_ADJUST 8 // cycles +#else +// ============ Standard setups ============ + +#ifndef SELECT_SOFT_SERIAL_SPEED +#define SELECT_SOFT_SERIAL_SPEED 1 +// 0: about 189kbps +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +#endif + +#if __GNUC__ < 6 + #define TID_SEND_ADJUST 14 +#else + #define TID_SEND_ADJUST 2 +#endif + +#if SELECT_SOFT_SERIAL_SPEED == 0 + // Very High speed + #define SERIAL_DELAY 4 // micro sec + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 34 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 1 + // High speed + #define SERIAL_DELAY 6 // micro sec + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 30 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 2 + // Middle speed + #define SERIAL_DELAY 12 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 3 + // Low speed + #define SERIAL_DELAY 24 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 4 + // Very Low speed + #define SERIAL_DELAY 36 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 5 + // Ultra Low speed + #define SERIAL_DELAY 48 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#else +#error invalid SELECT_SOFT_SERIAL_SPEED value +#endif /* SELECT_SOFT_SERIAL_SPEED */ +#endif /* SERIAL_DELAY */ + +#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) +#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) + +#define SLAVE_INT_WIDTH_US 1 +#ifndef SERIAL_USE_MULTI_TRANSACTION + #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY +#else + #define SLAVE_INT_ACK_WIDTH_UNIT 2 + #define SLAVE_INT_ACK_WIDTH 4 +#endif + +static SSTD_t *Transaction_table = NULL; +static uint8_t Transaction_table_size = 0; + +inline static void serial_delay(void) ALWAYS_INLINE; +inline static +void serial_delay(void) { + _delay_us(SERIAL_DELAY); +} + +inline static void serial_delay_half1(void) ALWAYS_INLINE; +inline static +void serial_delay_half1(void) { + _delay_us(SERIAL_DELAY_HALF1); +} + +inline static void serial_delay_half2(void) ALWAYS_INLINE; +inline static +void serial_delay_half2(void) { + _delay_us(SERIAL_DELAY_HALF2); +} + +inline static void serial_output(void) ALWAYS_INLINE; +inline static +void serial_output(void) { + SERIAL_PIN_DDR |= SERIAL_PIN_MASK; +} + +// make the serial pin an input with pull-up resistor +inline static void serial_input_with_pullup(void) ALWAYS_INLINE; +inline static +void serial_input_with_pullup(void) { + SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; +inline static +uint8_t serial_read_pin(void) { + return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); +} + +inline static void serial_low(void) ALWAYS_INLINE; +inline static +void serial_low(void) { + SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; +} + +inline static void serial_high(void) ALWAYS_INLINE; +inline static +void serial_high(void) { + SERIAL_PIN_PORT |= SERIAL_PIN_MASK; +} + +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_output(); + serial_high(); +} + +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) +{ + Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; + serial_input_with_pullup(); + + // Enable INT0-INT3,INT6 + EIMSK |= EIMSK_BIT; +#if SERIAL_PIN_MASK == _BV(PE6) + // Trigger on falling edge of INT6 + EICRB &= EICRx_BIT; +#else + // Trigger on falling edge of INT0-INT3 + EICRA &= EICRx_BIT; +#endif +} + +// Used by the sender to synchronize timing with the reciver. +static void sync_recv(void) NO_INLINE; +static +void sync_recv(void) { + for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) { + } + // This shouldn't hang if the target disconnects because the + // serial line will float to high if the target does disconnect. + while (!serial_read_pin()); +} + +// Used by the reciver to send a synchronization signal to the sender. +static void sync_send(void) NO_INLINE; +static +void sync_send(void) { + serial_low(); + serial_delay(); + serial_high(); +} + +// Reads a byte from the serial line +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { + uint8_t byte, i, p, pb; + + _delay_sub_us(READ_WRITE_START_ADJUST); + for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { + serial_delay_half1(); // read the middle of pulses + if( serial_read_pin() ) { + byte = (byte << 1) | 1; p ^= 1; + } else { + byte = (byte << 1) | 0; p ^= 0; + } + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + } + /* recive parity bit */ + serial_delay_half1(); // read the middle of pulses + pb = serial_read_pin(); + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + + *pterrcount += (p != pb)? 1 : 0; + + return byte; +} + +// Sends a byte with MSB ordering +void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; +void serial_write_chunk(uint8_t data, uint8_t bit) { + uint8_t b, p; + for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { + if(data & b) { + serial_high(); p ^= 1; + } else { + serial_low(); p ^= 0; + } + serial_delay(); + } + /* send parity bit */ + if(p & 1) { serial_high(); } + else { serial_low(); } + serial_delay(); + + serial_low(); // sync_send() / senc_recv() need raise edge +} + +static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +void serial_send_packet(uint8_t *buffer, uint8_t size) { + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + data = buffer[i]; + sync_send(); + serial_write_chunk(data,8); + } +} + +static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static +uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { + uint8_t pecount = 0; + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + sync_recv(); + data = serial_read_chunk(&pecount, 8); + buffer[i] = data; + } + return pecount == 0; +} + +inline static +void change_sender2reciver(void) { + sync_send(); //0 + serial_delay_half1(); //1 + serial_low(); //2 + serial_input_with_pullup(); //2 + serial_delay_half1(); //3 +} + +inline static +void change_reciver2sender(void) { + sync_recv(); //0 + serial_delay(); //1 + serial_low(); //3 + serial_output(); //3 + serial_delay_half1(); //4 +} + +static inline uint8_t nibble_bits_count(uint8_t bits) +{ + bits = (bits & 0x5) + (bits >> 1 & 0x5); + bits = (bits & 0x3) + (bits >> 2 & 0x3); + return bits; +} + +// interrupt handle to be used by the target device +ISR(SERIAL_PIN_INTERRUPT) { + +#ifndef SERIAL_USE_MULTI_TRANSACTION + serial_low(); + serial_output(); + SSTD_t *trans = Transaction_table; +#else + // recive transaction table index + uint8_t tid, bits; + uint8_t pecount = 0; + sync_recv(); + bits = serial_read_chunk(&pecount,7); + tid = bits>>3; + bits = (bits&7) != nibble_bits_count(tid); + if( bits || pecount> 0 || tid > Transaction_table_size ) { + return; + } + serial_delay_half1(); + + serial_high(); // response step1 low->high + serial_output(); + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH); + SSTD_t *trans = &Transaction_table[tid]; + serial_low(); // response step2 ack high->low +#endif + + // target send phase + if( trans->target2initiator_buffer_size > 0 ) + serial_send_packet((uint8_t *)trans->target2initiator_buffer, + trans->target2initiator_buffer_size); + // target switch to input + change_sender2reciver(); + + // target recive phase + if( trans->initiator2target_buffer_size > 0 ) { + if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size) ) { + *trans->status = TRANSACTION_ACCEPTED; + } else { + *trans->status = TRANSACTION_DATA_ERROR; + } + } else { + *trans->status = TRANSACTION_ACCEPTED; + } + + sync_recv(); //weit initiator output to high +} + +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) +// +// Returns: +// TRANSACTION_END +// TRANSACTION_NO_RESPONSE +// TRANSACTION_DATA_ERROR +// this code is very time dependent, so we need to disable interrupts +#ifndef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_transaction(void) { + SSTD_t *trans = Transaction_table; +#else +int soft_serial_transaction(int sstd_index) { + if( sstd_index > Transaction_table_size ) + return TRANSACTION_TYPE_ERROR; + SSTD_t *trans = &Transaction_table[sstd_index]; +#endif + cli(); + + // signal to the target that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(SLAVE_INT_WIDTH_US); + +#ifndef SERIAL_USE_MULTI_TRANSACTION + // wait for the target response + serial_input_with_pullup(); + _delay_us(SLAVE_INT_RESPONSE_TIME); + + // check if the target is present + if (serial_read_pin()) { + // target failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + +#else + // send transaction table index + int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); + sync_send(); + _delay_sub_us(TID_SEND_ADJUST); + serial_write_chunk(tid, 7); + serial_delay_half1(); + + // wait for the target response (step1 low->high) + serial_input_with_pullup(); + while( !serial_read_pin() ) { + _delay_sub_us(2); + } + + // check if the target is present (step2 high->low) + for( int i = 0; serial_read_pin(); i++ ) { + if (i > SLAVE_INT_ACK_WIDTH + 1) { + // slave failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); + } +#endif + + // initiator recive phase + // if the target is present syncronize with it + if( trans->target2initiator_buffer_size > 0 ) { + if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, + trans->target2initiator_buffer_size) ) { + serial_output(); + serial_high(); + *trans->status = TRANSACTION_DATA_ERROR; + sei(); + return TRANSACTION_DATA_ERROR; + } + } + + // initiator switch to output + change_reciver2sender(); + + // initiator send phase + if( trans->initiator2target_buffer_size > 0 ) { + serial_send_packet((uint8_t *)trans->initiator2target_buffer, + trans->initiator2target_buffer_size); + } + + // always, release the line when not in use + sync_send(); + + *trans->status = TRANSACTION_END; + sei(); + return TRANSACTION_END; +} + +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index) { + SSTD_t *trans = &Transaction_table[sstd_index]; + cli(); + int retval = *trans->status; + *trans->status = 0;; + sei(); + return retval; +} +#endif + +#endif + +// Helix serial.c history +// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) +// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) +// (adjusted with avr-gcc 4.9.2) +// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) +// (adjusted with avr-gcc 4.9.2) +// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) +// (adjusted with avr-gcc 4.9.2) +// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) +// (adjusted with avr-gcc 7.3.0) +// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) +// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/yosino58/serial.h b/keyboards/yosino58/serial.h new file mode 100644 index 000000000000..7e0c0847a431 --- /dev/null +++ b/keyboards/yosino58/serial.h @@ -0,0 +1,84 @@ +#ifndef SOFT_SERIAL_H +#define SOFT_SERIAL_H + +#include + +// ///////////////////////////////////////////////////////////////// +// Need Soft Serial defines in config.h +// ///////////////////////////////////////////////////////////////// +// ex. +// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 +// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 +// // 1: about 137kbps (default) +// // 2: about 75kbps +// // 3: about 39kbps +// // 4: about 26kbps +// // 5: about 20kbps +// +// //// USE Simple API (OLD API, compatible with let's split serial.c) +// ex. +// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +// #define SERIAL_MASTER_BUFFER_LENGTH 1 +// +// //// USE flexible API (using multi-type transaction function) +// #define SERIAL_USE_MULTI_TRANSACTION +// +// ///////////////////////////////////////////////////////////////// + + +#ifndef SERIAL_USE_MULTI_TRANSACTION +/* --- USE Simple API (OLD API, compatible with let's split serial.c) */ +#if SERIAL_SLAVE_BUFFER_LENGTH > 0 +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +#endif +#if SERIAL_MASTER_BUFFER_LENGTH > 0 +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; +#endif + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(void); + +#endif // USE Simple API + +// Soft Serial Transaction Descriptor +typedef struct _SSTD_t { + uint8_t *status; + uint8_t initiator2target_buffer_size; + uint8_t *initiator2target_buffer; + uint8_t target2initiator_buffer_size; + uint8_t *target2initiator_buffer; +} SSTD_t; +#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) + +// initiator is transaction start side +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); +// target is interrupt accept side +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); + +// initiator resullt +#define TRANSACTION_END 0 +#define TRANSACTION_NO_RESPONSE 0x1 +#define TRANSACTION_DATA_ERROR 0x2 +#define TRANSACTION_TYPE_ERROR 0x4 +#ifndef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_transaction(void); +#else +int soft_serial_transaction(int sstd_index); +#endif + +// target status +// *SSTD_t.status has +// initiator: +// TRANSACTION_END +// or TRANSACTION_NO_RESPONSE +// or TRANSACTION_DATA_ERROR +// target: +// TRANSACTION_DATA_ERROR +// or TRANSACTION_ACCEPTED +#define TRANSACTION_ACCEPTED 0x8 +#ifdef SERIAL_USE_MULTI_TRANSACTION +int soft_serial_get_and_clean_status(int sstd_index); +#endif + +#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/yosino58/ssd1306.c b/keyboards/yosino58/ssd1306.c new file mode 100644 index 000000000000..3353f615f581 --- /dev/null +++ b/keyboards/yosino58/ssd1306.c @@ -0,0 +1,348 @@ +#ifdef SSD1306OLED + +#include "ssd1306.h" +#include "i2c.h" +#include +#include "print.h" +#ifdef ADAFRUIT_BLE_ENABLE +#include "adafruit_ble.h" +#endif +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#endif +#include "sendchar.h" +#include "timer.h" + +extern const unsigned char font[] PROGMEM; + +// Set this to 1 to help diagnose early startup problems +// when testing power-on with ble. Turn it off otherwise, +// as the latency of printing most of the debug info messes +// with the matrix scan, causing keys to drop. +#define DEBUG_TO_SCREEN 0 + +//static uint16_t last_battery_update; +//static uint32_t vbat; +//#define BatteryUpdateInterval 10000 /* milliseconds */ + +// 'last_flush' is declared as uint16_t, +// so this must be less than 65535 +#define ScreenOffInterval 30000 /* milliseconds */ +#if DEBUG_TO_SCREEN +static uint8_t displaying; +#endif +static uint16_t last_flush; + +static bool force_dirty = true; + +// Write command sequence. +// Returns true on success. +static inline bool _send_cmd1(uint8_t cmd) { + bool res = false; + + if (i2c_start_write(SSD1306_ADDRESS)) { + xprintf("failed to start write to %d\n", SSD1306_ADDRESS); + goto done; + } + + if (i2c_master_write(0x0 /* command byte follows */)) { + print("failed to write control byte\n"); + + goto done; + } + + if (i2c_master_write(cmd)) { + xprintf("failed to write command %d\n", cmd); + goto done; + } + res = true; +done: + i2c_master_stop(); + return res; +} + +// Write 2-byte command sequence. +// Returns true on success +static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { + if (!_send_cmd1(cmd)) { + return false; + } + return _send_cmd1(opr); +} + +// Write 3-byte command sequence. +// Returns true on success +static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { + if (!_send_cmd1(cmd)) { + return false; + } + if (!_send_cmd1(opr1)) { + return false; + } + return _send_cmd1(opr2); +} + +#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} +#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} +#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} + +static void clear_display(void) { + matrix_clear(&display); + + // Clear all of the display bits (there can be random noise + // in the RAM on startup) + send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); + send_cmd3(ColumnAddr, 0, DisplayWidth - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < DisplayWidth; ++col) { + i2c_master_write(0); + } + } + + display.dirty = false; + +done: + i2c_master_stop(); +} + +#if DEBUG_TO_SCREEN +#undef sendchar +static int8_t capture_sendchar(uint8_t c) { + sendchar(c); + iota_gfx_write_char(c); + + if (!displaying) { + iota_gfx_flush(); + } + return 0; +} +#endif + +bool iota_gfx_init(bool rotate) { + bool success = false; + + i2c_master_init(); + send_cmd1(DisplayOff); + send_cmd2(SetDisplayClockDiv, 0x80); + send_cmd2(SetMultiPlex, DisplayHeight - 1); + + send_cmd2(SetDisplayOffset, 0); + + + send_cmd1(SetStartLine | 0x0); + send_cmd2(SetChargePump, 0x14 /* Enable */); + send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); + + if(rotate){ + // the following Flip the display orientation 180 degrees + send_cmd1(SegRemap); + send_cmd1(ComScanInc); + }else{ + // Flips the display orientation 0 degrees + send_cmd1(SegRemap | 0x1); + send_cmd1(ComScanDec); + } + +#ifdef SSD1306_128X64 + send_cmd2(SetComPins, 0x12); +#else + send_cmd2(SetComPins, 0x2); +#endif + send_cmd2(SetContrast, 0x8f); + send_cmd2(SetPreCharge, 0xf1); + send_cmd2(SetVComDetect, 0x40); + send_cmd1(DisplayAllOnResume); + send_cmd1(NormalDisplay); + send_cmd1(DeActivateScroll); + send_cmd1(DisplayOn); + + send_cmd2(SetContrast, 0); // Dim + + clear_display(); + + success = true; + + iota_gfx_flush(); + +#if DEBUG_TO_SCREEN + print_set_sendchar(capture_sendchar); +#endif + +done: + return success; +} + +bool iota_gfx_off(void) { + bool success = false; + + send_cmd1(DisplayOff); + success = true; + +done: + return success; +} + +bool iota_gfx_on(void) { + bool success = false; + + send_cmd1(DisplayOn); + success = true; + +done: + return success; +} + +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { + *matrix->cursor = c; + ++matrix->cursor; + + if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { + // We went off the end; scroll the display upwards by one line + memmove(&matrix->display[0], &matrix->display[1], + MatrixCols * (MatrixRows - 1)); + matrix->cursor = &matrix->display[MatrixRows - 1][0]; + memset(matrix->cursor, ' ', MatrixCols); + } +} + +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { + matrix->dirty = true; + + if (c == '\n') { + // Clear to end of line from the cursor and then move to the + // start of the next line + uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; + + while (cursor_col++ < MatrixCols) { + matrix_write_char_inner(matrix, ' '); + } + return; + } + + matrix_write_char_inner(matrix, c); +} + +void iota_gfx_write_char(uint8_t c) { + matrix_write_char(&display, c); +} + +void matrix_write(struct CharacterMatrix *matrix, const char *data) { + const char *end = data + strlen(data); + while (data < end) { + matrix_write_char(matrix, *data); + ++data; + } +} + +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { + char data_ln[strlen(data)+2]; + snprintf(data_ln, sizeof(data_ln), "%s\n", data); + matrix_write(matrix, data_ln); +} + +void iota_gfx_write(const char *data) { + matrix_write(&display, data); +} + +void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { + while (true) { + uint8_t c = pgm_read_byte(data); + if (c == 0) { + return; + } + matrix_write_char(matrix, c); + ++data; + } +} + +void iota_gfx_write_P(const char *data) { + matrix_write_P(&display, data); +} + +void matrix_clear(struct CharacterMatrix *matrix) { + memset(matrix->display, ' ', sizeof(matrix->display)); + matrix->cursor = &matrix->display[0][0]; + matrix->dirty = true; +} + +void iota_gfx_clear_screen(void) { + matrix_clear(&display); +} + +void matrix_render(struct CharacterMatrix *matrix) { + last_flush = timer_read(); + iota_gfx_on(); +#if DEBUG_TO_SCREEN + ++displaying; +#endif + + // Move to the home position + send_cmd3(PageAddr, 0, MatrixRows - 1); + send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < MatrixCols; ++col) { + const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); + + for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { + uint8_t colBits = pgm_read_byte(glyph + glyphCol); + i2c_master_write(colBits); + } + + // 1 column of space between chars (it's not included in the glyph) + //i2c_master_write(0); + } + } + + matrix->dirty = false; + +done: + i2c_master_stop(); +#if DEBUG_TO_SCREEN + --displaying; +#endif +} + +void iota_gfx_flush(void) { + matrix_render(&display); +} + +__attribute__ ((weak)) +void iota_gfx_task_user(void) { +} + +void iota_gfx_task(void) { + iota_gfx_task_user(); + + if (display.dirty|| force_dirty) { + iota_gfx_flush(); + force_dirty = false; + } + + if (timer_elapsed(last_flush) > ScreenOffInterval) { + iota_gfx_off(); + } +} + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { + force_dirty = true; + return true; +} + +#endif diff --git a/keyboards/yosino58/ssd1306.h b/keyboards/yosino58/ssd1306.h new file mode 100644 index 000000000000..de0a9a02aa52 --- /dev/null +++ b/keyboards/yosino58/ssd1306.h @@ -0,0 +1,96 @@ +#pragma once + +#include +#include +#include "pincontrol.h" +#include "action.h" + +enum ssd1306_cmds { + DisplayOff = 0xAE, + DisplayOn = 0xAF, + + SetContrast = 0x81, + DisplayAllOnResume = 0xA4, + + DisplayAllOn = 0xA5, + NormalDisplay = 0xA6, + InvertDisplay = 0xA7, + SetDisplayOffset = 0xD3, + SetComPins = 0xda, + SetVComDetect = 0xdb, + SetDisplayClockDiv = 0xD5, + SetPreCharge = 0xd9, + SetMultiPlex = 0xa8, + SetLowColumn = 0x00, + SetHighColumn = 0x10, + SetStartLine = 0x40, + + SetMemoryMode = 0x20, + ColumnAddr = 0x21, + PageAddr = 0x22, + + ComScanInc = 0xc0, + ComScanDec = 0xc8, + SegRemap = 0xa0, + SetChargePump = 0x8d, + ExternalVcc = 0x01, + SwitchCapVcc = 0x02, + + ActivateScroll = 0x2f, + DeActivateScroll = 0x2e, + SetVerticalScrollArea = 0xa3, + RightHorizontalScroll = 0x26, + LeftHorizontalScroll = 0x27, + VerticalAndRightHorizontalScroll = 0x29, + VerticalAndLeftHorizontalScroll = 0x2a, +}; + +// Controls the SSD1306 128x32 OLED display via i2c + +#ifndef SSD1306_ADDRESS +#define SSD1306_ADDRESS 0x3C +#endif + +#ifdef SSD1306_128X64 +#define DisplayHeight 64 +#else +#define DisplayHeight 32 +#endif +#define DisplayWidth 128 + + +#define FontHeight 8 +#define FontWidth 6 + +#define MatrixRows (DisplayHeight / FontHeight) +#define MatrixCols (DisplayWidth / FontWidth) + +struct CharacterMatrix { + uint8_t display[MatrixRows][MatrixCols]; + uint8_t *cursor; + bool dirty; +}; + +struct CharacterMatrix display; + +bool iota_gfx_init(bool rotate); +void iota_gfx_task(void); +bool iota_gfx_off(void); +bool iota_gfx_on(void); +void iota_gfx_flush(void); +void iota_gfx_write_char(uint8_t c); +void iota_gfx_write(const char *data); +void iota_gfx_write_P(const char *data); +void iota_gfx_clear_screen(void); + +void iota_gfx_task_user(void); + +void matrix_clear(struct CharacterMatrix *matrix); +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write(struct CharacterMatrix *matrix, const char *data); +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); +void matrix_write_P(struct CharacterMatrix *matrix, const char *data); +void matrix_render(struct CharacterMatrix *matrix); + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record); \ No newline at end of file diff --git a/keyboards/yosino58/yosino58.c b/keyboards/yosino58/yosino58.c new file mode 100644 index 000000000000..ff3ec10e5a4c --- /dev/null +++ b/keyboards/yosino58/yosino58.c @@ -0,0 +1,10 @@ +#include "yosino58.h" +#include "ssd1306.h" + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { +#ifdef SSD1306OLED + return process_record_gfx(keycode,record) && process_record_user(keycode, record); +#else + return process_record_user(keycode, record); +#endif +} diff --git a/keyboards/yosino58/yosino58.h b/keyboards/yosino58/yosino58.h new file mode 100644 index 000000000000..5414c31bd806 --- /dev/null +++ b/keyboards/yosino58/yosino58.h @@ -0,0 +1,5 @@ +#pragma once + +#ifdef KEYBOARD_yosino58_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/z150_blackheart/info.json b/keyboards/z150_blackheart/info.json new file mode 100644 index 000000000000..016641254c35 --- /dev/null +++ b/keyboards/z150_blackheart/info.json @@ -0,0 +1,191 @@ +{ + "keyboard_name": "Z-150 Blackheart", + "url": "", + "maintainer": "qmk, blindassassin111", + "width": 21.25, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 84, + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F2", "x":1, "y":0}, + {"label":"Esc", "x":2.5, "y":0}, + {"label":"!", "x":3.5, "y":0}, + {"label":"@", "x":4.5, "y":0}, + {"label":"#", "x":5.5, "y":0}, + {"label":"$", "x":6.5, "y":0}, + {"label":"%", "x":7.5, "y":0}, + {"label":"^", "x":8.5, "y":0}, + {"label":"&", "x":9.5, "y":0}, + {"label":"*", "x":10.5, "y":0}, + {"label":"(", "x":11.5, "y":0}, + {"label":")", "x":12.5, "y":0}, + {"label":"_", "x":13.5, "y":0}, + {"label":"+", "x":14.5, "y":0}, + {"label":"Backspace", "x":15.5, "y":0, "w":1.75}, + {"label":"Num Lock", "x":17.25, "y":0}, + {"label":"Scroll Lock", "x":18.25, "y":0, "w":1.5}, + {"label":"Sys Req", "x":19.75, "y":0, "w":1.5}, + {"label":"F3", "x":0, "y":1}, + {"label":"F4", "x":1, "y":1}, + {"label":"Tab", "x":2.5, "y":1, "w":1.5}, + {"label":"Q", "x":4, "y":1}, + {"label":"W", "x":5, "y":1}, + {"label":"E", "x":6, "y":1}, + {"label":"R", "x":7, "y":1}, + {"label":"T", "x":8, "y":1}, + {"label":"Y", "x":9, "y":1}, + {"label":"U", "x":10, "y":1}, + {"label":"I", "x":11, "y":1}, + {"label":"O", "x":12, "y":1}, + {"label":"P", "x":13, "y":1}, + {"label":"{", "x":14, "y":1}, + {"label":"}", "x":15, "y":1, "w":1.25}, + {"label":"Enter", "x":15.25, "y":2, "w":2}, + {"label":"7", "x":17.25, "y":1}, + {"label":"8", "x":18.25, "y":1}, + {"label":"9", "x":19.25, "y":1}, + {"label":"PrtSc", "x":20.25, "y":1}, + {"label":"F5", "x":0, "y":2}, + {"label":"F6", "x":1, "y":2}, + {"label":"Ctrl", "x":2.5, "y":2, "w":1.75}, + {"label":"A", "x":4.25, "y":2}, + {"label":"S", "x":5.25, "y":2}, + {"label":"D", "x":6.25, "y":2}, + {"label":"F", "x":7.25, "y":2}, + {"label":"G", "x":8.25, "y":2}, + {"label":"H", "x":9.25, "y":2}, + {"label":"J", "x":10.25, "y":2}, + {"label":"K", "x":11.25, "y":2}, + {"label":"L", "x":12.25, "y":2}, + {"label":":", "x":13.25, "y":2}, + {"label":"\"", "x":14.25, "y":2}, + {"label":"4", "x":17.25, "y":2}, + {"label":"5", "x":18.25, "y":2}, + {"label":"6", "x":19.25, "y":2}, + {"label":"-", "x":20.25, "y":2}, + {"label":"F7", "x":0, "y":3}, + {"label":"F8", "x":1, "y":3}, + {"label":"Shift", "x":2.5, "y":3, "w":2.25}, + {"label":"Z", "x":4.75, "y":3}, + {"label":"X", "x":5.75, "y":3}, + {"label":"C", "x":6.75, "y":3}, + {"label":"V", "x":7.75, "y":3}, + {"label":"B", "x":8.75, "y":3}, + {"label":"N", "x":9.75, "y":3}, + {"label":"M", "x":10.75, "y":3}, + {"label":"<", "x":11.75, "y":3}, + {"label":">", "x":12.75, "y":3}, + {"label":"?", "x":13.75, "y":3}, + {"label":"Shift", "x":14.75, "y":3, "w":1.5}, + {"label":"|", "x":16.25, "y":3}, + {"label":"1", "x":17.25, "y":3}, + {"label":"2", "x":18.25, "y":3}, + {"label":"3", "x":19.25, "y":3}, + {"label":"+", "x":20.25, "y":3, "h":2}, + {"label":"F9", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + {"label":"Alt", "x":2.5, "y":4, "w":1.75}, + {"label":"~", "x":4.25, "y":4}, + {"label":"Space", "x":5.25, "y":4, "w":9}, + {"label":"Caps Lock", "x":14.25, "y":4, "w":2}, + {"label":"0", "x":16.25, "y":4, "w":2}, + {"label":".", "x":18.25, "y":4, "w":2} + ] + }, + "LAYOUT_z150_tkl": { + "key_count": 88, + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F2", "x":1, "y":0}, + {"label":"Esc", "x":2.5, "y":0}, + {"label":"1", "x":3.5, "y":0}, + {"label":"2", "x":4.5, "y":0}, + {"label":"3", "x":5.5, "y":0}, + {"label":"4", "x":6.5, "y":0}, + {"label":"5", "x":7.5, "y":0}, + {"label":"6", "x":8.5, "y":0}, + {"label":"7", "x":9.5, "y":0}, + {"label":"8", "x":10.5, "y":0}, + {"label":"9", "x":11.5, "y":0}, + {"label":"0", "x":12.5, "y":0}, + {"label":"-", "x":13.5, "y":0}, + {"label":"=", "x":14.5, "y":0}, + {"label":"Backspace", "x":15.5, "y":0, "w":2}, + {"label":"Insert", "x":18.25, "y":0}, + {"label":"Home", "x":19.25, "y":0}, + {"label":"PgUp", "x":20.25, "y":0}, + {"label":"F3", "x":0, "y":1}, + {"label":"F4", "x":1, "y":1}, + {"label":"Tab", "x":2.5, "y":1, "w":1.5}, + {"label":"Q", "x":4, "y":1}, + {"label":"W", "x":5, "y":1}, + {"label":"E", "x":6, "y":1}, + {"label":"R", "x":7, "y":1}, + {"label":"T", "x":8, "y":1}, + {"label":"Y", "x":9, "y":1}, + {"label":"U", "x":10, "y":1}, + {"label":"I", "x":11, "y":1}, + {"label":"O", "x":12, "y":1}, + {"label":"P", "x":13, "y":1}, + {"label":"[", "x":14, "y":1}, + {"label":"]", "x":15, "y":1}, + {"label":"\\", "x":16, "y":1, "w":1.5}, + {"label":"Delete", "x":18.25, "y":1}, + {"label":"End", "x":19.25, "y":1}, + {"label":"PgDn", "x":20.25, "y":1}, + {"label":"F5", "x":0, "y":2}, + {"label":"F6", "x":1, "y":2}, + {"label":"Caps Lock", "x":2.5, "y":2, "w":1.75}, + {"label":"A", "x":4.25, "y":2}, + {"label":"S", "x":5.25, "y":2}, + {"label":"D", "x":6.25, "y":2}, + {"label":"F", "x":7.25, "y":2}, + {"label":"G", "x":8.25, "y":2}, + {"label":"H", "x":9.25, "y":2}, + {"label":"J", "x":10.25, "y":2}, + {"label":"K", "x":11.25, "y":2}, + {"label":"L", "x":12.25, "y":2}, + {"label":";", "x":13.25, "y":2}, + {"label":"'", "x":14.25, "y":2}, + {"label":"Enter", "x":15.25, "y":2, "w":2.25}, + {"x":18.25, "y":2}, + {"x":19.25, "y":2}, + {"x":20.25, "y":2}, + {"label":"F7", "x":0, "y":3}, + {"label":"F8", "x":1, "y":3}, + {"label":"Shift", "x":2.5, "y":3, "w":1.25}, + {"label":"ISO \\", "x":3.75, "y":3}, + {"label":"Z", "x":4.75, "y":3}, + {"label":"X", "x":5.75, "y":3}, + {"label":"C", "x":6.75, "y":3}, + {"label":"V", "x":7.75, "y":3}, + {"label":"B", "x":8.75, "y":3}, + {"label":"N", "x":9.75, "y":3}, + {"label":"M", "x":10.75, "y":3}, + {"label":",", "x":11.75, "y":3}, + {"label":".", "x":12.75, "y":3}, + {"label":"/", "x":13.75, "y":3}, + {"label":"Shift", "x":14.75, "y":3, "w":1.75}, + {"label":"Fn", "x":16.5, "y":3}, + {"x":18.25, "y":3}, + {"label":"Up", "x":19.25, "y":3}, + {"x":20.25, "y":3}, + {"label":"F9", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + {"label":"Ctrl", "x":2.5, "y":4, "w":1.25}, + {"label":"Win", "x":3.75, "y":4, "w":1.25}, + {"label":"Alt", "x":5, "y":4, "w":1.25}, + {"label":"Space", "x":6.25, "y":4, "w":6.25}, + {"label":"Alt", "x":12.5, "y":4, "w":1.25}, + {"label":"Win", "x":13.75, "y":4, "w":1.25}, + {"label":"Menu", "x":15, "y":4, "w":1.25}, + {"label":"Ctrl", "x":16.25, "y":4, "w":1.25}, + {"label":"Left", "x":18.25, "y":4}, + {"label":"Down", "x":19.25, "y":4}, + {"label":"Right", "x":20.25, "y":4} + ] + } + } +} diff --git a/keyboards/z150_blackheart/keymaps/default/keymap.c b/keyboards/z150_blackheart/keymaps/default/keymap.c index e93802052a5c..ff4f6f7f9d6f 100644 --- a/keyboards/z150_blackheart/keymaps/default/keymap.c +++ b/keyboards/z150_blackheart/keymaps/default/keymap.c @@ -1,38 +1,37 @@ +/* Copyright 2018 blindassassin111 + * + * 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 . + */ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( - KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_SLCK, MO(1), - KC_F3, KC_F4, 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_ENT, KC_P7, KC_P8, KC_P9, KC_PAST, - KC_F5, KC_F6, KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_P4, KC_P5, KC_P6, KC_PMNS, - KC_F7, KC_F8, 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_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, - KC_F9, KC_F10, KC_LALT, KC_GRV, KC_SPC, KC_CAPS, KC_P0, KC_PDOT - ), - - LAYOUT( - _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______ - ), - - LAYOUT_z150_tkl( - KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_F3, KC_F4, 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_F5, KC_F6, 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, XXXXXXX, XXXXXXX, XXXXXXX, - KC_F7, KC_F8, KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, MO(1), XXXXXXX, KC_UP, XXXXXXX, - KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - - LAYOUT_z150_tkl( - _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), + [0] = LAYOUT( + KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_SLCK, MO(1), + KC_F3, KC_F4, 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_ENT, KC_P7, KC_P8, KC_P9, KC_PAST, + KC_F5, KC_F6, 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_P4, KC_P5, KC_P6, KC_PMNS, + KC_F7, KC_F8, 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_BSLS, KC_P1, KC_P2, KC_P3, KC_PPLS, + KC_F9, KC_F10, KC_LALT, KC_GRV, KC_SPC, KC_CAPS, KC_P0, KC_PDOT + ), + + [1] = LAYOUT( + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), }; void matrix_init_user(void) { @@ -42,28 +41,8 @@ void matrix_scan_user(void) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + return true; } void led_set_user(uint8_t usb_led) { - DDRB |= (1 << 0); - DDRE |= (1 << 6) | (1 << 7); - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - PORTE |= (1 << 7); - } else { - PORTE &= ~(1 << 7); - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - PORTB |= (1 << 0); - } else { - PORTB &= ~(1 << 0); - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - PORTE |= (1 << 6); - } else { - PORTE &= ~(1 << 6); - } } \ No newline at end of file diff --git a/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c b/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c new file mode 100644 index 000000000000..f1a24b8ddabe --- /dev/null +++ b/keyboards/z150_blackheart/keymaps/default_tkl/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2018 blindassassin111 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_z150_tkl( + KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_F3, KC_F4, 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_F5, KC_F6, 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, XXXXXXX, XXXXXXX, XXXXXXX, + KC_F7, KC_F8, KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), XXXXXXX, KC_UP, XXXXXXX, + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_z150_tkl( + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { +} \ No newline at end of file diff --git a/keyboards/z150_blackheart/readme.md b/keyboards/z150_blackheart/readme.md index 5e87b6c8f382..331f85694e36 100644 --- a/keyboards/z150_blackheart/readme.md +++ b/keyboards/z150_blackheart/readme.md @@ -5,7 +5,7 @@ A replacement PCB for Zenith Z-150 keyboards. Keyboard Maintainer: QMK Community and blindassassin111 Hardware Supported: Z-150 blackheart PCB -Hardware Availability: https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html +Hardware Availability: [Deskthority Group Buy](https://deskthority.net/group-buys-f50/programmable-vintage-board-pcbs-omnikey-at101-and-z-150-t19325.html) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/z150_blackheart/z150_blackheart.c b/keyboards/z150_blackheart/z150_blackheart.c index 10f388cf62d9..b754c64a12a1 100644 --- a/keyboards/z150_blackheart/z150_blackheart.c +++ b/keyboards/z150_blackheart/z150_blackheart.c @@ -1 +1,32 @@ #include "z150_blackheart.h" + +void matrix_init_kb(void) { + setPinOutput(B0); + setPinOutput(E6); + setPinOutput(E7); + + matrix_init_user(); +}; + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + writePinHigh(E7); + } else { + writePinLow(E7); + } + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(B0); + } else { + writePinLow(B0); + } + + if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { + writePinHigh(E6); + } else { + writePinLow(E6); + } + + led_set_user(usb_led); +} diff --git a/keyboards/z150_blackheart/z150_blackheart.h b/keyboards/z150_blackheart/z150_blackheart.h index baf187fd2d11..f97ac1c0358e 100644 --- a/keyboards/z150_blackheart/z150_blackheart.h +++ b/keyboards/z150_blackheart/z150_blackheart.h @@ -1,34 +1,31 @@ -#ifndef z150_blackheart_H -#define z150_blackheart_H +#pragma once #include "quantum.h" #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K019, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, K216, K217, K218, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \ - K400, K401, K402, K403, K407, K414, K415, K417 \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0J, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, K2I, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, \ + K40, K41, K42, K43, K47, K4E, K4F, K4H \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, KC_NO, K019 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215, K216, K217, K218, KC_NO }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, KC_NO }, \ - { K400, K401, K402, K403, KC_NO, KC_NO, KC_NO, K407, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K414, K415, KC_NO, K417, KC_NO, KC_NO } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, KC_NO, K0J }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F, K2G, K2H, K2I, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, KC_NO }, \ + { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K4E, K4F, KC_NO, K4H, KC_NO, KC_NO } \ } #define LAYOUT_z150_tkl( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K017, K018, K019, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K117, K118, K119, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K216, K217, K218, \ - K300, K301, K302, K405, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K316, K317, K318, \ - K400, K401, K402, K403, K404, K407, K412, K413, K414, K415, K416, K417, K418 \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0H, K0I, K0J, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1H, K1I, K1J, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2G, K2H, K2I, \ + K30, K31, K32, K45, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3G, K3H, K3I, \ + K40, K41, K42, K43, K44, K47, K4C, K4D, K4E, K4F, K4G, K4H, K4I \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, KC_NO, K017, K018, K019 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, KC_NO, K117, K118, K119 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, KC_NO, K216, K217, K218, KC_NO }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, KC_NO, K316, K317, K318, KC_NO }, \ - { K400, K401, K402, K403, K404, K405, KC_NO, K407, KC_NO, KC_NO, KC_NO, KC_NO, K412, K413, K414, K415, K416, K417, K418, KC_NO } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, KC_NO, K0H, K0I, K0J }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, KC_NO, K1H, K1I, K1J }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, KC_NO, K2G, K2H, K2I, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO, K3G, K3H, K3I, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, KC_NO, K47, KC_NO, KC_NO, KC_NO, KC_NO, K4C, K4D, K4E, K4F, K4G, K4H, K4I, KC_NO } \ } - -#endif \ No newline at end of file diff --git a/keyboards/zeal60/config.h b/keyboards/zeal60/config.h index e39b06cf6b23..a5e41116dca4 100644 --- a/keyboards/zeal60/config.h +++ b/keyboards/zeal60/config.h @@ -86,9 +86,19 @@ // disable backlight after timeout in minutes, 0 = no timeout #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 +// the default brightness +#define RGB_BACKLIGHT_BRIGHTNESS 255 + // the default effect (RGB test) #define RGB_BACKLIGHT_EFFECT 255 +// the default effect speed (0-3) +#define RGB_BACKLIGHT_EFFECT_SPEED 0 + +// the default color1 and color2 +#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 } +#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 } + // These define which keys in the matrix are alphas/mods // Used for backlight effects so colors are different for // alphas vs. mods @@ -100,6 +110,11 @@ #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 +#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } +#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 } + #define DYNAMIC_KEYMAP_LAYER_COUNT 4 // EEPROM usage diff --git a/keyboards/zeal60/keymaps/tusing/keymap.c b/keyboards/zeal60/keymaps/tusing/keymap.c index 41d2effd4686..755ace8618c3 100644 --- a/keyboards/zeal60/keymaps/tusing/keymap.c +++ b/keyboards/zeal60/keymaps/tusing/keymap.c @@ -2,7 +2,6 @@ #include QMK_KEYBOARD_H // For readability. -#define _______ KC_TRNS #define _x_ KC_NO #define AUD_PRV LCTL(KC_MPRV) // Previous music track #define AUD_PLY LCTL(KC_MPLY) // Pause music diff --git a/keyboards/zeal60/rgb_backlight.c b/keyboards/zeal60/rgb_backlight.c index a965a13bbdf6..a3f7151bf507 100644 --- a/keyboards/zeal60/rgb_backlight.c +++ b/keyboards/zeal60/rgb_backlight.c @@ -15,9 +15,9 @@ */ #if RGB_BACKLIGHT_ENABLED -#if defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_ZEAL65) || defined (RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) || defined(RGB_BACKLIGHT_HS60) +#if defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) || defined(RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) #else -#error None of the following was defined: RGB_BACKLIGHT_ZEAL60, RGB_BACKLIGHT_ZEAL65, RGB_BACKLIGHT_M60_A, RGB_BACKLIGHT_M6_B, RGB_BACKLIGHT_KOYU +#error None of the following was defined: RGB_BACKLIGHT_ZEAL60, RGB_BACKLIGHT_ZEAL65, RGB_BACKLIGHT_M60_A, RGB_BACKLIGHT_M6_B, RGB_BACKLIGHT_KOYU, RGB_BACKLIGHT_HS60, RGB_BACKLIGHT_NK65 #endif #ifndef MAX @@ -33,7 +33,7 @@ #include "rgb_backlight_api.h" #include "rgb_backlight_keycodes.h" -#if !defined(RGB_BACKLIGHT_HS60) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) #include #include #include @@ -47,12 +47,15 @@ #include "progmem.h" #include "quantum/color.h" -#if defined (RGB_BACKLIGHT_M6_B) +#if defined(RGB_BACKLIGHT_M6_B) #include "drivers/issi/is31fl3218.h" #define BACKLIGHT_LED_COUNT 6 -#elif defined (RGB_BACKLIGHT_HS60) +#elif defined(RGB_BACKLIGHT_HS60) #include "drivers/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 64 +#elif defined(RGB_BACKLIGHT_NK65) +#include "drivers/issi/is31fl3733.h" +#define BACKLIGHT_LED_COUNT 69 #else #include "drivers/issi/is31fl3731.h" #define BACKLIGHT_LED_COUNT 72 @@ -61,31 +64,31 @@ #define BACKLIGHT_EFFECT_MAX 10 backlight_config g_config = { - .use_split_backspace = RGB_BACKLIGHT_USE_SPLIT_BACKSPACE, - .use_split_left_shift = RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT, - .use_split_right_shift = RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT, - .use_7u_spacebar = RGB_BACKLIGHT_USE_7U_SPACEBAR, - .use_iso_enter = RGB_BACKLIGHT_USE_ISO_ENTER, - .disable_hhkb_blocker_leds = RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS, - .disable_when_usb_suspended = RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED, - .disable_after_timeout = RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT, - .brightness = 255, - .effect = RGB_BACKLIGHT_EFFECT, - .effect_speed = 0, - .color_1 = { .h = 0, .s = 255 }, - .color_2 = { .h = 127, .s = 255 }, - .caps_lock_indicator = { .color = { .h = 0, .s = 0 }, .index = 255 }, - .layer_1_indicator = { .color = { .h = 0, .s = 0 }, .index = 255 }, - .layer_2_indicator = { .color = { .h = 0, .s = 0 }, .index = 255 }, - .layer_3_indicator = { .color = { .h = 0, .s = 0 }, .index = 255 }, - .alphas_mods = { - RGB_BACKLIGHT_ALPHAS_MODS_ROW_0, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_1, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_2, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_3, - RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 }, + .use_split_backspace = RGB_BACKLIGHT_USE_SPLIT_BACKSPACE, + .use_split_left_shift = RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT, + .use_split_right_shift = RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT, + .use_7u_spacebar = RGB_BACKLIGHT_USE_7U_SPACEBAR, + .use_iso_enter = RGB_BACKLIGHT_USE_ISO_ENTER, + .disable_hhkb_blocker_leds = RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS, + .disable_when_usb_suspended = RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED, + .disable_after_timeout = RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT, + .brightness = RGB_BACKLIGHT_BRIGHTNESS, + .effect = RGB_BACKLIGHT_EFFECT, + .effect_speed = RGB_BACKLIGHT_EFFECT_SPEED, + .color_1 = RGB_BACKLIGHT_COLOR_1, + .color_2 = RGB_BACKLIGHT_COLOR_2, + .caps_lock_indicator = RGB_BACKLIGHT_CAPS_LOCK_INDICATOR, + .layer_1_indicator = RGB_BACKLIGHT_LAYER_1_INDICATOR, + .layer_2_indicator = RGB_BACKLIGHT_LAYER_2_INDICATOR, + .layer_3_indicator = RGB_BACKLIGHT_LAYER_3_INDICATOR, + .alphas_mods = { + RGB_BACKLIGHT_ALPHAS_MODS_ROW_0, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_1, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_2, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_3, + RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 }, #if defined(RGB_BACKLIGHT_M6_B) - .custom_color = { { 0, 255 }, { 43, 255 }, { 85, 255 }, { 128, 255 }, { 171, 255 }, { 213, 255 } } + .custom_color = { { 0, 255 }, { 43, 255 }, { 85, 255 }, { 128, 255 }, { 171, 255 }, { 213, 255 } } #endif }; @@ -107,7 +110,6 @@ uint32_t g_any_key_hit = 0; // set to 0 for write, 1 for read (as per I2C protocol) // ADDR_2 is not needed. it is here as a dummy #define ISSI_ADDR_1 0x50 -#define ISSI_ADDR_2 0x50 const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations @@ -182,6 +184,152 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, K_16, J_16, L_16}, //LA64 }; +#elif defined(RGB_BACKLIGHT_NK65) + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// ADDR_2 is not needed. it is here as a dummy +#define ISSI_ADDR_1 0x50 +#define ISSI_ADDR_2 0x52 + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, B_1, A_1, C_1}, //LA1 + {0, E_1, D_1, F_1}, //LA2 + {0, H_1, G_1, I_1}, //LA3 + {0, K_1, J_1, L_1}, //LA4 + {0, B_2, A_2, C_2}, //LA5 + {0, E_2, D_2, F_2}, //LA6 + {0, H_2, G_2, I_2}, //LA7 + {0, K_2, J_2, L_2}, //LA8 + {0, B_3, A_3, C_3}, //LA9 + {0, E_3, D_3, F_3}, //LA10 + {0, H_3, G_3, I_3}, //LA11 + {0, K_3, J_3, L_3}, //LA12 + {0, B_4, A_4, C_4}, //LA13 + {0, E_4, D_4, F_4}, //LA14 + {0, H_4, G_4, I_4}, //LA15 + {0, K_4, J_4, L_4}, //LA16 + {0, B_5, A_5, C_5}, //LA17 + {0, E_5, D_5, F_5}, //LA18 + {0, H_5, G_5, I_5}, //LA19 + {0, K_5, J_5, L_5}, //LA20 + {0, B_6, A_6, C_6}, //LA21 + {0, E_6, D_6, F_6}, //LA22 + {0, H_6, G_6, I_6}, //LA23 + {0, K_6, J_6, L_6}, //LA24 + {0, B_7, A_7, C_7}, //LA25 + {0, E_7, D_7, F_7}, //LA26 + {0, H_7, G_7, I_7}, //LA27 + {0, K_7, J_7, L_7}, //LA28 + {0, B_8, A_8, C_8}, //LA29 + {0, E_8, D_8, F_8}, //LA30 + {0, H_8, G_8, I_8}, //LA31 + {0, K_8, J_8, L_8}, //LA32 + {0, B_9, A_9, C_9}, //LA33 + {0, E_9, D_9, F_9}, //LA34 + {0, H_9, G_9, I_9}, //LA35 + {0, K_9, J_9, L_9}, //LA36 + {0, B_10, A_10, C_10}, //LA37 + {0, E_10, D_10, F_10}, //LA38 + {0, H_10, G_10, I_10}, //LA39 + {0, K_10, J_10, L_10}, //LA40 + {0, B_11, A_11, C_11}, //LA41 + {0, E_11, D_11, F_11}, //LA42 + {0, H_11, G_11, I_11}, //LA43 + {0, K_11, J_11, L_11}, //LA44 + {0, B_12, A_12, C_12}, //LA45 + {0, E_12, D_12, F_12}, //LA46 + {0, H_12, G_12, I_12}, //LA47 + {0, K_12, J_12, L_12}, //LA48 + {0, B_13, A_13, C_13}, //LA49 + {0, E_13, D_13, F_13}, //LA50 + {0, H_13, G_13, I_13}, //LA51 + {0, K_13, J_13, L_13}, //LA52 + {0, B_14, A_14, C_14}, //LA53 + {0, E_14, D_14, F_14}, //LA54 + {0, H_14, G_14, I_14}, //LA55 + {0, K_14, J_14, L_14}, //LA56 + {0, B_15, A_15, C_15}, //LA57 + {0, E_15, D_15, F_15}, //LA58 + {0, H_15, G_15, I_15}, //LA59 + {0, K_15, J_15, L_15}, //LA60 + {0, B_16, A_16, C_16}, //LA61 + {0, E_16, D_16, F_16}, //LA62 + {0, H_16, G_16, I_16}, //LA63 + {0, K_16, J_16, L_16}, //LA64 + + {1, B_1, A_1, C_1}, //LB1 + {1, E_1, D_1, F_1}, //LB2 + {1, H_1, G_1, I_1}, //LB3 + {1, K_1, J_1, L_1}, //LB4 + {1, B_2, A_2, C_2}, //LB5 + {1, E_2, D_2, F_2}, //LB6 + {1, H_2, G_2, I_2}, //LB7 + {1, K_2, J_2, L_2}, //LB8 + {1, B_3, A_3, C_3}, //LB9 + {1, E_3, D_3, F_3}, //LB10 + {1, H_3, G_3, I_3}, //LB11 + {1, K_3, J_3, L_3}, //LB12 + {1, B_4, A_4, C_4}, //LB13 + {1, E_4, D_4, F_4}, //LB14 + {1, H_4, G_4, I_4}, //LB15 + {1, K_4, J_4, L_4}, //LB16 + {1, B_5, A_5, C_5}, //LB17 + {1, E_5, D_5, F_5}, //LB18 + {1, H_5, G_5, I_5}, //LB19 + {1, K_5, J_5, L_5}, //LB20 + {1, B_6, A_6, C_6}, //LB21 + {1, E_6, D_6, F_6}, //LB22 + {1, H_6, G_6, I_6}, //LB23 + {1, K_6, J_6, L_6}, //LB24 + {1, B_7, A_7, C_7}, //LB25 + {1, E_7, D_7, F_7}, //LB26 + {1, H_7, G_7, I_7}, //LB27 + {1, K_7, J_7, L_7}, //LB28 + {1, B_8, A_8, C_8}, //LB29 + {1, E_8, D_8, F_8}, //LB30 + {1, H_8, G_8, I_8}, //LB31 + {1, K_8, J_8, L_8}, //LB32 + {1, B_9, A_9, C_9}, //LB33 + {1, E_9, D_9, F_9}, //LB34 + {1, H_9, G_9, I_9}, //LB35 + {1, K_9, J_9, L_9}, //LB36 + {1, B_10, A_10, C_10}, //LB37 + {1, E_10, D_10, F_10}, //LB38 + {1, H_10, G_10, I_10}, //LB39 + {1, K_10, J_10, L_10}, //LB40 + {1, B_11, A_11, C_11}, //LB41 + {1, E_11, D_11, F_11}, //LB42 + {1, H_11, G_11, I_11}, //LB43 + {1, K_11, J_11, L_11}, //LB44 + {1, B_12, A_12, C_12}, //LB45 + {1, E_12, D_12, F_12}, //LB46 + {1, H_12, G_12, I_12}, //LB47 + {1, K_12, J_12, L_12}, //LB48 + {1, B_13, A_13, C_13}, //LB49 + {1, E_13, D_13, F_13}, //LB50 + {1, H_13, G_13, I_13}, //LB51 + {1, K_13, J_13, L_13}, //LB52 + {1, B_14, A_14, C_14}, //LB53 + {1, E_14, D_14, F_14}, //LB54 + {1, H_14, G_14, I_14}, //LB55 + {1, K_14, J_14, L_14}, //LB56 + {1, B_15, A_15, C_15}, //LB57 + {1, E_15, D_15, F_15}, //LB58 + {1, H_15, G_15, I_15}, //LB59 + {1, K_15, J_15, L_15}, //LB60 + {1, B_16, A_16, C_16}, //LB61 + {1, E_16, D_16, F_16}, //LB62 + {1, H_16, G_16, I_16}, //LB63 + {1, K_16, J_16, L_16}, //LB64 +}; + #elif !defined(RGB_BACKLIGHT_M6_B) // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) @@ -195,269 +343,292 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { * | | G location * | | | B location * | | | | */ - {0, C2_1, C3_1, C4_1}, // LA0 - {0, C1_1, C3_2, C4_2}, // LA1 - {0, C1_2, C2_2, C4_3}, // LA2 - {0, C1_3, C2_3, C3_3}, // LA3 - {0, C1_4, C2_4, C3_4}, // LA4 - {0, C1_5, C2_5, C3_5}, // LA5 - {0, C1_6, C2_6, C3_6}, // LA6 - {0, C1_7, C2_7, C3_7}, // LA7 - {0, C1_8, C2_8, C3_8}, // LA8 - {0, C9_1, C8_1, C7_1}, // LA9 - {0, C9_2, C8_2, C7_2}, // LA10 - {0, C9_3, C8_3, C7_3}, // LA11 - {0, C9_4, C8_4, C7_4}, // LA12 - {0, C9_5, C8_5, C7_5}, // LA13 - {0, C9_6, C8_6, C7_6}, // LA14 - {0, C9_7, C8_7, C6_6}, // LA15 - {0, C9_8, C7_7, C6_7}, // LA16 - {0, C8_8, C7_8, C6_8}, // LA17 - - {0, C2_9, C3_9, C4_9}, // LB0 - {0, C1_9, C3_10, C4_10}, // LB1 - {0, C1_10, C2_10, C4_11}, // LB2 - {0, C1_11, C2_11, C3_11}, // LB3 - {0, C1_12, C2_12, C3_12}, // LB4 - {0, C1_13, C2_13, C3_13}, // LB5 - {0, C1_14, C2_14, C3_14}, // LB6 - {0, C1_15, C2_15, C3_15}, // LB7 - {0, C1_16, C2_16, C3_16}, // LB8 - {0, C9_9, C8_9, C7_9}, // LB9 - {0, C9_10, C8_10, C7_10}, // LB10 - {0, C9_11, C8_11, C7_11}, // LB11 - {0, C9_12, C8_12, C7_12}, // LB12 - {0, C9_13, C8_13, C7_13}, // LB13 - {0, C9_14, C8_14, C7_14}, // LB14 - {0, C9_15, C8_15, C6_14}, // LB15 - {0, C9_16, C7_15, C6_15}, // LB16 - {0, C8_16, C7_16, C6_16}, // LB17 - - {1, C2_1, C3_1, C4_1}, // LC0 - {1, C1_1, C3_2, C4_2}, // LC1 - {1, C1_2, C2_2, C4_3}, // LC2 - {1, C1_3, C2_3, C3_3}, // LC3 - {1, C1_4, C2_4, C3_4}, // LC4 - {1, C1_5, C2_5, C3_5}, // LC5 - {1, C1_6, C2_6, C3_6}, // LC6 - {1, C1_7, C2_7, C3_7}, // LC7 - {1, C1_8, C2_8, C3_8}, // LC8 - {1, C9_1, C8_1, C7_1}, // LC9 - {1, C9_2, C8_2, C7_2}, // LC10 - {1, C9_3, C8_3, C7_3}, // LC11 - {1, C9_4, C8_4, C7_4}, // LC12 - {1, C9_5, C8_5, C7_5}, // LC13 - {1, C9_6, C8_6, C7_6}, // LC14 - {1, C9_7, C8_7, C6_6}, // LC15 - {1, C9_8, C7_7, C6_7}, // LC16 - {1, C8_8, C7_8, C6_8}, // LC17 - - {1, C2_9, C3_9, C4_9}, // LD0 - {1, C1_9, C3_10, C4_10}, // LD1 - {1, C1_10, C2_10, C4_11}, // LD2 - {1, C1_11, C2_11, C3_11}, // LD3 - {1, C1_12, C2_12, C3_12}, // LD4 - {1, C1_13, C2_13, C3_13}, // LD5 - {1, C1_14, C2_14, C3_14}, // LD6 - {1, C1_15, C2_15, C3_15}, // LD7 - {1, C1_16, C2_16, C3_16}, // LD8 - {1, C9_9, C8_9, C7_9}, // LD9 - {1, C9_10, C8_10, C7_10}, // LD10 - {1, C9_11, C8_11, C7_11}, // LD11 - {1, C9_12, C8_12, C7_12}, // LD12 - {1, C9_13, C8_13, C7_13}, // LD13 - {1, C9_14, C8_14, C7_14}, // LD14 - {1, C9_15, C8_15, C6_14}, // LD15 - {1, C9_16, C7_15, C6_15}, // LD16 - {1, C8_16, C7_16, C6_16}, // LD17 + {0, C2_1, C3_1, C4_1}, // LA0 + {0, C1_1, C3_2, C4_2}, // LA1 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_7, C2_7, C3_7}, // LA7 + {0, C1_8, C2_8, C3_8}, // LA8 + {0, C9_1, C8_1, C7_1}, // LA9 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_6, C8_6, C7_6}, // LA14 + {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_8, C7_7, C6_7}, // LA16 + {0, C8_8, C7_8, C6_8}, // LA17 + + {0, C2_9, C3_9, C4_9}, // LB0 + {0, C1_9, C3_10, C4_10}, // LB1 + {0, C1_10, C2_10, C4_11}, // LB2 + {0, C1_11, C2_11, C3_11}, // LB3 + {0, C1_12, C2_12, C3_12}, // LB4 + {0, C1_13, C2_13, C3_13}, // LB5 + {0, C1_14, C2_14, C3_14}, // LB6 + {0, C1_15, C2_15, C3_15}, // LB7 + {0, C1_16, C2_16, C3_16}, // LB8 + {0, C9_9, C8_9, C7_9}, // LB9 + {0, C9_10, C8_10, C7_10}, // LB10 + {0, C9_11, C8_11, C7_11}, // LB11 + {0, C9_12, C8_12, C7_12}, // LB12 + {0, C9_13, C8_13, C7_13}, // LB13 + {0, C9_14, C8_14, C7_14}, // LB14 + {0, C9_15, C8_15, C6_14}, // LB15 + {0, C9_16, C7_15, C6_15}, // LB16 + {0, C8_16, C7_16, C6_16}, // LB17 + + {1, C2_1, C3_1, C4_1}, // LC0 + {1, C1_1, C3_2, C4_2}, // LC1 + {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_5, C2_5, C3_5}, // LC5 + {1, C1_6, C2_6, C3_6}, // LC6 + {1, C1_7, C2_7, C3_7}, // LC7 + {1, C1_8, C2_8, C3_8}, // LC8 + {1, C9_1, C8_1, C7_1}, // LC9 + {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_6, C8_6, C7_6}, // LC14 + {1, C9_7, C8_7, C6_6}, // LC15 + {1, C9_8, C7_7, C6_7}, // LC16 + {1, C8_8, C7_8, C6_8}, // LC17 + + {1, C2_9, C3_9, C4_9}, // LD0 + {1, C1_9, C3_10, C4_10}, // LD1 + {1, C1_10, C2_10, C4_11}, // LD2 + {1, C1_11, C2_11, C3_11}, // LD3 + {1, C1_12, C2_12, C3_12}, // LD4 + {1, C1_13, C2_13, C3_13}, // LD5 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_16, C2_16, C3_16}, // LD8 + {1, C9_9, C8_9, C7_9}, // LD9 + {1, C9_10, C8_10, C7_10}, // LD10 + {1, C9_11, C8_11, C7_11}, // LD11 + {1, C9_12, C8_12, C7_12}, // LD12 + {1, C9_13, C8_13, C7_13}, // LD13 + {1, C9_14, C8_14, C7_14}, // LD14 + {1, C9_15, C8_15, C6_14}, // LD15 + {1, C9_16, C7_15, C6_15}, // LD16 + {1, C8_16, C7_16, C6_16}, // LD17 }; #endif // !defined(RGB_BACKLIGHT_M6_B) typedef struct Point { - uint8_t x; - uint8_t y; + uint8_t x; + uint8_t y; } Point; // index in range 0..71 (LA0..LA17, LB0..LB17, LC0..LC17, LD0..LD17) // point values in range x=0..224 y=0..64 // origin is center of top-left key (i.e Esc) -#if defined (RGB_BACKLIGHT_ZEAL65) +#if defined(RGB_BACKLIGHT_ZEAL65) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, - {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, - // LB0..LB17 - {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {240,0}, {240,16}, {240,32}, - {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, - // LC0..LC17 - {96,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {255,255}, {48,60}, {28,64}, - {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,44}, {10,48}, {4,64}, - // LD0..LD17 - {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, - {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {144,60}, {164,64}, {188,64}, {208,64} + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {240,0}, {240,16}, {240,32}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, + // LC0..LC17 + {96,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {255,255}, {48,60}, {28,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,44}, {10,48}, {4,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {144,60}, {164,64}, {188,64}, {208,64} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, - {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, - // LB0..LB17 - {56,255}, {51,255}, {46,255}, {42,255}, {37,255}, {35,255}, {32,255}, {19,255}, {0,255}, - {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, - // LC0..LC17 - {184,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {255,255}, {167,255}, {165,255}, - {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {145,233}, {148,255}, {161,255}, - // LD0..LD17 - {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, - {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {201,228}, {206,255}, {213,255}, {218,255} + // LA0..LA17 + {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, + {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, + // LB0..LB17 + {56,255}, {51,255}, {46,255}, {42,255}, {37,255}, {35,255}, {32,255}, {19,255}, {0,255}, + {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, + // LC0..LC17 + {184,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {255,255}, {167,255}, {165,255}, + {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {145,233}, {148,255}, {161,255}, + // LD0..LD17 + {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, + {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {201,228}, {206,255}, {213,255}, {218,255} }; -#elif defined (RGB_BACKLIGHT_KOYU) +#elif defined(RGB_BACKLIGHT_KOYU) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, - {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, - // LB0..LB17 - {144,0}, {160,0}, {176,0}, {192,0}, {208,0}, {224,0}, {240,0}, {240,16}, {240,32}, - {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, - // LC0..LC17 - {112,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {64,60}, {44,60}, {24,64}, - {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {255,255}, {10,48}, {4,64}, - // LD0..LD17 - {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, - {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {160,60}, {180,64}, {208,64}, {255,255} + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {208,0}, {224,0}, {240,0}, {240,16}, {240,32}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {240,48}, {240,64}, {224,64}, + // LC0..LC17 + {112,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {64,60}, {44,60}, {24,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {255,255}, {10,48}, {4,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {202,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {255,255}, {160,60}, {180,64}, {208,64}, {255,255} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, - {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, - // LB0..LB17 - {56,255}, {51,255}, {46,255}, {42,255}, {38,255}, {35,255}, {32,255}, {19,255}, {0,255}, - {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, - // LC0..LC17 - {189,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {172,252}, {169,255}, {165,255}, - {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {255,255}, {148,255}, {161,255}, - // LD0..LD17 - {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, - {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {207,238}, {211,255}, {218,255}, {255,255} + // LA0..LA17 + {64,128}, {75,132}, {84,145}, {91,164}, {97,187}, {102,213}, {105,242}, {109,255}, {128,243}, + {61,255}, {67,255}, {72,255}, {77,255}, {82,255}, {86,255}, {90,255}, {93,255}, {96,255}, + // LB0..LB17 + {56,255}, {51,255}, {46,255}, {42,255}, {38,255}, {35,255}, {32,255}, {19,255}, {0,255}, + {53,132}, {44,145}, {37,164}, {31,187}, {26,213}, {22,249}, {237,255}, {224,255}, {221,255}, + // LC0..LC17 + {189,255}, {179,135}, {170,149}, {163,169}, {157,193}, {153,220}, {172,252}, {169,255}, {165,255}, + {128,26}, {128,60}, {128,94}, {128,128}, {128,162}, {128,196}, {255,255}, {148,255}, {161,255}, + // LD0..LD17 + {0,9}, {0,43}, {0,77}, {0,111}, {0,145}, {0,201}, {224,181}, {230,217}, {235,255}, + {189,128}, {200,131}, {210,141}, {218,159}, {255,255}, {207,238}, {211,255}, {218,255}, {255,255} }; -#elif defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) +#elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, - {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, - // LB0..LB17 - {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {255,255}, {255,255}, {255,255}, - {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {255,255}, {255,255}, {255,255}, - // LC0..LC17 - {102,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {60,64}, {43,64}, {23,64}, - {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,48}, {2,48}, {3,64}, - // LD0..LD17 - {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {210,48}, {224,48}, - {116,48}, {132,48}, {148,48}, {164,48}, {144,64}, {161,64}, {181,64}, {201,64}, {221,64} + // LA0..LA17 + {120,16}, {104,16}, {88,16}, {72,16}, {56,16}, {40,16}, {24,16}, {4,16}, {4,32}, + {128,0}, {112,0}, {96,0}, {80,0}, {64,0}, {48,0}, {32,0}, {16,0}, {0,0}, + // LB0..LB17 + {144,0}, {160,0}, {176,0}, {192,0}, {216,0}, {224,0}, {255,255}, {255,255}, {255,255}, + {136,16}, {152,16}, {168,16}, {184,16}, {200,16}, {220,16}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {102,64}, {100,48}, {84,48}, {68,48}, {52,48}, {36,48}, {60,64}, {43,64}, {23,64}, + {108,32}, {92,32}, {76,32}, {60,32}, {44,32}, {28,32}, {20,48}, {2,48}, {3,64}, + // LD0..LD17 + {124,32}, {140,32}, {156,32}, {172,32}, {188,32}, {214,32}, {180,48}, {210,48}, {224,48}, + {116,48}, {132,48}, {148,48}, {164,48}, {144,64}, {161,64}, {181,64}, {201,64}, {221,64} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA0..LA17 - {58,129}, {70,129}, {80,139}, {89,157}, {96,181}, {101,208}, {105,238}, {109,255}, {128,247}, {58,255}, - {64,255}, {70,255}, {75,255}, {80,255}, {85,255}, {89,255}, {93,255}, {96,255}, - // LB0..LB17 - {53,255}, {48,255}, {43,255}, {39,255}, {34,255}, {32,255}, {255,255}, {255,255}, {255,255}, - {48,139}, {39,157}, {32,181}, {27,208}, {23,238}, {19,255}, {255,255}, {255,255}, {255,255}, - // LC0..LC17 - {188,255}, {183,131}, {173,143}, {165,163}, {159,188}, {154,216}, {172,252}, {170,255}, {165,255}, - {128,9}, {128,46}, {128,82}, {128,119}, {128,155}, {128,192}, {150,244}, {147,255}, {161,255}, - // LD0..LD17 - {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {255,233}, {228,201}, {235,255}, {237,255}, - {195,128}, {206,136}, {215,152}, {222,175}, {205,234}, {209,255}, {214,255}, {219,255}, {223,255} + // LA0..LA17 + {58,129}, {70,129}, {80,139}, {89,157}, {96,181}, {101,208}, {105,238}, {109,255}, {128,247}, {58,255}, + {64,255}, {70,255}, {75,255}, {80,255}, {85,255}, {89,255}, {93,255}, {96,255}, + // LB0..LB17 + {53,255}, {48,255}, {43,255}, {39,255}, {34,255}, {32,255}, {255,255}, {255,255}, {255,255}, + {48,139}, {39,157}, {32,181}, {27,208}, {23,238}, {19,255}, {255,255}, {255,255}, {255,255}, + // LC0..LC17 + {188,255}, {183,131}, {173,143}, {165,163}, {159,188}, {154,216}, {172,252}, {170,255}, {165,255}, + {128,9}, {128,46}, {128,82}, {128,119}, {128,155}, {128,192}, {150,244}, {147,255}, {161,255}, + // LD0..LD17 + {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {255,233}, {228,201}, {235,255}, {237,255}, + {195,128}, {206,136}, {215,152}, {222,175}, {205,234}, {209,255}, {214,255}, {219,255}, {223,255} }; -#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_ANSI) +#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_ANSI) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA47 - {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, - {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, - {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, - {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, - {255,255},// LA48 does not exist, dummy - // LA49..LA50 - {192,0}, {200,16}, - {255,255},// LA51 does not exit, dummy - // LA52..LA60 - {210,48}, {216,0}, {220,16}, {214,32}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, - {255,255},// LA61 does not exit, dummy - {162,64}, {182,64}, {202,64} + // LA1..LA47 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {255,255},// LA48 does not exist, dummy + // LA49..LA50 + {192,0}, {200,16}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {210,48}, {216,0}, {220,16}, {214,32}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + {162,64}, {182,64}, {202,64} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA47 - {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, - {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, - {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, - {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, - {255,255},// LA48 does not exist, dummy - // LA49..LA50 - {39,255}, {23,238}, - {255,255},// LA51 does not exit, dummy - // LA52..LA60 - {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, - {255,255},// LA61 does not exit, dummy - {209,255}, {215,255}, {220,255} + // LA1..LA47 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, + {255,255},// LA48 does not exist, dummy + // LA49..LA50 + {39,255}, {23,238}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + {209,255}, {215,255}, {220,255} }; -#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_HHKB) +#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_HHKB) const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA60 - {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, - {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, - {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, - {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, - {224,0}, {192,0}, {200,16}, {202,48}, {224,48}, {208,0}, {220,16}, {214,32}, {220,64}, {4,64}, {24,64}, {44,64}, {112,64}, - {255,255}, {255,255}, // LA61..LA62 does not exit, dummy - // LA63..LA64 - {180,64}, {200,64} + // LA1..LA60 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {224,0}, {192,0}, {200,16}, {202,48}, {224,48}, {208,0}, {220,16}, {214,32}, {220,64}, {4,64}, {24,64}, {44,64}, {112,64}, + {255,255}, {255,255}, // LA61..LA62 does not exit, dummy + // LA63..LA64 + {180,64}, {200,64} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA60 - {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, - {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, - {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, - {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {32,255}, - {39,255}, {23,238}, {233,242}, {237,255}, {35,255}, {19,255}, {255,233}, {223,255}, {161,255}, {165,255}, {170,255}, {192,255}, - {255,255}, {255,255}, // LA61..LA62 does not exit, dummy - // LA63..LA64 - {214,255}, {219,255} + // LA1..LA60 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {32,255}, + {39,255}, {23,238}, {233,242}, {237,255}, {35,255}, {19,255}, {255,233}, {223,255}, {161,255}, {165,255}, {170,255}, {192,255}, + {255,255}, {255,255}, // LA61..LA62 does not exit, dummy + // LA63..LA64 + {214,255}, {219,255} }; -#elif defined (RGB_BACKLIGHT_HS60) //HS60_ISO +#elif defined(RGB_BACKLIGHT_HS60) //HS60_ISO const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA50 - {0,0}, {4,16}, {6,32}, {2,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, {48,0}, - {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, {96,0}, {104,16}, - {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, {148,48}, {144,0}, {152,16}, - {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, {20,48}, {192,0}, {200,16}, - {255,255},// LA51 does not exit, dummy - // LA52..LA60 - {210,48}, {216,0}, {220,16}, {222,24}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, - {255,255},// LA61 does not exit, dummy - {162,64}, {182,64}, {202,64} + // LA1..LA50 + {0,0}, {4,16}, {6,32}, {2,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, {48,0}, + {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, {96,0}, {104,16}, + {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, {148,48}, {144,0}, {152,16}, + {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, {20,48}, {192,0}, {200,16}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {210,48}, {216,0}, {220,16}, {222,24}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + {162,64}, {182,64}, {202,64} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - // LA1..LA50 - {96,255}, {109,255}, {128,242}, {147,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, {85,255}, - {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, {70,255}, {70,129}, - {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, {53,255}, {39,157}, {255,101}, - {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {150,246}, {39,255}, {23,238}, - {255,255},// LA51 does not exit, dummy - // LA52..LA60 - {235,255}, {33,255}, {19,255}, {10,255}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, - {255,255},// LA61 does not exit, dummy - {209,255}, {215,255}, {220,255} + // LA1..LA50 + {96,255}, {109,255}, {128,242}, {147,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, {85,255}, + {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, {70,255}, {70,129}, + {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, {53,255}, {39,157}, {255,101}, + {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {150,246}, {39,255}, {23,238}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {235,255}, {33,255}, {19,255}, {10,255}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + {209,255}, {215,255}, {220,255} }; -#elif defined (RGB_BACKLIGHT_M6_B) +#elif defined(RGB_BACKLIGHT_NK65) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {160,64}, {192,0}, {200,16}, {210,48}, {224,48}, {216,0}, {220,16}, {214,32}, {224,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + //LA62..LB5 + {176,64}, {192,64}, {208,64}, {240,0}, {240,16}, {240,48}, {240,64}, {240,32} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, + {208,255}, {39,255}, {23,238}, {235,255}, {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + //LA62..LB5 + {221,255}, {225,255}, {229,255}, {22,255}, {12,255}, {244,255}, {234,255}, {255,255}, +}; +#elif defined(RGB_BACKLIGHT_M6_B) // M6-B is really simple: // 0 3 5 // 1 2 4 const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { - {0,0}, {0,16}, {16,16}, {16,0}, {32,16}, {32,0} + {0,0}, {0,16}, {16,16}, {16,0}, {32,16}, {32,0} }; const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { - {160,255}, {96,255}, {77,255}, {179,255}, {51,255}, {205,255} + {160,255}, {96,255}, {77,255}, {179,255}, {51,255}, {205,255} }; #endif @@ -467,58 +638,58 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { // or having a large "bitmap" and sampling them. void map_led_to_point( uint8_t index, Point *point ) { - // Slightly messy way to get Point structs out of progmem. - uint8_t *addr = (uint8_t*)&g_map_led_to_point[index]; - point->x = pgm_read_byte(addr); - point->y = pgm_read_byte(addr+1); + // Slightly messy way to get Point structs out of progmem. + uint8_t *addr = (uint8_t*)&g_map_led_to_point[index]; + point->x = pgm_read_byte(addr); + point->y = pgm_read_byte(addr+1); -#if defined (RGB_BACKLIGHT_M6_B) - return; +#if defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) + return; #endif - switch (index) - { - case 18+4: // LB4A - if ( g_config.use_split_backspace ) - point->x -= 8; - break; -#if defined (RGB_BACKLIGHT_ZEAL60) - case 18+14: // LB14A - if ( g_config.use_iso_enter ) - point->y += 8; // extremely pedantic - break; - case 54+5: // LD5A - if ( !g_config.use_iso_enter ) - point->x -= 10; - break; - case 36+16: // LC16A - if ( !g_config.use_split_left_shift ) - point->x += 8; - break; + switch (index) + { + case 18+4: // LB4A + if ( g_config.use_split_backspace ) + point->x -= 8; + break; +#if defined(RGB_BACKLIGHT_ZEAL60) + case 18+14: // LB14A + if ( g_config.use_iso_enter ) + point->y += 8; // extremely pedantic + break; + case 54+5: // LD5A + if ( !g_config.use_iso_enter ) + point->x -= 10; + break; + case 36+16: // LC16A + if ( !g_config.use_split_left_shift ) + point->x += 8; + break; #endif -#if defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) - case 36+0: // LC0A - if ( g_config.use_7u_spacebar ) - point->x += 10; - break; - case 36+6: // LC6A - if ( g_config.use_7u_spacebar ) - point->x += 4; - break; - case 54+7: // LD7A - if ( !g_config.use_split_right_shift ) - point->x -= 8; - break; +#if defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) + case 36+0: // LC0A + if ( g_config.use_7u_spacebar ) + point->x += 10; + break; + case 36+6: // LC6A + if ( g_config.use_7u_spacebar ) + point->x += 4; + break; + case 54+7: // LD7A + if ( !g_config.use_split_right_shift ) + point->x -= 8; + break; #endif - } + } } void map_led_to_point_polar( uint8_t index, Point *point ) { - // Slightly messy way to get Point structs out of progmem. - uint8_t *addr = (uint8_t*)&g_map_led_to_point_polar[index]; - point->x = pgm_read_byte(addr); - point->y = pgm_read_byte(addr+1); + // Slightly messy way to get Point structs out of progmem. + uint8_t *addr = (uint8_t*)&g_map_led_to_point_polar[index]; + point->x = pgm_read_byte(addr); + point->y = pgm_read_byte(addr+1); } // @@ -526,7 +697,7 @@ void map_led_to_point_polar( uint8_t index, Point *point ) // -#if defined (RGB_BACKLIGHT_ZEAL65) +#if defined(RGB_BACKLIGHT_ZEAL65) // Note: Left spacebar stab is at 4,2 (LC7) // Right spacebar stab is at 4,9 (D14) // @@ -536,11 +707,11 @@ void map_led_to_point_polar( uint8_t index, Point *point ) // C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B15 // C17, C8, C7, ---, ---, ---, ---, C0, ---, D14, D15, D16, D17, B17, B16 const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, - { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, - { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, - { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8, 18+15 }, - { 36+17, 36+8, 36+7, 255, 255, 255, 255, 36+0, 255, 54+14, 54+15, 54+16, 54+17, 18+17, 18+16 } + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, + { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8, 18+15 }, + { 36+17, 36+8, 36+7, 255, 255, 255, 255, 36+0, 255, 54+14, 54+15, 54+16, 54+17, 18+17, 18+16 } }; #elif defined(RGB_BACKLIGHT_KOYU) // Note: Left spacebar stab is at 4,4 (LC6) @@ -552,13 +723,13 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { // C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, B15 // C17, C8, C7, C6, ---, ---, ---, C0, ---, ---, D14, D15, D16, B17, B16 const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, - { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, - { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, - { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8, 18+15 }, - { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 255, 54+14, 54+15, 54+16, 18+17, 18+16 } + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4, 18+6 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14, 18+7 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5, 18+8 }, + { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8, 18+15 }, + { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 255, 54+14, 54+15, 54+16, 18+17, 18+16 } }; -#elif defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) +#elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) // Note: Left spacebar stab is at 4,3 (LC6) // Right spacebar stab is at 4,9 (LD13) or 4,10 (LD14) // @@ -568,13 +739,13 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { // C16, C15, C5, C4, C3, C2, C1, D9, D10, D11, D12, D6, D7, D8, // C17, C8, C7, C6, ---, ---, ---, C0, ---, D13, D14, D15, D16, D17, const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4 }, - { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14 }, - { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5 }, - { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8 }, - { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 54+13, 54+14, 54+15, 54+16, 54+17 } + { 0+17, 0+16, 0+15, 0+14, 0+13, 0+12, 0+11, 0+10, 0+9, 18+0, 18+1, 18+2, 18+3, 18+4 }, + { 0+7, 0+6, 0+5, 0+4, 0+3, 0+2, 0+1, 0+0, 18+9, 18+10, 18+11, 18+12, 18+13, 18+14 }, + { 0+8, 36+14, 36+13, 36+12, 36+11, 36+10, 36+9, 54+0, 54+1, 54+2, 54+3, 54+4, 54+5, 18+5 }, + { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8 }, + { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 54+13, 54+14, 54+15, 54+16, 54+17 } }; -#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_ANSI) +#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_ANSI) // // LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, // LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, @@ -582,13 +753,13 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { // LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, ---, LA52, // LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, LA62, LA63, LA64, LA56 const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, - { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, - { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, - { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, - { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } }; -#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_HHKB) +#elif defined(RGB_BACKLIGHT_HS60) && defined(HS60_HHKB) // // LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, // LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, LA48, @@ -596,13 +767,13 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { // LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, LA51, LA52, // LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, ---, LA63, LA64, LA56 const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, - { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 48-1 }, - { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, - { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1 }, - { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 255, 63-1, 64-1, 56-1 } + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 48-1 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 255, 63-1, 64-1, 56-1 } }; -#elif defined (RGB_BACKLIGHT_HS60) //HS60_ISO +#elif defined(RGB_BACKLIGHT_HS60) //HS60_ISO // // LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, // LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, @@ -610,75 +781,94 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { // LA4, LA48, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, ---, LA52, // LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, LA62, LA63, LA64, LA56 const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, - { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, - { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, - { 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, - { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } +}; +#elif defined(RGB_BACKLIGHT_NK65) +// +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, LB1, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, LB2, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, LB5, +// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, LA51, LA52, LB3, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, LA48, LA62, LA63, LA64, LA56, LB4 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1, 1+64-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255, 2+64-1 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1, 5+64-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1, 3+64-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 48-1, 62-1, 63-1, 64-1, 56-1, 4+64-1 } }; -#elif defined (RGB_BACKLIGHT_M6_B) +#elif defined(RGB_BACKLIGHT_M6_B) // M6-B is really simple: // 0 3 5 // 1 2 4 const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { - { 0, 3, 5, 1, 2, 4 } + { 0, 3, 5, 1, 2, 4 } }; #endif void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led ) { - *led = 255; - if ( row < MATRIX_ROWS && column < MATRIX_COLS ) - { - *led = pgm_read_byte(&g_map_row_column_to_led[row][column]); - } + *led = 255; + if ( row < MATRIX_ROWS && column < MATRIX_COLS ) + { + *led = pgm_read_byte(&g_map_row_column_to_led[row][column]); + } } void backlight_update_pwm_buffers(void) { -#if defined (RGB_BACKLIGHT_M6_B) - IS31FL3218_update_pwm_buffers(); -#elif defined (RGB_BACKLIGHT_HS60) - IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, ISSI_ADDR_2 ); - IS31FL3733_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); +#if defined(RGB_BACKLIGHT_M6_B) + IS31FL3218_update_pwm_buffers(); +#elif defined(RGB_BACKLIGHT_HS60) + IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); +#elif defined(RGB_BACKLIGHT_NK65) + IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_pwm_buffers( ISSI_ADDR_2, 1 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); #else - IS31FL3731_update_pwm_buffers( ISSI_ADDR_1, ISSI_ADDR_2 ); - IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); + IS31FL3731_update_pwm_buffers( ISSI_ADDR_1, ISSI_ADDR_2 ); + IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); #endif } void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { -#if defined (RGB_BACKLIGHT_M6_B) - IS31FL3218_set_color( index, red, green, blue ); -#elif defined (RGB_BACKLIGHT_HS60) - IS31FL3733_set_color( index, red, green, blue ); +#if defined(RGB_BACKLIGHT_M6_B) + IS31FL3218_set_color( index, red, green, blue ); +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) + IS31FL3733_set_color( index, red, green, blue ); #else - IS31FL3731_set_color( index, red, green, blue ); + IS31FL3731_set_color( index, red, green, blue ); #endif } void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { -#if defined (RGB_BACKLIGHT_M6_B) - IS31FL3218_set_color_all( red, green, blue ); -#elif defined (RGB_BACKLIGHT_HS60) - IS31FL3733_set_color_all( red, green, blue ); +#if defined(RGB_BACKLIGHT_M6_B) + IS31FL3218_set_color_all( red, green, blue ); +#elif defined(RGB_BACKLIGHT_HS60) || defined(RGB_BACKLIGHT_NK65) + IS31FL3733_set_color_all( red, green, blue ); #else - IS31FL3731_set_color_all( red, green, blue ); + IS31FL3731_set_color_all( red, green, blue ); #endif } void backlight_set_key_hit(uint8_t row, uint8_t column) { - uint8_t led; - map_row_column_to_led(row,column,&led); - g_key_hit[led] = 0; + uint8_t led; + map_row_column_to_led(row,column,&led); + g_key_hit[led] = 0; - g_any_key_hit = 0; + g_any_key_hit = 0; } -#if !defined(RGB_BACKLIGHT_HS60) +#if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz // = 781 @@ -686,95 +876,95 @@ void backlight_set_key_hit(uint8_t row, uint8_t column) void backlight_timer_init(void) { - static uint8_t backlight_timer_is_init = 0; - if ( backlight_timer_is_init ) - { - return; - } - backlight_timer_is_init = 1; - - // Timer 3 setup - TCCR3B = _BV(WGM32) | // CTC mode OCR3A as TOP - _BV(CS32) | _BV(CS30); // prescale by /1024 - // Set TOP value - uint8_t sreg = SREG; - cli(); - - OCR3AH = (TIMER3_TOP >> 8) & 0xff; - OCR3AL = TIMER3_TOP & 0xff; - SREG = sreg; + static uint8_t backlight_timer_is_init = 0; + if ( backlight_timer_is_init ) + { + return; + } + backlight_timer_is_init = 1; + + // Timer 3 setup + TCCR3B = _BV(WGM32) | // CTC mode OCR3A as TOP + _BV(CS32) | _BV(CS30); // prescale by /1024 + // Set TOP value + uint8_t sreg = SREG; + cli(); + + OCR3AH = (TIMER3_TOP >> 8) & 0xff; + OCR3AL = TIMER3_TOP & 0xff; + SREG = sreg; } void backlight_timer_enable(void) { - TIMSK3 |= _BV(OCIE3A); + TIMSK3 |= _BV(OCIE3A); } void backlight_timer_disable(void) { - TIMSK3 &= ~_BV(OCIE3A); + TIMSK3 &= ~_BV(OCIE3A); } #else //STM32, use GPT with TIM4. Enable in halconf.h static void gpt_backlight_timer_task(GPTDriver *gptp); // Timer setup at 200Khz, callback at 10k ticks = 20Hz static GPTConfig gpt4cfg1 = { - .frequency = 200000U, - .callback = gpt_backlight_timer_task + .frequency = 200000U, + .callback = gpt_backlight_timer_task }; void backlight_timer_init(void) { - gptStart(&GPTD4, &gpt4cfg1); + gptStart(&GPTD4, &gpt4cfg1); } void backlight_timer_enable(void) { - gptStartContinuous(&GPTD4, 10000); + gptStartContinuous(&GPTD4, 10000); } void backlight_timer_disable(void) { - gptStopTimer(&GPTD4); + gptStopTimer(&GPTD4); } -#endif //!defined(RGB_BACKLIGHT_HS60) +#endif //!defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) void backlight_set_suspend_state(bool state) { - g_suspend_state = state; + g_suspend_state = state; } void backlight_set_indicator_state(uint8_t state) { - g_indicator_state = state; + g_indicator_state = state; } void backlight_effect_rgb_test(void) { - // Mask out bits 4 and 5 - // This 2-bit value will stay the same for 16 ticks. - switch ( (g_tick & 0x30) >> 4 ) - { - case 0: - { - backlight_set_color_all( 255, 0, 0 ); - break; - } - case 1: - { - backlight_set_color_all( 0, 255, 0 ); - break; - } - case 2: - { - backlight_set_color_all( 0, 0, 255 ); - break; - } - case 3: - { - backlight_set_color_all( 255, 255, 255 ); - break; - } - } + // Mask out bits 4 and 5 + // This 2-bit value will stay the same for 16 ticks. + switch ( (g_tick & 0x30) >> 4 ) + { + case 0: + { + backlight_set_color_all( 255, 0, 0 ); + break; + } + case 1: + { + backlight_set_color_all( 0, 255, 0 ); + break; + } + case 2: + { + backlight_set_color_all( 0, 0, 255 ); + break; + } + case 3: + { + backlight_set_color_all( 255, 255, 255 ); + break; + } + } } #if defined(RGB_DEBUGGING_ONLY) @@ -785,1179 +975,1221 @@ void backlight_effect_rgb_test(void) // ONLY USE THIS FOR TESTING LEDS! void backlight_effect_single_LED_test(void) { - static uint8_t color = 0; // 0,1,2 for R,G,B - static uint8_t row = 0; - static uint8_t column = 0; - - static uint8_t tick = 0; - tick++; - - if ( tick > 2 ) - { - tick = 0; - column++; - } - if ( column > 14 ) - { - column = 0; - row++; - } - if ( row > 4 ) - { - row = 0; - color++; - } - if ( color > 2 ) - { - color = 0; - } - - uint8_t led; - map_row_column_to_led( row, column, &led ); - backlight_set_color_all( 255, 255, 255 ); - backlight_test_led( led, color==0, color==1, color==2 ); + static uint8_t color = 0; // 0,1,2 for R,G,B + static uint8_t row = 0; + static uint8_t column = 0; + + static uint8_t tick = 0; + tick++; + + if ( tick > 2 ) + { + tick = 0; + column++; + } + if ( column > 14 ) + { + column = 0; + row++; + } + if ( row > 4 ) + { + row = 0; + color++; + } + if ( color > 2 ) + { + color = 0; + } + + uint8_t led; + map_row_column_to_led( row, column, &led ); + backlight_set_color_all( 255, 255, 255 ); + backlight_test_led( led, color==0, color==1, color==2 ); } #endif // defined(RGB_DEBUGGING_ONLY) // All LEDs off void backlight_effect_all_off(void) { - backlight_set_color_all( 0, 0, 0 ); + backlight_set_color_all( 0, 0, 0 ); } // Solid color void backlight_effect_solid_color(void) { - HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; - RGB rgb = hsv_to_rgb( hsv ); - backlight_set_color_all( rgb.r, rgb.g, rgb.b ); + HSV hsv = { .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness }; + RGB rgb = hsv_to_rgb( hsv ); + backlight_set_color_all( rgb.r, rgb.g, rgb.b ); } // alphas = color1, mods = color2 void backlight_effect_alphas_mods(void) { - RGB rgb1 = hsv_to_rgb( (HSV){ .h = g_config.color_1.h, .s = g_config.color_1.s, .v = g_config.brightness } ); - RGB rgb2 = hsv_to_rgb( (HSV){ .h = g_config.color_2.h, .s = g_config.color_2.s, .v = g_config.brightness } ); - - for ( int row = 0; row < MATRIX_ROWS; row++ ) - { - for ( int column = 0; column < MATRIX_COLS; column++ ) - { - uint8_t index; - map_row_column_to_led( row, column, &index ); - if ( index < BACKLIGHT_LED_COUNT ) - { - if ( ( g_config.alphas_mods[row] & (1< 127 ) - { - deltaH -= 256; - } - else if ( deltaH < -127 ) - { - deltaH += 256; - } - // Divide delta by 4, this gives the delta per row - deltaH /= 4; - - int16_t s1 = g_config.color_1.s; - int16_t s2 = g_config.color_2.s; - int16_t deltaS = ( s2 - s1 ) / 4; - - HSV hsv = { .h = 0, .s = 255, .v = g_config.brightness }; - RGB rgb; - Point point; - for ( int i=0; i>4); - // Relies on hue being 8-bit and wrapping - hsv.h = g_config.color_1.h + ( deltaH * y ); - hsv.s = g_config.color_1.s + ( deltaS * y ); - rgb = hsv_to_rgb( hsv ); - backlight_set_color( i, rgb.r, rgb.g, rgb.b ); - } + int16_t h1 = g_config.color_1.h; + int16_t h2 = g_config.color_2.h; + int16_t deltaH = h2 - h1; + + // Take the shortest path between hues + if ( deltaH > 127 ) + { + deltaH -= 256; + } + else if ( deltaH < -127 ) + { + deltaH += 256; + } + // Divide delta by 4, this gives the delta per row + deltaH /= 4; + + int16_t s1 = g_config.color_1.s; + int16_t s2 = g_config.color_2.s; + int16_t deltaS = ( s2 - s1 ) / 4; + + HSV hsv = { .h = 0, .s = 255, .v = g_config.brightness }; + RGB rgb; + Point point; + for ( int i=0; i>4); + // Relies on hue being 8-bit and wrapping + hsv.h = g_config.color_1.h + ( deltaH * y ); + hsv.s = g_config.color_1.s + ( deltaS * y ); + rgb = hsv_to_rgb( hsv ); + backlight_set_color( i, rgb.r, rgb.g, rgb.b ); + } } void backlight_effect_raindrops(bool initialize) { - int16_t h1 = g_config.color_1.h; - int16_t h2 = g_config.color_2.h; - int16_t deltaH = h2 - h1; - deltaH /= 4; - - // Take the shortest path between hues - if ( deltaH > 127 ) - { - deltaH -= 256; - } - else if ( deltaH < -127 ) - { - deltaH += 256; - } - - int16_t s1 = g_config.color_1.s; - int16_t s2 = g_config.color_2.s; - int16_t deltaS = ( s2 - s1 ) / 4; - - HSV hsv; - RGB rgb; - - // Change one LED every tick - uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % BACKLIGHT_LED_COUNT : 255; - - for ( int i=0; i 127 ) + { + deltaH -= 256; + } + else if ( deltaH < -127 ) + { + deltaH += 256; + } + + int16_t s1 = g_config.color_1.s; + int16_t s2 = g_config.color_2.s; + int16_t deltaS = ( s2 - s1 ) / 4; + + HSV hsv; + RGB rgb; + + // Change one LED every tick + uint8_t led_to_change = ( g_tick & 0x000 ) == 0 ? rand() % BACKLIGHT_LED_COUNT : 255; + + for ( int i=0; i> 2; - hsv.h = g_config.color_1.h + offset2; - hsv.s = 127 + ( point.y >> 1 ); - rgb = hsv_to_rgb( hsv ); - backlight_set_color( i, rgb.r, rgb.g, rgb.b ); - } + uint8_t offset = ( g_tick << g_config.effect_speed ) & 0xFF; + + HSV hsv = { .h = 0, .s = g_config.color_1.s, .v = g_config.brightness }; + RGB rgb; + Point point; + for ( int i=0; i> 2; + hsv.h = g_config.color_1.h + offset2; + hsv.s = 127 + ( point.y >> 1 ); + rgb = hsv_to_rgb( hsv ); + backlight_set_color( i, rgb.r, rgb.g, rgb.b ); + } } #if defined(RGB_BACKLIGHT_M6_B) void backlight_effect_custom_colors(void) { - RGB rgb; - for ( uint8_t i = 0; i < 6; i++ ) - { - HSV hsv = { .h = g_config.custom_color[i].h, .s = g_config.custom_color[i].s, .v = g_config.brightness }; - rgb = hsv_to_rgb( hsv ); - uint8_t led; - map_row_column_to_led( 0, i, &led ); - backlight_set_color( led, rgb.r, rgb.g, rgb.b ); - } + RGB rgb; + for ( uint8_t i = 0; i < 6; i++ ) + { + HSV hsv = { .h = g_config.custom_color[i].h, .s = g_config.custom_color[i].s, .v = g_config.brightness }; + rgb = hsv_to_rgb( hsv ); + uint8_t led; + map_row_column_to_led( 0, i, &led ); + backlight_set_color( led, rgb.r, rgb.g, rgb.b ); + } } #endif void backlight_effect_indicators_set_colors( uint8_t index, HS color ) { - HSV hsv = { .h = color.h, .s = color.s, .v = g_config.brightness }; - RGB rgb = hsv_to_rgb( hsv ); - if ( index == 254 ) - { - backlight_set_color_all( rgb.r, rgb.g, rgb.b ); - } - else - { - backlight_set_color( index, rgb.r, rgb.g, rgb.b ); - - // If the spacebar LED is the indicator, - // do the same for the spacebar stabilizers - if ( index == 36+0 ) // LC0 - { -#if defined (RGB_BACKLIGHT_ZEAL65) - backlight_set_color( 36+7, rgb.r, rgb.g, rgb.b ); // LC7 - backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 -#elif defined (RGB_BACKLIGHT_KOYU) - backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 - backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 -#elif defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_M60_A) - backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 - backlight_set_color( 54+13, rgb.r, rgb.g, rgb.b ); // LD13 - if ( g_config.use_7u_spacebar ) - { - backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 - } + HSV hsv = { .h = color.h, .s = color.s, .v = g_config.brightness }; + RGB rgb = hsv_to_rgb( hsv ); + if ( index == 254 ) + { + backlight_set_color_all( rgb.r, rgb.g, rgb.b ); + } + else + { + backlight_set_color( index, rgb.r, rgb.g, rgb.b ); + + // If the spacebar LED is the indicator, + // do the same for the spacebar stabilizers + if ( index == 36+0 ) // LC0 + { +#if defined(RGB_BACKLIGHT_ZEAL65) + backlight_set_color( 36+7, rgb.r, rgb.g, rgb.b ); // LC7 + backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 +#elif defined(RGB_BACKLIGHT_KOYU) + backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 + backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 +#elif defined(RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_M60_A) + backlight_set_color( 36+6, rgb.r, rgb.g, rgb.b ); // LC6 + backlight_set_color( 54+13, rgb.r, rgb.g, rgb.b ); // LD13 + if ( g_config.use_7u_spacebar ) + { + backlight_set_color( 54+14, rgb.r, rgb.g, rgb.b ); // LD14 + } #endif - } - } + } + } } // This runs after another backlight effect and replaces // colors already set void backlight_effect_indicators(void) { - if ( g_config.caps_lock_indicator.index != 255 && - ( g_indicator_state & (1< 0 && g_any_key_hit > g_config.disable_after_timeout * 60 * 20)); - uint8_t effect = suspend_backlight ? 0 : g_config.effect; - - // Keep track of the effect used last time, - // detect change in effect, so each effect can - // have an optional initialization. - static uint8_t effect_last = 255; - bool initialize = effect != effect_last; - effect_last = effect; - - // this gets ticked at 20 Hz. - // each effect can opt to do calculations - // and/or request PWM buffer updates. - switch ( effect ) - { - case 0: - backlight_effect_all_off(); - break; - case 1: - backlight_effect_solid_color(); - break; - case 2: + // delay 1 second before driving LEDs or doing anything else + static uint8_t startup_tick = 0; + if ( startup_tick < 20 ) + { + startup_tick++; + return; + } + + g_tick++; + + if ( g_any_key_hit < 0xFFFFFFFF ) + { + g_any_key_hit++; + } + + for ( int led = 0; led < BACKLIGHT_LED_COUNT; led++ ) + { + if ( g_key_hit[led] < 255 ) + { + g_key_hit[led]++; + } + } + + // Factory default magic value + if ( g_config.effect == 255 ) + { + backlight_effect_rgb_test(); + return; + } + + // Ideally we would also stop sending zeros to the LED driver PWM buffers + // while suspended and just do a software shutdown. This is a cheap hack for now. + bool suspend_backlight = ((g_suspend_state && g_config.disable_when_usb_suspended) || + (g_config.disable_after_timeout > 0 && g_any_key_hit > g_config.disable_after_timeout * 60 * 20)); + uint8_t effect = suspend_backlight ? 0 : g_config.effect; + + // Keep track of the effect used last time, + // detect change in effect, so each effect can + // have an optional initialization. + static uint8_t effect_last = 255; + bool initialize = effect != effect_last; + effect_last = effect; + + // this gets ticked at 20 Hz. + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch ( effect ) + { + case 0: + backlight_effect_all_off(); + break; + case 1: + backlight_effect_solid_color(); + break; + case 2: #if defined(RGB_BACKLIGHT_M6_B) - backlight_effect_custom_colors(); + backlight_effect_custom_colors(); #else - backlight_effect_alphas_mods(); + backlight_effect_alphas_mods(); #endif - break; - case 3: - backlight_effect_gradient_up_down(); - break; - case 4: - backlight_effect_raindrops( initialize ); - break; - case 5: - backlight_effect_cycle_all(); - break; - case 6: - backlight_effect_cycle_left_right(); - break; - case 7: - backlight_effect_cycle_up_down(); - break; - case 8: - backlight_effect_jellybean_raindrops( initialize ); - break; - case 9: - backlight_effect_cycle_radial1(); - break; - case 10: - backlight_effect_cycle_radial2(); - break; - default: - backlight_effect_all_off(); - break; - } - - if ( ! suspend_backlight ) - { + break; + case 3: + backlight_effect_gradient_up_down(); + break; + case 4: + backlight_effect_raindrops( initialize ); + break; + case 5: + backlight_effect_cycle_all(); + break; + case 6: + backlight_effect_cycle_left_right(); + break; + case 7: + backlight_effect_cycle_up_down(); + break; + case 8: + backlight_effect_jellybean_raindrops( initialize ); + break; + case 9: + backlight_effect_cycle_radial1(); + break; + case 10: + backlight_effect_cycle_radial2(); + break; + default: + backlight_effect_all_off(); + break; + } + + if ( ! suspend_backlight ) + { #if !defined(RGB_BACKLIGHT_M6_B) - backlight_effect_indicators(); + backlight_effect_indicators(); #endif - } + } } void backlight_set_indicator_index( uint8_t *index, uint8_t row, uint8_t column ) { - if ( row >= MATRIX_ROWS ) - { - // Special value, 255=none, 254=all - *index = row; - } - else - { - map_row_column_to_led( row, column, index ); - } + if ( row >= MATRIX_ROWS ) + { + // Special value, 255=none, 254=all + *index = row; + } + else + { + map_row_column_to_led( row, column, index ); + } } void backlight_get_indicator_row_col( uint8_t index, uint8_t *row, uint8_t *column ) { - if ( index == 255 || index == 254 ) - { - // Special value, 255=none, 254=all - *row = index; - *column = 0; - return; - } - for ( uint8_t r = 0; r < MATRIX_ROWS; r++ ) - { - for ( uint8_t c = 0; c < MATRIX_COLS; c++ ) - { - uint8_t i = 255; - map_row_column_to_led( r, c, &i ); - if ( i == index ) - { - *row = r; - *column = c; - return; - } - } - } + if ( index == 255 || index == 254 ) + { + // Special value, 255=none, 254=all + *row = index; + *column = 0; + return; + } + for ( uint8_t r = 0; r < MATRIX_ROWS; r++ ) + { + for ( uint8_t c = 0; c < MATRIX_COLS; c++ ) + { + uint8_t i = 255; + map_row_column_to_led( r, c, &i ); + if ( i == index ) + { + *row = r; + *column = c; + return; + } + } + } } // Some helpers for setting/getting HSV void _set_color( HS *color, uint8_t *data ) { - color->h = data[0]; - color->s = data[1]; + color->h = data[0]; + color->s = data[1]; } void _get_color( HS *color, uint8_t *data ) { - data[0] = color->h; - data[1] = color->s; + data[0] = color->h; + data[1] = color->s; } void backlight_config_set_value( uint8_t *data ) { - bool reinitialize = false; - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - switch ( *value_id ) - { + bool reinitialize = false; + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch ( *value_id ) + { #if defined (RGB_BACKLIGHT_ZEAL60) || defined(RGB_BACKLIGHT_ZEAL65) - case id_use_split_backspace: - { - g_config.use_split_backspace = (bool)*value_data; - reinitialize = true; - break; - } + case id_use_split_backspace: + { + g_config.use_split_backspace = (bool)*value_data; + reinitialize = true; + break; + } #endif #if defined (RGB_BACKLIGHT_ZEAL60) - case id_use_split_left_shift: - { - g_config.use_split_left_shift = (bool)*value_data; - reinitialize = true; - break; - } - case id_use_split_right_shift: - { - g_config.use_split_right_shift = (bool)*value_data; - reinitialize = true; - break; - } - case id_use_7u_spacebar: - { - g_config.use_7u_spacebar = (bool)*value_data; - reinitialize = true; - break; - } - case id_use_iso_enter: - { - g_config.use_iso_enter = (bool)*value_data; - reinitialize = true; - break; - } - case id_disable_hhkb_blocker_leds: - { - g_config.disable_hhkb_blocker_leds = (bool)*value_data; - reinitialize = true; - break; - } + case id_use_split_left_shift: + { + g_config.use_split_left_shift = (bool)*value_data; + reinitialize = true; + break; + } + case id_use_split_right_shift: + { + g_config.use_split_right_shift = (bool)*value_data; + reinitialize = true; + break; + } + case id_use_7u_spacebar: + { + g_config.use_7u_spacebar = (bool)*value_data; + reinitialize = true; + break; + } + case id_use_iso_enter: + { + g_config.use_iso_enter = (bool)*value_data; + reinitialize = true; + break; + } + case id_disable_hhkb_blocker_leds: + { + g_config.disable_hhkb_blocker_leds = (bool)*value_data; + reinitialize = true; + break; + } #endif - case id_disable_when_usb_suspended: - { - g_config.disable_when_usb_suspended = (bool)*value_data; - break; - } - case id_disable_after_timeout: - { - g_config.disable_after_timeout = *value_data; - break; - } - case id_brightness: - { - g_config.brightness = *value_data; - break; - } - case id_effect: - { - g_config.effect = *value_data; - break; - } - case id_effect_speed: - { - g_config.effect_speed = *value_data; - break; - } - case id_color_1: - { - _set_color( &(g_config.color_1), value_data ); - break; - } - case id_color_2: - { - _set_color( &(g_config.color_2), value_data ); - break; - } - case id_caps_lock_indicator_color: - { - _set_color( &(g_config.caps_lock_indicator.color), value_data ); - break; - } - case id_caps_lock_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.caps_lock_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_layer_1_indicator_color: - { - _set_color( &(g_config.layer_1_indicator.color), value_data ); - break; - } - case id_layer_1_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.layer_1_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_layer_2_indicator_color: - { - _set_color( &(g_config.layer_2_indicator.color), value_data ); - break; - } - case id_layer_2_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.layer_2_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_layer_3_indicator_color: - { - _set_color( &(g_config.layer_3_indicator.color), value_data ); - break; - } - case id_layer_3_indicator_row_col: - { - backlight_set_indicator_index( &(g_config.layer_3_indicator.index), value_data[0], value_data[1] ); - break; - } - case id_alphas_mods: - { - for ( int i=0; i<5; i++ ) - { - g_config.alphas_mods[i] = ( *(value_data+i*2) << 8 ) | ( *(value_data+i*2+1) ); - } - } + case id_disable_when_usb_suspended: + { + g_config.disable_when_usb_suspended = (bool)*value_data; + break; + } + case id_disable_after_timeout: + { + g_config.disable_after_timeout = *value_data; + break; + } + case id_brightness: + { + g_config.brightness = *value_data; + break; + } + case id_effect: + { + g_config.effect = *value_data; + break; + } + case id_effect_speed: + { + g_config.effect_speed = *value_data; + break; + } + case id_color_1: + { + _set_color( &(g_config.color_1), value_data ); + break; + } + case id_color_2: + { + _set_color( &(g_config.color_2), value_data ); + break; + } + case id_caps_lock_indicator_color: + { + _set_color( &(g_config.caps_lock_indicator.color), value_data ); + break; + } + case id_caps_lock_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.caps_lock_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_layer_1_indicator_color: + { + _set_color( &(g_config.layer_1_indicator.color), value_data ); + break; + } + case id_layer_1_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.layer_1_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_layer_2_indicator_color: + { + _set_color( &(g_config.layer_2_indicator.color), value_data ); + break; + } + case id_layer_2_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.layer_2_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_layer_3_indicator_color: + { + _set_color( &(g_config.layer_3_indicator.color), value_data ); + break; + } + case id_layer_3_indicator_row_col: + { + backlight_set_indicator_index( &(g_config.layer_3_indicator.index), value_data[0], value_data[1] ); + break; + } + case id_alphas_mods: + { + for ( int i=0; i<5; i++ ) + { + g_config.alphas_mods[i] = ( *(value_data+i*2) << 8 ) | ( *(value_data+i*2+1) ); + } + } #if defined(RGB_BACKLIGHT_M6_B) - case id_custom_color: - { - uint8_t index = value_data[0]; - if ( index >= 0 && index <= 6 ) - { - _set_color( &(g_config.custom_color[index]), &(value_data[1]) ); - } - } + case id_custom_color: + { + uint8_t index = value_data[0]; + if ( index >= 0 && index <= 6 ) + { + _set_color( &(g_config.custom_color[index]), &(value_data[1]) ); + } + } #endif - } + } - if ( reinitialize ) - { - backlight_init_drivers(); - } + if ( reinitialize ) + { + backlight_init_drivers(); + } } void backlight_config_get_value( uint8_t *data ) { - uint8_t *value_id = &(data[0]); - uint8_t *value_data = &(data[1]); - switch ( *value_id ) - { - case id_use_split_backspace: - { - *value_data = ( g_config.use_split_backspace ? 1 : 0 ); - break; - } - case id_use_split_left_shift: - { - *value_data = ( g_config.use_split_left_shift ? 1 : 0 ); - break; - } - case id_use_split_right_shift: - { - *value_data = ( g_config.use_split_right_shift ? 1 : 0 ); - break; - } - case id_use_7u_spacebar: - { - *value_data = ( g_config.use_7u_spacebar ? 1 : 0 ); - break; - } - case id_use_iso_enter: - { - *value_data = ( g_config.use_iso_enter ? 1 : 0 ); - break; - } - case id_disable_when_usb_suspended: - { - *value_data = ( g_config.disable_when_usb_suspended ? 1 : 0 ); - break; - } - case id_disable_hhkb_blocker_leds: - { - *value_data = ( g_config.disable_hhkb_blocker_leds ? 1 : 0 ); - break; - } - case id_disable_after_timeout: - { - *value_data = g_config.disable_after_timeout; - break; - } - case id_brightness: - { - *value_data = g_config.brightness; - break; - } - case id_effect: - { - *value_data = g_config.effect; - break; - } - case id_effect_speed: - { - *value_data = g_config.effect_speed; - break; - } - case id_color_1: - { - _get_color( &(g_config.color_1), value_data ); - break; - } - case id_color_2: - { - _get_color( &(g_config.color_2), value_data ); - break; - } - case id_caps_lock_indicator_color: - { - _get_color( &(g_config.caps_lock_indicator.color), value_data ); - break; - } - case id_caps_lock_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.caps_lock_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_layer_1_indicator_color: - { - _get_color( &(g_config.layer_1_indicator.color), value_data ); - break; - } - case id_layer_1_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.layer_1_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_layer_2_indicator_color: - { - _get_color( &(g_config.layer_2_indicator.color), value_data ); - break; - } - case id_layer_2_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.layer_2_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_layer_3_indicator_color: - { - _get_color( &(g_config.layer_3_indicator.color), value_data ); - break; - } - case id_layer_3_indicator_row_col: - { - backlight_get_indicator_row_col( g_config.layer_3_indicator.index, &(value_data[0]), &(value_data[1]) ); - break; - } - case id_alphas_mods: - { - for ( int i=0; i<5; i++ ) - { - *(value_data+i*2) = g_config.alphas_mods[i] >> 8; - *(value_data+i*2+1) = g_config.alphas_mods[i] & 0xFF; - } - } + uint8_t *value_id = &(data[0]); + uint8_t *value_data = &(data[1]); + switch ( *value_id ) + { + case id_use_split_backspace: + { + *value_data = ( g_config.use_split_backspace ? 1 : 0 ); + break; + } + case id_use_split_left_shift: + { + *value_data = ( g_config.use_split_left_shift ? 1 : 0 ); + break; + } + case id_use_split_right_shift: + { + *value_data = ( g_config.use_split_right_shift ? 1 : 0 ); + break; + } + case id_use_7u_spacebar: + { + *value_data = ( g_config.use_7u_spacebar ? 1 : 0 ); + break; + } + case id_use_iso_enter: + { + *value_data = ( g_config.use_iso_enter ? 1 : 0 ); + break; + } + case id_disable_when_usb_suspended: + { + *value_data = ( g_config.disable_when_usb_suspended ? 1 : 0 ); + break; + } + case id_disable_hhkb_blocker_leds: + { + *value_data = ( g_config.disable_hhkb_blocker_leds ? 1 : 0 ); + break; + } + case id_disable_after_timeout: + { + *value_data = g_config.disable_after_timeout; + break; + } + case id_brightness: + { + *value_data = g_config.brightness; + break; + } + case id_effect: + { + *value_data = g_config.effect; + break; + } + case id_effect_speed: + { + *value_data = g_config.effect_speed; + break; + } + case id_color_1: + { + _get_color( &(g_config.color_1), value_data ); + break; + } + case id_color_2: + { + _get_color( &(g_config.color_2), value_data ); + break; + } + case id_caps_lock_indicator_color: + { + _get_color( &(g_config.caps_lock_indicator.color), value_data ); + break; + } + case id_caps_lock_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.caps_lock_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_layer_1_indicator_color: + { + _get_color( &(g_config.layer_1_indicator.color), value_data ); + break; + } + case id_layer_1_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.layer_1_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_layer_2_indicator_color: + { + _get_color( &(g_config.layer_2_indicator.color), value_data ); + break; + } + case id_layer_2_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.layer_2_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_layer_3_indicator_color: + { + _get_color( &(g_config.layer_3_indicator.color), value_data ); + break; + } + case id_layer_3_indicator_row_col: + { + backlight_get_indicator_row_col( g_config.layer_3_indicator.index, &(value_data[0]), &(value_data[1]) ); + break; + } + case id_alphas_mods: + { + for ( int i=0; i<5; i++ ) + { + *(value_data+i*2) = g_config.alphas_mods[i] >> 8; + *(value_data+i*2+1) = g_config.alphas_mods[i] & 0xFF; + } + } #if defined(RGB_BACKLIGHT_M6_B) - case id_custom_color: - { - uint8_t index = value_data[0]; - if ( index >= 0 && index <= 6 ) - { - _get_color( &(g_config.custom_color[index]), &(value_data[1]) ); - } - } + case id_custom_color: + { + uint8_t index = value_data[0]; + if ( index >= 0 && index <= 6 ) + { + _get_color( &(g_config.custom_color[index]), &(value_data[1]) ); + } + } #endif - } + } } void backlight_config_set_alphas_mods( uint16_t *alphas_mods ) { - for ( int i=0; i<5; i++ ) - { - g_config.alphas_mods[i] = alphas_mods[i]; - } + for ( int i=0; i<5; i++ ) + { + g_config.alphas_mods[i] = alphas_mods[i]; + } - backlight_config_save(); + backlight_config_save(); } void backlight_config_load(void) { - eeprom_read_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); + eeprom_read_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); } void backlight_config_save(void) { - eeprom_update_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); + eeprom_update_block( &g_config, ((void*)RGB_BACKLIGHT_CONFIG_EEPROM_ADDR), sizeof(backlight_config) ); } void backlight_init_drivers(void) { - // Initialize I2C - i2c_init(); + // Initialize I2C + i2c_init(); #if defined(RGB_BACKLIGHT_M6_B) - IS31FL3218_init(); + IS31FL3218_init(); #elif defined(RGB_BACKLIGHT_HS60) - IS31FL3733_init( ISSI_ADDR_1 ); - - for ( int index = 0; index < BACKLIGHT_LED_COUNT; index++ ) - { -#if defined (HS60_ANSI) - bool enabled = !( ( index == 48-1 ) || //LA48 - ( index == 51-1 ) || //LA51 - ( index == 61-1 ) ); //LA61 -#elif defined (HS60_HHKB) - bool enabled = !( ( index == 61-1 ) || //LA61 - ( index == 62-1 ) ); //LA62 + IS31FL3733_init( ISSI_ADDR_1, 0 ); + + for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) + { +#if defined(HS60_ANSI) + bool enabled = !( ( index == 48-1 ) || //LA48 + ( index == 51-1 ) || //LA51 + ( index == 61-1 ) ); //LA61 +#elif defined(HS60_HHKB) + bool enabled = !( ( index == 61-1 ) || //LA61 + ( index == 62-1 ) ); //LA62 #else //HS60_ISO - bool enabled = !( ( index == 51-1 ) || //LA51 - ( index == 61-1 ) ); //LA61 + bool enabled = !( ( index == 51-1 ) || //LA51 + ( index == 61-1 ) ); //LA61 #endif - // This only caches it for later - IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); - } - // This actually updates the LED drivers - IS31FL3733_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); + // This only caches it for later + IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); + } + // This actually updates the LED drivers + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); +#elif defined(RGB_BACKLIGHT_NK65) + IS31FL3733_init( ISSI_ADDR_1, 0 ); + IS31FL3733_init( ISSI_ADDR_2, 0 ); + + for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) + { + bool enabled = !( ( index == 61-1 ) || //LA61 + ( index > 6+64-1 ) ); //LB7-LB64 + // This only caches it for later + IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); + } + IS31FL3733_set_led_control_register( 7+64-1, 0, 1, 0 ); //Enable LB7 green enable for indicators + // This actually updates the LED drivers + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_2, 1 ); #else - IS31FL3731_init( ISSI_ADDR_1 ); - IS31FL3731_init( ISSI_ADDR_2 ); - - for ( int index = 0; index < BACKLIGHT_LED_COUNT; index++ ) - { - // OR the possible "disabled" cases together, then NOT the result to get the enabled state - // LC6 LD13 not present on Zeal65 -#if defined (RGB_BACKLIGHT_ZEAL65) - bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 - ( index == 36+6 ) || // LC6 - ( index == 54+13 ) ); // LD13 -#elif defined (RGB_BACKLIGHT_KOYU) - bool enabled = !( ( index == 36+15 ) || // LC15 - ( index == 54+13 ) || // LD13 - ( index == 54+17 ) ); // LD17 -#elif defined (RGB_BACKLIGHT_M60_A) - bool enabled = !( - // LB6 LB7 LB8 LB15 LB16 LB17 not present on M60-A - ( index == 18+6 ) || // LB6 - ( index == 18+7 ) || // LB7 - ( index == 18+8 ) || // LB8 - ( index == 18+15 ) || // LB15 - ( index == 18+16 ) || // LB16 - ( index == 18+17 ) || // LB17 - // HHKB blockers (LC17, LD17) and ISO extra keys (LC15,LD13) not present on M60-A - ( index == 36+17 ) || // LC17 - ( index == 54+17 ) || // LD17 - ( index == 36+15 ) || // LC15 - ( index == 54+13 ) ); // LD13 -#elif defined (RGB_BACKLIGHT_ZEAL60) - // LB6 LB7 LB8 LB15 LB16 LB17 not present on Zeal60 - bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 - ( index == 36+15 && !g_config.use_split_left_shift ) || // LC15 - ( index == 54+8 && !g_config.use_split_right_shift ) || // LD8 - ( index == 54+13 && g_config.use_7u_spacebar ) || // LD13 - ( index == 36+17 && g_config.disable_hhkb_blocker_leds ) || // LC17 - ( index == 54+17 && g_config.disable_hhkb_blocker_leds ) || // LD17 - ( index == 18+6 ) || // LB6 - ( index == 18+7 ) || // LB7 - ( index == 18+8 ) || // LB8 - ( index == 18+15 ) || // LB15 - ( index == 18+16 ) || // LB16 - ( index == 18+17 ) ); // LB17 + IS31FL3731_init( ISSI_ADDR_1 ); + IS31FL3731_init( ISSI_ADDR_2 ); + + for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) + { + // OR the possible "disabled" cases together, then NOT the result to get the enabled state + // LC6 LD13 not present on Zeal65 +#if defined(RGB_BACKLIGHT_ZEAL65) + bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 + ( index == 36+6 ) || // LC6 + ( index == 54+13 ) ); // LD13 +#elif defined(RGB_BACKLIGHT_KOYU) + bool enabled = !( ( index == 36+15 ) || // LC15 + ( index == 54+13 ) || // LD13 + ( index == 54+17 ) ); // LD17 +#elif defined(RGB_BACKLIGHT_M60_A) + bool enabled = !( + // LB6 LB7 LB8 LB15 LB16 LB17 not present on M60-A + ( index == 18+6 ) || // LB6 + ( index == 18+7 ) || // LB7 + ( index == 18+8 ) || // LB8 + ( index == 18+15 ) || // LB15 + ( index == 18+16 ) || // LB16 + ( index == 18+17 ) || // LB17 + // HHKB blockers (LC17, LD17) and ISO extra keys (LC15,LD13) not present on M60-A + ( index == 36+17 ) || // LC17 + ( index == 54+17 ) || // LD17 + ( index == 36+15 ) || // LC15 + ( index == 54+13 ) ); // LD13 +#elif defined(RGB_BACKLIGHT_ZEAL60) + // LB6 LB7 LB8 LB15 LB16 LB17 not present on Zeal60 + bool enabled = !( ( index == 18+5 && !g_config.use_split_backspace ) || // LB5 + ( index == 36+15 && !g_config.use_split_left_shift ) || // LC15 + ( index == 54+8 && !g_config.use_split_right_shift ) || // LD8 + ( index == 54+13 && g_config.use_7u_spacebar ) || // LD13 + ( index == 36+17 && g_config.disable_hhkb_blocker_leds ) || // LC17 + ( index == 54+17 && g_config.disable_hhkb_blocker_leds ) || // LD17 + ( index == 18+6 ) || // LB6 + ( index == 18+7 ) || // LB7 + ( index == 18+8 ) || // LB8 + ( index == 18+15 ) || // LB15 + ( index == 18+16 ) || // LB16 + ( index == 18+17 ) ); // LB17 #endif - // This only caches it for later - IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); - } - // This actually updates the LED drivers - IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); + // This only caches it for later + IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); + } + // This actually updates the LED drivers + IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); #endif // !defined(RGB_BACKLIGHT_M6_B) - // TODO: put the 1 second startup delay here? + // TODO: put the 1 second startup delay here? - // clear the key hits - for ( int led=0; ledevent.pressed ) - { - backlight_set_key_hit( record->event.key.row, record->event.key.col ); - } - - switch(keycode) - { - case BR_INC: - if (record->event.pressed) - { - backlight_brightness_increase(); - } - return false; - break; - case BR_DEC: - if (record->event.pressed) - { - backlight_brightness_decrease(); - } - return false; - break; - case EF_INC: - if (record->event.pressed) - { - backlight_effect_increase(); - } - return false; - break; - case EF_DEC: - if (record->event.pressed) - { - backlight_effect_decrease(); - } - return false; - break; - case ES_INC: - if (record->event.pressed) - { - backlight_effect_speed_increase(); - } - return false; - break; - case ES_DEC: - if (record->event.pressed) - { - backlight_effect_speed_decrease(); - } - return false; - break; - case H1_INC: - if (record->event.pressed) - { - backlight_color_1_hue_increase(); - } - return false; - break; - case H1_DEC: - if (record->event.pressed) - { - backlight_color_1_hue_decrease(); - } - return false; - break; - case S1_INC: - if (record->event.pressed) - { - backlight_color_1_sat_increase(); - } - return false; - break; - case S1_DEC: - if (record->event.pressed) - { - backlight_color_1_sat_decrease(); - break; - } - return false; - break; - case H2_INC: - if (record->event.pressed) - { - backlight_color_2_hue_increase(); - } - return false; - break; - case H2_DEC: - if (record->event.pressed) - { - backlight_color_2_hue_decrease(); - } - return false; - break; - case S2_INC: - if (record->event.pressed) - { - backlight_color_2_sat_increase(); - } - return false; - break; - case S2_DEC: - if (record->event.pressed) - { - backlight_color_2_sat_decrease(); - break; - } - return false; - break; - } - - return true; + // Record keypresses for backlight effects + if ( record->event.pressed ) + { + backlight_set_key_hit( record->event.key.row, record->event.key.col ); + } + + switch(keycode) + { + case BR_INC: + if (record->event.pressed) + { + backlight_brightness_increase(); + } + return false; + break; + case BR_DEC: + if (record->event.pressed) + { + backlight_brightness_decrease(); + } + return false; + break; + case EF_INC: + if (record->event.pressed) + { + backlight_effect_increase(); + } + return false; + break; + case EF_DEC: + if (record->event.pressed) + { + backlight_effect_decrease(); + } + return false; + break; + case ES_INC: + if (record->event.pressed) + { + backlight_effect_speed_increase(); + } + return false; + break; + case ES_DEC: + if (record->event.pressed) + { + backlight_effect_speed_decrease(); + } + return false; + break; + case H1_INC: + if (record->event.pressed) + { + backlight_color_1_hue_increase(); + } + return false; + break; + case H1_DEC: + if (record->event.pressed) + { + backlight_color_1_hue_decrease(); + } + return false; + break; + case S1_INC: + if (record->event.pressed) + { + backlight_color_1_sat_increase(); + } + return false; + break; + case S1_DEC: + if (record->event.pressed) + { + backlight_color_1_sat_decrease(); + break; + } + return false; + break; + case H2_INC: + if (record->event.pressed) + { + backlight_color_2_hue_increase(); + } + return false; + break; + case H2_DEC: + if (record->event.pressed) + { + backlight_color_2_hue_decrease(); + } + return false; + break; + case S2_INC: + if (record->event.pressed) + { + backlight_color_2_sat_increase(); + } + return false; + break; + case S2_DEC: + if (record->event.pressed) + { + backlight_color_2_sat_decrease(); + break; + } + return false; + break; + } + + return true; } // Deals with the messy details of incrementing an integer uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) { - int16_t new_value = value; - new_value += step; - return MIN( MAX( new_value, min ), max ); + int16_t new_value = value; + new_value += step; + return MIN( MAX( new_value, min ), max ); } uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) { - int16_t new_value = value; - new_value -= step; - return MIN( MAX( new_value, min ), max ); + int16_t new_value = value; + new_value -= step; + return MIN( MAX( new_value, min ), max ); } void backlight_effect_increase(void) { - g_config.effect = increment( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); - backlight_config_save(); + g_config.effect = increment( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); + backlight_config_save(); } void backlight_effect_decrease(void) { - g_config.effect = decrement( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); - backlight_config_save(); + g_config.effect = decrement( g_config.effect, 1, 0, BACKLIGHT_EFFECT_MAX ); + backlight_config_save(); } void backlight_effect_speed_increase(void) { - g_config.effect_speed = increment( g_config.effect_speed, 1, 0, 3 ); - backlight_config_save(); + g_config.effect_speed = increment( g_config.effect_speed, 1, 0, 3 ); + backlight_config_save(); } void backlight_effect_speed_decrease(void) { - g_config.effect_speed = decrement( g_config.effect_speed, 1, 0, 3 ); - backlight_config_save(); + g_config.effect_speed = decrement( g_config.effect_speed, 1, 0, 3 ); + backlight_config_save(); } void backlight_brightness_increase(void) { - g_config.brightness = increment( g_config.brightness, 8, 0, 255 ); - backlight_config_save(); + g_config.brightness = increment( g_config.brightness, 8, 0, 255 ); + backlight_config_save(); } void backlight_brightness_decrease(void) { - g_config.brightness = decrement( g_config.brightness, 8, 0, 255 ); - backlight_config_save(); + g_config.brightness = decrement( g_config.brightness, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_1_hue_increase(void) { - g_config.color_1.h = increment( g_config.color_1.h, 8, 0, 255 ); - backlight_config_save(); + g_config.color_1.h = increment( g_config.color_1.h, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_1_hue_decrease(void) { - g_config.color_1.h = decrement( g_config.color_1.h, 8, 0, 255 ); - backlight_config_save(); + g_config.color_1.h = decrement( g_config.color_1.h, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_1_sat_increase(void) { - g_config.color_1.s = increment( g_config.color_1.s, 8, 0, 255 ); - backlight_config_save(); + g_config.color_1.s = increment( g_config.color_1.s, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_1_sat_decrease(void) { - g_config.color_1.s = decrement( g_config.color_1.s, 8, 0, 255 ); - backlight_config_save(); + g_config.color_1.s = decrement( g_config.color_1.s, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_2_hue_increase(void) { - g_config.color_2.h = increment( g_config.color_2.h, 8, 0, 255 ); - backlight_config_save(); + g_config.color_2.h = increment( g_config.color_2.h, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_2_hue_decrease(void) { - g_config.color_2.h = decrement( g_config.color_2.h, 8, 0, 255 ); - backlight_config_save(); + g_config.color_2.h = decrement( g_config.color_2.h, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_2_sat_increase(void) { - g_config.color_2.s = increment( g_config.color_2.s, 8, 0, 255 ); - backlight_config_save(); + g_config.color_2.s = increment( g_config.color_2.s, 8, 0, 255 ); + backlight_config_save(); } void backlight_color_2_sat_decrease(void) { - g_config.color_2.s = decrement( g_config.color_2.s, 8, 0, 255 ); - backlight_config_save(); + g_config.color_2.s = decrement( g_config.color_2.s, 8, 0, 255 ); + backlight_config_save(); } #if defined(RGB_DEBUGGING_ONLY) void backlight_test_led( uint8_t index, bool red, bool green, bool blue ) { - for ( int i=0; i -#include -#include -#include -#include "serial.h" - -#ifndef USE_I2C - -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -} - -// Used by the master to synchronize timing with the slave. -static -void sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static -void sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - serial_input(); - for ( uint8_t i = 0; i < 8; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - _delay_us(1); - } - - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 8; - serial_output(); - while( b-- ) { - if(data & (1 << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); - - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); - sync_send(); - checksum += serial_slave_buffer[i]; - } - serial_write_byte(checksum); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); - - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_master_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += serial_master_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_send(); - - serial_input(); // end transaction - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(1); - - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - sei(); - return 1; - } - - // if the slave is present syncronize with it - sync_recv(); - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_slave_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += serial_slave_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_recv(); - - if (checksum_computed != checksum_received) { - sei(); - return 1; - } - - uint8_t checksum = 0; - // send data to the slave - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_master_buffer[i]); - sync_recv(); - checksum += serial_master_buffer[i]; - } - serial_write_byte(checksum); - sync_recv(); - - // always, release the line when not in use - serial_output(); - serial_high(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/zen/serial.h b/keyboards/zen/serial.h deleted file mode 100644 index 15fe4db7b4c6..000000000000 --- a/keyboards/zen/serial.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H - -#include "config.h" -#include - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD0) -#define SERIAL_PIN_INTERRUPT INT0_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/zen/split_rgb.c b/keyboards/zen/split_rgb.c deleted file mode 100644 index 6d7cb44cf0d2..000000000000 --- a/keyboards/zen/split_rgb.c +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include "split_util.h" -#include "progmem.h" -#include "print.h" -#include "rgblight.h" - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - - -rgblight_config_t rgblight_config; - -void rgblight_slave_update(void) { - //rgblight_effect_christmas(); -} - - -void rgblight_set(void) { - if (rgblight_config.enable) { - #ifdef RGBW - ws2812_setleds_rgbw(led, RGBLED_NUM); - #else - ws2812_setleds(led, RGBLED_NUM); - #endif - } else { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; - } - #ifdef RGBW - ws2812_setleds_rgbw(led, RGBLED_NUM); - #else - ws2812_setleds(led, RGBLED_NUM); - #endif - } -} diff --git a/keyboards/zen/split_rgb.h b/keyboards/zen/split_rgb.h deleted file mode 100644 index 5f552890afdb..000000000000 --- a/keyboards/zen/split_rgb.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef SPLIT_RGB_H -#define SPLIT_RGB_H - -void rgblight_slave_update(void); - -#endif diff --git a/layouts/community/60_ansi/mechmerlin-ansi/keymap.c b/layouts/community/60_ansi/mechmerlin-ansi/keymap.c index 12ed6868021d..b3c74da949fd 100644 --- a/layouts/community/60_ansi/mechmerlin-ansi/keymap.c +++ b/layouts/community/60_ansi/mechmerlin-ansi/keymap.c @@ -10,11 +10,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FNX, KC_RALT, KC_RGUI, KC_RCTL), [_FL] = LAYOUT_60_ansi( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ - RGB_TOG, 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, 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_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ + BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [_AL] = LAYOUT_60_ansi( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ diff --git a/layouts/community/60_ansi/stanrc85-ansi/config.h b/layouts/community/60_ansi/stanrc85-ansi/config.h deleted file mode 100644 index 904a7f524e16..000000000000 --- a/layouts/community/60_ansi/stanrc85-ansi/config.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -#define TAPPING_TERM 200 -#define RETRO_TAPPING diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index ddda4fcd8a28..f478398901e3 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -14,63 +14,38 @@ * along with this program. If not, see . */ #include QMK_KEYBOARD_H - -#define DEFAULT 0 //Custom ANSI -#define LAYER1 1 //Default ANSI (enable with Fn2+D) -#define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control -#define LAYER3 3 //RGB Underglow controls and RESET - -//Aliases for longer keycodes -#define KC_CAD LALT(LCTL(KC_DEL)) -#define KC_LOCK LGUI(KC_L) -#define CA_QUOT LCA(KC_QUOT) -#define CA_SCLN LCA(KC_SCLN) -#define KC_CTLE LCTL_T(KC_ESC) -#define LT_SPCF LT(2, KC_SPC) -#define TD_TESC TD(TD_ESC) -#define TD_TWIN TD(TD_WIN) - -//Tap Dance Declarations -enum { - TD_WIN = 0, - TD_ESC -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), - [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV) -}; +#include "stanrc85.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_60_ansi( - TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(3), KC_RCTL), - - [1] = LAYOUT_60_ansi( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, MO(2), MO(3), KC_RCTL), - - [2] = LAYOUT_60_ansi( - KC_TILD, 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, - _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, RESET, - KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______), - - [3] = LAYOUT_60_ansi( - _______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - _______, _______, _______, TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______) + [_QWERTY] = LAYOUT_60_ansi( + TD_TESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CTLE, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, LT_SPCF, KC_RALT, TD_TWIN, MO(_FN2_60), TD_TCTL), + + [_DEFAULT] = LAYOUT_60_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1_60), MO(_FN2_60), KC_RCTL), + + [_FN1_60] = LAYOUT_60_ansi( + KC_TILD, 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, + _______, _______, CA_QUOT, KC_VOLU, CA_SCLN, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, _______, _______, KC_INS, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, + _______, KC_RDP, _______, _______, _______, _______, _______, _______, KC_WBAK, KC_WFWD, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN2_60] = LAYOUT_60_ansi( + _______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MAKE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, TG(_DEFAULT)) }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } diff --git a/layouts/community/60_ansi/stanrc85-ansi/readme.md b/layouts/community/60_ansi/stanrc85-ansi/readme.md index 2df5588af7fb..6b5b3ca9ff21 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/readme.md +++ b/layouts/community/60_ansi/stanrc85-ansi/readme.md @@ -1,14 +1,48 @@ -# Stanrc85's Standard ANSI 60% Layout + + +# Stanrc85's Standard ANSI 60% Layout ## Keymap Notes -- Layer 0 is custom ANSI layout with SpaceFN, CTRL/ESC on CAPS, Tap Dance on Fn1 key for CTRL+ALT+DEL and WIN+L -- Layer 1 is default ANSI (enable with Fn2+D) -- Layer 2 is F keys, arrows, volume controls and custom shortcuts for AHK -- Layer 3 is RGB Underglow control and RESET +- Layer 0 is default QWERTY layout with additional custom features: + - SpaceFN to function layer 2 on `Space` + - `CTRL` when held and `ESC` when tapped on `CAPS LOCK` + - Tap Dance on `Fn1` for `CTRL+ALT+DEL` and `WIN+L` + - Tap Dance on `ESC` for `ESC` and ` ` ` + +![Base QWERTY Layer](https://imgur.com/lGcyLJx.png) + +- Layer 1 is default QWERTY with no custom features used mostly for gaming + - Enabled by `Fn2+CAPS` from base layer + +![Default ANSI Layer](https://imgur.com/M7T9PNT.png) + +- Layer 2 is Function layer: + - F keys + - Arrows + - Volume and Media controls + - AutoHotkey shortcuts based on [Speaker Control](https://github.com/stanrc85/Speaker-Control) script + - AHK Mic is used to mute/unmute microphone + - AHK Speaker switches audio output between headphones and speakers + +![Function Layer](https://imgur.com/YPl0JrU.png) + +- Layer 3 is RGB control and RESET + - `Fn2+CAPS` used to toggle Default QWERTY layer on and off + +![RGB and RESET Layer](https://imgur.com/8K7gSgh.png) ### Build To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85-ansi`. diff --git a/layouts/community/60_ansi/stanrc85-ansi/rules.mk b/layouts/community/60_ansi/stanrc85-ansi/rules.mk index 324e52674d6c..89d03e8c1f67 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/rules.mk +++ b/layouts/community/60_ansi/stanrc85-ansi/rules.mk @@ -1,10 +1 @@ -TAP_DANCE_ENABLE = yes -EXTRAKEY_ENABLE = yes -RGBLIGHT_ENABLE = yes -BACKLIGHT_ENABLE = no -COMMAND_ENABLE = no -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = no -AUDIO_ENABLE = no -CONSOLE_ENABLE = no -NKRO_ENABLE = no +USER_NAME := stanrc85 diff --git a/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c index 96c3a32f2692..98ba86e9415f 100644 --- a/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c +++ b/layouts/community/60_ansi_split_bs_rshift/mechmerlin-split/keymap.c @@ -10,11 +10,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RALT, KC_RGUI, KC_RCTL), [_FL] = LAYOUT_60_ansi_split_bs_rshift( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \ - RGB_TOG, 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, 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_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, \ + BL_TOGG, BL_INC, BL_DEC, BL_STEP, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [_AL] = LAYOUT_60_ansi_split_bs_rshift( 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, \ diff --git a/layouts/community/66_ansi/mechmerlin/config.h b/layouts/community/66_ansi/mechmerlin/config.h index f51361866cd4..6f70f09beec2 100644 --- a/layouts/community/66_ansi/mechmerlin/config.h +++ b/layouts/community/66_ansi/mechmerlin/config.h @@ -1,12 +1 @@ #pragma once - -#ifdef AUDIO_CLICKY - #define AUDIO_CLICKY_ON - #define AUDIO_CLICKY_FREQ_DEFAULT 261.63f - #define AUDIO_CLICKY_FREQ_MIN 65.41f - #define AUDIO_CLICKY_FREQ_MAX 1046.5f - //#define AUDIO_CLICKY_FREQ_FACTOR 1.18921f - //#define AUDIO_CLICKY_FREQ_FACTOR 2.71828f // e - #define AUDIO_CLICKY_FREQ_FACTOR 1.61803f // golden ratio - #define AUDIO_CLICKY_FREQ_RANDOMNESS 17.0f -#endif diff --git a/layouts/community/66_ansi/mechmerlin/keymap.c b/layouts/community/66_ansi/mechmerlin/keymap.c index ea2e923b1cac..9f041e27ca67 100644 --- a/layouts/community/66_ansi/mechmerlin/keymap.c +++ b/layouts/community/66_ansi/mechmerlin/keymap.c @@ -8,20 +8,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_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_PGDN, \ KC_CTCP,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, MO(_FL),KC_RGUI,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), [_FL] = LAYOUT_66_ansi( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_VOLU, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_MUTE, KC_VOLD, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, KC_VOLD, \ _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______, _______,_______,_______,_______,_______,_______,KC_MUTE,KC_VOLU,KC_VOLD,_______, _______, KC_PGUP, \ + _______, _______,_______,_______,_______,_______,_______,KC_MUTE,KC_VOLD,KC_VOLU,_______, _______, KC_PGUP, \ _______,_______,_______, _______, _______,_______,_______,KC_HOME,KC_PGDN,KC_END), [_CL] = LAYOUT_66_ansi( BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______, _______, RGB_VAI, \ - RGB_TOG,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ - CK_TOGG,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, \ - _______,_______,_______, RGB_MOD, _______,_______,_______,RGB_HUD,RGB_SAD,RGB_HUI), + BL_TOGG,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \ + RGB_TOG,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + VLK_TOG, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, \ + CK_TOGG,_______,_______, RGB_MOD, _______,_______,_______,RGB_HUD,RGB_SAD,RGB_HUI), }; diff --git a/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c b/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c index ec3286b09750..f785cdf3fd9a 100644 --- a/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c +++ b/layouts/community/75_ansi/mechmerlin-75_ansi/keymap.c @@ -9,13 +9,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_CTCP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [_FL] = LAYOUT_75_ansi(\ - KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, 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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, 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) -}; \ No newline at end of file + RESET, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + VLK_TOG, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END) +}; diff --git a/layouts/community/75_ansi/mechmerlin-75_ansi/readme.md b/layouts/community/75_ansi/mechmerlin-75_ansi/readme.md index 12c95027032e..ab7a9b92f735 100644 --- a/layouts/community/75_ansi/mechmerlin-75_ansi/readme.md +++ b/layouts/community/75_ansi/mechmerlin-75_ansi/readme.md @@ -4,7 +4,8 @@ This is the 75% layout used by u/merlin36, host of the [MechMerlin](www.youtube. YouTube channel. It is used on his -[Duck Octagon V2](https://github.com/qmk/qmk_firmware/tree/master/keyboards/octagon/v2) +[Duck Octagon V2](https://github.com/qmk/qmk_firmware/tree/master/keyboards/duck/octagon/v2) +[XD84](https://github.com/qmk/qmk_firmware/tree/master/keyboards/xd84) ### Build To build the firmware file associated with this keymap, simply run `make your_keyboard:mechmerlin-ansi`. diff --git a/layouts/community/ergodox/333fred/keymap.c b/layouts/community/ergodox/333fred/keymap.c index b203f42c62e1..c649e88dcacd 100644 --- a/layouts/community/ergodox/333fred/keymap.c +++ b/layouts/community/ergodox/333fred/keymap.c @@ -271,10 +271,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/absenth/keymap.c b/layouts/community/ergodox/absenth/keymap.c index b9dddfb420f7..e4f1ec901a6a 100644 --- a/layouts/community/ergodox/absenth/keymap.c +++ b/layouts/community/ergodox/absenth/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -136,10 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/adam/keymap.c b/layouts/community/ergodox/adam/keymap.c index e99e5d45353e..100bb6819817 100644 --- a/layouts/community/ergodox/adam/keymap.c +++ b/layouts/community/ergodox/adam/keymap.c @@ -11,9 +11,6 @@ #define SFLOCK 11 // symbols arrows and F keys on F held down #define SJLOCK 12 // same as Flock but with fall thru J and mapped to J held down -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Sends macro when key is tapped, presses mod when key is held #define tap_mod_macro(record, mod, macro) ( ((record)->event.pressed) ? \ ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? MACRO(D(mod), END) : MACRO_NONE ) : \ diff --git a/layouts/community/ergodox/adnw_k_o_y/keymap.c b/layouts/community/ergodox/adnw_k_o_y/keymap.c index 4ff4495905c7..8a0e47026ed2 100644 --- a/layouts/community/ergodox/adnw_k_o_y/keymap.c +++ b/layouts/community/ergodox/adnw_k_o_y/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), DE_V, DE_G, DE_C, DE_L, DE_SS, DE_Z, DE_D, DE_T, DE_R, DE_N, LT(MDIA, DE_S), GUI_T(KC_F), MEH_T(KC_NO),KC_B, KC_P, KC_W, KC_M, CTL_T(KC_J), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_RSFT @@ -136,10 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/alexjj/keymap.c b/layouts/community/ergodox/alexjj/keymap.c index 5127b93f46f8..5f4f85cd431a 100644 --- a/layouts/community/ergodox/alexjj/keymap.c +++ b/layouts/community/ergodox/alexjj/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, ALT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_HOME, KC_LCTRL, LCTL(KC_C), LCTL(KC_V), KC_LEFT,KC_RGHT, - KC_FN3, KC_F5, + TT(UNIC), KC_F5, KC_PGUP, KC_ENT,KC_BSPC,KC_PGDN, // right hand @@ -47,9 +47,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_END, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_DOWN,KC_UP, ALL_T(KC_NO),KC_GRV, KC_RCTRL, - KC_F2, KC_FN2, + KC_F2, TT(MDIA), KC_INS, - KC_DELT,KC_FN1, KC_SPC + KC_DELT,TT(SYMB), KC_SPC ), /* Keymap 1: Symbol Layer * @@ -179,13 +179,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Layer 1 (Symbols) - [2] = ACTION_LAYER_TAP_TOGGLE(MDIA), // FN2 - Momentary Layer 2 (Media) - [3] = ACTION_LAYER_TAP_TOGGLE(UNIC) // FN3 - Momentary Layer 3 (Unicode entry) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/andrew_osx/keymap.c b/layouts/community/ergodox/andrew_osx/keymap.c index ef37fc0329bf..8fb570bd757f 100644 --- a/layouts/community/ergodox/andrew_osx/keymap.c +++ b/layouts/community/ergodox/andrew_osx/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_QUOT, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_FN1, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TT(SYMB), CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_LALT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC,KC_LGUI,KC_RPRN, // right hand KC_QUOT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_FN1, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + TT(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_BSLS, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TG(1), @@ -138,10 +138,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/belak/keymap.c b/layouts/community/ergodox/belak/keymap.c index 016cf30b4b4b..bca0dec913fd 100644 --- a/layouts/community/ergodox/belak/keymap.c +++ b/layouts/community/ergodox/belak/keymap.c @@ -5,7 +5,6 @@ #include "eeprom.h" #define LAYER_ON(pos) ((layer_state) & (1<<(pos))) -#define _______ KC_TRNS #define EECONFIG_BELAK_MAGIC (uint16_t)0xBE42 diff --git a/layouts/community/ergodox/bepo_alt/keymap.c b/layouts/community/ergodox/bepo_alt/keymap.c new file mode 100644 index 000000000000..fc40afd8712f --- /dev/null +++ b/layouts/community/ergodox/bepo_alt/keymap.c @@ -0,0 +1,127 @@ +/* Bepo layout for ergodox EZ by Nicolas CARPi (deltablot.com) */ +#include QMK_KEYBOARD_H +#include "keymap_bepo.h" +#include "keymap_french.h" + +#define BEPO 0 // default layer, for bepo compatible systems +#define FNAV 1 // function / navigation / mouse layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: default layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | $ | " | < | > | ( | ) | @ | | + | - | - | / | * | = | % | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | B |E_ACUT| P | O |E_GRAV|Backsp| |CapsLo| ^ | V | D | L | J | Z | + * |--------+------+------+------+------+------| ace | | |------+------+------+------+------+--------| + * | W | A | U | I | E | , |------| |------| C | T | S | R | N | M | + * |--------+------+------+------+------+------| | | ESCAP------+------+------+------+------+--------| + * | SHIFT |E_CIRC | A_GRAV | Y | X | . | K | | | ' | Q | G | H | F | C_CEDIL| + * `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------' + * |Ctrl|LSuper|LSuper| LSuper| LAlt| | PgUp | PgDwn| |BEPO| Delete | | AltGr| RSuper|RSuper|RCtrl| Enter| + * `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------' + * | | |Insert| |L_Fnav| | | + * | Space|Shift |------| |------|RShift|Enter | + * | | |Mouse | | Fn | | | + * `--------------------' `--------------------' + * df is for temporary stuff and mo is for toggle (momentary) + * so mouse is to toggle the mouse mode + */ +[BEPO] = LAYOUT_ergodox( + +/* Left hand */ +BP_DOLLAR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_AT, +KC_TAB, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_BSPC, +BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMMA, +KC_LSHIFT, BP_ECRC, BP_A_GRAVE, BP_Y, BP_X, BP_DOT, BP_K, +KC_LCTL, KC_LGUI, KC_LGUI, KC_LGUI, KC_LALT, + KC_PGUP, KC_PGDOWN, + KC_INS, + KC_SPC, KC_LSHIFT, DF(FNAV), + +/* Right hand */ + BP_PLUS, BP_MINUS, BP_MINUS, BP_SLASH, BP_ASTR, BP_EQUAL, BP_PERCENT, + KC_CAPSLOCK, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, + BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, + KC_ESC, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED, + KC_ALGR, KC_RGUI, KC_RGUI, KC_RCTL, KC_ENTER, +DF(BEPO), KC_DEL, +DF(FNAV), +MO(FNAV), KC_RSHIFT, KC_ENTER), + +/* Keymap 1: function / navigation / mouse layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | F12 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | Next |LClick| Up |RClick| WhUp |Backspace| | | PgUp | Home | Up | End | F11 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Prev | Left | Down | Right|WhDown|------| |------| Left | Down | Up | Right | F12 | | + * |--------+------+------+------+------+------| VolUp| | |------+------+------+------+------+--------| + * | Shift | Undo | Cut | Copy | Paste| | | | | | | | | | | + * `--------+------+------+------+------+-------------,-------------. ,-------------`-------------+------+------+------+------+--------' + * | ctrl | super | super | alt | | Home | End | | | | | | Alt | | |Ctrl | | + * `----------------------------------' ,------|------|------| |------+------+------. `----------------------------------' + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[FNAV] = LAYOUT_ergodox( + +/* Left hand */ +KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, +KC_NO, KC_MS_BTN5, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_MS_WH_UP, KC_BSPC, +KC_NO, KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN, +KC_LSHIFT, KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_NO, KC_VOLD, +KC_LCTL, KC_INS, KC_LGUI, KC_LGUI, KC_LALT, + KC_HOME, KC_END, + KC_TRNS, + KC_NO, KC_TRNS, KC_TRNS, + +/* Right hand */ + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F12, + KC_NO, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_F11, KC_NO, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_F12, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_RALT, KC_TRNS, KC_TRNS, KC_RCTL, KC_NO, +KC_TRNS, KC_TRNS, +KC_TRNS, +KC_TRNS, KC_TRNS, KC_NO), +}; + +/* helper function to switch on of the right LED ON/OFF */ +static void indicate_using_led(const uint8_t led, const bool enabled) { + if (enabled) { + ergodox_right_led_on(led); + } else { + ergodox_right_led_off(led); + } +} + +/* Runs constantly in the background, in a loop */ +void matrix_scan_user(void) { + + /* red led for shift */ + if (keyboard_report->mods & MOD_BIT(KC_LSFT) || + ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { + indicate_using_led(1, true); + } else { + indicate_using_led(1, false); + } + + /* green led for alt */ + if (keyboard_report->mods & MOD_BIT(KC_LALT) || + ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) { + indicate_using_led(2, true); + } else { + indicate_using_led(2, false); + } + + /* blue led for function mode */ + if (IS_LAYER_ON(FNAV)) { + indicate_using_led(3, true); + } else { + indicate_using_led(3, false); + } +}; diff --git a/layouts/community/ergodox/bepo_alt/readme.md b/layouts/community/ergodox/bepo_alt/readme.md new file mode 100644 index 000000000000..c8cc1225cc97 --- /dev/null +++ b/layouts/community/ergodox/bepo_alt/readme.md @@ -0,0 +1,66 @@ +![layer0](https://i.imgur.com/vd4QLBf.png) + +![layer1](https://i.imgur.com/eo101eD.png) + +# BEPO keymap for the ErgoDox (alternate version) + +This keymap has been made for the BEPO layout (https://bepo.fr), which is an ergonomic french keyboard layout based on Dvorak rules. As it's made for french people, the following of this readme will be in french. + +Keyboard Maintainer: [Nicolas CARPi](https://github.com/NicolasCARPi) + +Hardware Supported: Ergodox EZ + +## Disposition BÉPO pour l'ErgoDox + +Cette keymap a été adaptée de la keymap "bepo_csa" présente dans le dossier parent. + +Certaines modifications ont été apportées pour ressembler un peu plus à une clavier traditionel: + +* entrée sur la touche tout en bas à droite (comme la touche entrée du pavé numérique sur un clavier traditionnel) +* plusieurs touches "Super" pour faciliter son accès + +Il y a deux layers, celui de base, et celui avec les flèches, les touches fonction et la souris (main gauche). + +## Particularités + +* Touches de repos des pouces : "espace" à gauche et "entrée" à droite. +* Touche Ctrl gauche accessible avec la paume de la main. +* Touche "w" placée sur la main gauche (j'ai toujours trouvé le "w" difficle d'accès sur un clavier bépo classique. +* Plusieurs touches F12. +* Les flèches sont disposées avec un déplacement à la VIM. +* Un mode souris permet d'utiliser la souris avec le clavier. +* Possibilité de changer de mode de manière temporaire ou permanente. +* Les leds s'allument avec SHIFT, ALT ou la touche function. + +J'ai fait cette disposition pour mes besoins, à vous de la modifier pour les vôtres ;) + +## Utilisation + +### Pré-requis + +Pour Archlinux, il est nécessaire d'installer ces paquets au préalable: + +~~~bash +sudo pacman -S avr-gcc avr-libc teensy-loader-cli +~~~ + +Les paquets "avr" permettent de compiler le firmware, et teensy-loader permet de le charger sur le clavier. + +### Compilation + +~~~bash +# clone the repo +git clone https://github.com/qmk/qmk_firmware +# install submodules +make git-submodule +# compile this layout +make ergodox_ez:bepo_alt +~~~ + +### Chargement + +~~~bash +teensy-loader-cli -w -mmcu=atmega32u4 -v ergodox_ez_bepo_alt.hex && sleep 6 && setxkbmap fr bepo +~~~ + +J'ai ajouté un sleep avant la commande pour remettre en bépo afin de laisser au clavier le temps de rebooter. diff --git a/layouts/community/ergodox/erez_experimental/rules.mk b/layouts/community/ergodox/bepo_alt/rules.mk similarity index 92% rename from layouts/community/ergodox/erez_experimental/rules.mk rename to layouts/community/ergodox/bepo_alt/rules.mk index f68b56f872d0..faca18b5431a 100644 --- a/layouts/community/ergodox/erez_experimental/rules.mk +++ b/layouts/community/ergodox/bepo_alt/rules.mk @@ -3,4 +3,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend COMMAND_ENABLE = no # Commands for debug and configuration -LEADER_ENABLE = yes diff --git a/layouts/community/ergodox/bryan/keymap.c b/layouts/community/ergodox/bryan/keymap.c index 220ae2e80375..5e74c9126291 100644 --- a/layouts/community/ergodox/bryan/keymap.c +++ b/layouts/community/ergodox/bryan/keymap.c @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), ALT_T(KC_APP), KC_LGUI, KC_HOME, @@ -146,10 +146,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/coderkun_neo2/keymap.c b/layouts/community/ergodox/coderkun_neo2/keymap.c index 5b1887ec532a..0c70dbb5d074 100644 --- a/layouts/community/ergodox/coderkun_neo2/keymap.c +++ b/layouts/community/ergodox/coderkun_neo2/keymap.c @@ -219,8 +219,6 @@ const uint16_t PROGMEM fn_actions[] = { [BASE] = ACTION_FUNCTION(BASE), [PMQ] = ACTION_FUNCTION(PMQ), [PMN] = ACTION_FUNCTION(PMN), - [FMU] = ACTION_LAYER_TAP_TOGGLE(FMU), - [NHL] = ACTION_LAYER_TAP_TOGGLE(NHL) }; diff --git a/layouts/community/ergodox/colemak/keymap.c b/layouts/community/ergodox/colemak/keymap.c index e9e27bcc4dfb..7330eda1404f 100644 --- a/layouts/community/ergodox/colemak/keymap.c +++ b/layouts/community/ergodox/colemak/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, KC_H, KC_N, KC_E, KC_I, LT(MDIA, KC_O), KC_QUOT, MEH_T(KC_NO),KC_K, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -135,10 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/common_nighthawk/keymap.c b/layouts/community/ergodox/common_nighthawk/keymap.c index e113e85d1fa6..cb13822e4e96 100644 --- a/layouts/community/ergodox/common_nighthawk/keymap.c +++ b/layouts/community/ergodox/common_nighthawk/keymap.c @@ -149,10 +149,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/csharp_dev/keymap.c b/layouts/community/ergodox/csharp_dev/keymap.c index 7996c92e083d..221389ef242d 100644 --- a/layouts/community/ergodox/csharp_dev/keymap.c +++ b/layouts/community/ergodox/csharp_dev/keymap.c @@ -118,10 +118,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(FKEYS) // FN1 - Momentary Layer 1 -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/dragon788/keymap.c b/layouts/community/ergodox/dragon788/keymap.c index ea3fe3ee5e0e..c0c2134774eb 100644 --- a/layouts/community/ergodox/dragon788/keymap.c +++ b/layouts/community/ergodox/dragon788/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - KC_FN1, KC_GRV, KC_QUOT,KC_LEFT, LT(MDIA, KC_RGHT), + TT(SYMB), KC_GRV, KC_QUOT,KC_LEFT, LT(MDIA, KC_RGHT), KC_APP, KC_HOME, KC_END, KC_BSPC,KC_DELT,KC_LALT, @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(2), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTL_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, - LT(MDIA, KC_UP), KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + LT(MDIA, KC_UP), KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_PGUP, CTL_T(KC_ESC), KC_PGDN, CTL_T(KC_TAB),KC_ENT, KC_SPC @@ -180,10 +180,6 @@ LAYOUT_ergodox( }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index fee954d17945..821710ed8e81 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -1,14 +1,11 @@ #pragma once -#include QMK_KEYBOARD_CONFIG_H - #ifdef RGBLIGHT_ENABLE -#undef RGBLIGHT_SAT_STEP -#define RGBLIGHT_SAT_STEP 12 +# undef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 12 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 #endif // RGBLIGHT_ENABLE @@ -16,4 +13,4 @@ #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine #undef DEBOUNCE -#define DEBOUNCE 5 +#define DEBOUNCE 15 diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 45860b8740e5..74382f175274 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -20,16 +20,15 @@ along with this program. If not, see . #ifdef UNICODEMAP_ENABLE #include "drashna_unicode.h" #endif // UNICODEMAP_ENABLE - -#ifdef RGB_MATRIX_ENABLE -extern bool g_suspend_state; -extern rgb_config_t rgb_matrix_config; +#ifndef UNICODE_ENABLE +# define UC(x) KC_NO #endif + extern userspace_config_t userspace_config; -//enum more_custom_keycodes { -// KC_P00 = NEW_SAFE_RANGE -//}; +enum more_custom_keycodes { + KC_SWAP_NUM = NEW_SAFE_RANGE +}; //define layer change stuff for underglow indicator bool skip_leds = false; @@ -43,11 +42,11 @@ bool skip_leds = false; KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \ KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ - KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, CTL_T(K2A), KC_MRSF, \ - KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ - OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \ - KC_HOME, KC_PGUP, \ - LT(_LOWER, KC_SPACE),KC_BSPC, KC_END, KC_PGDN, KC_DEL, LT(_RAISE, KC_ENTER) \ + KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ + KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ + OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \ + KC_APP, KC_MENU, \ + KC_SPC, LT(_LOWER, KC_BSPC), OS_LWR, OS_RSE, LT(_RAISE, KC_DEL), KC_ENT \ ) #define LAYOUT_ergodox_pretty_base_wrapper(...) LAYOUT_ergodox_pretty_base(__VA_ARGS__) @@ -166,6 +165,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ ), + [_NORMAN] = LAYOUT_ergodox_pretty_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_ergodox_pretty_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_ergodox_pretty_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_ergodox_pretty_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + + // Reverts OSM(Shift) to normal Shifts. However, may not need since we fixed the issue with RDP (LOCAL RESOURCES) [_MODS] = LAYOUT_ergodox_pretty_wrapper( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -206,9 +230,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO, KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, - KC_O, KC_P, KC_HYPR, MAGIC_TOGGLE_NKRO, - KC_LGUI, KC_NO, - KC_V, KC_SPC, KC_H, KC_PGDN, KC_DEL, KC_ENTER + KC_O, KC_P, MAGIC_TOGGLE_NKRO, LALT(KC_PSCR), + KC_LGUI, KC_HYPR, + KC_V, KC_SPC, KC_H, KC_NO, KC_NO, KC_SWAP_NUM ), /* Keymap 3: @@ -245,8 +269,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_ergodox_pretty_wrapper( KC_F12, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11, - KC_TILD, _________________LOWER_L1__________________, _______, _______, _________________LOWER_R1__________________, _______, - _______, ___________________BLANK___________________, _________________LOWER_R2__________________, KC_PIPE, + KC_TILD, _________________LOWER_L1__________________, _______, _______, _________________LOWER_R1__________________, KC_PIPE, + _______, ___________________BLANK___________________, _________________LOWER_R2__________________, KC_DQUO, _______, ___________________BLANK___________________, _______, _______, _________________LOWER_R3__________________, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PAUS, _______, _______, _______, _______, @@ -256,8 +280,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_ergodox_pretty_wrapper( KC_F12, _________________FUNC_LEFT_________________, _______, _______, _________________FUNC_RIGHT________________, KC_F11, - KC_GRV, _________________RAISE_L1__________________, _______, _______, _________________RAISE_R1__________________, _______, - _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + KC_GRV, _________________RAISE_L1__________________, _______, _______, _________________RAISE_R1__________________, KC_BSLS, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_QUOT, _______, _________________RAISE_L3__________________, _______, _______, _________________RAISE_R3__________________, KC_PSCR, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_SLCK, _______, _______, _______, _______, @@ -280,60 +304,88 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - //switch (keycode) { - // case KC_P00: - // if (!record->event.pressed) { - // register_code(KC_KP_0); - // unregister_code(KC_KP_0); - // register_code(KC_KP_0); - // unregister_code(KC_KP_0); - // } - // return false; - // break; - //} - return true; + switch (keycode) { + case KC_1: + if (IS_LAYER_ON(_GAMEPAD) && userspace_config.swapped_numbers) { + if (record->event.pressed) { + register_code(KC_2); + } else { + unregister_code(KC_2); + } + return false; + } + break; + case KC_2: + if (IS_LAYER_ON(_GAMEPAD) && userspace_config.swapped_numbers) { + if (record->event.pressed) { + register_code(KC_1); + } else { + unregister_code(KC_1); + } + return false; + } + break; + case KC_SWAP_NUM: + if (record->event.pressed) { + userspace_config.swapped_numbers ^= 1; + eeconfig_update_user(userspace_config.raw); + } + break; + } + //switch (keycode) { + // case KC_P00: + // if (!record->event.pressed) { + // register_code(KC_KP_0); + // unregister_code(KC_KP_0); + // register_code(KC_KP_0); + // unregister_code(KC_KP_0); + // } + // return false; + // break; + //} + return true; } void matrix_scan_keymap(void) { // runs frequently to update info - uint8_t modifiers = get_mods(); - uint8_t led_usb_state = host_keyboard_leds(); - uint8_t one_shot = get_oneshot_mods(); - - if (!skip_leds) { - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - - // Since we're not using the LEDs here for layer indication anymore, - // then lets use them for modifier indicators. Shame we don't have 4... - // Also, no "else", since we want to know each, independently. - if (modifiers & MODS_SHIFT_MASK || led_usb_state & (1< | 4 | 5 | 6 | + | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | UND | CUT | COP | PAS | | | | ? | 1 | 2 | 3 | % | | + * | | ~ | UND | CUT | COP | PAS | | | | ? | 1 | 2 | 3 | % | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | . | 0 | = | | | * `----------------------------------' `----------------------------------' @@ -103,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, NO_AT, ALGR(KC_7), ALGR(KC_0), NO_LBRC, NO_RBRC, KC_TRNS, KC_TRNS, KC_HASH, NO_LPRN, NO_RPRN, ALGR(KC_MINS), NO_SLSH, - KC_TRNS, KC_TRNS, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_TRNS, + KC_TRNS, NO_TILD, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, @@ -165,11 +166,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | Save |Build |Debug | | | | | | bool | int |string| dec | Todo | | + * | | Save |Build |Debug |PrtScr| $ | | | | bool | int |string| dec | Todo | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| priv | publ |shared| prot | | | + * | | ´ | ' | | | | £ |------| |------| priv | publ |shared| prot | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | const| dim |return|nothin| | | + * | | | | | | £ | | | | const| dim |return|nothin| | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' @@ -184,9 +185,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // MEDIA AND MOUSE [DEVL] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), 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, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_PSCR, ALGR(KC_4), KC_TRNS, + KC_TRNS, NO_ACUT, NO_APOS, NO_PIPE, KC_TRNS, ALGR(KC_3), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ALGR(KC_5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -203,10 +204,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/dvorak_programmer_swe/readme.md b/layouts/community/ergodox/dvorak_programmer_swe/readme.md index 552fa0e3ab79..3bedf50d74b8 100644 --- a/layouts/community/ergodox/dvorak_programmer_swe/readme.md +++ b/layouts/community/ergodox/dvorak_programmer_swe/readme.md @@ -13,14 +13,43 @@ TODO: Known issues: * Keymap 2 modifier has not gotten its place yet.. -* Print screen, where? ## Changelog +* 2019-03-11 + * Added currency $, £, € to keymap 3 + * Added pipe character to keymap 3 + * Added the acute accent character to keymap 3 + +* 2019-03-08 + * Switched position on Alt and Alt-shift + * Added tilde character to symbol layer + * Added Print Screen to keymap 3 + * Added ' (NO_APOS) to keymap 3 + * Added how to install help in this readme * 2017-05-16 * Initial release + +# How to install - reminder +0. Docs: https://docs.qmk.fm/#/newbs +1. Download flashing tool - teensy (from ergodox-ez visual designer) +2. Setup build environment: https://docs.qmk.fm/#/newbs_getting_started + +QUICK HOWTO WSL: (this is not supported anymore it seems, why?) +The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. +Open "Bash On Ubuntu On Windows" from the start menu. +Go to the directory where you cloned qmk_firmware. Note that the paths start with /mnt/ in the WSL, so you have to write for example cd /mnt/c/path/to/qmk_firmware. +Run util/wsl_install.sh and follow the on-screen instructions. +Close the Bash command window, and re-open it. +You are ready to compile and flash the firmware! + +3. Build the firmware with: +Run the following in the root qmk folder: +make KEYBOARD=ergodox_ez KEYMAP=dvorak_programmer_swe + + # Author Christian Westerlund cwesterlund @ github diff --git a/layouts/community/ergodox/dvorak_spanish/keymap.c b/layouts/community/ergodox/dvorak_spanish/keymap.c index 19dfb27f57f3..98aa638a0f60 100644 --- a/layouts/community/ergodox/dvorak_spanish/keymap.c +++ b/layouts/community/ergodox/dvorak_spanish/keymap.c @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ENT,KC_TAB,MT((MOD_LALT | MOD_LSFT), KC_F3), // right hand KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, - KC_FN1, KC_F, KC_G, KC_C, KC_H, KC_L, ALL_T(KC_RBRACKET), + TT(AUX), KC_F, KC_G, KC_C, KC_H, KC_L, ALL_T(KC_RBRACKET), KC_D, KC_R, KC_T, KC_N, KC_S, CTL_T(KC_QUOTE), KC_RALT, KC_B, KC_M, KC_W, KC_V, KC_Z, M(CBRACE), KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,M(CBRACK), @@ -168,10 +168,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(AUX) // FN1 - Momentary Layer 1 (Aux) -}; - static uint16_t key_timer; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/layouts/community/ergodox/dvorak_spanish/readme.md b/layouts/community/ergodox/dvorak_spanish/readme.md index e075e3cd7d6c..1256c6887d97 100644 --- a/layouts/community/ergodox/dvorak_spanish/readme.md +++ b/layouts/community/ergodox/dvorak_spanish/readme.md @@ -1,5 +1,4 @@ # Ergodox Spanish Dvorak Layout - * See spanish dvorak layout [here](http://djelibeibi.unex.es/dvorak/) * Software layout must be set to SPANISH QWERTY to work properly ## Keymap Layers diff --git a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c index 98df73289338..b0eff652b877 100644 --- a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c +++ b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c @@ -178,11 +178,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/layouts/community/ergodox/emacs_osx_dk/keymap.c b/layouts/community/ergodox/emacs_osx_dk/keymap.c index 3fa14a5644a0..8f4c010afe3a 100644 --- a/layouts/community/ergodox/emacs_osx_dk/keymap.c +++ b/layouts/community/ergodox/emacs_osx_dk/keymap.c @@ -135,10 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/erez_experimental/config.h b/layouts/community/ergodox/erez_experimental/config.h deleted file mode 100644 index 4b9c29c94e90..000000000000 --- a/layouts/community/ergodox/erez_experimental/config.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H - -#define ONESHOT_TAP_TOGGLE 2 -#define ONESHOT_TIMEOUT 300 - -#undef LEADER_TIMEOUT -#define LEADER_TIMEOUT 300 - - -#endif diff --git a/layouts/community/ergodox/erez_experimental/keymap.c b/layouts/community/ergodox/erez_experimental/keymap.c deleted file mode 100644 index 1270188f9754..000000000000 --- a/layouts/community/ergodox/erez_experimental/keymap.c +++ /dev/null @@ -1,217 +0,0 @@ -#include -#include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // can always be here - RGB_FF00BB // always start with RGB_ -}; - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 |Ctrl- | | Ctrl+| 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | D | F | G |------| |------| H | Alt/J| K | L |; / L2| LGui/' | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * |LShift/(|Z/Ctrl| X | C | V | B | [ | | ] | N | M | , | . |//Ctrl|RShift/)| - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | -/L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Leader|------| |------| Tab/L1 |Enter | - * | | | End | | PgDn | | | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -[BASE] = LAYOUT_ergodox( // layer 0 : default - // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, LCTL(KC_MINS), - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_LBRC), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPC,KC_LEAD,KC_END, - // right hand - LCTL(KC_EQL), KC_6,KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y,KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H,ALT_T(KC_J),KC_K, KC_L, LT(MDIA,KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_RBRC),KC_N,KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, LT(SYMB,KC_MINS), - KC_LALT, CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN,LT(SYMB, KC_TAB), KC_ENT - ), -/* Keymap 1: Symbol Layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | F12 | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | 1 | 2 | 3 | 4 | 5 |------| |------| & | _ | - | ; | + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | 6 | 7 | 8 | 9 | 0 | | | | | | @ | = | % | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | |NxtTab|PrvTab| | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | |TOG | - * ,------|------|------| |------+------+------. - * |VAI |VAD |HUI | |SAI | |MOD | - * | | |------| |------| | | - * | | |HUD | |SAD | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = LAYOUT_ergodox( - // left hand - RGB_FF00BB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, - KC_TRNS, KC_TRNS,KC_TRNS,LCTL(KC_PGUP), LCTL(KC_PGDN), - KC_TRNS,KC_TRNS, - RGB_HUI, - RGB_VAI,RGB_VAD,RGB_HUD, - // right hand - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12, - KC_AMPR, KC_UNDS, KC_MINS, CM_SCLN, KC_PLUS, KC_TRNS, - KC_TRNS, KC_PIPE, KC_AT, KC_EQL, KC_PERC, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - RGB_TOG, KC_TRNS, - RGB_SAI, - RGB_SAD, KC_TRNS, RGB_MOD -), -/* Keymap 2: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | PgUp | Home | End | PgDn | |------| |------| | | | | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// MEDIA AND MOUSE -[MDIA] = LAYOUT_ergodox( - 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_PGUP, KC_HOME, KC_END, KC_PGDN, 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, - // right hand - 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_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK -), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - // dynamically generate these. - case RGB_FF00BB: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable(); - rgblight_mode(1); - rgblight_setrgb(0xff,0x00,0xbb); - #endif - } - return false; - break; - } - return true; -} - -LEADER_EXTERNS(); - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (layer) { - // TODO: Make this relevant to the ErgoDox EZ. - case 1: - ergodox_right_led_1_on(); - break; - case 2: - ergodox_right_led_2_on(); - break; - default: - // none - break; - } - - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_ONE_KEY(KC_W) { - register_code(KC_LALT); - register_code(KC_F4); - unregister_code(KC_F4); - unregister_code(KC_LALT); - } - SEQ_ONE_KEY(KC_O) { - register_code(KC_LCTL); - register_code(KC_LSFT); - register_code(KC_O); - unregister_code(KC_O); - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - } - } -} - diff --git a/layouts/community/ergodox/erez_experimental/readme.md b/layouts/community/ergodox/erez_experimental/readme.md deleted file mode 100644 index f0738d9a70fc..000000000000 --- a/layouts/community/ergodox/erez_experimental/readme.md +++ /dev/null @@ -1,55 +0,0 @@ -# Erez's experimental layout - -This is my personal layout which I use to test out ideas which may or may not make it onto the default layout we ship with. It's based off the default layout, with various tweaks. - -Changelog: - -## Nov 1, 2016: - -* Adds dedicated text zooming keys in inner corners - -## May 24, 2016: - -* Implements Leader key example - * Leader, W sends Alt-F4 - * Leader, O sends Ctrl-shift-o (a shortcut I use in FrontApp) - -## May 8, 2016: - -* Makes bottom-right key send minus/underscore when tapped, L1 temporary toggle when held -* Tweaked the positions of the numbers on the symbol layer. Basically, 12345 are now directly under their number-row counterparts in layer 0. You can imagine pulling the number row down to the home row. And 67890 are directly under 12345 - so it's a matter of just adding 5 and going to the next row (1+5 = 6, 2+5 = 7 and so on). -* Tweaks media/nav layer - * Removes mouse control, as I don't use it - * Makes left home row keys PgUp, Home, End, PgDn - -## Apr 29, 2016: - -* Tweaks the Hyper and Meh key to send brackets when tapped -* Turns bottom-right key into a minus/underscore (easy to reach with the right pinky) - -## Apr 25, 2016: - -* Made it so that the right and left Shift keys send opening and closing parens ( ) when tapped - -## Feb 11, 2016: - -* Updated ASCII legend for thumb clusters -* Made it so outer left-hand thumb key is L1 momentary toggle -* Added % and @ to L1 -* Swapped positions for _ and - on L1 - -## Feb 5, 2016: - -* A whole new design for the symbol layer. Specifically: - * Put the minus, underscore, and semicolon right in the homerow for the right hand - * Parens are in better places for me - * The arrow keys now send Ctrl-PgUp and Ctrl-PgDn, for switching browser tabs with the arrows when in symbol layer - * Tab (right-hand outer thumb key) now does double duty to toggle symbol layer when held down - * Backspace (left-hand outer thumb key) now just toggles symbol layer (I wasn't using it as a backspace) - - -## Jan 19, 2016: - -* Made J into dual-action key (Alt when held down), to make Alt-tab more ergonomic. -* Made ' into dual-action key (Win/Cmd when held down). - diff --git a/layouts/community/ergodox/familiar/README.md b/layouts/community/ergodox/familiar/README.md deleted file mode 100644 index 8d68af21a308..000000000000 --- a/layouts/community/ergodox/familiar/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# ErgoDox Familiar Layout -Familiar layout for those who regularly switch back and forth from ErgoDox to "normal" QWERTY. - -[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](../../../../license_GPLv3.md) [![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme) - -## Table of Contents - -- [Background](#background) -- [Install](#install) -- [Usage](#usage) - - [Layers](#layers) -- [Contribute](#contribute) - - [Issues](#issues) -- [License](#license) - -## Background - -This layout is built to be as familiar as possible for users coming directly from a default (QWERTY US) keyboard, while gaining as much advantage as possible from the ErgoDox and QMK featureset. I use an ErgoDoxEZ at home, but I don't have a regular office (CS grad student) so I regularly use either my laptop or a default-setup lab computer; I context switch daily so this layout is meant to reduce the mental overhead as much as possible. - -The default ErgoDoxEZ layout is probably more optimized as a solo daily driver - as are a lot of the others available keymaps. The focus of this layout is to get as much from the 'Dox as possible without overly disrupting long-established muscle memory. - -Key features of the familiar layout: -1. QWERTY default layout. -1. International symbols layer, mapped in the US-International layout default positions, through [UCIS](https://github.com/qmk/qmk_firmware/wiki/Unicode-and-additional-language-support#ucis_enable). -1. Numpad layer on right hand. -1. Thumb cluster holds spacebar and access to secondary layers. -1. Function-layer arrow keys in both the first-person-shooter (actually ESDF instead of WASD) and vim (HJKL) locations. - -## Install - -If you are on Windows or Mac, choose the proper line in [`keymap.c`](keymap.c) for [unicode/international character support](https://github.com/qmk/qmk_firmware/wiki/Unicode-and-additional-language-support#ucis_enable) (starts at line 253). -```c -void matrix_init_user(void) { - set_unicode_input_mode(UC_LNX); // Linux - //set_unicode_input_mode(UC_OSX); // Mac OSX - //set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) - //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) -}; -``` - -For instructions on building and installing this keymap, [go to the wiki](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ergodox#build-dependencies). Below is the command for me; it may be different for you. -```sh -$ make ergodox-ez-familiar-teensy -``` - -## Usage - -[![Familiar Layout](http://i.imgur.com/6nLN9UT.png)](https://gist.github.com/nstickney/13508a9f99cff381d58b7be6f7dcc644) - -### Layers -1. Base Layer: QWERTY, with arrow keys at bottom right. -1. UCIS Layer: US-International symbols layer, plus —. Accessed by toggling the `SYMB` layer using the UCIS key (bottom of left thumb cluster). -1. UCIS-Shifted Layer: Making shift work for UCIS characters. An ugly workaround. Any ideas? Accessed by holding shift while the `SYMB` layer is active (toggles the `CSYM` layer). -1. Numpad Layer: Right hand number pad. Accessed by toggling the `NUMP` layer using the NUMP key (bottom of right thumb cluster). -1. Function Layer: F1-F12, arrows on ESDF and HJKL, media player controls. Accessed by holding either FN key (center key of each thumb cluster), which toggles the `ARRW` layer. I know, I need to work on my naming conventions. - -## Contribute - -[Contributor Covenant](http://contributor-covenant.org/) - -I'm terrible at this; I have no background in human-computer interaction, kinesiology, or keyboard-ology. Please send comments/issues/pull requests/angry tweets/etc. If you think there is a better way to take advantage of the ErgoDox/QMK comination without straying far from 84/101-key QWERTY, I want to know it. - -### Issues -1. The `CSYM` layer is an ugly workaround. I should write a function for doing different things in the `SYMB` layer depending on whether SHIFT is being held. Or something. Ideas? -1. Right now, the thumb cluster function keys double as slash and whack... this really isnt a great solution. -1. `MENU` and `LEAD` are useless, at the moment. - -## License -QMK is licensed ([mostly](https://github.com/qmk/qmk_firmware/issues/1038)) under the [GPLv2](../../../../license_GPLv2.md). Accordingly, to whatever extent applicable, this keymap is licensed under the [GPLv3](../../../../license_GPLv3.md). diff --git a/layouts/community/ergodox/familiar/keymap.c b/layouts/community/ergodox/familiar/keymap.c deleted file mode 100644 index bc513c0cc43c..000000000000 --- a/layouts/community/ergodox/familiar/keymap.c +++ /dev/null @@ -1,285 +0,0 @@ -#include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" -#include "version.h" - -// Layers -#define BASE 0 // default layer -#define SYMB 1 // international symbols -#define CSYM 2 // international symbols shifted -#define NUMP 3 // numpad -#define ARRW 4 // function, media, arrow keys - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -// Tap Dancing -void dance_lock (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { // Press once for NUMLOCK - register_code (KC_NLCK); - unregister_code (KC_NLCK); - } else if (state->count == 2) { // Press twice for CAPSLOCK - register_code (KC_CAPS); - unregister_code (KC_CAPS); - } else if (state->count == 3) { //Press thrice for SCROLLLOCK - register_code (KC_SLCK); - unregister_code (KC_SLCK); - } -} -enum {LOCKS = 0}; -qk_tap_dance_action_t tap_dance_actions[] = { - [LOCKS] = ACTION_TAP_DANCE_FN(dance_lock) -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -/* layer 0 : default - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | BCKSPC | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | TAB | Q | W | E | R | T | HOME | | PGUP | Y | U | I | O | P | DELETE | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | ' | A | S | D | F | G |------| |------| H | J | K | L | ; | ENTER | - * |--------+------+------+------+------+------| END | | PGDN |------+------+------+------+------+--------| - * | (/LSFT | Z | X | C | V | B | | | | N | M | , | . | UP | )/RSFT | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LCTRL | LGUI | MENU | LEAD | LALT | |[/RALT|]/RCTL| LEFT | DOWN | RIGHT | - * `------------------------------------' `------------------------------------' - * ,-------------. ,-------------. - * |PRTSCR| ESC | | VOL- | VOL+ | - * ,------|------|------| |------+------+------. - * | |SLASH/| LOCKS| | MUTE |WHACK/| | - * | SPC | MO(4)|------| |------|MO(4) | SPC | - * | | | TO(1)| |TO(3) | | | - * `--------------------' `--------------------' - */ -[BASE] = LAYOUT_ergodox( - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, - KC_QUOT, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, - KC_LCTL, KC_LGUI, KC_MENU, KC_LEAD, KC_LALT, - KC_PSCR, KC_ESC, - TD(LOCKS), - KC_SPC, LT(ARRW, KC_SLSH), TG(SYMB), - // right hand - KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, - KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENTER, - KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSPC, - MT(MOD_RALT, KC_LBRC), MT(MOD_RCTL, KC_RBRC), KC_LEFT, KC_DOWN, KC_RGHT, - KC_VOLD, KC_VOLU, - KC_MUTE, - TG(NUMP), LT(ARRW, KC_BSLS), KC_SPC - ), - -/* layer 1: International symbols, etc - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | ¡ | ² | ³ | ¤ | € | ¼ | | ½ | ¾ | ‘ | ’ | ¥ | × | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ä | å | é | ® | þ | | | | ü | ú | í | ó | ö | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | ´ | á | ß | ð | | |------| |------| | | | ø | ¶ | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * |MO(CSYM)| æ | ¿ | © | ¬ | | | | | ñ | µ | ç | | |MO(CSYM)| - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | « | » | | | | - * `------------------------------------' `------------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[SYMB] = LAYOUT_ergodox( - // left hand - _______, UC(0x00A1), UC(0x00B2), UC(0x00B3), UC(0x00A4), UC(0x20AC), UC(0x00BC), - _______, UC(0x00E4), UC(0x00E5), UC(0x00E9), UC(0x00AE), UC(0x00FE), _______, - UC(0x00B4), UC(0x00E1), UC(0x00DF), UC(0x00F0), _______, _______, - MO(CSYM), UC(0x00E6), UC(0x00BF), _______, UC(0x00AC), UC(0x00A9), _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______, _______, _______, - // right hand - UC(0x00BD), UC(0x00BE), UC(0x2018), UC(0x2019), UC(0x00A5), UC(0x00D7), _______, - _______, UC(0x00FC), UC(0x00FA), UC(0x00ED), UC(0x00F3), UC(0x00F6), _______, - _______, _______, _______, UC(0x00F8), UC(0x00B6), _______, - _______, UC(0x00F1), UC(0x00B5), UC(0x00E7), _______, _______, MO(CSYM), - UC(0x00AB), UC(0x00BB), _______, _______, _______, - _______, _______, - _______, - _______, _______, _______ - ), - -/* layer 2 : international symbols, shifted - * This layer is an ugly workaround; it pretends that SHIFT still works normally on keys - * which don't produce an "upper case" or "shifted" international symobol. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | ¹ | | | £ | | | | | | | | — | ÷ | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | Ä | Å | É | | Þ | | | | Ü | Ú | Í | Ó | Ö | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | ¨ | Á | § | Ð | | |------| |------| | | | Ø | ° | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | Æ | | ¢ | ¦ | | | | | Ñ | | Ç | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | “ | ” | | | | - * `------------------------------------' `------------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[CSYM] = LAYOUT_ergodox( - // left hand - _______, UC(0x00B9), _______, _______, UC(0x00A3), _______, _______, - _______, UC(0x00C4), UC(0x00C5), UC(0x00C9), S(KC_R), UC(0x00DE), _______, - UC(0x00A8), UC(0x00C1), UC(0x00A7), UC(0x00D0), S(KC_F), S(KC_G), - _______, UC(0x00C6), UC(0x00A6), UC(0x00A2), S(KC_V), S(KC_B), _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______, _______, _______, - // right hand - _______, _______, _______, _______, UC(0x2014), UC(0x00F7), _______, - _______, UC(0x00DC), UC(0x00DA), UC(0x00CD), UC(0x00D3), UC(0x00D6), _______, - S(KC_H), S(KC_J), S(KC_K), UC(0x00D8), UC(0x00B0), _______, - _______, UC(0x00D1), _______, UC(0x00C7), S(KC_DOT), _______, _______, - UC(0x201C), UC(0x201D), _______, _______, _______, - _______, _______, - _______, - _______, _______, _______ - ), - -/* layer 3: numberpad - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | ( | ) | / | * | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | 7 | 8 | 9 | - | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | 4 | 5 | 6 | + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | 1 | 2 | 3 | = | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | |0/RALT|./RCTL| , | ENTER| | - * `------------------------------------' `------------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[NUMP] = LAYOUT_ergodox( - // left hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, - _______, _______, - _______, - _______, _______, _______, - // right hand - _______, _______, S(KC_9), S(KC_0), KC_PSLS, KC_PAST, _______, - _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, - _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, - _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PEQL, _______, - MT(MOD_RALT, KC_KP_0), MT(MOD_RCTL, KC_KP_DOT),KC_PCMM, KC_PENT, _______, - _______, _______, - _______, - _______, _______, _______ - ), - -/* layer 4 : functions and arrows - * This layer is at the top so that the functions still work no matter what layers are active. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ESCAPE | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | UP | | | | | | | | | | | INSERT | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | LEFT | DOWN |RIGHT | |------| |------| LEFT | DOWN | UP | RIGHT| | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | |M_PREV|M_STOP|M_PLPS|M_NEXT| | | | | | | | | PGUP | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | HOME | PGDN | END | - * `------------------------------------' `------------------------------------' - * ,-------------. ,-------------. - * | SYSRQ| PAUSE| | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[ARRW] = LAYOUT_ergodox( - // left hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - _______, _______, _______, KC_UP, _______, _______, _______, - _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, - _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, _______, - _______, _______, _______, _______, _______, - KC_SYSREQ, KC_PAUSE, - _______, - _______, _______, _______, - // right hand - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, - _______, _______, _______, _______, _______, _______, KC_INS, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, - _______, _______, _______, _______, _______, KC_PGUP, _______, - _______, _______, KC_HOME, KC_PGDN, KC_END, - _______, _______, - _______, - _______, _______, _______ - ), -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - set_unicode_input_mode(UC_LNX); // Linux - //set_unicode_input_mode(UC_OSX); // Mac OSX - //set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) - //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (layer) { - case SYMB: - case CSYM: - ergodox_right_led_1_on(); - break; - case NUMP: - ergodox_right_led_2_on(); - break; - case ARRW: - ergodox_right_led_3_on(); - break; - default: - // none - break; - } - -}; diff --git a/layouts/community/ergodox/french_hacker/keymap.c b/layouts/community/ergodox/french_hacker/keymap.c index 30bf56608d5b..731d917fd924 100644 --- a/layouts/community/ergodox/french_hacker/keymap.c +++ b/layouts/community/ergodox/french_hacker/keymap.c @@ -199,10 +199,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/galson/keymap.c b/layouts/community/ergodox/galson/keymap.c index e34500551805..2b7994b11d9b 100644 --- a/layouts/community/ergodox/galson/keymap.c +++ b/layouts/community/ergodox/galson/keymap.c @@ -136,10 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/german-kinergo/keymap.c b/layouts/community/ergodox/german-kinergo/keymap.c index d8da953e0e90..7e1e5bf82b79 100644 --- a/layouts/community/ergodox/german-kinergo/keymap.c +++ b/layouts/community/ergodox/german-kinergo/keymap.c @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // TG(2), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, // KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE), // MEH_T(KC_NO),KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(DE_MINS), KC_RSFT, -// KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_FN1, +// KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TT(SYMB), // KC_LALT,CTL_T(KC_ESC), // KC_PGUP, // KC_PGDN,KC_TAB, KC_ENT @@ -162,10 +162,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/german-lukas/keymap.c b/layouts/community/ergodox/german-lukas/keymap.c index 2ad909b6c83f..e0cdf25c6e73 100644 --- a/layouts/community/ergodox/german-lukas/keymap.c +++ b/layouts/community/ergodox/german-lukas/keymap.c @@ -185,10 +185,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/german/keymap.c b/layouts/community/ergodox/german/keymap.c index 67d01fd337a4..a379b24ca38e 100644 --- a/layouts/community/ergodox/german/keymap.c +++ b/layouts/community/ergodox/german/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(2), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE), MEH_T(KC_NO),KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(DE_MINS), KC_RSFT, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_FN1, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TT(SYMB), KC_LALT,CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -137,10 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/haegin/keymap.c b/layouts/community/ergodox/haegin/keymap.c index aa017c8ea53b..b7e382957f83 100644 --- a/layouts/community/ergodox/haegin/keymap.c +++ b/layouts/community/ergodox/haegin/keymap.c @@ -9,8 +9,6 @@ #define SYMBOLS 1 // symbols #define MEDIA 2 // media keys -#define _______ KC_TRNS - enum { TD_BSPC = 0 }; @@ -225,10 +223,6 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD_BSPC] = ACTION_TAP_DANCE_FN_ADVANCED (dance_backspace, dance_backspace_ended, dance_backspace_reset) }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMBOLS) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/italian/keymap.c b/layouts/community/ergodox/italian/keymap.c index 366f4c9b9863..64dd51db67c9 100644 --- a/layouts/community/ergodox/italian/keymap.c +++ b/layouts/community/ergodox/italian/keymap.c @@ -143,10 +143,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/j3rn/keymap.c b/layouts/community/ergodox/j3rn/keymap.c index 7f62a164697b..8209c9c63e82 100644 --- a/layouts/community/ergodox/j3rn/keymap.c +++ b/layouts/community/ergodox/j3rn/keymap.c @@ -138,11 +138,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Layer 1 (Symbols) - [2] = ACTION_LAYER_TAP_TOGGLE(MDIA) // FN2 - Momentary Layer 2 (Media) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/jackhumbert/keymap.c b/layouts/community/ergodox/jackhumbert/keymap.c index 634e4a0ceea4..745d632d0227 100644 --- a/layouts/community/ergodox/jackhumbert/keymap.c +++ b/layouts/community/ergodox/jackhumbert/keymap.c @@ -69,10 +69,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/jacobono/keymap.c b/layouts/community/ergodox/jacobono/keymap.c index c0a1c0cdb885..8d80e349ba8f 100644 --- a/layouts/community/ergodox/jacobono/keymap.c +++ b/layouts/community/ergodox/jacobono/keymap.c @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_RCTRL, KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - MO(SYMB), KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + MO(SYMB), KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_RGUI, KC_ENT), @@ -224,10 +224,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_WBAK), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/jafo/keymap.c b/layouts/community/ergodox/jafo/keymap.c index 081f18894fbc..08ea16d4bbee 100644 --- a/layouts/community/ergodox/jafo/keymap.c +++ b/layouts/community/ergodox/jafo/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), TG(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -136,10 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/jgarr/keymap.c b/layouts/community/ergodox/jgarr/keymap.c index 359b2e1acf03..37524dfa0860 100644 --- a/layouts/community/ergodox/jgarr/keymap.c +++ b/layouts/community/ergodox/jgarr/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_D, KC_H, KC_T, KC_N, LT(MDIA, KC_S), KC_MINS, MEH_T(KC_NO),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_EQL, - KC_LALT, KC_FN1, + KC_LALT, TT(SYMB), KC_PGUP, KC_PGDN,KC_ENT, KC_SPC ), @@ -135,10 +135,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/josh/keymap.c b/layouts/community/ergodox/josh/keymap.c index 5121fabdb002..07ee97ec8212 100644 --- a/layouts/community/ergodox/josh/keymap.c +++ b/layouts/community/ergodox/josh/keymap.c @@ -143,10 +143,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/kines-ish/keymap.c b/layouts/community/ergodox/kines-ish/keymap.c index da39b5278b11..6f0d99d8db01 100644 --- a/layouts/community/ergodox/kines-ish/keymap.c +++ b/layouts/community/ergodox/kines-ish/keymap.c @@ -135,10 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/kristian/keymap.c b/layouts/community/ergodox/kristian/keymap.c index aeb3112de87c..b56e880c0e2b 100644 --- a/layouts/community/ergodox/kristian/keymap.c +++ b/layouts/community/ergodox/kristian/keymap.c @@ -21,10 +21,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(1) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/layouts/community/ergodox/maz/keymap.c b/layouts/community/ergodox/maz/keymap.c index ad425a726c59..c36821ded24b 100644 --- a/layouts/community/ergodox/maz/keymap.c +++ b/layouts/community/ergodox/maz/keymap.c @@ -180,10 +180,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/mclennon_osx/keymap.c b/layouts/community/ergodox/mclennon_osx/keymap.c index dd37c5eef73b..aeea456ecab5 100644 --- a/layouts/community/ergodox/mclennon_osx/keymap.c +++ b/layouts/community/ergodox/mclennon_osx/keymap.c @@ -95,10 +95,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(AUXI) // FN1 - Momentary Layer 1 (Auxiliary) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/meagerfindings/keymap.c b/layouts/community/ergodox/meagerfindings/keymap.c index 62504f9667a3..f4340b8e1b45 100644 --- a/layouts/community/ergodox/meagerfindings/keymap.c +++ b/layouts/community/ergodox/meagerfindings/keymap.c @@ -42,7 +42,6 @@ enum custom_keycodes { }; //Redefine Key Names for Readaibilty -#define XXXXXXX KC_NO #define SCRN_CLIPB LCTL(LGUI(LSFT(KC_4))) #define CHRM_L LALT(LGUI(KC_LEFT)) //Move left one tab in Chrome #define CHRM_R LALT(LGUI(KC_RIGHT)) //Move right one tab in Chrome diff --git a/layouts/community/ergodox/msc/keymap.c b/layouts/community/ergodox/msc/keymap.c index 52962634193e..c64c92c9c848 100644 --- a/layouts/community/ergodox/msc/keymap.c +++ b/layouts/community/ergodox/msc/keymap.c @@ -135,10 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/naps62/keymap.c b/layouts/community/ergodox/naps62/keymap.c index 481b0dd765fa..a242a14fe943 100644 --- a/layouts/community/ergodox/naps62/keymap.c +++ b/layouts/community/ergodox/naps62/keymap.c @@ -138,10 +138,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/nstickney/keymap.c b/layouts/community/ergodox/nstickney/keymap.c new file mode 100644 index 000000000000..dc83c2f4d783 --- /dev/null +++ b/layouts/community/ergodox/nstickney/keymap.c @@ -0,0 +1,213 @@ +#include QMK_KEYBOARD_H + +/* + * This keymap simulates the key limitations of an Iris on an ErgoDox. See the + * matching iris layout (/keyboards/iris/keymaps/nstickney) for further + * information. + */ + +// Layers +#define BASE 0 // Base layer +#define SYMB 1 // Symbols +#define SYSH 2 // Symbols, shifted +#define NUMP 4 // Numpad +#define FCTN 8 // Function + +// Tap Dancing +void dance_lock (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count){ + case 1: // Press once for LGUI + tap_code(KC_LGUI); + break; + case 2: // Press twice for NUMLOCK + tap_code(KC_NLCK); + break; + case 3: // Press thrice for CAPSLOCK + tap_code(KC_CAPS); + break; + case 4: // Press four times for SCROLLOCK + tap_code(KC_SLCK); + break; + default: + break; + } +}; + +void dance_layer (qk_tap_dance_state_t *state, void *user_data) { + switch (state -> count) { + case 1: // Press once for MENU + tap_code(KC_APP); + break; + case 2: // Press twice for NUMPAD + layer_invert(NUMP); + break; + case 3: // Press thrice for SYMBOLS + layer_invert(SYMB); + break; + case 4: // Press four times for SYMBOLS, SHIFTED + layer_invert(SYSH); + break; + default: + break; + } +}; + +enum tap_dances {LOCKS = 0, LAYERS = 1}; +qk_tap_dance_action_t tap_dance_actions[] = { + [LOCKS] = ACTION_TAP_DANCE_FN(dance_lock), + [LAYERS] = ACTION_TAP_DANCE_FN(dance_layer) +}; + +// Make layering more clear +enum custom_keycodes { + __________ = KC_TRNS, + XXX = KC_NO, + CC_ESC = LCTL_T(KC_ESC), + CC_QUOT = RCTL_T(KC_QUOT), + AC_SLSH = LALT_T(KC_SLSH), + AC_EQL = RALT_T(KC_EQL), + FC_BSLS = LT(FCTN, KC_BSLS), + FC_MINS = LT(FCTN, KC_MINS), +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, XXX, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, XXX, + CC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, XXX, + XXX, XXX, XXX, XXX, AC_SLSH, + TD(LOCKS), XXX, + XXX, + FC_BSLS, KC_SPC, XXX, + // right hand + XXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + XXX, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, CC_QUOT, + XXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + AC_EQL, XXX, XXX, XXX, XXX, + XXX, TD(LAYERS), + XXX, + XXX, KC_ENT, FC_MINS + ), + + [SYMB] = LAYOUT_ergodox( + // left hand + UC(0x00EF), UC(0x00A1), UC(0x00B2), UC(0x00B3), UC(0x00A4), UC(0x20AC), __________, + __________, UC(0x00E4), UC(0x00E5), UC(0x00E9), UC(0x00AE), UC(0x00FE), __________, + __________, UC(0x00E1), UC(0x00DF), UC(0x00F0), UC(0x00EC), UC(0x00ED), + __________, UC(0x00E6), UC(0x00E8), UC(0x00A9), UC(0x00EA), UC(0x00EB), __________, + __________, __________, __________, __________, UC(0x00BF), + __________, __________, + __________, + UC(0x00AC), __________, __________, + // right hand + __________, UC(0x00BC), UC(0x00BD), UC(0x00BE), UC(0x2018), UC(0x2019), __________, + __________, UC(0x00FC), UC(0x00FA), UC(0x00ED), UC(0x00F3), UC(0x00F6), __________, + UC(0x00EE), UC(0x00E0), UC(0x00E2), UC(0x00F8), UC(0x00B6), UC(0x00B4), + __________, UC(0x00F1), UC(0x00FD), UC(0x00E7), UC(0x00F4), UC(0x00BF), __________, + UC(0x00D7), __________, __________, __________, __________, + __________, __________, + __________, + __________, __________, UC(0x00B1) + ), + + [SYSH] = LAYOUT_ergodox( + // left hand + UC(0x00CF), UC(0x00B9), UC(0x2200), UC(0x2201), UC(0x00A3), UC(0x00A5), __________, + __________, UC(0x00C4), UC(0x00C5), UC(0x00C9), UC(0x2122), UC(0x00DE), __________, + __________, UC(0x00C1), UC(0x00A7), UC(0x00D0), UC(0x00CC), UC(0x00CD), + __________, UC(0x00C6), UC(0x00C8), UC(0x00A2), UC(0x00CA), UC(0x00CB), __________, + __________, __________, __________, __________, UC(0x203D), + __________, __________, + __________, + UC(0x00A6), __________, __________, + // right hand + __________, UC(0x00B5), UC(0x00AB), UC(0x00BB), UC(0x201C), UC(0x201D), __________, + __________, UC(0x00DC), UC(0x00DA), UC(0x00CD), UC(0x00D3), UC(0x00D6), __________, + UC(0x00CE), UC(0x00C1), UC(0x00C2), UC(0x00D8), UC(0x00B0), UC(0x00A8), + __________, UC(0x00D1), UC(0x00DD), UC(0x00C7), UC(0x00D4), UC(0x203D), __________, + UC(0x00F7), __________, __________, __________, __________, + __________, __________, + __________, + __________, __________, UC(0x00AA) + ), + + [NUMP] = LAYOUT_ergodox( + // left hand + __________, __________, KC_P7, KC_P8, KC_P9, KC_PSLS, __________, + __________, __________, KC_P4, KC_P5, KC_P6, KC_PAST, __________, + __________, __________, KC_P1, KC_P2, KC_P3, KC_PMNS, + __________, __________, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, __________, + __________, __________, __________, __________, __________, + __________, __________, + __________, + __________, __________, __________, + // right hand + __________, __________, KC_P7, KC_P8, KC_P9, KC_PSLS, __________, + __________, __________, KC_P4, KC_P5, KC_P6, KC_PAST, __________, + __________, KC_P1, KC_P2, KC_P3, KC_PMNS, __________, + __________, __________, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, __________, + __________, __________, __________, __________, __________, + __________, __________, + __________, + __________, KC_PENT, __________ + ), + + [FCTN] = LAYOUT_ergodox( + // left hand + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, __________, + KC_PSCR, RGB_TOG, KC_HOME, KC_UP, KC_END, KC_PGUP, __________, + KC_PAUS, __________, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + __________, KC_MPRV, KC_MRWD, KC_MPLY, KC_MFFD, KC_MNXT, __________, + __________, __________, __________, __________, __________, + KC_F11, __________, + __________, + __________, __________, __________, + // right hand + __________, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_SYSREQ, + __________, UC(0x2014), KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), KC_INS, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BRIU, KC_CLR, + __________, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, __________, + __________, __________, __________, __________, __________, + __________, KC_F12, + __________, + __________, __________, __________ + ), +}; + +void eeconfig_init_user(void) { + set_unicode_input_mode(UC_LNX); // Linux + //set_unicode_input_mode(UC_OSX); // Mac OSX + //set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) + //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + ergodox_board_led_off(); +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + if (IS_LAYER_ON(SYMB) || IS_LAYER_ON(SYSH)) { + ergodox_right_led_1_on(); + } else { + ergodox_right_led_1_off(); + } + + if (IS_LAYER_ON(NUMP)) { + ergodox_right_led_2_on(); + } else { + ergodox_right_led_2_off(); + } + + if (IS_LAYER_ON(FCTN)) { + ergodox_right_led_3_on(); + } else { + ergodox_right_led_3_off(); + } + +}; diff --git a/layouts/community/ergodox/familiar/rules.mk b/layouts/community/ergodox/nstickney/rules.mk similarity index 100% rename from layouts/community/ergodox/familiar/rules.mk rename to layouts/community/ergodox/nstickney/rules.mk diff --git a/layouts/community/ergodox/osx_de/readme.md b/layouts/community/ergodox/osx_de/readme.md index 5011a9dd62ed..e4ccee3aa6b9 100644 --- a/layouts/community/ergodox/osx_de/readme.md +++ b/layouts/community/ergodox/osx_de/readme.md @@ -1,4 +1,4 @@ -#Ergodox EZ für OSX +# Ergodox EZ für OSX Dies ist nur ein kleiner Tweak der bestehenden firmware für das ErgoDox-EZ-Keyboard. Leider passte das layout nicht wirklich für OSX, deswegen habe ich einige Anpassungen gemacht. Dabei wurden folgende features umgesetzt: @@ -14,7 +14,6 @@ Dies ist nur ein kleiner Tweak der bestehenden firmware für das ErgoDox-EZ-Keyb # Erstellt Mit Dem ErgodoxLayoutGenerator Der ErgodoxLayoutGenerator ist ein kleines Werkzeug, welches die Erstellung und Pflege der eigenen Keymaps erleichtern soll. Es ist in java geschrieben und kann [hier](https://github.com/sboesebeck/ErgodoxLayoutGenerator/releases) heruntergeladen werden. Damit das Tool funktioniert sollte das offizielle Oracle JDK in aktueller Version installiert sein. -Die Dokumentation für den ELG kann man [hier](https://boesebeck.name/2016/04/16/ergodoxlayoutgenerator-documentation/) nachlesen (momentan leider nur in Englisch verfügbar). diff --git a/layouts/community/ergodox/osx_de_experimental/readme.md b/layouts/community/ergodox/osx_de_experimental/readme.md index e6a10184167f..dde28eee415e 100644 --- a/layouts/community/ergodox/osx_de_experimental/readme.md +++ b/layouts/community/ergodox/osx_de_experimental/readme.md @@ -8,7 +8,6 @@ dieses layout ist experimentell und wird im Lufe der Zeit viele Änderungen und # Erstellt Mit Dem ErgodoxLayoutGenerator Der ErgodoxLayoutGenerator (ELG) ist ein kleines Werkzeug, welches die Erstellung und Pflege der eigenen Keymaps erleichtern soll. Es ist in java geschrieben und kann [hier](https://github.com/sboesebeck/ErgodoxLayoutGenerator/releases) heruntergeladen werden. Damit das Tool funktioniert sollte das offizielle Oracle JDK in aktueller Version installiert sein. -Die Dokumentation für den ELG kann man [hier](https://boesebeck.name/2016/04/16/ergodoxlayoutgenerator-documentation/) nachlesen (momentan leider nur in Englisch verfügbar). --------------------------------------------------------------------------------------------------------------------- # Ergodox and Ergodox-EZ experimental layout diff --git a/layouts/community/ergodox/osx_fr/keymap.c b/layouts/community/ergodox/osx_fr/keymap.c index f899b8b0f1b4..b1876d6a8edd 100644 --- a/layouts/community/ergodox/osx_fr/keymap.c +++ b/layouts/community/ergodox/osx_fr/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, FR_GRV, KC_H, KC_J, KC_K, KC_L, FR_M, KC_LGUI, MEH_T(KC_NO), KC_N, FR_COMM, LT(MDIA, FR_SCLN), FR_COLN, CTL_T(FR_EQL), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_TAB, KC_ENT @@ -138,10 +138,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/osx_kinesis_pnut/keymap.c b/layouts/community/ergodox/osx_kinesis_pnut/keymap.c index 59ffe4f3ff0f..5b731a1c006c 100644 --- a/layouts/community/ergodox/osx_kinesis_pnut/keymap.c +++ b/layouts/community/ergodox/osx_kinesis_pnut/keymap.c @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_QUOTE, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), CTL_T(KC_ESC), KC_LGUI, KC_EQL, KC_TAB, KC_ENT, KC_SPC @@ -142,10 +142,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/osx_neo2/keymap.c b/layouts/community/ergodox/osx_neo2/keymap.c new file mode 100644 index 000000000000..9e379c73f5a4 --- /dev/null +++ b/layouts/community/ergodox/osx_neo2/keymap.c @@ -0,0 +1,694 @@ +#include QMK_KEYBOARD_H +#include "layers.h" +#include "version.h" + +// Timer to detect tap/hold on NEO_RMOD3 key +static uint16_t neo3_timer; +// State bitmap to track which key(s) enabled NEO_3 layer +static uint8_t neo3_state = 0; +// State bitmap to track key combo for CAPSLOCK +static uint8_t capslock_state = 0; + +// bitmasks for modifier keys +#define MOD_MASK_NONE 0 + +// Used to trigger macros / sequences of keypresses +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + US_OSX_SMALL_UE, + US_OSX_SMALL_AE, + US_OSX_SMALL_OE, + US_OSX_CAPITAL_UE, + US_OSX_CAPITAL_AE, + US_OSX_CAPITAL_OE, + NEO2_LMOD3, + NEO2_RMOD3, + NEO2_1, + NEO2_2, + NEO2_3, + NEO2_4, + NEO2_5, + NEO2_6, + NEO2_7, + NEO2_8, + NEO2_9, + NEO2_0, + NEO2_MINUS, + NEO2_UE, + NEO2_AE, + NEO2_OE, + NEO2_COMMA, + NEO2_DOT, + NEO2_SHARP_S +}; + +#define NEO2_LMOD4 TT(NEO_4) +#define NEO2_RMOD4 NEO2_LMOD4 + +// NEO_3 special characters +#define US_OSX_SUPERSCRIPT_1 KC_NO // ¹ +#define US_OSX_SUPERSCRIPT_2 KC_NO // ² +#define US_OSX_SUPERSCRIPT_3 KC_NO // ³ +#define US_OSX_RSAQUO LALT(LSFT(KC_4)) // › +#define US_OSX_LSAQUO LALT(LSFT(KC_3)) // ‹ +#define US_OSX_CENT LALT(KC_4) // ¢ +#define US_OSX_YEN LALT(KC_Y) // ¥ +#define US_OSX_SBQUO LALT(LSFT(KC_0)) // ‚ +#define US_OSX_LEFT_SINGLE_QUOTE LALT(KC_RBRACKET) // ‘ +#define US_OSX_RIGHT_SINGLE_QUOTE LALT(LSFT(KC_RBRACKET)) // ’ +#define US_OSX_ELLIPSIS LALT(KC_SCOLON) // … +#define US_OSX_UNDERSCORE LSFT(KC_MINUS) // _ +#define US_OSX_LBRACKET KC_LBRACKET // [ +#define US_OSX_RBRACKET KC_RBRACKET // ] +#define US_OSX_CIRCUMFLEX LSFT(KC_6) // ^ +#define US_OSX_EXCLAMATION LSFT(KC_1) // ! +#define US_OSX_LESSTHAN LSFT(KC_COMMA) // < +#define US_OSX_GREATERTHAN LSFT(KC_DOT) // > +#define US_OSX_EQUAL KC_EQUAL // = +#define US_OSX_AMPERSAND LSFT(KC_7) // & +#define US_OSX_SMALL_LONG_S KC_NO // ſ +#define US_OSX_BSLASH KC_BSLASH +#define US_OSX_SLASH KC_SLASH // / +#define US_OSX_CLBRACKET LSFT(KC_LBRACKET) // { +#define US_OSX_CRBRACKET LSFT(KC_RBRACKET) // } +#define US_OSX_ASTERISK LSFT(KC_8) // * +#define US_OSX_QUESTIONMARK LSFT(KC_SLASH) // ? +#define US_OSX_LPARENTHESES LSFT(KC_9) // ( +#define US_OSX_RPARENTHESES LSFT(KC_0) // ) +#define US_OSX_HYPHEN_MINUS KC_MINUS // - +#define US_OSX_COLON LSFT(KC_SCOLON) // : +#define US_OSX_AT LSFT(KC_2) // @ +#define US_OSX_HASH LSFT(KC_3) // # +#define US_OSX_PIPE LSFT(KC_BSLASH) // | +#define US_OSX_TILDE LSFT(KC_GRAVE) // ~ +#define US_OSX_BACKTICK KC_GRAVE // ` +#define US_OSX_PLUS LSFT(KC_EQUAL) // + +#define US_OSX_PERCENT LSFT(KC_5) // % +#define US_OSX_DOUBLE_QUOTE LSFT(KC_QUOTE) // " +#define US_OSX_SINGLE_QUOTE KC_QUOTE // ' +#define US_OSX_SEMICOLON KC_SCOLON // ; + +// NEO_4 special characters +#define US_OSX_FEMININE_ORDINAL LALT(KC_9) // ª +#define US_OSX_MASCULINE_ORDINAL LALT(KC_0) // º +#define US_OSX_NUMERO_SIGN KC_NO // № +#define US_OSX_MIDDLE_DOT LALT(LSFT(KC_9)) // · +#define US_OSX_BRITISH_POUND LALT(KC_3) // £ +#define US_OSX_CURRENCY_SIGN KC_NO // ¤ +#define US_OSX_INV_EXCLAMATION LALT(KC_1) // ¡ +#define US_OSX_INV_QUESTIONMARK LALT(LSFT(KC_SLASH)) // ¿ +#define US_OSX_DOLLAR KC_DOLLAR // $ +#define US_OSX_EM_DASH LALT(LSFT(KC_MINUS)) // — + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* NEO_1: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ---- | 1/° | 2/§ | 3/ | 4/» | 5/« | ESC | | US_1 | 6/$ | 7/€ | 8/„ | 9/“ | 0/” | -/— | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | X | V | L | C | W | LCTL | | RCTL | K | H | G | F | Q | ß | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | NEO_3 | U | I | A | E | O |------| |------| S | N | R | T | D | Y | + * |--------+------+------+------+------+------| LALT | | RALT |------+------+------+------+------+--------| + * | LSHIFT | Ü | Ö | Ä | P | Z | | | | B | M | ,/– | ./• | J | RSHIFT | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | ---- | ---- | LCTL | LALT | LGUI | | RGUI | Left | Down | Up | Right| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | FKEYS| Home | | PgUp | FKEYS| + * ,------|------|------| |------+------+------. + * | Back-| | End | | PgDn | | | + * | space|Delete|------| |------| Enter|Space | + * | | | NEO_4| | NEO_4| | | + * `--------------------' `--------------------' + */ + [NEO_1] = LAYOUT_ergodox( + // left hand side - main + KC_NO /* NOOP */, NEO2_1, NEO2_2, NEO2_3, NEO2_4, NEO2_5, KC_ESCAPE, + KC_TAB, KC_X, KC_V, KC_L, KC_C, KC_W, KC_LCTRL, + NEO2_LMOD3, KC_U, KC_I, KC_A, KC_E, KC_O, /* --- */ + KC_LSHIFT, NEO2_UE, NEO2_OE, NEO2_AE, KC_P, KC_Z, KC_LALT, + KC_NO /* NOOP */, KC_NO /* NOOP */, KC_LCTRL, KC_LALT, KC_LGUI, /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ MO(FKEYS), KC_HOME, + /* KC_BSPACE */ /* KC_DELETE */ KC_END, + KC_BSPACE, KC_DELETE, NEO2_LMOD4, + + // right hand side - main + TO(US_1), NEO2_6, NEO2_7, NEO2_8, NEO2_9, NEO2_0, NEO2_MINUS, + KC_RCTRL, KC_K, KC_H, KC_G, KC_F, KC_Q, NEO2_SHARP_S, + /* --- */ KC_S, KC_N, KC_R, KC_T, KC_D, NEO2_RMOD3, + KC_RALT, KC_B, KC_M, NEO2_COMMA, NEO2_DOT, KC_J, KC_RSHIFT, + /* --- */ /* --- */ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, + + // right hand side - thumb cluster + KC_PGUP, MO(FKEYS), /* --- */ + KC_PGDOWN, /* --- */ /* --- */ + NEO2_RMOD4, KC_ENTER, KC_SPACE + ), + + /* NEO_3: Symbol layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ---- | ---- | ---- | ---- | › | ‹ | | | | ¢ | ¥ | ‚ | ‘ | ’ | ---- | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ---- | … | _ | [ | ] | ^ | | | | ! | < | > | = | & | ---- | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | \ | / | { | } | * |------| |------| ? | ( | ) | - | : | @ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | | | ~ | ` | | | | + | % | " | ' | ; | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [NEO_3] = LAYOUT_ergodox( + // left hand side - main + KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, US_OSX_RSAQUO, US_OSX_LSAQUO, _______, + KC_NO /* NOOP */, US_OSX_ELLIPSIS, US_OSX_UNDERSCORE, US_OSX_LBRACKET, US_OSX_RBRACKET, US_OSX_CIRCUMFLEX, _______, + _______, US_OSX_BSLASH, US_OSX_SLASH, US_OSX_CLBRACKET, US_OSX_CRBRACKET, US_OSX_ASTERISK, /* --- */ + _______, US_OSX_HASH, US_OSX_DOLLAR, US_OSX_PIPE, US_OSX_TILDE, US_OSX_BACKTICK, _______, + _______, _______, _______, _______, _______, /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ _______, _______, + /* --- */ /* --- */ _______, + _______, _______, _______, + + // right hand side - main + _______, US_OSX_CENT, US_OSX_YEN, US_OSX_SBQUO, US_OSX_LEFT_SINGLE_QUOTE, US_OSX_RIGHT_SINGLE_QUOTE, KC_NO, + _______, US_OSX_EXCLAMATION, US_OSX_LESSTHAN, US_OSX_GREATERTHAN, US_OSX_EQUAL, US_OSX_AMPERSAND, US_OSX_SMALL_LONG_S, + /* --- */ US_OSX_QUESTIONMARK, US_OSX_LPARENTHESES, US_OSX_RPARENTHESES, US_OSX_HYPHEN_MINUS, US_OSX_COLON, NEO2_RMOD3, + _______, US_OSX_PLUS, US_OSX_PERCENT, US_OSX_DOUBLE_QUOTE, US_OSX_SINGLE_QUOTE, US_OSX_SEMICOLON, _______, + /* --- */ /* --- */ _______, _______, _______, _______, _______, + + // right hand side - thumb cluster + _______, _______, /* --- */ + _______, /* --- */ /* --- */ + _______, _______, _______ + ), + + /* NEO_4: Cursor & Numpad + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ---- | ª | º | ---- | · | £ | | | | ---- | Tab | / | * | - | ---- | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ---- | PgUp | ⌫ | Up | ⌦ | PgDn | | | | ¡ | 7 | 8 | 9 | + | – | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Home | Left | Down | Right| End |------| |------| ¿ | 4 | 5 | 6 | , | . | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Esc | Tab | Ins |Return| ---- | | | | : | 1 | 2 | 3 | ; | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | 0 | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [NEO_4] = LAYOUT_ergodox( + // left hand side - main + KC_NO /* NOOP */, US_OSX_FEMININE_ORDINAL, US_OSX_MASCULINE_ORDINAL, KC_NO /* NOOP */, US_OSX_MIDDLE_DOT, US_OSX_BRITISH_POUND, _______, + _______, KC_PGUP, KC_BSPACE, KC_UP, KC_DELETE, KC_PGDOWN, _______, + _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, /* --- */ + _______, KC_ESCAPE, KC_TAB, KC_INSERT, KC_ENTER, KC_NO /* NOOP */, _______, + _______, _______, _______, _______, _______, /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ _______, _______, + /* --- */ /* --- */ _______, + _______, _______, _______, + + // right hand side - main + _______, US_OSX_CURRENCY_SIGN, KC_TAB, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_NO /* NOOP */, + _______, US_OSX_INV_EXCLAMATION, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, US_OSX_EM_DASH, + /* --- */ US_OSX_INV_QUESTIONMARK, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_COMMA, KC_KP_DOT, + _______, US_OSX_COLON, KC_KP_1, KC_KP_2, KC_KP_3, US_OSX_SEMICOLON, _______, + /* --- */ /* --- */ _______, KC_KP_0, _______, _______, _______, + + // right hand side - thumb cluster + _______, _______, /* --- */ + _______, /* --- */ /* --- */ + _______, _______, _______ + ), + + /* NEO_5: Greek + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ---- | ----| ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ---- | ----| ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [NEO_5] = LAYOUT_ergodox( + // left hand side - main + KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, /* --- */ + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + _______, _______, _______, _______, _______, /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ _______, _______, + /* --- */ /* --- */ _______, + _______, _______, _______, + + // right hand side - main + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, + /* --- */ KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + /* --- */ /* --- */ _______, _______, _______, _______, _______, + + // right hand side - thumb cluster + _______, _______, /* --- */ + _______, /* --- */ /* --- */ + _______, _______, _______ + ), + + /* NEO_6: Math symbols + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ---- | ----| ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ---- | ----| ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [NEO_6] = LAYOUT_ergodox( + // left hand side - main + KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, /* --- */ + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + _______, _______, _______, _______, _______, /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ _______, _______, + /* --- */ /* --- */ _______, + _______, _______, _______, + + // right hand side - main + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, + /* --- */ KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, + _______, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, KC_NO /* NOOP */, _______, + /* --- */ /* --- */ _______, _______, _______, _______, _______, + + // right hand side - thumb cluster + _______, _______, /* --- */ + _______, /* --- */ /* --- */ + _______, _______, _______ + ), + + /* US_1: US QWERTY + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | ESC | | NEO_1| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | \ | Q | W | E | R | T | ---- | | [ | Y | U | I | O | P | ] | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TAB | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| ---- | | ---- |------+------+------+------+------+--------| + * | LSHIFT | Z | X | C | V | B | | | | N | M | , | . | / | RSHIFT | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGUI | ` | ---- | ---- | FKEYS| | Left | Down | Up | Right| RGUI | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCTRL| LALT | | RALT | RCTRL| + * ,------|------|------| |------+------+------. + * | | | HOME | | PGUP | | | + * | BKSP | DEL |------| |------| ENTR | SPCE | + * | | | END | | PGDN | | | + * `--------------------' `--------------------' + */ + [US_1] = LAYOUT_ergodox( + // left hand side - main + KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESCAPE, + KC_BSLASH, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO /* NOOP */, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, /* --- */ + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO /* NOOP */, + KC_LGUI, KC_GRAVE, KC_NO, KC_NO, MO(FKEYS), /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ KC_LCTRL, KC_LALT, + /* --- */ /* --- */ KC_HOME, + KC_BSPACE, KC_DELETE, KC_END, + + // right hand side - main + TO(NEO_1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_LBRACKET, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRACKET, + /* --- */ KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, + KC_NO /* NOOP */, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSHIFT, + /* --- */ /* --- */ KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_RGUI, + + // right hand side - thumb cluster + KC_RALT, KC_RCTRL, /* --- */ + KC_PGUP, /* --- */ /* --- */ + KC_PGDOWN, KC_ENTER, KC_SPACE + ), + + /* FKEYS: Function keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Prev | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | VolUp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Play | | | | | | | | | | | | | | VolDn | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Next | | | | | |------| |------| | | | | | Mute | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ + [FKEYS] = LAYOUT_ergodox( + // left hand side - main + KC_MEDIA_REWIND, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + KC_MEDIA_PLAY_PAUSE, _______, _______, _______, _______, _______, _______, + KC_MEDIA_FAST_FORWARD, _______, _______, _______, _______, _______, /* --- */ + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, /* --- */ /* --- */ + + // left hand side - thumb cluster + /* --- */ _______, _______, + /* --- */ /* --- */ _______, + _______, _______, _______, + + // right hand side - main + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_AUDIO_VOL_UP, + _______, _______, _______, _______, _______, _______, KC_AUDIO_VOL_DOWN, + /* --- */ _______, _______, _______, _______, _______, KC_AUDIO_MUTE, + _______, _______, _______, _______, _______, _______, _______, + /* --- */ /* --- */ _______, _______, _______, _______, _______, + + // right hand side - thumb cluster + _______, _______, /* --- */ + _______, /* --- */ /* --- */ + _______, _______, _______ + ), +}; + +// Send a key tap with a optional set of modifiers. +void tap_with_modifiers(uint16_t keycode, uint8_t force_modifiers) { + uint8_t active_modifiers = get_mods(); + + if ((force_modifiers & MOD_MASK_SHIFT) && !(active_modifiers & MOD_MASK_SHIFT)) register_code(KC_LSFT); + if ((force_modifiers & MOD_MASK_CTRL) && !(active_modifiers & MOD_MASK_CTRL)) register_code(KC_LCTRL); + if ((force_modifiers & MOD_MASK_ALT) && !(active_modifiers & MOD_MASK_ALT)) register_code(KC_LALT); + if ((force_modifiers & MOD_MASK_GUI) && !(active_modifiers & MOD_MASK_GUI)) register_code(KC_LGUI); + + register_code(keycode); + unregister_code(keycode); + + if ((force_modifiers & MOD_MASK_SHIFT) && !(active_modifiers & MOD_MASK_SHIFT)) unregister_code(KC_LSFT); + if ((force_modifiers & MOD_MASK_CTRL) && !(active_modifiers & MOD_MASK_CTRL)) unregister_code(KC_LCTRL); + if ((force_modifiers & MOD_MASK_ALT) && !(active_modifiers & MOD_MASK_ALT)) unregister_code(KC_LALT); + if ((force_modifiers & MOD_MASK_GUI) && !(active_modifiers & MOD_MASK_GUI)) unregister_code(KC_LGUI); +} + +// Special remapping for keys with different keycodes/macros when used with shift modifiers. +bool process_record_user_shifted(uint16_t keycode, keyrecord_t *record) { + uint8_t active_modifiers = get_mods(); + uint8_t shifted = active_modifiers & MOD_MASK_SHIFT; + + // Early return on key release + if (!record->event.pressed) { + return true; + } + + if (shifted) { + clear_mods(); + + switch (keycode) { + case NEO2_1: + // degree symbol + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_8) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + break; + case NEO2_2: + // section symbol + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_6) SS_UP(X_LALT)); + break; + case NEO2_3: + // There is no OSX key combination for the script small l character + break; + case NEO2_4: + // right angled quote + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_BSLASH) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + break; + case NEO2_5: + // left angled quote + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_BSLASH) SS_UP(X_LALT)); + break; + case NEO2_6: + // dollar sign + SEND_STRING(SS_DOWN(X_LSHIFT) SS_TAP(X_4) SS_UP(X_LSHIFT)); + break; + case NEO2_7: + // euro sign + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_2) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + break; + case NEO2_8: + // low9 double quote + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_W) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + break; + case NEO2_9: + // left double quote + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_LBRACKET) SS_UP(X_LALT)); + break; + case NEO2_0: + // right double quote + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_LBRACKET) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + break; + case NEO2_MINUS: + // em dash + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_MINUS) SS_UP(X_LSHIFT) SS_UP(X_LALT)); + break; + case NEO2_COMMA: + // en dash + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_MINUS) SS_UP(X_LALT)); + break; + case NEO2_DOT: + // bullet + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_8) SS_UP(X_LALT)); + break; + case NEO2_SHARP_S: + // german sharp s + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_S) SS_UP(X_LALT)); + break; + case NEO2_UE: + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_U) SS_UP(X_LSHIFT)); + break; + case NEO2_OE: + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_O) SS_UP(X_LSHIFT)); + break; + case NEO2_AE: + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_DOWN(X_LSHIFT) SS_TAP(X_A) SS_UP(X_LSHIFT)); + break; + default: + set_mods(active_modifiers); + return true; + } + + set_mods(active_modifiers); + return false; + } else { + switch (keycode) { + case NEO2_1: + SEND_STRING(SS_TAP(X_1)); + break; + case NEO2_2: + SEND_STRING(SS_TAP(X_2)); + break; + case NEO2_3: + SEND_STRING(SS_TAP(X_3)); + break; + case NEO2_4: + SEND_STRING(SS_TAP(X_4)); + break; + case NEO2_5: + SEND_STRING(SS_TAP(X_5)); + break; + case NEO2_6: + SEND_STRING(SS_TAP(X_6)); + break; + case NEO2_7: + SEND_STRING(SS_TAP(X_7)); + break; + case NEO2_8: + SEND_STRING(SS_TAP(X_8)); + break; + case NEO2_9: + SEND_STRING(SS_TAP(X_9)); + break; + case NEO2_0: + SEND_STRING(SS_TAP(X_0)); + break; + case NEO2_MINUS: + SEND_STRING(SS_TAP(X_MINUS)); + break; + case NEO2_COMMA: + SEND_STRING(SS_TAP(X_COMMA)); + break; + case NEO2_DOT: + SEND_STRING(SS_TAP(X_DOT)); + break; + case NEO2_SHARP_S: + // german sharp s + SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_S) SS_UP(X_LALT)); + break; + case NEO2_UE: + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_U)); + break; + case NEO2_OE: + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_O)); + break; + case NEO2_AE: + SEND_STRING(SS_DOWN(X_LALT) SS_DOWN(X_U) SS_UP(X_U) SS_UP(X_LALT) SS_TAP(X_A)); + break; + default: + return true; + } + + return false; + } +} + +// Runs for each key down or up event. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_LSHIFT: + if (record->event.pressed) { + capslock_state |= (MOD_BIT(KC_LSHIFT)); + } else { + capslock_state &= ~(MOD_BIT(KC_LSHIFT)); + } + break; + case KC_RSHIFT: + if (record->event.pressed) { + capslock_state |= MOD_BIT(KC_RSHIFT); + } else { + capslock_state &= ~(MOD_BIT(KC_RSHIFT)); + } + break; + case NEO2_LMOD3: + if (record->event.pressed) { + layer_on(NEO_3); + neo3_state |= (1 << 1); + } else { + // Turn off NEO_3 layer unless it's enabled through NEO2_RMOD3 as well. + if ((neo3_state & ~(1 << 1)) == 0) { + layer_off(NEO_3); + } + neo3_state &= ~(1 << 1); + } + break; + case NEO2_RMOD3: + if (record->event.pressed) { + neo3_timer = timer_read(); + neo3_state |= (1 << 2); + layer_on(NEO_3); + } else { + // Turn off NEO_3 layer unless it's enabled through NEO2_LMOD3 as well. + if ((neo3_state & ~(1 << 2)) == 0) { + layer_off(NEO_3); + } + neo3_state &= ~(1 << 2); + + // Was the NEO2_RMOD3 key TAPPED? + if (timer_elapsed(neo3_timer) <= 150) { + if (neo3_state > 0) { + // We are still in NEO_3 layer, send keycode and modifiers for @ + tap_with_modifiers(KC_2, MOD_MASK_SHIFT); + return false; + } else { + // Do the normal key processing, send y + tap_with_modifiers(KC_Y, MOD_MASK_NONE); + return false; + } + } + } + break; + } + + if ((capslock_state & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { + // CAPSLOCK is currently active, disable it + if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) { + unregister_code(KC_LOCKING_CAPS); + } else { + register_code(KC_LOCKING_CAPS); + } + return false; + } + + return process_record_user_shifted(keycode, record); +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void){ + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } +}; diff --git a/layouts/community/ergodox/osx_neo2/layers.h b/layouts/community/ergodox/osx_neo2/layers.h new file mode 100644 index 000000000000..a5e0cba00d75 --- /dev/null +++ b/layouts/community/ergodox/osx_neo2/layers.h @@ -0,0 +1,9 @@ +enum layers { + NEO_1, // layer_0 + NEO_3, // layer_1 + NEO_4, // layer_2 + NEO_5, // layer_3 + NEO_6, // layer_4 + US_1, // layer_5 + FKEYS // layer_6 +}; \ No newline at end of file diff --git a/layouts/community/ergodox/osx_neo2/readme.md b/layouts/community/ergodox/osx_neo2/readme.md new file mode 100644 index 000000000000..cab4dfe7099a --- /dev/null +++ b/layouts/community/ergodox/osx_neo2/readme.md @@ -0,0 +1,219 @@ +# Neo 2 for ErgoDox on QWERTY + +# Description + +The Neo layout is an optimized German keyboard layout developed by the +Neo Users Group, supporting many Latin-based alphabets. The positions +of the letters are not only optimized for German letter frequency, +but also for typical groups of two or three letters. English is +considered a primary target as well. + +The design tries to enforce the alternating usage of both hands to +increase typing speed and incorporates ideas from de-ergo and other +ergonomic layouts. High frequency keys are placed in the home row. +The current layout Neo 2.0 has unique features making it suited for +many target groups such as programmers, mathematicians, scientists or +LaTeX authors. + +Neo is grouped into six layers, each dedicated to a special purpose. + +# Layers + +At the core this is a Neo 2.0 layout adjusted for the Ergodox Infinity. +The keymap is laid out expecting a macOs using the US QWERTY or ABC +Extended layout. + +[Layer 1](#layer-1) Lowercase, upppercase and typographical characters + +[Layer 2](#layer-2) Special characters for programming + +[Layer 3](#layer-3) WASD-like movement keys and number block + +[Layer 4](#layer-4) Greek characters + +[Layer 5](#layer-5) Mathematical symbols and Greek uppercase characters + +[Layer 6](#layer-6) Ergodox Infinity US QWERTY layout + +[Layer 7](#layer-7) Function keys + +## Legend + + * Keys marked with `----` are dead keys. + * Blank keys are transparent and fall through to lower levels. + +## Layer 1 + +This layer implements NEO layers 1 and 2. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ---- | 1/° | 2/§ | 3/ | 4/» | 5/« | ESC | | US_1 | 6/$ | 7/€ | 8/„ | 9/“ | 0/” | -/— | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| TAB | X | V | L | C | W | LCTL | | RCTL | K | H | G | F | Q | ß | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| NEO_3 | U | I | A | E | O |------| |------| S | N | R | T | D | Y | +|--------+------+------+------+------+------| LALT | | RALT |------+------+------+------+------+--------| +| LSHIFT | Ü | Ö | Ä | P | Z | | | | B | M | ,/– | ./• | J | RSHIFT | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | ---- | ---- | LCTL | LALT | LGUI | | RGUI | Left | Down | Up | Right| + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | FKEYS| Home | | PgUp | FKEYS| + ,------|------|------| |------+------+------. + | Back-| | End | | PgDn | | | + | space|Delete|------| |------| Enter|Space | + | | | NEO_4| | NEO_4| | | + `--------------------' `--------------------' +``` + +## Layer 2 + +This layer implements NEO layer 3. + + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ---- | ---- | ---- | ---- | › | ‹ | | | | ¢ | ¥ | ‚ | ‘ | ’ | ---- | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| ---- | … | _ | [ | ] | ^ | | | | ! | < | > | = | & | ---- | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | \ | / | { | } | * |------| |------| ? | ( | ) | - | : | @ | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | # | $ | | | ~ | ` | | | | + | % | " | ' | ; | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Layer 3 + +This layer implements NEO layer 4. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ---- | ª | º | ---- | · | £ | | | | ---- | Tab | / | * | - | ---- | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| ---- | PgUp | ⌫ | Up | ⌦ | PgDn | | | | ¡ | 7 | 8 | 9 | + | – | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | Home | Left | Down | Right| End |------| |------| ¿ | 4 | 5 | 6 | , | . | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | Esc | Tab | Ins |Return| ---- | | | | : | 1 | 2 | 3 | ; | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | 0 | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Layer 4 + +This layer is currently empty/reserved for NEO layer 5. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | ---- | ----| ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | ---- | ----| ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Layer 5 + +This layer is currently empty/reserved for NEO layer 6. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| ---- | ---- | ---- | ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | ---- | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | ---- | ----| ---- | ---- | ---- |------| |------| ---- | ---- | ---- | ---- | ---- | ---- | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | ---- | ----| ---- | ---- | ---- | | | | ---- | ---- | ---- | ---- | ---- | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Layer 6 + +A bare bones implementation of the default Ergodox Infinity layout. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| = | 1 | 2 | 3 | 4 | 5 | ESC | | NEO_1| 6 | 7 | 8 | 9 | 0 | - | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| \ | Q | W | E | R | T | ---- | | [ | Y | U | I | O | P | ] | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| TAB | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | +|--------+------+------+------+------+------| ---- | | ---- |------+------+------+------+------+--------| +| LSHIFT | Z | X | V | B | M | | | | N | M | , | . | / | RSHIFT | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | LGUI | ` | ---- | ---- | FKEYS| | Left | Down | Up | Right| RGUI | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | LCTRL| LALT | | RALT | RCTRL| + ,------|------|------| |------+------+------. + | | | HOME | | PGUP | | | + | BKSP | DEL |------| |------| ENTR | SPCE | + | | | END | | PGDN | | | + `--------------------' `--------------------' +``` + +## Layer 7 + +This layer implements function and multimedia keys. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| Prev | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | VolUp | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| Play | | | | | | | | | | | | | | VolDn | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| Next | | | | | |------| |------| | | | | | Mute | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | | | | | | | | | | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` diff --git a/layouts/community/ergodox/osx_neo2/visualizer.c b/layouts/community/ergodox/osx_neo2/visualizer.c new file mode 100644 index 000000000000..653201bb8aae --- /dev/null +++ b/layouts/community/ergodox/osx_neo2/visualizer.c @@ -0,0 +1,47 @@ +#include "layers.h" +#include "simple_visualizer.h" +#include "util.h" + +static void get_visualizer_layer_and_color(visualizer_state_t *state) { + uint8_t layer = biton32(state->status.layer); + + // Go from highest to lowest layer to get the right text/color combination. + switch (layer) { + // #AEB2F4 / hsv(65.71%, 28.69%, 95.69%) + case FKEYS: + // #F4AEDC / hsv(89.05%, 28.69%, 95.69%) + state->layer_text = "FUNCTION KEYS"; + state->target_lcd_color = LCD_COLOR(228, 73, 245); + break; + case US_1: + // #F4B993 / hsv(6.53%, 39.75%, 95.69%) + state->layer_text = "QWERTY"; + state->target_lcd_color = LCD_COLOR(17, 102, 245); + break; + case NEO_6: + // #F4E393 / hsv(13.75%, 39.75%, 95.69%) + state->layer_text = "NEO: 6"; + state->target_lcd_color = LCD_COLOR(35, 102, 245); + break; + case NEO_5: + // #C6F493 / hsv(24.57%, 39.75%, 95.69%) + state->layer_text = "NEO: 5"; + state->target_lcd_color = LCD_COLOR(63, 102, 245); + break; + case NEO_4: + // #8EEBC9 / hsv(43.91%, 39.57%, 92.16%) + state->layer_text = "NEO: 4"; + state->target_lcd_color = LCD_COLOR(112, 101, 189); + break; + case NEO_3: + // #93D2F4 / hsv(55.84%, 39.75%, 95.69%) + state->layer_text = "NEO: 3"; + state->target_lcd_color = LCD_COLOR(143, 102, 245); + break; + default: + // #EEEEEE / hsv(0%, 0%, 93%) + state->layer_text = "NEO: 1"; + state->target_lcd_color = LCD_COLOR(0, 0, 255); + break; + } +} diff --git a/layouts/community/ergodox/phoenix/keymap.c b/layouts/community/ergodox/phoenix/keymap.c index 7ebdeaeb83c3..31a987b356ac 100644 --- a/layouts/community/ergodox/phoenix/keymap.c +++ b/layouts/community/ergodox/phoenix/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_DOWN,KC_UP ,KC_LBRC,KC_RBRC, KC_FN1, + KC_DOWN,KC_UP ,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_ENT, KC_SPC @@ -135,10 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/plover/keymap.c b/layouts/community/ergodox/plover/keymap.c index d3e3547299ea..9f19ab24c412 100644 --- a/layouts/community/ergodox/plover/keymap.c +++ b/layouts/community/ergodox/plover/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(3), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_QUOT, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_ENT, KC_SPC @@ -179,10 +179,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/pvinis/Changelog.md b/layouts/community/ergodox/pvinis/Changelog.md deleted file mode 100644 index e5816200b834..000000000000 --- a/layouts/community/ergodox/pvinis/Changelog.md +++ /dev/null @@ -1,7 +0,0 @@ -## v0.3 - -*2016-10-11* - -### Starting point - -* The starting point of this keymap. A beginner layout, and a couple placeholders. diff --git a/layouts/community/ergodox/pvinis/keymap.c b/layouts/community/ergodox/pvinis/keymap.c deleted file mode 100644 index 1bca0398dcd0..000000000000 --- a/layouts/community/ergodox/pvinis/keymap.c +++ /dev/null @@ -1,475 +0,0 @@ -// pvinis' ergodox keymap - -#include QMK_KEYBOARD_H -#include "mousekey.h" - -// easier name for left ctrl-alt-gui -#define ALLM(kc) LCAG(kc) - -// layers -enum { - BASE = 0, - BEGIN, - QWERTY, - CARPALX, - SYSCTL, - MOUSE, -}; - -// extra keys -enum { - NONE = 0, - - // tap dance - TD_FLSH, // flash keyboard - TD_LAYR, // SYSCTL and MOUSE layer switch -}; - -// application selection -// this is sending ctrl-alt-gui-, and this is picked up by hammerspoon -#define AP_SLCK ALLM(KC_S) -#define AP_XCOD ALLM(KC_X) -#define AP_MSGR ALLM(KC_M) - -// keymaps -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* BASE - * the base of the keyboard. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * |4x FLASH| | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | |SYSCTL| | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * |BEGIN |QWERTY| | | | - * ,------|------|------| |------+--------+------. - * | | |CARPAL| |Slack | | | - * |Backsp|LShift|------| |------| Enter |Space | - * | | |SYSCTL| |Msngr | | | - * `--------------------' `----------------------' - */ -[BASE] = LAYOUT_ergodox( - TD(TD_FLSH) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,TG(BEGIN) ,TD(TD_LAYR) - ,TG(MOUSE) - ,KC_BSPC ,KC_LSFT ,TD(TD_LAYR) - - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,MO(SYSCTL) ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,TG(SYSCTL) ,KC_NO - ,AP_SLCK - ,AP_MSGR ,KC_ENT ,KC_SPC -), - -/* BEGIN - * a beginner's keymap i currently use. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | opt | | 6 | 7 | 8 | 9 | 0 | - | = | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * |Esc/Ctrl| A | S | D | F | G |------| |------| H | J | K | L | ; | Enter | - * |--------+------+------+------+------+------| ( | | ) |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | ` | Cmd | | Cmd | | | | | ' | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+--------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `----------------------' - */ -[BEGIN] = LAYOUT_ergodox( - KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_LALT -,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC -,CTL_T(KC_ESC) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G -,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LPRN -,KC_TRNS ,KC_GRV ,KC_LGUI ,KC_LEFT ,KC_RIGHT - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS ,KC_EQL - ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS - ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_ENT - ,KC_RPRN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT - ,KC_TRNS ,KC_DOWN ,KC_TRNS ,KC_QUOT ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS -), - -/* QWERTY - * the default qwerty keymap. not really used, but i'll keep it here for now. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | Q | W | E | R | T | | | | Y | U | I | O | P | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | A | S | D | F | G |------| |------| H | J | K | L | ; | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | Z | X | C | V | B | | | | N | M | , | . | / | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+--------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `----------------------' - */ -[QWERTY] = LAYOUT_ergodox( - KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS -,KC_TRNS ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_TRNS -,KC_TRNS ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G -,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,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_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS - ,KC_TRNS ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_TRNS - ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_TRNS - ,KC_TRNS ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS -), - -/* CARPALX - * the keymap i would like to transition to. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | | | RIGHT| 6 | 7 | 8 | 9 | 0 | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | Q | G | M | L | W | | | L1 | Y | F | U | B | ; | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | D | S | T | N | R |------| |------| I | A | E | O | H | | - * |--------+------+------+------+------+------| | | Meh |------+------+------+------+------+--------| - * | | Z | X | C | V | J | | | | K | P | , | . | / | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | Up | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[CARPALX] = LAYOUT_ergodox( - KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_TRNS -,KC_TRNS ,KC_Q ,KC_G ,KC_M ,KC_L ,KC_W ,KC_TRNS -,KC_TRNS ,KC_D ,KC_S ,KC_T ,KC_N ,KC_R -,KC_TRNS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_J ,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_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_TRNS - ,KC_TRNS ,KC_Y ,KC_F ,KC_U ,KC_B ,KC_SCLN ,KC_TRNS - ,KC_I ,KC_A ,KC_E ,KC_O ,KC_H ,KC_TRNS - ,KC_TRNS ,KC_K ,KC_P ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS -), - -/* SYSCTL - * a keymap to control my system. - * - * ,--------------------------------------------------. ,------------------------------------------------------. - * | ^ | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+----------+------+------+--------| - * | | | | | | | | | | Mute | Home | Up | End | | | - * |--------+------+------+------+------+------| | | |------+------+----------+------+------+--------| - * | | | | | | |------| |------|VolUp | Left | Down |Right | | Lock | - * |--------+------+------+------+------+------| | | |------+------+----------+------+------+--------| - * | | | | | | | | | |VolDn | Prev |Play/Pause| Next | | Sleep | - * `--------+------+------+------+------+-------------' `-------------+------+----------+------+------+--------' - * | | | | | | | | | | | Power| - * `----------------------------------' `--------------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | ^ | | | | | - * `--------------------' `--------------------' - */ -[SYSCTL] = LAYOUT_ergodox( - KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_TRNS - - /*,KC_POP /// */,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - /* /// ,KC_PTRN*/,KC_NO ,KC_MUTE ,KC_HOME ,KC_UP ,KC_END ,KC_NO ,KC_NO - ,KC_VOLU ,KC_LEFT ,KC_DOWN ,KC_RGHT ,KC_NO ,LCTL(LSFT(KC_PWR)) - ,KC_NO ,KC_VOLD ,KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_NO ,KC_SLEP - ,KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_PWR - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_NO -), - -/* MOUSE - * a keymap to control my system. - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ^ | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | MsUp | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | |MidClk| - * ,------|------|------| |------+------+------. - * | | | | | |Left |Right | - * | | |------| |------| Click| Click| - * | | | ^ | | | | | - * `--------------------' `--------------------' - */ -[MOUSE] = LAYOUT_ergodox( - KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_TRNS - - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_MS_U ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_NO -), - -/* TEMPLATE - * keymap template with transparent and non-transparent keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+--------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `----------------------' - */ -/* -[TEMPLATE] = LAYOUT_ergodox( - 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 ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS -), -[TEMPLATE] = LAYOUT_ergodox( - KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_NO -), -*/ -}; - -// keyboard initialization -void matrix_init_user() { - ergodox_led_all_on(); - for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { - ergodox_led_all_set(i); - wait_ms(5); - } - wait_ms(1000); - for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { - ergodox_led_all_set(i); - wait_ms(10); - } - ergodox_led_all_off(); -} - -// light up leds based on the layer -void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - - switch(layer) { - case SYSCTL: - ergodox_right_led_3_on(); - break; - case MOUSE: - ergodox_right_led_2_on(); - break; - default: - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - break; - } -} - -// extra keys -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - } - return MACRO_NONE; -} - -// tap dances - -// flash keyboard on 4x tap, with leds -void flash_each_tap(qk_tap_dance_state_t *state, void *user_data) { - switch (state->count) { - case 1: - ergodox_right_led_3_on(); - break; - case 2: - ergodox_right_led_2_on(); - break; - case 3: - ergodox_right_led_1_on(); - break; - case 4: - ergodox_right_led_3_off(); - wait_ms(50); - ergodox_right_led_2_off(); - wait_ms(50); - ergodox_right_led_1_off(); - break; - } -} - -void flash_dance_finished(qk_tap_dance_state_t *state, void *user_data) { - if (state->count >= 4) { - reset_keyboard(); - reset_tap_dance(state); - } -} - -void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) { - ergodox_right_led_1_off(); - wait_ms(50); - ergodox_right_led_2_off(); - wait_ms(50); - ergodox_right_led_3_off(); -} - -// SYSCTL on first tap, MOUSE ON second tap -void layers_dance_finished(qk_tap_dance_state_t *state, void *user_data) { - uint8_t layer = biton32(layer_state); - - switch(state->count) { - case 1: - switch(layer) { - case SYSCTL: - layer_off(SYSCTL); - break; - case MOUSE: - layer_off(MOUSE); - break; - default: - layer_on(SYSCTL); - break; - } - break; - case 2: - layer_on(MOUSE); - break; - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ), - [TD_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, layers_dance_finished, NULL ), -}; diff --git a/layouts/community/ergodox/pvinis/rules.mk b/layouts/community/ergodox/pvinis/rules.mk deleted file mode 100644 index 87cbd93c2ba3..000000000000 --- a/layouts/community/ergodox/pvinis/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -CONSOLE_ENABLE = no # for debugging - -SLEEP_LED_ENABLE = no # no led blinking while sleeping -NKRO_ENABLE = yes # disable for windows -TAP_DANCE_ENABLE = yes # tap-tap-tap - - diff --git a/layouts/community/ergodox/qwerty_code_friendly/keymap.c b/layouts/community/ergodox/qwerty_code_friendly/keymap.c index 43a1d1ad8084..5f4ed3c19dea 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/keymap.c +++ b/layouts/community/ergodox/qwerty_code_friendly/keymap.c @@ -291,9 +291,9 @@ enum custom_keycodes { #define CFQ_KC_FN2 MO(2) #define CFQ_KC_FN3 MO(3) #else -#define CFQ_KC_FN1 KC_FN1 -#define CFQ_KC_FN2 KC_FN2 -#define CFQ_KC_FN3 KC_FN3 +#define CFQ_KC_FN1 TT(1) +#define CFQ_KC_FN2 TT(2) +#define CFQ_KC_FN3 TT(3) #endif const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -490,12 +490,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(LAYER_KPAD), /* FN1 - Momentary Layer 1 (KeyPad) */ - [2] = ACTION_LAYER_TAP_TOGGLE(LAYER_MDIA), /* FN2 - Momentary Layer 2 (Media, Mouse) */ - [3] = ACTION_LAYER_TAP_TOGGLE(LAYER_FKEY), /* FN3 - Momentary Layer 3 (FKey's & Words) */ -}; - #define WITHOUT_MODS(...) \ do { \ uint8_t _real_mods = get_mods(); \ diff --git a/layouts/community/ergodox/qwerty_code_friendly/readme.md b/layouts/community/ergodox/qwerty_code_friendly/readme.md index 9abd071b9b60..319ea50b9a33 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/readme.md +++ b/layouts/community/ergodox/qwerty_code_friendly/readme.md @@ -6,8 +6,7 @@ The this layout is a normalized qwerty, with some configurable keys left thumb cluster so you can use it more as needed. -- Arrow keys follow VIM convention - (the media layer even uses arrow keys for HJKL). +- Arrow keys follow VIM convention. - On the top row only symbols are used (not numbers), it's expected the symbol layer's number-pad layout will be used for numbers. diff --git a/layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/keymap.c b/layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/keymap.c index 1dd956bdad53..866aa22f9349 100644 --- a/layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/keymap.c +++ b/layouts/community/ergodox/romanzolotarev-norman-plover-osx-hjkl/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F1, KC_F2, KC_F3, KC_LALT, KC_LGUI, /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE, /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU, - /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_FN1, + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), TT(SYMB), // /*-*/ KC_F15, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, /*-*/ KC_BSLS, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS, @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*-*/ /*-*/ /*-*/ KC_RGUI, KC_RALT, KC_F4, KC_F5, KC_F6, KC_MPLY, KC_MNXT, KC_MPRV, - KC_FN3, KC_QUOT, KC_SPC + TT(ARRW), KC_QUOT, KC_SPC ), [SYMB] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -86,12 +86,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [SYMB] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Symbols Layer - [PLVR] = ACTION_LAYER_TAP_TOGGLE(PLVR), // FN2 - Momentary Plover Layer - [ARRW] = ACTION_LAYER_TAP_TOGGLE(ARRW), // FN3 - Momentary Arrows Layer -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/romanzolotarev-norman-plover-osx/keymap.c b/layouts/community/ergodox/romanzolotarev-norman-plover-osx/keymap.c index f8ae8a51d1ac..08aad4f22641 100644 --- a/layouts/community/ergodox/romanzolotarev-norman-plover-osx/keymap.c +++ b/layouts/community/ergodox/romanzolotarev-norman-plover-osx/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F1, KC_F2, KC_F3, KC_LALT, KC_LGUI, /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE, /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU, - /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_FN1, + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), TT(SYMB), // /*-*/ KC_F15, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, /*-*/ KC_BSLS, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS, @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*-*/ /*-*/ /*-*/ KC_RGUI, KC_RALT, KC_F4, KC_F5, KC_F6, KC_MPLY, KC_MNXT, KC_MPRV, - KC_FN3, KC_QUOT, KC_SPC + TT(ARRW), KC_QUOT, KC_SPC ), [SYMB] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -86,12 +86,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [SYMB] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Symbols Layer - [PLVR] = ACTION_LAYER_TAP_TOGGLE(PLVR), // FN2 - Momentary Plover Layer - [ARRW] = ACTION_LAYER_TAP_TOGGLE(ARRW), // FN3 - Momentary Arrows Layer -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/siroken3/keymap.c b/layouts/community/ergodox/siroken3/keymap.c index e8e12238737b..98422b440a64 100644 --- a/layouts/community/ergodox/siroken3/keymap.c +++ b/layouts/community/ergodox/siroken3/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_LGUI, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_LANG2, KC_ENT @@ -138,10 +138,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/sneako/keymap.c b/layouts/community/ergodox/sneako/keymap.c index 98f3469fcedd..5add317e16bb 100644 --- a/layouts/community/ergodox/sneako/keymap.c +++ b/layouts/community/ergodox/sneako/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -138,10 +138,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/swedish-lindhe/keymap.c b/layouts/community/ergodox/swedish-lindhe/keymap.c index a46408793afb..71ccba241484 100644 --- a/layouts/community/ergodox/swedish-lindhe/keymap.c +++ b/layouts/community/ergodox/swedish-lindhe/keymap.c @@ -154,10 +154,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/layouts/community/ergodox/swedish/keymap.c b/layouts/community/ergodox/swedish/keymap.c index 0cda8511f7cc..987f2c6afd59 100644 --- a/layouts/community/ergodox/swedish/keymap.c +++ b/layouts/community/ergodox/swedish/keymap.c @@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, KC_H, KC_J, KC_K, KC_L, LT(MDIA, NO_OSLH), GUI_T(NO_AE), MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(NO_MINS), KC_RSFT, - KC_UP, KC_DOWN, NO_CIRC, NO_ASTR, KC_FN1, + KC_UP, KC_DOWN, NO_CIRC, NO_ASTR, TT(SYMB), KC_ALGR, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -167,10 +167,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/swissgerman/keymap.c b/layouts/community/ergodox/swissgerman/keymap.c index 0288c955b5dc..b32fa4c2a421 100644 --- a/layouts/community/ergodox/swissgerman/keymap.c +++ b/layouts/community/ergodox/swissgerman/keymap.c @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_RALT,KC_RBRC, TT(SYMB), KC_LALT,CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -172,10 +172,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/techtomas/keymap.c b/layouts/community/ergodox/techtomas/keymap.c index 361583a0df8c..07228c4c067d 100644 --- a/layouts/community/ergodox/techtomas/keymap.c +++ b/layouts/community/ergodox/techtomas/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, MEH_T(KC_BSLS), KC_H, KC_J, KC_K, KC_L, LT(APP,KC_SCLN), ALL_T(KC_QUOT), S(KC_TAB), KC_N, KC_M, KC_COMM, KC_DOT, LT(APP,KC_SLSH), KC_RSFT, - KC_RGUI, KC_UP, KC_DOWN, KC_FN3, KC_FN1, + KC_RGUI, KC_UP, KC_DOWN, TT(CNTL), TT(SYMB), LALT(KC_LGUI), S(KC_LGUI), LT(APP,KC_PGUP), LT(SYMB,KC_PGDN), KC_ENT, KC_SPC @@ -177,12 +177,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB), - [2] = ACTION_LAYER_TAP_TOGGLE(APP), - [3] = ACTION_LAYER_TAP_TOGGLE(CNTL) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/teckinesis/readme.md b/layouts/community/ergodox/teckinesis/readme.md index 6804bb06f6df..d9b22742c9b2 100644 --- a/layouts/community/ergodox/teckinesis/readme.md +++ b/layouts/community/ergodox/teckinesis/readme.md @@ -1,6 +1,6 @@ # teckinesis Layout -*A blend of TECK and Kinesis layouts, based on ["The Ordinary Layout" by Nicholas Keene](http://qmk.fm/keyboards/ergodox_ez/keymaps/ordinary/#the-ordinary-layout-a-familiar-and-powerful-layout)* +*A blend of TECK and Kinesis layouts, based on ["The Ordinary Layout" by Nicholas Keene](/layouts/community/ergodox/ordinary)* I love "The Ordinary Layout", but I still use a [TECK](https://www.trulyergonomic.com/store/index.php) at the office, and I found the transition back and forth to be a bit more difficult than I expected. diff --git a/layouts/community/ergodox/tkuichooseyou/keymap.c b/layouts/community/ergodox/tkuichooseyou/keymap.c index 0a94b5205281..4dbf8be585fe 100644 --- a/layouts/community/ergodox/tkuichooseyou/keymap.c +++ b/layouts/community/ergodox/tkuichooseyou/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH_T(KC_NO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_QUOT, KC_LGUI, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_DELT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -135,10 +135,6 @@ LAYOUT_ergodox( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/tm2030/readme.md b/layouts/community/ergodox/tm2030/readme.md index 23746ddb76ee..fce0c46e7d43 100644 --- a/layouts/community/ergodox/tm2030/readme.md +++ b/layouts/community/ergodox/tm2030/readme.md @@ -55,7 +55,7 @@ As on the original TM 2030, when `num` layer is activated, holding `fn` disables ## Dvorak Layer Same as Layer 0 but with _Dvorak_ layout, to use with QWERTY OS layout. -Enable Dvorak layout with [`Magic`](/TMK_readme.md#magic-commands)+`1` (`LShift`+`RShift`+`1`), disable with `Magic`-`0`. +Enable Dvorak layout with [`Magic`](/docs/feature_bootmagic.md)+`1` (`LShift`+`RShift`+`1`), disable with `Magic`-`0`. The middle (green) led indicates when the Dvorak layer is activated. diff --git a/layouts/community/ergodox/tonyabra_osx/keymap.c b/layouts/community/ergodox/tonyabra_osx/keymap.c index d0b5c5d9c12d..4f174a69de7c 100644 --- a/layouts/community/ergodox/tonyabra_osx/keymap.c +++ b/layouts/community/ergodox/tonyabra_osx/keymap.c @@ -135,10 +135,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/ergodox/twentylives_dvorak_with_hebrew/keymap.c b/layouts/community/ergodox/twentylives_dvorak_with_hebrew/keymap.c index 909127ad4fbb..6bca18316232 100644 --- a/layouts/community/ergodox/twentylives_dvorak_with_hebrew/keymap.c +++ b/layouts/community/ergodox/twentylives_dvorak_with_hebrew/keymap.c @@ -173,10 +173,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(1) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/layouts/community/ergodox/twey/keymap.c b/layouts/community/ergodox/twey/keymap.c index 9ee318a5dd0e..0cc98ca77b89 100644 --- a/layouts/community/ergodox/twey/keymap.c +++ b/layouts/community/ergodox/twey/keymap.c @@ -183,10 +183,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(MDIA) // FN1 - Momentary Layer 3 (Media) -}; - // press `key`, but deactivate `layer` whilst it's held void press_without(int pressed, int key, uint8_t layer) { diff --git a/layouts/community/ergodox/workman_osx_mdw/keymap.c b/layouts/community/ergodox/workman_osx_mdw/keymap.c index d0f3882fa868..81fd3984b377 100644 --- a/layouts/community/ergodox/workman_osx_mdw/keymap.c +++ b/layouts/community/ergodox/workman_osx_mdw/keymap.c @@ -188,7 +188,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Layer 1 (Symbols) [2] = ACTION_LAYER_ON(BASE,0), // FN2 - Go back to the base layer [3] = ACTION_LAYER_ON(DEAD,0), [4] = ACTION_LAYER_TOGGLE(DEAD), diff --git a/layouts/community/ergodox/xyverz/keymap.c b/layouts/community/ergodox/xyverz/keymap.c index fe9080c2d645..eeeded47fcfd 100644 --- a/layouts/community/ergodox/xyverz/keymap.c +++ b/layouts/community/ergodox/xyverz/keymap.c @@ -31,11 +31,6 @@ extern keymap_config_t keymap_config; #define QWERTY M(_QW) #define COLEMAK M(_CM) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0 : Dvorak diff --git a/layouts/community/ergodox/zweihander-macos/keymap.c b/layouts/community/ergodox/zweihander-macos/keymap.c index b4a9efb3ee00..f64808c4d27e 100644 --- a/layouts/community/ergodox/zweihander-macos/keymap.c +++ b/layouts/community/ergodox/zweihander-macos/keymap.c @@ -137,10 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/layouts/community/numpad_5x6/bjohnson/config.h b/layouts/community/numpad_5x6/bjohnson/config.h new file mode 100644 index 000000000000..fe2cffec7857 --- /dev/null +++ b/layouts/community/numpad_5x6/bjohnson/config.h @@ -0,0 +1,25 @@ +#pragma once + +// #define B6_AUDIO + +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) +#define RGB_DI_PIN B7 +#define RGBLED_NUM 16 // Number of LEDs +#define RGBLIGHT_ANIMATIONS + +#define RGBLIGHT_HUE_STEP 12 +#define RGBLIGHT_SAT_STEP 12 +#define RGBLIGHT_VAL_STEP 12 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 + +#define RGBLIGHT_SLEEP +#endif // RGBLIGHT_ENABLE + +#ifdef AUDIO_ENABLE +#ifdef RGBLIGHT_ENABLE +#define NO_MUSIC_MODE +#endif // RGBLIGHT_ENABLE +#endif // AUDIO_ENABLE +#define TAP_CODE_DELAY 10 diff --git a/layouts/community/numpad_5x6/bjohnson/keymap.c b/layouts/community/numpad_5x6/bjohnson/keymap.c new file mode 100644 index 000000000000..79e87e69f4c4 --- /dev/null +++ b/layouts/community/numpad_5x6/bjohnson/keymap.c @@ -0,0 +1,51 @@ +#include QMK_KEYBOARD_H + +extern rgblight_config_t rgblight_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_5x6( + KC_F1, LT(1,KC_F2), KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_F3, KC_F4, KC_P7, KC_P8, KC_P9, + KC_F5, KC_F6, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_F7, KC_F8, KC_P1, KC_P2, KC_P3, + KC_F9, KC_F10, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_numpad_5x6( + RGB_TOG, _______, _______, _______, _______, RESET, + RGB_MOD, RGB_RMOD, _______, _______, _______, + RGB_HUI, RGB_HUD, _______, _______, _______, _______, + RGB_SAI, RGB_SAD, _______, _______, _______, + RGB_VAI, RGB_VAD, _______, _______, _______ + ), +}; + + +void keyboard_post_init_user(void) { +#ifdef RGBLIGHT_ENABLE + uint8_t temp_mode = rgblight_config.mode; + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + for (uint16_t i = 360; i > 0; i--) { + rgblight_sethsv_noeeprom( ( i + 180) % 360, 255, 255); + wait_ms(8); + } + led_set_user(host_keyboard_leds()); + rgblight_mode_noeeprom(temp_mode); +#endif +} + +void led_set_user(uint8_t usb_led) { + if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { + rgblight_sethsv_noeeprom_cyan(); + } else { + rgblight_sethsv_noeeprom_magenta(); + } +} + +void shutdown_user (void) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_setrgb_red(); + #endif // RGBLIGHT_ENABLE +} diff --git a/layouts/community/numpad_5x6/bjohnson/rules.mk b/layouts/community/numpad_5x6/bjohnson/rules.mk new file mode 100644 index 000000000000..d370da7f1b30 --- /dev/null +++ b/layouts/community/numpad_5x6/bjohnson/rules.mk @@ -0,0 +1,5 @@ +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no +NO_SECRETS = yes +BOOTMAGIC_ENABLE = lite diff --git a/layouts/community/numpad_5x6/drashna/config.h b/layouts/community/numpad_5x6/drashna/config.h new file mode 100644 index 000000000000..2fc5ab658825 --- /dev/null +++ b/layouts/community/numpad_5x6/drashna/config.h @@ -0,0 +1,19 @@ +#pragma once + +// #define B6_AUDIO + +#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) +# define RGB_DI_PIN B1 +# define RGBLED_NUM 16 // Number of LEDs + +# define RGBLIGHT_HUE_STEP 12 +# define RGBLIGHT_SAT_STEP 12 +# define RGBLIGHT_VAL_STEP 12 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#endif // RGBLIGHT_ENABLE + +#if defined(KEYBOARD_primekb_prime_m) +# undef PRODUCT +# define PRODUCT Drashna Hacked Prime_M Macro Pad +#endif diff --git a/layouts/community/numpad_5x6/drashna/keymap.c b/layouts/community/numpad_5x6/drashna/keymap.c new file mode 100644 index 000000000000..646f4db3379d --- /dev/null +++ b/layouts/community/numpad_5x6/drashna/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H +#include "drashna.h" + +#define F2_MCRO LT(_GAMEPAD, KC_F2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_NUMLOCK] = LAYOUT_numpad_5x6( + KC_F1, F2_MCRO, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_F3, KC_F4, KC_P7, KC_P8, KC_P9, + KC_F5, KC_F6, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_F7, KC_F8, KC_P1, KC_P2, KC_P3, + KC_F9, KC_COLN, KC_P0, KC_PDOT, KC_PENT + ), + + [_GAMEPAD] = LAYOUT_numpad_5x6( + RGB_TOG, _______, _______, EEP_RST, KC_MAKE, RESET, + RGB_MOD, RGB_RMOD, _______, _______, _______, + RGB_HUI, RGB_HUD, _______, _______, _______, _______, + RGB_SAI, RGB_SAD, _______, _______, _______, + RGB_VAI, RGB_VAD, _______, _______, _______ + ), +}; diff --git a/layouts/community/numpad_5x6/drashna/rules.mk b/layouts/community/numpad_5x6/drashna/rules.mk new file mode 100644 index 000000000000..62bbc365d17b --- /dev/null +++ b/layouts/community/numpad_5x6/drashna/rules.mk @@ -0,0 +1,10 @@ +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no +NO_SECRETS = yes +BOOTMAGIC_ENABLE = lite +INDICATOR_LIGHTS = no +RGBLIGHT_TWINKLE = yes +MACROS_ENABLED = no +MAKE_BOOTLOADER = yes +RGBLIGHT_STARTUP_ANIMATION = yes diff --git a/layouts/community/numpad_5x6/layout.json b/layouts/community/numpad_5x6/layout.json new file mode 100644 index 000000000000..7264cd5a6dc6 --- /dev/null +++ b/layouts/community/numpad_5x6/layout.json @@ -0,0 +1,6 @@ +["","","",""], +[{y:0.5},"","","",""], +["","","",{h:2},""], +["","",""], +["","","",{h:2},""], +[{w:2},"",""] diff --git a/layouts/community/numpad_5x6/readme.md b/layouts/community/numpad_5x6/readme.md new file mode 100644 index 000000000000..147097c8371c --- /dev/null +++ b/layouts/community/numpad_5x6/readme.md @@ -0,0 +1,3 @@ +# numpad_5x6 + + LAYOUT_numpad_5x6 diff --git a/layouts/community/ortho_3x10/wanleg/config.h b/layouts/community/ortho_3x10/wanleg/config.h index 6719a4591eb2..dc22454481e0 100644 --- a/layouts/community/ortho_3x10/wanleg/config.h +++ b/layouts/community/ortho_3x10/wanleg/config.h @@ -2,8 +2,25 @@ //QMK DFU settings (ProMicro boards) // set top left key as bootloader mode escape key on Gherkin -#if defined(KEYBOARD_gherkin) +#if defined(KEYBOARD_40percentclub_gherkin) && !defined(FLIP) #define QMK_LED B0 #define QMK_ESC_OUTPUT B4 // usually COL #define QMK_ESC_INPUT F7 // usually ROW #endif + +//change gherkin orientation (i.e. move USB port from right side to left side) +#if defined(KEYBOARD_40percentclub_gherkin) && defined(FLIP) +//need to fix QMKdfu setting: +#define QMK_ESC_OUTPUT B6 // usually COL +#define QMK_ESC_INPUT D0 // usually ROW +#define QMK_LED B0 + +//need to undefine standard 4x4 array before defining alternate ProMicro array +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS +//standard config: +//#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 } +//#define MATRIX_COL_PINS { B4, E6, D7, C6, D4, D0 } +#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } +#define MATRIX_COL_PINS { D0, D4, C6, D7, E6, B4 } +#endif diff --git a/layouts/community/ortho_3x10/wanleg/keymap.c b/layouts/community/ortho_3x10/wanleg/keymap.c index 44be300a4172..96d36eb3126b 100644 --- a/layouts/community/ortho_3x10/wanleg/keymap.c +++ b/layouts/community/ortho_3x10/wanleg/keymap.c @@ -26,4 +26,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______________Gherkin_ETC_2_______________ ), +[_FN] = LAYOUT_ortho_3x10_wrapper( + _______________Gherkin_FN_0________________, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), }; diff --git a/layouts/community/ortho_3x10/wanleg/readme.md b/layouts/community/ortho_3x10/wanleg/readme.md index 8696cccf6bfe..255e19c2a49b 100644 --- a/layouts/community/ortho_3x10/wanleg/readme.md +++ b/layouts/community/ortho_3x10/wanleg/readme.md @@ -1,4 +1,4 @@ -![Gherkin Wanleg Layout Image](https://i.imgur.com/nCPog2W.png) +![Gherkin Wanleg Layout Image](https://i.imgur.com/iNkR90W.png) # Gherkin Wanleg Layout This is the layout I came up with to preserve a standard QWERTY 104 key ANSI layout as much as possible, in as few layers as possible for a 30 key board. Here are the two Tap Dance keys I've set up for this board: @@ -47,9 +47,9 @@ The instructions below have been adapted from https://www.reddit.com/r/olkb/comm | Arduino | ProMicro | | --- | --- | | 10 | RST | -| 11 | 16 | -| 12 | 14 | -| 13 | 15 | +| 11 (MOSI) | 16 | +| 12 (MISO) | 14 | +| 13 (SCK) | 15 | | GND | GND | | 5V | VCC | diff --git a/layouts/community/ortho_3x10/wanleg/rules.mk b/layouts/community/ortho_3x10/wanleg/rules.mk index 90841d2abeda..efd11f7f80a2 100644 --- a/layouts/community/ortho_3x10/wanleg/rules.mk +++ b/layouts/community/ortho_3x10/wanleg/rules.mk @@ -1,3 +1 @@ -SWAP_HANDS_ENABLE = no - BOOTLOADER = qmk-dfu \ No newline at end of file diff --git a/layouts/community/ortho_4x12/bakingpy/config.h b/layouts/community/ortho_4x12/bakingpy/config.h index b6b2ac577901..a153adffb6f0 100644 --- a/layouts/community/ortho_4x12/bakingpy/config.h +++ b/layouts/community/ortho_4x12/bakingpy/config.h @@ -10,6 +10,7 @@ #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 +#define RGBLED_SPLIT { 6, 6 } #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 diff --git a/layouts/community/ortho_4x12/bakingpy/keymap.c b/layouts/community/ortho_4x12/bakingpy/keymap.c index 06e4a589c5b8..71672d051347 100644 --- a/layouts/community/ortho_4x12/bakingpy/keymap.c +++ b/layouts/community/ortho_4x12/bakingpy/keymap.c @@ -21,7 +21,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/layouts/community/ortho_4x12/bakingpy/rules.mk b/layouts/community/ortho_4x12/bakingpy/rules.mk index 9be2f01d4d5d..17a589cd1d62 100644 --- a/layouts/community/ortho_4x12/bakingpy/rules.mk +++ b/layouts/community/ortho_4x12/bakingpy/rules.mk @@ -1,12 +1,13 @@ -# Enable RGB if not a Planck -ifeq ($(LAYOUTS_HAS_RGB),yes) +ifneq ($(LAYOUTS_HAS_RGB), no) RGBLIGHT_ENABLE = yes endif AUDIO_ENABLE = no ifeq ($(strip $(KEYBOARD)), zlant) BACKLIGHT_ENABLE = no else ifeq ($(strip $(KEYBOARD)), 40percentclub/4x4) - BACKLIGHT_ENABLE = no + BACKLIGHT_ENABLE = no +else ifneq (, $(findstring lets_split, $(KEYBOARD))) + BACKLIGHT_ENABLE = no else BACKLIGHT_ENABLE = yes endif diff --git a/layouts/community/ortho_4x12/buswerks/keymap.c b/layouts/community/ortho_4x12/buswerks/keymap.c index bea18f8f488e..95d9e7019a90 100644 --- a/layouts/community/ortho_4x12/buswerks/keymap.c +++ b/layouts/community/ortho_4x12/buswerks/keymap.c @@ -78,10 +78,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y , KC_SCLN, KC_BSPC, \ ESC_CMD, KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O , KC_QUOT, \ KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_ENT, \ - xxxxxxx, KC_LCTL, KC_LGUI, KC_LALT, LOWER , KC_SPC , KC_SPC , RSE_ENT, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT \ + XXXXXXX, KC_LCTL, KC_LGUI, KC_LALT, LOWER , KC_SPC , KC_SPC , RSE_ENT, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT \ ), - [_ADJUST] = LAYOUT_planck_grid( + [_ADJUST] = LAYOUT_ortho_4x12( _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, GAME, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, diff --git a/layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c b/layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c index 218ff93741fe..c8da7f589f53 100644 --- a/layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c +++ b/layouts/community/ortho_4x12/colemak_mod_dh_wide/keymap.c @@ -20,10 +20,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak diff --git a/layouts/community/ortho_4x12/crs/keymap.c b/layouts/community/ortho_4x12/crs/keymap.c index f9c72f25433b..2ec2ffba9f5d 100644 --- a/layouts/community/ortho_4x12/crs/keymap.c +++ b/layouts/community/ortho_4x12/crs/keymap.c @@ -33,10 +33,6 @@ enum custom_keycodes { EXT_PLV }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index 0b0110dfa9f0..475afd213ff4 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -2,41 +2,54 @@ #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) -#define RGB_DI_PIN D3 -#define RGBLED_NUM 16 // Number of LEDs - -#define RGBLIGHT_HUE_STEP 12 -#define RGBLIGHT_SAT_STEP 12 -#define RGBLIGHT_VAL_STEP 12 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 +# define RGB_DI_PIN B3 +# define RGBLED_NUM 13 // Number of LEDs +# define RGBLIGHT_ANIMATIONS +# define RGBLIGHT_HUE_STEP 12 +# define RGBLIGHT_SAT_STEP 12 +# define RGBLIGHT_VAL_STEP 12 +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +# ifdef RGB_MATRIX_ENABLE +# define RGBLIGHT_DISABLE_KEYCODES +# endif #endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE -#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended -// #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 // #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -// #define EECONFIG_RGB_MATRIX (uint32_t *)16 +# define RGB_DISABLE_WHEN_USB_SUSPENDED true// turn off effects when suspended +# ifndef KEYBOARD_planck_ez +# define EECONFIG_RGB_MATRIX (uint32_t *)15 +# endif #endif #if defined(KEYBOARD_lets_split_rev2) -#define USE_SERIAL -#undef USE_I2C - -#define EE_HANDS +# define USE_SERIAL +# undef USE_I2C +# define EE_HANDS #endif #if !defined(KEYBOARD_planck_light) -#ifdef RGBLIGHT_ENABLE -#define NO_MUSIC_MODE -#endif // RGBLIGHT_ENABLE +# ifdef RGBLIGHT_ENABLE +# define NO_MUSIC_MODE +# endif // RGBLIGHT_ENABLE #endif // KEYBOARD_planck_light +#if defined(KEYBOARD_planck) +# undef PRODUCT +# if defined(KEYBOARD_planck_light) +# define PRODUCT Drashna Hacked RGB Beacon (Planck Light) +# elif defined(KEYBOARD_planck_rev6) +# define PRODUCT Drashna Hacked Planck Rev6 +# elif defined(KEYBOARD_planck_EZ) +# define PRODUCT Drashna Hacked Planck EZ +# endif +#endif + /* * MIDI options */ @@ -48,7 +61,7 @@ - MIDI notes can be sent when in Music mode is on */ -#define MIDI_BASIC +// #define MIDI_BASIC /* enable advanced MIDI features: - MIDI notes can be added to the keymap diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 5d32189342d9..c1c016ce9f60 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -17,10 +17,11 @@ #include QMK_KEYBOARD_H #include "drashna.h" -#ifdef RGB_MATRIX_ENABLE -extern bool g_suspend_state; +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; #endif + #ifdef BACKLIGHT_ENABLE enum planck_keycodes { BACKLIT = NEW_SAFE_RANGE, @@ -29,6 +30,18 @@ enum planck_keycodes { #define BACKLIT OSM(MOD_LSFT) #endif +#ifdef KEYBOARD_planck_ez +# define PLNK_1 BK_LWER +# define PLNK_2 SP_LWER +# define PLNK_3 KC_NO +# define PLNK_4 ET_RAIS +#else +# define PLNK_1 SP_LWER +# define PLNK_2 BK_LWER +# define PLNK_3 DL_RAIS +# define PLNK_4 ET_RAIS +#endif + #define LAYOUT_ortho_4x12_base( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ @@ -37,197 +50,293 @@ enum planck_keycodes { LAYOUT_ortho_4x12_wrapper( \ KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ - KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), KC_ENT, \ - BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \ + BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ) #define LAYOUT_ortho_4x12_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = LAYOUT_ortho_4x12_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ -), - -[_COLEMAK] = LAYOUT_ortho_4x12_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ -), - -[_DVORAK] = LAYOUT_ortho_4x12_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ -), - -[_WORKMAN] = LAYOUT_ortho_4x12_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ -), - -[_MODS] = LAYOUT_ortho_4x12_wrapper( - _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, - _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, - KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -[_LOWER] = LAYOUT_ortho_4x12_wrapper( - KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, - KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, - _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY -), - -[_RAISE] = LAYOUT_ortho_4x12_wrapper( - KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, - KC_DEL, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, - _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, - _______, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________ -), - -[_ADJUST] = LAYOUT_ortho_4x12_wrapper( - KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, - VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, - _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUKE -) + [_QWERTY] = LAYOUT_ortho_4x12_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_ortho_4x12_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_ortho_4x12_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_ortho_4x12_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_ortho_4x12_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_ortho_4x12_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_ortho_4x12_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_ortho_4x12_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + + [_MODS] = LAYOUT_ortho_4x12_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_ortho_4x12_wrapper( + KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, + KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + [_RAISE] = LAYOUT_ortho_4x12_wrapper( + KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, + KC_DEL, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________ + ), + + [_ADJUST] = LAYOUT_ortho_4x12_wrapper( + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUKE + ) }; bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - -#ifdef BACKLIGHT_ENABLE - case BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - PORTE &= ~(1<<6); - } else { - unregister_code(KC_RSFT); - PORTE |= (1<<6); - } - return false; - break; + switch (keycode) { + #ifdef BACKLIGHT_ENABLE + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; #endif - } - return true; + } + return true; } bool music_mask_user(uint16_t keycode) { - switch (keycode) { - case RAISE: - case LOWER: - case BK_LWER: - case SP_LWER: - case DL_RAIS: - case ET_RAIS: - return false; - default: - return true; - } + switch (keycode) { + case RAISE: + case LOWER: + case BK_LWER: + case SP_LWER: + case DL_RAIS: + case ET_RAIS: + return false; + default: + return true; + } } #ifdef RGB_MATRIX_ENABLE -void suspend_power_down_keymap(void) -{ +void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } -void suspend_wakeup_init_keymap(void) -{ +void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } -void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { - rgb_led led; - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - led = g_rgb_leds[i]; - if (led.matrix_co.raw < 0xFF) { - if (led.modifier) { - rgb_matrix_set_color( i, red, green, blue ); - } - } - } -} - void rgb_matrix_indicators_user(void) { - uint8_t this_mod = get_mods(); - uint8_t this_led = host_keyboard_leds(); - uint8_t this_osm = get_oneshot_mods(); - if (!g_suspend_state) { - switch (biton32(layer_state)) { - case _RAISE: - rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; - case _LOWER: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; - case _ADJUST: - rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; - default: - switch (biton32(default_layer_state)) { - case _QWERTY: - rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, true); break; - case _COLEMAK: - rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, true); break; - case _DVORAK: - rgb_matrix_layer_helper(0x00, 0xFF, 0x00, true); break; - case _WORKMAN: - rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, true); break; + uint8_t this_mod = get_mods(); + uint8_t this_led = host_keyboard_leds(); + uint8_t this_osm = get_oneshot_mods(); + bool is_ez; + #ifdef KEYBOARD_planck_ez + is_ez = true; + #endif + + if ( userspace_config.rgb_layer_change && +#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED + !g_suspend_state && +#endif +#if defined(RGBLIGHT_ENABLE) + (!rgblight_config.enable && rgb_matrix_config.enable) +#else + rgb_matrix_config.enable +#endif + ) { + switch (biton32(layer_state)) { + case _RAISE: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; + case _LOWER: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; + case _ADJUST: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_MODIFIER); break; + default: + switch (biton32(default_layer_state)) { + case _QWERTY: + rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_MODIFIER); break; + case _COLEMAK: + rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_MODIFIER); break; + case _DVORAK: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break; + case _WORKMAN: + rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_MODIFIER); break; + case _NORMAN: + rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_MODIFIER); break; + case _MALTRON: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break; + case _EUCALYN: + rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_MODIFIER); break; + case _CARPLAX: + rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_MODIFIER); break; + } } } - } - - switch (biton32(default_layer_state)) { - case _QWERTY: - rgb_matrix_set_color(42, 0x00, 0xFF, 0xFF); break; - case _COLEMAK: - rgb_matrix_set_color(42, 0xFF, 0x00, 0xFF); break; - case _DVORAK: - rgb_matrix_set_color(42, 0x00, 0xFF, 0x00); break; - case _WORKMAN: - rgb_matrix_set_color(42, 0xD9, 0xA5, 0x21); break; - } - - if (this_mod & MODS_SHIFT_MASK || this_led & (1<. #pragma once -// hold & tapping delay setting -#define TAPPING_TERM 100 + /* Use I2C or Serial, not both */ diff --git a/layouts/community/ortho_4x12/symbolic/keymap.c b/layouts/community/ortho_4x12/symbolic/keymap.c index d4c08923685d..c29237371114 100644 --- a/layouts/community/ortho_4x12/symbolic/keymap.c +++ b/layouts/community/ortho_4x12/symbolic/keymap.c @@ -20,11 +20,6 @@ enum custom_keycodes { }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -36,17 +31,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | A | S | D | F | G || H | J | K | L | ; |Enter | * |------+------+------+------+------+------++------+------+------+------+------+------| * | | | | | | || | | | | | | - * | | Z | X | C | V | B || N | M | , | . | ! | | + * |Shift | Z | X | C | V | B || N | M | , | . | ! |Shift | * |------+------+------+------+------+------++------+------+------+------+------+------| - * | | | | | |LSFT_T||RSFT_T| | | | | | - * |Reset | Alt | GUI |LLower|LRaise|Space ||Space |RRaise|RLower| GUI | Del |Reset | + * | | | | | | || | | | | | | + * |LRaise| Alt | GUI | |LLower|Space ||Space |RLower| | GUI | Del |RRaise| * `------------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_ortho_4x12( \ - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - LCTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ - XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_EXLM, XXXXXXX, \ - RESET, KC_LALT, KC_LGUI, L_LOWER, L_RAISE, LSFT_T( KC_SPC ), RSFT_T( KC_SPC ), R_RAISE, R_LOWER, KC_RGUI, KC_DEL, RESET \ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + LCTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_EXLM, KC_RSFT, \ + L_RAISE, KC_LALT, KC_LGUI, XXXXXXX, L_LOWER, KC_SPC, KC_SPC, R_LOWER, XXXXXXX, KC_RGUI, KC_DEL, R_RAISE \ ), /* Raise @@ -58,16 +53,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | ~ | | | ( | ) | * || / | < | > | ' | : |Enter | * |------+------+------+------+------+------++------+------+------+------+------+------| * | | | | | | || | | | | | | - * | | ` | ^ | @ | $ | + || - | = | _ | " | ? | | + * |Shift | ` | ^ | @ | $ | + || - | = | _ | " | ? |Shift | * |------+------+------+------+------+------++------+------+------+------+------+------| - * | | | | | |LSFT_T||RSFT_T| | | | | | - * |Reset | Alt | GUI |LLower|LRaise|Space ||Space |RRaise|RLower| GUI | Del |Reset | + * | | | | | | || | | | | | | + * |LRaise| Alt | GUI | |LLower|Space ||Space |RLower| | GUI | Del |RRaise| * `------------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_ortho_4x12( \ _______, XXXXXXX, KC_AMPR, KC_LCBR, KC_RCBR, KC_PERC, KC_BSLS, KC_LBRC, KC_RBRC, KC_HASH, XXXXXXX, _______, \ - _______, KC_TILD, KC_PIPE, KC_LPRN, KC_RPRN, KC_ASTR, KC_SLSH, KC_LABK, KC_RABK, KC_QUOT, KC_COLN, _______, \ - _______, KC_GRV, KC_CIRC, KC_AT, KC_DLR, KC_PLUS, KC_MINS, KC_EQL, KC_UNDS, KC_DQUO, KC_QUES, _______, \ + _______, KC_TILD, KC_PIPE, KC_LPRN, KC_RPRN, KC_ASTR, KC_SLSH, KC_LABK, KC_RABK, KC_DQUO, KC_COLN, _______, \ + _______, KC_GRV, KC_CIRC, KC_AT, KC_DLR, KC_PLUS, KC_MINS, KC_EQL, KC_UNDS, KC_QUOT, KC_QUES, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* Lower @@ -79,16 +74,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | |VolDn |VolUp | Mute | || Left | Down | Up |Right | |Enter | * |------+------+------+------+------+------++------+------+------+------+------+------| * | | | | | | || | | | | | | - * | | | | | | || | | | | | | + * |Shift | | | | | PrSc || Home | PgDn | PgUp | End | |Shift | * |------+------+------+------+------+------++------+------+------+------+------+------| - * | | | | | |LSFT_T||RSFT_T| | | | | | - * |Reset | Alt | GUI |LLower|LRaise|Space ||Space |RRaise|RLower| GUI | Del |Reset | + * | | | | | | || | | | | | | + * |LRaise| Alt | GUI | |LLower|Space ||Space |RLower| | GUI | Del |RRaise| * `------------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_ortho_4x12( \ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ _______, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, _______, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), @@ -101,55 +96,113 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Tab | F5 | F6 | F7 | F8 | || * | / | 4 | 5 | 6 |Enter | * |------+------+------+------+------+------++------+------+------+------+------+------| * | | | | | | || | | | | | | - * | | F9 | F10 | F11 | F12 | || . | , | 7 | 8 | 9 | | + * |Shift | F9 | F10 | F11 | F12 | || . | , | 7 | 8 | 9 |Shift | * |------+------+------+------+------+------++------+------+------+------+------+------| - * | | | | | |LSFT_T||RSFT_T| | | | | | - * |Reset | Alt | GUI |LLower|LRaise|Space ||Space |RRaise|RLower| 0 | Del |Reset | + * | | | | | | || | | | | | | + * |LRaise| Alt | GUI |Reset |LLower|Space ||Space |RLower|Reset | 0 | Del |RRaise| * `------------------------------------------------------------------------------------' */ [_NEUTRAL] = LAYOUT_ortho_4x12( \ _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_PPLS, KC_PMNS, KC_P1, KC_P2, KC_P3, _______, \ _______, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, KC_PAST, KC_PSLS, KC_P4, KC_P5, KC_P6, _______, \ _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_PDOT, KC_COMM, KC_P7, KC_P8, KC_P9, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, _______, _______ \ + _______, _______, _______, RESET, _______, _______, _______, _______, RESET, KC_P0, _______, _______ \ ) }; -void DualKeyPressed ( bool brother_state, uint8_t target ){ - if( brother_state ) return; +/**** Raise Layer functions *****/ + + /* RaisePressed function */ + /* called RaiseSwitch */ +void RaisePressed ( keyevent_t *event, bool brother_state ){ + + if( brother_state ) { return; } + + layer_on( _RAISE ); + update_tri_layer( _LOWER, _RAISE, _NEUTRAL ); + return; + +} + + + /* RaiseReleased function */ + /* called RaiseSwitch */ +void RaiseReleased ( bool brother_state ){ + + if( brother_state ) { return; } + + layer_off( _RAISE ); + update_tri_layer( _LOWER, _RAISE, _NEUTRAL ); + return; +} + + + /* RaiseSwitch function */ + /* called process_record_user */ +bool RaiseSwitch ( keyrecord_t *record, bool *key_state, bool brother ){ + + if( record -> event.pressed ) { + *key_state = true; + RaisePressed( &(record -> event), brother ); + } else { + *key_state = false; + RaiseReleased( brother ); + } + return false; + +} + + + + + + +/**** Lower layer functions ****/ + + /* LowerPressed function */ + /* call from LowerSwitch */ +void LowerPressed ( bool brother_state ){ - layer_on( target ); + if( brother_state ) { return; } + + layer_on( _LOWER ); + update_tri_layer(_LOWER, _RAISE, _NEUTRAL ); return; } -void DualKeyReleased ( bool brother_state, uint8_t target1 ){ + /* LowerReleased function */ + /* call from LowerSwitch */ +void LowerReleased ( bool brother_state ){ - if( brother_state ) return ; + if( brother_state ) { return; } - layer_off( target1 ); + layer_off( _LOWER ); + update_tri_layer(_LOWER, _RAISE, _NEUTRAL ); return ; } -bool LayerSwitch ( keyrecord_t *record, bool *key_state, bool brother, uint8_t layer ){ + /* LowerSwitch function */ + /* call from process_record_user */ +bool LowerSwitch ( keyrecord_t *record, bool *key_state, bool brother ){ if ( record -> event.pressed ) { *key_state = true; - DualKeyPressed( brother, layer ); - } - else { + LowerPressed( brother ); + } else { *key_state = false; - DualKeyReleased( brother, layer ); + LowerReleased( brother ); } - update_tri_layer(_LOWER, _RAISE, _NEUTRAL ); return false; - } + + +/**** process_record_user ****/ bool process_record_user(uint16_t keycode, keyrecord_t *record) { static bool l_lower = false; @@ -161,11 +214,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case L_LOWER : return LayerSwitch( record, &l_lower, r_lower, _LOWER ); break; - case R_LOWER : return LayerSwitch( record, &r_lower, l_lower, _LOWER ); break; - case L_RAISE : return LayerSwitch( record, &l_raise, r_raise, _RAISE ); break; - case R_RAISE : return LayerSwitch( record, &r_raise, l_raise, _RAISE ); break; + case L_LOWER : return LowerSwitch( record, &l_lower, r_lower ); break; + case R_LOWER : return LowerSwitch( record, &r_lower, l_lower ); break; + case L_RAISE : return RaiseSwitch( record, &l_raise, r_raise ); break; + case R_RAISE : return RaiseSwitch( record, &r_raise, l_raise ); break; + + default: break; } return true; } + + + diff --git a/layouts/community/ortho_4x12/wanleg/config.h b/layouts/community/ortho_4x12/wanleg/config.h index f7650ddd3a67..bcf2756f6bbc 100644 --- a/layouts/community/ortho_4x12/wanleg/config.h +++ b/layouts/community/ortho_4x12/wanleg/config.h @@ -20,6 +20,13 @@ #define EE_HANDS #endif +// set top left key as bootloader mode escape key on Nori +#if defined(KEYBOARD_40percentclub_nori) +#define QMK_LED B0 +#define QMK_ESC_OUTPUT F4 // usually COL +#define QMK_ESC_INPUT D3 // usually ROW +#endif + // set top left key as bootloader mode escape key on 4x4 48key layout #if defined(KEYBOARD_40percentclub_4x4) && !defined(PRO_MICRO) #define QMK_LED B0 diff --git a/layouts/community/ortho_4x12/wanleg/keymap.c b/layouts/community/ortho_4x12/wanleg/keymap.c index 23e794dc411b..bcf6671aedf1 100644 --- a/layouts/community/ortho_4x12/wanleg/keymap.c +++ b/layouts/community/ortho_4x12/wanleg/keymap.c @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _____________DIRECTIONS_Row__2_____________, _______, _______, ONEHAND, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), -#elif defined(KEYBOARD_40percentclub_4x4) +#elif defined(KEYBOARD_40percentclub_4x4) || defined(KEYBOARD_40percentclub_nori) [_GK] = LAYOUT_ortho_4x12_wrapper( _______________GherkinLike_0_______________, _______________GherkinLike_1_______________, @@ -36,14 +36,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______________NUMPAD_Row__3_______________ ), -#elif defined(KEYBOARD_jj40) -[_GK] = LAYOUT_ortho_4x12_wrapper( - _______________GherkinLike_0_______________, - _______________GherkinLike_1_______________, - _______________GherkinLike_2_______________, - TD(RST_TAP_DANCE), BL_TOGG, BL_STEP, BL_BRTG, NUMBER, ETCETERA, KC_SPC,DIRECTION, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL -), - #else [_GK] = LAYOUT_ortho_4x12_wrapper( _______________GherkinLike_0_______________, @@ -94,4 +86,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______________ETCETERA_Row__3______________ ), +[_FN] = LAYOUT_ortho_4x12_wrapper( + _______, _______________Gherkin_FN_0________________, _______, + _______, _______________Gherkin_FN_0________________, _______, + _______, _______________Gherkin_FN_0________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + }; diff --git a/layouts/community/ortho_4x12/wanleg/rules.mk b/layouts/community/ortho_4x12/wanleg/rules.mk index e8277610b6a4..0b3917e98f65 100644 --- a/layouts/community/ortho_4x12/wanleg/rules.mk +++ b/layouts/community/ortho_4x12/wanleg/rules.mk @@ -7,4 +7,9 @@ endif ifeq ($(strip $(KEYBOARD)), planck/rev6) AUDIO_ENABLE = yes +endif + +#disable RGB on version 1 of jj40 keyboard (does not exist) +ifeq ($(strip $(KEYBOARD)), jj40) + RGBLIGHT_ENABLE = no endif \ No newline at end of file diff --git a/layouts/community/ortho_4x12/xyverz/config.h b/layouts/community/ortho_4x12/xyverz/config.h index 0fa89d6c7bbc..287f4cc2b731 100644 --- a/layouts/community/ortho_4x12/xyverz/config.h +++ b/layouts/community/ortho_4x12/xyverz/config.h @@ -11,7 +11,7 @@ #if defined(KEYBOARD_planck_rev5) #define RGBLED_NUM 10 #define RGB_DI_PIN D1 -#elif defined(KEYBOARD_levinson_rev2) +#elif defined(KEYBOARD_keebio_levinson_rev2) #define RGBLED_NUM 12 #elif defined(KEYBOARD_lets_split_rev2) #define RGBLED_NUM 8 diff --git a/layouts/community/ortho_4x12/xyverz/keymap.c b/layouts/community/ortho_4x12/xyverz/keymap.c index 72ddbacf8202..681dafacd449 100644 --- a/layouts/community/ortho_4x12/xyverz/keymap.c +++ b/layouts/community/ortho_4x12/xyverz/keymap.c @@ -24,10 +24,6 @@ enum custom_keycodes { ADJUST }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases to keep the keymap tidy #define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. #define RGB_SWR RGB_M_SW // Swirl Animation alias diff --git a/layouts/community/ortho_4x4/jotix/keymap.c b/layouts/community/ortho_4x4/jotix/keymap.c new file mode 100644 index 000000000000..91d0ed74dce8 --- /dev/null +++ b/layouts/community/ortho_4x4/jotix/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +// 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. + +#define _NUMPAD 0 +#define _LOWER 1 +#define LOWER LT(_LOWER, KC_PENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Numpad + * +-------+-------+-------+-------+ + * | 7 | 8 | 9 | - | + * +-------+-------+-------+-------+ + * | 4 | 5 | 6 | + | + * +-------+-------+-------+-------+ + * | 1 | 2 | 3 | / | + * +-------+-------+-------+-------+ + * | | 0 | . | * | + * +-------+-------+-------+-------+ + */ +[_NUMPAD] = LAYOUT_ortho_4x4 ( + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PSLS, + LOWER, KC_P0, KC_PDOT,KC_PAST +), + +/* Lower */ +[_LOWER] = LAYOUT_ortho_4x4 ( + KC_NLCK,_______,_______,RESET , + _______,_______,_______,_______, + _______,_______,_______,_______, + _______,_______,_______,_______ +), +}; diff --git a/layouts/community/ortho_4x4/jotix/readme.md b/layouts/community/ortho_4x4/jotix/readme.md new file mode 100644 index 000000000000..0624f6215513 --- /dev/null +++ b/layouts/community/ortho_4x4/jotix/readme.md @@ -0,0 +1,6 @@ +# Jotix ortho 4x4 keymap + +![keymap](https://i.imgur.com/e67yN7x.jpg) + +Enter is 'Lower' on hold. + diff --git a/layouts/community/ortho_5x12/drashna/config.h b/layouts/community/ortho_5x12/drashna/config.h index e41dadc60155..123c284a2c59 100644 --- a/layouts/community/ortho_5x12/drashna/config.h +++ b/layouts/community/ortho_5x12/drashna/config.h @@ -3,14 +3,19 @@ /* ws2812 RGB LED */ #if defined(KEYBOARD_fractal) - #define RGB_DI_PIN D2 - #undef RGBLED_NUM - #define RGBLIGHT_ANIMATIONS - #define RGBLED_NUM 29 // Number of LEDs - #undef RGBLIGHT_HUE_STEP - #define RGBLIGHT_HUE_STEP 8 - #undef RGBLIGHT_SAT_STEP - #define RGBLIGHT_SAT_STEP 8 - #undef RGBLIGHT_VAL_STEP - #define RGBLIGHT_VAL_STEP 8 +# define RGB_DI_PIN D2 +# undef RGBLED_NUM +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 29 // Number of LEDs +# undef RGBLIGHT_HUE_STEP +# define RGBLIGHT_HUE_STEP 8 +# undef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 8 +# undef RGBLIGHT_VAL_STEP +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 175 +# define RGBLIGHT_SLEEP + +# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 3 +# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 14 #endif diff --git a/layouts/community/ortho_5x12/rs/config.h b/layouts/community/ortho_5x12/rs/config.h index 02076e8728d1..6f70f09beec2 100644 --- a/layouts/community/ortho_5x12/rs/config.h +++ b/layouts/community/ortho_5x12/rs/config.h @@ -1,35 +1 @@ #pragma once - -#ifdef AUDIO_ENABLE -//#define STARTUP_SONG SONG(PREONIC_SOUND) -#define STARTUP_SONG SONG(NO_SOUND) - -#define DEFAULT_LAYER_SONGS \ - { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND) } -#endif - -#define MUSIC_MASK (keycode != KC_NO) - -/* - * 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 2 diff --git a/layouts/community/ortho_5x12/rs/karabiner.json b/layouts/community/ortho_5x12/rs/karabiner.json deleted file mode 100644 index f5214650adea..000000000000 --- a/layouts/community/ortho_5x12/rs/karabiner.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "title": "RS", - "rules": [{ - "description": "CapsLock to Escape / Control Mod-Tap", - "manipulators": [{ - "type": "basic", - "from": { - "key_code": "caps_lock", - "modifiers": { - "optional": ["any"] - } - }, - "to": [{"key_code": "left_control"}], - "to_if_alone": [{"key_code": "escape"}] - }] - }, - { - "description": "Right-Shift / Enter Mod-Tap", - "manipulators": [{ - "type": "basic", - "from": { - "key_code": "right_shift", - "modifiers": { - "optional": ["any"] - } - }, - "to": [{"key_code": "right_shift"}], - "to_if_alone": [{"key_code": "return_or_enter"}] - }] - }, - { - "description": "Right-Command / Backspace Mod-Tap", - "manipulators": [{ - "type": "basic", - "from": { - "key_code": "right_command", - "modifiers": { - "optional": ["any"] - } - }, - "to": [{"key_code": "right_command"}], - "to_if_alone": [{"key_code": "delete_or_backspace"}] - }] - }, - { - "description": "Right-Command Accents", - "manipulators": [ - { - "type": "basic", - "from": { - "key_code": "a", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["left_shift", "right_shift"] - } - }, - "to": [ - {"key_code": "grave_accent_and_tilde", "modifiers": ["left_option"]}, - {"key_code": "a"} - ] - }] - }, - { - "description": "Right Command Navigation", - "manipulators": [{ - "type": "basic", - "from": { - "key_code": "j", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "left_arrow"}] - }, - { - "type": "basic", - "from": { - "key_code": "k", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "down_arrow"}] - }, - { - "type": "basic", - "from": { - "key_code": "i", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "up_arrow"}] - }, - { - "type": "basic", - "from": { - "key_code": "l", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "right_arrow"}] - }, - { - "type": "basic", - "from": { - "key_code": "e", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "page_up"}] - }, - { - "type": "basic", - "from": { - "key_code": "d", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "page_down"}] - }, - { - "type": "basic", - "from": { - "key_code": "s", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "home"}] - }, - { - "type": "basic", - "from": { - "key_code": "f", - "modifiers": { - "mandatory": ["right_command"], - "optional": ["any"] - } - }, - "to": [{"key_code": "end"}] - }] - }] -} diff --git a/layouts/community/ortho_5x12/rs/keymap.c b/layouts/community/ortho_5x12/rs/keymap.c index f33dcc253632..15cbabaac14f 100644 --- a/layouts/community/ortho_5x12/rs/keymap.c +++ b/layouts/community/ortho_5x12/rs/keymap.c @@ -1,21 +1,8 @@ #include QMK_KEYBOARD_H - -enum layers { - _QWERTY, - _HYPER, -}; - -#define KC_ KC_TRNS - -#define KC_ESCC MT(MOD_LCTL, KC_ESC) -#define KC_RST RESET -#define KC_BSPH LT(_HYPER, KC_BSPC) -#define KC_ENTS MT(MOD_LSFT, KC_ENT) -// Brightness -#define KC_BRUP KC_PAUS -#define KC_BRDN KC_SLCK +#include "rs.h" // Used to create a keymap using only KC_ prefixed keys +#ifndef LAYOUT_kc #define LAYOUT_kc( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ @@ -30,9 +17,9 @@ enum layers { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b, \ KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_##k46, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b \ ) +#endif const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc( \ // ,-----------------------------------------------------------------------------------. GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , MINS , @@ -43,21 +30,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |------+------+------+------+------+------+------+------+------+------+------+------| LSFT , Z , X , C , V , B , N , M , COMM , DOT , SLSH , ENTS , // |------+------+------+------+------+------+------+------+------+------+------+------| - , LCTL , LALT , LGUI , SPC , SPC , BSPC , BSPH , LEFT , DOWN , UP , RGHT + , , LCTL , LALT , LGUI , SPC , SPC , BCOD , FN , , LEFT , RGHT // `---------------------------------------------------+-------------------------------' - ), // | - // | - [_HYPER] = LAYOUT_kc( /* V */ \ + ), + [_CODE] = LAYOUT_kc( + // ,-----------------------------------------------------------------------------------. + , , , , , , , , , , , , + // |------+------+------+------+------+------+------+------+------+------+------+------| + GRV , EXLM , AT , HASH , DLR , PERC , CIRC , LPLT , ASTR , RPGT , NEQL , , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , 1 , 2 , 3 , 4 , 5 , MINS , LBRC , UP , RBRC , , BSLS , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , 6 , 7 , 8 , 9 , 0 , AMPR , LEFT , DOWN , RGHT , , PIPE , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , , , , , DOT , , , , , , + // `-----------------------------------------------------------------------------------' + ), + [_FN] = LAYOUT_kc( // ,-----------------------------------------------------------------------------------. - RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , LBRC , RBRC , , + , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10 , F11 , // |------+------+------+------+------+------+------+------+------+------+------+------| - , , , PGUP , , , , , UP , LCBR , RCBR , BSLS , + , , , , , , , , , , , , // |------+------+------+------+------+------+------+------+------+------+------+------| - , , HOME , PGDN , END , , MINS , LEFT , DOWN , RGHT , , PIPE , + BLTG , BLUP , , , , BRMU , VOLU , , PGUP , , , , // |------+------+------+------+------+------+------+------+------+------+------+------| - , , , , , , , , , BRDN , BRUP , , + BLTG , BLDN , , , RST , BRMD , VOLD , CTRA , PGDN , CTRE , , , // |------+------+------+------+------+------+------+------+------+------+------+------| - , , , , , , , , MUTE , VOLD , VOLU , MPLY + , , , , , , MUTE , , , , , // `-----------------------------------------------------------------------------------' ), }; + diff --git a/layouts/community/ortho_5x12/rs/readme.md b/layouts/community/ortho_5x12/rs/readme.md index d75eefd5b9ce..d23ab66877a5 100644 --- a/layouts/community/ortho_5x12/rs/readme.md +++ b/layouts/community/ortho_5x12/rs/readme.md @@ -1,17 +1 @@ -# Code friendly 60% keymap - -I developped this keymap to make a better use of 60% ortho keyboards I use like the preonic of the iris. Instead of trying to mimic the Planck layout like the default preonic keymap, this keymap removes the raise and lower layers and offers a simpler hyper layer concept for a few missing sign keys and cursors / media keys. - -The important part for coders is that most important signs needed to code are available at their usual position on a full keyboard, without complex layer gymnastic. Access to [] and {} are available on the hyper layer at their usual emplacement. - -The right thumb is used for both backspace and hyper layer switching. On the hyper layer, in addition to some coding signs, you get the cursor keys arranged in cross, just under your right fingers, so you don't have to move your hand when navigating in code or command line. Other hand gets the home/end page up/down in a similar layout. - -Because you sometime have to use your internal keyboard when you use a macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the hyper layer / backspace on right command key etc. - -This keymap has been tested with those keyboards: -- [Preonic](../../../../keyboards/preonic/) -- [My preonic clone](../../../rs60/) - -Checkout an adaptation of this keymap for other keyboards: -- [Iris/rs](../../../../keyboards/iris/keymaps/rs/keymap.c) -- [ErgoTravel/rs](../../../../keyboards/ergotravel/keymaps/rs/keymap.c) \ No newline at end of file +See [rs readme](../../../../users/rs/readme.md). \ No newline at end of file diff --git a/layouts/community/ortho_5x12/xyverz/config.h b/layouts/community/ortho_5x12/xyverz/config.h index 4489c6e5f545..5f9f6e5c11c0 100644 --- a/layouts/community/ortho_5x12/xyverz/config.h +++ b/layouts/community/ortho_5x12/xyverz/config.h @@ -6,7 +6,9 @@ #define BACKLIGHT_LEVELS 8 /* ws2812 RGB LED */ +#ifndef RGBLIGHT_ENABLE #undef RGB_DI_PIN +#endif #if defined(KEYBOARD_preonic_rev2) #define RGB_DI_PIN B3 #undef RGBLED_NUM diff --git a/layouts/community/ortho_5x12/xyverz/keymap.c b/layouts/community/ortho_5x12/xyverz/keymap.c index 23a456e6d6d4..bbf1d7bb0eae 100644 --- a/layouts/community/ortho_5x12/xyverz/keymap.c +++ b/layouts/community/ortho_5x12/xyverz/keymap.c @@ -24,10 +24,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Aliases to keep the keymap tidy #define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. #define RGB_SWR RGB_M_SW // Swirl Animation alias diff --git a/layouts/community/ortho_5x15/wanleg/keymap.c b/layouts/community/ortho_5x15/wanleg/keymap.c index a98f61988cfa..ea4521d3d90c 100644 --- a/layouts/community/ortho_5x15/wanleg/keymap.c +++ b/layouts/community/ortho_5x15/wanleg/keymap.c @@ -11,7 +11,7 @@ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e \ ) \ LAYOUT_ortho_5x15_wrapper( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NLCK, QWERTY, GHERKIN, FUNCTION, \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, QWERTY, GHERKIN, FUNCTION, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NLCK, \ K00, K01, K02, K03, K04, K05, K0c, K0d, K0e, K06, K07, K08, K09, K0a, K0b, \ K10, K11, K12, K13, K14, K15, K1c, K1d, K1e, K16, K17, K18, K19, K1a, K1b, \ K20, K21, K22, K23, K24, K25, K2c, K2d, K2e, K26, K27, K28, K29, K2a, K2b, \ @@ -26,7 +26,7 @@ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e \ ) \ LAYOUT_ortho_5x15_wrapper( \ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NLCK, QWERTY, GHERKIN, FUNCTION, \ + QWERTY, GHERKIN, FUNCTION, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NLCK, \ K0c, K0d, K0e, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ K1c, K1d, K1e, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ K2c, K2d, K2e, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ @@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), #endif #else - /* Gherkin + /* Gherkin-Like * .--------------------------------------------------------------------------------------------------------------------------------------. * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | NUMLOCK| qwerty | gherkin| FN | * |-----------------------------------------------------------------------------------------------------------+--------+--------+--------| @@ -190,7 +190,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ________________SUPRA_Row_3________________, _______, _______, _______ ), -/* Gherkin Numbers +/* Gherkin-Like Numbers * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------------------------|--------+-----------------| @@ -210,7 +210,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______________NUMBERS_Row_3_______________, _______, _______, _______ ), -/* Gherkin Et Cetera +/* Gherkin-Like Et Cetera * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------------------------|--------+-----------------| @@ -230,7 +230,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______________ETCETERA_Row__3______________, _______, _______, _______ ), -/* Gherkin Directional Keys +/* Gherkin-Like Directional Keys * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------------------------|--------+-----------------| @@ -250,25 +250,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _____________DIRECTIONS_Row__3_____________, _______, _______, _______ ), - -/* FUNCTION +/* Gherkin FN/Lighting * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | | | WHEEL+ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | | | MOUS U | WHEEL- | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | + * |-----------------------------------------------------------------------------------------------------------|--------+-----------------| + * | | | | | + * | |--------+--------+--------| + * | 4x12 FN/Lighting LAYOUT | | | | + * | |--------+--------+--------| + * | | | | | + * | |--------+--------+--------| + * | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ + [_FN] = LAYOUT_75_base_wrapper( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, KC_WH_U, - RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, _______, _______, KC_MS_U, KC_WH_D, - _______, _______, _______, _______, _______, _______, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + _______, _______________Gherkin_FN_0________________, _______, _______, _______, _______, + _______, _______________Gherkin_FN_1________________, _______, _______, _______, _______, + _______, _______________Gherkin_FN_2________________, _______, _______, _______, _______, + _______, _________________BLANK_50__________________, _______, _______, _______, _______ ), }; diff --git a/layouts/default/75_iso/default_75_iso/keymap.c b/layouts/default/75_iso/default_75_iso/keymap.c new file mode 100644 index 000000000000..2fcca4d2b58b --- /dev/null +++ b/layouts/default/75_iso/default_75_iso/keymap.c @@ -0,0 +1,13 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* layer 0: qwerty */ + [0] = LAYOUT_75_iso(\ + 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_PAUS, KC_DEL, + 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_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_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_NUHS, KC_ENT, KC_PGDN, + 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; diff --git a/layouts/default/75_iso/layout.json b/layouts/default/75_iso/layout.json new file mode 100644 index 000000000000..6606d90e1d8d --- /dev/null +++ b/layouts/default/75_iso/layout.json @@ -0,0 +1,6 @@ +[{a:7},"","","","","","","","","","","","","","","",""], +["","","","","","","","","","","","","",{w:2},"",""], +[{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"",""], +[{w:1.75},"","","","","","","","","","","","","",{x:1.25},""], +[{w:1.25},"","","","","","","","","","","","",{w:1.75},"","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","","",""] diff --git a/layouts/default/75_iso/readme.md b/layouts/default/75_iso/readme.md new file mode 100644 index 000000000000..cbcaeaf9e571 --- /dev/null +++ b/layouts/default/75_iso/readme.md @@ -0,0 +1,3 @@ +# 75_iso + + LAYOUT_75_iso \ No newline at end of file diff --git a/layouts/default/numpad_5x4/default_numpad_5x4/keymap.c b/layouts/default/numpad_5x4/default_numpad_5x4/keymap.c index 1d68fb2f84d7..0e913248f2fd 100644 --- a/layouts/default/numpad_5x4/default_numpad_5x4/keymap.c +++ b/layouts/default/numpad_5x4/default_numpad_5x4/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_numpad_5x4( TG(1), KC_PSLS, KC_PAST, KC_PMNS, \ diff --git a/layouts/default/numpad_5x6/default_numpad_5x6/keymap.c b/layouts/default/numpad_5x6/default_numpad_5x6/keymap.c new file mode 100644 index 000000000000..527d08905295 --- /dev/null +++ b/layouts/default/numpad_5x6/default_numpad_5x6/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_numpad_5x6( + KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_PMNS, + KC_A, KC_B, KC_P7, KC_P8, KC_P9, + KC_C, KC_D, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_E, KC_F, KC_P1, KC_P2, KC_P3, + KC_LCTL, TG(1), KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT_numpad_5x6( + RESET, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_PMNS, + KC_A, KC_B, KC_HOME, KC_UP, KC_PGUP, + KC_C, KC_D, KC_LEFT, KC_NO, KC_RGHT, KC_PPLS, + KC_E, KC_F, KC_END, KC_DOWN, KC_PGDN, + KC_LCTL, _______, KC_INS, KC_DEL, KC_PENT + ), +}; diff --git a/layouts/default/numpad_5x6/layout.json b/layouts/default/numpad_5x6/layout.json new file mode 100644 index 000000000000..7264cd5a6dc6 --- /dev/null +++ b/layouts/default/numpad_5x6/layout.json @@ -0,0 +1,6 @@ +["","","",""], +[{y:0.5},"","","",""], +["","","",{h:2},""], +["","",""], +["","","",{h:2},""], +[{w:2},"",""] diff --git a/layouts/default/numpad_5x6/readme.md b/layouts/default/numpad_5x6/readme.md new file mode 100644 index 000000000000..147097c8371c --- /dev/null +++ b/layouts/default/numpad_5x6/readme.md @@ -0,0 +1,3 @@ +# numpad_5x6 + + LAYOUT_numpad_5x6 diff --git a/layouts/default/ortho_5x4/default_ortho_5x4/keymap.c b/layouts/default/ortho_5x4/default_ortho_5x4/keymap.c index 061f06c381d9..39d397d9096f 100644 --- a/layouts/default/ortho_5x4/default_ortho_5x4/keymap.c +++ b/layouts/default/ortho_5x4/default_ortho_5x4/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS -#define XXXXXXX KC_NO - enum custom_keycodes { KC_P00 = SAFE_RANGE }; diff --git a/lib/lib8tion/LICENSE b/lib/lib8tion/LICENSE new file mode 100644 index 000000000000..ebe476330b11 --- /dev/null +++ b/lib/lib8tion/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 FastLED + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lib/lib8tion/lib8tion.c b/lib/lib8tion/lib8tion.c new file mode 100644 index 000000000000..84b3e9c61c98 --- /dev/null +++ b/lib/lib8tion/lib8tion.c @@ -0,0 +1,242 @@ +#define FASTLED_INTERNAL +#include + +#define RAND16_SEED 1337 +uint16_t rand16seed = RAND16_SEED; + + +// memset8, memcpy8, memmove8: +// optimized avr replacements for the standard "C" library +// routines memset, memcpy, and memmove. +// +// There are two techniques that make these routines +// faster than the standard avr-libc routines. +// First, the loops are unrolled 2X, meaning that +// the average loop overhead is cut in half. +// And second, the compare-and-branch at the bottom +// of each loop decrements the low byte of the +// counter, and if the carry is clear, it branches +// back up immediately. Only if the low byte math +// causes carry do we bother to decrement the high +// byte and check that result for carry as well. +// Results for a 100-byte buffer are 20-40% faster +// than standard avr-libc, at a cost of a few extra +// bytes of code. + +#if defined(__AVR__) +//__attribute__ ((noinline)) +void * memset8 ( void * ptr, uint8_t val, uint16_t num ) +{ + asm volatile( + " movw r26, %[ptr] \n\t" + " sbrs %A[num], 0 \n\t" + " rjmp Lseteven_%= \n\t" + " rjmp Lsetodd_%= \n\t" + "Lsetloop_%=: \n\t" + " st X+, %[val] \n\t" + "Lsetodd_%=: \n\t" + " st X+, %[val] \n\t" + "Lseteven_%=: \n\t" + " subi %A[num], 2 \n\t" + " brcc Lsetloop_%= \n\t" + " sbci %B[num], 0 \n\t" + " brcc Lsetloop_%= \n\t" + : [num] "+r" (num) + : [ptr] "r" (ptr), + [val] "r" (val) + : "memory" + ); + return ptr; +} + + + +//__attribute__ ((noinline)) +void * memcpy8 ( void * dst, const void* src, uint16_t num ) +{ + asm volatile( + " movw r30, %[src] \n\t" + " movw r26, %[dst] \n\t" + " sbrs %A[num], 0 \n\t" + " rjmp Lcpyeven_%= \n\t" + " rjmp Lcpyodd_%= \n\t" + "Lcpyloop_%=: \n\t" + " ld __tmp_reg__, Z+ \n\t" + " st X+, __tmp_reg__ \n\t" + "Lcpyodd_%=: \n\t" + " ld __tmp_reg__, Z+ \n\t" + " st X+, __tmp_reg__ \n\t" + "Lcpyeven_%=: \n\t" + " subi %A[num], 2 \n\t" + " brcc Lcpyloop_%= \n\t" + " sbci %B[num], 0 \n\t" + " brcc Lcpyloop_%= \n\t" + : [num] "+r" (num) + : [src] "r" (src), + [dst] "r" (dst) + : "memory" + ); + return dst; +} + +//__attribute__ ((noinline)) +void * memmove8 ( void * dst, const void* src, uint16_t num ) +{ + if( src > dst) { + // if src > dst then we can use the forward-stepping memcpy8 + return memcpy8( dst, src, num); + } else { + // if src < dst then we have to step backward: + dst = (char*)dst + num; + src = (char*)src + num; + asm volatile( + " movw r30, %[src] \n\t" + " movw r26, %[dst] \n\t" + " sbrs %A[num], 0 \n\t" + " rjmp Lmoveven_%= \n\t" + " rjmp Lmovodd_%= \n\t" + "Lmovloop_%=: \n\t" + " ld __tmp_reg__, -Z \n\t" + " st -X, __tmp_reg__ \n\t" + "Lmovodd_%=: \n\t" + " ld __tmp_reg__, -Z \n\t" + " st -X, __tmp_reg__ \n\t" + "Lmoveven_%=: \n\t" + " subi %A[num], 2 \n\t" + " brcc Lmovloop_%= \n\t" + " sbci %B[num], 0 \n\t" + " brcc Lmovloop_%= \n\t" + : [num] "+r" (num) + : [src] "r" (src), + [dst] "r" (dst) + : "memory" + ); + return dst; + } +} + +#endif /* AVR */ + + + + +#if 0 +// TEST / VERIFICATION CODE ONLY BELOW THIS POINT +#include +#include "lib8tion.h" + +void test1abs( int8_t i) +{ + Serial.print("abs("); Serial.print(i); Serial.print(") = "); + int8_t j = abs8(i); + Serial.print(j); Serial.println(" "); +} + +void testabs() +{ + delay(5000); + for( int8_t q = -128; q != 127; q++) { + test1abs(q); + } + for(;;){}; +} + + +void testmul8() +{ + delay(5000); + byte r, c; + + Serial.println("mul8:"); + for( r = 0; r <= 20; r += 1) { + Serial.print(r); Serial.print(" : "); + for( c = 0; c <= 20; c += 1) { + byte t; + t = mul8( r, c); + Serial.print(t); Serial.print(' '); + } + Serial.println(' '); + } + Serial.println("done."); + for(;;){}; +} + + +void testscale8() +{ + delay(5000); + byte r, c; + + Serial.println("scale8:"); + for( r = 0; r <= 240; r += 10) { + Serial.print(r); Serial.print(" : "); + for( c = 0; c <= 240; c += 10) { + byte t; + t = scale8( r, c); + Serial.print(t); Serial.print(' '); + } + Serial.println(' '); + } + + Serial.println(' '); + Serial.println("scale8_video:"); + + for( r = 0; r <= 100; r += 4) { + Serial.print(r); Serial.print(" : "); + for( c = 0; c <= 100; c += 4) { + byte t; + t = scale8_video( r, c); + Serial.print(t); Serial.print(' '); + } + Serial.println(' '); + } + + Serial.println("done."); + for(;;){}; +} + + + +void testqadd8() +{ + delay(5000); + byte r, c; + for( r = 0; r <= 240; r += 10) { + Serial.print(r); Serial.print(" : "); + for( c = 0; c <= 240; c += 10) { + byte t; + t = qadd8( r, c); + Serial.print(t); Serial.print(' '); + } + Serial.println(' '); + } + Serial.println("done."); + for(;;){}; +} + +void testnscale8x3() +{ + delay(5000); + byte r, g, b, sc; + for( byte z = 0; z < 10; z++) { + r = random8(); g = random8(); b = random8(); sc = random8(); + + Serial.print("nscale8x3_video( "); + Serial.print(r); Serial.print(", "); + Serial.print(g); Serial.print(", "); + Serial.print(b); Serial.print(", "); + Serial.print(sc); Serial.print(") = [ "); + + nscale8x3_video( r, g, b, sc); + + Serial.print(r); Serial.print(", "); + Serial.print(g); Serial.print(", "); + Serial.print(b); Serial.print("]"); + + Serial.println(' '); + } + Serial.println("done."); + for(;;){}; +} + +#endif diff --git a/lib/lib8tion/lib8tion.h b/lib/lib8tion/lib8tion.h new file mode 100644 index 000000000000..4c770cbcb5e6 --- /dev/null +++ b/lib/lib8tion/lib8tion.h @@ -0,0 +1,934 @@ +#ifndef __INC_LIB8TION_H +#define __INC_LIB8TION_H + +/* + + Fast, efficient 8-bit math functions specifically + designed for high-performance LED programming. + + Because of the AVR(Arduino) and ARM assembly language + implementations provided, using these functions often + results in smaller and faster code than the equivalent + program using plain "C" arithmetic and logic. + + + Included are: + + + - Saturating unsigned 8-bit add and subtract. + Instead of wrapping around if an overflow occurs, + these routines just 'clamp' the output at a maxumum + of 255, or a minimum of 0. Useful for adding pixel + values. E.g., qadd8( 200, 100) = 255. + + qadd8( i, j) == MIN( (i + j), 0xFF ) + qsub8( i, j) == MAX( (i - j), 0 ) + + - Saturating signed 8-bit ("7-bit") add. + qadd7( i, j) == MIN( (i + j), 0x7F) + + + - Scaling (down) of unsigned 8- and 16- bit values. + Scaledown value is specified in 1/256ths. + scale8( i, sc) == (i * sc) / 256 + scale16by8( i, sc) == (i * sc) / 256 + + Example: scaling a 0-255 value down into a + range from 0-99: + downscaled = scale8( originalnumber, 100); + + A special version of scale8 is provided for scaling + LED brightness values, to make sure that they don't + accidentally scale down to total black at low + dimming levels, since that would look wrong: + scale8_video( i, sc) = ((i * sc) / 256) +? 1 + + Example: reducing an LED brightness by a + dimming factor: + new_bright = scale8_video( orig_bright, dimming); + + + - Fast 8- and 16- bit unsigned random numbers. + Significantly faster than Arduino random(), but + also somewhat less random. You can add entropy. + random8() == random from 0..255 + random8( n) == random from 0..(N-1) + random8( n, m) == random from N..(M-1) + + random16() == random from 0..65535 + random16( n) == random from 0..(N-1) + random16( n, m) == random from N..(M-1) + + random16_set_seed( k) == seed = k + random16_add_entropy( k) == seed += k + + + - Absolute value of a signed 8-bit value. + abs8( i) == abs( i) + + + - 8-bit math operations which return 8-bit values. + These are provided mostly for completeness, + not particularly for performance. + mul8( i, j) == (i * j) & 0xFF + add8( i, j) == (i + j) & 0xFF + sub8( i, j) == (i - j) & 0xFF + + + - Fast 16-bit approximations of sin and cos. + Input angle is a uint16_t from 0-65535. + Output is a signed int16_t from -32767 to 32767. + sin16( x) == sin( (x/32768.0) * pi) * 32767 + cos16( x) == cos( (x/32768.0) * pi) * 32767 + Accurate to more than 99% in all cases. + + - Fast 8-bit approximations of sin and cos. + Input angle is a uint8_t from 0-255. + Output is an UNsigned uint8_t from 0 to 255. + sin8( x) == (sin( (x/128.0) * pi) * 128) + 128 + cos8( x) == (cos( (x/128.0) * pi) * 128) + 128 + Accurate to within about 2%. + + + - Fast 8-bit "easing in/out" function. + ease8InOutCubic(x) == 3(x^i) - 2(x^3) + ease8InOutApprox(x) == + faster, rougher, approximation of cubic easing + ease8InOutQuad(x) == quadratic (vs cubic) easing + + - Cubic, Quadratic, and Triangle wave functions. + Input is a uint8_t representing phase withing the wave, + similar to how sin8 takes an angle 'theta'. + Output is a uint8_t representing the amplitude of + the wave at that point. + cubicwave8( x) + quadwave8( x) + triwave8( x) + + - Square root for 16-bit integers. About three times + faster and five times smaller than Arduino's built-in + generic 32-bit sqrt routine. + sqrt16( uint16_t x ) == sqrt( x) + + - Dimming and brightening functions for 8-bit + light values. + dim8_video( x) == scale8_video( x, x) + dim8_raw( x) == scale8( x, x) + dim8_lin( x) == (x<128) ? ((x+1)/2) : scale8(x,x) + brighten8_video( x) == 255 - dim8_video( 255 - x) + brighten8_raw( x) == 255 - dim8_raw( 255 - x) + brighten8_lin( x) == 255 - dim8_lin( 255 - x) + The dimming functions in particular are suitable + for making LED light output appear more 'linear'. + + + - Linear interpolation between two values, with the + fraction between them expressed as an 8- or 16-bit + fixed point fraction (fract8 or fract16). + lerp8by8( fromU8, toU8, fract8 ) + lerp16by8( fromU16, toU16, fract8 ) + lerp15by8( fromS16, toS16, fract8 ) + == from + (( to - from ) * fract8) / 256) + lerp16by16( fromU16, toU16, fract16 ) + == from + (( to - from ) * fract16) / 65536) + map8( in, rangeStart, rangeEnd) + == map( in, 0, 255, rangeStart, rangeEnd); + + - Optimized memmove, memcpy, and memset, that are + faster than standard avr-libc 1.8. + memmove8( dest, src, bytecount) + memcpy8( dest, src, bytecount) + memset8( buf, value, bytecount) + + - Beat generators which return sine or sawtooth + waves in a specified number of Beats Per Minute. + Sine wave beat generators can specify a low and + high range for the output. Sawtooth wave beat + generators always range 0-255 or 0-65535. + beatsin8( BPM, low8, high8) + = (sine(beatphase) * (high8-low8)) + low8 + beatsin16( BPM, low16, high16) + = (sine(beatphase) * (high16-low16)) + low16 + beatsin88( BPM88, low16, high16) + = (sine(beatphase) * (high16-low16)) + low16 + beat8( BPM) = 8-bit repeating sawtooth wave + beat16( BPM) = 16-bit repeating sawtooth wave + beat88( BPM88) = 16-bit repeating sawtooth wave + BPM is beats per minute in either simple form + e.g. 120, or Q8.8 fixed-point form. + BPM88 is beats per minute in ONLY Q8.8 fixed-point + form. + +Lib8tion is pronounced like 'libation': lie-BAY-shun + +*/ + + + +#include + +#define LIB8STATIC static inline +#define LIB8STATIC_ALWAYS_INLINE static inline + +#if !defined(__AVR__) +#include +// for memmove, memcpy, and memset if not defined here +#endif + +#if defined(__arm__) + +#if defined(FASTLED_TEENSY3) +// Can use Cortex M4 DSP instructions +#define QADD8_C 0 +#define QADD7_C 0 +#define QADD8_ARM_DSP_ASM 1 +#define QADD7_ARM_DSP_ASM 1 +#else +// Generic ARM +#define QADD8_C 1 +#define QADD7_C 1 +#endif + +#define QSUB8_C 1 +#define SCALE8_C 1 +#define SCALE16BY8_C 1 +#define SCALE16_C 1 +#define ABS8_C 1 +#define MUL8_C 1 +#define QMUL8_C 1 +#define ADD8_C 1 +#define SUB8_C 1 +#define EASE8_C 1 +#define AVG8_C 1 +#define AVG7_C 1 +#define AVG16_C 1 +#define AVG15_C 1 +#define BLEND8_C 1 + + +#elif defined(__AVR__) + +// AVR ATmega and friends Arduino + +#define QADD8_C 0 +#define QADD7_C 0 +#define QSUB8_C 0 +#define ABS8_C 0 +#define ADD8_C 0 +#define SUB8_C 0 +#define AVG8_C 0 +#define AVG7_C 0 +#define AVG16_C 0 +#define AVG15_C 0 + +#define QADD8_AVRASM 1 +#define QADD7_AVRASM 1 +#define QSUB8_AVRASM 1 +#define ABS8_AVRASM 1 +#define ADD8_AVRASM 1 +#define SUB8_AVRASM 1 +#define AVG8_AVRASM 1 +#define AVG7_AVRASM 1 +#define AVG16_AVRASM 1 +#define AVG15_AVRASM 1 + +// Note: these require hardware MUL instruction +// -- sorry, ATtiny! +#if !defined(LIB8_ATTINY) +#define SCALE8_C 0 +#define SCALE16BY8_C 0 +#define SCALE16_C 0 +#define MUL8_C 0 +#define QMUL8_C 0 +#define EASE8_C 0 +#define BLEND8_C 0 +#define SCALE8_AVRASM 1 +#define SCALE16BY8_AVRASM 1 +#define SCALE16_AVRASM 1 +#define MUL8_AVRASM 1 +#define QMUL8_AVRASM 1 +#define EASE8_AVRASM 1 +#define CLEANUP_R1_AVRASM 1 +#define BLEND8_AVRASM 1 +#else +// On ATtiny, we just use C implementations +#define SCALE8_C 1 +#define SCALE16BY8_C 1 +#define SCALE16_C 1 +#define MUL8_C 1 +#define QMUL8_C 1 +#define EASE8_C 1 +#define BLEND8_C 1 +#define SCALE8_AVRASM 0 +#define SCALE16BY8_AVRASM 0 +#define SCALE16_AVRASM 0 +#define MUL8_AVRASM 0 +#define QMUL8_AVRASM 0 +#define EASE8_AVRASM 0 +#define BLEND8_AVRASM 0 +#endif + +#else + +// unspecified architecture, so +// no ASM, everything in C +#define QADD8_C 1 +#define QADD7_C 1 +#define QSUB8_C 1 +#define SCALE8_C 1 +#define SCALE16BY8_C 1 +#define SCALE16_C 1 +#define ABS8_C 1 +#define MUL8_C 1 +#define QMUL8_C 1 +#define ADD8_C 1 +#define SUB8_C 1 +#define EASE8_C 1 +#define AVG8_C 1 +#define AVG7_C 1 +#define AVG16_C 1 +#define AVG15_C 1 +#define BLEND8_C 1 + +#endif + +///@defgroup lib8tion Fast math functions +///A variety of functions for working with numbers. +///@{ + + +/////////////////////////////////////////////////////////////////////// +// +// typdefs for fixed-point fractional types. +// +// sfract7 should be interpreted as signed 128ths. +// fract8 should be interpreted as unsigned 256ths. +// sfract15 should be interpreted as signed 32768ths. +// fract16 should be interpreted as unsigned 65536ths. +// +// Example: if a fract8 has the value "64", that should be interpreted +// as 64/256ths, or one-quarter. +// +// +// fract8 range is 0 to 0.99609375 +// in steps of 0.00390625 +// +// sfract7 range is -0.9921875 to 0.9921875 +// in steps of 0.0078125 +// +// fract16 range is 0 to 0.99998474121 +// in steps of 0.00001525878 +// +// sfract15 range is -0.99996948242 to 0.99996948242 +// in steps of 0.00003051757 +// + +/// ANSI unsigned short _Fract. range is 0 to 0.99609375 +/// in steps of 0.00390625 +typedef uint8_t fract8; ///< ANSI: unsigned short _Fract + +/// ANSI: signed short _Fract. range is -0.9921875 to 0.9921875 +/// in steps of 0.0078125 +typedef int8_t sfract7; ///< ANSI: signed short _Fract + +/// ANSI: unsigned _Fract. range is 0 to 0.99998474121 +/// in steps of 0.00001525878 +typedef uint16_t fract16; ///< ANSI: unsigned _Fract + +/// ANSI: signed _Fract. range is -0.99996948242 to 0.99996948242 +/// in steps of 0.00003051757 +typedef int16_t sfract15; ///< ANSI: signed _Fract + + +// accumXY types should be interpreted as X bits of integer, +// and Y bits of fraction. +// E.g., accum88 has 8 bits of int, 8 bits of fraction + +typedef uint16_t accum88; ///< ANSI: unsigned short _Accum. 8 bits int, 8 bits fraction +typedef int16_t saccum78; ///< ANSI: signed short _Accum. 7 bits int, 8 bits fraction +typedef uint32_t accum1616;///< ANSI: signed _Accum. 16 bits int, 16 bits fraction +typedef int32_t saccum1516;///< ANSI: signed _Accum. 15 bits int, 16 bits fraction +typedef uint16_t accum124; ///< no direct ANSI counterpart. 12 bits int, 4 bits fraction +typedef int32_t saccum114;///< no direct ANSI counterpart. 1 bit int, 14 bits fraction + + + +#include "math8.h" +#include "scale8.h" +#include "random8.h" +#include "trig8.h" + +/////////////////////////////////////////////////////////////////////// + + + + + + + +/////////////////////////////////////////////////////////////////////// +// +// float-to-fixed and fixed-to-float conversions +// +// Note that anything involving a 'float' on AVR will be slower. + +/// sfract15ToFloat: conversion from sfract15 fixed point to +/// IEEE754 32-bit float. +LIB8STATIC float sfract15ToFloat( sfract15 y) +{ + return y / 32768.0; +} + +/// conversion from IEEE754 float in the range (-1,1) +/// to 16-bit fixed point. Note that the extremes of +/// one and negative one are NOT representable. The +/// representable range is basically +LIB8STATIC sfract15 floatToSfract15( float f) +{ + return f * 32768.0; +} + + + +/////////////////////////////////////////////////////////////////////// +// +// memmove8, memcpy8, and memset8: +// alternatives to memmove, memcpy, and memset that are +// faster on AVR than standard avr-libc 1.8 + +#if defined(__AVR__) +void * memmove8( void * dst, const void * src, uint16_t num ); +void * memcpy8 ( void * dst, const void * src, uint16_t num ) __attribute__ ((noinline)); +void * memset8 ( void * ptr, uint8_t value, uint16_t num ) __attribute__ ((noinline)) ; +#else +// on non-AVR platforms, these names just call standard libc. +#define memmove8 memmove +#define memcpy8 memcpy +#define memset8 memset +#endif + + +/////////////////////////////////////////////////////////////////////// +// +// linear interpolation, such as could be used for Perlin noise, etc. +// + +// A note on the structure of the lerp functions: +// The cases for b>a and b<=a are handled separately for +// speed: without knowing the relative order of a and b, +// the value (a-b) might be overflow the width of a or b, +// and have to be promoted to a wider, slower type. +// To avoid that, we separate the two cases, and are able +// to do all the math in the same width as the arguments, +// which is much faster and smaller on AVR. + +/// linear interpolation between two unsigned 8-bit values, +/// with 8-bit fraction +LIB8STATIC uint8_t lerp8by8( uint8_t a, uint8_t b, fract8 frac) +{ + uint8_t result; + if( b > a) { + uint8_t delta = b - a; + uint8_t scaled = scale8( delta, frac); + result = a + scaled; + } else { + uint8_t delta = a - b; + uint8_t scaled = scale8( delta, frac); + result = a - scaled; + } + return result; +} + +/// linear interpolation between two unsigned 16-bit values, +/// with 16-bit fraction +LIB8STATIC uint16_t lerp16by16( uint16_t a, uint16_t b, fract16 frac) +{ + uint16_t result; + if( b > a ) { + uint16_t delta = b - a; + uint16_t scaled = scale16(delta, frac); + result = a + scaled; + } else { + uint16_t delta = a - b; + uint16_t scaled = scale16( delta, frac); + result = a - scaled; + } + return result; +} + +/// linear interpolation between two unsigned 16-bit values, +/// with 8-bit fraction +LIB8STATIC uint16_t lerp16by8( uint16_t a, uint16_t b, fract8 frac) +{ + uint16_t result; + if( b > a) { + uint16_t delta = b - a; + uint16_t scaled = scale16by8( delta, frac); + result = a + scaled; + } else { + uint16_t delta = a - b; + uint16_t scaled = scale16by8( delta, frac); + result = a - scaled; + } + return result; +} + +/// linear interpolation between two signed 15-bit values, +/// with 8-bit fraction +LIB8STATIC int16_t lerp15by8( int16_t a, int16_t b, fract8 frac) +{ + int16_t result; + if( b > a) { + uint16_t delta = b - a; + uint16_t scaled = scale16by8( delta, frac); + result = a + scaled; + } else { + uint16_t delta = a - b; + uint16_t scaled = scale16by8( delta, frac); + result = a - scaled; + } + return result; +} + +/// linear interpolation between two signed 15-bit values, +/// with 8-bit fraction +LIB8STATIC int16_t lerp15by16( int16_t a, int16_t b, fract16 frac) +{ + int16_t result; + if( b > a) { + uint16_t delta = b - a; + uint16_t scaled = scale16( delta, frac); + result = a + scaled; + } else { + uint16_t delta = a - b; + uint16_t scaled = scale16( delta, frac); + result = a - scaled; + } + return result; +} + +/// map8: map from one full-range 8-bit value into a narrower +/// range of 8-bit values, possibly a range of hues. +/// +/// E.g. map myValue into a hue in the range blue..purple..pink..red +/// hue = map8( myValue, HUE_BLUE, HUE_RED); +/// +/// Combines nicely with the waveform functions (like sin8, etc) +/// to produce continuous hue gradients back and forth: +/// +/// hue = map8( sin8( myValue), HUE_BLUE, HUE_RED); +/// +/// Mathematically simiar to lerp8by8, but arguments are more +/// like Arduino's "map"; this function is similar to +/// +/// map( in, 0, 255, rangeStart, rangeEnd) +/// +/// but faster and specifically designed for 8-bit values. +LIB8STATIC uint8_t map8( uint8_t in, uint8_t rangeStart, uint8_t rangeEnd) +{ + uint8_t rangeWidth = rangeEnd - rangeStart; + uint8_t out = scale8( in, rangeWidth); + out += rangeStart; + return out; +} + + +/////////////////////////////////////////////////////////////////////// +// +// easing functions; see http://easings.net +// + +/// ease8InOutQuad: 8-bit quadratic ease-in / ease-out function +/// Takes around 13 cycles on AVR +#if EASE8_C == 1 +LIB8STATIC uint8_t ease8InOutQuad( uint8_t i) +{ + uint8_t j = i; + if( j & 0x80 ) { + j = 255 - j; + } + uint8_t jj = scale8( j, j); + uint8_t jj2 = jj << 1; + if( i & 0x80 ) { + jj2 = 255 - jj2; + } + return jj2; +} + +#elif EASE8_AVRASM == 1 +// This AVR asm version of ease8InOutQuad preserves one more +// low-bit of precision than the C version, and is also slightly +// smaller and faster. +LIB8STATIC uint8_t ease8InOutQuad(uint8_t val) { + uint8_t j=val; + asm volatile ( + "sbrc %[val], 7 \n" + "com %[j] \n" + "mul %[j], %[j] \n" + "add r0, %[j] \n" + "ldi %[j], 0 \n" + "adc %[j], r1 \n" + "lsl r0 \n" // carry = high bit of low byte of mul product + "rol %[j] \n" // j = (j * 2) + carry // preserve add'l bit of precision + "sbrc %[val], 7 \n" + "com %[j] \n" + "clr __zero_reg__ \n" + : [j] "+&a" (j) + : [val] "a" (val) + : "r0", "r1" + ); + return j; +} + +#else +#error "No implementation for ease8InOutQuad available." +#endif + +/// ease16InOutQuad: 16-bit quadratic ease-in / ease-out function +// C implementation at this point +LIB8STATIC uint16_t ease16InOutQuad( uint16_t i) +{ + uint16_t j = i; + if( j & 0x8000 ) { + j = 65535 - j; + } + uint16_t jj = scale16( j, j); + uint16_t jj2 = jj << 1; + if( i & 0x8000 ) { + jj2 = 65535 - jj2; + } + return jj2; +} + + +/// ease8InOutCubic: 8-bit cubic ease-in / ease-out function +/// Takes around 18 cycles on AVR +LIB8STATIC fract8 ease8InOutCubic( fract8 i) +{ + uint8_t ii = scale8_LEAVING_R1_DIRTY( i, i); + uint8_t iii = scale8_LEAVING_R1_DIRTY( ii, i); + + uint16_t r1 = (3 * (uint16_t)(ii)) - ( 2 * (uint16_t)(iii)); + + /* the code generated for the above *'s automatically + cleans up R1, so there's no need to explicitily call + cleanup_R1(); */ + + uint8_t result = r1; + + // if we got "256", return 255: + if( r1 & 0x100 ) { + result = 255; + } + return result; +} + +/// ease8InOutApprox: fast, rough 8-bit ease-in/ease-out function +/// shaped approximately like 'ease8InOutCubic', +/// it's never off by more than a couple of percent +/// from the actual cubic S-curve, and it executes +/// more than twice as fast. Use when the cycles +/// are more important than visual smoothness. +/// Asm version takes around 7 cycles on AVR. + +#if EASE8_C == 1 +LIB8STATIC fract8 ease8InOutApprox( fract8 i) +{ + if( i < 64) { + // start with slope 0.5 + i /= 2; + } else if( i > (255 - 64)) { + // end with slope 0.5 + i = 255 - i; + i /= 2; + i = 255 - i; + } else { + // in the middle, use slope 192/128 = 1.5 + i -= 64; + i += (i / 2); + i += 32; + } + + return i; +} + +#elif EASE8_AVRASM == 1 +LIB8STATIC uint8_t ease8InOutApprox( fract8 i) +{ + // takes around 7 cycles on AVR + asm volatile ( + " subi %[i], 64 \n\t" + " cpi %[i], 128 \n\t" + " brcc Lshift_%= \n\t" + + // middle case + " mov __tmp_reg__, %[i] \n\t" + " lsr __tmp_reg__ \n\t" + " add %[i], __tmp_reg__ \n\t" + " subi %[i], 224 \n\t" + " rjmp Ldone_%= \n\t" + + // start or end case + "Lshift_%=: \n\t" + " lsr %[i] \n\t" + " subi %[i], 96 \n\t" + + "Ldone_%=: \n\t" + + : [i] "+&a" (i) + : + : "r0", "r1" + ); + return i; +} +#else +#error "No implementation for ease8 available." +#endif + + + +/// triwave8: triangle (sawtooth) wave generator. Useful for +/// turning a one-byte ever-increasing value into a +/// one-byte value that oscillates up and down. +/// +/// input output +/// 0..127 0..254 (positive slope) +/// 128..255 254..0 (negative slope) +/// +/// On AVR this function takes just three cycles. +/// +LIB8STATIC uint8_t triwave8(uint8_t in) +{ + if( in & 0x80) { + in = 255 - in; + } + uint8_t out = in << 1; + return out; +} + + +// quadwave8 and cubicwave8: S-shaped wave generators (like 'sine'). +// Useful for turning a one-byte 'counter' value into a +// one-byte oscillating value that moves smoothly up and down, +// with an 'acceleration' and 'deceleration' curve. +// +// These are even faster than 'sin8', and have +// slightly different curve shapes. +// + +/// quadwave8: quadratic waveform generator. Spends just a little more +/// time at the limits than 'sine' does. +LIB8STATIC uint8_t quadwave8(uint8_t in) +{ + return ease8InOutQuad( triwave8( in)); +} + +/// cubicwave8: cubic waveform generator. Spends visibly more time +/// at the limits than 'sine' does. +LIB8STATIC uint8_t cubicwave8(uint8_t in) +{ + return ease8InOutCubic( triwave8( in)); +} + +/// squarewave8: square wave generator. Useful for +/// turning a one-byte ever-increasing value +/// into a one-byte value that is either 0 or 255. +/// The width of the output 'pulse' is +/// determined by the pulsewidth argument: +/// +///~~~ +/// If pulsewidth is 255, output is always 255. +/// If pulsewidth < 255, then +/// if input < pulsewidth then output is 255 +/// if input >= pulsewidth then output is 0 +///~~~ +/// +/// the output looking like: +/// +///~~~ +/// 255 +--pulsewidth--+ +/// . | | +/// 0 0 +--------(256-pulsewidth)-------- +///~~~ +/// +/// @param in +/// @param pulsewidth +/// @returns square wave output +LIB8STATIC uint8_t squarewave8( uint8_t in, uint8_t pulsewidth) +{ + if( in < pulsewidth || (pulsewidth == 255)) { + return 255; + } else { + return 0; + } +} + + +// Beat generators - These functions produce waves at a given +// number of 'beats per minute'. Internally, they use +// the Arduino function 'millis' to track elapsed time. +// Accuracy is a bit better than one part in a thousand. +// +// beat8( BPM ) returns an 8-bit value that cycles 'BPM' times +// per minute, rising from 0 to 255, resetting to zero, +// rising up again, etc.. The output of this function +// is suitable for feeding directly into sin8, and cos8, +// triwave8, quadwave8, and cubicwave8. +// beat16( BPM ) returns a 16-bit value that cycles 'BPM' times +// per minute, rising from 0 to 65535, resetting to zero, +// rising up again, etc. The output of this function is +// suitable for feeding directly into sin16 and cos16. +// beat88( BPM88) is the same as beat16, except that the BPM88 argument +// MUST be in Q8.8 fixed point format, e.g. 120BPM must +// be specified as 120*256 = 30720. +// beatsin8( BPM, uint8_t low, uint8_t high) returns an 8-bit value that +// rises and falls in a sine wave, 'BPM' times per minute, +// between the values of 'low' and 'high'. +// beatsin16( BPM, uint16_t low, uint16_t high) returns a 16-bit value +// that rises and falls in a sine wave, 'BPM' times per +// minute, between the values of 'low' and 'high'. +// beatsin88( BPM88, ...) is the same as beatsin16, except that the +// BPM88 argument MUST be in Q8.8 fixed point format, +// e.g. 120BPM must be specified as 120*256 = 30720. +// +// BPM can be supplied two ways. The simpler way of specifying BPM is as +// a simple 8-bit integer from 1-255, (e.g., "120"). +// The more sophisticated way of specifying BPM allows for fractional +// "Q8.8" fixed point number (an 'accum88') with an 8-bit integer part and +// an 8-bit fractional part. The easiest way to construct this is to multiply +// a floating point BPM value (e.g. 120.3) by 256, (e.g. resulting in 30796 +// in this case), and pass that as the 16-bit BPM argument. +// "BPM88" MUST always be specified in Q8.8 format. +// +// Originally designed to make an entire animation project pulse with brightness. +// For that effect, add this line just above your existing call to "FastLED.show()": +// +// uint8_t bright = beatsin8( 60 /*BPM*/, 192 /*dimmest*/, 255 /*brightest*/ )); +// FastLED.setBrightness( bright ); +// FastLED.show(); +// +// The entire animation will now pulse between brightness 192 and 255 once per second. + + +// The beat generators need access to a millisecond counter. +// On Arduino, this is "millis()". On other platforms, you'll +// need to provide a function with this signature: +// uint32_t get_millisecond_timer(); +// that provides similar functionality. +// You can also force use of the get_millisecond_timer function +// by #defining USE_GET_MILLISECOND_TIMER. +#if (defined(ARDUINO) || defined(SPARK) || defined(FASTLED_HAS_MILLIS)) && !defined(USE_GET_MILLISECOND_TIMER) +// Forward declaration of Arduino function 'millis'. +//uint32_t millis(); +#define GET_MILLIS millis +#else +uint32_t get_millisecond_timer(void); +#define GET_MILLIS get_millisecond_timer +#endif + +// beat16 generates a 16-bit 'sawtooth' wave at a given BPM, +/// with BPM specified in Q8.8 fixed-point format; e.g. +/// for this function, 120 BPM MUST BE specified as +/// 120*256 = 30720. +/// If you just want to specify "120", use beat16 or beat8. +LIB8STATIC uint16_t beat88( accum88 beats_per_minute_88, uint32_t timebase) +{ + // BPM is 'beats per minute', or 'beats per 60000ms'. + // To avoid using the (slower) division operator, we + // want to convert 'beats per 60000ms' to 'beats per 65536ms', + // and then use a simple, fast bit-shift to divide by 65536. + // + // The ratio 65536:60000 is 279.620266667:256; we'll call it 280:256. + // The conversion is accurate to about 0.05%, more or less, + // e.g. if you ask for "120 BPM", you'll get about "119.93". + return (((GET_MILLIS()) - timebase) * beats_per_minute_88 * 280) >> 16; +} + +/// beat16 generates a 16-bit 'sawtooth' wave at a given BPM +LIB8STATIC uint16_t beat16( accum88 beats_per_minute, uint32_t timebase) +{ + // Convert simple 8-bit BPM's to full Q8.8 accum88's if needed + if( beats_per_minute < 256) beats_per_minute <<= 8; + return beat88(beats_per_minute, timebase); +} + +/// beat8 generates an 8-bit 'sawtooth' wave at a given BPM +LIB8STATIC uint8_t beat8( accum88 beats_per_minute, uint32_t timebase) +{ + return beat16( beats_per_minute, timebase) >> 8; +} + +/// beatsin88 generates a 16-bit sine wave at a given BPM, +/// that oscillates within a given range. +/// For this function, BPM MUST BE SPECIFIED as +/// a Q8.8 fixed-point value; e.g. 120BPM must be +/// specified as 120*256 = 30720. +/// If you just want to specify "120", use beatsin16 or beatsin8. +LIB8STATIC uint16_t beatsin88( accum88 beats_per_minute_88, uint16_t lowest, uint16_t highest, uint32_t timebase, uint16_t phase_offset) +{ + uint16_t beat = beat88( beats_per_minute_88, timebase); + uint16_t beatsin = (sin16( beat + phase_offset) + 32768); + uint16_t rangewidth = highest - lowest; + uint16_t scaledbeat = scale16( beatsin, rangewidth); + uint16_t result = lowest + scaledbeat; + return result; +} + +/// beatsin16 generates a 16-bit sine wave at a given BPM, +/// that oscillates within a given range. +LIB8STATIC uint16_t beatsin16(accum88 beats_per_minute, uint16_t lowest, uint16_t highest, uint32_t timebase, uint16_t phase_offset) +{ + uint16_t beat = beat16( beats_per_minute, timebase); + uint16_t beatsin = (sin16( beat + phase_offset) + 32768); + uint16_t rangewidth = highest - lowest; + uint16_t scaledbeat = scale16( beatsin, rangewidth); + uint16_t result = lowest + scaledbeat; + return result; +} + +/// beatsin8 generates an 8-bit sine wave at a given BPM, +/// that oscillates within a given range. +LIB8STATIC uint8_t beatsin8( accum88 beats_per_minute, uint8_t lowest, uint8_t highest, uint32_t timebase, uint8_t phase_offset) +{ + uint8_t beat = beat8( beats_per_minute, timebase); + uint8_t beatsin = sin8( beat + phase_offset); + uint8_t rangewidth = highest - lowest; + uint8_t scaledbeat = scale8( beatsin, rangewidth); + uint8_t result = lowest + scaledbeat; + return result; +} + + +/// Return the current seconds since boot in a 16-bit value. Used as part of the +/// "every N time-periods" mechanism +LIB8STATIC uint16_t seconds16(void) +{ + uint32_t ms = GET_MILLIS(); + uint16_t s16; + s16 = ms / 1000; + return s16; +} + +/// Return the current minutes since boot in a 16-bit value. Used as part of the +/// "every N time-periods" mechanism +LIB8STATIC uint16_t minutes16(void) +{ + uint32_t ms = GET_MILLIS(); + uint16_t m16; + m16 = (ms / (60000L)) & 0xFFFF; + return m16; +} + +/// Return the current hours since boot in an 8-bit value. Used as part of the +/// "every N time-periods" mechanism +LIB8STATIC uint8_t hours8(void) +{ + uint32_t ms = GET_MILLIS(); + uint8_t h8; + h8 = (ms / (3600000L)) & 0xFF; + return h8; +} + +///@} + +#endif diff --git a/lib/lib8tion/math8.h b/lib/lib8tion/math8.h new file mode 100644 index 000000000000..8c6b6c227e34 --- /dev/null +++ b/lib/lib8tion/math8.h @@ -0,0 +1,552 @@ +#ifndef __INC_LIB8TION_MATH_H +#define __INC_LIB8TION_MATH_H + +#include "scale8.h" + +///@ingroup lib8tion + +///@defgroup Math Basic math operations +/// Fast, efficient 8-bit math functions specifically +/// designed for high-performance LED programming. +/// +/// Because of the AVR(Arduino) and ARM assembly language +/// implementations provided, using these functions often +/// results in smaller and faster code than the equivalent +/// program using plain "C" arithmetic and logic. +///@{ + + +/// add one byte to another, saturating at 0xFF +/// @param i - first byte to add +/// @param j - second byte to add +/// @returns the sum of i & j, capped at 0xFF +LIB8STATIC_ALWAYS_INLINE uint8_t qadd8( uint8_t i, uint8_t j) +{ +#if QADD8_C == 1 + uint16_t t = i + j; + if (t > 255) t = 255; + return t; +#elif QADD8_AVRASM == 1 + asm volatile( + /* First, add j to i, conditioning the C flag */ + "add %0, %1 \n\t" + + /* Now test the C flag. + If C is clear, we branch around a load of 0xFF into i. + If C is set, we go ahead and load 0xFF into i. + */ + "brcc L_%= \n\t" + "ldi %0, 0xFF \n\t" + "L_%=: " + : "+a" (i) + : "a" (j) ); + return i; +#elif QADD8_ARM_DSP_ASM == 1 + asm volatile( "uqadd8 %0, %0, %1" : "+r" (i) : "r" (j)); + return i; +#else +#error "No implementation for qadd8 available." +#endif +} + +/// Add one byte to another, saturating at 0x7F +/// @param i - first byte to add +/// @param j - second byte to add +/// @returns the sum of i & j, capped at 0xFF +LIB8STATIC_ALWAYS_INLINE int8_t qadd7( int8_t i, int8_t j) +{ +#if QADD7_C == 1 + int16_t t = i + j; + if (t > 127) t = 127; + return t; +#elif QADD7_AVRASM == 1 + asm volatile( + /* First, add j to i, conditioning the V flag */ + "add %0, %1 \n\t" + + /* Now test the V flag. + If V is clear, we branch around a load of 0x7F into i. + If V is set, we go ahead and load 0x7F into i. + */ + "brvc L_%= \n\t" + "ldi %0, 0x7F \n\t" + "L_%=: " + : "+a" (i) + : "a" (j) ); + + return i; +#elif QADD7_ARM_DSP_ASM == 1 + asm volatile( "qadd8 %0, %0, %1" : "+r" (i) : "r" (j)); + return i; +#else +#error "No implementation for qadd7 available." +#endif +} + +/// subtract one byte from another, saturating at 0x00 +/// @returns i - j with a floor of 0 +LIB8STATIC_ALWAYS_INLINE uint8_t qsub8( uint8_t i, uint8_t j) +{ +#if QSUB8_C == 1 + int16_t t = i - j; + if (t < 0) t = 0; + return t; +#elif QSUB8_AVRASM == 1 + + asm volatile( + /* First, subtract j from i, conditioning the C flag */ + "sub %0, %1 \n\t" + + /* Now test the C flag. + If C is clear, we branch around a load of 0x00 into i. + If C is set, we go ahead and load 0x00 into i. + */ + "brcc L_%= \n\t" + "ldi %0, 0x00 \n\t" + "L_%=: " + : "+a" (i) + : "a" (j) ); + + return i; +#else +#error "No implementation for qsub8 available." +#endif +} + +/// add one byte to another, with one byte result +LIB8STATIC_ALWAYS_INLINE uint8_t add8( uint8_t i, uint8_t j) +{ +#if ADD8_C == 1 + uint16_t t = i + j; + return t; +#elif ADD8_AVRASM == 1 + // Add j to i, period. + asm volatile( "add %0, %1" : "+a" (i) : "a" (j)); + return i; +#else +#error "No implementation for add8 available." +#endif +} + +/// add one byte to another, with one byte result +LIB8STATIC_ALWAYS_INLINE uint16_t add8to16( uint8_t i, uint16_t j) +{ +#if ADD8_C == 1 + uint16_t t = i + j; + return t; +#elif ADD8_AVRASM == 1 + // Add i(one byte) to j(two bytes) + asm volatile( "add %A[j], %[i] \n\t" + "adc %B[j], __zero_reg__ \n\t" + : [j] "+a" (j) + : [i] "a" (i) + ); + return i; +#else +#error "No implementation for add8to16 available." +#endif +} + + +/// subtract one byte from another, 8-bit result +LIB8STATIC_ALWAYS_INLINE uint8_t sub8( uint8_t i, uint8_t j) +{ +#if SUB8_C == 1 + int16_t t = i - j; + return t; +#elif SUB8_AVRASM == 1 + // Subtract j from i, period. + asm volatile( "sub %0, %1" : "+a" (i) : "a" (j)); + return i; +#else +#error "No implementation for sub8 available." +#endif +} + +/// Calculate an integer average of two unsigned +/// 8-bit integer values (uint8_t). +/// Fractional results are rounded down, e.g. avg8(20,41) = 30 +LIB8STATIC_ALWAYS_INLINE uint8_t avg8( uint8_t i, uint8_t j) +{ +#if AVG8_C == 1 + return (i + j) >> 1; +#elif AVG8_AVRASM == 1 + asm volatile( + /* First, add j to i, 9th bit overflows into C flag */ + "add %0, %1 \n\t" + /* Divide by two, moving C flag into high 8th bit */ + "ror %0 \n\t" + : "+a" (i) + : "a" (j) ); + return i; +#else +#error "No implementation for avg8 available." +#endif +} + +/// Calculate an integer average of two unsigned +/// 16-bit integer values (uint16_t). +/// Fractional results are rounded down, e.g. avg16(20,41) = 30 +LIB8STATIC_ALWAYS_INLINE uint16_t avg16( uint16_t i, uint16_t j) +{ +#if AVG16_C == 1 + return (uint32_t)((uint32_t)(i) + (uint32_t)(j)) >> 1; +#elif AVG16_AVRASM == 1 + asm volatile( + /* First, add jLo (heh) to iLo, 9th bit overflows into C flag */ + "add %A[i], %A[j] \n\t" + /* Now, add C + jHi to iHi, 17th bit overflows into C flag */ + "adc %B[i], %B[j] \n\t" + /* Divide iHi by two, moving C flag into high 16th bit, old 9th bit now in C */ + "ror %B[i] \n\t" + /* Divide iLo by two, moving C flag into high 8th bit */ + "ror %A[i] \n\t" + : [i] "+a" (i) + : [j] "a" (j) ); + return i; +#else +#error "No implementation for avg16 available." +#endif +} + + +/// Calculate an integer average of two signed 7-bit +/// integers (int8_t) +/// If the first argument is even, result is rounded down. +/// If the first argument is odd, result is result up. +LIB8STATIC_ALWAYS_INLINE int8_t avg7( int8_t i, int8_t j) +{ +#if AVG7_C == 1 + return ((i + j) >> 1) + (i & 0x1); +#elif AVG7_AVRASM == 1 + asm volatile( + "asr %1 \n\t" + "asr %0 \n\t" + "adc %0, %1 \n\t" + : "+a" (i) + : "a" (j) ); + return i; +#else +#error "No implementation for avg7 available." +#endif +} + +/// Calculate an integer average of two signed 15-bit +/// integers (int16_t) +/// If the first argument is even, result is rounded down. +/// If the first argument is odd, result is result up. +LIB8STATIC_ALWAYS_INLINE int16_t avg15( int16_t i, int16_t j) +{ +#if AVG15_C == 1 + return ((int32_t)((int32_t)(i) + (int32_t)(j)) >> 1) + (i & 0x1); +#elif AVG15_AVRASM == 1 + asm volatile( + /* first divide j by 2, throwing away lowest bit */ + "asr %B[j] \n\t" + "ror %A[j] \n\t" + /* now divide i by 2, with lowest bit going into C */ + "asr %B[i] \n\t" + "ror %A[i] \n\t" + /* add j + C to i */ + "adc %A[i], %A[j] \n\t" + "adc %B[i], %B[j] \n\t" + : [i] "+a" (i) + : [j] "a" (j) ); + return i; +#else +#error "No implementation for avg15 available." +#endif +} + + +/// Calculate the remainder of one unsigned 8-bit +/// value divided by anoter, aka A % M. +/// Implemented by repeated subtraction, which is +/// very compact, and very fast if A is 'probably' +/// less than M. If A is a large multiple of M, +/// the loop has to execute multiple times. However, +/// even in that case, the loop is only two +/// instructions long on AVR, i.e., quick. +LIB8STATIC_ALWAYS_INLINE uint8_t mod8( uint8_t a, uint8_t m) +{ +#if defined(__AVR__) + asm volatile ( + "L_%=: sub %[a],%[m] \n\t" + " brcc L_%= \n\t" + " add %[a],%[m] \n\t" + : [a] "+r" (a) + : [m] "r" (m) + ); +#else + while( a >= m) a -= m; +#endif + return a; +} + +/// Add two numbers, and calculate the modulo +/// of the sum and a third number, M. +/// In other words, it returns (A+B) % M. +/// It is designed as a compact mechanism for +/// incrementing a 'mode' switch and wrapping +/// around back to 'mode 0' when the switch +/// goes past the end of the available range. +/// e.g. if you have seven modes, this switches +/// to the next one and wraps around if needed: +/// mode = addmod8( mode, 1, 7); +///LIB8STATIC_ALWAYS_INLINESee 'mod8' for notes on performance. +LIB8STATIC uint8_t addmod8( uint8_t a, uint8_t b, uint8_t m) +{ +#if defined(__AVR__) + asm volatile ( + " add %[a],%[b] \n\t" + "L_%=: sub %[a],%[m] \n\t" + " brcc L_%= \n\t" + " add %[a],%[m] \n\t" + : [a] "+r" (a) + : [b] "r" (b), [m] "r" (m) + ); +#else + a += b; + while( a >= m) a -= m; +#endif + return a; +} + +/// Subtract two numbers, and calculate the modulo +/// of the difference and a third number, M. +/// In other words, it returns (A-B) % M. +/// It is designed as a compact mechanism for +/// incrementing a 'mode' switch and wrapping +/// around back to 'mode 0' when the switch +/// goes past the end of the available range. +/// e.g. if you have seven modes, this switches +/// to the next one and wraps around if needed: +/// mode = addmod8( mode, 1, 7); +///LIB8STATIC_ALWAYS_INLINESee 'mod8' for notes on performance. +LIB8STATIC uint8_t submod8( uint8_t a, uint8_t b, uint8_t m) +{ +#if defined(__AVR__) + asm volatile ( + " sub %[a],%[b] \n\t" + "L_%=: sub %[a],%[m] \n\t" + " brcc L_%= \n\t" + " add %[a],%[m] \n\t" + : [a] "+r" (a) + : [b] "r" (b), [m] "r" (m) + ); +#else + a -= b; + while( a >= m) a -= m; +#endif + return a; +} + +/// 8x8 bit multiplication, with 8 bit result +LIB8STATIC_ALWAYS_INLINE uint8_t mul8( uint8_t i, uint8_t j) +{ +#if MUL8_C == 1 + return ((uint16_t)i * (uint16_t)(j) ) & 0xFF; +#elif MUL8_AVRASM == 1 + asm volatile( + /* Multiply 8-bit i * 8-bit j, giving 16-bit r1,r0 */ + "mul %0, %1 \n\t" + /* Extract the LOW 8-bits (r0) */ + "mov %0, r0 \n\t" + /* Restore r1 to "0"; it's expected to always be that */ + "clr __zero_reg__ \n\t" + : "+a" (i) + : "a" (j) + : "r0", "r1"); + + return i; +#else +#error "No implementation for mul8 available." +#endif +} + + +/// saturating 8x8 bit multiplication, with 8 bit result +/// @returns the product of i * j, capping at 0xFF +LIB8STATIC_ALWAYS_INLINE uint8_t qmul8( uint8_t i, uint8_t j) +{ +#if QMUL8_C == 1 + int p = ((uint16_t)i * (uint16_t)(j) ); + if( p > 255) p = 255; + return p; +#elif QMUL8_AVRASM == 1 + asm volatile( + /* Multiply 8-bit i * 8-bit j, giving 16-bit r1,r0 */ + " mul %0, %1 \n\t" + /* If high byte of result is zero, all is well. */ + " tst r1 \n\t" + " breq Lnospill_%= \n\t" + /* If high byte of result > 0, saturate low byte to 0xFF */ + " ldi %0,0xFF \n\t" + " rjmp Ldone_%= \n\t" + "Lnospill_%=: \n\t" + /* Extract the LOW 8-bits (r0) */ + " mov %0, r0 \n\t" + "Ldone_%=: \n\t" + /* Restore r1 to "0"; it's expected to always be that */ + " clr __zero_reg__ \n\t" + : "+a" (i) + : "a" (j) + : "r0", "r1"); + + return i; +#else +#error "No implementation for qmul8 available." +#endif +} + + +/// take abs() of a signed 8-bit uint8_t +LIB8STATIC_ALWAYS_INLINE int8_t abs8( int8_t i) +{ +#if ABS8_C == 1 + if( i < 0) i = -i; + return i; +#elif ABS8_AVRASM == 1 + + + asm volatile( + /* First, check the high bit, and prepare to skip if it's clear */ + "sbrc %0, 7 \n" + + /* Negate the value */ + "neg %0 \n" + + : "+r" (i) : "r" (i) ); + return i; +#else +#error "No implementation for abs8 available." +#endif +} + +/// square root for 16-bit integers +/// About three times faster and five times smaller +/// than Arduino's general sqrt on AVR. +LIB8STATIC uint8_t sqrt16(uint16_t x) +{ + if( x <= 1) { + return x; + } + + uint8_t low = 1; // lower bound + uint8_t hi, mid; + + if( x > 7904) { + hi = 255; + } else { + hi = (x >> 5) + 8; // initial estimate for upper bound + } + + do { + mid = (low + hi) >> 1; + if ((uint16_t)(mid * mid) > x) { + hi = mid - 1; + } else { + if( mid == 255) { + return 255; + } + low = mid + 1; + } + } while (hi >= low); + + return low - 1; +} + +/// blend a variable proproportion(0-255) of one byte to another +/// @param a - the starting byte value +/// @param b - the byte value to blend toward +/// @param amountOfB - the proportion (0-255) of b to blend +/// @returns a byte value between a and b, inclusive +#if (FASTLED_BLEND_FIXED == 1) +LIB8STATIC uint8_t blend8( uint8_t a, uint8_t b, uint8_t amountOfB) +{ +#if BLEND8_C == 1 + uint16_t partial; + uint8_t result; + + uint8_t amountOfA = 255 - amountOfB; + + partial = (a * amountOfA); +#if (FASTLED_SCALE8_FIXED == 1) + partial += a; + //partial = add8to16( a, partial); +#endif + + partial += (b * amountOfB); +#if (FASTLED_SCALE8_FIXED == 1) + partial += b; + //partial = add8to16( b, partial); +#endif + + result = partial >> 8; + + return result; + +#elif BLEND8_AVRASM == 1 + uint16_t partial; + uint8_t result; + + asm volatile ( + /* partial = b * amountOfB */ + " mul %[b], %[amountOfB] \n\t" + " movw %A[partial], r0 \n\t" + + /* amountOfB (aka amountOfA) = 255 - amountOfB */ + " com %[amountOfB] \n\t" + + /* partial += a * amountOfB (aka amountOfA) */ + " mul %[a], %[amountOfB] \n\t" + + " add %A[partial], r0 \n\t" + " adc %B[partial], r1 \n\t" + + " clr __zero_reg__ \n\t" + +#if (FASTLED_SCALE8_FIXED == 1) + /* partial += a */ + " add %A[partial], %[a] \n\t" + " adc %B[partial], __zero_reg__ \n\t" + + // partial += b + " add %A[partial], %[b] \n\t" + " adc %B[partial], __zero_reg__ \n\t" +#endif + + : [partial] "=r" (partial), + [amountOfB] "+a" (amountOfB) + : [a] "a" (a), + [b] "a" (b) + : "r0", "r1" + ); + + result = partial >> 8; + + return result; + +#else +#error "No implementation for blend8 available." +#endif +} + +#else +LIB8STATIC uint8_t blend8( uint8_t a, uint8_t b, uint8_t amountOfB) +{ + // This version loses precision in the integer math + // and can actually return results outside of the range + // from a to b. Its use is not recommended. + uint8_t result; + uint8_t amountOfA = 255 - amountOfB; + result = scale8_LEAVING_R1_DIRTY( a, amountOfA) + + scale8_LEAVING_R1_DIRTY( b, amountOfB); + cleanup_R1(); + return result; +} +#endif + + +///@} +#endif diff --git a/lib/lib8tion/random8.h b/lib/lib8tion/random8.h new file mode 100644 index 000000000000..7ee67cbb3647 --- /dev/null +++ b/lib/lib8tion/random8.h @@ -0,0 +1,94 @@ +#ifndef __INC_LIB8TION_RANDOM_H +#define __INC_LIB8TION_RANDOM_H +///@ingroup lib8tion + +///@defgroup Random Fast random number generators +/// Fast 8- and 16- bit unsigned random numbers. +/// Significantly faster than Arduino random(), but +/// also somewhat less random. You can add entropy. +///@{ + +// X(n+1) = (2053 * X(n)) + 13849) +#define FASTLED_RAND16_2053 ((uint16_t)(2053)) +#define FASTLED_RAND16_13849 ((uint16_t)(13849)) + +/// random number seed +extern uint16_t rand16seed;// = RAND16_SEED; + +/// Generate an 8-bit random number +LIB8STATIC uint8_t random8(void) +{ + rand16seed = (rand16seed * FASTLED_RAND16_2053) + FASTLED_RAND16_13849; + // return the sum of the high and low bytes, for better + // mixing and non-sequential correlation + return (uint8_t)(((uint8_t)(rand16seed & 0xFF)) + + ((uint8_t)(rand16seed >> 8))); +} + +/// Generate a 16 bit random number +LIB8STATIC uint16_t random16(void) +{ + rand16seed = (rand16seed * FASTLED_RAND16_2053) + FASTLED_RAND16_13849; + return rand16seed; +} + +/// Generate an 8-bit random number between 0 and lim +/// @param lim the upper bound for the result +LIB8STATIC uint8_t random8_max(uint8_t lim) +{ + uint8_t r = random8(); + r = (r*lim) >> 8; + return r; +} + +/// Generate an 8-bit random number in the given range +/// @param min the lower bound for the random number +/// @param lim the upper bound for the random number +LIB8STATIC uint8_t random8_min_max(uint8_t min, uint8_t lim) +{ + uint8_t delta = lim - min; + uint8_t r = random8_max(delta) + min; + return r; +} + +/// Generate an 16-bit random number between 0 and lim +/// @param lim the upper bound for the result +LIB8STATIC uint16_t random16_max(uint16_t lim) +{ + uint16_t r = random16(); + uint32_t p = (uint32_t)lim * (uint32_t)r; + r = p >> 16; + return r; +} + +/// Generate an 16-bit random number in the given range +/// @param min the lower bound for the random number +/// @param lim the upper bound for the random number +LIB8STATIC uint16_t random16_min_max( uint16_t min, uint16_t lim) +{ + uint16_t delta = lim - min; + uint16_t r = random16_max(delta) + min; + return r; +} + +/// Set the 16-bit seed used for the random number generator +LIB8STATIC void random16_set_seed(uint16_t seed) +{ + rand16seed = seed; +} + +/// Get the current seed value for the random number generator +LIB8STATIC uint16_t random16_get_seed(void) +{ + return rand16seed; +} + +/// Add entropy into the random number generator +LIB8STATIC void random16_add_entropy(uint16_t entropy) +{ + rand16seed += entropy; +} + +///@} + +#endif diff --git a/lib/lib8tion/scale8.h b/lib/lib8tion/scale8.h new file mode 100644 index 000000000000..9895fd4d7919 --- /dev/null +++ b/lib/lib8tion/scale8.h @@ -0,0 +1,542 @@ +#ifndef __INC_LIB8TION_SCALE_H +#define __INC_LIB8TION_SCALE_H + +///@ingroup lib8tion + +///@defgroup Scaling Scaling functions +/// Fast, efficient 8-bit scaling functions specifically +/// designed for high-performance LED programming. +/// +/// Because of the AVR(Arduino) and ARM assembly language +/// implementations provided, using these functions often +/// results in smaller and faster code than the equivalent +/// program using plain "C" arithmetic and logic. +///@{ + +/// scale one byte by a second one, which is treated as +/// the numerator of a fraction whose denominator is 256 +/// In other words, it computes i * (scale / 256) +/// 4 clocks AVR with MUL, 2 clocks ARM +LIB8STATIC_ALWAYS_INLINE uint8_t scale8( uint8_t i, fract8 scale) +{ +#if SCALE8_C == 1 +#if (FASTLED_SCALE8_FIXED == 1) + return (((uint16_t)i) * (1+(uint16_t)(scale))) >> 8; +#else + return ((uint16_t)i * (uint16_t)(scale) ) >> 8; +#endif +#elif SCALE8_AVRASM == 1 +#if defined(LIB8_ATTINY) +#if (FASTLED_SCALE8_FIXED == 1) + uint8_t work=i; +#else + uint8_t work=0; +#endif + uint8_t cnt=0x80; + asm volatile( +#if (FASTLED_SCALE8_FIXED == 1) + " inc %[scale] \n\t" + " breq DONE_%= \n\t" + " clr %[work] \n\t" +#endif + "LOOP_%=: \n\t" + /*" sbrc %[scale], 0 \n\t" + " add %[work], %[i] \n\t" + " ror %[work] \n\t" + " lsr %[scale] \n\t" + " clc \n\t"*/ + " sbrc %[scale], 0 \n\t" + " add %[work], %[i] \n\t" + " ror %[work] \n\t" + " lsr %[scale] \n\t" + " lsr %[cnt] \n\t" + "brcc LOOP_%= \n\t" + "DONE_%=: \n\t" + : [work] "+r" (work), [cnt] "+r" (cnt) + : [scale] "r" (scale), [i] "r" (i) + : + ); + return work; +#else + asm volatile( +#if (FASTLED_SCALE8_FIXED==1) + // Multiply 8-bit i * 8-bit scale, giving 16-bit r1,r0 + "mul %0, %1 \n\t" + // Add i to r0, possibly setting the carry flag + "add r0, %0 \n\t" + // load the immediate 0 into i (note, this does _not_ touch any flags) + "ldi %0, 0x00 \n\t" + // walk and chew gum at the same time + "adc %0, r1 \n\t" +#else + /* Multiply 8-bit i * 8-bit scale, giving 16-bit r1,r0 */ + "mul %0, %1 \n\t" + /* Move the high 8-bits of the product (r1) back to i */ + "mov %0, r1 \n\t" + /* Restore r1 to "0"; it's expected to always be that */ +#endif + "clr __zero_reg__ \n\t" + + : "+a" (i) /* writes to i */ + : "a" (scale) /* uses scale */ + : "r0", "r1" /* clobbers r0, r1 */ ); + + /* Return the result */ + return i; +#endif +#else +#error "No implementation for scale8 available." +#endif +} + + +/// The "video" version of scale8 guarantees that the output will +/// be only be zero if one or both of the inputs are zero. If both +/// inputs are non-zero, the output is guaranteed to be non-zero. +/// This makes for better 'video'/LED dimming, at the cost of +/// several additional cycles. +LIB8STATIC_ALWAYS_INLINE uint8_t scale8_video( uint8_t i, fract8 scale) +{ +#if SCALE8_C == 1 || defined(LIB8_ATTINY) + uint8_t j = (((int)i * (int)scale) >> 8) + ((i&&scale)?1:0); + // uint8_t nonzeroscale = (scale != 0) ? 1 : 0; + // uint8_t j = (i == 0) ? 0 : (((int)i * (int)(scale) ) >> 8) + nonzeroscale; + return j; +#elif SCALE8_AVRASM == 1 + uint8_t j=0; + asm volatile( + " tst %[i]\n\t" + " breq L_%=\n\t" + " mul %[i], %[scale]\n\t" + " mov %[j], r1\n\t" + " clr __zero_reg__\n\t" + " cpse %[scale], r1\n\t" + " subi %[j], 0xFF\n\t" + "L_%=: \n\t" + : [j] "+a" (j) + : [i] "a" (i), [scale] "a" (scale) + : "r0", "r1"); + + return j; + // uint8_t nonzeroscale = (scale != 0) ? 1 : 0; + // asm volatile( + // " tst %0 \n" + // " breq L_%= \n" + // " mul %0, %1 \n" + // " mov %0, r1 \n" + // " add %0, %2 \n" + // " clr __zero_reg__ \n" + // "L_%=: \n" + + // : "+a" (i) + // : "a" (scale), "a" (nonzeroscale) + // : "r0", "r1"); + + // // Return the result + // return i; +#else +#error "No implementation for scale8_video available." +#endif +} + + +/// This version of scale8 does not clean up the R1 register on AVR +/// If you are doing several 'scale8's in a row, use this, and +/// then explicitly call cleanup_R1. +LIB8STATIC_ALWAYS_INLINE uint8_t scale8_LEAVING_R1_DIRTY( uint8_t i, fract8 scale) +{ +#if SCALE8_C == 1 +#if (FASTLED_SCALE8_FIXED == 1) + return (((uint16_t)i) * ((uint16_t)(scale)+1)) >> 8; +#else + return ((int)i * (int)(scale) ) >> 8; +#endif +#elif SCALE8_AVRASM == 1 + asm volatile( + #if (FASTLED_SCALE8_FIXED==1) + // Multiply 8-bit i * 8-bit scale, giving 16-bit r1,r0 + "mul %0, %1 \n\t" + // Add i to r0, possibly setting the carry flag + "add r0, %0 \n\t" + // load the immediate 0 into i (note, this does _not_ touch any flags) + "ldi %0, 0x00 \n\t" + // walk and chew gum at the same time + "adc %0, r1 \n\t" + #else + /* Multiply 8-bit i * 8-bit scale, giving 16-bit r1,r0 */ + "mul %0, %1 \n\t" + /* Move the high 8-bits of the product (r1) back to i */ + "mov %0, r1 \n\t" + #endif + /* R1 IS LEFT DIRTY HERE; YOU MUST ZERO IT OUT YOURSELF */ + /* "clr __zero_reg__ \n\t" */ + + : "+a" (i) /* writes to i */ + : "a" (scale) /* uses scale */ + : "r0", "r1" /* clobbers r0, r1 */ ); + + // Return the result + return i; +#else +#error "No implementation for scale8_LEAVING_R1_DIRTY available." +#endif +} + + +/// This version of scale8_video does not clean up the R1 register on AVR +/// If you are doing several 'scale8_video's in a row, use this, and +/// then explicitly call cleanup_R1. +LIB8STATIC_ALWAYS_INLINE uint8_t scale8_video_LEAVING_R1_DIRTY( uint8_t i, fract8 scale) +{ +#if SCALE8_C == 1 || defined(LIB8_ATTINY) + uint8_t j = (((int)i * (int)scale) >> 8) + ((i&&scale)?1:0); + // uint8_t nonzeroscale = (scale != 0) ? 1 : 0; + // uint8_t j = (i == 0) ? 0 : (((int)i * (int)(scale) ) >> 8) + nonzeroscale; + return j; +#elif SCALE8_AVRASM == 1 + uint8_t j=0; + asm volatile( + " tst %[i]\n\t" + " breq L_%=\n\t" + " mul %[i], %[scale]\n\t" + " mov %[j], r1\n\t" + " breq L_%=\n\t" + " subi %[j], 0xFF\n\t" + "L_%=: \n\t" + : [j] "+a" (j) + : [i] "a" (i), [scale] "a" (scale) + : "r0", "r1"); + + return j; + // uint8_t nonzeroscale = (scale != 0) ? 1 : 0; + // asm volatile( + // " tst %0 \n" + // " breq L_%= \n" + // " mul %0, %1 \n" + // " mov %0, r1 \n" + // " add %0, %2 \n" + // " clr __zero_reg__ \n" + // "L_%=: \n" + + // : "+a" (i) + // : "a" (scale), "a" (nonzeroscale) + // : "r0", "r1"); + + // // Return the result + // return i; +#else +#error "No implementation for scale8_video_LEAVING_R1_DIRTY available." +#endif +} + +/// Clean up the r1 register after a series of *LEAVING_R1_DIRTY calls +LIB8STATIC_ALWAYS_INLINE void cleanup_R1(void) +{ +#if CLEANUP_R1_AVRASM == 1 + // Restore r1 to "0"; it's expected to always be that + asm volatile( "clr __zero_reg__ \n\t" : : : "r1" ); +#endif +} + + +/// scale a 16-bit unsigned value by an 8-bit value, +/// considered as numerator of a fraction whose denominator +/// is 256. In other words, it computes i * (scale / 256) + +LIB8STATIC_ALWAYS_INLINE uint16_t scale16by8( uint16_t i, fract8 scale ) +{ +#if SCALE16BY8_C == 1 + uint16_t result; +#if FASTLED_SCALE8_FIXED == 1 + result = (i * (1+((uint16_t)scale))) >> 8; +#else + result = (i * scale) / 256; +#endif + return result; +#elif SCALE16BY8_AVRASM == 1 +#if FASTLED_SCALE8_FIXED == 1 + uint16_t result = 0; + asm volatile( + // result.A = HighByte( (i.A x scale) + i.A ) + " mul %A[i], %[scale] \n\t" + " add r0, %A[i] \n\t" + // " adc r1, [zero] \n\t" + // " mov %A[result], r1 \n\t" + " adc %A[result], r1 \n\t" + + // result.A-B += i.B x scale + " mul %B[i], %[scale] \n\t" + " add %A[result], r0 \n\t" + " adc %B[result], r1 \n\t" + + // cleanup r1 + " clr __zero_reg__ \n\t" + + // result.A-B += i.B + " add %A[result], %B[i] \n\t" + " adc %B[result], __zero_reg__ \n\t" + + : [result] "+r" (result) + : [i] "r" (i), [scale] "r" (scale) + : "r0", "r1" + ); + return result; +#else + uint16_t result = 0; + asm volatile( + // result.A = HighByte(i.A x j ) + " mul %A[i], %[scale] \n\t" + " mov %A[result], r1 \n\t" + //" clr %B[result] \n\t" + + // result.A-B += i.B x j + " mul %B[i], %[scale] \n\t" + " add %A[result], r0 \n\t" + " adc %B[result], r1 \n\t" + + // cleanup r1 + " clr __zero_reg__ \n\t" + + : [result] "+r" (result) + : [i] "r" (i), [scale] "r" (scale) + : "r0", "r1" + ); + return result; +#endif +#else + #error "No implementation for scale16by8 available." +#endif +} + +/// scale a 16-bit unsigned value by a 16-bit value, +/// considered as numerator of a fraction whose denominator +/// is 65536. In other words, it computes i * (scale / 65536) + +LIB8STATIC uint16_t scale16( uint16_t i, fract16 scale ) +{ + #if SCALE16_C == 1 + uint16_t result; +#if FASTLED_SCALE8_FIXED == 1 + result = ((uint32_t)(i) * (1+(uint32_t)(scale))) / 65536; +#else + result = ((uint32_t)(i) * (uint32_t)(scale)) / 65536; +#endif + return result; +#elif SCALE16_AVRASM == 1 +#if FASTLED_SCALE8_FIXED == 1 + // implemented sort of like + // result = ((i * scale) + i ) / 65536 + // + // why not like this, you may ask? + // result = (i * (scale+1)) / 65536 + // the answer is that if scale is 65535, then scale+1 + // will be zero, which is not what we want. + uint32_t result; + asm volatile( + // result.A-B = i.A x scale.A + " mul %A[i], %A[scale] \n\t" + // save results... + // basic idea: + //" mov %A[result], r0 \n\t" + //" mov %B[result], r1 \n\t" + // which can be written as... + " movw %A[result], r0 \n\t" + // Because we're going to add i.A-B to + // result.A-D, we DO need to keep both + // the r0 and r1 portions of the product + // UNlike in the 'unfixed scale8' version. + // So the movw here is needed. + : [result] "=r" (result) + : [i] "r" (i), + [scale] "r" (scale) + : "r0", "r1" + ); + + asm volatile( + // result.C-D = i.B x scale.B + " mul %B[i], %B[scale] \n\t" + //" mov %C[result], r0 \n\t" + //" mov %D[result], r1 \n\t" + " movw %C[result], r0 \n\t" + : [result] "+r" (result) + : [i] "r" (i), + [scale] "r" (scale) + : "r0", "r1" + ); + + const uint8_t zero = 0; + asm volatile( + // result.B-D += i.B x scale.A + " mul %B[i], %A[scale] \n\t" + + " add %B[result], r0 \n\t" + " adc %C[result], r1 \n\t" + " adc %D[result], %[zero] \n\t" + + // result.B-D += i.A x scale.B + " mul %A[i], %B[scale] \n\t" + + " add %B[result], r0 \n\t" + " adc %C[result], r1 \n\t" + " adc %D[result], %[zero] \n\t" + + // cleanup r1 + " clr r1 \n\t" + + : [result] "+r" (result) + : [i] "r" (i), + [scale] "r" (scale), + [zero] "r" (zero) + : "r0", "r1" + ); + + asm volatile( + // result.A-D += i.A-B + " add %A[result], %A[i] \n\t" + " adc %B[result], %B[i] \n\t" + " adc %C[result], %[zero] \n\t" + " adc %D[result], %[zero] \n\t" + : [result] "+r" (result) + : [i] "r" (i), + [zero] "r" (zero) + ); + + result = result >> 16; + return result; +#else + uint32_t result; + asm volatile( + // result.A-B = i.A x scale.A + " mul %A[i], %A[scale] \n\t" + // save results... + // basic idea: + //" mov %A[result], r0 \n\t" + //" mov %B[result], r1 \n\t" + // which can be written as... + " movw %A[result], r0 \n\t" + // We actually don't need to do anything with r0, + // as result.A is never used again here, so we + // could just move the high byte, but movw is + // one clock cycle, just like mov, so might as + // well, in case we want to use this code for + // a generic 16x16 multiply somewhere. + + : [result] "=r" (result) + : [i] "r" (i), + [scale] "r" (scale) + : "r0", "r1" + ); + + asm volatile( + // result.C-D = i.B x scale.B + " mul %B[i], %B[scale] \n\t" + //" mov %C[result], r0 \n\t" + //" mov %D[result], r1 \n\t" + " movw %C[result], r0 \n\t" + : [result] "+r" (result) + : [i] "r" (i), + [scale] "r" (scale) + : "r0", "r1" + ); + + const uint8_t zero = 0; + asm volatile( + // result.B-D += i.B x scale.A + " mul %B[i], %A[scale] \n\t" + + " add %B[result], r0 \n\t" + " adc %C[result], r1 \n\t" + " adc %D[result], %[zero] \n\t" + + // result.B-D += i.A x scale.B + " mul %A[i], %B[scale] \n\t" + + " add %B[result], r0 \n\t" + " adc %C[result], r1 \n\t" + " adc %D[result], %[zero] \n\t" + + // cleanup r1 + " clr r1 \n\t" + + : [result] "+r" (result) + : [i] "r" (i), + [scale] "r" (scale), + [zero] "r" (zero) + : "r0", "r1" + ); + + result = result >> 16; + return result; +#endif +#else + #error "No implementation for scale16 available." +#endif +} +///@} + +///@defgroup Dimming Dimming and brightening functions +/// +/// Dimming and brightening functions +/// +/// The eye does not respond in a linear way to light. +/// High speed PWM'd LEDs at 50% duty cycle appear far +/// brighter then the 'half as bright' you might expect. +/// +/// If you want your midpoint brightness leve (128) to +/// appear half as bright as 'full' brightness (255), you +/// have to apply a 'dimming function'. +///@{ + +/// Adjust a scaling value for dimming +LIB8STATIC uint8_t dim8_raw( uint8_t x) +{ + return scale8( x, x); +} + +/// Adjust a scaling value for dimming for video (value will never go below 1) +LIB8STATIC uint8_t dim8_video( uint8_t x) +{ + return scale8_video( x, x); +} + +/// Linear version of the dimming function that halves for values < 128 +LIB8STATIC uint8_t dim8_lin( uint8_t x ) +{ + if( x & 0x80 ) { + x = scale8( x, x); + } else { + x += 1; + x /= 2; + } + return x; +} + +/// inverse of the dimming function, brighten a value +LIB8STATIC uint8_t brighten8_raw( uint8_t x) +{ + uint8_t ix = 255 - x; + return 255 - scale8( ix, ix); +} + +/// inverse of the dimming function, brighten a value +LIB8STATIC uint8_t brighten8_video( uint8_t x) +{ + uint8_t ix = 255 - x; + return 255 - scale8_video( ix, ix); +} + +/// inverse of the dimming function, brighten a value +LIB8STATIC uint8_t brighten8_lin( uint8_t x ) +{ + uint8_t ix = 255 - x; + if( ix & 0x80 ) { + ix = scale8( ix, ix); + } else { + ix += 1; + ix /= 2; + } + return 255 - ix; +} + +///@} +#endif diff --git a/lib/lib8tion/trig8.h b/lib/lib8tion/trig8.h new file mode 100644 index 000000000000..cfba6373fb94 --- /dev/null +++ b/lib/lib8tion/trig8.h @@ -0,0 +1,284 @@ +#ifndef __INC_LIB8TION_TRIG_H +#define __INC_LIB8TION_TRIG_H + +///@ingroup lib8tion + +///@defgroup Trig Fast trig functions +/// Fast 8 and 16-bit approximations of sin(x) and cos(x). +/// Don't use these approximations for calculating the +/// trajectory of a rocket to Mars, but they're great +/// for art projects and LED displays. +/// +/// On Arduino/AVR, the 16-bit approximation is more than +/// 10X faster than floating point sin(x) and cos(x), while +/// the 8-bit approximation is more than 20X faster. +///@{ + +#if defined(__AVR__) +#define sin16 sin16_avr +#else +#define sin16 sin16_C +#endif + +/// Fast 16-bit approximation of sin(x). This approximation never varies more than +/// 0.69% from the floating point value you'd get by doing +/// +/// float s = sin(x) * 32767.0; +/// +/// @param theta input angle from 0-65535 +/// @returns sin of theta, value between -32767 to 32767. +LIB8STATIC int16_t sin16_avr( uint16_t theta ) +{ + static const uint8_t data[] = + { 0, 0, 49, 0, 6393%256, 6393/256, 48, 0, + 12539%256, 12539/256, 44, 0, 18204%256, 18204/256, 38, 0, + 23170%256, 23170/256, 31, 0, 27245%256, 27245/256, 23, 0, + 30273%256, 30273/256, 14, 0, 32137%256, 32137/256, 4 /*,0*/ }; + + uint16_t offset = (theta & 0x3FFF); + + // AVR doesn't have a multi-bit shift instruction, + // so if we say "offset >>= 3", gcc makes a tiny loop. + // Inserting empty volatile statements between each + // bit shift forces gcc to unroll the loop. + offset >>= 1; // 0..8191 + asm volatile(""); + offset >>= 1; // 0..4095 + asm volatile(""); + offset >>= 1; // 0..2047 + + if( theta & 0x4000 ) offset = 2047 - offset; + + uint8_t sectionX4; + sectionX4 = offset / 256; + sectionX4 *= 4; + + uint8_t m; + + union { + uint16_t b; + struct { + uint8_t blo; + uint8_t bhi; + }; + } u; + + //in effect u.b = blo + (256 * bhi); + u.blo = data[ sectionX4 ]; + u.bhi = data[ sectionX4 + 1]; + m = data[ sectionX4 + 2]; + + uint8_t secoffset8 = (uint8_t)(offset) / 2; + + uint16_t mx = m * secoffset8; + + int16_t y = mx + u.b; + if( theta & 0x8000 ) y = -y; + + return y; +} + +/// Fast 16-bit approximation of sin(x). This approximation never varies more than +/// 0.69% from the floating point value you'd get by doing +/// +/// float s = sin(x) * 32767.0; +/// +/// @param theta input angle from 0-65535 +/// @returns sin of theta, value between -32767 to 32767. +LIB8STATIC int16_t sin16_C( uint16_t theta ) +{ + static const uint16_t base[] = + { 0, 6393, 12539, 18204, 23170, 27245, 30273, 32137 }; + static const uint8_t slope[] = + { 49, 48, 44, 38, 31, 23, 14, 4 }; + + uint16_t offset = (theta & 0x3FFF) >> 3; // 0..2047 + if( theta & 0x4000 ) offset = 2047 - offset; + + uint8_t section = offset / 256; // 0..7 + uint16_t b = base[section]; + uint8_t m = slope[section]; + + uint8_t secoffset8 = (uint8_t)(offset) / 2; + + uint16_t mx = m * secoffset8; + int16_t y = mx + b; + + if( theta & 0x8000 ) y = -y; + + return y; +} + + +/// Fast 16-bit approximation of cos(x). This approximation never varies more than +/// 0.69% from the floating point value you'd get by doing +/// +/// float s = cos(x) * 32767.0; +/// +/// @param theta input angle from 0-65535 +/// @returns sin of theta, value between -32767 to 32767. +LIB8STATIC int16_t cos16( uint16_t theta) +{ + return sin16( theta + 16384); +} + +/////////////////////////////////////////////////////////////////////// + +// sin8 & cos8 +// Fast 8-bit approximations of sin(x) & cos(x). +// Input angle is an unsigned int from 0-255. +// Output is an unsigned int from 0 to 255. +// +// This approximation can vary to to 2% +// from the floating point value you'd get by doing +// float s = (sin( x ) * 128.0) + 128; +// +// Don't use this approximation for calculating the +// "real" trigonometric calculations, but it's great +// for art projects and LED displays. +// +// On Arduino/AVR, this approximation is more than +// 20X faster than floating point sin(x) and cos(x) + +#if defined(__AVR__) && !defined(LIB8_ATTINY) +#define sin8 sin8_avr +#else +#define sin8 sin8_C +#endif + + +static const uint8_t b_m16_interleave[8] = { 0, 49, 49, 41, 90, 27, 117, 10 }; + +/// Fast 8-bit approximation of sin(x). This approximation never varies more than +/// 2% from the floating point value you'd get by doing +/// +/// float s = (sin(x) * 128.0) + 128; +/// +/// @param theta input angle from 0-255 +/// @returns sin of theta, value between 0 and 255 +LIB8STATIC uint8_t sin8_avr( uint8_t theta) +{ + uint8_t offset = theta; + + asm volatile( + "sbrc %[theta],6 \n\t" + "com %[offset] \n\t" + : [theta] "+r" (theta), [offset] "+r" (offset) + ); + + offset &= 0x3F; // 0..63 + + uint8_t secoffset = offset & 0x0F; // 0..15 + if( theta & 0x40) secoffset++; + + uint8_t m16; uint8_t b; + + uint8_t section = offset >> 4; // 0..3 + uint8_t s2 = section * 2; + + const uint8_t* p = b_m16_interleave; + p += s2; + b = *p; + p++; + m16 = *p; + + uint8_t mx; + uint8_t xr1; + asm volatile( + "mul %[m16],%[secoffset] \n\t" + "mov %[mx],r0 \n\t" + "mov %[xr1],r1 \n\t" + "eor r1, r1 \n\t" + "swap %[mx] \n\t" + "andi %[mx],0x0F \n\t" + "swap %[xr1] \n\t" + "andi %[xr1], 0xF0 \n\t" + "or %[mx], %[xr1] \n\t" + : [mx] "=d" (mx), [xr1] "=d" (xr1) + : [m16] "d" (m16), [secoffset] "d" (secoffset) + ); + + int8_t y = mx + b; + if( theta & 0x80 ) y = -y; + + y += 128; + + return y; +} + + +/// Fast 8-bit approximation of sin(x). This approximation never varies more than +/// 2% from the floating point value you'd get by doing +/// +/// float s = (sin(x) * 128.0) + 128; +/// +/// @param theta input angle from 0-255 +/// @returns sin of theta, value between 0 and 255 +LIB8STATIC uint8_t sin8_C( uint8_t theta) +{ + uint8_t offset = theta; + if( theta & 0x40 ) { + offset = (uint8_t)255 - offset; + } + offset &= 0x3F; // 0..63 + + uint8_t secoffset = offset & 0x0F; // 0..15 + if( theta & 0x40) secoffset++; + + uint8_t section = offset >> 4; // 0..3 + uint8_t s2 = section * 2; + const uint8_t* p = b_m16_interleave; + p += s2; + uint8_t b = *p; + p++; + uint8_t m16 = *p; + + uint8_t mx = (m16 * secoffset) >> 4; + + int8_t y = mx + b; + if( theta & 0x80 ) y = -y; + + y += 128; + + return y; +} + +/// Fast 8-bit approximation of cos(x). This approximation never varies more than +/// 2% from the floating point value you'd get by doing +/// +/// float s = (cos(x) * 128.0) + 128; +/// +/// @param theta input angle from 0-255 +/// @returns sin of theta, value between 0 and 255 +LIB8STATIC uint8_t cos8( uint8_t theta) +{ + return sin8( theta + 64); +} + +/// Fast 16-bit approximation of atan2(x). +/// @returns atan2, value between 0 and 255 +LIB8STATIC uint8_t atan2_8(int16_t dy, int16_t dx) +{ + if (dy == 0) + { + if (dx >= 0) + return 0; + else + return 128; + } + + int16_t abs_y = dy > 0 ? dy : -dy; + int8_t a; + + if (dx >= 0) + a = 32 - (32 * (dx - abs_y) / (dx + abs_y)); + else + a = 96 - (32 * (dx + abs_y) / (abs_y - dx)); + + if (dy < 0) + return -a; // negate if in quad III or IV + return a; +} + +///@} +#endif diff --git a/message.mk b/message.mk index 6894dd8cb504..734de8645724 100644 --- a/message.mk +++ b/message.mk @@ -80,3 +80,8 @@ MSG_CHECK_FILESIZE = Checking file size of $(TARGET).hex MSG_FILE_TOO_BIG = $(ERROR_COLOR)The firmware is too large!$(NO_COLOR) $(CURRENT_SIZE)/$(MAX_SIZE) ($(OVER_SIZE) bytes over)\n MSG_FILE_TOO_SMALL = The firmware is too small! $(CURRENT_SIZE)/$(MAX_SIZE)\n MSG_FILE_JUST_RIGHT = The firmware size is fine - $(CURRENT_SIZE)/$(MAX_SIZE) ($(FREE_SIZE) bytes free)\n +MSG_FILE_NEAR_LIMIT = The firmware size is approaching the maximum - $(CURRENT_SIZE)/$(MAX_SIZE) ($(FREE_SIZE) bytes free)\n +MSG_PYTHON_MISSING = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \ + Python 3 is not installed. It will be required by a future version\n\ + of qmk_firmware.\n\n\ + Please run $(BOLD)util/qmk_install.sh$(NO_COLOR) to install all the dependencies QMK requires.\n\n diff --git a/quantum/api.c b/quantum/api.c index 52dfe23e1764..233f99636de4 100644 --- a/quantum/api.c +++ b/quantum/api.c @@ -67,7 +67,7 @@ void process_api(uint16_t length, uint8_t * data) { case DT_RGBLIGHT: { #ifdef RGBLIGHT_ENABLE uint32_t rgblight = bytes_to_dword(data, 2); - rgblight_update_dword(rgblight); + eeconfig_update_rgblight(rgblight); #endif break; } diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index 6d6833ec11f1..3da164c736ef 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c @@ -141,7 +141,7 @@ uint16_t notes_count; bool notes_repeat; bool note_resting = false; -uint8_t current_note = 0; +uint16_t current_note = 0; uint8_t rest_counter = 0; #ifdef VIBRATO_ENABLE diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c index 989f7a64becd..de0cd15c5825 100644 --- a/quantum/audio/audio_arm.c +++ b/quantum/audio/audio_arm.c @@ -54,7 +54,7 @@ uint16_t notes_count; bool notes_repeat; bool note_resting = false; -uint8_t current_note = 0; +uint16_t current_note = 0; uint8_t rest_counter = 0; #ifdef VIBRATO_ENABLE @@ -79,7 +79,7 @@ float startup_song[][2] = STARTUP_SONG; static void gpt_cb8(GPTDriver *gptp); -#define DAC_BUFFER_SIZE 720 +#define DAC_BUFFER_SIZE 100 #ifndef DAC_SAMPLE_MAX #define DAC_SAMPLE_MAX 65535U #endif @@ -98,8 +98,8 @@ static void gpt_cb8(GPTDriver *gptp); RESTART_CHANNEL_1() #define UPDATE_CHANNEL_2_FREQ(freq) gpt7cfg1.frequency = freq * DAC_BUFFER_SIZE; \ RESTART_CHANNEL_2() -#define GET_CHANNEL_1_FREQ gpt6cfg1.frequency -#define GET_CHANNEL_2_FREQ gpt7cfg1.frequency +#define GET_CHANNEL_1_FREQ (uint16_t)(gpt6cfg1.frequency * DAC_BUFFER_SIZE) +#define GET_CHANNEL_2_FREQ (uint16_t)(gpt7cfg1.frequency * DAC_BUFFER_SIZE) /* @@ -273,19 +273,24 @@ static const DACConversionGroup dacgrpcfg2 = { .trigger = DAC_TRG(0) }; -void audio_init() -{ +void audio_init() { - if (audio_initialized) - return; + if (audio_initialized) { + return; + } - // Check EEPROM - // if (!eeconfig_is_enabled()) - // { - // eeconfig_init(); - // } - // audio_config.raw = eeconfig_read_audio(); + // Check EEPROM + #if defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + audio_config.raw = eeconfig_read_audio(); +#else // ARM EEPROM audio_config.enable = true; + #ifdef AUDIO_CLICKY_ON + audio_config.clicky_enable = true; + #endif +#endif // ARM EEPROM /* * Starting DAC1 driver, setting up the output pin as analog as suggested @@ -308,16 +313,17 @@ void audio_init() dacStartConversion(&DACD1, &dacgrpcfg1, (dacsample_t *)dac_buffer, DAC_BUFFER_SIZE); dacStartConversion(&DACD2, &dacgrpcfg2, (dacsample_t *)dac_buffer_2, DAC_BUFFER_SIZE); - audio_initialized = true; + audio_initialized = true; - if (audio_config.enable) { - PLAY_SONG(startup_song); - } + if (audio_config.enable) { + PLAY_SONG(startup_song); + } else { + stop_all_notes(); + } } -void stop_all_notes() -{ +void stop_all_notes() { dprintf("audio stop all notes"); if (!audio_initialized) { @@ -342,347 +348,347 @@ void stop_all_notes() } } -void stop_note(float freq) -{ - dprintf("audio stop note freq=%d", (int)freq); +void stop_note(float freq) { + dprintf("audio stop note freq=%d", (int)freq); - if (playing_note) { - if (!audio_initialized) { - audio_init(); - } - for (int i = 7; i >= 0; i--) { - if (frequencies[i] == freq) { - frequencies[i] = 0; - volumes[i] = 0; - for (int j = i; (j < 7); j++) { - frequencies[j] = frequencies[j+1]; - frequencies[j+1] = 0; - volumes[j] = volumes[j+1]; - volumes[j+1] = 0; - } - break; - } - } - voices--; - if (voices < 0) - voices = 0; - if (voice_place >= voices) { - voice_place = 0; - } - if (voices == 0) { - STOP_CHANNEL_1(); - STOP_CHANNEL_2(); - gptStopTimer(&GPTD8); - frequency = 0; - frequency_alt = 0; - volume = 0; - playing_note = false; + if (playing_note) { + if (!audio_initialized) { + audio_init(); + } + for (int i = 7; i >= 0; i--) { + if (frequencies[i] == freq) { + frequencies[i] = 0; + volumes[i] = 0; + for (int j = i; (j < 7); j++) { + frequencies[j] = frequencies[j+1]; + frequencies[j+1] = 0; + volumes[j] = volumes[j+1]; + volumes[j+1] = 0; } + break; + } + } + voices--; + if (voices < 0) { + voices = 0; + } + if (voice_place >= voices) { + voice_place = 0; } + if (voices == 0) { + STOP_CHANNEL_1(); + STOP_CHANNEL_2(); + gptStopTimer(&GPTD8); + frequency = 0; + frequency_alt = 0; + volume = 0; + playing_note = false; + } + } } #ifdef VIBRATO_ENABLE -float mod(float a, int b) -{ - float r = fmod(a, b); - return r < 0 ? r + b : r; +float mod(float a, int b) { + float r = fmod(a, b); + return r < 0 ? r + b : r; } float vibrato(float average_freq) { - #ifdef VIBRATO_STRENGTH_ENABLE - float vibrated_freq = average_freq * pow(vibrato_lut[(int)vibrato_counter], vibrato_strength); - #else - float vibrated_freq = average_freq * vibrato_lut[(int)vibrato_counter]; - #endif - vibrato_counter = mod((vibrato_counter + vibrato_rate * (1.0 + 440.0/average_freq)), VIBRATO_LUT_LENGTH); - return vibrated_freq; + #ifdef VIBRATO_STRENGTH_ENABLE + float vibrated_freq = average_freq * pow(vibrato_lut[(int)vibrato_counter], vibrato_strength); + #else + float vibrated_freq = average_freq * vibrato_lut[(int)vibrato_counter]; + #endif + vibrato_counter = mod((vibrato_counter + vibrato_rate * (1.0 + 440.0/average_freq)), VIBRATO_LUT_LENGTH); + return vibrated_freq; } #endif static void gpt_cb8(GPTDriver *gptp) { - float freq; - - if (playing_note) { - if (voices > 0) { - - float freq_alt = 0; - if (voices > 1) { - if (polyphony_rate == 0) { - if (glissando) { - if (frequency_alt != 0 && frequency_alt < frequencies[voices - 2] && frequency_alt < frequencies[voices - 2] * pow(2, -440/frequencies[voices - 2]/12/2)) { - frequency_alt = frequency_alt * pow(2, 440/frequency_alt/12/2); - } else if (frequency_alt != 0 && frequency_alt > frequencies[voices - 2] && frequency_alt > frequencies[voices - 2] * pow(2, 440/frequencies[voices - 2]/12/2)) { - frequency_alt = frequency_alt * pow(2, -440/frequency_alt/12/2); - } else { - frequency_alt = frequencies[voices - 2]; - } - } else { - frequency_alt = frequencies[voices - 2]; - } - - #ifdef VIBRATO_ENABLE - if (vibrato_strength > 0) { - freq_alt = vibrato(frequency_alt); - } else { - freq_alt = frequency_alt; - } - #else - freq_alt = frequency_alt; - #endif - } - - if (envelope_index < 65535) { - envelope_index++; - } - - freq_alt = voice_envelope(freq_alt); - - if (freq_alt < 30.517578125) { - freq_alt = 30.52; - } - - if (GET_CHANNEL_2_FREQ != (uint16_t)freq_alt) { - UPDATE_CHANNEL_2_FREQ(freq_alt); - } else { - RESTART_CHANNEL_2(); - } - //note_timbre; - } - - if (polyphony_rate > 0) { - if (voices > 1) { - voice_place %= voices; - if (place++ > (frequencies[voice_place] / polyphony_rate)) { - voice_place = (voice_place + 1) % voices; - place = 0.0; - } - } - - #ifdef VIBRATO_ENABLE - if (vibrato_strength > 0) { - freq = vibrato(frequencies[voice_place]); - } else { - freq = frequencies[voice_place]; - } - #else - freq = frequencies[voice_place]; - #endif + float freq; + + if (playing_note) { + if (voices > 0) { + + float freq_alt = 0; + if (voices > 1) { + if (polyphony_rate == 0) { + if (glissando) { + if (frequency_alt != 0 && frequency_alt < frequencies[voices - 2] && frequency_alt < frequencies[voices - 2] * pow(2, -440/frequencies[voices - 2]/12/2)) { + frequency_alt = frequency_alt * pow(2, 440/frequency_alt/12/2); + } else if (frequency_alt != 0 && frequency_alt > frequencies[voices - 2] && frequency_alt > frequencies[voices - 2] * pow(2, 440/frequencies[voices - 2]/12/2)) { + frequency_alt = frequency_alt * pow(2, -440/frequency_alt/12/2); } else { - if (glissando) { - if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) { - frequency = frequency * pow(2, 440/frequency/12/2); - } else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) { - frequency = frequency * pow(2, -440/frequency/12/2); - } else { - frequency = frequencies[voices - 1]; - } - } else { - frequency = frequencies[voices - 1]; - } - - #ifdef VIBRATO_ENABLE - if (vibrato_strength > 0) { - freq = vibrato(frequency); - } else { - freq = frequency; - } - #else - freq = frequency; - #endif - } - - if (envelope_index < 65535) { - envelope_index++; - } - - freq = voice_envelope(freq); - - if (freq < 30.517578125) { - freq = 30.52; + frequency_alt = frequencies[voices - 2]; } + } else { + frequency_alt = frequencies[voices - 2]; + } - - if (GET_CHANNEL_1_FREQ != (uint16_t)freq) { - UPDATE_CHANNEL_1_FREQ(freq); + #ifdef VIBRATO_ENABLE + if (vibrato_strength > 0) { + freq_alt = vibrato(frequency_alt); } else { - RESTART_CHANNEL_1(); + freq_alt = frequency_alt; } - //note_timbre; + #else + freq_alt = frequency_alt; + #endif } - } - if (playing_notes) { - if (note_frequency > 0) { - #ifdef VIBRATO_ENABLE - if (vibrato_strength > 0) { - freq = vibrato(note_frequency); - } else { - freq = note_frequency; - } - #else - freq = note_frequency; - #endif - - if (envelope_index < 65535) { - envelope_index++; - } - freq = voice_envelope(freq); + if (envelope_index < 65535) { + envelope_index++; + } + freq_alt = voice_envelope(freq_alt); - if (GET_CHANNEL_1_FREQ != (uint16_t)freq) { - UPDATE_CHANNEL_1_FREQ(freq); - UPDATE_CHANNEL_2_FREQ(freq); - } - //note_timbre; + if (freq_alt < 30.517578125) { + freq_alt = 30.52; + } + + if (GET_CHANNEL_2_FREQ != (uint16_t)freq_alt) { + UPDATE_CHANNEL_2_FREQ(freq_alt); } else { - // gptStopTimer(&GPTD6); - // gptStopTimer(&GPTD7); + RESTART_CHANNEL_2(); + } + //note_timbre; + } + + if (polyphony_rate > 0) { + if (voices > 1) { + voice_place %= voices; + if (place++ > (frequencies[voice_place] / polyphony_rate)) { + voice_place = (voice_place + 1) % voices; + place = 0.0; + } } - note_position++; - bool end_of_note = false; - if (GET_CHANNEL_1_FREQ > 0) { - if (!note_resting) - end_of_note = (note_position >= (note_length*8 - 1)); - else - end_of_note = (note_position >= (note_length*8)); + #ifdef VIBRATO_ENABLE + if (vibrato_strength > 0) { + freq = vibrato(frequencies[voice_place]); + } else { + freq = frequencies[voice_place]; + } + #else + freq = frequencies[voice_place]; + #endif + } else { + if (glissando) { + if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) { + frequency = frequency * pow(2, 440/frequency/12/2); + } else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) { + frequency = frequency * pow(2, -440/frequency/12/2); + } else { + frequency = frequencies[voices - 1]; + } } else { - end_of_note = (note_position >= (note_length*8)); + frequency = frequencies[voices - 1]; } - if (end_of_note) { - current_note++; - if (current_note >= notes_count) { - if (notes_repeat) { - current_note = 0; - } else { - STOP_CHANNEL_1(); - STOP_CHANNEL_2(); - // gptStopTimer(&GPTD8); - playing_notes = false; - return; - } - } - if (!note_resting) { - note_resting = true; - current_note--; - if ((*notes_pointer)[current_note][0] == (*notes_pointer)[current_note + 1][0]) { - note_frequency = 0; - note_length = 1; - } else { - note_frequency = (*notes_pointer)[current_note][0]; - note_length = 1; - } - } else { - note_resting = false; - envelope_index = 0; - note_frequency = (*notes_pointer)[current_note][0]; - note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); - } + #ifdef VIBRATO_ENABLE + if (vibrato_strength > 0) { + freq = vibrato(frequency); + } else { + freq = frequency; + } + #else + freq = frequency; + #endif + } - note_position = 0; - } - } + if (envelope_index < 65535) { + envelope_index++; + } - if (!audio_config.enable) { - playing_notes = false; - playing_note = false; - } -} + freq = voice_envelope(freq); -void play_note(float freq, int vol) { + if (freq < 30.517578125) { + freq = 30.52; + } - dprintf("audio play note freq=%d vol=%d", (int)freq, vol); - if (!audio_initialized) { - audio_init(); + if (GET_CHANNEL_1_FREQ != (uint16_t)freq) { + UPDATE_CHANNEL_1_FREQ(freq); + } else { + RESTART_CHANNEL_1(); + } + //note_timbre; } + } - if (audio_config.enable && voices < 8) { + if (playing_notes) { + if (note_frequency > 0) { + #ifdef VIBRATO_ENABLE + if (vibrato_strength > 0) { + freq = vibrato(note_frequency); + } else { + freq = note_frequency; + } + #else + freq = note_frequency; + #endif + if (envelope_index < 65535) { + envelope_index++; + } + freq = voice_envelope(freq); - // Cancel notes if notes are playing - if (playing_notes) - stop_all_notes(); - playing_note = true; + if (GET_CHANNEL_1_FREQ != (uint16_t)freq) { + UPDATE_CHANNEL_1_FREQ(freq); + UPDATE_CHANNEL_2_FREQ(freq); + } + //note_timbre; + } else { + // gptStopTimer(&GPTD6); + // gptStopTimer(&GPTD7); + } - envelope_index = 0; + note_position++; + bool end_of_note = false; + if (GET_CHANNEL_1_FREQ > 0) { + if (!note_resting) + end_of_note = (note_position >= (note_length*8 - 1)); + else + end_of_note = (note_position >= (note_length*8)); + } else { + end_of_note = (note_position >= (note_length*8)); + } - if (freq > 0) { - frequencies[voices] = freq; - volumes[voices] = vol; - voices++; + if (end_of_note) { + current_note++; + if (current_note >= notes_count) { + if (notes_repeat) { + current_note = 0; + } else { + STOP_CHANNEL_1(); + STOP_CHANNEL_2(); + // gptStopTimer(&GPTD8); + playing_notes = false; + return; + } + } + if (!note_resting) { + note_resting = true; + current_note--; + if ((*notes_pointer)[current_note][0] == (*notes_pointer)[current_note + 1][0]) { + note_frequency = 0; + note_length = 1; + } else { + note_frequency = (*notes_pointer)[current_note][0]; + note_length = 1; } + } else { + note_resting = false; + envelope_index = 0; + note_frequency = (*notes_pointer)[current_note][0]; + note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); + } - gptStart(&GPTD8, &gpt8cfg1); - gptStartContinuous(&GPTD8, 2U); - RESTART_CHANNEL_1(); - RESTART_CHANNEL_2(); + note_position = 0; } + } + if (!audio_config.enable) { + playing_notes = false; + playing_note = false; + } } -void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat) -{ +void play_note(float freq, int vol) { - if (!audio_initialized) { - audio_init(); + dprintf("audio play note freq=%d vol=%d", (int)freq, vol); + + if (!audio_initialized) { + audio_init(); + } + + if (audio_config.enable && voices < 8) { + + // Cancel notes if notes are playing + if (playing_notes) { + stop_all_notes(); } - if (audio_config.enable) { + playing_note = true; - // Cancel note if a note is playing - if (playing_note) - stop_all_notes(); + envelope_index = 0; - playing_notes = true; + if (freq > 0) { + frequencies[voices] = freq; + volumes[voices] = vol; + voices++; + } - notes_pointer = np; - notes_count = n_count; - notes_repeat = n_repeat; + gptStart(&GPTD8, &gpt8cfg1); + gptStartContinuous(&GPTD8, 2U); + RESTART_CHANNEL_1(); + RESTART_CHANNEL_2(); + } - place = 0; - current_note = 0; +} - note_frequency = (*notes_pointer)[current_note][0]; - note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); - note_position = 0; +void play_notes(float (*np)[][2], uint16_t n_count, bool n_repeat) { - gptStart(&GPTD8, &gpt8cfg1); - gptStartContinuous(&GPTD8, 2U); - RESTART_CHANNEL_1(); - RESTART_CHANNEL_2(); + if (!audio_initialized) { + audio_init(); + } + + if (audio_config.enable) { + + // Cancel note if a note is playing + if (playing_note) { + stop_all_notes(); } + playing_notes = true; + + notes_pointer = np; + notes_count = n_count; + notes_repeat = n_repeat; + + place = 0; + current_note = 0; + + note_frequency = (*notes_pointer)[current_note][0]; + note_length = ((*notes_pointer)[current_note][1] / 4) * (((float)note_tempo) / 100); + note_position = 0; + + gptStart(&GPTD8, &gpt8cfg1); + gptStartContinuous(&GPTD8, 2U); + RESTART_CHANNEL_1(); + RESTART_CHANNEL_2(); + } } bool is_playing_notes(void) { - return playing_notes; + return playing_notes; } bool is_audio_on(void) { - return (audio_config.enable != 0); + return (audio_config.enable != 0); } void audio_toggle(void) { - audio_config.enable ^= 1; - eeconfig_update_audio(audio_config.raw); - if (audio_config.enable) - audio_on_user(); + audio_config.enable ^= 1; + eeconfig_update_audio(audio_config.raw); + if (audio_config.enable) { + audio_on_user(); + } } void audio_on(void) { - audio_config.enable = 1; - eeconfig_update_audio(audio_config.raw); - audio_on_user(); + audio_config.enable = 1; + eeconfig_update_audio(audio_config.raw); + audio_on_user(); } void audio_off(void) { - audio_config.enable = 0; - eeconfig_update_audio(audio_config.raw); + stop_all_notes(); + audio_config.enable = 0; + eeconfig_update_audio(audio_config.raw); } #ifdef VIBRATO_ENABLE @@ -690,29 +696,29 @@ void audio_off(void) { // Vibrato rate functions void set_vibrato_rate(float rate) { - vibrato_rate = rate; + vibrato_rate = rate; } void increase_vibrato_rate(float change) { - vibrato_rate *= change; + vibrato_rate *= change; } void decrease_vibrato_rate(float change) { - vibrato_rate /= change; + vibrato_rate /= change; } #ifdef VIBRATO_STRENGTH_ENABLE void set_vibrato_strength(float strength) { - vibrato_strength = strength; + vibrato_strength = strength; } void increase_vibrato_strength(float change) { - vibrato_strength *= change; + vibrato_strength *= change; } void decrease_vibrato_strength(float change) { - vibrato_strength /= change; + vibrato_strength /= change; } #endif /* VIBRATO_STRENGTH_ENABLE */ @@ -722,45 +728,45 @@ void decrease_vibrato_strength(float change) { // Polyphony functions void set_polyphony_rate(float rate) { - polyphony_rate = rate; + polyphony_rate = rate; } void enable_polyphony() { - polyphony_rate = 5; + polyphony_rate = 5; } void disable_polyphony() { - polyphony_rate = 0; + polyphony_rate = 0; } void increase_polyphony_rate(float change) { - polyphony_rate *= change; + polyphony_rate *= change; } void decrease_polyphony_rate(float change) { - polyphony_rate /= change; + polyphony_rate /= change; } // Timbre function void set_timbre(float timbre) { - note_timbre = timbre; + note_timbre = timbre; } // Tempo functions void set_tempo(uint8_t tempo) { - note_tempo = tempo; + note_tempo = tempo; } void decrease_tempo(uint8_t tempo_change) { - note_tempo += tempo_change; + note_tempo += tempo_change; } void increase_tempo(uint8_t tempo_change) { - if (note_tempo - tempo_change < 10) { - note_tempo = 10; - } else { - note_tempo -= tempo_change; - } + if (note_tempo - tempo_change < 10) { + note_tempo = 10; + } else { + note_tempo -= tempo_change; + } } diff --git a/quantum/audio/audio_pwm.c b/quantum/audio/audio_pwm.c index ded86edeea9e..ed67136099a8 100644 --- a/quantum/audio/audio_pwm.c +++ b/quantum/audio/audio_pwm.c @@ -94,7 +94,7 @@ bool notes_repeat; float notes_rest; bool note_resting = false; -uint8_t current_note = 0; +uint16_t current_note = 0; uint8_t rest_counter = 0; #ifdef VIBRATO_ENABLE diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h index ce8d47d1c1ad..cd54af38d22f 100644 --- a/quantum/audio/musical_notes.h +++ b/quantum/audio/musical_notes.h @@ -26,12 +26,14 @@ // Note Types #define MUSICAL_NOTE(note, duration) {(NOTE##note), duration} +#define BREVE_NOTE(note) MUSICAL_NOTE(note, 128) #define WHOLE_NOTE(note) MUSICAL_NOTE(note, 64) #define HALF_NOTE(note) MUSICAL_NOTE(note, 32) #define QUARTER_NOTE(note) MUSICAL_NOTE(note, 16) #define EIGHTH_NOTE(note) MUSICAL_NOTE(note, 8) #define SIXTEENTH_NOTE(note) MUSICAL_NOTE(note, 4) +#define BREVE_DOT_NOTE(note) MUSICAL_NOTE(note, 128+64) #define WHOLE_DOT_NOTE(note) MUSICAL_NOTE(note, 64+32) #define HALF_DOT_NOTE(note) MUSICAL_NOTE(note, 32+16) #define QUARTER_DOT_NOTE(note) MUSICAL_NOTE(note, 16+8) @@ -40,11 +42,13 @@ // Note Type Shortcuts #define M__NOTE(note, duration) MUSICAL_NOTE(note, duration) +#define B__NOTE(n) BREVE_NOTE(n) #define W__NOTE(n) WHOLE_NOTE(n) #define H__NOTE(n) HALF_NOTE(n) #define Q__NOTE(n) QUARTER_NOTE(n) #define E__NOTE(n) EIGHTH_NOTE(n) #define S__NOTE(n) SIXTEENTH_NOTE(n) +#define BD_NOTE(n) BREVE_DOT_NOTE(n) #define WD_NOTE(n) WHOLE_DOT_NOTE(n) #define HD_NOTE(n) HALF_DOT_NOTE(n) #define QD_NOTE(n) QUARTER_DOT_NOTE(n) diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index 9946084977cf..9ca8231e49d7 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -51,7 +51,6 @@ Q__NOTE(_E4), Q__NOTE(_C4), \ Q__NOTE(_E4), -/* Requires: PLAY_NOTE_ARRAY(..., ..., STACCATO); */ #define IN_LIKE_FLINT \ E__NOTE(_AS4), E__NOTE(_AS4), QD_NOTE(_B4), \ E__NOTE(_AS4), E__NOTE(_B4), QD_NOTE(_CS4), \ @@ -501,5 +500,295 @@ H__NOTE(_F4), \ H__NOTE(_F4), \ W__NOTE(_C5), \ - W__NOTE(_BF4), + W__NOTE(_BF4), + +/* Prelude music from Final Fantasy */ +#define FF_PRELUDE \ + M__NOTE(_C3, 20), M__NOTE(_D3, 20), M__NOTE(_E3, 20), M__NOTE(_G3, 20), \ + M__NOTE(_C4, 20), M__NOTE(_D4, 20), M__NOTE(_E4, 20), M__NOTE(_G4, 20), \ + M__NOTE(_C5, 20), M__NOTE(_D5, 20), M__NOTE(_E5, 20), M__NOTE(_G5, 20), \ + M__NOTE(_C6, 20), M__NOTE(_D6, 20), M__NOTE(_E6, 20), M__NOTE(_G6, 20), \ + M__NOTE(_C7, 20), M__NOTE(_G6, 20), M__NOTE(_E6, 20), M__NOTE(_D6, 20), \ + M__NOTE(_C6, 20), M__NOTE(_G5, 20), M__NOTE(_E5, 20), M__NOTE(_D5, 20), \ + M__NOTE(_C5, 20), M__NOTE(_G4, 20), M__NOTE(_E4, 20), M__NOTE(_D4, 20), \ + M__NOTE(_C4, 20), M__NOTE(_G3, 20), M__NOTE(_E3, 20), M__NOTE(_D3, 20), \ + M__NOTE(_A2, 20), M__NOTE(_B2, 20), M__NOTE(_C3, 20), M__NOTE(_E3, 20), \ + M__NOTE(_A3, 20), M__NOTE(_B3, 20), M__NOTE(_C4, 20), M__NOTE(_E4, 20), \ + M__NOTE(_A4, 20), M__NOTE(_B4, 20), M__NOTE(_C5, 20), M__NOTE(_E5, 20), \ + M__NOTE(_A5, 20), M__NOTE(_B5, 20), M__NOTE(_C6, 20), M__NOTE(_E6, 20), \ + M__NOTE(_A6, 20), M__NOTE(_E6, 20), M__NOTE(_C6, 20), M__NOTE(_B5, 20), \ + M__NOTE(_A5, 20), M__NOTE(_E5, 20), M__NOTE(_C5, 20), M__NOTE(_B4, 20), \ + M__NOTE(_A4, 20), M__NOTE(_E4, 20), M__NOTE(_C4, 20), M__NOTE(_B3, 20), \ + M__NOTE(_A3, 20), M__NOTE(_E3, 20), M__NOTE(_C3, 20), M__NOTE(_B2, 20), + +/* Melody from the main themes of Star Trek TNG and the original series */ +#define TO_BOLDLY_GO \ + W__NOTE(_BF3 ), \ + Q__NOTE(_EF4 ), \ + WD_NOTE(_AF4 ), \ + W__NOTE(_REST), \ + H__NOTE(_G4 ), \ + Q__NOTE(_EF4 ), \ + H__NOTE(_C4 ), \ + W__NOTE(_REST), \ + QD_NOTE(_F4 ), \ + M__NOTE(_BF4, 128), + +#define KATAWARE_DOKI \ + W__NOTE(_G5), HD_NOTE(_G5), Q__NOTE(_G5), H__NOTE(_G5), H__NOTE(_E5), H__NOTE(_D5), Q__NOTE(_D5), Q__NOTE(_C5), \ + B__NOTE(_E5), H__NOTE(_C5), W__NOTE(_G5), HD_NOTE(_G5), Q__NOTE(_C5), H__NOTE(_C6), Q__NOTE(_B5), \ + Q__NOTE(_A5), H__NOTE(_G5), Q__NOTE(_G5), Q__NOTE(_A5), W__NOTE(_G5), QD_NOTE(_E5), \ + QD_NOTE(_F5), Q__NOTE(_E5), WD_NOTE(_D5), H__NOTE(_C5), W__NOTE(_G5), HD_NOTE(_G5), Q__NOTE(_G5), \ + H__NOTE(_G5), H__NOTE(_E5), H__NOTE(_D5), Q__NOTE(_D5), Q__NOTE(_C5), B__NOTE(_E5), H__NOTE(_G4), \ + Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), Q__NOTE(_C5), Q__NOTE(_C5), \ + Q__NOTE(_A4), H__NOTE(_C5), Q__NOTE(_C5), W__NOTE(_C5), Q__NOTE(_F4), Q__NOTE(_C5), \ + Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), H__NOTE(_C5), Q__NOTE(_C5), H__NOTE(_G5), \ + Q__NOTE(_C5), HD_NOTE(_D5), H__NOTE(_G4), Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), \ + H__NOTE(_D5), Q__NOTE(_C5), Q__NOTE(_C5), Q__NOTE(_A4), H__NOTE(_C5), Q__NOTE(_C5), \ + W__NOTE(_C5), Q__NOTE(_F4), Q__NOTE(_C5), Q__NOTE(_D5), Q__NOTE(_E5), H__NOTE(_D5), \ + H__NOTE(_C5), Q__NOTE(_C5), H__NOTE(_G5), Q__NOTE(_C5), HD_NOTE(_D5), \ + HD_NOTE(_G4), Q__NOTE(_C5), Q__NOTE(_D5), BD_NOTE(_C5), + +#define CAMPANELLA \ + Q__NOTE(_DS4), E__NOTE(_DS4), E__NOTE(_DS5), Q__NOTE(_DS5), E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_DS5), E__NOTE(_DS5), \ + E__NOTE(_DS6), Q__NOTE(_CS5), E__NOTE(_CS5), E__NOTE(_DS6), Q__NOTE(_B4), E__NOTE(_B4), E__NOTE(_DS6), \ + Q__NOTE(_B4), E__NOTE(_B4), E__NOTE(_DS6), Q__NOTE(_AS4), E__NOTE(_AS4), E__NOTE(_DS6), Q__NOTE(_GS4), \ + E__NOTE(_GS4), E__NOTE(_DS6), Q__NOTE(_G4), E__NOTE(_G4), E__NOTE(_DS6), Q__NOTE(_GS4), E__NOTE(_GS4), \ + E__NOTE(_DS6), Q__NOTE(_AS4), E__NOTE(_AS4), E__NOTE(_DS6), Q__NOTE(_DS4), E__NOTE(_DS4), E__NOTE(_DS6), \ + Q__NOTE(_DS5), E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_E5), E__NOTE(_E5), E__NOTE(_DS6), Q__NOTE(_DS5), \ + E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_CS5), E__NOTE(_CS5), E__NOTE(_DS6), Q__NOTE(_B4), E__NOTE(_B4), \ + E__NOTE(_DS6), Q__NOTE(_B4), E__NOTE(_B4), E__NOTE(_DS6), Q__NOTE(_AS4), E__NOTE(_AS4), E__NOTE(_DS6), \ + Q__NOTE(_GS4), E__NOTE(_GS4), E__NOTE(_DS6), Q__NOTE(_G4), E__NOTE(_G4), E__NOTE(_DS6), Q__NOTE(_GS4), \ + E__NOTE(_GS4), E__NOTE(_DS6), Q__NOTE(_AS4), E__NOTE(_AS4), E__NOTE(_DS6), Q__NOTE(_DS4), E__NOTE(_DS4), \ + E__NOTE(_DS5), Q__NOTE(_DS5), E__NOTE(_DS5), E__NOTE(_DS6), Q__NOTE(_DS6), E__NOTE(_DS6), E__NOTE(_DS7), \ + Q__NOTE(_DS6), E__NOTE(_DS6), E__NOTE(_DS7), Q__NOTE(_CS6), E__NOTE(_CS6), E__NOTE(_DS7), Q__NOTE(_B5), \ + E__NOTE(_B5), E__NOTE(_DS7), Q__NOTE(_B5), E__NOTE(_B5), E__NOTE(_DS7), Q__NOTE(_AS5), E__NOTE(_AS5), \ + E__NOTE(_DS7), Q__NOTE(_GS5), E__NOTE(_GS5), E__NOTE(_DS7), Q__NOTE(_G5), E__NOTE(_G5), E__NOTE(_DS7), \ + Q__NOTE(_GS5), E__NOTE(_GS5), E__NOTE(_DS7), Q__NOTE(_AS5), E__NOTE(_AS5), E__NOTE(_DS7), Q__NOTE(_DS5), \ + E__NOTE(_DS5), E__NOTE(_DS7), W__NOTE(_DS6), W__NOTE(_GS5), + +#define MEGALOVANIA \ + Q__NOTE(_D4), Q__NOTE(_D4), H__NOTE(_D5), HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), \ + Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), Q__NOTE(_C4), Q__NOTE(_C4), H__NOTE(_D5), HD_NOTE(_A4), \ + H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), \ + Q__NOTE(_B3), Q__NOTE(_B3), H__NOTE(_D5), HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), \ + Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), Q__NOTE(_BF3), Q__NOTE(_BF3), H__NOTE(_D5), \ + HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_F4), \ + Q__NOTE(_G4), + +#define MICHISHIRUBE \ + W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), BD_NOTE(_CS6), W__NOTE(_E6), \ + W__NOTE(_CS6), WD_NOTE(_B5), H__NOTE(_A5), BD_NOTE(_A5), W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), \ + W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), W__NOTE(_A5), W__NOTE(_A6), W__NOTE(_GS6), H__NOTE(_CS6), \ + Q__NOTE(_E6), Q__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_A5), \ + Q__NOTE(_B5), BD_NOTE(_A5), \ + H__NOTE(_E6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), \ + W__NOTE(_A6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_B6), \ + B__NOTE(_CS7), H__NOTE(_E6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_E6), \ + H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_GS6), B__NOTE(_E6), H__NOTE(_E6), \ + H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_E6), H__NOTE(_B6), \ + W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_B6), H__NOTE(_CS7), B__NOTE(_CS7), H__NOTE(_E6), H__NOTE(_E6), \ + H__NOTE(_E6), H__NOTE(_E6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_CS6), H__NOTE(_CS6), Q__NOTE(_B5), \ + BD_NOTE(_B5), W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), \ + BD_NOTE(_CS6), W__NOTE(_E6), W__NOTE(_CS6), WD_NOTE(_B5), H__NOTE(_A5), BD_NOTE(_A5), W__NOTE(_A5), \ + H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), W__NOTE(_A5), W__NOTE(_A6), \ + W__NOTE(_GS6), H__NOTE(_CS6), Q__NOTE(_E6), Q__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), \ + W__NOTE(_B5), H__NOTE(_A5), Q__NOTE(_B5), BD_NOTE(_A5), + +#define LIEBESLEID \ + Q__NOTE(_E4), Q__NOTE(_DS4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_FS4), Q__NOTE(_EF4), Q__NOTE(_G4), Q__NOTE(_D4), \ + Q__NOTE(_GS4), Q__NOTE(_CS4), W__NOTE(_A4), H__NOTE(_E5), H__NOTE(_E5), HD_NOTE(_G4), Q__NOTE(_E5), E__NOTE(_E5), \ + E__NOTE(_F5), ED_NOTE(_E5), HD_NOTE(_D5), Q__NOTE(_E5), H__NOTE(_F5), H__NOTE(_CS5), H__NOTE(_C5), W__NOTE(_G4), \ + H__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_D5), Q__NOTE(_D5), E__NOTE(_D5), E__NOTE(_E5), E__NOTE(_D5), HD_NOTE(_C5), \ + Q__NOTE(_D5), H__NOTE(_E5), H__NOTE(_B4), H__NOTE(_BF4), W__NOTE(_F4), H__NOTE(_C5), H__NOTE(_C5), HD_NOTE(_EF4), \ + Q__NOTE(_C5), E__NOTE(_C5), E__NOTE(_D5), E__NOTE(_C5), HD_NOTE(_BF4), Q__NOTE(_C5), H__NOTE(_D5), H__NOTE(_FS4), \ + H__NOTE(_F4), HD_NOTE(_E4), Q__NOTE(_A4), HD_NOTE(_FS4), Q__NOTE(_A4), HD_NOTE(_GS4), Q__NOTE(_B4), Q__NOTE(_A4), \ + Q__NOTE(_E4), Q__NOTE(_DS4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_FS4), Q__NOTE(_CS4), Q__NOTE(_G4), \ + Q__NOTE(_C4), Q__NOTE(_GS4), Q__NOTE(_D4), WD_NOTE(_A4), + +#define MELODIES_OF_LIFE \ + H__NOTE(_B5), W__NOTE(_GS6), H__NOTE(_GS6), H__NOTE(_FS6), W__NOTE(_E6), H__NOTE(_E6), H__NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), \ + H__NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_E6), H__NOTE(_CS6), \ + H__NOTE(_CS6), H__NOTE(_B5), H__NOTE(_E6), H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_E6), H__NOTE(_GS6), \ + WD_NOTE(_FS6), H__NOTE(_GS6), WD_NOTE(_B6), H__NOTE(_CS7), H__NOTE(_B6), H__NOTE(_A6), H__NOTE(_A6), H__NOTE(_GS6), \ + H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_FS6), H__NOTE(_GS6), WD_NOTE(_A6), Q__NOTE(_GS6), Q__NOTE(_FS6), Q__NOTE(_FS6), \ + Q__NOTE(_E6), W__NOTE(_E6), Q__NOTE(_B5), Q__NOTE(_CS6), WD_NOTE(_E6), Q__NOTE(_E6), Q__NOTE(_FS6), W__NOTE(_GS6), \ + H__NOTE(_A6), B__NOTE(_FS6), + +#define EYES_ON_ME \ + Q__NOTE(_A6), Q__NOTE(_G6), Q__NOTE(_FS6), Q__NOTE(_D6), Q__NOTE(_A5), Q__NOTE(_G5), Q__NOTE(_FS5), Q__NOTE(_D5), \ + W__NOTE(_A4), W__NOTE(_D5), W__NOTE(_E5), W__NOTE(_FS5), H__NOTE(_A5), M__NOTE(_FS5, 256), H__NOTE(_E5), \ + H__NOTE(_FS5), B__NOTE(_D5), H__NOTE(_B4), H__NOTE(_D5), BD_NOTE(_E5), H__NOTE(_A4), W__NOTE(_D5), W__NOTE(_E5), \ + W__NOTE(_FS5), H__NOTE(_A5), BD_NOTE(_CS6), W__NOTE(_A5), H__NOTE(_CS6), H__NOTE(_D6), WD_NOTE(_B5), \ + H__NOTE(_A5), H__NOTE(_B5), B__NOTE(_A5), WD_NOTE(_B4), W__NOTE(_CS5), WD_NOTE(_D6), H__NOTE(_D6), \ + W__NOTE(_CS6), H__NOTE(_B5), H__NOTE(_B5), H__NOTE(_B5), B__NOTE(_A5), H__NOTE(_A5), H__NOTE(_FS5), H__NOTE(_A5), \ + WD_NOTE(_B5), H__NOTE(_B5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_D5), W__NOTE(_FS5), WD_NOTE(_E5), \ + H__NOTE(_CS4), H__NOTE(_E4), H__NOTE(_A4), H__NOTE(_CS5), W__NOTE(_D5), W__NOTE(_E5), W__NOTE(_FS5), H__NOTE(_G5), \ + H__NOTE(_A5), B__NOTE(_A5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_D5), BD_NOTE(_FS5), W__NOTE(_E5), B__NOTE(_D5), \ + H__NOTE(_G4), H__NOTE(_FS4), W__NOTE(_E4), BD_NOTE(_D4), + +#define SONG_OF_THE_ANCIENTS \ + H__NOTE(_D6), H__NOTE(_EF6), B__NOTE(_EF6), H__NOTE(_EF6), H__NOTE(_D6), H__NOTE(_BF5), H__NOTE(_G5), BD_NOTE(_C6), H__NOTE(_D6), \ + H__NOTE(_EF6), B__NOTE(_EF6), H__NOTE(_EF6), H__NOTE(_D6), H__NOTE(_BF5), H__NOTE(_G5), BD_NOTE(_G6), H__NOTE(_G5), \ + H__NOTE(_AF5), B__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_EF6), \ + B__NOTE(_EF6), WD_NOTE(_G5), WD_NOTE(_BF5), H__NOTE(_D6), H__NOTE(_EF6), B__NOTE(_EF6), H__NOTE(_EF6), H__NOTE(_D6), \ + H__NOTE(_BF5), H__NOTE(_G5), BD_NOTE(_C6), WD_NOTE(_B5), WD_NOTE(_G5), WD_NOTE(_G6), W__NOTE(_G6), H__NOTE(_AF6), \ + W__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_EF6), B__NOTE(_EF6), \ + WD_NOTE(_E6), H__NOTE(_E6), H__NOTE(_F6), H__NOTE(_G6), H__NOTE(_BF6), H__NOTE(_AF6), W__NOTE(_AF6), H__NOTE(_C6), \ + H__NOTE(_BF6), H__NOTE(_AF6), W__NOTE(_AF6), H__NOTE(_C6), H__NOTE(_AF6), BD_NOTE(_G6), WD_NOTE(_B5), WD_NOTE(_G6), \ + W__NOTE(_G6), H__NOTE(_AF6), W__NOTE(_G6), H__NOTE(_AF6), H__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), H__NOTE(_D6), \ + H__NOTE(_EF6), B__NOTE(_EF6), WD_NOTE(_E6), H__NOTE(_E6), H__NOTE(_F6), H__NOTE(_G6), H__NOTE(_BF6), H__NOTE(_AF6), \ + W__NOTE(_AF6), H__NOTE(_C6), H__NOTE(_AF6), H__NOTE(_G6), W__NOTE(_G6), H__NOTE(_F6), H__NOTE(_D6), BD_NOTE(_EF6), \ + WD_NOTE(_F6), WD_NOTE(_G6), BD_NOTE(_C7), + +#define NIER_AMUSEMENT_PARK \ + H__NOTE(_D5), E__NOTE(_G6), E__NOTE(_GF6), Q__NOTE(_F6), Q__NOTE(_E6), Q__NOTE(_EF6), Q__NOTE(_DF6), Q__NOTE(_EF6), WD_NOTE(_D6), \ + Q__NOTE(_G5), Q__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_D6), H__NOTE(_G6), H__NOTE(_A6), W__NOTE(_BF6), W__NOTE(_EF7), \ + H__NOTE(_D5), E__NOTE(_G6), E__NOTE(_GF6), Q__NOTE(_F6), Q__NOTE(_E6), Q__NOTE(_EF6), Q__NOTE(_DF6), Q__NOTE(_EF6), \ + WD_NOTE(_D6), Q__NOTE(_G5), Q__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_D6), H__NOTE(_G6), H__NOTE(_A6), W__NOTE(_BF6), \ + H__NOTE(_EF7), H__NOTE(_D5), HD_NOTE(_A5), HD_NOTE(_BF5), B__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_G5), HD_NOTE(_F5), \ + H__NOTE(_EF5), WD_NOTE(_D5), H__NOTE(_D5), HD_NOTE(_A5), HD_NOTE(_BF5), WD_NOTE(_D5), W__NOTE(_D5), B__NOTE(_G5), \ + H__NOTE(_D5), HD_NOTE(_A5), HD_NOTE(_BF5), B__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_G5), HD_NOTE(_F5), H__NOTE(_EF5), \ + W__NOTE(_D5), W__NOTE(_C5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_D5), W__NOTE(_G5), B__NOTE(_D5), B__NOTE(_E5), \ + W__NOTE(_EF5), QD_NOTE(_C5), QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_F5), \ + B__NOTE(_D5), B__NOTE(_BF4), W__NOTE(_EF5), QD_NOTE(_C5), QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), \ + H__NOTE(_EF5), H__NOTE(_F5), W__NOTE(_D5), W__NOTE(_BF5), W__NOTE(_G5), W__NOTE(_D5), W__NOTE(_EF5), QD_NOTE(_C5), \ + QD_NOTE(_D5), Q__NOTE(_EF5), H__NOTE(_G5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_F5), B__NOTE(_D5), B__NOTE(_BF4), \ + B__NOTE(_C5), H__NOTE(_C5), H__NOTE(_D5), H__NOTE(_EF5), H__NOTE(_F5), WD_NOTE(_G5), H__NOTE(_C5), W__NOTE(_AF5), \ + WD_NOTE(_G5), + +#define COPIED_CITY \ + Q__NOTE(_F6), Q__NOTE(_BF5), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_G6), Q__NOTE(_AF6), Q__NOTE(_EF6), Q__NOTE(_BF5), \ + Q__NOTE(_F6), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_D6), Q__NOTE(_C6), \ + Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_EF5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_BF4), H__NOTE(_C5), \ + Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_EF6), Q__NOTE(_BF5), Q__NOTE(_G6), Q__NOTE(_EF6), Q__NOTE(_BF6), \ + Q__NOTE(_AF6), Q__NOTE(_EF6), Q__NOTE(_BF5), Q__NOTE(_F6), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_EF6), Q__NOTE(_BF5), \ + Q__NOTE(_B6), Q__NOTE(_DF6), Q__NOTE(_EF6), Q__NOTE(_F6), Q__NOTE(_AF6), Q__NOTE(_EF7), Q__NOTE(_F6), Q__NOTE(_C6), \ + Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_BF5), Q__NOTE(_C6), Q__NOTE(_EF6), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), \ + Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), Q__NOTE(_EF5), Q__NOTE(_C5), Q__NOTE(_BF4), Q__NOTE(_G4), \ + Q__NOTE(_F4), Q__NOTE(_G4), H__NOTE(_AF4), Q__NOTE(_C5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), Q__NOTE(_EF5), \ + Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_EF5), Q__NOTE(_F5), Q__NOTE(_C5), \ + Q__NOTE(_AF4), Q__NOTE(_F5), Q__NOTE(_G5), Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_F5), Q__NOTE(_EF5), Q__NOTE(_F5), \ + Q__NOTE(_G5), Q__NOTE(_BF5), Q__NOTE(_C6), Q__NOTE(_G6), Q__NOTE(_EF6), WD_NOTE(_F7), + +#define VAGUE_HOPE_COLD_RAIN \ + HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_CS6), HD_NOTE(_D6), HD_NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_D6), WD_NOTE(_A6), \ + HD_NOTE(_FS6), HD_NOTE(_G6), HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), Q__NOTE(_D5), Q__NOTE(_CS5), Q__NOTE(_A4), \ + W__NOTE(_FS4), H__NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), HD_NOTE(_CS6), HD_NOTE(_E6), HD_NOTE(_D6), Q__NOTE(_CS6), \ + Q__NOTE(_D6), Q__NOTE(_E6), W__NOTE(_FS6), H__NOTE(_CS6), WD_NOTE(_D6), HD_NOTE(_D6), Q__NOTE(_D6), H__NOTE(_E6), \ + WD_NOTE(_CS6), HD_NOTE(_AS5), HD_NOTE(_B5), HD_NOTE(_B5), Q__NOTE(_B4), Q__NOTE(_CS5), Q__NOTE(_D5), HD_NOTE(_A5), \ + Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_A6), HD_NOTE(_FS6), Q__NOTE(_D5), Q__NOTE(_CS5), Q__NOTE(_A4), H__NOTE(_FS4), \ + HD_NOTE(_FS6), HD_NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_A6), HD_NOTE(_FS6), Q__NOTE(_CS5), Q__NOTE(_D5), Q__NOTE(_A5), \ + HD_NOTE(_FS5), Q__NOTE(_FS6), Q__NOTE(_FS6), Q__NOTE(_GS6), HD_NOTE(_A6), Q__NOTE(_B6), H__NOTE(_A6), H__NOTE(_GS6), \ + H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_CS6), H__NOTE(_FS6), E__NOTE(_FS5), E__NOTE(_CS5), Q__NOTE(_B4), H__NOTE(_AS4), \ + W__NOTE(_FS5), HD_NOTE(_FS6), HD_NOTE(_B5), H__NOTE(_D6), H__NOTE(_CS6), H__NOTE(_E6), HD_NOTE(_A6), HD_NOTE(_E6), \ + W__NOTE(_D6), Q__NOTE(_CS6), Q__NOTE(_D6), HD_NOTE(_E6), HD_NOTE(_FS6), WD_NOTE(_B6), HD_NOTE(_E6), HD_NOTE(_FS6), \ + HD_NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_B5), Q__NOTE(_CS6), H__NOTE(_D6), H__NOTE(_E6), H__NOTE(_FS6), HD_NOTE(_E6), \ + HD_NOTE(_CS6), H__NOTE(_FS6), H__NOTE(_A6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_FS6), BD_NOTE(_B6), + +#define KAINE_SALVATION \ + BD_NOTE(_D5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_F5), BD_NOTE(_D5), BD_NOTE(_BF4), BD_NOTE(_C5), W__NOTE(_BF4), W__NOTE(_C5), \ + W__NOTE(_D5), BD_NOTE(_C5), BD_NOTE(_F4), BD_NOTE(_D5), W__NOTE(_BF4), W__NOTE(_C5), W__NOTE(_F5), BD_NOTE(_D5), \ + BD_NOTE(_BF4), WD_NOTE(_EF5), WD_NOTE(_BF4), W__NOTE(_A4), W__NOTE(_BF4), W__NOTE(_C5), B__NOTE(_C5), H__NOTE(_B4), \ + H__NOTE(_C5), BD_NOTE(_D5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), \ + H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_FS5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_B5), \ + H__NOTE(_A5), WD_NOTE(_G5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), \ + H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_FS5), W__NOTE(_G5), H__NOTE(_B5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_FS5), \ + BD_NOTE(_E5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), H__NOTE(_A5), \ + H__NOTE(_G5), H__NOTE(_FS5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_B5), H__NOTE(_A5), \ + WD_NOTE(_G5), WD_NOTE(_G5), W__NOTE(_G5), H__NOTE(_FS5), H__NOTE(_G5), H__NOTE(_A5), H__NOTE(_B5), H__NOTE(_A5), \ + H__NOTE(_G5), H__NOTE(_FS5), W__NOTE(_G5), H__NOTE(_D6), WD_NOTE(_D6), W__NOTE(_F5), H__NOTE(_C6), H__NOTE(_C6), \ + H__NOTE(_BF5), H__NOTE(_A5), WD_NOTE(_G5), WD_NOTE(_F5), WD_NOTE(_G5), WD_NOTE(_A5), BD_NOTE(_G5), + +#define WEIGHT_OF_THE_WORLD \ + H__NOTE(_B5), Q__NOTE(_C6), Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), H__NOTE(_G6), WD_NOTE(_G6), H__NOTE(_B5), Q__NOTE(_C6), \ + Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), H__NOTE(_G6), H__NOTE(_G6), Q__NOTE(_A6), W__NOTE(_G6), Q__NOTE(_C6), \ + Q__NOTE(_D6), H__NOTE(_E6), Q__NOTE(_F6), H__NOTE(_E6), H__NOTE(_F6), HD_NOTE(_E6), H__NOTE(_D6), H__NOTE(_C6), \ + H__NOTE(_D6), WD_NOTE(_D6), Q__NOTE(_C6), Q__NOTE(_B5), WD_NOTE(_B5), H__NOTE(_B5), Q__NOTE(_C6), Q__NOTE(_C6), \ + Q__NOTE(_B5), H__NOTE(_C6), H__NOTE(_G6), WD_NOTE(_G6), H__NOTE(_B5), Q__NOTE(_C6), Q__NOTE(_C6), Q__NOTE(_B5), \ + H__NOTE(_C6), H__NOTE(_G6), H__NOTE(_G6), Q__NOTE(_A6), W__NOTE(_G6), Q__NOTE(_C6), Q__NOTE(_D6), H__NOTE(_E6), \ + Q__NOTE(_F6), H__NOTE(_E6), H__NOTE(_F6), HD_NOTE(_E6), H__NOTE(_D6), H__NOTE(_C6), H__NOTE(_D6), BD_NOTE(_D6), \ + Q__NOTE(_E6), Q__NOTE(_D6), Q__NOTE(_C6), Q__NOTE(_B5), H__NOTE(_C6), Q__NOTE(_C6), H__NOTE(_C6), HD_NOTE(_C6), \ + H__NOTE(_B5), H__NOTE(_C6), H__NOTE(_E6), H__NOTE(_G6), WD_NOTE(_G6), Q__NOTE(_C6), B__NOTE(_C6), H__NOTE(_B6), \ + Q__NOTE(_C7), BD_NOTE(_C7), + +#define ISABELLAS_LULLABY \ + W__NOTE(_BF4), B__NOTE(_D5), W__NOTE(_EF5), B__NOTE(_F5), W__NOTE(_BF5), B__NOTE(_AF5), W__NOTE(_GF5), BD_NOTE(_F5), B__NOTE(_CS5), \ + W__NOTE(_F5), B__NOTE(_C5), W__NOTE(_EF5), BD_NOTE(_BF4), W__NOTE(_AF4), W__NOTE(_BF4), W__NOTE(_F5), W__NOTE(_GF5), \ + WD_NOTE(_AF5), H__NOTE(_FS5), W__NOTE(_F5), B__NOTE(_EF5), W__NOTE(_C6), B__NOTE(_AF5), W__NOTE(_F5), WD_NOTE(_AF5), \ + H__NOTE(_BF5), W__NOTE(_F5), WD_NOTE(_AF5), H__NOTE(_BF5), W__NOTE(_F5), W__NOTE(_EF5), W__NOTE(_BF4), W__NOTE(_AF5), \ + WD_NOTE(_F5), H__NOTE(_F5), H__NOTE(_BF5), H__NOTE(_C6), WD_NOTE(_CS6), H__NOTE(_C6), W__NOTE(_BF5), W__NOTE(_AF5), \ + W__NOTE(_F5), W__NOTE(_EF5), WD_NOTE(_EF5), H__NOTE(_DF5), W__NOTE(_AF5), BD_NOTE(_F5), WD_NOTE(_BF4), H__NOTE(_C5), \ + W__NOTE(_CS5), W__NOTE(_EF5), W__NOTE(_AF4), W__NOTE(_EF5), WD_NOTE(_GF5), H__NOTE(_F5), W__NOTE(_EF5), WD_NOTE(_F5), \ + H__NOTE(_F5), H__NOTE(_BF5), H__NOTE(_C6), WD_NOTE(_CS6), H__NOTE(_C6), W__NOTE(_CS6), W__NOTE(_EF6), W__NOTE(_AF5), \ + W__NOTE(_EF6), WD_NOTE(_GF6), H__NOTE(_F6), W__NOTE(_EF6), B__NOTE(_DF6), H__NOTE(_GF6), H__NOTE(_AF6), BD_NOTE(_DF6), \ + B__NOTE(_BF5), W__NOTE(_F6), BD_NOTE(_C6), W__NOTE(_AF5), WD_NOTE(_EF6), H__NOTE(_DF6), W__NOTE(_C6), B__NOTE(_BF5), + +#define FANTASIE_IMPROMPTU \ + E__NOTE(_GS4), E__NOTE(_A4), E__NOTE(_GS4), E__NOTE(_REST), E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), \ + E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_C5), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_GS4), E__NOTE(_A4), \ + E__NOTE(_GS4), E__NOTE(_REST), E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_DS5), \ + E__NOTE(_CS5), E__NOTE(_C5), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_A4), E__NOTE(_CS5), E__NOTE(_DS5), \ + E__NOTE(_FS5), E__NOTE(_A5), E__NOTE(_CS6), E__NOTE(_DS6), E__NOTE(_B6), E__NOTE(_A6), E__NOTE(_GS6), E__NOTE(_FS6), \ + E__NOTE(_E6), E__NOTE(_DS6), E__NOTE(_FS6), E__NOTE(_CS6), E__NOTE(_C5), E__NOTE(_DS6), E__NOTE(_A5), E__NOTE(_GS5), \ + E__NOTE(_FS5), E__NOTE(_A5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_FS5), E__NOTE(_CS5), E__NOTE(_C5), E__NOTE(_DS5), \ + E__NOTE(_A4), E__NOTE(_GS4), E__NOTE(_B4), E__NOTE(_A4), E__NOTE(_A4), E__NOTE(_GS4), E__NOTE(_A4), E__NOTE(_GS4), \ + E__NOTE(_REST), E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_DS5), E__NOTE(_CS5), \ + E__NOTE(_C5), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_GS4), E__NOTE(_AS4), E__NOTE(_GS4), E__NOTE(_REST), \ + E__NOTE(_GS4), E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_DS5), E__NOTE(_CS5), E__NOTE(_C5), \ + E__NOTE(_CS5), E__NOTE(_E5), E__NOTE(_GS5), E__NOTE(_DS5), E__NOTE(_E5), E__NOTE(_DS5), E__NOTE(_REST), E__NOTE(_DS5), \ + E__NOTE(_B5), E__NOTE(_AS5), E__NOTE(_GS5), E__NOTE(_REST), E__NOTE(_E6), E__NOTE(_DS6), E__NOTE(_CS6), E__NOTE(_B5), \ + E__NOTE(_AS5), E__NOTE(_GS5), E__NOTE(_REST), E__NOTE(_AS5), WD_NOTE(_GS5), + +#define TERRAS_THEME \ + Q__NOTE(_GS5), Q__NOTE(_AS5), Q__NOTE(_B5), Q__NOTE(_EF6), BD_NOTE(_B5), Q__NOTE(_AS5), Q__NOTE(_GS5), W__NOTE(_AS5), \ + BD_NOTE(_DS5), Q__NOTE(_AF5), Q__NOTE(_BF5), Q__NOTE(_B5), Q__NOTE(_DS6), BD_NOTE(_B5), \ + Q__NOTE(_BF5), Q__NOTE(_AF5), W__NOTE(_AS5), BD_NOTE(_DS6), Q__NOTE(_B5), Q__NOTE(_CS6), Q__NOTE(_DS6), \ + Q__NOTE(_FS6), BD_NOTE(_DS6), Q__NOTE(_CS6), Q__NOTE(_B5), W__NOTE(_CS6), BD_NOTE(_FS5), \ + Q__NOTE(_B5), Q__NOTE(_AS5), BD_NOTE(_GS5), Q__NOTE(_B5), Q__NOTE(_AS5), BD_NOTE(_GS5), + +#define RENAI_CIRCULATION \ + Q__NOTE(_E6), Q__NOTE(_B5), HD_NOTE(_CS6), HD_NOTE(_CS6), H__NOTE(_B5), HD_NOTE(_E6), HD_NOTE(_E6), Q__NOTE(_E6), Q__NOTE(_B5), \ + HD_NOTE(_CS6), HD_NOTE(_CS6), H__NOTE(_B5), HD_NOTE(_E6), HD_NOTE(_GS6), Q__NOTE(_E6), Q__NOTE(_B5), HD_NOTE(_CS6), \ + H__NOTE(_CS6), Q__NOTE(_CS6), H__NOTE(_B5), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_FS6), HD_NOTE(_E6), \ + H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_CS6), WD_NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_FS6), H__NOTE(_G6), \ + HD_NOTE(_GS6), HD_NOTE(_E6), Q__NOTE(_B5), Q__NOTE(_CS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_FS6), H__NOTE(_G6), \ + HD_NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_CS6), H__NOTE(_E6), Q__NOTE(_CS6), HD_NOTE(_E6), H__NOTE(_CS6), H__NOTE(_E6), \ + Q__NOTE(_CS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_A6), H__NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_E6), \ + H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_A6), W__NOTE(_B6), H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), \ + H__NOTE(_A6), W__NOTE(_B6), H__NOTE(_B6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_A6), Q__NOTE(_GS6), H__NOTE(_E6), \ + H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_CS6), Q__NOTE(_GS6), H__NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_CS6), \ + Q__NOTE(_E6), H__NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_E6), W__NOTE(_B6), W__NOTE(_GS6), \ + W__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_FS6), B__NOTE(_GS6), H__NOTE(_GS6), \ + W__NOTE(_CS7), W__NOTE(_GS6), W__NOTE(_E6), H__NOTE(_GS6), H__NOTE(_GS6), HD_NOTE(_E6), H__NOTE(_E6), Q__NOTE(_E6), \ + H__NOTE(_FS6), WD_NOTE(_E6), + +#define PLATINUM_DISCO \ + H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), W__NOTE(_GS6), H__NOTE(_DS6), H__NOTE(_FS6), \ + H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS6), H__NOTE(_FS6), WD_NOTE(_FS6), H__NOTE(_CS6), W__NOTE(_DS6), H__NOTE(_FS6), \ + H__NOTE(_AS6), W__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), Q__NOTE(_AS6), Q__NOTE(_CS7), Q__NOTE(_GS6), Q__NOTE(_AS6), \ + Q__NOTE(_FS6), Q__NOTE(_GS6), Q__NOTE(_DS6), Q__NOTE(_FS6), Q__NOTE(_CS6), Q__NOTE(_DS6), Q__NOTE(_AS5), Q__NOTE(_CS6), \ + H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), W__NOTE(_GS6), H__NOTE(_DS6), \ + H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS7), H__NOTE(_GS6), WD_NOTE(_FS6), H__NOTE(_CS6), W__NOTE(_DS6), \ + H__NOTE(_FS6), H__NOTE(_AS6), WD_NOTE(_GS6), H__NOTE(_FS6), Q__NOTE(_FS6), Q__NOTE(_GS5), Q__NOTE(_AS5), Q__NOTE(_CS6), \ + Q__NOTE(_FS6), Q__NOTE(_GS6), Q__NOTE(_AS6), Q__NOTE(_CS7), WD_NOTE(_FS7), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), \ + WD_NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), WD_NOTE(_GS6), H__NOTE(_FS6), \ + WD_NOTE(_GS6), H__NOTE(_FS6), WD_NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_DS6), H__NOTE(_FS6), \ + WD_NOTE(_FS6), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), WD_NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_FS6), \ + H__NOTE(_GS6), H__NOTE(_AS6), H__NOTE(_CS7), H__NOTE(_AS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_DS6), W__NOTE(_FS6), \ + H__NOTE(_CS6), H__NOTE(_DS6), W__NOTE(_FS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_GS6), H__NOTE(_FS6), \ + B__NOTE(_FS6), + +#define NOCTURNE_OP_9_NO_1 \ + H__NOTE(_BF5), H__NOTE(_C6), H__NOTE(_DF6), H__NOTE(_A5), H__NOTE(_BF5), H__NOTE(_GF5), W__NOTE(_F5), W__NOTE(_F5), W__NOTE(_F5), \ + W__NOTE(_F5), H__NOTE(_GF5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_C5), B__NOTE(_DF5), W__NOTE(_BF4), Q__NOTE(_BF5), \ + Q__NOTE(_C6), Q__NOTE(_DF6), Q__NOTE(_A5), Q__NOTE(_BF5), Q__NOTE(_A5), Q__NOTE(_GS5), Q__NOTE(_A5), Q__NOTE(_C6), \ + Q__NOTE(_BF5), Q__NOTE(_GF5), Q__NOTE(_F5), Q__NOTE(_GF5), Q__NOTE(_E5), Q__NOTE(_F5), Q__NOTE(_BF5), Q__NOTE(_A5), \ + Q__NOTE(_AF5), Q__NOTE(_G5), Q__NOTE(_GF5), Q__NOTE(_F5), Q__NOTE(_E5), Q__NOTE(_EF5), Q__NOTE(_D5), Q__NOTE(_DF5), \ + Q__NOTE(_C5), Q__NOTE(_DF5), Q__NOTE(_C5), Q__NOTE(_B4), Q__NOTE(_C5), Q__NOTE(_F5), Q__NOTE(_E5), Q__NOTE(_EF5), \ + B__NOTE(_DF5), W__NOTE(_BF4), W__NOTE(_BF5), W__NOTE(_BF5), W__NOTE(_BF5), BD_NOTE(_AF5), W__NOTE(_DF5), H__NOTE(_BF4), \ + H__NOTE(_C5), H__NOTE(_DF5), H__NOTE(_GF5), H__NOTE(_GF5), BD_NOTE(_F5), W__NOTE(_EF5), H__NOTE(_F5), H__NOTE(_EF5), \ + H__NOTE(_DF5), H__NOTE(_A4), B__NOTE(_AF4), W__NOTE(_DF5), W__NOTE(_EF5), H__NOTE(_F5), H__NOTE(_EF5), H__NOTE(_DF5), \ + H__NOTE(_EF5), BD_NOTE(_F5), + #endif diff --git a/quantum/color.c b/quantum/color.c index 8ede053e7119..a309da379a41 100644 --- a/quantum/color.c +++ b/quantum/color.c @@ -22,14 +22,18 @@ RGB hsv_to_rgb( HSV hsv ) { RGB rgb; - uint8_t region, p, q, t; - uint16_t h, s, v, remainder; + uint8_t region, remainder, p, q, t; + uint16_t h, s, v; if ( hsv.s == 0 ) { +#ifdef USE_CIE1931_CURVE + rgb.r = rgb.g = rgb.b = pgm_read_byte( &CIE1931_CURVE[hsv.v] ); +#else rgb.r = hsv.v; rgb.g = hsv.v; rgb.b = hsv.v; +#endif return rgb; } @@ -37,8 +41,8 @@ RGB hsv_to_rgb( HSV hsv ) s = hsv.s; v = hsv.v; - region = h / 43; - remainder = (h - (region * 43)) * 6; + region = h * 6 / 255; + remainder = (h * 2 - region * 85) * 3; p = (v * (255 - s)) >> 8; q = (v * (255 - ((s * remainder) >> 8))) >> 8; @@ -46,6 +50,7 @@ RGB hsv_to_rgb( HSV hsv ) switch ( region ) { + case 6: case 0: rgb.r = v; rgb.g = t; @@ -78,9 +83,11 @@ RGB hsv_to_rgb( HSV hsv ) break; } +#ifdef USE_CIE1931_CURVE rgb.r = pgm_read_byte( &CIE1931_CURVE[rgb.r] ); rgb.g = pgm_read_byte( &CIE1931_CURVE[rgb.g] ); rgb.b = pgm_read_byte( &CIE1931_CURVE[rgb.b] ); +#endif return rgb; } diff --git a/quantum/config_common.h b/quantum/config_common.h index 0b2e408a43f2..c489e1407303 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -59,6 +59,11 @@ #define PINC_ADDRESS 0x3 #define PINB_ADDRESS 0x6 #define PINA_ADDRESS 0x9 + #elif defined(__AVR_ATmega328P__) + #define ADDRESS_BASE 0x00 + #define PINB_ADDRESS 0x3 + #define PINC_ADDRESS 0x6 + #define PIND_ADDRESS 0x9 #else #error "Pins are not defined" #endif diff --git a/quantum/debounce.c b/quantum/debounce.c deleted file mode 100644 index 929023ab2df3..000000000000 --- a/quantum/debounce.c +++ /dev/null @@ -1,52 +0,0 @@ - -#include "matrix.h" -#include "timer.h" -#include "quantum.h" - -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 -#endif - -void debounce_init(uint8_t num_rows) { -} - -#if DEBOUNCING_DELAY > 0 - -static bool debouncing = false; - -void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - static uint16_t debouncing_time; - - if (changed) { - debouncing = true; - debouncing_time = timer_read(); - } - - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { - for (uint8_t i = 0; i < num_rows; i++) { - cooked[i] = raw[i]; - } - debouncing = false; - } -} - -bool debounce_active(void) { - return debouncing; -} - -#else - -// no debounce -void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - if (changed) - { - for (uint8_t i = 0; i < num_rows; i++) { - cooked[i] = raw[i]; - } - } -} - -bool debounce_active(void) { - return false; -} -#endif diff --git a/quantum/debounce.h b/quantum/debounce.h index 360af77e7818..9ca05c6824ad 100644 --- a/quantum/debounce.h +++ b/quantum/debounce.h @@ -8,4 +8,4 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool bool debounce_active(void); -void debounce_init(uint8_t num_rows); \ No newline at end of file +void debounce_init(uint8_t num_rows); diff --git a/quantum/debounce/eager_pk.c b/quantum/debounce/eager_pk.c new file mode 100644 index 000000000000..aa0f63a9d4e8 --- /dev/null +++ b/quantum/debounce/eager_pk.c @@ -0,0 +1,108 @@ +/* +Copyright 2017 Alex Ong +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 . +*/ + +/* +Basic per-key algorithm. Uses an 8-bit counter per key. +After pressing a key, it immediately changes state, and sets a counter. +No further inputs are accepted until DEBOUNCE milliseconds have occurred. +*/ + +#include "matrix.h" +#include "timer.h" +#include "quantum.h" +#include + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#if (MATRIX_COLS <= 8) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#define debounce_counter_t uint8_t + +static debounce_counter_t *debounce_counters; +static bool counters_need_update; + +#define DEBOUNCE_ELAPSED 251 +#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) + +void update_debounce_counters(uint8_t num_rows, uint8_t current_time); +void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time); + +// we use num_rows rather than MATRIX_ROWS to support split keyboards +void debounce_init(uint8_t num_rows) { + debounce_counters = (debounce_counter_t *)malloc(num_rows * MATRIX_COLS * sizeof(debounce_counter_t)); + int i = 0; + for (uint8_t r = 0; r < num_rows; r++) { + for (uint8_t c = 0; c < MATRIX_COLS; c++) { + debounce_counters[i++] = DEBOUNCE_ELAPSED; + } + } +} + +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { + uint8_t current_time = timer_read() % MAX_DEBOUNCE; + if (counters_need_update) { + update_debounce_counters(num_rows, current_time); + } + + if (changed) { + transfer_matrix_values(raw, cooked, num_rows, current_time); + } +} + +// If the current time is > debounce counter, set the counter to enable input. +void update_debounce_counters(uint8_t num_rows, uint8_t current_time) { + counters_need_update = false; + debounce_counter_t *debounce_pointer = debounce_counters; + for (uint8_t row = 0; row < num_rows; row++) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + if (*debounce_pointer != DEBOUNCE_ELAPSED) { + if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) { + *debounce_pointer = DEBOUNCE_ELAPSED; + } else { + counters_need_update = true; + } + } + debounce_pointer++; + } + } +} + +// upload from raw_matrix to final matrix; +void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) { + debounce_counter_t *debounce_pointer = debounce_counters; + for (uint8_t row = 0; row < num_rows; row++) { + matrix_row_t delta = raw[row] ^ cooked[row]; + matrix_row_t existing_row = cooked[row]; + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + matrix_row_t col_mask = (ROW_SHIFTER << col); + if ((delta & col_mask) && *debounce_pointer == DEBOUNCE_ELAPSED) { + *debounce_pointer = current_time; + counters_need_update = true; + existing_row ^= col_mask; // flip the bit. + } + debounce_pointer++; + } + cooked[row] = existing_row; + } +} + +bool debounce_active(void) { return true; } diff --git a/quantum/debounce/eager_pr.c b/quantum/debounce/eager_pr.c new file mode 100644 index 000000000000..26b17ed295fc --- /dev/null +++ b/quantum/debounce/eager_pr.c @@ -0,0 +1,95 @@ +/* +Copyright 2019 Alex Ong +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 . +*/ + +/* +Basic per-row algorithm. Uses an 8-bit counter per row. +After pressing a key, it immediately changes state, and sets a counter. +No further inputs are accepted until DEBOUNCE milliseconds have occurred. +*/ + +#include "matrix.h" +#include "timer.h" +#include "quantum.h" +#include + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define debounce_counter_t uint8_t + +static debounce_counter_t *debounce_counters; +static bool counters_need_update; + +#define DEBOUNCE_ELAPSED 251 +#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) + +void update_debounce_counters(uint8_t num_rows, uint8_t current_time); +void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time); + +// we use num_rows rather than MATRIX_ROWS to support split keyboards +void debounce_init(uint8_t num_rows) { + debounce_counters = (debounce_counter_t *)malloc(num_rows * sizeof(debounce_counter_t)); + for (uint8_t r = 0; r < num_rows; r++) { + debounce_counters[r] = DEBOUNCE_ELAPSED; + } +} + +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { + uint8_t current_time = timer_read() % MAX_DEBOUNCE; + bool needed_update = counters_need_update; + if (counters_need_update) { + update_debounce_counters(num_rows, current_time); + } + + if (changed || (needed_update && !counters_need_update)) { + transfer_matrix_values(raw, cooked, num_rows, current_time); + } +} + +// If the current time is > debounce counter, set the counter to enable input. +void update_debounce_counters(uint8_t num_rows, uint8_t current_time) { + counters_need_update = false; + debounce_counter_t *debounce_pointer = debounce_counters; + for (uint8_t row = 0; row < num_rows; row++) { + if (*debounce_pointer != DEBOUNCE_ELAPSED) { + if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) { + *debounce_pointer = DEBOUNCE_ELAPSED; + } else { + counters_need_update = true; + } + } + debounce_pointer++; + } +} + +// upload from raw_matrix to final matrix; +void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) { + debounce_counter_t *debounce_pointer = debounce_counters; + for (uint8_t row = 0; row < num_rows; row++) { + matrix_row_t existing_row = cooked[row]; + matrix_row_t raw_row = raw[row]; + + // determine new value basd on debounce pointer + raw value + if (*debounce_pointer == DEBOUNCE_ELAPSED && (existing_row != raw_row)) { + *debounce_pointer = current_time; + cooked[row] = raw_row; + counters_need_update = true; + } + + debounce_pointer++; + } +} + +bool debounce_active(void) { return true; } diff --git a/quantum/debounce/readme.md b/quantum/debounce/readme.md new file mode 100644 index 000000000000..f77f78c764f9 --- /dev/null +++ b/quantum/debounce/readme.md @@ -0,0 +1,28 @@ +Debounce algorithms belong in this folder. +Here are a few ideas + +1) Global vs Per-Key vs Per-Row + * Global - one timer for all keys. Any key change state affects global timer + * Per key - one timer per key + * Per row - one timer per row + +2) Eager vs symmetric vs asymmetric + * Eager - any key change is reported immediately. All further inputs for DEBOUNCE ms are ignored. + * Symmetric - wait for no changes for DEBOUNCE ms before reporting change + * Asymmetric - wait for different times depending on key-down/key-up. E.g. Eager key-down, DEBOUNCE ms key up. + +3) Timestamp vs cycles + * old old old code waits n cycles, decreasing count by one each matrix_scan + * newer code stores the millisecond the change occurred, and does subraction to figure out time elapsed. + * Timestamps are superior, i don't think cycles will ever be used again once upgraded. + +The default algorithm is symmetric and global. +Here are a few that could be implemented: + +sym_g.c +sym_pk.c +sym_pr.c +sym_pr_cycles.c +eager_g.c +eager_pk.c +eager_pr.c //could be used in ergo-dox! diff --git a/quantum/debounce/sym_g.c b/quantum/debounce/sym_g.c new file mode 100644 index 000000000000..c8ab34e1a0ca --- /dev/null +++ b/quantum/debounce/sym_g.c @@ -0,0 +1,57 @@ +/* +Copyright 2017 Alex Ong +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 . +*/ + +/* +Basic global debounce algorithm. Used in 99% of keyboards at time of implementation +When no state changes have occured for DEBOUNCE milliseconds, we push the state. +*/ +#include "matrix.h" +#include "timer.h" +#include "quantum.h" +#ifndef DEBOUNCE + #define DEBOUNCE 5 +#endif + +void debounce_init(uint8_t num_rows) {} +static bool debouncing = false; + +#if DEBOUNCE > 0 +static uint16_t debouncing_time; +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) +{ + if (changed) { + debouncing = true; + debouncing_time = timer_read(); + } + + if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { + for (int i = 0; i < num_rows; i++) { + cooked[i] = raw[i]; + } + debouncing = false; + } +} +#else //no debouncing. +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) +{ + for (int i = 0; i < num_rows; i++) { + cooked[i] = raw[i]; + } +} +#endif + +bool debounce_active(void) { + return debouncing; +} + diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index 14627a93d6de..38400e36f10d 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -210,19 +210,27 @@ void dynamic_keymap_macro_send( uint8_t id ) ++p; } - // Send the macro string one char at a time - // by making temporary 1 char strings - char data[2] = { 0, 0 }; + // Send the macro string one or two chars at a time + // by making temporary 1 or 2 char strings + char data[3] = { 0, 0, 0 }; // We already checked there was a null at the end of // the buffer, so this cannot go past the end while ( 1 ) { - data[0] = eeprom_read_byte(p); + data[0] = eeprom_read_byte(p++); + data[1] = 0; // Stop at the null terminator of this macro string if ( data[0] == 0 ) { break; } + // If the char is magic (tap, down, up), + // add the next char (key to use) and send a 2 char string. + if ( data[0] == SS_TAP_CODE || data[0] == SS_DOWN_CODE || data[0] == SS_UP_CODE ) { + data[1] = eeprom_read_byte(p++); + if ( data[1] == 0 ) { + break; + } + } send_string(data); - ++p; } } diff --git a/quantum/encoder.c b/quantum/encoder.c index 6629a098b86d..ddf6234ab8a1 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -17,6 +17,10 @@ #include "encoder.h" +// for memcpy +#include + + #ifndef ENCODER_RESOLUTION #define ENCODER_RESOLUTION 4 #endif @@ -35,7 +39,13 @@ static pin_t encoders_pad_b[NUMBER_OF_ENCODERS] = ENCODERS_PAD_B; static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 }; static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0}; + +#ifdef SPLIT_KEYBOARD +// slave half encoders come over as second set of encoders +static int8_t encoder_value[NUMBER_OF_ENCODERS * 2] = {0}; +#else static int8_t encoder_value[NUMBER_OF_ENCODERS] = {0}; +#endif __attribute__ ((weak)) void encoder_update_user(int8_t index, bool clockwise) { } @@ -60,11 +70,30 @@ void encoder_read(void) { encoder_state[i] |= (readPin(encoders_pad_a[i]) << 0) | (readPin(encoders_pad_b[i]) << 1); encoder_value[i] += encoder_LUT[encoder_state[i] & 0xF]; if (encoder_value[i] >= ENCODER_RESOLUTION) { - encoder_update_kb(i, COUNTRECLOCKWISE); + encoder_update_kb(i, false); } if (encoder_value[i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise - encoder_update_kb(i, CLOCKWISE); + encoder_update_kb(i, true); } encoder_value[i] %= ENCODER_RESOLUTION; } } + +#ifdef SPLIT_KEYBOARD +void encoder_state_raw(uint8_t* slave_state) { + memcpy(slave_state, encoder_state, sizeof(encoder_state)); +} + +void encoder_update_raw(uint8_t* slave_state) { + for (int i = 0; i < NUMBER_OF_ENCODERS; i++) { + encoder_value[NUMBER_OF_ENCODERS + i] += encoder_LUT[slave_state[i] & 0xF]; + if (encoder_value[NUMBER_OF_ENCODERS + i] >= ENCODER_RESOLUTION) { + encoder_update_kb(NUMBER_OF_ENCODERS + i, false); + } + if (encoder_value[NUMBER_OF_ENCODERS + i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise + encoder_update_kb(NUMBER_OF_ENCODERS + i, true); + } + encoder_value[NUMBER_OF_ENCODERS + i] %= ENCODER_RESOLUTION; + } +} +#endif diff --git a/quantum/encoder.h b/quantum/encoder.h index 2024fa303f34..ec09a8cc475a 100644 --- a/quantum/encoder.h +++ b/quantum/encoder.h @@ -19,11 +19,13 @@ #include "quantum.h" -#define COUNTRECLOCKWISE 0 -#define CLOCKWISE 1 - void encoder_init(void); void encoder_read(void); void encoder_update_kb(int8_t index, bool clockwise); void encoder_update_user(int8_t index, bool clockwise); + +#ifdef SPLIT_KEYBOARD +void encoder_state_raw(uint8_t* slave_state); +void encoder_update_raw(uint8_t* slave_state); +#endif diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 9d2d331ce549..eef739a14a02 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -29,10 +29,6 @@ along with this program. If not, see . #include "backlight.h" #include "quantum.h" -#ifdef SPLIT_KEYBOARD - #include "split_flags.h" -#endif - #ifdef MIDI_ENABLE #include "process_midi.h" #endif @@ -138,39 +134,21 @@ action_t action_for_key(uint8_t layer, keypos_t key) #ifdef BACKLIGHT_ENABLE case BL_ON: action.code = ACTION_BACKLIGHT_ON(); - #ifdef SPLIT_KEYBOARD - BACKLIT_DIRTY = true; - #endif break; case BL_OFF: action.code = ACTION_BACKLIGHT_OFF(); - #ifdef SPLIT_KEYBOARD - BACKLIT_DIRTY = true; - #endif break; case BL_DEC: action.code = ACTION_BACKLIGHT_DECREASE(); - #ifdef SPLIT_KEYBOARD - BACKLIT_DIRTY = true; - #endif break; case BL_INC: action.code = ACTION_BACKLIGHT_INCREASE(); - #ifdef SPLIT_KEYBOARD - BACKLIT_DIRTY = true; - #endif break; case BL_TOGG: action.code = ACTION_BACKLIGHT_TOGGLE(); - #ifdef SPLIT_KEYBOARD - BACKLIT_DIRTY = true; - #endif break; case BL_STEP: action.code = ACTION_BACKLIGHT_STEP(); - #ifdef SPLIT_KEYBOARD - BACKLIT_DIRTY = true; - #endif break; #endif #ifdef SWAP_HANDS_ENABLE diff --git a/quantum/keymap_extras/keymap_norman.h b/quantum/keymap_extras/keymap_norman.h new file mode 100644 index 000000000000..995b1b8a02fd --- /dev/null +++ b/quantum/keymap_extras/keymap_norman.h @@ -0,0 +1,54 @@ + +/* Copyright 2019 Torben Hoffmann + * + * 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 . + */ +#pragma once + +#include "keymap.h" +// For software implementation of norman +#define NM_Q KC_Q +#define NM_W KC_W +#define NM_D KC_E +#define NM_F KC_R +#define NM_K KC_T +#define NM_J KC_Y +#define NM_U KC_U +#define NM_R KC_I +#define NM_L KC_O +#define NM_SCLN KC_P +#define NM_COLN LSFT(NM_SCLN) + +#define NM_A KC_A +#define NM_S KC_S +#define NM_E KC_D +#define NM_T KC_F +#define NM_G KC_G +#define NM_Y KC_H +#define NM_N KC_J +#define NM_I KC_K +#define NM_O KC_L +#define NM_H KC_SCLN + +#define NM_Z KC_Z +#define NM_X KC_X +#define NM_C KC_C +#define NM_V KC_V +#define NM_B KC_B +#define NM_P KC_N +#define NM_M KC_M +#define NM_COMM KC_COMM +#define NM_DOT KC_DOT +#define NM_SLSH KC_SLSH + diff --git a/quantum/keymap_extras/sendstring_norman.h b/quantum/keymap_extras/sendstring_norman.h new file mode 100644 index 000000000000..57d450ca857c --- /dev/null +++ b/quantum/keymap_extras/sendstring_norman.h @@ -0,0 +1,39 @@ +/* Copyright 2019 Torben Hoffmann + * + * 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 . + */ +/* Sendstring definitions for the Colemak layout */ +#pragma once + +#include "keymap_norman.h" + +const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, KC_ESC, 0, 0, 0, 0, + KC_SPC, KC_1, KC_QUOT, KC_3, KC_4, KC_5, KC_7, KC_QUOT, + KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, + KC_8, KC_9, NM_SCLN, NM_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, + KC_2, NM_A, NM_B, NM_C, NM_D, NM_E, NM_F, NM_G, + NM_H, NM_I, NM_J, NM_K, NM_L, NM_M, NM_N, NM_O, + NM_P, NM_Q, NM_R, NM_S, NM_T, NM_U, NM_V, NM_W, + NM_X, NM_Y, NM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, + KC_GRV, NM_A, NM_B, NM_C, NM_D, NM_E, NM_F, NM_G, + NM_H, NM_I, NM_J, NM_K, NM_L, NM_M, NM_N, NM_O, + NM_P, NM_Q, NM_R, NM_S, NM_T, NM_U, NM_V, NM_W, + NM_X, NM_Y, NM_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL +}; + diff --git a/quantum/keymap_extras/sendstring_uk.h b/quantum/keymap_extras/sendstring_uk.h new file mode 100644 index 000000000000..2824e5d444a1 --- /dev/null +++ b/quantum/keymap_extras/sendstring_uk.h @@ -0,0 +1,62 @@ +/* Copyright 2019 Rys Sommefeldt + * + * 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 . + */ + +/* SEND_STRING() LUTs for UK layouts */ + +#ifndef SENDSTRING_UK +#define SENDSTRING_UK + +const bool ascii_to_shift_lut[0x80] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 1, 1, 0, 1, 1, 1, 0, + 1, 1, 1, 1, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 1, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 0, 0, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0 +}; + +const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, KC_ESC, 0, 0, 0, 0, + + KC_SPC, KC_1, KC_2, KC_NUHS, KC_4, KC_5, KC_7, KC_QUOT, + KC_9, KC_0, KC_8, KC_EQL, KC_COMM, KC_MINS, KC_DOT, KC_SLSH, + KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, + KC_8, KC_9, KC_SCLN, KC_SCLN, KC_COMM, KC_EQL, KC_DOT, KC_SLSH, + KC_QUOT, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, + KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, + KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_6, KC_MINS, + KC_GRV, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, + KC_H, KC_I, KC_J, KC_K, KC_L, KC_M, KC_N, KC_O, + KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, + KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL +}; + +#endif diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c new file mode 100644 index 000000000000..8ef8abe712b9 --- /dev/null +++ b/quantum/led_matrix.c @@ -0,0 +1,391 @@ +/* Copyright 2017 Jason Williams + * Copyright 2017 Jack Humbert + * Copyright 2018 Yiancar + * Copyright 2019 Clueboard + * + * 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 . + */ + +#include +#include +#include "quantum.h" +#include "ledmatrix.h" +#include "progmem.h" +#include "config.h" +#include "eeprom.h" +#include +#include + +led_config_t led_matrix_config; + +#ifndef MAX + #define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) +#endif + +#ifndef MIN + #define MIN(a,b) ((a) < (b)? (a): (b)) +#endif + +#ifndef LED_DISABLE_AFTER_TIMEOUT + #define LED_DISABLE_AFTER_TIMEOUT 0 +#endif + +#ifndef LED_DISABLE_WHEN_USB_SUSPENDED + #define LED_DISABLE_WHEN_USB_SUSPENDED false +#endif + +#ifndef EECONFIG_LED_MATRIX + #define EECONFIG_LED_MATRIX EECONFIG_RGBLIGHT +#endif + +#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > 255 + #define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 +#endif + +bool g_suspend_state = false; + +// Global tick at 20 Hz +uint32_t g_tick = 0; + +// Ticks since this key was last hit. +uint8_t g_key_hit[LED_DRIVER_LED_COUNT]; + +// Ticks since any key was last hit. +uint32_t g_any_key_hit = 0; + +uint32_t eeconfig_read_led_matrix(void) { + return eeprom_read_dword(EECONFIG_LED_MATRIX); +} + +void eeconfig_update_led_matrix(uint32_t config_value) { + eeprom_update_dword(EECONFIG_LED_MATRIX, config_value); +} + +void eeconfig_update_led_matrix_default(void) { + dprintf("eeconfig_update_led_matrix_default\n"); + led_matrix_config.enable = 1; + led_matrix_config.mode = LED_MATRIX_UNIFORM_BRIGHTNESS; + led_matrix_config.val = 128; + led_matrix_config.speed = 0; + eeconfig_update_led_matrix(led_matrix_config.raw); +} + +void eeconfig_debug_led_matrix(void) { + dprintf("led_matrix_config eeprom\n"); + dprintf("led_matrix_config.enable = %d\n", led_matrix_config.enable); + dprintf("led_matrix_config.mode = %d\n", led_matrix_config.mode); + dprintf("led_matrix_config.val = %d\n", led_matrix_config.val); + dprintf("led_matrix_config.speed = %d\n", led_matrix_config.speed); +} + +// Last led hit +#ifndef LED_HITS_TO_REMEMBER + #define LED_HITS_TO_REMEMBER 8 +#endif +uint8_t g_last_led_hit[LED_HITS_TO_REMEMBER] = {255}; +uint8_t g_last_led_count = 0; + +void map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i, uint8_t *led_count) { + led_matrix led; + *led_count = 0; + + for (uint8_t i = 0; i < LED_DRIVER_LED_COUNT; i++) { + // map_index_to_led(i, &led); + led = g_leds[i]; + if (row == led.matrix_co.row && column == led.matrix_co.col) { + led_i[*led_count] = i; + (*led_count)++; + } + } +} + +void led_matrix_update_pwm_buffers(void) { + led_matrix_driver.flush(); +} + +void led_matrix_set_index_value(int index, uint8_t value) { + led_matrix_driver.set_value(index, value); +} + +void led_matrix_set_index_value_all(uint8_t value) { + led_matrix_driver.set_value_all(value); +} + +bool process_led_matrix(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + uint8_t led[8], led_count; + map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); + if (led_count > 0) { + for (uint8_t i = LED_HITS_TO_REMEMBER; i > 1; i--) { + g_last_led_hit[i - 1] = g_last_led_hit[i - 2]; + } + g_last_led_hit[0] = led[0]; + g_last_led_count = MIN(LED_HITS_TO_REMEMBER, g_last_led_count + 1); + } + for(uint8_t i = 0; i < led_count; i++) + g_key_hit[led[i]] = 0; + g_any_key_hit = 0; + } else { + #ifdef LED_MATRIX_KEYRELEASES + uint8_t led[8], led_count; + map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); + for(uint8_t i = 0; i < led_count; i++) + g_key_hit[led[i]] = 255; + + g_any_key_hit = 255; + #endif + } + return true; +} + +void led_matrix_set_suspend_state(bool state) { + g_suspend_state = state; +} + +// All LEDs off +void led_matrix_all_off(void) { + led_matrix_set_index_value_all(0); +} + +// Uniform brightness +void led_matrix_uniform_brightness(void) { + led_matrix_set_index_value_all(LED_MATRIX_MAXIMUM_BRIGHTNESS / BACKLIGHT_LEVELS * led_matrix_config.val); +} + +void led_matrix_custom(void) {} + +void led_matrix_task(void) { + if (!led_matrix_config.enable) { + led_matrix_all_off(); + led_matrix_indicators(); + return; + } + + g_tick++; + + if (g_any_key_hit < 0xFFFFFFFF) { + g_any_key_hit++; + } + + for (int led = 0; led < LED_DRIVER_LED_COUNT; led++) { + if (g_key_hit[led] < 255) { + if (g_key_hit[led] == 254) + g_last_led_count = MAX(g_last_led_count - 1, 0); + g_key_hit[led]++; + } + } + + // Ideally we would also stop sending zeros to the LED driver PWM buffers + // while suspended and just do a software shutdown. This is a cheap hack for now. + bool suspend_backlight = ((g_suspend_state && LED_DISABLE_WHEN_USB_SUSPENDED) || + (LED_DISABLE_AFTER_TIMEOUT > 0 && g_any_key_hit > LED_DISABLE_AFTER_TIMEOUT * 60 * 20)); + uint8_t effect = suspend_backlight ? 0 : led_matrix_config.mode; + + // this gets ticked at 20 Hz. + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch (effect) { + case LED_MATRIX_UNIFORM_BRIGHTNESS: + led_matrix_uniform_brightness(); + break; + default: + led_matrix_custom(); + break; + } + + if (!suspend_backlight) { + led_matrix_indicators(); + } + + // Tell the LED driver to update its state + led_matrix_driver.flush(); +} + +void led_matrix_indicators(void) { + led_matrix_indicators_kb(); + led_matrix_indicators_user(); +} + +__attribute__((weak)) +void led_matrix_indicators_kb(void) {} + +__attribute__((weak)) +void led_matrix_indicators_user(void) {} + + +// void led_matrix_set_indicator_index(uint8_t *index, uint8_t row, uint8_t column) +// { +// if (row >= MATRIX_ROWS) +// { +// // Special value, 255=none, 254=all +// *index = row; +// } +// else +// { +// // This needs updated to something like +// // uint8_t led[8], led_count; +// // map_row_column_to_led(row,column,led,&led_count); +// // for(uint8_t i = 0; i < led_count; i++) +// map_row_column_to_led(row, column, index); +// } +// } + +void led_matrix_init(void) { + led_matrix_driver.init(); + + // Wait half a second for the driver to finish initializing + wait_ms(500); + + // clear the key hits + for (int led=0; led= LED_MATRIX_EFFECT_MAX) { + led_matrix_config.mode = 1; + } + eeconfig_update_led_matrix(led_matrix_config.raw); +} + +void led_matrix_step_reverse(void) { + led_matrix_config.mode--; + if (led_matrix_config.mode < 1) { + led_matrix_config.mode = LED_MATRIX_EFFECT_MAX - 1; + } + eeconfig_update_led_matrix(led_matrix_config.raw); +} + +void led_matrix_increase_val(void) { + led_matrix_config.val = increment(led_matrix_config.val, 8, 0, LED_MATRIX_MAXIMUM_BRIGHTNESS); + eeconfig_update_led_matrix(led_matrix_config.raw); +} + +void led_matrix_decrease_val(void) { + led_matrix_config.val = decrement(led_matrix_config.val, 8, 0, LED_MATRIX_MAXIMUM_BRIGHTNESS); + eeconfig_update_led_matrix(led_matrix_config.raw); +} + +void led_matrix_increase_speed(void) { + led_matrix_config.speed = increment(led_matrix_config.speed, 1, 0, 3); + eeconfig_update_led_matrix(led_matrix_config.raw);//EECONFIG needs to be increased to support this +} + +void led_matrix_decrease_speed(void) { + led_matrix_config.speed = decrement(led_matrix_config.speed, 1, 0, 3); + eeconfig_update_led_matrix(led_matrix_config.raw);//EECONFIG needs to be increased to support this +} + +void led_matrix_mode(uint8_t mode, bool eeprom_write) { + led_matrix_config.mode = mode; + if (eeprom_write) { + eeconfig_update_led_matrix(led_matrix_config.raw); + } +} + +uint8_t led_matrix_get_mode(void) { + return led_matrix_config.mode; +} + +void led_matrix_set_value_noeeprom(uint8_t val) { + led_matrix_config.val = val; +} + +void led_matrix_set_value(uint8_t val) { + led_matrix_set_value_noeeprom(val); + eeconfig_update_led_matrix(led_matrix_config.raw); +} + +void backlight_set(uint8_t val) { + led_matrix_set_value(val); +} diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix_drivers.c new file mode 100644 index 000000000000..cb91821a4028 --- /dev/null +++ b/quantum/led_matrix_drivers.c @@ -0,0 +1,149 @@ +/* Copyright 2018 James Laird-Wah + * Copyright 2019 Clueboard + * + * 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 . + */ + +#include +#include +#include "quantum.h" +#include "ledmatrix.h" + +/* Each driver needs to define a struct: + * + * const led_matrix_driver_t led_matrix_driver; + * + * All members must be provided. Keyboard custom drivers must define this + * in their own files. + */ + +#if defined(IS31FL3731) || defined(IS31FL3733) + +#if defined(IS31FL3731) + #include "is31fl3731-simple.h" +#endif + +#include "i2c_master.h" + +static void init(void) { + i2c_init(); + #ifdef IS31FL3731 + #ifdef LED_DRIVER_ADDR_1 + IS31FL3731_init(LED_DRIVER_ADDR_1); + #endif + #ifdef LED_DRIVER_ADDR_2 + IS31FL3731_init(LED_DRIVER_ADDR_2); + #endif + #ifdef LED_DRIVER_ADDR_3 + IS31FL3731_init(LED_DRIVER_ADDR_3); + #endif + #ifdef LED_DRIVER_ADDR_4 + IS31FL3731_init(LED_DRIVER_ADDR_4); + #endif + #else + #ifdef LED_DRIVER_ADDR_1 + IS31FL3733_init(LED_DRIVER_ADDR_1, 0 ); + #endif + #ifdef LED_DRIVER_ADDR_2 + IS31FL3733_init(LED_DRIVER_ADDR_2, 0 ); + #endif + #ifdef LED_DRIVER_ADDR_3 + IS31FL3733_init(LED_DRIVER_ADDR_3, 0 ); + #endif + #ifdef LED_DRIVER_ADDR_4 + IS31FL3733_init(LED_DRIVER_ADDR_4, 0 ); + #endif + #endif + + for (int index = 0; index < LED_DRIVER_LED_COUNT; index++) { + #ifdef IS31FL3731 + IS31FL3731_set_led_control_register(index, true); + #else + IS31FL3733_set_led_control_register(index, true); + #endif + } + // This actually updates the LED drivers + #ifdef IS31FL3731 + #ifdef LED_DRIVER_ADDR_1 + IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_1, 0); + #endif + #ifdef LED_DRIVER_ADDR_2 + IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_2, 1); + #endif + #ifdef LED_DRIVER_ADDR_3 + IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_3, 2); + #endif + #ifdef LED_DRIVER_ADDR_4 + IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_4, 3); + #endif + #else + #ifdef LED_DRIVER_ADDR_1 + IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_1, 0); + #endif + #ifdef LED_DRIVER_ADDR_2 + IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_2, 1); + #endif + #ifdef LED_DRIVER_ADDR_3 + IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_3, 2); + #endif + #ifdef LED_DRIVER_ADDR_4 + IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_4, 3); + #endif + #endif +} + +static void flush(void) { + #ifdef IS31FL3731 + #ifdef LED_DRIVER_ADDR_1 + IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_1, 0); + #endif + #ifdef LED_DRIVER_ADDR_2 + IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_2, 1); + #endif + #ifdef LED_DRIVER_ADDR_3 + IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_3, 2); + #endif + #ifdef LED_DRIVER_ADDR_4 + IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_4, 3); + #endif + #else + #ifdef LED_DRIVER_ADDR_1 + IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_1, 0); + #endif + #ifdef LED_DRIVER_ADDR_2 + IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_2, 1); + #endif + #ifdef LED_DRIVER_ADDR_3 + IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_3, 2); + #endif + #ifdef LED_DRIVER_ADDR_4 + IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_4, 3); + #endif + #endif +} + +const led_matrix_driver_t led_matrix_driver = { + .init = init, + .flush = flush, +#ifdef IS31FL3731 + .set_value = IS31FL3731_set_value, + .set_value_all = IS31FL3731_set_value_all, +#else + .set_value = IS31FL3733_set_value, + .set_value_all = IS31FL3733_set_value_all, +#endif +}; + + +#endif diff --git a/quantum/led_tables.c b/quantum/led_tables.c index b99f262097f8..0eeb5c44b602 100644 --- a/quantum/led_tables.c +++ b/quantum/led_tables.c @@ -19,38 +19,28 @@ along with this program. If not, see . #ifdef USE_CIE1931_CURVE // Lightness curve using the CIE 1931 lightness formula //Generated by the python script provided in http://jared.geek.nz/2013/feb/linear-led-pwm -const uint8_t CIE1931_CURVE[] PROGMEM = { - 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, - 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, - 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, - 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, - 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, - 13, 14, 14, 15, 15, 15, 16, 16, 17, 17, - 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, - 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, - 28, 28, 29, 29, 30, 31, 31, 32, 32, 33, - 34, 34, 35, 36, 37, 37, 38, 39, 39, 40, - 41, 42, 43, 43, 44, 45, 46, 47, 47, 48, - 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 70, 71, 72, 73, 74, 75, 76, 77, 79, - 80, 81, 82, 83, 85, 86, 87, 88, 90, 91, - 92, 94, 95, 96, 98, 99, 100, 102, 103, 105, - 106, 108, 109, 110, 112, 113, 115, 116, 118, 120, - 121, 123, 124, 126, 128, 129, 131, 132, 134, 136, - 138, 139, 141, 143, 145, 146, 148, 150, 152, 154, - 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, - 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, - 196, 198, 200, 202, 204, 207, 209, 211, 214, 216, - 218, 220, 223, 225, 228, 230, 232, 235, 237, 240, - 242, 245, 247, 250, 252, 255, - }; +const uint8_t CIE1931_CURVE[256] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, + 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, + 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, + 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 16, 16, 16, + 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, + 25, 25, 26, 26, 27, 28, 28, 29, 29, 30, 31, 31, 32, 33, 33, 34, + 35, 35, 36, 37, 37, 38, 39, 40, 40, 41, 42, 43, 44, 44, 45, 46, + 47, 48, 49, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, + 79, 80, 82, 83, 84, 85, 87, 88, 89, 90, 92, 93, 94, 96, 97, 99, +100, 101, 103, 104, 106, 107, 108, 110, 111, 113, 114, 116, 118, 119, 121, 122, +124, 125, 127, 129, 130, 132, 134, 135, 137, 139, 141, 142, 144, 146, 148, 149, +151, 153, 155, 157, 159, 161, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, +182, 185, 187, 189, 191, 193, 195, 197, 200, 202, 204, 206, 208, 211, 213, 215, +218, 220, 222, 225, 227, 230, 232, 234, 237, 239, 242, 244, 247, 249, 252, 255 +}; #endif #ifdef USE_LED_BREATHING_TABLE -const uint8_t LED_BREATHING_TABLE[] PROGMEM = { +const uint8_t LED_BREATHING_TABLE[256] PROGMEM = { 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 7, 9, 10, 11, 12, 14, 15, 17, 18, 20, 21, 23, 25, 27, 29, 31, 33, 35, 37, 40, 42, 44, 47, 49, 52, 54, 57, 59, 62, 65, 67, 70, 73, 76, diff --git a/quantum/ledmatrix.h b/quantum/ledmatrix.h new file mode 100644 index 000000000000..618c5d67674e --- /dev/null +++ b/quantum/ledmatrix.h @@ -0,0 +1,129 @@ +/* Copyright 2017 Jason Williams + * Copyright 2017 Jack Humbert + * Copyright 2018 Yiancar + * Copyright 2019 Clueboard + * + * 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 . + */ + +#ifndef LED_MATRIX_H +#define LED_MATRIX_H + + +#ifndef BACKLIGHT_ENABLE + #error You must define BACKLIGHT_ENABLE with LED_MATRIX_ENABLE +#endif + + +typedef struct Point { + uint8_t x; + uint8_t y; +} __attribute__((packed)) Point; + +typedef struct led_matrix { + union { + uint8_t raw; + struct { + uint8_t row:4; // 16 max + uint8_t col:4; // 16 max + }; + } matrix_co; + Point point; + uint8_t modifier:1; +} __attribute__((packed)) led_matrix; + +extern const led_matrix g_leds[LED_DRIVER_LED_COUNT]; + +typedef struct { + uint8_t index; + uint8_t value; +} led_indicator; + +typedef union { + uint32_t raw; + struct { + bool enable :1; + uint8_t mode :6; + uint8_t hue :8; // Unused by led_matrix + uint8_t sat :8; // Unused by led_matrix + uint8_t val :8; + uint8_t speed :8;//EECONFIG needs to be increased to support this + }; +} led_config_t; + +enum led_matrix_effects { + LED_MATRIX_UNIFORM_BRIGHTNESS = 1, + // All new effects go above this line + LED_MATRIX_EFFECT_MAX +}; + +void led_matrix_set_index_value(int index, uint8_t value); +void led_matrix_set_index_value_all(uint8_t value); + +// This runs after another backlight effect and replaces +// colors already set +void led_matrix_indicators(void); +void led_matrix_indicators_kb(void); +void led_matrix_indicators_user(void); + +void led_matrix_init(void); +void led_matrix_setup_drivers(void); + +void led_matrix_set_suspend_state(bool state); +void led_matrix_set_indicator_state(uint8_t state); + +void led_matrix_task(void); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void led_matrix_update_pwm_buffers(void); + +bool process_led_matrix(uint16_t keycode, keyrecord_t *record); + +uint32_t led_matrix_get_tick(void); + +void led_matrix_toggle(void); +void led_matrix_enable(void); +void led_matrix_enable_noeeprom(void); +void led_matrix_disable(void); +void led_matrix_disable_noeeprom(void); +void led_matrix_step(void); +void led_matrix_step_reverse(void); +void led_matrix_increase_val(void); +void led_matrix_decrease_val(void); +void led_matrix_increase_speed(void); +void led_matrix_decrease_speed(void); +void led_matrix_mode(uint8_t mode, bool eeprom_write); +void led_matrix_mode_noeeprom(uint8_t mode); +uint8_t led_matrix_get_mode(void); +void led_matrix_set_value(uint8_t mode); +void led_matrix_set_value_noeeprom(uint8_t mode); + +typedef struct { + /* Perform any initialisation required for the other driver functions to work. */ + void (*init)(void); + + /* Set the brightness of a single LED in the buffer. */ + void (*set_value)(int index, uint8_t value); + /* Set the brightness of all LEDS on the keyboard in the buffer. */ + void (*set_value_all)(uint8_t value); + /* Flush any buffered changes to the hardware. */ + void (*flush)(void); +} led_matrix_driver_t; + +extern const led_matrix_driver_t led_matrix_driver; + +#endif diff --git a/quantum/matrix.c b/quantum/matrix.c index d2b805d7f1fa..ca63f50f2479 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -45,30 +45,16 @@ along with this program. If not, see . extern const matrix_row_t matrix_mask[]; #endif -#if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #endif /* matrix state(1:on, 0:off) */ -static matrix_row_t raw_matrix[MATRIX_ROWS]; - -static matrix_row_t matrix[MATRIX_ROWS]; - - -#if (DIODE_DIRECTION == COL2ROW) - static void init_cols(void); - static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); - static void unselect_rows(void); - static void select_row(uint8_t row); - static void unselect_row(uint8_t row); -#elif (DIODE_DIRECTION == ROW2COL) - static void init_rows(void); - static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); - static void unselect_cols(void); - static void unselect_col(uint8_t col); - static void select_col(uint8_t col); -#endif +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values __attribute__ ((weak)) void matrix_init_quantum(void) { @@ -108,73 +94,7 @@ uint8_t matrix_cols(void) { return MATRIX_COLS; } -// void matrix_power_up(void) { -// #if (DIODE_DIRECTION == COL2ROW) -// for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { -// /* DDRxn */ -// _SFR_IO8((row_pins[r] >> 4) + 1) |= _BV(row_pins[r] & 0xF); -// toggle_row(r); -// } -// for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { -// /* PORTxn */ -// _SFR_IO8((col_pins[c] >> 4) + 2) |= _BV(col_pins[c] & 0xF); -// } -// #elif (DIODE_DIRECTION == ROW2COL) -// for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) { -// /* DDRxn */ -// _SFR_IO8((col_pins[c] >> 4) + 1) |= _BV(col_pins[c] & 0xF); -// toggle_col(c); -// } -// for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) { -// /* PORTxn */ -// _SFR_IO8((row_pins[r] >> 4) + 2) |= _BV(row_pins[r] & 0xF); -// } -// #endif -// } - -void matrix_init(void) { - - // initialize row and col -#if (DIODE_DIRECTION == COL2ROW) - unselect_rows(); - init_cols(); -#elif (DIODE_DIRECTION == ROW2COL) - unselect_cols(); - init_rows(); -#endif - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - raw_matrix[i] = 0; - matrix[i] = 0; - } - debounce_init(MATRIX_ROWS); - - matrix_init_quantum(); -} - -uint8_t matrix_scan(void) -{ - bool changed = false; - -#if (DIODE_DIRECTION == COL2ROW) - // Set row, read cols - for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { - changed |= read_cols_on_row(raw_matrix, current_row); - } -#elif (DIODE_DIRECTION == ROW2COL) - // Set col, read rows - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { - changed |= read_rows_on_col(raw_matrix, current_col); - } -#endif - - debounce(raw_matrix, matrix, MATRIX_ROWS, changed); - - matrix_scan_quantum(); - return 1; -} - +//Deprecated. bool matrix_is_modified(void) { if (debounce_active()) return false; @@ -220,16 +140,60 @@ uint8_t matrix_key_count(void) } +#ifdef DIRECT_PINS + +static void init_pins(void) { + for (int row = 0; row < MATRIX_ROWS; row++) { + for (int col = 0; col < MATRIX_COLS; col++) { + pin_t pin = direct_pins[row][col]; + if (pin != NO_PIN) { + setPinInputHigh(pin); + } + } + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + matrix_row_t last_row_value = current_matrix[current_row]; + current_matrix[current_row] = 0; + + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + pin_t pin = direct_pins[current_row][col_index]; + if (pin != NO_PIN) { + current_matrix[current_row] |= readPin(pin) ? 0 : (ROW_SHIFTER << col_index); + } + } + + return (last_row_value != current_matrix[current_row]); +} + +#elif (DIODE_DIRECTION == COL2ROW) + +static void select_row(uint8_t row) +{ + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} -#if (DIODE_DIRECTION == COL2ROW) +static void unselect_row(uint8_t row) +{ + setPinInputHigh(row_pins[row]); +} -static void init_cols(void) +static void unselect_rows(void) { - for(uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh(col_pins[x]); + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInput(row_pins[x]); } } +static void init_pins(void) { + unselect_rows(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { // Store last value of row prior to reading @@ -258,31 +222,31 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) return (last_row_value != current_matrix[current_row]); } -static void select_row(uint8_t row) +#elif (DIODE_DIRECTION == ROW2COL) + +static void select_col(uint8_t col) { - setPinOutput(row_pins[row]); - writePinLow(row_pins[row]); + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); } -static void unselect_row(uint8_t row) +static void unselect_col(uint8_t col) { - setPinInputHigh(row_pins[row]); + setPinInputHigh(col_pins[col]); } -static void unselect_rows(void) +static void unselect_cols(void) { - for(uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInput(row_pins[x]); + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); } } -#elif (DIODE_DIRECTION == ROW2COL) - -static void init_rows(void) -{ - for(uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInputHigh(row_pins[x]); - } +static void init_pins(void) { + unselect_cols(); + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } } static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) @@ -325,22 +289,42 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) return matrix_changed; } -static void select_col(uint8_t col) -{ - setPinOutput(col_pins[col]); - writePinLow(col_pins[col]); -} +#endif -static void unselect_col(uint8_t col) -{ - setPinInputHigh(col_pins[col]); -} +void matrix_init(void) { -static void unselect_cols(void) -{ - for(uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh(col_pins[x]); + // initialize key pins + init_pins(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); } +uint8_t matrix_scan(void) +{ + bool changed = false; + +#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW) + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { + changed |= read_cols_on_row(raw_matrix, current_row); + } +#elif (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(raw_matrix, current_col); + } #endif + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + return 1; +} diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 209b578ea55e..fa6dc8b53ca8 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -34,6 +34,7 @@ ifneq ($(findstring STM32F303, $(MCU)),) # Options to pass to dfu-util when flashing DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS = -p DF11 -v 0483 endif ifneq (,$(filter $(MCU),atmega32u4 at90usb1286)) diff --git a/quantum/process_keycode/process_clicky.c b/quantum/process_keycode/process_clicky.c index 8238c263f91d..43b803afe7fd 100644 --- a/quantum/process_keycode/process_clicky.c +++ b/quantum/process_keycode/process_clicky.c @@ -3,6 +3,9 @@ #ifdef AUDIO_CLICKY +#ifndef AUDIO_CLICKY_DELAY_DURATION +#define AUDIO_CLICKY_DELAY_DURATION 1 +#endif // !AUDIO_CLICKY_DELAY_DURATION #ifndef AUDIO_CLICKY_FREQ_DEFAULT #define AUDIO_CLICKY_FREQ_DEFAULT 440.0f #endif // !AUDIO_CLICKY_FREQ_DEFAULT @@ -21,7 +24,9 @@ float clicky_freq = AUDIO_CLICKY_FREQ_DEFAULT; float clicky_rand = AUDIO_CLICKY_FREQ_RANDOMNESS; -float clicky_song[][2] = {{AUDIO_CLICKY_FREQ_DEFAULT, 3}, {AUDIO_CLICKY_FREQ_DEFAULT, 1}}; // 3 and 1 --> durations + +// the first "note" is an intentional delay; the 2nd and 3rd notes are the "clicky" +float clicky_song[][2] = {{AUDIO_CLICKY_FREQ_MIN, AUDIO_CLICKY_DELAY_DURATION}, {AUDIO_CLICKY_FREQ_DEFAULT, 3}, {AUDIO_CLICKY_FREQ_DEFAULT, 1}}; // 3 and 1 --> durations extern audio_config_t audio_config; @@ -32,10 +37,10 @@ extern bool midi_activated; void clicky_play(void) { #ifndef NO_MUSIC_MODE - if (music_activated || midi_activated) return; + if (music_activated || midi_activated || !audio_config.enable) return; #endif // !NO_MUSIC_MODE - clicky_song[0][0] = 2.0f * clicky_freq * (1.0f + clicky_rand * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); - clicky_song[1][0] = clicky_freq * (1.0f + clicky_rand * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); + clicky_song[1][0] = 2.0f * clicky_freq * (1.0f + clicky_rand * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); + clicky_song[2][0] = clicky_freq * (1.0f + clicky_rand * ( ((float)rand()) / ((float)(RAND_MAX)) ) ); PLAY_SONG(clicky_song); } @@ -73,27 +78,29 @@ void clicky_off(void) { } bool is_clicky_on(void) { - return (audio_config.clicky_enable != 0); + return (audio_config.clicky_enable != 0); } bool process_clicky(uint16_t keycode, keyrecord_t *record) { - if (keycode == CLICKY_TOGGLE && record->event.pressed) { clicky_toggle(); } + if (keycode == CLICKY_TOGGLE && record->event.pressed) { clicky_toggle(); } - if (keycode == CLICKY_ENABLE && record->event.pressed) { clicky_on(); } - if (keycode == CLICKY_DISABLE && record->event.pressed) { clicky_off(); } + if (keycode == CLICKY_ENABLE && record->event.pressed) { clicky_on(); } + if (keycode == CLICKY_DISABLE && record->event.pressed) { clicky_off(); } - if (keycode == CLICKY_RESET && record->event.pressed) { clicky_freq_reset(); } + if (keycode == CLICKY_RESET && record->event.pressed) { clicky_freq_reset(); } - if (keycode == CLICKY_UP && record->event.pressed) { clicky_freq_up(); } - if (keycode == CLICKY_DOWN && record->event.pressed) { clicky_freq_down(); } + if (keycode == CLICKY_UP && record->event.pressed) { clicky_freq_up(); } + if (keycode == CLICKY_DOWN && record->event.pressed) { clicky_freq_down(); } - if ( audio_config.clicky_enable ) { - if (record->event.pressed) { - clicky_play();; + if (audio_config.enable && audio_config.clicky_enable) { + if (record->event.pressed) { // Leave this separate so it's easier to add upstroke sound + if (keycode != AU_OFF && keycode != AU_TOG) { // DO NOT PLAY if audio will be disabled, and causes issuse on ARM + clicky_play(); } } - return true; + } + return true; } #endif //AUDIO_CLICKY diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index 13f8bbb33127..2c6c9d0d5f65 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -14,141 +14,164 @@ * along with this program. If not, see . */ -#include "process_combo.h" #include "print.h" +#include "process_combo.h" - -__attribute__ ((weak)) -combo_t key_combos[COMBO_COUNT] = { +__attribute__((weak)) combo_t key_combos[COMBO_COUNT] = { }; -__attribute__ ((weak)) -void process_combo_event(uint8_t combo_index, bool pressed) { - -} +__attribute__((weak)) void process_combo_event(uint8_t combo_index, + bool pressed) {} +static uint16_t timer = 0; static uint8_t current_combo_index = 0; +static bool drop_buffer = false; +static bool is_active = false; -static inline void send_combo(uint16_t action, bool pressed) -{ - if (action) { - if (pressed) { - register_code16(action); - } else { - unregister_code16(action); - } - } else { - process_combo_event(current_combo_index, pressed); - } -} - -#define ALL_COMBO_KEYS_ARE_DOWN (((1<state) -#define NO_COMBO_KEYS_ARE_DOWN (0 == combo->state) -#define KEY_STATE_DOWN(key) do{ combo->state |= (1<state &= ~(1<keys; ;++count) { - uint16_t key = pgm_read_word(&keys[count]); - if (keycode == key) index = count; - if (COMBO_END == key) break; - } - - /* Return if not a combo key */ - if (-1 == (int8_t)index) return false; - - /* The combos timer is used to signal whether the combo is active */ - bool is_combo_active = combo->is_active; - - if (record->event.pressed) { - KEY_STATE_DOWN(index); - - if (is_combo_active) { - if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was pressed */ - send_combo(combo->keycode, true); - combo->is_active = false; - } else { /* Combo key was pressed */ - combo->timer = timer_read(); - combo->is_active = true; +static uint8_t buffer_size = 0; #ifdef COMBO_ALLOW_ACTION_KEYS - combo->prev_record = *record; +static keyrecord_t key_buffer[MAX_COMBO_LENGTH]; #else - combo->prev_key = keycode; +static uint16_t key_buffer[MAX_COMBO_LENGTH]; #endif - } - } + +static inline void send_combo(uint16_t action, bool pressed) { + if (action) { + if (pressed) { + register_code16(action); } else { - if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was released */ - send_combo(combo->keycode, false); - } + unregister_code16(action); + } + } else { + process_combo_event(current_combo_index, pressed); + } +} - if (is_combo_active) { /* Combo key was tapped */ +static inline void dump_key_buffer(bool emit) { + if (buffer_size == 0) { + return; + } + + if (emit) { + for (uint8_t i = 0; i < buffer_size; i++) { #ifdef COMBO_ALLOW_ACTION_KEYS - record->event.pressed = true; - process_action(record, store_or_get_action(record->event.pressed, record->event.key)); - record->event.pressed = false; - process_action(record, store_or_get_action(record->event.pressed, record->event.key)); + const action_t action = store_or_get_action(key_buffer[i].event.pressed, + key_buffer[i].event.key); + process_action(&(key_buffer[i]), action); #else - register_code16(keycode); - send_keyboard_report(); - unregister_code16(keycode); + register_code16(key_buffer[i]); + send_keyboard_report(); #endif - combo->is_active = false; - combo->timer = 0; - } - - KEY_STATE_UP(index); } + } - if (NO_COMBO_KEYS_ARE_DOWN) { - combo->is_active = true; - combo->timer = 0; - } - - return is_combo_active; + buffer_size = 0; } -bool process_combo(uint16_t keycode, keyrecord_t *record) -{ - bool is_combo_key = false; +#define ALL_COMBO_KEYS_ARE_DOWN (((1 << count) - 1) == combo->state) +#define KEY_STATE_DOWN(key) \ + do { \ + combo->state |= (1 << key); \ + } while (0) +#define KEY_STATE_UP(key) \ + do { \ + combo->state &= ~(1 << key); \ + } while (0) + +static bool process_single_combo(combo_t *combo, uint16_t keycode, + keyrecord_t *record) { + uint8_t count = 0; + uint8_t index = -1; + /* Find index of keycode and number of combo keys */ + for (const uint16_t *keys = combo->keys;; ++count) { + uint16_t key = pgm_read_word(&keys[count]); + if (keycode == key) + index = count; + if (COMBO_END == key) + break; + } + + /* Continue processing if not a combo key */ + if (-1 == (int8_t)index) + return false; + + bool is_combo_active = is_active; + + if (record->event.pressed) { + KEY_STATE_DOWN(index); + + if (is_combo_active) { + if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was pressed */ + send_combo(combo->keycode, true); + drop_buffer = true; + } + } + } else { + if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was released */ + send_combo(combo->keycode, false); + } else { + /* continue processing without immediately returning */ + is_combo_active = false; + } - for (current_combo_index = 0; current_combo_index < COMBO_COUNT; ++current_combo_index) { - combo_t *combo = &key_combos[current_combo_index]; - is_combo_key |= process_single_combo(combo, keycode, record); - } + KEY_STATE_UP(index); + } - return !is_combo_key; + return is_combo_active; } -void matrix_scan_combo(void) -{ - for (int i = 0; i < COMBO_COUNT; ++i) { - // Do not treat the (weak) key_combos too strict. - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Warray-bounds" - combo_t *combo = &key_combos[i]; - #pragma GCC diagnostic pop - if (combo->is_active && - combo->timer && - timer_elapsed(combo->timer) > COMBO_TERM) { - - /* This disables the combo, meaning key events for this - * combo will be handled by the next processors in the chain - */ - combo->is_active = false; +#define NO_COMBO_KEYS_ARE_DOWN (0 == combo->state) + +bool process_combo(uint16_t keycode, keyrecord_t *record) { + bool is_combo_key = false; + drop_buffer = false; + bool no_combo_keys_pressed = true; + + for (current_combo_index = 0; current_combo_index < COMBO_COUNT; + ++current_combo_index) { + combo_t *combo = &key_combos[current_combo_index]; + is_combo_key |= process_single_combo(combo, keycode, record); + no_combo_keys_pressed = no_combo_keys_pressed && NO_COMBO_KEYS_ARE_DOWN; + } + + if (drop_buffer) { + /* buffer is only dropped when we complete a combo, so we refresh the timer + * here */ + timer = timer_read(); + dump_key_buffer(false); + } else if (!is_combo_key) { + /* if no combos claim the key we need to emit the keybuffer */ + dump_key_buffer(true); + + // reset state if there are no combo keys pressed at all + if (no_combo_keys_pressed) { + timer = 0; + is_active = true; + } + } else if (record->event.pressed && is_active) { + /* otherwise the key is consumed and placed in the buffer */ + timer = timer_read(); + if (buffer_size < MAX_COMBO_LENGTH) { #ifdef COMBO_ALLOW_ACTION_KEYS - process_action(&combo->prev_record, - store_or_get_action(combo->prev_record.event.pressed, - combo->prev_record.event.key)); + key_buffer[buffer_size++] = *record; #else - unregister_code16(combo->prev_key); - register_code16(combo->prev_key); + key_buffer[buffer_size++] = keycode; #endif - } } + } + + return !is_combo_key; +} + +void matrix_scan_combo(void) { + if (is_active && timer && timer_elapsed(timer) > COMBO_TERM) { + + /* This disables the combo, meaning key events for this + * combo will be handled by the next processors in the chain + */ + is_active = false; + dump_key_buffer(true); + } } diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index a5787c9ed367..f06d2d3454f4 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -17,33 +17,34 @@ #ifndef PROCESS_COMBO_H #define PROCESS_COMBO_H -#include #include "progmem.h" #include "quantum.h" +#include -typedef struct -{ - const uint16_t *keys; - uint16_t keycode; #ifdef EXTRA_EXTRA_LONG_COMBOS - uint32_t state; +#define MAX_COMBO_LENGTH 32 #elif EXTRA_LONG_COMBOS - uint16_t state; +#define MAX_COMBO_LENGTH 16 #else - uint8_t state; +#define MAX_COMBO_LENGTH 8 #endif - uint16_t timer; - bool is_active; -#ifdef COMBO_ALLOW_ACTION_KEYS - keyrecord_t prev_record; + +typedef struct { + const uint16_t *keys; + uint16_t keycode; +#ifdef EXTRA_EXTRA_LONG_COMBOS + uint32_t state; +#elif EXTRA_LONG_COMBOS + uint16_t state; #else - uint16_t prev_key; + uint8_t state; #endif } combo_t; - -#define COMBO(ck, ca) {.keys = &(ck)[0], .keycode = (ca)} -#define COMBO_ACTION(ck) {.keys = &(ck)[0]} +#define COMBO(ck, ca) \ + { .keys = &(ck)[0], .keycode = (ca) } +#define COMBO_ACTION(ck) \ + { .keys = &(ck)[0] } #define COMBO_END 0 #ifndef COMBO_COUNT diff --git a/quantum/process_keycode/process_space_cadet.c b/quantum/process_keycode/process_space_cadet.c new file mode 100644 index 000000000000..089199eee22b --- /dev/null +++ b/quantum/process_keycode/process_space_cadet.c @@ -0,0 +1,153 @@ +/* Copyright 2019 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 . + */ +#include "process_space_cadet.h" + +#ifndef TAPPING_TERM + #define TAPPING_TERM 200 +#endif + +// ********** OBSOLETE DEFINES, STOP USING! (pls?) ********** +// Shift / paren setup +#ifndef LSPO_KEY + #define LSPO_KEY KC_9 +#endif +#ifndef RSPC_KEY + #define RSPC_KEY KC_0 +#endif + +// Shift / Enter setup +#ifndef SFTENT_KEY + #define SFTENT_KEY KC_ENT +#endif + +#ifdef DISABLE_SPACE_CADET_MODIFIER + #ifndef LSPO_MOD + #define LSPO_MOD KC_TRNS + #endif + #ifndef RSPC_MOD + #define RSPC_MOD KC_TRNS + #endif +#else + #ifndef LSPO_MOD + #define LSPO_MOD KC_LSFT + #endif + #ifndef RSPC_MOD + #define RSPC_MOD KC_RSFT + #endif +#endif +// ********************************************************** + +// Shift / paren setup +#ifndef LSPO_KEYS + #define LSPO_KEYS KC_LSFT, LSPO_MOD, LSPO_KEY +#endif +#ifndef RSPC_KEYS + #define RSPC_KEYS KC_RSFT, RSPC_MOD, RSPC_KEY +#endif + +// Control / paren setup +#ifndef LCPO_KEYS + #define LCPO_KEYS KC_LCTL, KC_LSFT, KC_9 +#endif +#ifndef RCPC_KEYS + #define RCPC_KEYS KC_RCTL, KC_RSFT, KC_0 +#endif + +// Alt / paren setup +#ifndef LAPO_KEYS + #define LAPO_KEYS KC_LALT, KC_LSFT, KC_9 +#endif +#ifndef RAPC_KEYS + #define RAPC_KEYS KC_RALT, KC_RSFT, KC_0 +#endif + +// Shift / Enter setup +#ifndef SFTENT_KEYS + #define SFTENT_KEYS KC_RSFT, KC_TRNS, SFTENT_KEY +#endif + +static uint8_t sc_last = 0; +static uint16_t sc_timer = 0; + +void perform_space_cadet(keyrecord_t *record, uint8_t holdMod, uint8_t tapMod, uint8_t keycode) { + if (record->event.pressed) { + sc_last = holdMod; + sc_timer = timer_read (); + if (IS_MOD(holdMod)) { + register_mods(MOD_BIT(holdMod)); + } + } + else { + if (sc_last == holdMod && timer_elapsed(sc_timer) < TAPPING_TERM) { + if (holdMod != tapMod) { + if (IS_MOD(holdMod)) { + unregister_mods(MOD_BIT(holdMod)); + } + if (IS_MOD(tapMod)) { + register_mods(MOD_BIT(tapMod)); + } + } + tap_code(keycode); + if (IS_MOD(tapMod)) { + unregister_mods(MOD_BIT(tapMod)); + } + } else { + if (IS_MOD(holdMod)) { + unregister_mods(MOD_BIT(holdMod)); + } + } + } +} + +bool process_space_cadet(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case KC_LSPO: { + perform_space_cadet(record, LSPO_KEYS); + return false; + } + case KC_RSPC: { + perform_space_cadet(record, RSPC_KEYS); + return false; + } + case KC_LCPO: { + perform_space_cadet(record, LCPO_KEYS); + return false; + } + case KC_RCPC: { + perform_space_cadet(record, RCPC_KEYS); + return false; + } + case KC_LAPO: { + perform_space_cadet(record, LAPO_KEYS); + return false; + } + case KC_RAPC: { + perform_space_cadet(record, RAPC_KEYS); + return false; + } + case KC_SFTENT: { + perform_space_cadet(record, SFTENT_KEYS); + return false; + } + default: { + if (record->event.pressed) { + sc_last = 0; + } + break; + } + } + return true; +} diff --git a/quantum/process_keycode/process_space_cadet.h b/quantum/process_keycode/process_space_cadet.h new file mode 100644 index 000000000000..c8231435046a --- /dev/null +++ b/quantum/process_keycode/process_space_cadet.h @@ -0,0 +1,21 @@ +/* Copyright 2019 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 . + */ +#pragma once + +#include "quantum.h" + +void perform_space_cadet(keyrecord_t *record, uint8_t holdMod, uint8_t tapMod, uint8_t keycode); +bool process_space_cadet(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/process_keycode/process_steno.c b/quantum/process_keycode/process_steno.c index 3051fade912d..50a1ef2fcf99 100644 --- a/quantum/process_keycode/process_steno.c +++ b/quantum/process_keycode/process_steno.c @@ -114,13 +114,13 @@ static void send_steno_chord(void) { if (send_steno_chord_user(mode, chord)) { switch(mode) { case STENO_MODE_BOLT: - send_steno_state(BOLT_STATE_SIZE, false); - virtser_send(0); // terminating byte - break; + send_steno_state(BOLT_STATE_SIZE, false); + virtser_send(0); // terminating byte + break; case STENO_MODE_GEMINI: - chord[0] |= 0x80; // Indicate start of packet - send_steno_state(GEMINI_STATE_SIZE, true); - break; + chord[0] |= 0x80; // Indicate start of packet + send_steno_state(GEMINI_STATE_SIZE, true); + break; } } steno_clear_state(); @@ -161,7 +161,7 @@ bool process_steno(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QK_STENO_BOLT: if (!process_steno_user(keycode, record)) { - return false; + return false; } if (IS_PRESSED(record->event)) { steno_set_mode(STENO_MODE_BOLT); @@ -170,7 +170,7 @@ bool process_steno(uint16_t keycode, keyrecord_t *record) { case QK_STENO_GEMINI: if (!process_steno_user(keycode, record)) { - return false; + return false; } if (IS_PRESSED(record->event)) { steno_set_mode(STENO_MODE_GEMINI); @@ -179,25 +179,27 @@ bool process_steno(uint16_t keycode, keyrecord_t *record) { case STN__MIN...STN__MAX: if (!process_steno_user(keycode, record)) { - return false; + return false; } switch(mode) { - case STENO_MODE_BOLT: - update_state_bolt(keycode - QK_STENO, IS_PRESSED(record->event)); - case STENO_MODE_GEMINI: - update_state_gemini(keycode - QK_STENO, IS_PRESSED(record->event)); + case STENO_MODE_BOLT: + update_state_bolt(keycode - QK_STENO, IS_PRESSED(record->event)); + break; + case STENO_MODE_GEMINI: + update_state_gemini(keycode - QK_STENO, IS_PRESSED(record->event)); + break; } // allow postprocessing hooks if (postprocess_steno_user(keycode, record, mode, chord, pressed)) { - if (IS_PRESSED(record->event)) { - ++pressed; - } else { - --pressed; - if (pressed <= 0) { - pressed = 0; - send_steno_chord(); - } - } + if (IS_PRESSED(record->event)) { + ++pressed; + } else { + --pressed; + if (pressed <= 0) { + pressed = 0; + send_steno_chord(); + } + } } return false; } diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 19beb84520b9..2c914013ac05 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -13,15 +13,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "process_unicode.h" #include "action_util.h" #include "eeprom.h" bool process_unicode(uint16_t keycode, keyrecord_t *record) { - if (keycode > QK_UNICODE && record->event.pressed) { - uint16_t unicode = keycode & 0x7FFF; + if (keycode >= QK_UNICODE && keycode <= QK_UNICODE_MAX && record->event.pressed) { unicode_input_start(); - register_hex(unicode); + register_hex(keycode & 0x7FFF); unicode_input_finish(); } return true; diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index 0913e991075c..22765ad5604a 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -13,9 +13,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #pragma once -#include "quantum.h" #include "process_unicode_common.h" bool process_unicode(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index b64feb7003b1..21ac2291dba5 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -20,6 +20,8 @@ #include unicode_config_t unicode_config; +uint8_t unicode_saved_mods; + #if UNICODE_SELECTED_MODES != -1 static uint8_t selected[] = { UNICODE_SELECTED_MODES }; static uint8_t selected_count = sizeof selected / sizeof *selected; @@ -75,30 +77,24 @@ void persist_unicode_input_mode(void) { eeprom_update_byte(EECONFIG_UNICODEMODE, unicode_config.input_mode); } -static uint8_t saved_mods; - __attribute__((weak)) void unicode_input_start(void) { - saved_mods = get_mods(); // Save current mods + unicode_saved_mods = get_mods(); // Save current mods clear_mods(); // Unregister mods to start from a clean state switch (unicode_config.input_mode) { case UC_OSX: - register_code(UNICODE_OSX_KEY); + register_code(UNICODE_KEY_OSX); break; case UC_LNX: - register_code(KC_LCTL); - register_code(KC_LSFT); - tap_code(KC_U); // TODO: Replace with tap_code16(LCTL(LSFT(KC_U))); and test - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); + tap_code16(UNICODE_KEY_LNX); break; case UC_WIN: register_code(KC_LALT); tap_code(KC_PPLS); break; case UC_WINC: - tap_code(UNICODE_WINC_KEY); + tap_code(UNICODE_KEY_WINC); tap_code(KC_U); break; } @@ -110,7 +106,7 @@ __attribute__((weak)) void unicode_input_finish(void) { switch (unicode_config.input_mode) { case UC_OSX: - unregister_code(UNICODE_OSX_KEY); + unregister_code(UNICODE_KEY_OSX); break; case UC_LNX: tap_code(KC_SPC); @@ -118,9 +114,30 @@ void unicode_input_finish(void) { case UC_WIN: unregister_code(KC_LALT); break; + case UC_WINC: + tap_code(KC_ENTER); + break; + } + + set_mods(unicode_saved_mods); // Reregister previously set mods +} + +__attribute__((weak)) +void unicode_input_cancel(void) { + switch (unicode_config.input_mode) { + case UC_OSX: + unregister_code(UNICODE_KEY_OSX); + break; + case UC_LNX: + case UC_WINC: + tap_code(KC_ESC); + break; + case UC_WIN: + unregister_code(KC_LALT); + break; } - set_mods(saved_mods); // Reregister previously set mods + set_mods(unicode_saved_mods); // Reregister previously set mods } __attribute__((weak)) diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index e608ab76be7b..7340800e567f 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -23,11 +23,14 @@ #endif // Keycodes used for starting Unicode input on different platforms -#ifndef UNICODE_OSX_KEY - #define UNICODE_OSX_KEY KC_LALT +#ifndef UNICODE_KEY_OSX + #define UNICODE_KEY_OSX KC_LALT #endif -#ifndef UNICODE_WINC_KEY - #define UNICODE_WINC_KEY KC_RALT +#ifndef UNICODE_KEY_LNX + #define UNICODE_KEY_LNX LCTL(LSFT(KC_U)) +#endif +#ifndef UNICODE_KEY_WINC + #define UNICODE_KEY_WINC KC_RALT #endif // Comma-delimited, ordered list of input modes selected for use (e.g. in cycle) @@ -63,6 +66,7 @@ typedef union { } unicode_config_t; extern unicode_config_t unicode_config; +extern uint8_t unicode_saved_mods; void unicode_input_mode_init(void); uint8_t get_unicode_input_mode(void); @@ -72,6 +76,7 @@ void persist_unicode_input_mode(void); void unicode_input_start(void); void unicode_input_finish(void); +void unicode_input_cancel(void); void register_hex(uint16_t hex); void send_unicode_hex_string(const char *str); diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index cee9acb5fcc1..b88787986065 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -15,10 +15,6 @@ */ #include "process_unicodemap.h" -#include "process_unicode_common.h" - -__attribute__((weak)) -const uint32_t PROGMEM unicode_map[] = {}; void register_hex32(uint32_t hex) { bool onzerostart = true; @@ -41,28 +37,39 @@ void register_hex32(uint32_t hex) { } __attribute__((weak)) -void unicodemap_input_error() {} +uint16_t unicodemap_index(uint16_t keycode) { + if (keycode >= QK_UNICODEMAP_PAIR) { + // Keycode is a pair: extract index based on Shift / Caps Lock state + uint16_t index = keycode - QK_UNICODEMAP_PAIR; + + bool shift = unicode_saved_mods & MOD_MASK_SHIFT, caps = IS_HOST_LED_ON(USB_LED_CAPS_LOCK); + if (shift ^ caps) { index >>= 7; } + + return index & 0x7F; + } else { + // Keycode is a regular index + return keycode - QK_UNICODEMAP; + } +} bool process_unicodemap(uint16_t keycode, keyrecord_t *record) { - if ((keycode & QK_UNICODEMAP) == QK_UNICODEMAP && record->event.pressed) { - uint16_t index = keycode - QK_UNICODEMAP; - uint32_t code = pgm_read_dword(unicode_map + index); + if (keycode >= QK_UNICODEMAP && keycode <= QK_UNICODEMAP_PAIR_MAX && record->event.pressed) { + unicode_input_start(); + + uint32_t code = pgm_read_dword(unicode_map + unicodemap_index(keycode)); uint8_t input_mode = get_unicode_input_mode(); - if (code > 0xFFFF && code <= 0x10FFFF && input_mode == UC_OSX) { - // Convert to UTF-16 surrogate pair + if (code > 0x10FFFF || (code > 0xFFFF && input_mode == UC_WIN)) { + // Character is out of range supported by the platform + unicode_input_cancel(); + } else if (code > 0xFFFF && input_mode == UC_OSX) { + // Convert to UTF-16 surrogate pair on Mac code -= 0x10000; uint32_t lo = code & 0x3FF, hi = (code & 0xFFC00) >> 10; - - unicode_input_start(); register_hex32(hi + 0xD800); register_hex32(lo + 0xDC00); unicode_input_finish(); - } else if ((code > 0x10FFFF && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { - // Character is out of range supported by the OS - unicodemap_input_error(); } else { - unicode_input_start(); register_hex32(code); unicode_input_finish(); } diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h index 5764697f84ca..51709c5dc8a6 100644 --- a/quantum/process_keycode/process_unicodemap.h +++ b/quantum/process_keycode/process_unicodemap.h @@ -16,8 +16,10 @@ #pragma once -#include "quantum.h" #include "process_unicode_common.h" -void unicodemap_input_error(void); +extern const uint32_t PROGMEM unicode_map[]; + +void register_hex32(uint32_t hex); +uint16_t unicodemap_index(uint16_t keycode); bool process_unicodemap(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/quantum.c b/quantum/quantum.c index bd3715c80ab2..23263b7007d7 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -24,10 +24,6 @@ #include "outputselect.h" #endif -#ifndef TAPPING_TERM -#define TAPPING_TERM 200 -#endif - #ifndef BREATHING_PERIOD #define BREATHING_PERIOD 6 #endif @@ -47,6 +43,13 @@ extern backlight_config_t backlight_config; #include "process_midi.h" #endif +#ifdef VELOCIKEY_ENABLE +#include "velocikey.h" +#endif + +#ifdef HAPTIC_ENABLE + #include "haptic.h" +#endif #ifdef ENCODER_ENABLE #include "encoder.h" @@ -179,6 +182,9 @@ void reset_keyboard(void) { shutdown_user(); wait_ms(250); #endif +#ifdef HAPTIC_ENABLE + haptic_shutdown(); +#endif // this is also done later in bootloader.c - not sure if it's neccesary here #ifdef BOOTLOADER_CATERINA *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific @@ -186,56 +192,44 @@ void reset_keyboard(void) { bootloader_jump(); } -// Shift / paren setup - -#ifndef LSPO_KEY - #define LSPO_KEY KC_9 -#endif -#ifndef RSPC_KEY - #define RSPC_KEY KC_0 -#endif - -#ifndef LSPO_MOD - #define LSPO_MOD KC_LSFT -#endif -#ifndef RSPC_MOD - #define RSPC_MOD KC_RSFT -#endif - -// Shift / Enter setup -#ifndef SFTENT_KEY - #define SFTENT_KEY KC_ENT -#endif - -static bool shift_interrupted[2] = {0, 0}; -static uint16_t scs_timer[2] = {0, 0}; - /* true if the last press of GRAVE_ESC was shifted (i.e. GUI or SHIFT were pressed), false otherwise. * Used to ensure that the correct keycode is released if the key is released. */ static bool grave_esc_was_shifted = false; -bool process_record_quantum(keyrecord_t *record) { +/* Convert record into usable keycode via the contained event. */ +uint16_t get_record_keycode(keyrecord_t *record) { + return get_event_keycode(record->event); +} - /* This gets the keycode from the key pressed */ - keypos_t key = record->event.key; - uint16_t keycode; + +/* Convert event into usable keycode. Checks the layer cache to ensure that it + * retains the correct keycode after a layer change, if the key is still pressed. + */ +uint16_t get_event_keycode(keyevent_t event) { #if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) /* TODO: Use store_or_get_action() or a similar function. */ if (!disable_action_cache) { uint8_t layer; - if (record->event.pressed) { - layer = layer_switch_get_layer(key); - update_source_layers_cache(key, layer); + if (event.pressed) { + layer = layer_switch_get_layer(event.key); + update_source_layers_cache(event.key, layer); } else { - layer = read_source_layers_cache(key); + layer = read_source_layers_cache(event.key); } - keycode = keymap_key_to_keycode(layer, key); + return keymap_key_to_keycode(layer, event.key); } else #endif - keycode = keymap_key_to_keycode(layer_switch_get_layer(key), key); + return keymap_key_to_keycode(layer_switch_get_layer(event.key), event.key); +} + +/* Main keycode processing function. Hands off handling to other functions, + * then processes internal Quantum keycodes, then processes ACTIONs. + */ +bool process_record_quantum(keyrecord_t *record) { + uint16_t keycode = get_record_keycode(record); // This is how you use actions here // if (keycode == KC_LEAD) { @@ -245,6 +239,10 @@ bool process_record_quantum(keyrecord_t *record) { // return false; // } + #ifdef VELOCIKEY_ENABLE + if (velocikey_enabled() && record->event.pressed) { velocikey_accelerate(); } + #endif + #ifdef TAP_DANCE_ENABLE preprocess_tap_dance(keycode, record); #endif @@ -257,10 +255,13 @@ bool process_record_quantum(keyrecord_t *record) { #if defined(AUDIO_ENABLE) && defined(AUDIO_CLICKY) process_clicky(keycode, record) && #endif //AUDIO_CLICKY - process_record_kb(keycode, record) && - #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_KEYPRESSES) + #ifdef HAPTIC_ENABLE + process_haptic(keycode, record) && + #endif //HAPTIC_ENABLE + #if defined(RGB_MATRIX_ENABLE) process_rgb_matrix(keycode, record) && #endif + process_record_kb(keycode, record) && #if defined(MIDI_ENABLE) && defined(MIDI_ADVANCED) process_midi(keycode, record) && #endif @@ -293,6 +294,9 @@ bool process_record_quantum(keyrecord_t *record) { #endif #ifdef TERMINAL_ENABLE process_terminal(keycode, record) && + #endif + #ifdef SPACE_CADET_ENABLE + process_space_cadet(keycode, record) && #endif true)) { return false; @@ -308,8 +312,12 @@ bool process_record_quantum(keyrecord_t *record) { return false; case DEBUG: if (record->event.pressed) { - debug_enable = true; + debug_enable ^= 1; + if (debug_enable) { print("DEBUG: enabled.\n"); + } else { + print("DEBUG: disabled.\n"); + } } return false; case EEPROM_RESET: @@ -343,9 +351,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_toggle(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_MODE_FORWARD: @@ -357,9 +362,6 @@ bool process_record_quantum(keyrecord_t *record) { else { rgblight_step(); } - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_MODE_REVERSE: @@ -371,9 +373,6 @@ bool process_record_quantum(keyrecord_t *record) { else { rgblight_step_reverse(); } - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_HUI: @@ -384,9 +383,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_increase_hue(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_HUD: @@ -397,9 +393,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_decrease_hue(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_SAI: @@ -410,9 +403,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_increase_sat(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_SAD: @@ -423,9 +413,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_decrease_sat(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_VAI: @@ -436,9 +423,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_increase_val(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_VAD: @@ -449,9 +433,6 @@ bool process_record_quantum(keyrecord_t *record) { if (!record->event.pressed) { #endif rgblight_decrease_val(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_SPI: @@ -467,9 +448,6 @@ bool process_record_quantum(keyrecord_t *record) { case RGB_MODE_PLAIN: if (record->event.pressed) { rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } return false; case RGB_MODE_BREATHE: @@ -559,7 +537,14 @@ bool process_record_quantum(keyrecord_t *record) { #endif return false; #endif // defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - #ifdef PROTOCOL_LUFA + #ifdef VELOCIKEY_ENABLE + case VLK_TOG: + if (record->event.pressed) { + velocikey_toggle(); + } + return false; + #endif + #ifdef PROTOCOL_LUFA case OUT_AUTO: if (record->event.pressed) { set_output(OUTPUT_AUTO); @@ -673,92 +658,6 @@ bool process_record_quantum(keyrecord_t *record) { return false; } break; - case KC_LSPO: { - if (record->event.pressed) { - shift_interrupted[0] = false; - scs_timer[0] = timer_read (); - register_mods(MOD_BIT(KC_LSFT)); - } - else { - #ifdef DISABLE_SPACE_CADET_ROLLOVER - if (get_mods() & MOD_BIT(RSPC_MOD)) { - shift_interrupted[0] = true; - shift_interrupted[1] = true; - } - #endif - if (!shift_interrupted[0] && timer_elapsed(scs_timer[0]) < TAPPING_TERM) { - #ifdef DISABLE_SPACE_CADET_MODIFIER - unregister_mods(MOD_BIT(KC_LSFT)); - #else - if( LSPO_MOD != KC_LSFT ){ - unregister_mods(MOD_BIT(KC_LSFT)); - register_mods(MOD_BIT(LSPO_MOD)); - } - #endif - register_code(LSPO_KEY); - unregister_code(LSPO_KEY); - #ifndef DISABLE_SPACE_CADET_MODIFIER - if( LSPO_MOD != KC_LSFT ){ - unregister_mods(MOD_BIT(LSPO_MOD)); - } - #endif - } - unregister_mods(MOD_BIT(KC_LSFT)); - } - return false; - } - - case KC_RSPC: { - if (record->event.pressed) { - shift_interrupted[1] = false; - scs_timer[1] = timer_read (); - register_mods(MOD_BIT(KC_RSFT)); - } - else { - #ifdef DISABLE_SPACE_CADET_ROLLOVER - if (get_mods() & MOD_BIT(LSPO_MOD)) { - shift_interrupted[0] = true; - shift_interrupted[1] = true; - } - #endif - if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) { - #ifdef DISABLE_SPACE_CADET_MODIFIER - unregister_mods(MOD_BIT(KC_RSFT)); - #else - if( RSPC_MOD != KC_RSFT ){ - unregister_mods(MOD_BIT(KC_RSFT)); - register_mods(MOD_BIT(RSPC_MOD)); - } - #endif - register_code(RSPC_KEY); - unregister_code(RSPC_KEY); - #ifndef DISABLE_SPACE_CADET_MODIFIER - if ( RSPC_MOD != KC_RSFT ){ - unregister_mods(MOD_BIT(RSPC_MOD)); - } - #endif - } - unregister_mods(MOD_BIT(KC_RSFT)); - } - return false; - } - - case KC_SFTENT: { - if (record->event.pressed) { - shift_interrupted[1] = false; - scs_timer[1] = timer_read (); - register_mods(MOD_BIT(KC_RSFT)); - } - else if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) { - unregister_mods(MOD_BIT(KC_RSFT)); - register_code(SFTENT_KEY); - unregister_code(SFTENT_KEY); - } - else { - unregister_mods(MOD_BIT(KC_RSFT)); - } - return false; - } case GRAVE_ESC: { uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT) @@ -813,12 +712,6 @@ bool process_record_quantum(keyrecord_t *record) { return false; } #endif - - default: { - shift_interrupted[0] = true; - shift_interrupted[1] = true; - break; - } } return process_action_kb(record); @@ -844,6 +737,26 @@ const bool ascii_to_shift_lut[0x80] PROGMEM = { 0, 0, 0, 1, 1, 1, 1, 0 }; +__attribute__ ((weak)) +const bool ascii_to_altgr_lut[0x80] PROGMEM = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 +}; + __attribute__ ((weak)) const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { 0, 0, 0, 0, 0, 0, 0, 0, @@ -876,16 +789,16 @@ void send_string_with_delay(const char *str, uint8_t interval) { while (1) { char ascii_code = *str; if (!ascii_code) break; - if (ascii_code == 1) { + if (ascii_code == SS_TAP_CODE) { // tap uint8_t keycode = *(++str); register_code(keycode); unregister_code(keycode); - } else if (ascii_code == 2) { + } else if (ascii_code == SS_DOWN_CODE) { // down uint8_t keycode = *(++str); register_code(keycode); - } else if (ascii_code == 3) { + } else if (ascii_code == SS_UP_CODE) { // up uint8_t keycode = *(++str); unregister_code(keycode); @@ -902,16 +815,16 @@ void send_string_with_delay_P(const char *str, uint8_t interval) { while (1) { char ascii_code = pgm_read_byte(str); if (!ascii_code) break; - if (ascii_code == 1) { + if (ascii_code == SS_TAP_CODE) { // tap uint8_t keycode = pgm_read_byte(++str); register_code(keycode); unregister_code(keycode); - } else if (ascii_code == 2) { + } else if (ascii_code == SS_DOWN_CODE) { // down uint8_t keycode = pgm_read_byte(++str); register_code(keycode); - } else if (ascii_code == 3) { + } else if (ascii_code == SS_UP_CODE) { // up uint8_t keycode = pgm_read_byte(++str); unregister_code(keycode); @@ -925,16 +838,22 @@ void send_string_with_delay_P(const char *str, uint8_t interval) { } void send_char(char ascii_code) { - uint8_t keycode; - keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]); - if (pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code])) { - register_code(KC_LSFT); - register_code(keycode); - unregister_code(keycode); - unregister_code(KC_LSFT); - } else { - register_code(keycode); - unregister_code(keycode); + uint8_t keycode = pgm_read_byte(&ascii_to_keycode_lut[(uint8_t)ascii_code]); + bool is_shifted = pgm_read_byte(&ascii_to_shift_lut[(uint8_t)ascii_code]); + bool is_altgred = pgm_read_byte(&ascii_to_altgr_lut[(uint8_t)ascii_code]); + + if (is_shifted) { + register_code(KC_LSFT); + } + if (is_altgred) { + register_code(KC_RALT); + } + tap_code(keycode); + if (is_altgred) { + unregister_code(KC_RALT); + } + if (is_shifted) { + unregister_code(KC_LSFT); } } @@ -1031,7 +950,11 @@ void matrix_init_quantum() { eeconfig_init(); } #ifdef BACKLIGHT_ENABLE - backlight_init_ports(); + #ifdef LED_MATRIX_ENABLE + led_matrix_init(); + #else + backlight_init_ports(); + #endif #endif #ifdef AUDIO_ENABLE audio_init(); @@ -1045,15 +968,15 @@ void matrix_init_quantum() { #if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE) unicode_input_mode_init(); #endif + #ifdef HAPTIC_ENABLE + haptic_init(); + #endif + #ifdef OUTPUT_AUTO_ENABLE + set_output(OUTPUT_AUTO); + #endif matrix_init_kb(); } -uint8_t rgb_matrix_task_counter = 0; - -#ifndef RGB_MATRIX_SKIP_FRAMES - #define RGB_MATRIX_SKIP_FRAMES 1 -#endif - void matrix_scan_quantum() { #if defined(AUDIO_ENABLE) && !defined(NO_MUSIC_MODE) matrix_scan_music(); @@ -1067,76 +990,182 @@ void matrix_scan_quantum() { matrix_scan_combo(); #endif - #if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN) - backlight_task(); + #if defined(BACKLIGHT_ENABLE) + #if defined(LED_MATRIX_ENABLE) + led_matrix_task(); + #elif defined(BACKLIGHT_PIN) + backlight_task(); + #endif #endif #ifdef RGB_MATRIX_ENABLE rgb_matrix_task(); - if (rgb_matrix_task_counter == 0) { - rgb_matrix_update_pwm_buffers(); - } - rgb_matrix_task_counter = ((rgb_matrix_task_counter + 1) % (RGB_MATRIX_SKIP_FRAMES + 1)); #endif #ifdef ENCODER_ENABLE encoder_read(); #endif + #ifdef HAPTIC_ENABLE + haptic_task(); + #endif + matrix_scan_kb(); } -#if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN) +#if defined(BACKLIGHT_ENABLE) && (defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS)) -static const uint8_t backlight_pin = BACKLIGHT_PIN; +// The logic is a bit complex, we support 3 setups: +// 1. hardware PWM when backlight is wired to a PWM pin +// depending on this pin, we use a different output compare unit +// 2. software PWM with hardware timers, but the used timer depends +// on the audio setup (audio wins other backlight) +// 3. full software PWM -// depending on the pin, we use a different output compare unit #if BACKLIGHT_PIN == B7 +# define HARDWARE_PWM # define TCCRxA TCCR1A # define TCCRxB TCCR1B # define COMxx1 COM1C1 # define OCRxx OCR1C # define ICRx ICR1 #elif BACKLIGHT_PIN == B6 +# define HARDWARE_PWM # define TCCRxA TCCR1A # define TCCRxB TCCR1B # define COMxx1 COM1B1 # define OCRxx OCR1B # define ICRx ICR1 #elif BACKLIGHT_PIN == B5 +# define HARDWARE_PWM # define TCCRxA TCCR1A # define TCCRxB TCCR1B # define COMxx1 COM1A1 # define OCRxx OCR1A # define ICRx ICR1 #elif BACKLIGHT_PIN == C6 +# define HARDWARE_PWM # define TCCRxA TCCR3A # define TCCRxB TCCR3B # define COMxx1 COM1A1 # define OCRxx OCR3A # define ICRx ICR3 +#elif defined(__AVR_ATmega32A__) && BACKLIGHT_PIN == D4 +# define TCCRxA TCCR1A +# define TCCRxB TCCR1B +# define COMxx1 COM1B1 +# define OCRxx OCR1B +# define ICRx ICR1 +# define TIMSK1 TIMSK #else -# define NO_HARDWARE_PWM +# if !defined(BACKLIGHT_CUSTOM_DRIVER) +# if !defined(B5_AUDIO) && !defined(B6_AUDIO) && !defined(B7_AUDIO) + // timer 1 is not used by audio , backlight can use it +#pragma message "Using hardware timer 1 with software PWM" +# define HARDWARE_PWM +# define BACKLIGHT_PWM_TIMER +# define TCCRxA TCCR1A +# define TCCRxB TCCR1B +# define OCRxx OCR1A +# define OCRxAH OCR1AH +# define OCRxAL OCR1AL +# define TIMERx_COMPA_vect TIMER1_COMPA_vect +# define TIMERx_OVF_vect TIMER1_OVF_vect +# define OCIExA OCIE1A +# define TOIEx TOIE1 +# define ICRx ICR1 +# ifndef TIMSK +# define TIMSK TIMSK1 +# endif +# elif !defined(C6_AUDIO) && !defined(C5_AUDIO) && !defined(C4_AUDIO) +#pragma message "Using hardware timer 3 with software PWM" +// timer 3 is not used by audio, backlight can use it +# define HARDWARE_PWM +# define BACKLIGHT_PWM_TIMER +# define TCCRxA TCCR3A +# define TCCRxB TCCR3B +# define OCRxx OCR3A +# define OCRxAH OCR3AH +# define OCRxAL OCR3AL +# define TIMERx_COMPA_vect TIMER3_COMPA_vect +# define TIMERx_OVF_vect TIMER3_OVF_vect +# define OCIExA OCIE3A +# define TOIEx TOIE3 +# define ICRx ICR1 +# ifndef TIMSK +# define TIMSK TIMSK3 +# endif +# else +#pragma message "Audio in use - using pure software PWM" +#define NO_HARDWARE_PWM +# endif +# else +#pragma message "Custom driver defined - using pure software PWM" +#define NO_HARDWARE_PWM +# endif #endif #ifndef BACKLIGHT_ON_STATE #define BACKLIGHT_ON_STATE 0 #endif -#ifdef NO_HARDWARE_PWM // pwm through software +void backlight_on(uint8_t backlight_pin) { +#if BACKLIGHT_ON_STATE == 0 + writePinLow(backlight_pin); +#else + writePinHigh(backlight_pin); +#endif +} -__attribute__ ((weak)) +void backlight_off(uint8_t backlight_pin) { +#if BACKLIGHT_ON_STATE == 0 + writePinHigh(backlight_pin); +#else + writePinLow(backlight_pin); +#endif +} + + +#if defined(NO_HARDWARE_PWM) || defined(BACKLIGHT_PWM_TIMER) // pwm through software + +// we support multiple backlight pins +#ifndef BACKLIGHT_LED_COUNT +#define BACKLIGHT_LED_COUNT 1 +#endif + +#if BACKLIGHT_LED_COUNT == 1 +#define BACKLIGHT_PIN_INIT { BACKLIGHT_PIN } +#else +#define BACKLIGHT_PIN_INIT BACKLIGHT_PINS +#endif + +#define FOR_EACH_LED(x) \ + for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) \ + { \ + uint8_t backlight_pin = backlight_pins[i]; \ + { \ + x \ + } \ + } + +static const uint8_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PIN_INIT; + +#else // full hardware PWM + +// we support only one backlight pin +static const uint8_t backlight_pin = BACKLIGHT_PIN; +#define FOR_EACH_LED(x) x + +#endif + +#ifdef NO_HARDWARE_PWM +__attribute__((weak)) void backlight_init_ports(void) { // Setup backlight pin as output and output to on state. - // DDRx |= n - _SFR_IO8((backlight_pin >> 4) + 1) |= _BV(backlight_pin & 0xF); - #if BACKLIGHT_ON_STATE == 0 - // PORTx &= ~n - _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); - #else - // PORTx |= n - _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); - #endif + FOR_EACH_LED( + setPinOutput(backlight_pin); + backlight_on(backlight_pin); + ) } __attribute__ ((weak)) @@ -1147,21 +1176,14 @@ uint8_t backlight_tick = 0; #ifndef BACKLIGHT_CUSTOM_DRIVER void backlight_task(void) { if ((0xFFFF >> ((BACKLIGHT_LEVELS - get_backlight_level()) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { - #if BACKLIGHT_ON_STATE == 0 - // PORTx &= ~n - _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); - #else - // PORTx |= n - _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); - #endif - } else { - #if BACKLIGHT_ON_STATE == 0 - // PORTx |= n - _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); - #else - // PORTx &= ~n - _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); - #endif + FOR_EACH_LED( + backlight_on(backlight_pin); + ) + } + else { + FOR_EACH_LED( + backlight_off(backlight_pin); + ) } backlight_tick = (backlight_tick + 1) % 16; } @@ -1173,7 +1195,52 @@ void backlight_task(void) { #endif #endif -#else // pwm through timer +#else // hardware pwm through timer + +#ifdef BACKLIGHT_PWM_TIMER + +// The idea of software PWM assisted by hardware timers is the following +// we use the hardware timer in fast PWM mode like for hardware PWM, but +// instead of letting the Output Match Comparator control the led pin +// (which is not possible since the backlight is not wired to PWM pins on the +// CPU), we do the LED on/off by oursleves. +// The timer is setup to count up to 0xFFFF, and we set the Output Compare +// register to the current 16bits backlight level (after CIE correction). +// This means the CPU will trigger a compare match interrupt when the counter +// reaches the backlight level, where we turn off the LEDs, +// but also an overflow interrupt when the counter rolls back to 0, +// in which we're going to turn on the LEDs. +// The LED will then be on for OCRxx/0xFFFF time, adjusted every 244Hz. + +// Triggered when the counter reaches the OCRx value +ISR(TIMERx_COMPA_vect) { + FOR_EACH_LED( + backlight_off(backlight_pin); + ) +} + +// Triggered when the counter reaches the TOP value +// this one triggers at F_CPU/65536 =~ 244 Hz +ISR(TIMERx_OVF_vect) { +#ifdef BACKLIGHT_BREATHING + breathing_task(); +#endif + // for very small values of OCRxx (or backlight level) + // we can't guarantee this whole code won't execute + // at the same time as the compare match interrupt + // which means that we might turn on the leds while + // trying to turn them off, leading to flickering + // artifacts (especially while breathing, because breathing_task + // takes many computation cycles). + // so better not turn them on while the counter TOP is very low. + if (OCRxx > 256) { + FOR_EACH_LED( + backlight_on(backlight_pin); + ) + } +} + +#endif #define TIMER_TOP 0xFFFFU @@ -1205,11 +1272,28 @@ void backlight_set(uint8_t level) { level = BACKLIGHT_LEVELS; if (level == 0) { + #ifdef BACKLIGHT_PWM_TIMER + if (OCRxx) { + TIMSK &= ~(_BV(OCIExA)); + TIMSK &= ~(_BV(TOIEx)); + FOR_EACH_LED( + backlight_off(backlight_pin); + ) + } + #else // Turn off PWM control on backlight pin TCCRxA &= ~(_BV(COMxx1)); + #endif } else { + #ifdef BACKLIGHT_PWM_TIMER + if (!OCRxx) { + TIMSK |= _BV(OCIExA); + TIMSK |= _BV(TOIEx); + } + #else // Turn on PWM control of backlight pin TCCRxA |= _BV(COMxx1); + #endif } // Set the brightness set_pwm(cie_lightness(TIMER_TOP * (uint32_t)level / BACKLIGHT_LEVELS)); @@ -1229,12 +1313,25 @@ static uint8_t breathing_period = BREATHING_PERIOD; static uint8_t breathing_halt = BREATHING_NO_HALT; static uint16_t breathing_counter = 0; +#ifdef BACKLIGHT_PWM_TIMER +static bool breathing = false; + +bool is_breathing(void) { + return breathing; +} + +#define breathing_interrupt_enable() do { breathing = true; } while (0) +#define breathing_interrupt_disable() do { breathing = false; } while (0) +#else + bool is_breathing(void) { return !!(TIMSK1 & _BV(TOIE1)); } #define breathing_interrupt_enable() do {TIMSK1 |= _BV(TOIE1);} while (0) #define breathing_interrupt_disable() do {TIMSK1 &= ~_BV(TOIE1);} while (0) +#endif + #define breathing_min() do {breathing_counter = 0;} while (0) #define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) @@ -1308,10 +1405,14 @@ static inline uint16_t scale_backlight(uint16_t v) { return v / BACKLIGHT_LEVELS * get_backlight_level(); } +#ifdef BACKLIGHT_PWM_TIMER +void breathing_task(void) +#else /* Assuming a 16MHz CPU clock and a timer that resets at 64k (ICR1), the following interrupt handler will run * about 244 times per second. */ ISR(TIMER1_OVF_vect) +#endif { uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; // resetting after one period to prevent ugly reset at overflow. @@ -1333,19 +1434,21 @@ __attribute__ ((weak)) void backlight_init_ports(void) { // Setup backlight pin as output and output to on state. - // DDRx |= n - _SFR_IO8((backlight_pin >> 4) + 1) |= _BV(backlight_pin & 0xF); - #if BACKLIGHT_ON_STATE == 0 - // PORTx &= ~n - _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); - #else - // PORTx |= n - _SFR_IO8((backlight_pin >> 4) + 2) |= _BV(backlight_pin & 0xF); - #endif + FOR_EACH_LED( + setPinOutput(backlight_pin); + backlight_on(backlight_pin); + ) + // I could write a wall of text here to explain... but TL;DW // Go read the ATmega32u4 datasheet. // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on +#ifdef BACKLIGHT_PWM_TIMER + // TimerX setup, Fast PWM mode count to TOP set in ICRx + TCCRxA = _BV(WGM11); // = 0b00000010; + // clock select clk/1 + TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; +#else // hardware PWM // Pin PB7 = OCR1C (Timer 1, Channel C) // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0 // (i.e. start high, go low when counter matches.) @@ -1357,8 +1460,9 @@ void backlight_init_ports(void) "In fast PWM mode, the compare units allow generation of PWM waveforms on the OCnx pins. Setting the COMnx1:0 bits to two will produce a non-inverted PWM [..]." "In fast PWM mode the counter is incremented until the counter value matches either one of the fixed values 0x00FF, 0x01FF, or 0x03FF (WGMn3:0 = 5, 6, or 7), the value in ICRn (WGMn3:0 = 14), or the value in OCRnA (WGMn3:0 = 15)." */ - TCCRxA = _BV(COMxx1) | _BV(WGM11); // = 0b00001010; + TCCRxA = _BV(COMxx1) | _BV(WGM11); // = 0b00001010; TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; +#endif // Use full 16-bit resolution. Counter counts to ICR1 before reset to 0. ICRx = TIMER_TOP; @@ -1368,9 +1472,9 @@ void backlight_init_ports(void) #endif } -#endif // NO_HARDWARE_PWM +#endif // hardware backlight -#else // backlight +#else // no backlight __attribute__ ((weak)) void backlight_init_ports(void) {} diff --git a/quantum/quantum.h b/quantum/quantum.h index 56a6a1a991ad..451dd8a4bd8d 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -28,7 +28,11 @@ #include "matrix.h" #include "keymap.h" #ifdef BACKLIGHT_ENABLE - #include "backlight.h" + #ifdef LED_MATRIX_ENABLE + #include "ledmatrix.h" + #else + #include "backlight.h" + #endif #endif #ifdef RGBLIGHT_ENABLE #include "rgblight.h" @@ -40,10 +44,6 @@ #endif #endif -#ifdef SPLIT_KEYBOARD - #include "split_flags.h" -#endif - #ifdef RGB_MATRIX_ENABLE #include "rgb_matrix.h" #endif @@ -61,10 +61,10 @@ #include "send_string_keycodes.h" #include "suspend.h" -extern uint32_t default_layer_state; +extern layer_state_t default_layer_state; #ifndef NO_ACTION_LAYER - extern uint32_t layer_state; + extern layer_state_t layer_state; #endif #ifdef MIDI_ENABLE @@ -131,10 +131,22 @@ extern uint32_t default_layer_state; #include "process_terminal_nop.h" #endif +#ifdef SPACE_CADET_ENABLE + #include "process_space_cadet.h" +#endif + #ifdef HD44780_ENABLE #include "hd44780.h" #endif +#ifdef HAPTIC_ENABLE + #include "haptic.h" +#endif + +#ifdef OLED_DRIVER_ENABLE + #include "oled_driver.h" +#endif + //Function substitutions to ease GPIO manipulation #ifdef __AVR__ #define PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + (p >> PORT_SHIFTER) + offset) @@ -183,6 +195,10 @@ extern uint32_t default_layer_state; #define ADD_SLASH_X(y) STRINGIZE(\x ## y) #define SYMBOL_STR(x) ADD_SLASH_X(x) +#define SS_TAP_CODE 1 +#define SS_DOWN_CODE 2 +#define SS_UP_CODE 3 + #define SS_TAP(keycode) "\1" SYMBOL_STR(keycode) #define SS_DOWN(keycode) "\2" SYMBOL_STR(keycode) #define SS_UP(keycode) "\3" SYMBOL_STR(keycode) @@ -198,6 +214,7 @@ extern uint32_t default_layer_state; #define SEND_STRING(str) send_string_P(PSTR(str)) extern const bool ascii_to_shift_lut[0x80]; +extern const bool ascii_to_altgr_lut[0x80]; extern const uint8_t ascii_to_keycode_lut[0x80]; void send_string(const char *str); void send_string_with_delay(const char *str, uint8_t interval); @@ -220,6 +237,8 @@ void matrix_init_kb(void); void matrix_scan_kb(void); void matrix_init_user(void); void matrix_scan_user(void); +uint16_t get_record_keycode(keyrecord_t *record); +uint16_t get_event_keycode(keyevent_t event); bool process_action_kb(keyrecord_t *record); bool process_record_kb(uint16_t keycode, keyrecord_t *record); bool process_record_user(uint16_t keycode, keyrecord_t *record); @@ -245,8 +264,12 @@ void tap_code16(uint16_t code); #ifdef BACKLIGHT_ENABLE void backlight_init_ports(void); void backlight_task(void); +void backlight_task_internal(void); +void backlight_on(uint8_t backlight_pin); +void backlight_off(uint8_t backlight_pin); #ifdef BACKLIGHT_BREATHING +void breathing_task(void); void breathing_enable(void); void breathing_pulse(void); void breathing_disable(void); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 0462291c2b17..779c355efc00 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -87,7 +87,9 @@ enum quantum_keycodes { #endif #ifdef UNICODEMAP_ENABLE QK_UNICODEMAP = 0x8000, - QK_UNICODEMAP_MAX = 0x83FF, + QK_UNICODEMAP_MAX = 0xBFFF, + QK_UNICODEMAP_PAIR = 0xC000, + QK_UNICODEMAP_PAIR_MAX = 0xFFFF, #endif // Loose keycodes - to be used directly @@ -422,6 +424,9 @@ enum quantum_keycodes { RGB_MODE_GRADIENT, RGB_MODE_RGBTEST, + //Momentum matching toggle + VLK_TOG, + // Left shift, open paren KC_LSPO, @@ -455,13 +460,35 @@ enum quantum_keycodes { UNICODE_MODE_FORWARD, UNICODE_MODE_REVERSE, - UNICODE_MODE_OSX, UNICODE_MODE_LNX, UNICODE_MODE_WIN, UNICODE_MODE_BSD, UNICODE_MODE_WINC, + HPT_ON, + HPT_OFF, + HPT_TOG, + HPT_RST, + HPT_FBK, + HPT_BUZ, + HPT_MODI, + HPT_MODD, + HPT_DWLI, + HPT_DWLD, + + // Left control, open paren + KC_LCPO, + + // Right control, close paren + KC_RCPC, + + // Left control, open paren + KC_LAPO, + + // Right control, close paren + KC_RAPC, + // always leave at the end SAFE_RANGE }; @@ -687,7 +714,8 @@ enum quantum_keycodes { #endif #ifdef UNICODEMAP_ENABLE // Allows Unicode input up to 0x10FFFF, requires unicode_map - #define X(i) (QK_UNICODEMAP | (i)) + #define X(i) (QK_UNICODEMAP | (i)) + #define XP(i, j) (QK_UNICODEMAP_PAIR | ((i) & 0x7F) | (((j) & 0x7F) << 7)) // 127 max i and j #endif #define UC_MOD UNICODE_MODE_FORWARD diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 2ed36304dca5..98baf5cb5808 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -24,77 +24,117 @@ #include #include -rgb_config_t rgb_matrix_config; +#include "lib/lib8tion/lib8tion.h" -#ifndef MAX - #define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) +#ifndef RGB_MATRIX_CENTER + const point_t k_rgb_matrix_center = { 112, 32 }; +#else + const point_t k_rgb_matrix_center = RGB_MATRIX_CENTER; #endif -#ifndef MIN - #define MIN(a,b) ((a) < (b)? (a): (b)) +// Generic effect runners +#include "rgb_matrix_runners/effect_runner_dx_dy_dist.h" +#include "rgb_matrix_runners/effect_runner_dx_dy.h" +#include "rgb_matrix_runners/effect_runner_i.h" +#include "rgb_matrix_runners/effect_runner_sin_cos_i.h" +#include "rgb_matrix_runners/effect_runner_reactive.h" +#include "rgb_matrix_runners/effect_runner_reactive_splash.h" + +// ------------------------------------------ +// -----Begin rgb effect includes macros----- +#define RGB_MATRIX_EFFECT(name) +#define RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +#include "rgb_matrix_animations/rgb_matrix_effects.inc" +#ifdef RGB_MATRIX_CUSTOM_KB + #include "rgb_matrix_kb.inc" +#endif +#ifdef RGB_MATRIX_CUSTOM_USER + #include "rgb_matrix_user.inc" #endif +#undef RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#undef RGB_MATRIX_EFFECT +// -----End rgb effect includes macros------- +// ------------------------------------------ + #ifndef RGB_DISABLE_AFTER_TIMEOUT - #define RGB_DISABLE_AFTER_TIMEOUT 0 + #define RGB_DISABLE_AFTER_TIMEOUT 0 #endif #ifndef RGB_DISABLE_WHEN_USB_SUSPENDED - #define RGB_DISABLE_WHEN_USB_SUSPENDED false + #define RGB_DISABLE_WHEN_USB_SUSPENDED false #endif #ifndef EECONFIG_RGB_MATRIX - #define EECONFIG_RGB_MATRIX EECONFIG_RGBLIGHT + #define EECONFIG_RGB_MATRIX EECONFIG_RGBLIGHT #endif -#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > 255 - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX + #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX #endif -#ifndef RGB_DIGITAL_RAIN_DROPS - // lower the number for denser effect/wider keyboard - #define RGB_DIGITAL_RAIN_DROPS 24 +#if !defined(RGB_MATRIX_HUE_STEP) + #define RGB_MATRIX_HUE_STEP 8 #endif -#if !defined(DISABLE_RGB_MATRIX_RAINDROPS) || !defined(DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS) || !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN) - #define TRACK_PREVIOUS_EFFECT +#if !defined(RGB_MATRIX_SAT_STEP) + #define RGB_MATRIX_SAT_STEP 16 #endif -bool g_suspend_state = false; +#if !defined(RGB_MATRIX_VAL_STEP) + #define RGB_MATRIX_VAL_STEP 16 +#endif -// Global tick at 20 Hz -uint32_t g_tick = 0; +#if !defined(RGB_MATRIX_SPD_STEP) + #define RGB_MATRIX_SPD_STEP 16 +#endif -// Ticks since this key was last hit. -uint8_t g_key_hit[DRIVER_LED_TOTAL]; +#if !defined(RGB_MATRIX_STARTUP_MODE) + #ifndef DISABLE_RGB_MATRIX_CYCLE_ALL + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT + #else + // fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR + #endif +#endif -// Ticks since any key was last hit. -uint32_t g_any_key_hit = 0; +bool g_suspend_state = false; + +rgb_config_t rgb_matrix_config; + +rgb_counters_t g_rgb_counters; +static uint32_t rgb_counters_buffer; -#ifndef PI -#define PI 3.14159265 +#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS +uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}}; #endif +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + last_hit_t g_last_hit_tracker; + static last_hit_t last_hit_buffer; +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + uint32_t eeconfig_read_rgb_matrix(void) { return eeprom_read_dword(EECONFIG_RGB_MATRIX); } + void eeconfig_update_rgb_matrix(uint32_t val) { eeprom_update_dword(EECONFIG_RGB_MATRIX, val); } + void eeconfig_update_rgb_matrix_default(void) { dprintf("eeconfig_update_rgb_matrix_default\n"); rgb_matrix_config.enable = 1; -#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL - rgb_matrix_config.mode = RGB_MATRIX_CYCLE_LEFT_RIGHT; -#else - // fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace - rgb_matrix_config.mode = RGB_MATRIX_SOLID_COLOR; -#endif + rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE; rgb_matrix_config.hue = 0; - rgb_matrix_config.sat = 255; + rgb_matrix_config.sat = UINT8_MAX; rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; - rgb_matrix_config.speed = 0; + rgb_matrix_config.speed = UINT8_MAX / 2; eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } + void eeconfig_debug_rgb_matrix(void) { dprintf("rgb_matrix_config eprom\n"); dprintf("rgb_matrix_config.enable = %d\n", rgb_matrix_config.enable); @@ -105,691 +145,263 @@ void eeconfig_debug_rgb_matrix(void) { dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed); } -// Last led hit -#define LED_HITS_TO_REMEMBER 8 -uint8_t g_last_led_hit[LED_HITS_TO_REMEMBER] = {255}; -uint8_t g_last_led_count = 0; - -void map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led_i, uint8_t *led_count) { - rgb_led led; - *led_count = 0; +__attribute__ ((weak)) +uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { + return 0; +} - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - // map_index_to_led(i, &led); - led = g_rgb_leds[i]; - if (row == led.matrix_co.row && column == led.matrix_co.col) { - led_i[*led_count] = i; - (*led_count)++; - } - } +uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) { + uint8_t led_count = rgb_matrix_map_row_column_to_led_kb(row, column, led_i); + uint8_t led_index = g_led_config.matrix_co[row][column]; + if (led_index != NO_LED) { + led_i[led_count] = led_index; + led_count++; + } + return led_count; } void rgb_matrix_update_pwm_buffers(void) { - rgb_matrix_driver.flush(); + rgb_matrix_driver.flush(); } void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { - rgb_matrix_driver.set_color(index, red, green, blue); + rgb_matrix_driver.set_color(index, red, green, blue); } void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { - rgb_matrix_driver.set_color_all(red, green, blue); + rgb_matrix_driver.set_color_all(red, green, blue); } bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) { - if ( record->event.pressed ) { - uint8_t led[8], led_count; - map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); - if (led_count > 0) { - for (uint8_t i = LED_HITS_TO_REMEMBER; i > 1; i--) { - g_last_led_hit[i - 1] = g_last_led_hit[i - 2]; - } - g_last_led_hit[0] = led[0]; - g_last_led_count = MIN(LED_HITS_TO_REMEMBER, g_last_led_count + 1); - } - for(uint8_t i = 0; i < led_count; i++) - g_key_hit[led[i]] = 0; - g_any_key_hit = 0; - } else { - #ifdef RGB_MATRIX_KEYRELEASES - uint8_t led[8], led_count; - map_row_column_to_led(record->event.key.row, record->event.key.col, led, &led_count); - for(uint8_t i = 0; i < led_count; i++) - g_key_hit[led[i]] = 255; - - g_any_key_hit = 255; - #endif - } - return true; -} - -void rgb_matrix_set_suspend_state(bool state) { - g_suspend_state = state; -} - -void rgb_matrix_test(void) { - // Mask out bits 4 and 5 - // Increase the factor to make the test animation slower (and reduce to make it faster) - uint8_t factor = 10; - switch ( (g_tick & (0b11 << factor)) >> factor ) - { - case 0: - { - rgb_matrix_set_color_all( 20, 0, 0 ); - break; - } - case 1: - { - rgb_matrix_set_color_all( 0, 20, 0 ); - break; - } - case 2: - { - rgb_matrix_set_color_all( 0, 0, 20 ); - break; - } - case 3: - { - rgb_matrix_set_color_all( 20, 20, 20 ); - break; - } - } -} - -// All LEDs off -void rgb_matrix_all_off(void) { - rgb_matrix_set_color_all( 0, 0, 0 ); -} - -// Solid color -void rgb_matrix_solid_color(void) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color_all( rgb.r, rgb.g, rgb.b ); -} - -void rgb_matrix_solid_reactive(void) { - // Relies on hue being 8-bit and wrapping - for ( int i=0; ievent.pressed) { + led_count = rgb_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led); + g_rgb_counters.any_key_hit = 0; + } +#elif defined(RGB_MATRIX_KEYPRESSES) + if (record->event.pressed) { + led_count = rgb_matrix_map_row_column_to_led(record->event.key.row, record->event.key.col, led); + g_rgb_counters.any_key_hit = 0; + } +#endif // defined(RGB_MATRIX_KEYRELEASES) + + if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) { + memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count); + memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count); + memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit + memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count); + last_hit_buffer.count--; + } -// alphas = color1, mods = color2 -void rgb_matrix_alphas_mods(void) { + for(uint8_t i = 0; i < led_count; i++) { + uint8_t index = last_hit_buffer.count; + last_hit_buffer.x[index] = g_led_config.point[led[i]].x; + last_hit_buffer.y[index] = g_led_config.point[led[i]].y; + last_hit_buffer.index[index] = led[i]; + last_hit_buffer.tick[index] = 0; + last_hit_buffer.count++; + } +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED - RGB rgb1 = hsv_to_rgb( (HSV){ .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val } ); - RGB rgb2 = hsv_to_rgb( (HSV){ .h = (rgb_matrix_config.hue + 180) % 360, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val } ); +#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) + if (rgb_matrix_config.mode == RGB_MATRIX_TYPING_HEATMAP) { + process_rgb_matrix_typing_heatmap(record); + } +#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) - rgb_led led; - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - led = g_rgb_leds[i]; - if ( led.matrix_co.raw < 0xFF ) { - if ( led.modifier ) - { - rgb_matrix_set_color( i, rgb2.r, rgb2.g, rgb2.b ); - } - else - { - rgb_matrix_set_color( i, rgb1.r, rgb1.g, rgb1.b ); - } - } - } + return true; } -void rgb_matrix_gradient_up_down(void) { - int16_t h1 = rgb_matrix_config.hue; - int16_t h2 = (rgb_matrix_config.hue + 180) % 360; - int16_t deltaH = h2 - h1; - - // Take the shortest path between hues - if ( deltaH > 127 ) - { - deltaH -= 256; - } - else if ( deltaH < -127 ) - { - deltaH += 256; - } - // Divide delta by 4, this gives the delta per row - deltaH /= 4; - - int16_t s1 = rgb_matrix_config.sat; - int16_t s2 = rgb_matrix_config.hue; - int16_t deltaS = ( s2 - s1 ) / 4; - - HSV hsv = { .h = 0, .s = 255, .v = rgb_matrix_config.val }; - RGB rgb; - Point point; - for ( int i=0; i>4); - // Relies on hue being 8-bit and wrapping - hsv.h = rgb_matrix_config.hue + ( deltaH * y ); - hsv.s = rgb_matrix_config.sat + ( deltaS * y ); - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); - } -} - -void rgb_matrix_raindrops(bool initialize) { - int16_t h1 = rgb_matrix_config.hue; - int16_t h2 = (rgb_matrix_config.hue + 180) % 360; - int16_t deltaH = h2 - h1; - deltaH /= 4; - - // Take the shortest path between hues - if ( deltaH > 127 ) - { - deltaH -= 256; - } - else if ( deltaH < -127 ) - { - deltaH += 256; - } - - int16_t s1 = rgb_matrix_config.sat; - int16_t s2 = rgb_matrix_config.sat; - int16_t deltaS = ( s2 - s1 ) / 4; - - HSV hsv; - RGB rgb; - - // Change one LED every tick, make sure speed is not 0 - uint8_t led_to_change = ( g_tick & ( 0x0A / (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed) ) ) == 0 ? rand() % (DRIVER_LED_TOTAL) : 255; - - for ( int i=0; i> factor ) + { + case 0: { + rgb_matrix_set_color_all( 20, 0, 0 ); + break; } -} - -void rgb_matrix_cycle_all(void) { - uint8_t offset = ( g_tick << rgb_matrix_config.speed ) & 0xFF; - - rgb_led led; - - // Relies on hue being 8-bit and wrapping - for ( int i=0; iinit) { + return false; + } -void rgb_matrix_dual_beacon(void) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb; - Point point; - double cos_value = cos(g_tick * PI / 128) / 32; - double sin_value = sin(g_tick * PI / 128) / 112; - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - point = g_rgb_leds[i].point; - hsv.h = ((point.y - 32.0)* cos_value + (point.x - 112.0) * sin_value) * (180) + rgb_matrix_config.hue; - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); - } + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (uint8_t i = led_min; i < led_max; i++) { + rgb_matrix_set_color(i, 0, 0, 0); + } + return led_max < DRIVER_LED_TOTAL; } -void rgb_matrix_rainbow_beacon(void) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb; - Point point; - double cos_value = cos(g_tick * PI / 128); - double sin_value = sin(g_tick * PI / 128); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - point = g_rgb_leds[i].point; - hsv.h = (1.5 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (point.y - 32.0)* cos_value + (1.5 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (point.x - 112.0) * sin_value + rgb_matrix_config.hue; - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); - } -} +static uint8_t rgb_last_enable = UINT8_MAX; +static uint8_t rgb_last_effect = UINT8_MAX; +static effect_params_t rgb_effect_params = { 0, 0xFF }; +static rgb_task_states rgb_task_state = SYNCING; -void rgb_matrix_rainbow_pinwheels(void) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb; - Point point; - double cos_value = cos(g_tick * PI / 128); - double sin_value = sin(g_tick * PI / 128); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - point = g_rgb_leds[i].point; - hsv.h = (2 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (point.y - 32.0)* cos_value + (2 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (66 - abs(point.x - 112.0)) * sin_value + rgb_matrix_config.hue; - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); +static void rgb_task_timers(void) { + // Update double buffer timers + uint16_t deltaTime = timer_elapsed32(rgb_counters_buffer); + rgb_counters_buffer = timer_read32(); + if (g_rgb_counters.any_key_hit < UINT32_MAX) { + if (UINT32_MAX - deltaTime < g_rgb_counters.any_key_hit) { + g_rgb_counters.any_key_hit = UINT32_MAX; + } else { + g_rgb_counters.any_key_hit += deltaTime; } -} + } -void rgb_matrix_rainbow_moving_chevron(void) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb; - Point point; - uint8_t r = 128; - double cos_value = cos(r * PI / 128); - double sin_value = sin(r * PI / 128); - double multiplier = (g_tick / 256.0 * 224); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - point = g_rgb_leds[i].point; - hsv.h = (1.5 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * abs(point.y - 32.0)* sin_value + (1.5 * (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed)) * (point.x - multiplier) * cos_value + rgb_matrix_config.hue; - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); + // Update double buffer last hit timers +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + uint8_t count = last_hit_buffer.count; + for (uint8_t i = 0; i < count; ++i) { + if (UINT16_MAX - deltaTime < last_hit_buffer.tick[i]) { + last_hit_buffer.count--; + continue; } -} - - -void rgb_matrix_jellybean_raindrops( bool initialize ) { - HSV hsv; - RGB rgb; + last_hit_buffer.tick[i] += deltaTime; + } +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED +} + +static void rgb_task_sync(void) { + // next task + if (timer_elapsed32(g_rgb_counters.tick) >= RGB_MATRIX_LED_FLUSH_LIMIT) + rgb_task_state = STARTING; +} + +static void rgb_task_start(void) { + // reset iter + rgb_effect_params.iter = 0; + + // update double buffers + g_rgb_counters.tick = rgb_counters_buffer; +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + g_last_hit_tracker = last_hit_buffer; +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + + // next task + rgb_task_state = RENDERING; +} + +static void rgb_task_render(uint8_t effect) { + bool rendering = false; + rgb_effect_params.init = (effect != rgb_last_effect) || (rgb_matrix_config.enable != rgb_last_enable); + + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch (effect) { + case RGB_MATRIX_NONE: + rendering = rgb_matrix_none(&rgb_effect_params); + break; + +// --------------------------------------------- +// -----Begin rgb effect switch case macros----- +#define RGB_MATRIX_EFFECT(name, ...) \ + case RGB_MATRIX_##name: \ + rendering = name(&rgb_effect_params); \ + break; +#include "rgb_matrix_animations/rgb_matrix_effects.inc" +#undef RGB_MATRIX_EFFECT + +#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER) + #define RGB_MATRIX_EFFECT(name, ...) \ + case RGB_MATRIX_CUSTOM_##name: \ + rendering = name(&rgb_effect_params); \ + break; + #ifdef RGB_MATRIX_CUSTOM_KB + #include "rgb_matrix_kb.inc" + #endif + #ifdef RGB_MATRIX_CUSTOM_USER + #include "rgb_matrix_user.inc" + #endif + #undef RGB_MATRIX_EFFECT +#endif +// -----End rgb effect switch case macros------- +// --------------------------------------------- - // Change one LED every tick, make sure speed is not 0 - uint8_t led_to_change = ( g_tick & ( 0x0A / (rgb_matrix_config.speed == 0 ? 1 : rgb_matrix_config.speed) ) ) == 0 ? rand() % (DRIVER_LED_TOTAL) : 255; + // Factory default magic value + case UINT8_MAX: { + rgb_matrix_test(); + rgb_task_state = FLUSHING; + } + return; + } - for ( int i=0; i 0 && map[col][row] < max_intensity) { - // neither fully bright nor dark, decay it - map[col][row]--; - } - // set the pixel colour - uint8_t led, led_count; - map_row_column_to_led(row, col, &led, &led_count); - - if (map[col][row] > pure_green_intensity) { - const uint8_t boost = (uint8_t) ((uint16_t) max_brightness_boost - * (map[col][row] - pure_green_intensity) / (max_intensity - pure_green_intensity)); - rgb_matrix_set_color(led, boost, max_intensity, boost); - } - else { - const uint8_t green = (uint8_t) ((uint16_t) max_intensity * map[col][row] / pure_green_intensity); - rgb_matrix_set_color(led, 0, green, 0); - } - } - } - if (++drop > drop_ticks) { - // reset drop timer - drop = 0; - for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) { - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - // if ths is on the bottom row and bright allow decay - if (row == MATRIX_ROWS - 1 && map[col][row] == max_intensity) { - map[col][row]--; - } - // check if the pixel above is bright - if (map[col][row - 1] == max_intensity) { - // allow old bright pixel to decay - map[col][row - 1]--; - // make this pixel bright - map[col][row] = max_intensity; - } - } - } - } -} - -void rgb_matrix_multisplash(void) { - // if (g_any_key_hit < 0xFF) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb; - rgb_led led; - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - led = g_rgb_leds[i]; - uint16_t c = 0, d = 0; - rgb_led last_led; - // if (g_last_led_count) { - for (uint8_t last_i = 0; last_i < g_last_led_count; last_i++) { - last_led = g_rgb_leds[g_last_led_hit[last_i]]; - uint16_t dist = (uint16_t)sqrt(pow(led.point.x - last_led.point.x, 2) + pow(led.point.y - last_led.point.y, 2)); - uint16_t effect = (g_key_hit[g_last_led_hit[last_i]] << 2) - dist; - c += MIN(MAX(effect, 0), 255); - d += 255 - MIN(MAX(effect, 0), 255); - } - // } else { - // d = 255; - // } - hsv.h = (rgb_matrix_config.hue + c) % 256; - hsv.v = MAX(MIN(d, 255), 0); - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); - } - // } else { - // rgb_matrix_set_color_all( 0, 0, 0 ); - // } -} - - -void rgb_matrix_splash(void) { - g_last_led_count = MIN(g_last_led_count, 1); - rgb_matrix_multisplash(); -} - - -void rgb_matrix_solid_multisplash(void) { - // if (g_any_key_hit < 0xFF) { - HSV hsv = { .h = rgb_matrix_config.hue, .s = rgb_matrix_config.sat, .v = rgb_matrix_config.val }; - RGB rgb; - rgb_led led; - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - led = g_rgb_leds[i]; - uint16_t d = 0; - rgb_led last_led; - // if (g_last_led_count) { - for (uint8_t last_i = 0; last_i < g_last_led_count; last_i++) { - last_led = g_rgb_leds[g_last_led_hit[last_i]]; - uint16_t dist = (uint16_t)sqrt(pow(led.point.x - last_led.point.x, 2) + pow(led.point.y - last_led.point.y, 2)); - uint16_t effect = (g_key_hit[g_last_led_hit[last_i]] << 2) - dist; - d += 255 - MIN(MAX(effect, 0), 255); - } - // } else { - // d = 255; - // } - hsv.v = MAX(MIN(d, 255), 0); - rgb = hsv_to_rgb( hsv ); - rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b ); - } - // } else { - // rgb_matrix_set_color_all( 0, 0, 0 ); - // } -} - - -void rgb_matrix_solid_splash(void) { - g_last_led_count = MIN(g_last_led_count, 1); - rgb_matrix_solid_multisplash(); -} - - -// Needs eeprom access that we don't have setup currently - -void rgb_matrix_custom(void) { -// HSV hsv; -// RGB rgb; -// for ( int i=0; i 0 && g_any_key_hit > RGB_DISABLE_AFTER_TIMEOUT * 60 * 20)); - uint8_t effect = suspend_backlight ? 0 : rgb_matrix_config.mode; - - #ifdef TRACK_PREVIOUS_EFFECT - // Keep track of the effect used last time, - // detect change in effect, so each effect can - // have an optional initialization. - - static uint8_t effect_last = 255; - bool initialize = (effect != effect_last) || (rgb_matrix_config.enable != toggle_enable_last); - effect_last = effect; - toggle_enable_last = rgb_matrix_config.enable; - #endif - - // this gets ticked at 20 Hz. - // each effect can opt to do calculations - // and/or request PWM buffer updates. - switch ( effect ) { - case RGB_MATRIX_SOLID_COLOR: - rgb_matrix_solid_color(); - break; - #ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS - case RGB_MATRIX_ALPHAS_MODS: - rgb_matrix_alphas_mods(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_DUAL_BEACON - case RGB_MATRIX_DUAL_BEACON: - rgb_matrix_dual_beacon(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - case RGB_MATRIX_GRADIENT_UP_DOWN: - rgb_matrix_gradient_up_down(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_RAINDROPS - case RGB_MATRIX_RAINDROPS: - rgb_matrix_raindrops( initialize ); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_CYCLE_ALL - case RGB_MATRIX_CYCLE_ALL: - rgb_matrix_cycle_all(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - case RGB_MATRIX_CYCLE_LEFT_RIGHT: - rgb_matrix_cycle_left_right(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - case RGB_MATRIX_CYCLE_UP_DOWN: - rgb_matrix_cycle_up_down(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON - case RGB_MATRIX_RAINBOW_BEACON: - rgb_matrix_rainbow_beacon(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - case RGB_MATRIX_RAINBOW_PINWHEELS: - rgb_matrix_rainbow_pinwheels(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - case RGB_MATRIX_RAINBOW_MOVING_CHEVRON: - rgb_matrix_rainbow_moving_chevron(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - case RGB_MATRIX_JELLYBEAN_RAINDROPS: - rgb_matrix_jellybean_raindrops( initialize ); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN - case RGB_MATRIX_DIGITAL_RAIN: - rgb_matrix_digital_rain( initialize ); - break; - #endif - #ifdef RGB_MATRIX_KEYPRESSES - #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE - case RGB_MATRIX_SOLID_REACTIVE: - rgb_matrix_solid_reactive(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_SPLASH - case RGB_MATRIX_SPLASH: - rgb_matrix_splash(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_MULTISPLASH - case RGB_MATRIX_MULTISPLASH: - rgb_matrix_multisplash(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH - case RGB_MATRIX_SOLID_SPLASH: - rgb_matrix_solid_splash(); - break; - #endif - #ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - case RGB_MATRIX_SOLID_MULTISPLASH: - rgb_matrix_solid_multisplash(); - break; - #endif - #endif - default: - rgb_matrix_custom(); - break; - } - - if ( ! suspend_backlight ) { - rgb_matrix_indicators(); - } + rgb_task_timers(); + + // Ideally we would also stop sending zeros to the LED driver PWM buffers + // while suspended and just do a software shutdown. This is a cheap hack for now. + bool suspend_backlight = ((g_suspend_state && RGB_DISABLE_WHEN_USB_SUSPENDED) || (RGB_DISABLE_AFTER_TIMEOUT > 0 && g_rgb_counters.any_key_hit > RGB_DISABLE_AFTER_TIMEOUT * 60 * 20)); + uint8_t effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode; + + switch (rgb_task_state) { + case STARTING: + rgb_task_start(); + break; + case RENDERING: + rgb_task_render(effect); + break; + case FLUSHING: + rgb_task_flush(effect); + break; + case SYNCING: + rgb_task_sync(); + break; + } + if (!suspend_backlight) { + rgb_matrix_indicators(); + } } void rgb_matrix_indicators(void) { - rgb_matrix_indicators_kb(); - rgb_matrix_indicators_user(); + rgb_matrix_indicators_kb(); + rgb_matrix_indicators_user(); } __attribute__((weak)) @@ -798,189 +410,153 @@ void rgb_matrix_indicators_kb(void) {} __attribute__((weak)) void rgb_matrix_indicators_user(void) {} - -// void rgb_matrix_set_indicator_index( uint8_t *index, uint8_t row, uint8_t column ) -// { -// if ( row >= MATRIX_ROWS ) -// { -// // Special value, 255=none, 254=all -// *index = row; -// } -// else -// { -// // This needs updated to something like -// // uint8_t led[8], led_count; -// // map_row_column_to_led(row,column,led,&led_count); -// // for(uint8_t i = 0; i < led_count; i++) -// map_row_column_to_led( row, column, index ); -// } -// } - void rgb_matrix_init(void) { rgb_matrix_driver.init(); // TODO: put the 1 second startup delay here? - // clear the key hits - for ( int led=0; ledh = eeprom_read_byte(address); -// hsv->s = eeprom_read_byte(address+1); -// hsv->v = eeprom_read_byte(address+2); -// } - -// void backlight_set_key_color( uint8_t row, uint8_t column, HSV hsv ) -// { -// uint8_t led[8], led_count; -// map_row_column_to_led(row,column,led,&led_count); -// for(uint8_t i = 0; i < led_count; i++) { -// if ( led[i] < DRIVER_LED_TOTAL ) -// { -// void *address = backlight_get_custom_key_color_eeprom_address(led[i]); -// eeprom_update_byte(address, hsv.h); -// eeprom_update_byte(address+1, hsv.s); -// eeprom_update_byte(address+2, hsv.v); -// } -// } -// } - -uint32_t rgb_matrix_get_tick(void) { - return g_tick; +void rgb_matrix_set_suspend_state(bool state) { + g_suspend_state = state; } void rgb_matrix_toggle(void) { - rgb_matrix_config.enable ^= 1; - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.enable ^= 1; + rgb_task_state = STARTING; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_enable(void) { - rgb_matrix_config.enable = 1; - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_enable_noeeprom(); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_enable_noeeprom(void) { - rgb_matrix_config.enable = 1; + if (!rgb_matrix_config.enable) + rgb_task_state = STARTING; + rgb_matrix_config.enable = 1; } void rgb_matrix_disable(void) { - rgb_matrix_config.enable = 0; - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_disable_noeeprom(); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_disable_noeeprom(void) { - rgb_matrix_config.enable = 0; + if (rgb_matrix_config.enable) + rgb_task_state = STARTING; + rgb_matrix_config.enable = 0; } void rgb_matrix_step(void) { - rgb_matrix_config.mode++; - if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) - rgb_matrix_config.mode = 1; - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.mode++; + if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) + rgb_matrix_config.mode = 1; + rgb_task_state = STARTING; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_step_reverse(void) { - rgb_matrix_config.mode--; - if (rgb_matrix_config.mode < 1) - rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.mode--; + if (rgb_matrix_config.mode < 1) + rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; + rgb_task_state = STARTING; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_increase_hue(void) { - rgb_matrix_config.hue = increment( rgb_matrix_config.hue, 8, 0, 255 ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.hue += RGB_MATRIX_HUE_STEP; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_decrease_hue(void) { - rgb_matrix_config.hue = decrement( rgb_matrix_config.hue, 8, 0, 255 ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.hue -= RGB_MATRIX_HUE_STEP; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_increase_sat(void) { - rgb_matrix_config.sat = increment( rgb_matrix_config.sat, 8, 0, 255 ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.sat = qadd8(rgb_matrix_config.sat, RGB_MATRIX_SAT_STEP); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_decrease_sat(void) { - rgb_matrix_config.sat = decrement( rgb_matrix_config.sat, 8, 0, 255 ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.sat = qsub8(rgb_matrix_config.sat, RGB_MATRIX_SAT_STEP); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_increase_val(void) { - rgb_matrix_config.val = increment( rgb_matrix_config.val, 8, 0, RGB_MATRIX_MAXIMUM_BRIGHTNESS ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.val = qadd8(rgb_matrix_config.val, RGB_MATRIX_VAL_STEP); + if (rgb_matrix_config.val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) + rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_decrease_val(void) { - rgb_matrix_config.val = decrement( rgb_matrix_config.val, 8, 0, RGB_MATRIX_MAXIMUM_BRIGHTNESS ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.val = qsub8(rgb_matrix_config.val, RGB_MATRIX_VAL_STEP); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_increase_speed(void) { - rgb_matrix_config.speed = increment( rgb_matrix_config.speed, 1, 0, 3 ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this + rgb_matrix_config.speed = qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this } void rgb_matrix_decrease_speed(void) { - rgb_matrix_config.speed = decrement( rgb_matrix_config.speed, 1, 0, 3 ); - eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this + rgb_matrix_config.speed = qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP); + eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this +} + +led_flags_t rgb_matrix_get_flags(void) { + return rgb_effect_params.flags; +} + +void rgb_matrix_set_flags(led_flags_t flags) { + rgb_effect_params.flags = flags; } void rgb_matrix_mode(uint8_t mode) { - rgb_matrix_config.mode = mode; - eeconfig_update_rgb_matrix(rgb_matrix_config.raw); + rgb_matrix_config.mode = mode; + rgb_task_state = STARTING; + eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } void rgb_matrix_mode_noeeprom(uint8_t mode) { - rgb_matrix_config.mode = mode; + rgb_matrix_config.mode = mode; } uint8_t rgb_matrix_get_mode(void) { - return rgb_matrix_config.mode; + return rgb_matrix_config.mode; } void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { - rgb_matrix_config.hue = hue; - rgb_matrix_config.sat = sat; - rgb_matrix_config.val = val; + rgb_matrix_sethsv_noeeprom(hue, sat, val); eeconfig_update_rgb_matrix(rgb_matrix_config.raw); } @@ -988,4 +564,6 @@ void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_config.hue = hue; rgb_matrix_config.sat = sat; rgb_matrix_config.val = val; + if (rgb_matrix_config.val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) + rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; } diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index e43532d11e77..96a8b766271c 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -21,34 +21,40 @@ #include #include +#include "rgb_matrix_types.h" #include "color.h" #include "quantum.h" +#include "rgblight_list.h" #ifdef IS31FL3731 - #include "is31fl3731.h" + #include "is31fl3731.h" #elif defined (IS31FL3733) - #include "is31fl3733.h" + #include "is31fl3733.h" +#elif defined (IS31FL3737) + #include "is31fl3737.h" +#elif defined (WS2812) + #include "ws2812.h" #endif -typedef struct Point { - uint8_t x; - uint8_t y; -} __attribute__((packed)) Point; +#ifndef RGB_MATRIX_LED_FLUSH_LIMIT + #define RGB_MATRIX_LED_FLUSH_LIMIT 16 +#endif -typedef struct rgb_led { - union { - uint8_t raw; - struct { - uint8_t row:4; // 16 max - uint8_t col:4; // 16 max - }; - } matrix_co; - Point point; - uint8_t modifier:1; -} __attribute__((packed)) rgb_led; +#ifndef RGB_MATRIX_LED_PROCESS_LIMIT + #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 +#endif +#if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL +#define RGB_MATRIX_USE_LIMITS(min, max) uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; \ + uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT; \ + if (max > DRIVER_LED_TOTAL) \ + max = DRIVER_LED_TOTAL; +#else +#define RGB_MATRIX_USE_LIMITS(min, max) uint8_t min = 0; \ + uint8_t max = DRIVER_LED_TOTAL; +#endif -extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; +#define RGB_MATRIX_TEST_LED_FLAGS() if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue typedef struct { @@ -56,76 +62,33 @@ typedef struct uint8_t index; } rgb_indicator; -typedef union { - uint32_t raw; - struct { - bool enable :1; - uint8_t mode :6; - uint16_t hue :9; - uint8_t sat :8; - uint8_t val :8; - uint8_t speed :8;//EECONFIG needs to be increased to support this - }; -} rgb_config_t; - enum rgb_matrix_effects { - RGB_MATRIX_SOLID_COLOR = 1, -#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS - RGB_MATRIX_ALPHAS_MODS, -#endif -#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON - RGB_MATRIX_DUAL_BEACON, -#endif -#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - RGB_MATRIX_GRADIENT_UP_DOWN, -#endif -#ifndef DISABLE_RGB_MATRIX_RAINDROPS - RGB_MATRIX_RAINDROPS, -#endif -#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL - RGB_MATRIX_CYCLE_ALL, -#endif -#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - RGB_MATRIX_CYCLE_LEFT_RIGHT, -#endif -#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - RGB_MATRIX_CYCLE_UP_DOWN, -#endif -#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON - RGB_MATRIX_RAINBOW_BEACON, -#endif -#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - RGB_MATRIX_RAINBOW_PINWHEELS, -#endif -#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - RGB_MATRIX_RAINBOW_MOVING_CHEVRON, -#endif -#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - RGB_MATRIX_JELLYBEAN_RAINDROPS, -#endif -#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN - RGB_MATRIX_DIGITAL_RAIN, -#endif -#ifdef RGB_MATRIX_KEYPRESSES - #ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE - RGB_MATRIX_SOLID_REACTIVE, - #endif - #ifndef DISABLE_RGB_MATRIX_SPLASH - RGB_MATRIX_SPLASH, - #endif - #ifndef DISABLE_RGB_MATRIX_MULTISPLASH - RGB_MATRIX_MULTISPLASH, - #endif - #ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH - RGB_MATRIX_SOLID_SPLASH, - #endif - #ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - RGB_MATRIX_SOLID_MULTISPLASH, - #endif -#endif - RGB_MATRIX_EFFECT_MAX + RGB_MATRIX_NONE = 0, + +// -------------------------------------- +// -----Begin rgb effect enum macros----- +#define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_##name, +#include "rgb_matrix_animations/rgb_matrix_effects.inc" +#undef RGB_MATRIX_EFFECT + +#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER) + #define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_CUSTOM_##name, + #ifdef RGB_MATRIX_CUSTOM_KB + #include "rgb_matrix_kb.inc" + #endif + #ifdef RGB_MATRIX_CUSTOM_USER + #include "rgb_matrix_user.inc" + #endif + #undef RGB_MATRIX_EFFECT +#endif +// -------------------------------------- +// -----End rgb effect enum macros------- + + RGB_MATRIX_EFFECT_MAX }; +uint8_t rgb_matrix_map_row_column_to_led( uint8_t row, uint8_t column, uint8_t *led_i); + void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); @@ -159,8 +122,6 @@ void rgb_matrix_decrease(void); // void backlight_get_key_color( uint8_t led, HSV *hsv ); // void backlight_set_key_color( uint8_t row, uint8_t column, HSV hsv ); -uint32_t rgb_matrix_get_tick(void); - void rgb_matrix_toggle(void); void rgb_matrix_enable(void); void rgb_matrix_enable_noeeprom(void); @@ -178,6 +139,8 @@ void rgb_matrix_increase_val(void); void rgb_matrix_decrease_val(void); void rgb_matrix_increase_speed(void); void rgb_matrix_decrease_speed(void); +led_flags_t rgb_matrix_get_flags(void); +void rgb_matrix_set_flags(led_flags_t flags); void rgb_matrix_mode(uint8_t mode); void rgb_matrix_mode_noeeprom(uint8_t mode); uint8_t rgb_matrix_get_mode(void); @@ -209,7 +172,6 @@ uint8_t rgb_matrix_get_mode(void); typedef struct { /* Perform any initialisation required for the other driver functions to work. */ void (*init)(void); - /* Set the colour of a single LED in the buffer. */ void (*set_color)(int index, uint8_t r, uint8_t g, uint8_t b); /* Set the colour of all LEDS on the keyboard in the buffer. */ @@ -220,4 +182,16 @@ typedef struct { extern const rgb_matrix_driver_t rgb_matrix_driver; +extern rgb_config_t rgb_matrix_config; + +extern bool g_suspend_state; +extern rgb_counters_t g_rgb_counters; +extern led_config_t g_led_config; +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +extern last_hit_t g_last_hit_tracker; +#endif +#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS +extern uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; +#endif + #endif diff --git a/quantum/rgb_matrix_animations/alpha_mods_anim.h b/quantum/rgb_matrix_animations/alpha_mods_anim.h new file mode 100644 index 000000000000..0fee19aefc6f --- /dev/null +++ b/quantum/rgb_matrix_animations/alpha_mods_anim.h @@ -0,0 +1,26 @@ +#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS +RGB_MATRIX_EFFECT(ALPHAS_MODS) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +// alphas = color1, mods = color2 +bool ALPHAS_MODS(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + RGB rgb1 = hsv_to_rgb(hsv); + hsv.h += rgb_matrix_config.speed; + RGB rgb2 = hsv_to_rgb(hsv); + + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b); + } else { + rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b); + } + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS diff --git a/quantum/rgb_matrix_animations/breathing_anim.h b/quantum/rgb_matrix_animations/breathing_anim.h new file mode 100644 index 000000000000..c357b53031d5 --- /dev/null +++ b/quantum/rgb_matrix_animations/breathing_anim.h @@ -0,0 +1,20 @@ +#ifndef DISABLE_RGB_MATRIX_BREATHING +RGB_MATRIX_EFFECT(BREATHING) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BREATHING(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 8); + uint8_t val = scale8(abs8(sin8(time) - 128) * 2, rgb_matrix_config.val); + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, val }; + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BREATHING diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h new file mode 100644 index 000000000000..cf9c0784a83e --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void BAND_PINWHEEL_SAT_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { + hsv->s = rgb_matrix_config.sat - time - atan2_8(dy, dx) * 3; +} + +bool BAND_PINWHEEL_SAT(effect_params_t* params) { + return effect_runner_dx_dy(params, &BAND_PINWHEEL_SAT_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h new file mode 100644 index 000000000000..05ad0ee32351 --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void BAND_PINWHEEL_VAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { + hsv->v = rgb_matrix_config.val - time - atan2_8(dy, dx) * 3; +} + +bool BAND_PINWHEEL_VAL(effect_params_t* params) { + return effect_runner_dx_dy(params, &BAND_PINWHEEL_VAL_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL diff --git a/quantum/rgb_matrix_animations/colorband_sat_anim.h b/quantum/rgb_matrix_animations/colorband_sat_anim.h new file mode 100644 index 000000000000..8a40473e4a41 --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_sat_anim.h @@ -0,0 +1,15 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_SAT +RGB_MATRIX_EFFECT(BAND_SAT) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void BAND_SAT_math(HSV* hsv, uint8_t i, uint8_t time) { + int16_t s = rgb_matrix_config.sat - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; + hsv->s = s < 0 ? 0 : s; +} + +bool BAND_SAT(effect_params_t* params) { + return effect_runner_i(params, &BAND_SAT_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_SAT diff --git a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h new file mode 100644 index 000000000000..4af6c60b0d28 --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void BAND_SPIRAL_SAT_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv->s = rgb_matrix_config.sat + dist - time - atan2_8(dy, dx); +} + +bool BAND_SPIRAL_SAT(effect_params_t* params) { + return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_SAT_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h new file mode 100644 index 000000000000..e787956a7a05 --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void BAND_SPIRAL_VAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv->v = rgb_matrix_config.val + dist - time - atan2_8(dy, dx); +} + +bool BAND_SPIRAL_VAL(effect_params_t* params) { + return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_VAL_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL diff --git a/quantum/rgb_matrix_animations/colorband_val_anim.h b/quantum/rgb_matrix_animations/colorband_val_anim.h new file mode 100644 index 000000000000..1e3740cea46d --- /dev/null +++ b/quantum/rgb_matrix_animations/colorband_val_anim.h @@ -0,0 +1,15 @@ +#ifndef DISABLE_RGB_MATRIX_BAND_VAL +RGB_MATRIX_EFFECT(BAND_VAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void BAND_VAL_math(HSV* hsv, uint8_t i, uint8_t time) { + int16_t v = rgb_matrix_config.val - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; + hsv->v = v < 0 ? 0 : v; +} + +bool BAND_VAL(effect_params_t* params) { + return effect_runner_i(params, &BAND_VAL_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_VAL diff --git a/quantum/rgb_matrix_animations/cycle_all_anim.h b/quantum/rgb_matrix_animations/cycle_all_anim.h new file mode 100644 index 000000000000..380dbe05a483 --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_all_anim.h @@ -0,0 +1,15 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL +RGB_MATRIX_EFFECT(CYCLE_ALL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void CYCLE_ALL_math(HSV* hsv, uint8_t i, uint8_t time) +{ + hsv->h = time; +} + +bool CYCLE_ALL(effect_params_t* params) { + return effect_runner_i(params, &CYCLE_ALL_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_ALL diff --git a/quantum/rgb_matrix_animations/cycle_left_right_anim.h b/quantum/rgb_matrix_animations/cycle_left_right_anim.h new file mode 100644 index 000000000000..f270fb42ccd1 --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_left_right_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +RGB_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void CYCLE_LEFT_RIGHT_math(HSV* hsv, uint8_t i, uint8_t time) { + hsv->h = g_led_config.point[i].x - time; +} + +bool CYCLE_LEFT_RIGHT(effect_params_t* params) { + return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT diff --git a/quantum/rgb_matrix_animations/cycle_out_in_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_anim.h new file mode 100644 index 000000000000..46c7efef258d --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_out_in_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN +RGB_MATRIX_EFFECT(CYCLE_OUT_IN) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void CYCLE_OUT_IN_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv->h = 3 * dist / 2 + time; +} + +bool CYCLE_OUT_IN(effect_params_t* params) { + return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN diff --git a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h new file mode 100644 index 000000000000..2fdb4ba91930 --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h @@ -0,0 +1,16 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +RGB_MATRIX_EFFECT(CYCLE_OUT_IN_DUAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void CYCLE_OUT_IN_DUAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { + dx = (k_rgb_matrix_center.x / 2) - abs8(dx); + uint8_t dist = sqrt16(dx * dx + dy * dy); + hsv->h = 3 * dist + time; +} + +bool CYCLE_OUT_IN_DUAL(effect_params_t* params) { + return effect_runner_dx_dy(params, &CYCLE_OUT_IN_DUAL_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL diff --git a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h new file mode 100644 index 000000000000..29e2d92c92c5 --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +RGB_MATRIX_EFFECT(CYCLE_PINWHEEL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void CYCLE_PINWHEEL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t time) { + hsv->h = atan2_8(dy, dx) + time; +} + +bool CYCLE_PINWHEEL(effect_params_t* params) { + return effect_runner_dx_dy(params, &CYCLE_PINWHEEL_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_PINWHEEL diff --git a/quantum/rgb_matrix_animations/cycle_spiral_anim.h b/quantum/rgb_matrix_animations/cycle_spiral_anim.h new file mode 100644 index 000000000000..a1354f60c19a --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_spiral_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_SPIRAL +RGB_MATRIX_EFFECT(CYCLE_SPIRAL) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void CYCLE_SPIRAL_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv->h = dist - time - atan2_8(dy, dx); +} + +bool CYCLE_SPIRAL(effect_params_t* params) { + return effect_runner_dx_dy_dist(params, &CYCLE_SPIRAL_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_SPIRAL diff --git a/quantum/rgb_matrix_animations/cycle_up_down_anim.h b/quantum/rgb_matrix_animations/cycle_up_down_anim.h new file mode 100644 index 000000000000..b3ef4cdf2e02 --- /dev/null +++ b/quantum/rgb_matrix_animations/cycle_up_down_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +RGB_MATRIX_EFFECT(CYCLE_UP_DOWN) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void CYCLE_UP_DOWN_math(HSV* hsv, uint8_t i, uint8_t time) { + hsv->h = g_led_config.point[i].y - time; +} + +bool CYCLE_UP_DOWN(effect_params_t* params) { + return effect_runner_i(params, &CYCLE_UP_DOWN_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN diff --git a/quantum/rgb_matrix_animations/digital_rain_anim.h b/quantum/rgb_matrix_animations/digital_rain_anim.h new file mode 100644 index 000000000000..982399cbdef1 --- /dev/null +++ b/quantum/rgb_matrix_animations/digital_rain_anim.h @@ -0,0 +1,77 @@ +#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN) +RGB_MATRIX_EFFECT(DIGITAL_RAIN) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +#ifndef RGB_DIGITAL_RAIN_DROPS + // lower the number for denser effect/wider keyboard + #define RGB_DIGITAL_RAIN_DROPS 24 +#endif + +bool DIGITAL_RAIN(effect_params_t* params) { + // algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain + const uint8_t drop_ticks = 28; + const uint8_t pure_green_intensity = 0xd0; + const uint8_t max_brightness_boost = 0xc0; + const uint8_t max_intensity = 0xff; + + static uint8_t drop = 0; + + if (params->init) { + rgb_matrix_set_color_all(0, 0, 0); + memset(rgb_frame_buffer, 0, sizeof(rgb_frame_buffer)); + drop = 0; + } + + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) { + // top row, pixels have just fallen and we're + // making a new rain drop in this column + rgb_frame_buffer[row][col] = max_intensity; + } + else if (rgb_frame_buffer[row][col] > 0 && rgb_frame_buffer[row][col] < max_intensity) { + // neither fully bright nor dark, decay it + rgb_frame_buffer[row][col]--; + } + // set the pixel colour + uint8_t led[LED_HITS_TO_REMEMBER]; + uint8_t led_count = rgb_matrix_map_row_column_to_led(row, col, led); + + // TODO: multiple leds are supported mapped to the same row/column + if (led_count > 0) { + if (rgb_frame_buffer[row][col] > pure_green_intensity) { + const uint8_t boost = (uint8_t) ((uint16_t) max_brightness_boost * (rgb_frame_buffer[row][col] - pure_green_intensity) / (max_intensity - pure_green_intensity)); + rgb_matrix_set_color(led[0], boost, max_intensity, boost); + } + else { + const uint8_t green = (uint8_t) ((uint16_t) max_intensity * rgb_frame_buffer[row][col] / pure_green_intensity); + rgb_matrix_set_color(led[0], 0, green, 0); + } + } + } + } + + if (++drop > drop_ticks) { + // reset drop timer + drop = 0; + for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + // if ths is on the bottom row and bright allow decay + if (row == MATRIX_ROWS - 1 && rgb_frame_buffer[row][col] == max_intensity) { + rgb_frame_buffer[row][col]--; + } + // check if the pixel above is bright + if (rgb_frame_buffer[row - 1][col] == max_intensity) { + // allow old bright pixel to decay + rgb_frame_buffer[row - 1][col]--; + // make this pixel bright + rgb_frame_buffer[row][col] = max_intensity; + } + } + } + } + return false; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN) diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix_animations/dual_beacon_anim.h new file mode 100644 index 000000000000..d34f146a5b66 --- /dev/null +++ b/quantum/rgb_matrix_animations/dual_beacon_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON +RGB_MATRIX_EFFECT(DUAL_BEACON) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void DUAL_BEACON_math(HSV* hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { + hsv->h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin) / 128 + rgb_matrix_config.hue; +} + +bool DUAL_BEACON(effect_params_t* params) { + return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_DUAL_BEACON diff --git a/quantum/rgb_matrix_animations/gradient_up_down_anim.h b/quantum/rgb_matrix_animations/gradient_up_down_anim.h new file mode 100644 index 000000000000..d9fcd4d988cf --- /dev/null +++ b/quantum/rgb_matrix_animations/gradient_up_down_anim.h @@ -0,0 +1,22 @@ +#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +RGB_MATRIX_EFFECT(GRADIENT_UP_DOWN) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool GRADIENT_UP_DOWN(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t scale = scale8(64, rgb_matrix_config.speed); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + // The y range will be 0..64, map this to 0..4 + // Relies on hue being 8-bit and wrapping + hsv.h = rgb_matrix_config.hue + scale * (g_led_config.point[i].y >> 4); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h new file mode 100644 index 000000000000..8f0b1bd914c4 --- /dev/null +++ b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h @@ -0,0 +1,29 @@ +#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void jellybean_raindrops_set_color(int i, effect_params_t* params) { + if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; + HSV hsv = { rand() & 0xFF , rand() & 0xFF, rgb_matrix_config.val }; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); +} + +bool JELLYBEAN_RAINDROPS(effect_params_t* params) { + if (!params->init) { + // Change one LED every tick, make sure speed is not 0 + if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) { + jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL, params); + } + return false; + } + + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (int i = led_min; i < led_max; i++) { + jellybean_raindrops_set_color(i, params); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h new file mode 100644 index 000000000000..061cac837c6b --- /dev/null +++ b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON +RGB_MATRIX_EFFECT(RAINBOW_BEACON) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void RAINBOW_BEACON_math(HSV* hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { + hsv->h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 2 * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * 2 * sin) / 128 + rgb_matrix_config.hue; +} + +bool RAINBOW_BEACON(effect_params_t* params) { + return effect_runner_sin_cos_i(params, &RAINBOW_BEACON_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON diff --git a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h new file mode 100644 index 000000000000..f406566fa169 --- /dev/null +++ b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +RGB_MATRIX_EFFECT(RAINBOW_MOVING_CHEVRON) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void RAINBOW_MOVING_CHEVRON_math(HSV* hsv, uint8_t i, uint8_t time) { + hsv->h = abs8(g_led_config.point[i].y - k_rgb_matrix_center.y) + (g_led_config.point[i].x - time) + rgb_matrix_config.hue; +} + +bool RAINBOW_MOVING_CHEVRON(effect_params_t* params) { + return effect_runner_i(params, &RAINBOW_MOVING_CHEVRON_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h new file mode 100644 index 000000000000..f19e9116d988 --- /dev/null +++ b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h @@ -0,0 +1,14 @@ +#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +RGB_MATRIX_EFFECT(PINWHEELS) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void PINWHEELS_math(HSV* hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { + hsv->h = ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 3 * cos + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * 3 * sin) / 128 + rgb_matrix_config.hue; +} + +bool PINWHEELS(effect_params_t* params) { + return effect_runner_sin_cos_i(params, &PINWHEELS_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS diff --git a/quantum/rgb_matrix_animations/raindrops_anim.h b/quantum/rgb_matrix_animations/raindrops_anim.h new file mode 100644 index 000000000000..09d0d1df87c4 --- /dev/null +++ b/quantum/rgb_matrix_animations/raindrops_anim.h @@ -0,0 +1,39 @@ +#ifndef DISABLE_RGB_MATRIX_RAINDROPS +RGB_MATRIX_EFFECT(RAINDROPS) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void raindrops_set_color(int i, effect_params_t* params) { + if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; + HSV hsv = { 0 , rgb_matrix_config.sat, rgb_matrix_config.val }; + + // Take the shortest path between hues + int16_t deltaH = ((rgb_matrix_config.hue + 180) % 360 - rgb_matrix_config.hue) / 4; + if (deltaH > 127) { + deltaH -= 256; + } else if (deltaH < -127) { + deltaH += 256; + } + + hsv.h = rgb_matrix_config.hue + (deltaH * (rand() & 0x03)); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); +} + +bool RAINDROPS(effect_params_t* params) { + if (!params->init) { + // Change one LED every tick, make sure speed is not 0 + if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) { + raindrops_set_color(rand() % DRIVER_LED_TOTAL, params); + } + return false; + } + + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (int i = led_min; i < led_max; i++) { + raindrops_set_color(i, params); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_RAINDROPS diff --git a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc new file mode 100644 index 000000000000..01332ed0dda6 --- /dev/null +++ b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc @@ -0,0 +1,33 @@ +// Add your new core rgb matrix effect here, order determins enum order, requires "rgb_matrix_animations/ directory +#include "rgb_matrix_animations/solid_color_anim.h" +#include "rgb_matrix_animations/alpha_mods_anim.h" +#include "rgb_matrix_animations/gradient_up_down_anim.h" +#include "rgb_matrix_animations/breathing_anim.h" +#include "rgb_matrix_animations/colorband_sat_anim.h" +#include "rgb_matrix_animations/colorband_val_anim.h" +#include "rgb_matrix_animations/colorband_pinwheel_sat_anim.h" +#include "rgb_matrix_animations/colorband_pinwheel_val_anim.h" +#include "rgb_matrix_animations/colorband_spiral_sat_anim.h" +#include "rgb_matrix_animations/colorband_spiral_val_anim.h" +#include "rgb_matrix_animations/cycle_all_anim.h" +#include "rgb_matrix_animations/cycle_left_right_anim.h" +#include "rgb_matrix_animations/cycle_up_down_anim.h" +#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h" +#include "rgb_matrix_animations/cycle_out_in_anim.h" +#include "rgb_matrix_animations/cycle_out_in_dual_anim.h" +#include "rgb_matrix_animations/cycle_pinwheel_anim.h" +#include "rgb_matrix_animations/cycle_spiral_anim.h" +#include "rgb_matrix_animations/dual_beacon_anim.h" +#include "rgb_matrix_animations/rainbow_beacon_anim.h" +#include "rgb_matrix_animations/rainbow_pinwheels_anim.h" +#include "rgb_matrix_animations/raindrops_anim.h" +#include "rgb_matrix_animations/jellybean_raindrops_anim.h" +#include "rgb_matrix_animations/typing_heatmap_anim.h" +#include "rgb_matrix_animations/digital_rain_anim.h" +#include "rgb_matrix_animations/solid_reactive_simple_anim.h" +#include "rgb_matrix_animations/solid_reactive_anim.h" +#include "rgb_matrix_animations/solid_reactive_wide.h" +#include "rgb_matrix_animations/solid_reactive_cross.h" +#include "rgb_matrix_animations/solid_reactive_nexus.h" +#include "rgb_matrix_animations/splash_anim.h" +#include "rgb_matrix_animations/solid_splash_anim.h" diff --git a/quantum/rgb_matrix_animations/solid_color_anim.h b/quantum/rgb_matrix_animations/solid_color_anim.h new file mode 100644 index 000000000000..937642559875 --- /dev/null +++ b/quantum/rgb_matrix_animations/solid_color_anim.h @@ -0,0 +1,16 @@ +RGB_MATRIX_EFFECT(SOLID_COLOR) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool SOLID_COLOR(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix_animations/solid_reactive_anim.h b/quantum/rgb_matrix_animations/solid_reactive_anim.h new file mode 100644 index 000000000000..762a95db3138 --- /dev/null +++ b/quantum/rgb_matrix_animations/solid_reactive_anim.h @@ -0,0 +1,16 @@ +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE +RGB_MATRIX_EFFECT(SOLID_REACTIVE) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void SOLID_REACTIVE_math(HSV* hsv, uint16_t offset) { + hsv->h = rgb_matrix_config.hue + qsub8(130, offset); +} + +bool SOLID_REACTIVE(effect_params_t* params) { + return effect_runner_reactive(params, &SOLID_REACTIVE_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/solid_reactive_cross.h b/quantum/rgb_matrix_animations/solid_reactive_cross.h new file mode 100644 index 000000000000..99f22c694e14 --- /dev/null +++ b/quantum/rgb_matrix_animations/solid_reactive_cross.h @@ -0,0 +1,40 @@ +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +RGB_MATRIX_EFFECT(SOLID_REACTIVE_CROSS) +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS) +#endif + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void SOLID_REACTIVE_CROSS_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick + dist; + dx = dx < 0 ? dx * -1 : dx; + dy = dy < 0 ? dy * -1 : dy; + dx = dx * 16 > 255 ? 255 : dx * 16; + dy = dy * 16 > 255 ? 255 : dy * 16; + effect += dx > dy ? dy : dx; + if (effect > 255) + effect = 255; + hsv->v = qadd8(hsv->v, 255 - effect); +} + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +bool SOLID_REACTIVE_CROSS(effect_params_t* params) { + return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); +} +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { + return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); +} +#endif + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/solid_reactive_nexus.h b/quantum/rgb_matrix_animations/solid_reactive_nexus.h new file mode 100644 index 000000000000..8bebd042d2d4 --- /dev/null +++ b/quantum/rgb_matrix_animations/solid_reactive_nexus.h @@ -0,0 +1,40 @@ +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +RGB_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS) +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS) +#endif + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void SOLID_REACTIVE_NEXUS_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick - dist; + if (effect > 255) + effect = 255; + if (dist > 72) + effect = 255; + if ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) + effect = 255; + hsv->v = qadd8(hsv->v, 255 - effect); + hsv->h = rgb_matrix_config.hue + dy / 4; +} + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { + return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); +} +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { + return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); +} +#endif + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h new file mode 100644 index 000000000000..36c6ec527760 --- /dev/null +++ b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h @@ -0,0 +1,16 @@ +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void SOLID_REACTIVE_SIMPLE_math(HSV* hsv, uint16_t offset) { + hsv->v = scale8(255 - offset, rgb_matrix_config.val); +} + +bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { + return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/solid_reactive_wide.h b/quantum/rgb_matrix_animations/solid_reactive_wide.h new file mode 100644 index 000000000000..36edc475c872 --- /dev/null +++ b/quantum/rgb_matrix_animations/solid_reactive_wide.h @@ -0,0 +1,35 @@ +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +RGB_MATRIX_EFFECT(SOLID_REACTIVE_WIDE) +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE) +#endif + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void SOLID_REACTIVE_WIDE_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick + dist * 5; + if (effect > 255) + effect = 255; + hsv->v = qadd8(hsv->v, 255 - effect); +} + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +bool SOLID_REACTIVE_WIDE(effect_params_t* params) { + return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); +} +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { + return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); +} +#endif + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/solid_splash_anim.h b/quantum/rgb_matrix_animations/solid_splash_anim.h new file mode 100644 index 000000000000..84c99ff00c9d --- /dev/null +++ b/quantum/rgb_matrix_animations/solid_splash_anim.h @@ -0,0 +1,35 @@ +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +#if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH) + +#ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH +RGB_MATRIX_EFFECT(SOLID_SPLASH) +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +RGB_MATRIX_EFFECT(SOLID_MULTISPLASH) +#endif + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +void SOLID_SPLASH_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick - dist; + if (effect > 255) + effect = 255; + hsv->v = qadd8(hsv->v, 255 - effect); +} + +#ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH +bool SOLID_SPLASH(effect_params_t* params) { + return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); +} +#endif + +#ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +bool SOLID_MULTISPLASH(effect_params_t* params) { + return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); +} +#endif + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // !defined(DISABLE_RGB_MATRIX_SPLASH) && !defined(DISABLE_RGB_MATRIX_MULTISPLASH) +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/splash_anim.h b/quantum/rgb_matrix_animations/splash_anim.h new file mode 100644 index 000000000000..c4c05165359a --- /dev/null +++ b/quantum/rgb_matrix_animations/splash_anim.h @@ -0,0 +1,36 @@ +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +#if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) + +#ifndef DISABLE_RGB_MATRIX_SPLASH +RGB_MATRIX_EFFECT(SPLASH) +#endif + +#ifndef DISABLE_RGB_MATRIX_MULTISPLASH +RGB_MATRIX_EFFECT(MULTISPLASH) +#endif + +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +void SPLASH_math(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick - dist; + if (effect > 255) + effect = 255; + hsv->h += effect; + hsv->v = qadd8(hsv->v, 255 - effect); +} + +#ifndef DISABLE_RGB_MATRIX_SPLASH +bool SPLASH(effect_params_t* params) { + return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SPLASH_math); +} +#endif + +#ifndef DISABLE_RGB_MATRIX_MULTISPLASH +bool MULTISPLASH(effect_params_t* params) { + return effect_runner_reactive_splash(0, params, &SPLASH_math); +} +#endif + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_animations/typing_heatmap_anim.h b/quantum/rgb_matrix_animations/typing_heatmap_anim.h new file mode 100644 index 000000000000..e6b34717b2f6 --- /dev/null +++ b/quantum/rgb_matrix_animations/typing_heatmap_anim.h @@ -0,0 +1,74 @@ +#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) +RGB_MATRIX_EFFECT(TYPING_HEATMAP) +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +void process_rgb_matrix_typing_heatmap(keyrecord_t *record) { + uint8_t row = record->event.key.row; + uint8_t col = record->event.key.col; + uint8_t m_row = row - 1; + uint8_t p_row = row + 1; + uint8_t m_col = col - 1; + uint8_t p_col = col + 1; + + if (m_col < col) + rgb_frame_buffer[row][m_col] = qadd8(rgb_frame_buffer[row][m_col], 16); + rgb_frame_buffer[row][col] = qadd8(rgb_frame_buffer[row][col], 32); + if (p_col < MATRIX_COLS) + rgb_frame_buffer[row][p_col] = qadd8(rgb_frame_buffer[row][p_col], 16); + + if (p_row < MATRIX_ROWS) { + if (m_col < col) + rgb_frame_buffer[p_row][m_col] = qadd8(rgb_frame_buffer[p_row][m_col], 13); + rgb_frame_buffer[p_row][col] = qadd8(rgb_frame_buffer[p_row][col], 16); + if (p_col < MATRIX_COLS) + rgb_frame_buffer[p_row][p_col] = qadd8(rgb_frame_buffer[p_row][p_col], 13); + } + + if (m_row < row) { + if (m_col < col) + rgb_frame_buffer[m_row][m_col] = qadd8(rgb_frame_buffer[m_row][m_col], 13); + rgb_frame_buffer[m_row][col] = qadd8(rgb_frame_buffer[m_row][col], 16); + if (p_col < MATRIX_COLS) + rgb_frame_buffer[m_row][p_col] = qadd8(rgb_frame_buffer[m_row][p_col], 13); + } +} + +bool TYPING_HEATMAP(effect_params_t* params) { + // Modified version of RGB_MATRIX_USE_LIMITS to work off of matrix row / col size + uint8_t led_min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; + uint8_t led_max = led_min + RGB_MATRIX_LED_PROCESS_LIMIT; + if (led_max > sizeof(rgb_frame_buffer)) + led_max = sizeof(rgb_frame_buffer); + + if (params->init) { + rgb_matrix_set_color_all(0, 0, 0); + memset(rgb_frame_buffer, 0, sizeof rgb_frame_buffer); + } + + // Render heatmap & decrease + for (int i = led_min; i < led_max; i++) { + uint8_t row = i % MATRIX_ROWS; + uint8_t col = i / MATRIX_ROWS; + uint8_t val = rgb_frame_buffer[row][col]; + + // set the pixel colour + uint8_t led[LED_HITS_TO_REMEMBER]; + uint8_t led_count = rgb_matrix_map_row_column_to_led(row, col, led); + for (uint8_t j = 0; j < led_count; ++j) + { + if (!HAS_ANY_FLAGS(g_led_config.flags[led[j]], params->flags)) + continue; + + HSV hsv = { 170 - qsub8(val, 85), rgb_matrix_config.sat, scale8((qadd8(170, val) - 170) * 3, rgb_matrix_config.val) }; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(led[j], rgb.r, rgb.g, rgb.b); + } + + rgb_frame_buffer[row][col] = qsub8(val, 1); + } + + return led_max < sizeof(rgb_frame_buffer); +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c index 70b80293ddb1..2a3aa9a5e0b5 100644 --- a/quantum/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix_drivers.c @@ -23,7 +23,7 @@ * be here if shared between boards. */ -#if defined(IS31FL3731) || defined(IS31FL3733) +#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) #include "i2c_master.h" @@ -33,23 +33,30 @@ static void init( void ) #ifdef IS31FL3731 IS31FL3731_init( DRIVER_ADDR_1 ); IS31FL3731_init( DRIVER_ADDR_2 ); +#elif defined(IS31FL3733) + IS31FL3733_init( DRIVER_ADDR_1, 0 ); #else - IS31FL3733_init( DRIVER_ADDR_1 ); + IS31FL3737_init( DRIVER_ADDR_1 ); #endif for ( int index = 0; index < DRIVER_LED_TOTAL; index++ ) { bool enabled = true; // This only caches it for later #ifdef IS31FL3731 IS31FL3731_set_led_control_register( index, enabled, enabled, enabled ); -#else +#elif defined(IS31FL3733) IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); +#else + IS31FL3737_set_led_control_register( index, enabled, enabled, enabled ); #endif } // This actually updates the LED drivers #ifdef IS31FL3731 IS31FL3731_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); +#elif defined(IS31FL3733) + IS31FL3733_update_led_control_registers( DRIVER_ADDR_1, 0 ); + IS31FL3733_update_led_control_registers( DRIVER_ADDR_2, 1 ); #else - IS31FL3733_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); + IS31FL3737_update_led_control_registers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); #endif } @@ -65,10 +72,11 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color = IS31FL3731_set_color, .set_color_all = IS31FL3731_set_color_all, }; -#else +#elif defined(IS31FL3733) static void flush( void ) { - IS31FL3733_update_pwm_buffers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); + IS31FL3733_update_pwm_buffers( DRIVER_ADDR_1, 0); + IS31FL3733_update_pwm_buffers( DRIVER_ADDR_2, 1); } const rgb_matrix_driver_t rgb_matrix_driver = { @@ -77,6 +85,39 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color = IS31FL3733_set_color, .set_color_all = IS31FL3733_set_color_all, }; +#else +static void flush( void ) +{ + IS31FL3737_update_pwm_buffers( DRIVER_ADDR_1, DRIVER_ADDR_2 ); +} + +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = IS31FL3737_set_color, + .set_color_all = IS31FL3737_set_color_all, +}; #endif +#elif defined(WS2812) + +extern LED_TYPE led[DRIVER_LED_TOTAL]; + + static void flush( void ) + { + // Assumes use of RGB_DI_PIN + ws2812_setleds(led, DRIVER_LED_TOTAL); + } + + static void init( void ) + { + + } + + const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = ws2812_setled, + .set_color_all = ws2812_setled_all, + }; #endif diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy.h b/quantum/rgb_matrix_runners/effect_runner_dx_dy.h new file mode 100644 index 000000000000..43312629de17 --- /dev/null +++ b/quantum/rgb_matrix_runners/effect_runner_dx_dy.h @@ -0,0 +1,19 @@ +#pragma once + +typedef void (*dx_dy_f)(HSV* hsv, int16_t dx, int16_t dy, uint8_t time); + +bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; + int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; + effect_func(&hsv, dx, dy, time); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h b/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h new file mode 100644 index 000000000000..a7310c853720 --- /dev/null +++ b/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h @@ -0,0 +1,20 @@ +#pragma once + +typedef void (*dx_dy_dist_f)(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time); + +bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 2); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + int16_t dx = g_led_config.point[i].x - k_rgb_matrix_center.x; + int16_t dy = g_led_config.point[i].y - k_rgb_matrix_center.y; + uint8_t dist = sqrt16(dx * dx + dy * dy); + effect_func(&hsv, dx, dy, dist, time); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} diff --git a/quantum/rgb_matrix_runners/effect_runner_i.h b/quantum/rgb_matrix_runners/effect_runner_i.h new file mode 100644 index 000000000000..85405ba1b6c2 --- /dev/null +++ b/quantum/rgb_matrix_runners/effect_runner_i.h @@ -0,0 +1,17 @@ +#pragma once + +typedef void (*i_f)(HSV* hsv, uint8_t i, uint8_t time); + +bool effect_runner_i(effect_params_t* params, i_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + effect_func(&hsv, i, time); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} diff --git a/quantum/rgb_matrix_runners/effect_runner_reactive.h b/quantum/rgb_matrix_runners/effect_runner_reactive.h new file mode 100644 index 000000000000..94cd7d5452f5 --- /dev/null +++ b/quantum/rgb_matrix_runners/effect_runner_reactive.h @@ -0,0 +1,31 @@ +#pragma once + +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + +typedef void (*reactive_f)(HSV* hsv, uint16_t offset); + +bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint16_t max_tick = 65535 / rgb_matrix_config.speed; + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + uint16_t tick = max_tick; + // Reverse search to find most recent key hit + for (int8_t j = g_last_hit_tracker.count - 1; j >= 0; j--) { + if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) { + tick = g_last_hit_tracker.tick[j]; + break; + } + } + + uint16_t offset = scale16by8(tick, rgb_matrix_config.speed); + effect_func(&hsv, offset); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h b/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h new file mode 100644 index 000000000000..cb2b0d79435f --- /dev/null +++ b/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h @@ -0,0 +1,30 @@ +#pragma once + +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + +typedef void (*reactive_splash_f)(HSV* hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick); + +bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, reactive_splash_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { 0, rgb_matrix_config.sat, 0 }; + uint8_t count = g_last_hit_tracker.count; + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + hsv.h = rgb_matrix_config.hue; + hsv.v = 0; + for (uint8_t j = start; j < count; j++) { + int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j]; + int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j]; + uint8_t dist = sqrt16(dx * dx + dy * dy); + uint16_t tick = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed); + effect_func(&hsv, dx, dy, dist, tick); + } + hsv.v = scale8(hsv.v, rgb_matrix_config.val); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h b/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h new file mode 100644 index 000000000000..54e4c6d86657 --- /dev/null +++ b/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h @@ -0,0 +1,19 @@ +#pragma once + +typedef void (*sin_cos_i_f)(HSV* hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time); + +bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; + uint16_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); + int8_t cos_value = cos8(time) - 128; + int8_t sin_value = sin8(time) - 128; + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + effect_func(&hsv, cos_value, sin_value, i, time); + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h new file mode 100644 index 000000000000..f890edd94f8e --- /dev/null +++ b/quantum/rgb_matrix_types.h @@ -0,0 +1,93 @@ +#pragma once + +#include +#include + +#if defined(__GNUC__) +#define PACKED __attribute__ ((__packed__)) +#else +#define PACKED +#endif + +#if defined(_MSC_VER) +#pragma pack( push, 1 ) +#endif + +#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) + #define RGB_MATRIX_KEYREACTIVE_ENABLED +#endif + +// Last led hit +#ifndef LED_HITS_TO_REMEMBER + #define LED_HITS_TO_REMEMBER 8 +#endif // LED_HITS_TO_REMEMBER + +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +typedef struct PACKED { + uint8_t count; + uint8_t x[LED_HITS_TO_REMEMBER]; + uint8_t y[LED_HITS_TO_REMEMBER]; + uint8_t index[LED_HITS_TO_REMEMBER]; + uint16_t tick[LED_HITS_TO_REMEMBER]; +} last_hit_t; +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + +typedef enum rgb_task_states { + STARTING, + RENDERING, + FLUSHING, + SYNCING +} rgb_task_states; + +typedef uint8_t led_flags_t; + +typedef struct PACKED { + uint8_t iter; + led_flags_t flags; + bool init; +} effect_params_t; + +typedef struct PACKED { + // Global tick at 20 Hz + uint32_t tick; + // Ticks since this key was last hit. + uint32_t any_key_hit; +} rgb_counters_t; + +typedef struct PACKED { + uint8_t x; + uint8_t y; +} point_t; + +#define HAS_FLAGS(bits, flags) ((bits & flags) == flags) +#define HAS_ANY_FLAGS(bits, flags) ((bits & flags) != 0x00) + +#define LED_FLAG_ALL 0xFF +#define LED_FLAG_NONE 0x00 +#define LED_FLAG_MODIFIER 0x01 +#define LED_FLAG_UNDERGLOW 0x02 +#define LED_FLAG_KEYLIGHT 0x04 + +#define NO_LED 255 + +typedef struct PACKED { + uint8_t matrix_co[MATRIX_ROWS][MATRIX_COLS]; + point_t point[DRIVER_LED_TOTAL]; + uint8_t flags[DRIVER_LED_TOTAL]; +} led_config_t; + +typedef union { + uint32_t raw; + struct PACKED { + uint8_t enable :2; + uint8_t mode :6; + uint8_t hue :8; + uint8_t sat :8; + uint8_t val :8; + uint8_t speed :8;//EECONFIG needs to be increased to support this + }; +} rgb_config_t; + +#if defined(_MSC_VER) +#pragma pack( pop ) +#endif diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 22dce963c97b..75e4ef0d8696 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -28,93 +28,106 @@ #include "progmem.h" #include "timer.h" #include "rgblight.h" +#include "color.h" #include "debug.h" #include "led_tables.h" +#include "lib/lib8tion/lib8tion.h" +#ifdef VELOCIKEY_ENABLE + #include "velocikey.h" +#endif -#ifndef RGBLIGHT_LIMIT_VAL -#define RGBLIGHT_LIMIT_VAL 255 +#ifdef RGBLIGHT_SPLIT + /* for split keyboard */ + #define RGBLIGHT_SPLIT_SET_CHANGE_MODE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_MODE + #define RGBLIGHT_SPLIT_SET_CHANGE_HSVS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_HSVS + #define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS rgblight_status.change_flags |= (RGBLIGHT_STATUS_CHANGE_MODE|RGBLIGHT_STATUS_CHANGE_HSVS) + #define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_TIMER + #define RGBLIGHT_SPLIT_ANIMATION_TICK rgblight_status.change_flags |= RGBLIGHT_STATUS_ANIMATION_TICK +#else + #define RGBLIGHT_SPLIT_SET_CHANGE_MODE + #define RGBLIGHT_SPLIT_SET_CHANGE_HSVS + #define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS + #define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE + #define RGBLIGHT_SPLIT_ANIMATION_TICK #endif #define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_ ## sym, #define _RGBM_SINGLE_DYNAMIC(sym) #define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_ ## sym, #define _RGBM_MULTI_DYNAMIC(sym) -#define _RGBM_TMP_STATIC(sym) RGBLIGHT_MODE_ ## sym, -#define _RGBM_TMP_DYNAMIC(sym) +#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_ ## sym, +#define _RGBM_TMP_DYNAMIC(sym, msym) static uint8_t static_effect_table [] = { -#include "rgblight.h" +#include "rgblight_modes.h" +}; + +#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_ ## sym, +#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_ ## sym, +#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_ ## sym, +#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_ ## sym, +#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_ ## msym, +#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_ ## msym, +static uint8_t mode_base_table [] = { + 0, // RGBLIGHT_MODE_zero +#include "rgblight_modes.h" }; static inline int is_static_effect(uint8_t mode) { return memchr(static_effect_table, mode, sizeof(static_effect_table)) != NULL; } -#define MIN(a,b) (((a)<(b))?(a):(b)) -#define MAX(a,b) (((a)>(b))?(a):(b)) +#ifdef RGBLIGHT_LED_MAP +const uint8_t led_map[] PROGMEM = RGBLIGHT_LED_MAP; +#endif #ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT __attribute__ ((weak)) -const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; +const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64}; #endif rgblight_config_t rgblight_config; +rgblight_status_t rgblight_status = { .timer_enabled = false }; +bool is_rgblight_initialized = false; +#ifdef RGBLIGHT_USE_TIMER +animation_status_t animation_status = {}; +#endif + +#ifndef LED_ARRAY LED_TYPE led[RGBLED_NUM]; -bool rgblight_timer_enabled = false; + #define LED_ARRAY led +#endif -void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { - uint8_t r = 0, g = 0, b = 0, base, color; - if (val > RGBLIGHT_LIMIT_VAL) { - val=RGBLIGHT_LIMIT_VAL; // limit the val - } +static uint8_t clipping_start_pos = 0; +static uint8_t clipping_num_leds = RGBLED_NUM; +static uint8_t effect_start_pos = 0; +static uint8_t effect_end_pos = RGBLED_NUM; +static uint8_t effect_num_leds = RGBLED_NUM; - if (sat == 0) { // Acromatic color (gray). Hue doesn't mind. - r = val; - g = val; - b = val; - } else { - base = ((255 - sat) * val) >> 8; - color = (val - base) * (hue % 60) / 60; - - switch (hue / 60) { - case 0: - r = val; - g = base + color; - b = base; - break; - case 1: - r = val - color; - g = val; - b = base; - break; - case 2: - r = base; - g = val; - b = base + color; - break; - case 3: - r = base; - g = val - color; - b = val; - break; - case 4: - r = base + color; - g = base; - b = val; - break; - case 5: - r = val; - g = base; - b = val - color; - break; - } - } - r = pgm_read_byte(&CIE1931_CURVE[r]); - g = pgm_read_byte(&CIE1931_CURVE[g]); - b = pgm_read_byte(&CIE1931_CURVE[b]); +void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) { + clipping_start_pos = start_pos; + clipping_num_leds = num_leds; +} - setrgb(r, g, b, led1); +void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds) { + if (start_pos >= RGBLED_NUM) return; + if (start_pos + num_leds > RGBLED_NUM) return; + effect_start_pos = start_pos; + effect_end_pos = start_pos + num_leds; + effect_num_leds = num_leds; +} + +void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { + HSV hsv = { hue, sat, val }; + RGB rgb = hsv_to_rgb(hsv); + setrgb(rgb.r, rgb.g, rgb.b, led1); +} + +void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { + sethsv_raw( hue, sat, + val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, + led1); } void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { @@ -123,6 +136,20 @@ void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { (*led1).b = b; } +void rgblight_check_config(void) { + /* Add some out of bound checks for RGB light config */ + + if (rgblight_config.mode < RGBLIGHT_MODE_STATIC_LIGHT) { + rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT; + } + else if (rgblight_config.mode > RGBLIGHT_MODES) { + rgblight_config.mode = RGBLIGHT_MODES; + } + + if (rgblight_config.val > RGBLIGHT_LIMIT_VAL) { + rgblight_config.val = RGBLIGHT_LIMIT_VAL; + } +} uint32_t eeconfig_read_rgblight(void) { #if defined(__AVR__) || defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) @@ -131,23 +158,26 @@ uint32_t eeconfig_read_rgblight(void) { return 0; #endif } + void eeconfig_update_rgblight(uint32_t val) { #if defined(__AVR__) || defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) - if (eeconfig_read_rgblight() != val) { + rgblight_check_config(); eeprom_update_dword(EECONFIG_RGBLIGHT, val); - } #endif } + void eeconfig_update_rgblight_default(void) { //dprintf("eeconfig_update_rgblight_default\n"); rgblight_config.enable = 1; rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT; rgblight_config.hue = 0; - rgblight_config.sat = 255; + rgblight_config.sat = UINT8_MAX; rgblight_config.val = RGBLIGHT_LIMIT_VAL; rgblight_config.speed = 0; + RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; eeconfig_update_rgblight(rgblight_config.raw); } + void eeconfig_debug_rgblight(void) { dprintf("rgblight_config eprom\n"); dprintf("rgblight_config.enable = %d\n", rgblight_config.enable); @@ -159,6 +189,11 @@ void eeconfig_debug_rgblight(void) { } void rgblight_init(void) { + /* if already initialized, don't do it again. + If you must do it again, extern this and set to false, first. + This is a dirty, dirty hack until proper hooks can be added for keyboard startup. */ + if (is_rgblight_initialized) { return; } + debug_enable = 1; // Debug ON! dprintf("rgblight_init called.\n"); dprintf("rgblight_init start!\n"); @@ -168,11 +203,14 @@ void rgblight_init(void) { eeconfig_update_rgblight_default(); } rgblight_config.raw = eeconfig_read_rgblight(); + RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; if (!rgblight_config.mode) { dprintf("rgblight_init rgblight_config.mode = 0. Write default values to EEPROM.\n"); eeconfig_update_rgblight_default(); rgblight_config.raw = eeconfig_read_rgblight(); } + rgblight_check_config(); + eeconfig_debug_rgblight(); // display current eeprom values #ifdef RGBLIGHT_USE_TIMER @@ -182,13 +220,20 @@ void rgblight_init(void) { if (rgblight_config.enable) { rgblight_mode_noeeprom(rgblight_config.mode); } + + is_rgblight_initialized = true; + +} + +uint32_t rgblight_read_dword(void) { + return rgblight_config.raw; } void rgblight_update_dword(uint32_t dword) { + RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; rgblight_config.raw = dword; - eeconfig_update_rgblight(rgblight_config.raw); if (rgblight_config.enable) - rgblight_mode(rgblight_config.mode); + rgblight_mode_noeeprom(rgblight_config.mode); else { #ifdef RGBLIGHT_USE_TIMER rgblight_timer_disable(); @@ -260,6 +305,7 @@ void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { } else { rgblight_config.mode = mode; } + RGBLIGHT_SPLIT_SET_CHANGE_MODE; if (write_to_eeprom) { eeconfig_update_rgblight(rgblight_config.raw); xprintf("rgblight mode [EEPROM]: %u\n", rgblight_config.mode); @@ -275,6 +321,9 @@ void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { rgblight_timer_enable(); #endif } +#ifdef RGBLIGHT_USE_TIMER + animation_status.restart = true; +#endif rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); } @@ -328,6 +377,7 @@ void rgblight_disable(void) { #ifdef RGBLIGHT_USE_TIMER rgblight_timer_disable(); #endif + RGBLIGHT_SPLIT_SET_CHANGE_MODE; wait_ms(50); rgblight_set(); } @@ -338,27 +388,13 @@ void rgblight_disable_noeeprom(void) { #ifdef RGBLIGHT_USE_TIMER rgblight_timer_disable(); #endif + RGBLIGHT_SPLIT_SET_CHANGE_MODE; wait_ms(50); rgblight_set(); } - -// Deals with the messy details of incrementing an integer -static uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) { - int16_t new_value = value; - new_value += step; - return MIN( MAX( new_value, min ), max ); -} - -static uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) { - int16_t new_value = value; - new_value -= step; - return MIN( MAX( new_value, min ), max ); -} - void rgblight_increase_hue_helper(bool write_to_eeprom) { - uint16_t hue; - hue = (rgblight_config.hue+RGBLIGHT_HUE_STEP) % 360; + uint8_t hue = rgblight_config.hue + RGBLIGHT_HUE_STEP; rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom); } void rgblight_increase_hue_noeeprom(void) { @@ -368,12 +404,7 @@ void rgblight_increase_hue(void) { rgblight_increase_hue_helper(true); } void rgblight_decrease_hue_helper(bool write_to_eeprom) { - uint16_t hue; - if (rgblight_config.hue-RGBLIGHT_HUE_STEP < 0) { - hue = (rgblight_config.hue + 360 - RGBLIGHT_HUE_STEP) % 360; - } else { - hue = (rgblight_config.hue - RGBLIGHT_HUE_STEP) % 360; - } + uint8_t hue = rgblight_config.hue - RGBLIGHT_HUE_STEP; rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom); } void rgblight_decrease_hue_noeeprom(void) { @@ -383,12 +414,7 @@ void rgblight_decrease_hue(void) { rgblight_decrease_hue_helper(true); } void rgblight_increase_sat_helper(bool write_to_eeprom) { - uint8_t sat; - if (rgblight_config.sat + RGBLIGHT_SAT_STEP > 255) { - sat = 255; - } else { - sat = rgblight_config.sat + RGBLIGHT_SAT_STEP; - } + uint8_t sat = qadd8(rgblight_config.sat, RGBLIGHT_SAT_STEP); rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom); } void rgblight_increase_sat_noeeprom(void) { @@ -398,12 +424,7 @@ void rgblight_increase_sat(void) { rgblight_increase_sat_helper(true); } void rgblight_decrease_sat_helper(bool write_to_eeprom) { - uint8_t sat; - if (rgblight_config.sat - RGBLIGHT_SAT_STEP < 0) { - sat = 0; - } else { - sat = rgblight_config.sat - RGBLIGHT_SAT_STEP; - } + uint8_t sat = qsub8(rgblight_config.sat, RGBLIGHT_SAT_STEP); rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom); } void rgblight_decrease_sat_noeeprom(void) { @@ -413,12 +434,7 @@ void rgblight_decrease_sat(void) { rgblight_decrease_sat_helper(true); } void rgblight_increase_val_helper(bool write_to_eeprom) { - uint8_t val; - if (rgblight_config.val + RGBLIGHT_VAL_STEP > RGBLIGHT_LIMIT_VAL) { - val = RGBLIGHT_LIMIT_VAL; - } else { - val = rgblight_config.val + RGBLIGHT_VAL_STEP; - } + uint8_t val = qadd8(rgblight_config.val, RGBLIGHT_VAL_STEP); rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom); } void rgblight_increase_val_noeeprom(void) { @@ -428,12 +444,7 @@ void rgblight_increase_val(void) { rgblight_increase_val_helper(true); } void rgblight_decrease_val_helper(bool write_to_eeprom) { - uint8_t val; - if (rgblight_config.val - RGBLIGHT_VAL_STEP < 0) { - val = 0; - } else { - val = rgblight_config.val - RGBLIGHT_VAL_STEP; - } + uint8_t val = qsub8(rgblight_config.val, RGBLIGHT_VAL_STEP); rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom); } void rgblight_decrease_val_noeeprom(void) { @@ -443,16 +454,20 @@ void rgblight_decrease_val(void) { rgblight_decrease_val_helper(true); } void rgblight_increase_speed(void) { - rgblight_config.speed = increment( rgblight_config.speed, 1, 0, 3 ); + if (rgblight_config.speed < 3) + rgblight_config.speed++; + //RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED? eeconfig_update_rgblight(rgblight_config.raw);//EECONFIG needs to be increased to support this } void rgblight_decrease_speed(void) { - rgblight_config.speed = decrement( rgblight_config.speed, 1, 0, 3 ); + if (rgblight_config.speed > 0) + rgblight_config.speed--; + //RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED?? eeconfig_update_rgblight(rgblight_config.raw);//EECONFIG needs to be increased to support this } -void rgblight_sethsv_noeeprom_old(uint16_t hue, uint8_t sat, uint8_t val) { +void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) { if (rgblight_config.enable) { LED_TYPE tmp_led; sethsv(hue, sat, val, &tmp_led); @@ -461,8 +476,9 @@ void rgblight_sethsv_noeeprom_old(uint16_t hue, uint8_t sat, uint8_t val) { } } -void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) { +void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) { if (rgblight_config.enable) { + rgblight_status.base_mode = mode_base_table[rgblight_config.mode]; if (rgblight_config.mode == RGBLIGHT_MODE_STATIC_LIGHT) { // same static color LED_TYPE tmp_led; @@ -473,42 +489,55 @@ void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool if ( 1 == 0 ) { //dummy } #ifdef RGBLIGHT_EFFECT_BREATHING - else if (rgblight_config.mode >= RGBLIGHT_MODE_BREATHING && - rgblight_config.mode <= RGBLIGHT_MODE_BREATHING_end) { + else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING ) { // breathing mode, ignore the change of val, use in memory value instead val = rgblight_config.val; } #endif #ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD - else if (rgblight_config.mode >= RGBLIGHT_MODE_RAINBOW_MOOD && - rgblight_config.mode <= RGBLIGHT_MODE_RAINBOW_MOOD_end) { + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) { // rainbow mood, ignore the change of hue hue = rgblight_config.hue; } #endif #ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - else if (rgblight_config.mode >= RGBLIGHT_MODE_RAINBOW_SWIRL && - rgblight_config.mode <= RGBLIGHT_MODE_RAINBOW_SWIRL_end) { + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) { // rainbow swirl, ignore the change of hue hue = rgblight_config.hue; } #endif #ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT - else if (rgblight_config.mode >= RGBLIGHT_MODE_STATIC_GRADIENT && - rgblight_config.mode <= RGBLIGHT_MODE_STATIC_GRADIENT_end) { + else if (rgblight_status.base_mode == RGBLIGHT_MODE_STATIC_GRADIENT) { // static gradient - uint16_t _hue; - int8_t direction = ((rgblight_config.mode - RGBLIGHT_MODE_STATIC_GRADIENT) % 2) ? -1 : 1; - uint16_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[(rgblight_config.mode - RGBLIGHT_MODE_STATIC_GRADIENT) / 2]); - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - _hue = (range / RGBLED_NUM * i * direction + hue + 360) % 360; - dprintf("rgblight rainbow set hsv: %u,%u,%d,%u\n", i, _hue, direction, range); - sethsv(_hue, sat, val, (LED_TYPE *)&led[i]); + uint8_t delta = rgblight_config.mode - rgblight_status.base_mode; + bool direction = (delta % 2) == 0; +#ifdef __AVR__ + // probably due to how pgm_read_word is defined for ARM, but the ARM compiler really hates this line + uint8_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[delta / 2]); +#else + uint8_t range = RGBLED_GRADIENT_RANGES[delta / 2]; +#endif + for (uint8_t i = 0; i < effect_num_leds; i++) { + uint8_t _hue = ((uint16_t)i * (uint16_t)range) / effect_num_leds; + if (direction) { + _hue = hue + _hue; + } else { + _hue = hue - _hue; + } + dprintf("rgblight rainbow set hsv: %d,%d,%d,%u\n", i, _hue, direction, range); + sethsv(_hue, sat, val, (LED_TYPE *)&led[i + effect_start_pos]); } rgblight_set(); } #endif } +#ifdef RGBLIGHT_SPLIT + if( rgblight_config.hue != hue || + rgblight_config.sat != sat || + rgblight_config.val != val ) { + RGBLIGHT_SPLIT_SET_CHANGE_HSVS; + } +#endif rgblight_config.hue = hue; rgblight_config.sat = sat; rgblight_config.val = val; @@ -521,15 +550,15 @@ void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool } } -void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { +void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, true); } -void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { +void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, false); } -uint16_t rgblight_get_hue(void) { +uint8_t rgblight_get_hue(void) { return rgblight_config.hue; } @@ -544,7 +573,7 @@ uint8_t rgblight_get_val(void) { void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) { if (!rgblight_config.enable) { return; } - for (uint8_t i = 0; i < RGBLED_NUM; i++) { + for (uint8_t i = effect_start_pos; i < effect_end_pos; i++) { led[i].r = r; led[i].g = g; led[i].b = b; @@ -561,7 +590,7 @@ void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) { rgblight_set(); } -void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index) { +void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index) { if (!rgblight_config.enable) { return; } LED_TYPE tmp_led; @@ -569,33 +598,139 @@ void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index) { rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index); } +#if defined(RGBLIGHT_EFFECT_BREATHING) || defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) || defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) \ + || defined(RGBLIGHT_EFFECT_SNAKE) || defined(RGBLIGHT_EFFECT_KNIGHT) + +static uint8_t get_interval_time(const uint8_t* default_interval_address, uint8_t velocikey_min, uint8_t velocikey_max) { + return +#ifdef VELOCIKEY_ENABLE + velocikey_enabled() ? velocikey_match_speed(velocikey_min, velocikey_max) : +#endif + pgm_read_byte(default_interval_address); +} + +#endif + +void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end) { + if (!rgblight_config.enable || start < 0 || start >= end || end > RGBLED_NUM) { return; } + + for (uint8_t i = start; i < end; i++) { + led[i].r = r; + led[i].g = g; + led[i].b = b; + } + rgblight_set(); + wait_ms(1); +} + +void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) { + if (!rgblight_config.enable) { return; } + + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end); +} + +#ifndef RGBLIGHT_SPLIT +void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) { + rgblight_setrgb_range(r, g, b, 0 , (uint8_t) RGBLED_NUM/2); +} + +void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b) { + rgblight_setrgb_range(r, g, b, (uint8_t) RGBLED_NUM/2, (uint8_t) RGBLED_NUM); +} + +void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val) { + rgblight_sethsv_range(hue, sat, val, 0, (uint8_t) RGBLED_NUM/2); +} + +void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) { + rgblight_sethsv_range(hue, sat, val, (uint8_t) RGBLED_NUM/2, (uint8_t) RGBLED_NUM); +} +#endif // ifndef RGBLIGHT_SPLIT + #ifndef RGBLIGHT_CUSTOM_DRIVER void rgblight_set(void) { - if (rgblight_config.enable) { - #ifdef RGBW - ws2812_setleds_rgbw(led, RGBLED_NUM); - #else - ws2812_setleds(led, RGBLED_NUM); - #endif - } else { - for (uint8_t i = 0; i < RGBLED_NUM; i++) { + LED_TYPE *start_led; + uint16_t num_leds = clipping_num_leds; + + if (!rgblight_config.enable) { + for (uint8_t i = effect_start_pos; i < effect_end_pos; i++) { led[i].r = 0; led[i].g = 0; led[i].b = 0; } - #ifdef RGBW - ws2812_setleds_rgbw(led, RGBLED_NUM); - #else - ws2812_setleds(led, RGBLED_NUM); - #endif } +#ifdef RGBLIGHT_LED_MAP + LED_TYPE led0[RGBLED_NUM]; + for(uint8_t i = 0; i < RGBLED_NUM; i++) { + led0[i] = led[pgm_read_byte(&led_map[i])]; + } + start_led = led0 + clipping_start_pos; +#else + start_led = led + clipping_start_pos; +#endif +#ifdef RGBW + ws2812_setleds_rgbw(start_led, num_leds); +#else + ws2812_setleds(start_led, num_leds); +#endif } #endif +#ifdef RGBLIGHT_SPLIT +/* for split keyboard master side */ +uint8_t rgblight_get_change_flags(void) { + return rgblight_status.change_flags; +} + +void rgblight_clear_change_flags(void) { + rgblight_status.change_flags = 0; +} + +void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo) { + syncinfo->config = rgblight_config; + syncinfo->status = rgblight_status; +} + +/* for split keyboard slave side */ +void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) { + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_MODE) { + if (syncinfo->config.enable) { + rgblight_config.enable = 1; // == rgblight_enable_noeeprom(); + rgblight_mode_eeprom_helper(syncinfo->config.mode, write_to_eeprom); + } else { + rgblight_disable_noeeprom(); + } + } + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_HSVS) { + rgblight_sethsv_eeprom_helper(syncinfo->config.hue, syncinfo->config.sat, syncinfo->config.val, write_to_eeprom); + // rgblight_config.speed = config->speed; // NEED??? + } + #ifdef RGBLIGHT_USE_TIMER + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_TIMER) { + if (syncinfo->status.timer_enabled) { + rgblight_timer_enable(); + } else { + rgblight_timer_disable(); + } + } + #ifndef RGBLIGHT_SPLIT_NO_ANIMATION_SYNC + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_ANIMATION_TICK) { + animation_status.restart = true; + } + #endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */ + #endif /* RGBLIGHT_USE_TIMER */ +} +#endif /* RGBLIGHT_SPLIT */ + #ifdef RGBLIGHT_USE_TIMER -// Animation timer -- AVR Timer3 +typedef void (*effect_func_t)(animation_status_t *anim); + +// Animation timer -- use system timer (AVR Timer0) void rgblight_timer_init(void) { + // OLD!!!! Animation timer -- AVR Timer3 // static uint8_t rgblight_timer_is_init = 0; // if (rgblight_timer_is_init) { // return; @@ -611,19 +746,29 @@ void rgblight_timer_init(void) { // OCR3AL = RGBLED_TIMER_TOP & 0xff; // SREG = sreg; - rgblight_timer_enabled = true; + rgblight_status.timer_enabled = false; + RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE; } void rgblight_timer_enable(void) { - rgblight_timer_enabled = true; - dprintf("TIMER3 enabled.\n"); + if( !is_static_effect(rgblight_config.mode) ) { + rgblight_status.timer_enabled = true; + } + animation_status.last_timer = timer_read(); + RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE; + dprintf("rgblight timer enabled.\n"); } void rgblight_timer_disable(void) { - rgblight_timer_enabled = false; - dprintf("TIMER3 disabled.\n"); + rgblight_status.timer_enabled = false; + RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE; + dprintf("rgblight timer disable.\n"); } void rgblight_timer_toggle(void) { - rgblight_timer_enabled ^= rgblight_timer_enabled; - dprintf("TIMER3 toggled.\n"); + dprintf("rgblight timer toggle.\n"); + if(rgblight_status.timer_enabled) { + rgblight_timer_disable(); + } else { + rgblight_timer_enable(); + } } void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) { @@ -632,63 +777,116 @@ void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb(r, g, b); } +static void rgblight_effect_dummy(animation_status_t *anim) { + // do nothing + /******** + dprintf("rgblight_task() what happened?\n"); + dprintf("is_static_effect %d\n", is_static_effect(rgblight_config.mode)); + dprintf("mode = %d, base_mode = %d, timer_enabled %d, ", + rgblight_config.mode, rgblight_status.base_mode, + rgblight_status.timer_enabled); + dprintf("last_timer = %d\n",anim->last_timer); + **/ +} + void rgblight_task(void) { - if (rgblight_timer_enabled) { + if (rgblight_status.timer_enabled) { + effect_func_t effect_func = rgblight_effect_dummy; + uint16_t interval_time = 2000; // dummy interval + uint8_t delta = rgblight_config.mode - rgblight_status.base_mode; + animation_status.delta = delta; + // static light mode, do nothing here if ( 1 == 0 ) { //dummy } #ifdef RGBLIGHT_EFFECT_BREATHING - else if (rgblight_config.mode >= RGBLIGHT_MODE_BREATHING && - rgblight_config.mode <= RGBLIGHT_MODE_BREATHING_end) { + else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) { // breathing mode - rgblight_effect_breathing(rgblight_config.mode - RGBLIGHT_MODE_BREATHING ); + interval_time = get_interval_time(&RGBLED_BREATHING_INTERVALS[delta], 1, 100); + effect_func = rgblight_effect_breathing; } #endif #ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD - else if (rgblight_config.mode >= RGBLIGHT_MODE_RAINBOW_MOOD && - rgblight_config.mode <= RGBLIGHT_MODE_RAINBOW_MOOD_end) { + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) { // rainbow mood mode - rgblight_effect_rainbow_mood(rgblight_config.mode - RGBLIGHT_MODE_RAINBOW_MOOD); + interval_time = get_interval_time(&RGBLED_RAINBOW_MOOD_INTERVALS[delta], 5, 100); + effect_func = rgblight_effect_rainbow_mood; } #endif #ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - else if (rgblight_config.mode >= RGBLIGHT_MODE_RAINBOW_SWIRL && - rgblight_config.mode <= RGBLIGHT_MODE_RAINBOW_SWIRL_end) { + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) { // rainbow swirl mode - rgblight_effect_rainbow_swirl(rgblight_config.mode - RGBLIGHT_MODE_RAINBOW_SWIRL); + interval_time = get_interval_time(&RGBLED_RAINBOW_SWIRL_INTERVALS[delta / 2], 1, 100); + effect_func = rgblight_effect_rainbow_swirl; } #endif #ifdef RGBLIGHT_EFFECT_SNAKE - else if (rgblight_config.mode >= RGBLIGHT_MODE_SNAKE && - rgblight_config.mode <= RGBLIGHT_MODE_SNAKE_end) { + else if (rgblight_status.base_mode == RGBLIGHT_MODE_SNAKE) { // snake mode - rgblight_effect_snake(rgblight_config.mode - RGBLIGHT_MODE_SNAKE); + interval_time = get_interval_time(&RGBLED_SNAKE_INTERVALS[delta / 2], 1, 200); + effect_func = rgblight_effect_snake; } #endif #ifdef RGBLIGHT_EFFECT_KNIGHT - else if (rgblight_config.mode >= RGBLIGHT_MODE_KNIGHT && - rgblight_config.mode <= RGBLIGHT_MODE_KNIGHT_end) { + else if (rgblight_status.base_mode == RGBLIGHT_MODE_KNIGHT) { // knight mode - rgblight_effect_knight(rgblight_config.mode - RGBLIGHT_MODE_KNIGHT); + interval_time = get_interval_time(&RGBLED_KNIGHT_INTERVALS[delta], 5, 100); + effect_func = rgblight_effect_knight; } #endif #ifdef RGBLIGHT_EFFECT_CHRISTMAS - else if (rgblight_config.mode == RGBLIGHT_MODE_CHRISTMAS) { + else if (rgblight_status.base_mode == RGBLIGHT_MODE_CHRISTMAS) { // christmas mode - rgblight_effect_christmas(); + interval_time = RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL; + effect_func = (effect_func_t)rgblight_effect_christmas; } #endif #ifdef RGBLIGHT_EFFECT_RGB_TEST - else if (rgblight_config.mode == RGBLIGHT_MODE_RGB_TEST) { + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RGB_TEST) { // RGB test mode - rgblight_effect_rgbtest(); + interval_time = pgm_read_word(&RGBLED_RGBTEST_INTERVALS[0]); + effect_func = (effect_func_t)rgblight_effect_rgbtest; } #endif #ifdef RGBLIGHT_EFFECT_ALTERNATING - else if (rgblight_config.mode == RGBLIGHT_MODE_ALTERNATING){ - rgblight_effect_alternating(); + else if (rgblight_status.base_mode == RGBLIGHT_MODE_ALTERNATING){ + interval_time = 500; + effect_func = (effect_func_t)rgblight_effect_alternating; } #endif + if (animation_status.restart) { + animation_status.restart = false; + animation_status.last_timer = timer_read() - interval_time - 1; + animation_status.pos16 = 0; // restart signal to local each effect + } + if (timer_elapsed(animation_status.last_timer) >= interval_time) { +#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + static uint16_t report_last_timer = 0; + static bool tick_flag = false; + uint16_t oldpos16; + if (tick_flag) { + tick_flag = false; + //dprintf("rgblight animation tick\n"); + if (timer_elapsed(report_last_timer) >= 30000) { + report_last_timer = timer_read(); + dprintf("rgblight animation tick report to slave\n"); + RGBLIGHT_SPLIT_ANIMATION_TICK; + } + } + oldpos16 = animation_status.pos16; + //dprintf("call effect function\n"); +#endif + animation_status.last_timer += interval_time; + effect_func(&animation_status); +#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + //dprintf("pos16, oldpos16 = %d %d\n", + // animation_status.pos16,oldpos16); + if (animation_status.pos16 == 0 && oldpos16 != 0) { + //dprintf("flag on\n"); + tick_flag = true; + } +#endif + } } } @@ -696,23 +894,28 @@ void rgblight_task(void) { // Effects #ifdef RGBLIGHT_EFFECT_BREATHING + +#ifndef RGBLIGHT_EFFECT_BREATHE_CENTER + #ifndef RGBLIGHT_BREATHE_TABLE_SIZE + #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256 or 128 or 64 + #endif + #include +#endif + __attribute__ ((weak)) const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; -void rgblight_effect_breathing(uint8_t interval) { - static uint8_t pos = 0; - static uint16_t last_timer = 0; +void rgblight_effect_breathing(animation_status_t *anim) { float val; - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_BREATHING_INTERVALS[interval])) { - return; - } - last_timer = timer_read(); - // http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/ - val = (exp(sin((pos/255.0)*M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER/M_E)*(RGBLIGHT_EFFECT_BREATHE_MAX/(M_E-1/M_E)); +#ifdef RGBLIGHT_EFFECT_BREATHE_TABLE + val = pgm_read_byte(&rgblight_effect_breathe_table[anim->pos / table_scale]); +#else + val = (exp(sin((anim->pos/255.0)*M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER/M_E)*(RGBLIGHT_EFFECT_BREATHE_MAX/(M_E-1/M_E)); +#endif rgblight_sethsv_noeeprom_old(rgblight_config.hue, rgblight_config.sat, val); - pos = (pos + 1) % 256; + anim->pos = (anim->pos + 1); } #endif @@ -720,50 +923,34 @@ void rgblight_effect_breathing(uint8_t interval) { __attribute__ ((weak)) const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30}; -void rgblight_effect_rainbow_mood(uint8_t interval) { - static uint16_t current_hue = 0; - static uint16_t last_timer = 0; - - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_RAINBOW_MOOD_INTERVALS[interval])) { - return; - } - last_timer = timer_read(); - rgblight_sethsv_noeeprom_old(current_hue, rgblight_config.sat, rgblight_config.val); - current_hue = (current_hue + 1) % 360; +void rgblight_effect_rainbow_mood(animation_status_t *anim) { + rgblight_sethsv_noeeprom_old(anim->current_hue, rgblight_config.sat, rgblight_config.val); + anim->current_hue++; } #endif #ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL #ifndef RGBLIGHT_RAINBOW_SWIRL_RANGE - #define RGBLIGHT_RAINBOW_SWIRL_RANGE 360 + #define RGBLIGHT_RAINBOW_SWIRL_RANGE 255 #endif __attribute__ ((weak)) const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20}; -void rgblight_effect_rainbow_swirl(uint8_t interval) { - static uint16_t current_hue = 0; - static uint16_t last_timer = 0; - uint16_t hue; +void rgblight_effect_rainbow_swirl(animation_status_t *anim) { + uint8_t hue; uint8_t i; - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_RAINBOW_SWIRL_INTERVALS[interval / 2])) { - return; - } - last_timer = timer_read(); - for (i = 0; i < RGBLED_NUM; i++) { - hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / RGBLED_NUM * i + current_hue) % 360; - sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); + + for (i = 0; i < effect_num_leds; i++) { + hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / effect_num_leds * i + anim->current_hue); + sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + effect_start_pos]); } rgblight_set(); - if (interval % 2) { - current_hue = (current_hue + 1) % 360; + if (anim->delta % 2) { + anim->current_hue++; } else { - if (current_hue - 1 < 0) { - current_hue = 359; - } else { - current_hue = current_hue - 1; - } + anim->current_hue--; } } #endif @@ -772,42 +959,62 @@ void rgblight_effect_rainbow_swirl(uint8_t interval) { __attribute__ ((weak)) const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; -void rgblight_effect_snake(uint8_t interval) { +void rgblight_effect_snake(animation_status_t *anim) { static uint8_t pos = 0; - static uint16_t last_timer = 0; uint8_t i, j; int8_t k; int8_t increment = 1; - if (interval % 2) { + + if (anim->delta % 2) { increment = -1; } - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_SNAKE_INTERVALS[interval / 2])) { - return; + +#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + if (anim->pos == 0) { // restart signal + if (increment == 1) { + pos = effect_num_leds - 1; + } else { + pos = 0; + } + anim->pos = 1; } - last_timer = timer_read(); - for (i = 0; i < RGBLED_NUM; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; +#endif + + for (i = 0; i < effect_num_leds; i++) { + LED_TYPE *ledp = led + i + effect_start_pos; + ledp->r = 0; + ledp->g = 0; + ledp->b = 0; for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { k = pos + j * increment; if (k < 0) { - k = k + RGBLED_NUM; + k = k + effect_num_leds; } if (i == k) { - sethsv(rgblight_config.hue, rgblight_config.sat, (uint8_t)(rgblight_config.val*(RGBLIGHT_EFFECT_SNAKE_LENGTH-j)/RGBLIGHT_EFFECT_SNAKE_LENGTH), (LED_TYPE *)&led[i]); + sethsv(rgblight_config.hue, rgblight_config.sat, + (uint8_t)(rgblight_config.val*(RGBLIGHT_EFFECT_SNAKE_LENGTH-j)/RGBLIGHT_EFFECT_SNAKE_LENGTH), + ledp); } } } rgblight_set(); if (increment == 1) { if (pos - 1 < 0) { - pos = RGBLED_NUM - 1; + pos = effect_num_leds - 1; +#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + anim->pos = 0; +#endif } else { pos -= 1; +#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + anim->pos = 1; +#endif } } else { - pos = (pos + 1) % RGBLED_NUM; + pos = (pos + 1) % effect_num_leds; +#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + anim->pos = pos; +#endif } } #endif @@ -816,27 +1023,30 @@ void rgblight_effect_snake(uint8_t interval) { __attribute__ ((weak)) const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31}; -void rgblight_effect_knight(uint8_t interval) { - static uint16_t last_timer = 0; - if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_KNIGHT_INTERVALS[interval])) { - return; - } - last_timer = timer_read(); +void rgblight_effect_knight(animation_status_t *anim) { static int8_t low_bound = 0; static int8_t high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1; static int8_t increment = 1; uint8_t i, cur; +#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + if (anim->pos == 0) { // restart signal + anim->pos = 1; + low_bound = 0; + high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1; + increment = 1; + } +#endif // Set all the LEDs to 0 - for (i = 0; i < RGBLED_NUM; i++) { + for (i = effect_start_pos; i < effect_end_pos; i++) { led[i].r = 0; led[i].g = 0; led[i].b = 0; } // Determine which LEDs should be lit up for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) { - cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % RGBLED_NUM; + cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % effect_num_leds + effect_start_pos; if (i >= low_bound && i <= high_bound) { sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]); @@ -855,24 +1065,24 @@ void rgblight_effect_knight(uint8_t interval) { if (high_bound <= 0 || low_bound >= RGBLIGHT_EFFECT_KNIGHT_LED_NUM - 1) { increment = -increment; +#if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + if (increment == 1) { + anim->pos = 0; + } +#endif } } #endif #ifdef RGBLIGHT_EFFECT_CHRISTMAS -void rgblight_effect_christmas(void) { - static uint16_t current_offset = 0; - static uint16_t last_timer = 0; - uint16_t hue; +void rgblight_effect_christmas(animation_status_t *anim) { + uint8_t hue; uint8_t i; - if (timer_elapsed(last_timer) < RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL) { - return; - } - last_timer = timer_read(); - current_offset = (current_offset + 1) % 2; - for (i = 0; i < RGBLED_NUM; i++) { - hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + current_offset) % 2) * 120; - sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); + + anim->current_offset = (anim->current_offset + 1) % 2; + for (i = 0; i < effect_num_leds; i++) { + hue = 0 + ((i/RGBLIGHT_EFFECT_CHRISTMAS_STEP + anim->current_offset) % 2) * 85; + sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + effect_start_pos]); } rgblight_set(); } @@ -882,52 +1092,40 @@ void rgblight_effect_christmas(void) { __attribute__ ((weak)) const uint16_t RGBLED_RGBTEST_INTERVALS[] PROGMEM = {1024}; -void rgblight_effect_rgbtest(void) { - static uint8_t pos = 0; - static uint16_t last_timer = 0; +void rgblight_effect_rgbtest(animation_status_t *anim) { static uint8_t maxval = 0; uint8_t g; uint8_t r; uint8_t b; - if (timer_elapsed(last_timer) < pgm_read_word(&RGBLED_RGBTEST_INTERVALS[0])) { - return; - } - if( maxval == 0 ) { LED_TYPE tmp_led; sethsv(0, 255, RGBLIGHT_LIMIT_VAL, &tmp_led); maxval = tmp_led.r; } - last_timer = timer_read(); g = r = b = 0; - switch( pos ) { + switch( anim->pos ) { case 0: r = maxval; break; case 1: g = maxval; break; case 2: b = maxval; break; } rgblight_setrgb(r, g, b); - pos = (pos + 1) % 3; + anim->pos = (anim->pos + 1) % 3; } #endif #ifdef RGBLIGHT_EFFECT_ALTERNATING -void rgblight_effect_alternating(void){ - static uint16_t last_timer = 0; - static uint16_t pos = 0; - if (timer_elapsed(last_timer) < 500) { - return; - } - last_timer = timer_read(); - - for(int i = 0; i=RGBLED_NUM/2 && !pos){ - sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i]); - }else{ - sethsv(rgblight_config.hue, rgblight_config.sat, 0, (LED_TYPE *)&led[i]); +void rgblight_effect_alternating(animation_status_t *anim) { + + for (int i = 0; i < effect_num_leds; i++) { + LED_TYPE *ledp = led + i + effect_start_pos; + if (ipos) { + sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp); + } else if (i>=effect_num_leds/2 && !anim->pos) { + sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp); + } else { + sethsv(rgblight_config.hue, rgblight_config.sat, 0, ledp); } } rgblight_set(); - pos = (pos + 1) % 2; + anim->pos = (anim->pos + 1) % 2; } #endif diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 65dda3f5215f..064522a2b00b 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -68,11 +68,11 @@ #define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_ ## sym, #define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_ ## sym, #define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_ ## sym, -#define _RGBM_TMP_STATIC(sym) RGBLIGHT_MODE_ ## sym, -#define _RGBM_TMP_DYNAMIC(sym) RGBLIGHT_MODE_ ## sym, +#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_ ## sym, +#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_ ## sym, enum RGBLIGHT_EFFECT_MODE { RGBLIGHT_MODE_zero = 0, -#include "rgblight.h" +#include "rgblight_modes.h" RGBLIGHT_MODE_last }; @@ -80,9 +80,7 @@ enum RGBLIGHT_EFFECT_MODE { #define RGBLIGHT_MODES (RGBLIGHT_MODE_last-1) -#ifndef RGBLIGHT_EFFECT_BREATHE_CENTER -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1-2.7 -#endif +// sample: #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 #ifndef RGBLIGHT_EFFECT_BREATHE_MAX #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255 @@ -101,7 +99,7 @@ enum RGBLIGHT_EFFECT_MODE { #endif #ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM -#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM (effect_num_leds) #endif #ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL @@ -113,7 +111,7 @@ enum RGBLIGHT_EFFECT_MODE { #endif #ifndef RGBLIGHT_HUE_STEP -#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_HUE_STEP 8 #endif #ifndef RGBLIGHT_SAT_STEP #define RGBLIGHT_SAT_STEP 17 @@ -121,6 +119,9 @@ enum RGBLIGHT_EFFECT_MODE { #ifndef RGBLIGHT_VAL_STEP #define RGBLIGHT_VAL_STEP 17 #endif +#ifndef RGBLIGHT_LIMIT_VAL +#define RGBLIGHT_LIMIT_VAL 255 +#endif #define RGBLED_TIMER_TOP F_CPU/(256*64) // #define RGBLED_TIMER_TOP 0xFF10 @@ -146,47 +147,102 @@ extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM; +extern bool is_rgblight_initialized; +// Should stay in sycn with rgb matrix config as we reuse eeprom storage for both (for now) typedef union { uint32_t raw; struct { bool enable :1; - uint8_t mode :6; - uint16_t hue :9; + uint8_t mode :7; + uint8_t hue :8; uint8_t sat :8; uint8_t val :8; uint8_t speed :8;//EECONFIG needs to be increased to support this }; } rgblight_config_t; -void rgblight_init(void); +typedef struct _rgblight_status_t { + uint8_t base_mode; + bool timer_enabled; +#ifdef RGBLIGHT_SPLIT + uint8_t change_flags; +#endif +} rgblight_status_t; + +/* === Utility Functions ===*/ +void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); +void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); // without RGBLIGHT_LIMIT_VAL check +void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); + +/* === Low level Functions === */ +void rgblight_set(void); +void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds); + +/* === Effects and Animations Functions === */ +/* effect range setting */ +void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds); + +/* direct operation */ +void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); +void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index); +void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end); +void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end); +void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); + +#ifndef RGBLIGHT_SPLIT +void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b); +void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b); +void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val); +void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val); +#endif + +/* effect mode change */ +void rgblight_mode(uint8_t mode); +void rgblight_mode_noeeprom(uint8_t mode); void rgblight_increase(void); void rgblight_decrease(void); +void rgblight_step(void); +void rgblight_step_noeeprom(void); +void rgblight_step_reverse(void); +void rgblight_step_reverse_noeeprom(void); + +/* effects mode disable/enable */ void rgblight_toggle(void); +void rgblight_toggle_noeeprom(void); void rgblight_enable(void); +void rgblight_enable_noeeprom(void); void rgblight_disable(void); -void rgblight_step(void); -void rgblight_step_reverse(void); -uint8_t rgblight_get_mode(void); -void rgblight_mode(uint8_t mode); -void rgblight_set(void); -void rgblight_update_dword(uint32_t dword); +void rgblight_disable_noeeprom(void); + +/* hue, sat, val change */ void rgblight_increase_hue(void); +void rgblight_increase_hue_noeeprom(void); void rgblight_decrease_hue(void); +void rgblight_decrease_hue_noeeprom(void); void rgblight_increase_sat(void); +void rgblight_increase_sat_noeeprom(void); void rgblight_decrease_sat(void); +void rgblight_decrease_sat_noeeprom(void); void rgblight_increase_val(void); +void rgblight_increase_val_noeeprom(void); void rgblight_decrease_val(void); +void rgblight_decrease_val_noeeprom(void); void rgblight_increase_speed(void); void rgblight_decrease_speed(void); -void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val); -uint16_t rgblight_get_hue(void); +void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val); +void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val); + +/* query */ +uint8_t rgblight_get_mode(void); +uint8_t rgblight_get_hue(void); uint8_t rgblight_get_sat(void); uint8_t rgblight_get_val(void); -void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); -void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); -void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index); +/* === qmk_firmware (core)internal Functions === */ +void rgblight_init(void); +uint32_t rgblight_read_dword(void); +void rgblight_update_dword(uint32_t dword); uint32_t eeconfig_read_rgblight(void); void eeconfig_update_rgblight(uint32_t val); void eeconfig_update_rgblight_default(void); @@ -195,27 +251,9 @@ void eeconfig_debug_rgblight(void); void rgb_matrix_increase(void); void rgb_matrix_decrease(void); -void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); -void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); - -void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); -void rgblight_mode_noeeprom(uint8_t mode); -void rgblight_toggle_noeeprom(void); -void rgblight_enable_noeeprom(void); -void rgblight_disable_noeeprom(void); -void rgblight_step_noeeprom(void); -void rgblight_step_reverse_noeeprom(void); -void rgblight_increase_hue_noeeprom(void); -void rgblight_decrease_hue_noeeprom(void); -void rgblight_increase_sat_noeeprom(void); -void rgblight_decrease_sat_noeeprom(void); -void rgblight_increase_val_noeeprom(void); -void rgblight_decrease_val_noeeprom(void); - -void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); +void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); - #define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); @@ -225,82 +263,52 @@ void rgblight_timer_init(void); void rgblight_timer_enable(void); void rgblight_timer_disable(void); void rgblight_timer_toggle(void); -void rgblight_effect_breathing(uint8_t interval); -void rgblight_effect_rainbow_mood(uint8_t interval); -void rgblight_effect_rainbow_swirl(uint8_t interval); -void rgblight_effect_snake(uint8_t interval); -void rgblight_effect_knight(uint8_t interval); -void rgblight_effect_christmas(void); -void rgblight_effect_rgbtest(void); -void rgblight_effect_alternating(void); -#endif // #ifndef RGBLIGHT_H_DUMMY_DEFINE -#endif // RGBLIGHT_H +#ifdef RGBLIGHT_SPLIT + #define RGBLIGHT_STATUS_CHANGE_MODE (1<<0) + #define RGBLIGHT_STATUS_CHANGE_HSVS (1<<1) + #define RGBLIGHT_STATUS_CHANGE_TIMER (1<<2) + #define RGBLIGHT_STATUS_ANIMATION_TICK (1<<3) + + typedef struct _rgblight_syncinfo_t { + rgblight_config_t config; + rgblight_status_t status; + } rgblight_syncinfo_t; + + /* for split keyboard master side */ + uint8_t rgblight_get_change_flags(void); + void rgblight_clear_change_flags(void); + void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo); + /* for split keyboard slave side */ + void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom); +#endif + +#ifdef RGBLIGHT_USE_TIMER + +typedef struct _animation_status_t { + uint16_t last_timer; + uint8_t delta; /* mode - base_mode */ + bool restart; + union { + uint16_t pos16; + uint8_t pos; + int8_t current_hue; + uint16_t current_offset; + }; +} animation_status_t; + +extern animation_status_t animation_status; + +void rgblight_effect_breathing(animation_status_t *anim); +void rgblight_effect_rainbow_mood(animation_status_t *anim); +void rgblight_effect_rainbow_swirl(animation_status_t *anim); +void rgblight_effect_snake(animation_status_t *anim); +void rgblight_effect_knight(animation_status_t *anim); +void rgblight_effect_christmas(animation_status_t *anim); +void rgblight_effect_rgbtest(animation_status_t *anim); +void rgblight_effect_alternating(animation_status_t *anim); -#ifdef _RGBM_SINGLE_STATIC - _RGBM_SINGLE_STATIC( STATIC_LIGHT ) - #ifdef RGBLIGHT_EFFECT_BREATHING - _RGBM_MULTI_DYNAMIC( BREATHING ) - _RGBM_TMP_DYNAMIC( breathing_3 ) - _RGBM_TMP_DYNAMIC( breathing_4 ) - _RGBM_TMP_DYNAMIC( BREATHING_end ) - #endif - #ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD - _RGBM_MULTI_DYNAMIC( RAINBOW_MOOD ) - _RGBM_TMP_DYNAMIC( rainbow_mood_7 ) - _RGBM_TMP_DYNAMIC( RAINBOW_MOOD_end ) - #endif - #ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - _RGBM_MULTI_DYNAMIC( RAINBOW_SWIRL ) - _RGBM_TMP_DYNAMIC( rainbow_swirl_10 ) - _RGBM_TMP_DYNAMIC( rainbow_swirl_11 ) - _RGBM_TMP_DYNAMIC( rainbow_swirl_12 ) - _RGBM_TMP_DYNAMIC( rainbow_swirl_13 ) - _RGBM_TMP_DYNAMIC( RAINBOW_SWIRL_end ) - #endif - #ifdef RGBLIGHT_EFFECT_SNAKE - _RGBM_MULTI_DYNAMIC( SNAKE ) - _RGBM_TMP_DYNAMIC( snake_16 ) - _RGBM_TMP_DYNAMIC( snake_17 ) - _RGBM_TMP_DYNAMIC( snake_18 ) - _RGBM_TMP_DYNAMIC( snake_19 ) - _RGBM_TMP_DYNAMIC( SNAKE_end ) - #endif - #ifdef RGBLIGHT_EFFECT_KNIGHT - _RGBM_MULTI_DYNAMIC( KNIGHT ) - _RGBM_TMP_DYNAMIC( knight_22 ) - _RGBM_TMP_DYNAMIC( KNIGHT_end ) - #endif - #ifdef RGBLIGHT_EFFECT_CHRISTMAS - _RGBM_SINGLE_DYNAMIC( CHRISTMAS ) - #endif - #ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT - _RGBM_MULTI_STATIC( STATIC_GRADIENT ) - _RGBM_TMP_STATIC( static_gradient_26 ) - _RGBM_TMP_STATIC( static_gradient_27 ) - _RGBM_TMP_STATIC( static_gradient_28 ) - _RGBM_TMP_STATIC( static_gradient_29 ) - _RGBM_TMP_STATIC( static_gradient_30 ) - _RGBM_TMP_STATIC( static_gradient_31 ) - _RGBM_TMP_STATIC( static_gradient_32 ) - _RGBM_TMP_STATIC( static_gradient_33 ) - _RGBM_TMP_STATIC( STATIC_GRADIENT_end ) - #endif - #ifdef RGBLIGHT_EFFECT_RGB_TEST - _RGBM_SINGLE_DYNAMIC( RGB_TEST ) - #endif - #ifdef RGBLIGHT_EFFECT_ALTERNATING - _RGBM_SINGLE_DYNAMIC( ALTERNATING ) - #endif - //// Add a new mode here. - // #ifdef RGBLIGHT_EFFECT_ - // _RGBM__( ) - // #endif #endif -#undef _RGBM_SINGLE_STATIC -#undef _RGBM_SINGLE_DYNAMIC -#undef _RGBM_MULTI_STATIC -#undef _RGBM_MULTI_DYNAMIC -#undef _RGBM_TMP_STATIC -#undef _RGBM_TMP_DYNAMIC +#endif // #ifndef RGBLIGHT_H_DUMMY_DEFINE +#endif // RGBLIGHT_H diff --git a/quantum/rgblight_breathe_table.h b/quantum/rgblight_breathe_table.h new file mode 100644 index 000000000000..7ab8cc9479ae --- /dev/null +++ b/quantum/rgblight_breathe_table.h @@ -0,0 +1,116 @@ +#ifndef RGBLIGHT_EFFECT_BREATHE_TABLE +#define RGBLIGHT_EFFECT_BREATHE_TABLE + +const uint8_t rgblight_effect_breathe_table[] PROGMEM = { + /* #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 */ + /* #define RGBLIGHT_EFFECT_BREATHE_MAX 255 */ + + #if RGBLIGHT_BREATHE_TABLE_SIZE == 256 + 0x22, 0x23, 0x25, 0x26, 0x28, 0x29, 0x2a, 0x2c, + 0x2d, 0x2f, 0x30, 0x32, 0x33, 0x35, 0x36, 0x38, + 0x3a, 0x3b, 0x3d, 0x3e, 0x40, 0x42, 0x43, 0x45, + 0x47, 0x49, 0x4a, 0x4c, 0x4e, 0x50, 0x51, 0x53, + 0x55, 0x57, 0x59, 0x5a, 0x5c, 0x5e, 0x60, 0x62, + 0x64, 0x66, 0x68, 0x69, 0x6b, 0x6d, 0x6f, 0x71, + 0x73, 0x75, 0x77, 0x79, 0x7b, 0x7d, 0x7f, 0x81, + 0x83, 0x85, 0x87, 0x89, 0x8a, 0x8c, 0x8e, 0x90, + 0x92, 0x94, 0x96, 0x98, 0x9a, 0x9c, 0x9e, 0x9f, + 0xa1, 0xa3, 0xa5, 0xa7, 0xa8, 0xaa, 0xac, 0xae, + 0xaf, 0xb1, 0xb3, 0xb4, 0xb6, 0xb8, 0xb9, 0xbb, + 0xbc, 0xbe, 0xbf, 0xc1, 0xc2, 0xc3, 0xc5, 0xc6, + 0xc7, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xd0, + 0xd1, 0xd2, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, + 0xd7, 0xd8, 0xd9, 0xd9, 0xda, 0xda, 0xdb, 0xdb, + 0xdb, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc, 0xdd, 0xdd, + 0xdd, 0xdd, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc, 0xdb, + 0xdb, 0xdb, 0xda, 0xda, 0xd9, 0xd9, 0xd8, 0xd7, + 0xd7, 0xd6, 0xd5, 0xd4, 0xd3, 0xd2, 0xd2, 0xd1, + 0xd0, 0xce, 0xcd, 0xcc, 0xcb, 0xca, 0xc9, 0xc7, + 0xc6, 0xc5, 0xc3, 0xc2, 0xc1, 0xbf, 0xbe, 0xbc, + 0xbb, 0xb9, 0xb8, 0xb6, 0xb4, 0xb3, 0xb1, 0xaf, + 0xae, 0xac, 0xaa, 0xa8, 0xa7, 0xa5, 0xa3, 0xa1, + 0x9f, 0x9e, 0x9c, 0x9a, 0x98, 0x96, 0x94, 0x92, + 0x90, 0x8e, 0x8c, 0x8a, 0x89, 0x87, 0x85, 0x83, + 0x81, 0x7f, 0x7d, 0x7b, 0x79, 0x77, 0x75, 0x73, + 0x71, 0x6f, 0x6d, 0x6b, 0x69, 0x68, 0x66, 0x64, + 0x62, 0x60, 0x5e, 0x5c, 0x5a, 0x59, 0x57, 0x55, + 0x53, 0x51, 0x50, 0x4e, 0x4c, 0x4a, 0x49, 0x47, + 0x45, 0x43, 0x42, 0x40, 0x3e, 0x3d, 0x3b, 0x3a, + 0x38, 0x36, 0x35, 0x33, 0x32, 0x30, 0x2f, 0x2d, + 0x2c, 0x2a, 0x29, 0x28, 0x26, 0x25, 0x23, 0x22 + #endif /* 256 bytes table */ + + #if RGBLIGHT_BREATHE_TABLE_SIZE == 128 + 0x22, 0x25, 0x28, 0x2a, + 0x2d, 0x30, 0x33, 0x36, + 0x3a, 0x3d, 0x40, 0x43, + 0x47, 0x4a, 0x4e, 0x51, + 0x55, 0x59, 0x5c, 0x60, + 0x64, 0x68, 0x6b, 0x6f, + 0x73, 0x77, 0x7b, 0x7f, + 0x83, 0x87, 0x8a, 0x8e, + 0x92, 0x96, 0x9a, 0x9e, + 0xa1, 0xa5, 0xa8, 0xac, + 0xaf, 0xb3, 0xb6, 0xb9, + 0xbc, 0xbf, 0xc2, 0xc5, + 0xc7, 0xca, 0xcc, 0xce, + 0xd1, 0xd2, 0xd4, 0xd6, + 0xd7, 0xd9, 0xda, 0xdb, + 0xdb, 0xdc, 0xdc, 0xdd, + 0xdd, 0xdc, 0xdc, 0xdc, + 0xdb, 0xda, 0xd9, 0xd8, + 0xd7, 0xd5, 0xd3, 0xd2, + 0xd0, 0xcd, 0xcb, 0xc9, + 0xc6, 0xc3, 0xc1, 0xbe, + 0xbb, 0xb8, 0xb4, 0xb1, + 0xae, 0xaa, 0xa7, 0xa3, + 0x9f, 0x9c, 0x98, 0x94, + 0x90, 0x8c, 0x89, 0x85, + 0x81, 0x7d, 0x79, 0x75, + 0x71, 0x6d, 0x69, 0x66, + 0x62, 0x5e, 0x5a, 0x57, + 0x53, 0x50, 0x4c, 0x49, + 0x45, 0x42, 0x3e, 0x3b, + 0x38, 0x35, 0x32, 0x2f, + 0x2c, 0x29, 0x26, 0x23 + #endif /* 128 bytes table */ + + #if RGBLIGHT_BREATHE_TABLE_SIZE == 64 + 0x22, 0x28, + 0x2d, 0x33, + 0x3a, 0x40, + 0x47, 0x4e, + 0x55, 0x5c, + 0x64, 0x6b, + 0x73, 0x7b, + 0x83, 0x8a, + 0x92, 0x9a, + 0xa1, 0xa8, + 0xaf, 0xb6, + 0xbc, 0xc2, + 0xc7, 0xcc, + 0xd1, 0xd4, + 0xd7, 0xda, + 0xdb, 0xdc, + 0xdd, 0xdc, + 0xdb, 0xd9, + 0xd7, 0xd3, + 0xd0, 0xcb, + 0xc6, 0xc1, + 0xbb, 0xb4, + 0xae, 0xa7, + 0x9f, 0x98, + 0x90, 0x89, + 0x81, 0x79, + 0x71, 0x69, + 0x62, 0x5a, + 0x53, 0x4c, + 0x45, 0x3e, + 0x38, 0x32, + 0x2c, 0x26 + #endif /* 64 bytes table */ +}; + +static const int table_scale = 256/sizeof(rgblight_effect_breathe_table); + +#endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */ diff --git a/quantum/rgblight_list.h b/quantum/rgblight_list.h index 407fd8e9d31e..702e33e76542 100644 --- a/quantum/rgblight_list.h +++ b/quantum/rgblight_list.h @@ -13,111 +13,163 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef RGBLIGHT_LIST_H -#define RGBLIGHT_LIST_H +#pragma once + +/* RGB COLORS */ +#define RGB_WHITE 0xFF, 0xFF, 0xFF +#define RGB_RED 0xFF, 0x00, 0x00 +#define RGB_CORAL 0xFF, 0x7C, 0x4D +#define RGB_ORANGE 0xFF, 0x80, 0x00 +#define RGB_GOLDENROD 0xD9, 0xA5, 0x21 +#define RGB_GOLD 0xFF, 0xD9, 0x00 +#define RGB_YELLOW 0xFF, 0xFF, 0x00 +#define RGB_CHARTREUSE 0x80, 0xFF, 0x00 +#define RGB_GREEN 0x00, 0xFF, 0x00 +#define RGB_SPRINGGREEN 0x00, 0xFF, 0x80 +#define RGB_TURQUOISE 0x47, 0x6E, 0x6A +#define RGB_TEAL 0x00, 0x80, 0x80 +#define RGB_CYAN 0x00, 0xFF, 0xFF +#define RGB_AZURE 0x99, 0xf5, 0xFF +#define RGB_BLUE 0x00, 0x00, 0xFF +#define RGB_PURPLE 0x7A, 0x00, 0xFF +#define RGB_MAGENTA 0xFF, 0x00, 0xFF +#define RGB_PINK 0xFF, 0x80, 0xBF + +/* HSV COLORS */ +#define HSV_WHITE 0, 0, 255 +#define HSV_RED 0, 255, 255 +#define HSV_CORAL 11, 176, 255 +#define HSV_ORANGE 28, 255, 255 +#define HSV_GOLDENROD 30, 218, 218 +#define HSV_GOLD 36, 255, 255 +#define HSV_YELLOW 43, 255, 255 +#define HSV_CHARTREUSE 64, 255, 255 +#define HSV_GREEN 85, 255, 255 +#define HSV_SPRINGGREEN 106, 255, 255 +#define HSV_TURQUOISE 123, 90, 112 +#define HSV_TEAL 128, 255, 128 +#define HSV_CYAN 128, 255, 255 +#define HSV_AZURE 132, 102, 255 +#define HSV_BLUE 170, 255, 255 +#define HSV_PURPLE 191, 255, 255 +#define HSV_MAGENTA 213, 255, 255 +#define HSV_PINK 234, 128, 255 + + +/* +######################################################################################## +## ## +## ## +## ## +## The functions below have been deprecated and may be removed in a future release. ## +## ## +## Please use the values above with the RGB functions. ## +## ## +## ## +## ## +######################################################################################## +*/ /* SET RGB List */ -#define rgblight_setrgb_white() rgblight_setrgb (0xFF, 0xFF, 0xFF) -#define rgblight_setrgb_red() rgblight_setrgb (0xFF, 0x00, 0x00) -#define rgblight_setrgb_coral() rgblight_setrgb (0xFF, 0x7C, 0x4D) -#define rgblight_setrgb_orange() rgblight_setrgb (0xFF, 0x80, 0x00) -#define rgblight_setrgb_goldenrod() rgblight_setrgb (0xD9, 0xA5, 0x21) -#define rgblight_setrgb_gold() rgblight_setrgb (0xFF, 0xD9, 0x00) -#define rgblight_setrgb_yellow() rgblight_setrgb (0xFF, 0xFF, 0x00) -#define rgblight_setrgb_chartreuse() rgblight_setrgb (0x80, 0xFF, 0x00) -#define rgblight_setrgb_green() rgblight_setrgb (0x00, 0xFF, 0x00) -#define rgblight_setrgb_springgreen() rgblight_setrgb (0x00, 0xFF, 0x80) -#define rgblight_setrgb_turquoise() rgblight_setrgb (0x47, 0x6E, 0x6A) -#define rgblight_setrgb_teal() rgblight_setrgb (0x00, 0x80, 0x80) -#define rgblight_setrgb_cyan() rgblight_setrgb (0x00, 0xFF, 0xFF) -#define rgblight_setrgb_azure() rgblight_setrgb (0x99, 0xf5, 0xFF) -#define rgblight_setrgb_blue() rgblight_setrgb (0x00, 0x00, 0xFF) -#define rgblight_setrgb_purple() rgblight_setrgb (0x7A, 0x00, 0xFF) -#define rgblight_setrgb_magenta() rgblight_setrgb (0xFF, 0x00, 0xFF) -#define rgblight_setrgb_pink() rgblight_setrgb (0xFF, 0x80, 0xBF) +#define rgblight_setrgb_white() rgblight_setrgb (RGB_WHITE) +#define rgblight_setrgb_red() rgblight_setrgb (RGB_RED) +#define rgblight_setrgb_coral() rgblight_setrgb (RGB_CORAL) +#define rgblight_setrgb_orange() rgblight_setrgb (RGB_ORANGE) +#define rgblight_setrgb_goldenrod() rgblight_setrgb (RGB_GOLDENROD) +#define rgblight_setrgb_gold() rgblight_setrgb (RGB_GOLD) +#define rgblight_setrgb_yellow() rgblight_setrgb (RGB_YELLOW) +#define rgblight_setrgb_chartreuse() rgblight_setrgb (RGB_CHARTREUSE) +#define rgblight_setrgb_green() rgblight_setrgb (RGB_GREEN) +#define rgblight_setrgb_springgreen() rgblight_setrgb (RGB_SPRINGGREEN) +#define rgblight_setrgb_turquoise() rgblight_setrgb (RGB_TURQUOISE) +#define rgblight_setrgb_teal() rgblight_setrgb (RGB_TEAL) +#define rgblight_setrgb_cyan() rgblight_setrgb (RGB_CYAN) +#define rgblight_setrgb_azure() rgblight_setrgb (RGB_AZURE) +#define rgblight_setrgb_blue() rgblight_setrgb (RGB_BLUE) +#define rgblight_setrgb_purple() rgblight_setrgb (RGB_PURPLE) +#define rgblight_setrgb_magenta() rgblight_setrgb (RGB_MAGENTA) +#define rgblight_setrgb_pink() rgblight_setrgb (RGB_PINK) /* SET RGB List */ -#define rgblight_setrgb_white_at(at) rgblight_setrgb_at (0xFF, 0xFF, 0xFF, at) -#define rgblight_setrgb_red_at(at) rgblight_setrgb_at (0xFF, 0x00, 0x00, at) -#define rgblight_setrgb_coral_at(at) rgblight_setrgb_at (0xFF, 0x7C, 0x4D, at) -#define rgblight_setrgb_orange_at(at) rgblight_setrgb_at (0xFF, 0x80, 0x00, at) -#define rgblight_setrgb_goldenrod_at(at) rgblight_setrgb_at (0xD9, 0xA5, 0x21, at) -#define rgblight_setrgb_gold_at(at) rgblight_setrgb_at (0xFF, 0xD9, 0x00, at) -#define rgblight_setrgb_yellow_at(at) rgblight_setrgb_at (0xFF, 0xFF, 0x00, at) -#define rgblight_setrgb_chartreuse_at(at) rgblight_setrgb_at (0x80, 0xFF, 0x00, at) -#define rgblight_setrgb_green_at(at) rgblight_setrgb_at (0x00, 0xFF, 0x00, at) -#define rgblight_setrgb_springgreen_at(at) rgblight_setrgb_at (0x00, 0xFF, 0x80, at) -#define rgblight_setrgb_turquoise_at(at) rgblight_setrgb_at (0x47, 0x6E, 0x6A, at) -#define rgblight_setrgb_teal_at(at) rgblight_setrgb_at (0x00, 0x80, 0x80, at) -#define rgblight_setrgb_cyan_at(at) rgblight_setrgb_at (0x00, 0xFF, 0xFF, at) -#define rgblight_setrgb_azure_at(at) rgblight_setrgb_at (0x99, 0xf5, 0xFF, at) -#define rgblight_setrgb_blue_at(at) rgblight_setrgb_at (0x00, 0x00, 0xFF, at) -#define rgblight_setrgb_purple_at(at) rgblight_setrgb_at (0x7A, 0x00, 0xFF, at) -#define rgblight_setrgb_magenta_at(at) rgblight_setrgb_at (0xFF, 0x00, 0xFF, at) -#define rgblight_setrgb_pink_at(at) rgblight_setrgb_at (0xFF, 0x80, 0xBF, at) +#define rgblight_setrgb_white_at(at) rgblight_setrgb_at (RGB_WHITE, at) +#define rgblight_setrgb_red_at(at) rgblight_setrgb_at (RGB_RED, at) +#define rgblight_setrgb_coral_at(at) rgblight_setrgb_at (RGB_CORAL, at) +#define rgblight_setrgb_orange_at(at) rgblight_setrgb_at (RGB_ORANGE at) +#define rgblight_setrgb_goldenrod_at(at) rgblight_setrgb_at (RGB_GOLDENROD, at) +#define rgblight_setrgb_gold_at(at) rgblight_setrgb_at (RGB_GOLD, at) +#define rgblight_setrgb_yellow_at(at) rgblight_setrgb_at (RGB_YELLOW, at) +#define rgblight_setrgb_chartreuse_at(at) rgblight_setrgb_at (RGB_CHARTREUSE, at) +#define rgblight_setrgb_green_at(at) rgblight_setrgb_at (RGB_GREEN, at) +#define rgblight_setrgb_springgreen_at(at) rgblight_setrgb_at (RGB_SPRINGGREEN, at) +#define rgblight_setrgb_turquoise_at(at) rgblight_setrgb_at (RGB_TURQUOISE, at) +#define rgblight_setrgb_teal_at(at) rgblight_setrgb_at (RGB_TEAL, at) +#define rgblight_setrgb_cyan_at(at) rgblight_setrgb_at (RGB_CYAN, at) +#define rgblight_setrgb_azure_at(at) rgblight_setrgb_at (RGB_AZURE, at) +#define rgblight_setrgb_blue_at(at) rgblight_setrgb_at (RGB_BLUE, at) +#define rgblight_setrgb_purple_at(at) rgblight_setrgb_at (RGB_PURPLE, at) +#define rgblight_setrgb_magenta_at(at) rgblight_setrgb_at (RGB_MAGENTA, at) +#define rgblight_setrgb_pink_at(at) rgblight_setrgb_at (RGB_PINK, at) /* SET HSV List */ -#define rgblight_sethsv_white() rgblight_sethsv ( 0, 0, 255) -#define rgblight_sethsv_red() rgblight_sethsv ( 0, 255, 255) -#define rgblight_sethsv_coral() rgblight_sethsv ( 16, 176, 255) -#define rgblight_sethsv_orange() rgblight_sethsv ( 39, 255, 255) -#define rgblight_sethsv_goldenrod() rgblight_sethsv ( 43, 218, 218) -#define rgblight_sethsv_gold() rgblight_sethsv ( 51, 255, 255) -#define rgblight_sethsv_yellow() rgblight_sethsv ( 60, 255, 255) -#define rgblight_sethsv_chartreuse() rgblight_sethsv ( 90, 255, 255) -#define rgblight_sethsv_green() rgblight_sethsv (120, 255, 255) -#define rgblight_sethsv_springgreen() rgblight_sethsv (150, 255, 255) -#define rgblight_sethsv_turquoise() rgblight_sethsv (174, 90, 112) -#define rgblight_sethsv_teal() rgblight_sethsv (180, 255, 128) -#define rgblight_sethsv_cyan() rgblight_sethsv (180, 255, 255) -#define rgblight_sethsv_azure() rgblight_sethsv (186, 102, 255) -#define rgblight_sethsv_blue() rgblight_sethsv (240, 255, 255) -#define rgblight_sethsv_purple() rgblight_sethsv (270, 255, 255) -#define rgblight_sethsv_magenta() rgblight_sethsv (300, 255, 255) -#define rgblight_sethsv_pink() rgblight_sethsv (330, 128, 255) +#define rgblight_sethsv_white() rgblight_sethsv (HSV_WHITE) +#define rgblight_sethsv_red() rgblight_sethsv (HSV_RED) +#define rgblight_sethsv_coral() rgblight_sethsv (HSV_CORAL) +#define rgblight_sethsv_orange() rgblight_sethsv (HSV_ORANGE) +#define rgblight_sethsv_goldenrod() rgblight_sethsv (HSV_GOLDENROD) +#define rgblight_sethsv_gold() rgblight_sethsv (HSV_GOLD) +#define rgblight_sethsv_yellow() rgblight_sethsv (HSV_YELLOW) +#define rgblight_sethsv_chartreuse() rgblight_sethsv (HSV_CHARTREUSE) +#define rgblight_sethsv_green() rgblight_sethsv (HSV_GREEN) +#define rgblight_sethsv_springgreen() rgblight_sethsv (HSV_SPRINGGREEN) +#define rgblight_sethsv_turquoise() rgblight_sethsv (HSV_TURQUOISE) +#define rgblight_sethsv_teal() rgblight_sethsv (HSV_TEAL) +#define rgblight_sethsv_cyan() rgblight_sethsv (HSV_CYAN) +#define rgblight_sethsv_azure() rgblight_sethsv (HSV_AZURE) +#define rgblight_sethsv_blue() rgblight_sethsv (HSV_BLUE) +#define rgblight_sethsv_purple() rgblight_sethsv (HSV_PURPLE) +#define rgblight_sethsv_magenta() rgblight_sethsv (HSV_MAGENTA) +#define rgblight_sethsv_pink() rgblight_sethsv (HSV_PINK) /* SET HSV List */ /* If you're doing layer indication, this is best, as it won't */ /* write to the eeprom, since it's limited (very high value). */ /* If you want to use modes with this (since you can), then you */ /* want to use rgblight_mode_noeeprom(x) instead. */ -#define rgblight_sethsv_noeeprom_white() rgblight_sethsv_noeeprom ( 0, 0, 255) -#define rgblight_sethsv_noeeprom_red() rgblight_sethsv_noeeprom ( 0, 255, 255) -#define rgblight_sethsv_noeeprom_coral() rgblight_sethsv_noeeprom ( 16, 176, 255) -#define rgblight_sethsv_noeeprom_orange() rgblight_sethsv_noeeprom ( 39, 255, 255) -#define rgblight_sethsv_noeeprom_goldenrod() rgblight_sethsv_noeeprom ( 43, 218, 218) -#define rgblight_sethsv_noeeprom_gold() rgblight_sethsv_noeeprom ( 51, 255, 255) -#define rgblight_sethsv_noeeprom_yellow() rgblight_sethsv_noeeprom ( 60, 255, 255) -#define rgblight_sethsv_noeeprom_chartreuse() rgblight_sethsv_noeeprom ( 90, 255, 255) -#define rgblight_sethsv_noeeprom_green() rgblight_sethsv_noeeprom (120, 255, 255) -#define rgblight_sethsv_noeeprom_springgreen() rgblight_sethsv_noeeprom (150, 255, 255) -#define rgblight_sethsv_noeeprom_turquoise() rgblight_sethsv_noeeprom (174, 90, 112) -#define rgblight_sethsv_noeeprom_teal() rgblight_sethsv_noeeprom (180, 255, 128) -#define rgblight_sethsv_noeeprom_cyan() rgblight_sethsv_noeeprom (180, 255, 255) -#define rgblight_sethsv_noeeprom_azure() rgblight_sethsv_noeeprom (186, 102, 255) -#define rgblight_sethsv_noeeprom_blue() rgblight_sethsv_noeeprom (240, 255, 255) -#define rgblight_sethsv_noeeprom_purple() rgblight_sethsv_noeeprom (270, 255, 255) -#define rgblight_sethsv_noeeprom_magenta() rgblight_sethsv_noeeprom (300, 255, 255) -#define rgblight_sethsv_noeeprom_pink() rgblight_sethsv_noeeprom (330, 128, 255) +#define rgblight_sethsv_noeeprom_white() rgblight_sethsv_noeeprom (HSV_WHITE) +#define rgblight_sethsv_noeeprom_red() rgblight_sethsv_noeeprom (HSV_RED) +#define rgblight_sethsv_noeeprom_coral() rgblight_sethsv_noeeprom (HSV_CORAL) +#define rgblight_sethsv_noeeprom_orange() rgblight_sethsv_noeeprom (HSV_ORANGE) +#define rgblight_sethsv_noeeprom_goldenrod() rgblight_sethsv_noeeprom (HSV_GOLDENROD) +#define rgblight_sethsv_noeeprom_gold() rgblight_sethsv_noeeprom (HSV_GOLD) +#define rgblight_sethsv_noeeprom_yellow() rgblight_sethsv_noeeprom (HSV_YELLOW) +#define rgblight_sethsv_noeeprom_chartreuse() rgblight_sethsv_noeeprom (HSV_CHARTREUSE) +#define rgblight_sethsv_noeeprom_green() rgblight_sethsv_noeeprom (HSV_GREEN) +#define rgblight_sethsv_noeeprom_springgreen() rgblight_sethsv_noeeprom (HSV_SPRINGGREEN) +#define rgblight_sethsv_noeeprom_turquoise() rgblight_sethsv_noeeprom (HSV_TURQUOISE) +#define rgblight_sethsv_noeeprom_teal() rgblight_sethsv_noeeprom (HSV_TEAL) +#define rgblight_sethsv_noeeprom_cyan() rgblight_sethsv_noeeprom (HSV_CYAN) +#define rgblight_sethsv_noeeprom_azure() rgblight_sethsv_noeeprom (HSV_AZURE) +#define rgblight_sethsv_noeeprom_blue() rgblight_sethsv_noeeprom (HSV_BLUE) +#define rgblight_sethsv_noeeprom_purple() rgblight_sethsv_noeeprom (HSV_PURPLE) +#define rgblight_sethsv_noeeprom_magenta() rgblight_sethsv_noeeprom (HSV_MAGENTA) +#define rgblight_sethsv_noeeprom_pink() rgblight_sethsv_noeeprom (HSV_PINK) /* SET HSV List */ -#define rgblight_sethsv_white_at(at) rgblight_sethsv_at ( 0, 0, 255, at) -#define rgblight_sethsv_red_at(at) rgblight_sethsv_at ( 0, 255, 255, at) -#define rgblight_sethsv_coral_at(at) rgblight_sethsv_at ( 16, 176, 255, at) -#define rgblight_sethsv_orange_at(at) rgblight_sethsv_at ( 39, 255, 255, at) -#define rgblight_sethsv_goldenrod_at(at) rgblight_sethsv_at ( 43, 218, 218, at) -#define rgblight_sethsv_gold_at(at) rgblight_sethsv_at ( 51, 255, 255, at) -#define rgblight_sethsv_yellow_at(at) rgblight_sethsv_at ( 60, 255, 255, at) -#define rgblight_sethsv_chartreuse_at(at) rgblight_sethsv_at ( 90, 255, 255, at) -#define rgblight_sethsv_green_at(at) rgblight_sethsv_at (120, 255, 255, at) -#define rgblight_sethsv_springgreen_at(at) rgblight_sethsv_at (150, 255, 255, at) -#define rgblight_sethsv_turquoise_at(at) rgblight_sethsv_at (174, 90, 112, at) -#define rgblight_sethsv_teal_at(at) rgblight_sethsv_at (180, 255, 128, at) -#define rgblight_sethsv_cyan_at(at) rgblight_sethsv_at (180, 255, 255, at) -#define rgblight_sethsv_azure_at(at) rgblight_sethsv_at (186, 102, 255, at) -#define rgblight_sethsv_blue_at(at) rgblight_sethsv_at (240, 255, 255, at) -#define rgblight_sethsv_purple_at(at) rgblight_sethsv_at (270, 255, 255, at) -#define rgblight_sethsv_magenta_at(at) rgblight_sethsv_at (300, 255, 255, at) -#define rgblight_sethsv_pink_at(at) rgblight_sethsv_at (330, 128, 255, at) - -#endif +#define rgblight_sethsv_white_at(at) rgblight_sethsv_at (HSV_WHITE, at) +#define rgblight_sethsv_red_at(at) rgblight_sethsv_at (HSV_RED, at) +#define rgblight_sethsv_coral_at(at) rgblight_sethsv_at (HSV_CORAL, at) +#define rgblight_sethsv_orange_at(at) rgblight_sethsv_at (HSV_ORANGE, at) +#define rgblight_sethsv_goldenrod_at(at) rgblight_sethsv_at (HSV_GOLDENROD, at) +#define rgblight_sethsv_gold_at(at) rgblight_sethsv_at (HSV_GOLD, at) +#define rgblight_sethsv_yellow_at(at) rgblight_sethsv_at (HSV_YELLOW, at) +#define rgblight_sethsv_chartreuse_at(at) rgblight_sethsv_at (HSV_CHARTREUSE, at) +#define rgblight_sethsv_green_at(at) rgblight_sethsv_at (HSV_GREEN, at) +#define rgblight_sethsv_springgreen_at(at) rgblight_sethsv_at (HSV_SPRINGGREEN, at) +#define rgblight_sethsv_turquoise_at(at) rgblight_sethsv_at (HSV_TURQUOISE, at) +#define rgblight_sethsv_teal_at(at) rgblight_sethsv_at (HSV_TEAL, at) +#define rgblight_sethsv_cyan_at(at) rgblight_sethsv_at (HSV_CYAN, at) +#define rgblight_sethsv_azure_at(at) rgblight_sethsv_at (HSV_AZURE, at) +#define rgblight_sethsv_blue_at(at) rgblight_sethsv_at (HSV_BLUE, at) +#define rgblight_sethsv_purple_at(at) rgblight_sethsv_at (HSV_PURPLE, at) +#define rgblight_sethsv_magenta_at(at) rgblight_sethsv_at (HSV_MAGENTA, at) +#define rgblight_sethsv_pink_at(at) rgblight_sethsv_at (HSV_PINK, at) diff --git a/quantum/rgblight_modes.h b/quantum/rgblight_modes.h new file mode 100644 index 000000000000..8a8f9bdda97e --- /dev/null +++ b/quantum/rgblight_modes.h @@ -0,0 +1,67 @@ +#ifdef _RGBM_SINGLE_STATIC + _RGBM_SINGLE_STATIC( STATIC_LIGHT ) + #ifdef RGBLIGHT_EFFECT_BREATHING + _RGBM_MULTI_DYNAMIC( BREATHING ) + _RGBM_TMP_DYNAMIC( breathing_3, BREATHING ) + _RGBM_TMP_DYNAMIC( breathing_4, BREATHING ) + _RGBM_TMP_DYNAMIC( BREATHING_end, BREATHING ) + #endif + #ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD + _RGBM_MULTI_DYNAMIC( RAINBOW_MOOD ) + _RGBM_TMP_DYNAMIC( rainbow_mood_7, RAINBOW_MOOD ) + _RGBM_TMP_DYNAMIC( RAINBOW_MOOD_end, RAINBOW_MOOD ) + #endif + #ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL + _RGBM_MULTI_DYNAMIC( RAINBOW_SWIRL ) + _RGBM_TMP_DYNAMIC( rainbow_swirl_10, RAINBOW_SWIRL ) + _RGBM_TMP_DYNAMIC( rainbow_swirl_11, RAINBOW_SWIRL ) + _RGBM_TMP_DYNAMIC( rainbow_swirl_12, RAINBOW_SWIRL ) + _RGBM_TMP_DYNAMIC( rainbow_swirl_13, RAINBOW_SWIRL ) + _RGBM_TMP_DYNAMIC( RAINBOW_SWIRL_end, RAINBOW_SWIRL ) + #endif + #ifdef RGBLIGHT_EFFECT_SNAKE + _RGBM_MULTI_DYNAMIC( SNAKE ) + _RGBM_TMP_DYNAMIC( snake_16, SNAKE ) + _RGBM_TMP_DYNAMIC( snake_17, SNAKE ) + _RGBM_TMP_DYNAMIC( snake_18, SNAKE ) + _RGBM_TMP_DYNAMIC( snake_19, SNAKE ) + _RGBM_TMP_DYNAMIC( SNAKE_end, SNAKE ) + #endif + #ifdef RGBLIGHT_EFFECT_KNIGHT + _RGBM_MULTI_DYNAMIC( KNIGHT ) + _RGBM_TMP_DYNAMIC( knight_22, KNIGHT ) + _RGBM_TMP_DYNAMIC( KNIGHT_end, KNIGHT ) + #endif + #ifdef RGBLIGHT_EFFECT_CHRISTMAS + _RGBM_SINGLE_DYNAMIC( CHRISTMAS ) + #endif + #ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT + _RGBM_MULTI_STATIC( STATIC_GRADIENT ) + _RGBM_TMP_STATIC( static_gradient_26, STATIC_GRADIENT ) + _RGBM_TMP_STATIC( static_gradient_27, STATIC_GRADIENT ) + _RGBM_TMP_STATIC( static_gradient_28, STATIC_GRADIENT ) + _RGBM_TMP_STATIC( static_gradient_29, STATIC_GRADIENT ) + _RGBM_TMP_STATIC( static_gradient_30, STATIC_GRADIENT ) + _RGBM_TMP_STATIC( static_gradient_31, STATIC_GRADIENT ) + _RGBM_TMP_STATIC( static_gradient_32, STATIC_GRADIENT ) + _RGBM_TMP_STATIC( static_gradient_33, STATIC_GRADIENT ) + _RGBM_TMP_STATIC( STATIC_GRADIENT_end, STATIC_GRADIENT ) + #endif + #ifdef RGBLIGHT_EFFECT_RGB_TEST + _RGBM_SINGLE_DYNAMIC( RGB_TEST ) + #endif + #ifdef RGBLIGHT_EFFECT_ALTERNATING + _RGBM_SINGLE_DYNAMIC( ALTERNATING ) + #endif + //// Add a new mode here. + // #ifdef RGBLIGHT_EFFECT_ + // _RGBM__( ) + // #endif +#endif + +#undef _RGBM_SINGLE_STATIC +#undef _RGBM_SINGLE_DYNAMIC +#undef _RGBM_MULTI_STATIC +#undef _RGBM_MULTI_DYNAMIC +#undef _RGBM_TMP_STATIC +#undef _RGBM_TMP_DYNAMIC diff --git a/quantum/rgblight_post_config.h b/quantum/rgblight_post_config.h new file mode 100644 index 000000000000..048746c4b7dc --- /dev/null +++ b/quantum/rgblight_post_config.h @@ -0,0 +1,5 @@ +#if defined(RGBLED_SPLIT) && !defined(RGBLIGHT_SPLIT) + // When RGBLED_SPLIT is defined, + // it is considered that RGBLIGHT_SPLIT is defined implicitly. + #define RGBLIGHT_SPLIT +#endif diff --git a/quantum/split_common/i2c.c b/quantum/split_common/i2c.c deleted file mode 100644 index 45e958b39560..000000000000 --- a/quantum/split_common/i2c.c +++ /dev/null @@ -1,184 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" -#include "split_flags.h" - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - - if ( slave_buffer_pos == I2C_BACKLIT_START) { - BACKLIT_DIRTY = true; - } else if ( slave_buffer_pos == (I2C_RGB_START+3)) { - RGB_DIRTY = true; - } - - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -// Address location defines (Keymap should be last, as it's size is dynamic) -#define I2C_BACKLIT_START 0x00 -// Need 4 bytes for RGB (32 bit) -#define I2C_RGB_START 0x01 -#define I2C_KEYMAP_START 0x06 - -// Slave buffer (8bit per) -// Rows per hand + backlit space + rgb space -// TODO : Make this dynamically sized -#define SLAVE_BUFFER_SIZE 0x20 - -// i2c SCL clock frequency -#ifndef SCL_CLOCK -#define SCL_CLOCK 100000L -#endif - -// Support 8bits right now (8 cols) will need to edit to take higher (code exists in delta split?) -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_write_data(void *const TXdata, uint8_t dataLen); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index c3d2857ed50b..3c3daf3d3b5e 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -25,11 +25,14 @@ along with this program. If not, see . #include "matrix.h" #include "split_util.h" #include "config.h" -#include "split_flags.h" #include "quantum.h" #include "debounce.h" #include "transport.h" +#ifdef ENCODER_ENABLE + #include "encoder.h" +#endif + #if (MATRIX_COLS <= 8) # define print_matrix_header() print("\nr/c 01234567\n") # define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) @@ -143,8 +146,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) #elif (DIODE_DIRECTION == COL2ROW) static void select_row(uint8_t row) { - writePinLow(row_pins[row]); setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); } static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } @@ -188,8 +191,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) #elif (DIODE_DIRECTION == ROW2COL) static void select_col(uint8_t col) { - writePinLow(col_pins[col]); setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); } static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); } @@ -296,7 +299,7 @@ uint8_t _matrix_scan(void) { debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); - return 1; + return (uint8_t)changed; } uint8_t matrix_scan(void) { @@ -321,6 +324,9 @@ uint8_t matrix_scan(void) { matrix_scan_quantum(); } else { transport_slave(matrix + thisHand); +#ifdef ENCODER_ENABLE + encoder_read(); +#endif matrix_slave_scan_user(); } diff --git a/quantum/split_common/post_config.h b/quantum/split_common/post_config.h new file mode 100644 index 000000000000..0e59df3d06d9 --- /dev/null +++ b/quantum/split_common/post_config.h @@ -0,0 +1,15 @@ +#if defined(USE_I2C) || defined(EH) + // When using I2C, using rgblight implicitly involves split support. + #if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_SPLIT) + #define RGBLIGHT_SPLIT + #endif + +#else // use serial + // When using serial, the user must define RGBLIGHT_SPLIT explicitly + // in config.h as needed. + // see quantum/rgblight_post_config.h + #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + // When using serial and RGBLIGHT_SPLIT need separate transaction + #define SERIAL_USE_MULTI_TRANSACTION + #endif +#endif diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 5095cb8fdce1..09a307b8ed73 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -3,7 +3,6 @@ #include "keyboard.h" #include "config.h" #include "timer.h" -#include "split_flags.h" #include "transport.h" #include "quantum.h" @@ -12,25 +11,25 @@ # include "eeconfig.h" #endif +#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) +#include "rgblight.h" +#endif + volatile bool isLeftHand = true; __attribute__((weak)) bool is_keyboard_left(void) { - #ifdef SPLIT_HAND_PIN + #if defined(SPLIT_HAND_PIN) // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand setPinInput(SPLIT_HAND_PIN); return readPin(SPLIT_HAND_PIN); - #else - #ifdef EE_HANDS - return eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - #ifdef MASTER_RIGHT - return !is_keyboard_master(); - #else - return is_keyboard_master(); - #endif - #endif + #elif defined(EE_HANDS) + return eeprom_read_byte(EECONFIG_HANDEDNESS); + #elif defined(MASTER_RIGHT) + return !is_keyboard_master(); #endif + + return is_keyboard_master(); } bool is_keyboard_master(void) @@ -60,10 +59,6 @@ static void keyboard_master_setup(void) { #endif #endif transport_master_init(); - - // For master the Backlight info needs to be sent on startup - // Otherwise the salve won't start with the proper info until an update - BACKLIT_DIRTY = true; } static void keyboard_slave_setup(void) @@ -76,6 +71,16 @@ void matrix_setup(void) { isLeftHand = is_keyboard_left(); +#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) + uint8_t num_rgb_leds_split[2] = RGBLED_SPLIT; + if (isLeftHand) { + rgblight_set_clipping_range(0, num_rgb_leds_split[0]); + } + else { + rgblight_set_clipping_range(num_rgb_leds_split[0], num_rgb_leds_split[1]); + } +#endif + if (is_keyboard_master()) { keyboard_master_setup(); diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index 95738530ecf4..a3539576f510 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c @@ -1,223 +1,250 @@ +#include +#include #include "config.h" #include "matrix.h" #include "quantum.h" -#define ROWS_PER_HAND (MATRIX_ROWS/2) +#define ROWS_PER_HAND (MATRIX_ROWS / 2) #ifdef RGBLIGHT_ENABLE -# include "rgblight.h" +# include "rgblight.h" #endif #ifdef BACKLIGHT_ENABLE -# include "backlight.h" - extern backlight_config_t backlight_config; +# include "backlight.h" +#endif + +#ifdef ENCODER_ENABLE +# include "encoder.h" #endif #if defined(USE_I2C) || defined(EH) -#include "i2c.h" +# include "i2c_master.h" +# include "i2c_slave.h" -#ifndef SLAVE_I2C_ADDRESS -# define SLAVE_I2C_ADDRESS 0x32 +typedef struct _I2C_slave_buffer_t { + matrix_row_t smatrix[ROWS_PER_HAND]; + uint8_t backlight_level; +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + rgblight_syncinfo_t rgblight_sync; #endif - -#if (MATRIX_COLS > 8) -# error "Currently only supports 8 COLS" +#ifdef ENCODER_ENABLE + uint8_t encoder_state[NUMBER_OF_ENCODERS]; #endif +} I2C_slave_buffer_t; -// Get rows from other half over i2c -bool transport_master(matrix_row_t matrix[]) { - int err = 0; +static I2C_slave_buffer_t * const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg; - // write backlight info -#ifdef BACKLIGHT_ENABLE - if (BACKLIT_DIRTY) { - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) { goto i2c_error; } +# define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level) +# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync) +# define I2C_KEYMAP_START offsetof(I2C_slave_buffer_t, smatrix) +# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state) - // Backlight location - err = i2c_master_write(I2C_BACKLIT_START); - if (err) { goto i2c_error; } +# define TIMEOUT 100 - // Write backlight - i2c_master_write(get_backlight_level()); +# ifndef SLAVE_I2C_ADDRESS +# define SLAVE_I2C_ADDRESS 0x32 +# endif - BACKLIT_DIRTY = false; - } -#endif - - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) { goto i2c_error; } - - // start of matrix stored at I2C_KEYMAP_START - err = i2c_master_write(I2C_KEYMAP_START); - if (err) { goto i2c_error; } - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) { goto i2c_error; } +// Get rows from other half over i2c +bool transport_master(matrix_row_t matrix[]) { + i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_START, (void *)matrix, sizeof(i2c_buffer->smatrix), TIMEOUT); - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[i] = i2c_master_read(I2C_ACK); + // write backlight info +# ifdef BACKLIGHT_ENABLE + uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0; + if (level != i2c_buffer->backlight_level) { + if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) { + i2c_buffer->backlight_level = level; } - matrix[i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return false; } - -#ifdef RGBLIGHT_ENABLE - if (RGB_DIRTY) { - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) { goto i2c_error; } - - // RGB Location - err = i2c_master_write(I2C_RGB_START); - if (err) { goto i2c_error; } - - uint32_t dword = eeconfig_read_rgblight(); - - // Write RGB - err = i2c_master_write_data(&dword, 4); - if (err) { goto i2c_error; } - - RGB_DIRTY = false; - i2c_master_stop(); +# endif + +# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + if (rgblight_get_change_flags()) { + rgblight_syncinfo_t rgblight_sync; + rgblight_get_syncinfo(&rgblight_sync); + if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, + (void *)&rgblight_sync, sizeof(rgblight_sync), TIMEOUT) >= 0) { + rgblight_clear_change_flags(); + } } -#endif +# endif + +# ifdef ENCODER_ENABLE + i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(I2C_slave_buffer_t.encoder_state), TIMEOUT); + encoder_update_raw(i2c_buffer->encoder_state); +# endif return true; } void transport_slave(matrix_row_t matrix[]) { - - for (int i = 0; i < ROWS_PER_HAND; ++i) - { - i2c_slave_buffer[I2C_KEYMAP_START + i] = matrix[i]; + // Copy matrix to I2C buffer + memcpy((void*)i2c_buffer->smatrix, (void *)matrix, sizeof(i2c_buffer->smatrix)); + +// Read Backlight Info +# ifdef BACKLIGHT_ENABLE + backlight_set(i2c_buffer->backlight_level); +# endif + +# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + // Update the RGB with the new data + if (i2c_buffer->rgblight_sync.status.change_flags != 0) { + rgblight_update_sync(&i2c_buffer->rgblight_sync, false); + i2c_buffer->rgblight_sync.status.change_flags = 0; } - // Read Backlight Info - #ifdef BACKLIGHT_ENABLE - if (BACKLIT_DIRTY) - { - backlight_set(i2c_slave_buffer[I2C_BACKLIT_START]); - BACKLIT_DIRTY = false; - } - #endif - #ifdef RGBLIGHT_ENABLE - if (RGB_DIRTY) - { - // Disable interupts (RGB data is big) - cli(); - // Create new DWORD for RGB data - uint32_t dword; - - // Fill the new DWORD with the data that was sent over - uint8_t * dword_dat = (uint8_t *)(&dword); - for (int i = 0; i < 4; i++) - { - dword_dat[i] = i2c_slave_buffer[I2C_RGB_START + i]; - } +# endif - // Update the RGB now with the new data and set RGB_DIRTY to false - rgblight_update_dword(dword); - RGB_DIRTY = false; - // Re-enable interupts now that RGB is set - sei(); - } - #endif +# ifdef ENCODER_ENABLE + encoder_state_raw(i2c_buffer->encoder_state); +# endif } -void transport_master_init(void) { - i2c_master_init(); -} +void transport_master_init(void) { i2c_init(); } -void transport_slave_init(void) { - i2c_slave_init(SLAVE_I2C_ADDRESS); -} +void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); } -#else // USE_SERIAL +#else // USE_SERIAL -#include "serial.h" +# include "serial.h" typedef struct _Serial_s2m_buffer_t { // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack matrix_row_t smatrix[ROWS_PER_HAND]; + +# ifdef ENCODER_ENABLE + uint8_t encoder_state[NUMBER_OF_ENCODERS]; +# endif + } Serial_s2m_buffer_t; typedef struct _Serial_m2s_buffer_t { -#ifdef BACKLIGHT_ENABLE - uint8_t backlight_level; -#endif +# ifdef BACKLIGHT_ENABLE + uint8_t backlight_level; +# endif +} Serial_m2s_buffer_t; + #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - rgblight_config_t rgblight_config; //not yet use - // - // When MCUs on both sides drive their respective RGB LED chains, - // it is necessary to synchronize, so it is necessary to communicate RGB information. - // In that case, define the RGBLIGHT_SPLIT macro. - // - // Otherwise, if the master side MCU drives both sides RGB LED chains, - // there is no need to communicate. +// When MCUs on both sides drive their respective RGB LED chains, +// it is necessary to synchronize, so it is necessary to communicate RGB +// information. In that case, define RGBLIGHT_SPLIT with info on the number +// of LEDs on each half. +// +// Otherwise, if the master side MCU drives both sides RGB LED chains, +// there is no need to communicate. + +typedef struct _Serial_rgblight_t { + rgblight_syncinfo_t rgblight_sync; +} Serial_rgblight_t; + +volatile Serial_rgblight_t serial_rgblight = {}; +uint8_t volatile status_rgblight = 0; #endif -} Serial_m2s_buffer_t; volatile Serial_s2m_buffer_t serial_s2m_buffer = {}; volatile Serial_m2s_buffer_t serial_m2s_buffer = {}; -uint8_t volatile status0 = 0; +uint8_t volatile status0 = 0; + +enum serial_transaction_id { + GET_SLAVE_MATRIX = 0, +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + PUT_RGBLIGHT, +#endif +}; SSTD_t transactions[] = { - { (uint8_t *)&status0, - sizeof(serial_m2s_buffer), (uint8_t *)&serial_m2s_buffer, - sizeof(serial_s2m_buffer), (uint8_t *)&serial_s2m_buffer - } + [GET_SLAVE_MATRIX] = { + (uint8_t *)&status0, + sizeof(serial_m2s_buffer), + (uint8_t *)&serial_m2s_buffer, + sizeof(serial_s2m_buffer), + (uint8_t *)&serial_s2m_buffer, + }, +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + [PUT_RGBLIGHT] = { + (uint8_t *)&status_rgblight, + sizeof(serial_rgblight), + (uint8_t *)&serial_rgblight, + 0, NULL // no slave to master transfer + }, +#endif }; -void transport_master_init(void) -{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } +void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } -void transport_slave_init(void) -{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } +void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); } -bool transport_master(matrix_row_t matrix[]) { +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + +// rgblight synchronization information communication. - if (soft_serial_transaction()) { +void transport_rgblight_master(void) { + if (rgblight_get_change_flags()) { + rgblight_get_syncinfo((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync); + if (soft_serial_transaction(PUT_RGBLIGHT) == TRANSACTION_END) { + rgblight_clear_change_flags(); + } + } +} + +void transport_rgblight_slave(void) { + if (status_rgblight == TRANSACTION_ACCEPTED) { + rgblight_update_sync((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync, + false); + status_rgblight = TRANSACTION_END; + } +} + +#else +#define transport_rgblight_master() +#define transport_rgblight_slave() +#endif + +bool transport_master(matrix_row_t matrix[]) { +#ifndef SERIAL_USE_MULTI_TRANSACTION + if (soft_serial_transaction() != TRANSACTION_END) { + return false; + } +#else + transport_rgblight_master(); + if (soft_serial_transaction(GET_SLAVE_MATRIX) != TRANSACTION_END) { return false; } +#endif // TODO: if MATRIX_COLS > 8 change to unpack() for (int i = 0; i < ROWS_PER_HAND; ++i) { matrix[i] = serial_s2m_buffer.smatrix[i]; } - #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - // Code to send RGB over serial goes here (not implemented yet) - #endif +# ifdef BACKLIGHT_ENABLE + // Write backlight level for slave to read + serial_m2s_buffer.backlight_level = is_backlight_enabled() ? get_backlight_level() : 0; +# endif - #ifdef BACKLIGHT_ENABLE - // Write backlight level for slave to read - serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0; - #endif +# ifdef ENCODER_ENABLE + encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state); +# endif return true; } void transport_slave(matrix_row_t matrix[]) { - + transport_rgblight_slave(); // TODO: if MATRIX_COLS > 8 change to pack() - for (int i = 0; i < ROWS_PER_HAND; ++i) - { + for (int i = 0; i < ROWS_PER_HAND; ++i) { serial_s2m_buffer.smatrix[i] = matrix[i]; } - #ifdef BACKLIGHT_ENABLE - backlight_set(serial_m2s_buffer.backlight_level); - #endif - #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - // Add serial implementation for RGB here - #endif +# ifdef BACKLIGHT_ENABLE + backlight_set(serial_m2s_buffer.backlight_level); +# endif + +# ifdef ENCODER_ENABLE + encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state); +# endif } diff --git a/quantum/stm32/halconf.h b/quantum/stm32/halconf.h index 8fe8e0c6f586..c3e0cbb728c7 100644 --- a/quantum/stm32/halconf.h +++ b/quantum/stm32/halconf.h @@ -76,7 +76,7 @@ * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C TRUE #endif /** diff --git a/quantum/stm32/mcuconf.h b/quantum/stm32/mcuconf.h index 7c3c6e570cec..36f8ca2252a4 100644 --- a/quantum/stm32/mcuconf.h +++ b/quantum/stm32/mcuconf.h @@ -154,7 +154,7 @@ /* * I2C driver system settings. */ -#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C1 TRUE #define STM32_I2C_USE_I2C2 FALSE #define STM32_I2C_BUSY_TIMEOUT 50 #define STM32_I2C_I2C1_IRQ_PRIORITY 10 diff --git a/quantum/stm32/proton_c.mk b/quantum/stm32/proton_c.mk index a0fa013736b8..a65e283d3f16 100644 --- a/quantum/stm32/proton_c.mk +++ b/quantum/stm32/proton_c.mk @@ -42,3 +42,4 @@ OPT_DEFS = # Options to pass to dfu-util when flashing DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +DFU_SUFFIX_ARGS = -p df11 -v 0483 diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index a31fcf236fbf..c13784ba1537 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -1,5 +1,5 @@ /* -Copyright 2019 REPLACE_WITH_YOUR_NAME +Copyright 2019 %YOUR_NAME% 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 @@ -23,7 +23,7 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x0000 #define DEVICE_VER 0x0001 -#define MANUFACTURER You +#define MANUFACTURER %YOUR_NAME% #define PRODUCT %KEYBOARD% #define DESCRIPTION A custom keyboard @@ -45,7 +45,7 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F1, F0, B0 } #define UNUSED_PINS -/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +/* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW /* @@ -77,10 +77,16 @@ along with this program. If not, see . // #define RGBLIGHT_EFFECT_STATIC_GRADIENT // #define RGBLIGHT_EFFECT_RGB_TEST // #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 // #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -143,8 +149,8 @@ along with this program. If not, see . //#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_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH //#define MAGIC_KEY_DEBUG D //#define MAGIC_KEY_DEBUG_MATRIX X //#define MAGIC_KEY_DEBUG_KBD K @@ -152,9 +158,8 @@ along with this program. If not, see . //#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_LAYER0_ALT GRAVE //#define MAGIC_KEY_LAYER1 1 //#define MAGIC_KEY_LAYER2 2 //#define MAGIC_KEY_LAYER3 3 @@ -164,9 +169,11 @@ along with this program. If not, see . //#define MAGIC_KEY_LAYER7 7 //#define MAGIC_KEY_LAYER8 8 //#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC //#define MAGIC_KEY_LOCK CAPS //#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE //#define MAGIC_KEY_NKRO N //#define MAGIC_KEY_SLEEP_LED Z diff --git a/quantum/template/avr/readme.md b/quantum/template/avr/readme.md index d243c66a9489..719222d37759 100644 --- a/quantum/template/avr/readme.md +++ b/quantum/template/avr/readme.md @@ -4,7 +4,7 @@ A short description of the keyboard/project -Keyboard Maintainer: [You](https://github.com/yourusername) +Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername) Hardware Supported: The PCBs, controllers supported Hardware Availability: links to where you can find this hardware diff --git a/quantum/template/avr/template.c b/quantum/template/avr/template.c index 3deeae88ba7a..86dc69abce72 100644 --- a/quantum/template/avr/template.c +++ b/quantum/template/avr/template.c @@ -1,4 +1,4 @@ -/* Copyright 2019 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 %YOUR_NAME% * * 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 @@ -15,29 +15,37 @@ */ #include "%KEYBOARD%.h" +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up + // put your keyboard start-up code here + // runs once when the firmware starts up - matrix_init_user(); + matrix_init_user(); } void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) + // put your looping keyboard code here + // runs every cycle (a lot) - matrix_scan_user(); + 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 + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware - return process_record_user(keycode, record); + return process_record_user(keycode, record); } void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); + led_set_user(usb_led); } + +*/ diff --git a/quantum/template/base/keymaps/default/config.h b/quantum/template/base/keymaps/default/config.h index c8e4334124ef..44382016a1f7 100644 --- a/quantum/template/base/keymaps/default/config.h +++ b/quantum/template/base/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2019 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 %YOUR_NAME% * * 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 diff --git a/quantum/template/base/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c index 11cd134a065b..482a44544874 100644 --- a/quantum/template/base/keymaps/default/keymap.c +++ b/quantum/template/base/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2019 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 %YOUR_NAME% * * 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 diff --git a/quantum/template/base/template.h b/quantum/template/base/template.h index caf2abb4c6b5..5b5076c47632 100644 --- a/quantum/template/base/template.h +++ b/quantum/template/base/template.h @@ -1,4 +1,4 @@ -/* Copyright 2019 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 %YOUR_NAME% * * 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 diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index 01cdf932ede8..d954fec96104 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -21,20 +21,23 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D +#define DEVICE_VER 0x0001 #define MANUFACTURER You #define PRODUCT %KEYBOARD% +#define DESCRIPTION A custom keyboard #define RGBLED_NUM 16 -#define MATRIX_ROWS 2 -#define MATRIX_COLS 3 +#define MATRIX_ROWS 8 +#define MATRIX_COLS 11 -#define MATRIX_ROW_PINS { D0, D5 } -#define MATRIX_COL_PINS { F1, F0, B0 } -#define UNUSED_PINS +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5 } +// #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, D7 } +#define UNUSED_PINS {} #define DIODE_DIRECTION COL2ROW -#define DEBOUNCING_DELAY 5 +#define DEBOUNCE 5 #define NO_BACKLIGHT_CLOCK #define BACKLIGHT_LEVELS 1 diff --git a/quantum/template/ps2avrgb/i2c.c b/quantum/template/ps2avrgb/i2c.c deleted file mode 100644 index e8c4455ad1b4..000000000000 --- a/quantum/template/ps2avrgb/i2c.c +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2016 Luiz Ribeiro - -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 . -*/ - -// Please do not modify this file - -#include -#include - -#include "i2c.h" - -void i2c_set_bitrate(uint16_t bitrate_khz) { - uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); - if (bitrate_div >= 16) { - bitrate_div = (bitrate_div - 16) / 2; - } - TWBR = bitrate_div; -} - -void i2c_init(void) { - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - i2c_set_bitrate(400); - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -} - -uint8_t i2c_start(uint8_t address) { - // reset TWI control register - TWCR = 0; - - // begin transmission and wait for it to end - TWCR = (1< - -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 . -*/ - -// Please do not modify this file - -#ifndef __I2C_H__ -#define __I2C_H__ - -void i2c_init(void); -void i2c_set_bitrate(uint16_t bitrate_khz); -uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); - -#endif diff --git a/quantum/template/ps2avrgb/matrix.c b/quantum/template/ps2avrgb/matrix.c deleted file mode 100644 index 245813dfd2de..000000000000 --- a/quantum/template/ps2avrgb/matrix.c +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2017 Luiz Ribeiro - -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 . -*/ - -#include -#include - -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -void matrix_set_row_status(uint8_t row); -uint8_t bit_reverse(uint8_t x); - -void matrix_init(void) { - // all outputs for rows high - DDRB = 0xFF; - PORTB = 0xFF; - // all inputs for columns - DDRA = 0x00; - DDRC &= ~(0x111111<<2); - DDRD &= ~(1< 7 - (~PINA) & 0xFF - ) | ( - // cols 8..13, PORTC 7 -> 0 - bit_reverse((~PINC) & 0xFF) << 8 - ) | ( - // col 14, PORTD 7 - ((~PIND) & (1 << PIND7)) << 7 - ); - - if (matrix_debouncing[row] != cols) { - matrix_debouncing[row] = cols; - debouncing = DEBOUNCE; - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -// declarations -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} - -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; -} - -inline matrix_row_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_print(void) { -} diff --git a/quantum/template/ps2avrgb/readme.md b/quantum/template/ps2avrgb/readme.md index feec722a521c..1449b278cdf2 100644 --- a/quantum/template/ps2avrgb/readme.md +++ b/quantum/template/ps2avrgb/readme.md @@ -4,7 +4,7 @@ A short description of the keyboard/project -Keyboard Maintainer: [You](https://github.com/yourusername) +Keyboard Maintainer: [%YOUR_NAME%](https://github.com/yourusername) Hardware Supported: The PCBs, controllers supported Hardware Availability: links to where you can find this hardware @@ -16,6 +16,8 @@ Flashing ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. +**Reset Key:** Hold down the key located at `K00`, commonly programmed as `Esc` while plugging in the keyboard. + Windows: 1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). 2. Place your keyboard into reset. @@ -34,10 +36,10 @@ macOS: ``` 3. Install the following packages: ``` - brew install python - brew install pyusb - brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb - + brew install python3 + pip3 install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + ``` 4. Place your keyboard into reset. 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. diff --git a/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk index bcd7dff99919..bd0eed0527e4 100644 --- a/quantum/template/ps2avrgb/rules.mk +++ b/quantum/template/ps2avrgb/rules.mk @@ -31,20 +31,18 @@ F_CPU = 12000000 BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no -RGBLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes RGBLIGHT_CUSTOM_DRIVER = yes OPT_DEFS = -DDEBUG_LEVEL=0 -# custom matrix setup -CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC += i2c_master.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/quantum/template/ps2avrgb/template.c b/quantum/template/ps2avrgb/template.c index 4e35a2c129e6..3f920de48c5c 100644 --- a/quantum/template/ps2avrgb/template.c +++ b/quantum/template/ps2avrgb/template.c @@ -1,4 +1,4 @@ -/* Copyright 2019 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 %YOUR_NAME% * * 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 @@ -13,13 +13,78 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "%KEYBOARD%.h" -#include -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" +#ifdef RGBLIGHT_ENABLE + +#include +#include "i2c_master.h" +#include "rgblight.h" + +extern rgblight_config_t rgblight_config; + +void matrix_init_kb(void) { + i2c_init(); + // call user level keymaps, if any + matrix_init_user(); +} + +// custom RGB driver +void rgblight_set(void) { + if (!rgblight_config.enable) { + memset(led, 0, 3 * RGBLED_NUM); + } + + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); +} + +bool rgb_init = false; + +void matrix_scan_kb(void) { + // if LEDs were previously on before poweroff, turn them back on + if (rgb_init == false && rgblight_config.enable) { + i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); + rgb_init = true; + } + + rgblight_task(); + matrix_scan_user(); +} + +#endif -__attribute__ ((weak)) -void matrix_scan_user(void) { +// Optional override functions below. +// You can leave any or all of these undefined. +// These are only required if you want to perform custom actions. + +/* + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); } + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + +*/ diff --git a/quantum/template/ps2avrgb/usbconfig.h b/quantum/template/ps2avrgb/usbconfig.h index d2d848fcdc8f..54a7d20f1427 100644 --- a/quantum/template/ps2avrgb/usbconfig.h +++ b/quantum/template/ps2avrgb/usbconfig.h @@ -8,8 +8,7 @@ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ */ -#ifndef __usbconfig_h_included__ -#define __usbconfig_h_included__ +#pragma once #include "config.h" @@ -392,5 +391,3 @@ section at the end of this file). /* #define USB_INTR_PENDING EIFR */ #define USB_INTR_PENDING_BIT INTF1 #define USB_INTR_VECTOR INT1_vect - -#endif /* __usbconfig_h_included__ */ diff --git a/quantum/velocikey.c b/quantum/velocikey.c new file mode 100644 index 000000000000..550c3b70a647 --- /dev/null +++ b/quantum/velocikey.c @@ -0,0 +1,46 @@ +#include "velocikey.h" +#include "timer.h" +#include "eeconfig.h" +#include "eeprom.h" + +#ifndef MIN +#define MIN(a,b) (((a)<(b))?(a):(b)) +#endif +#ifndef MAX +#define MAX(a,b) (((a)>(b))?(a):(b)) +#endif + +#define TYPING_SPEED_MAX_VALUE 200 +uint8_t typing_speed = 0; + +bool velocikey_enabled(void) { + return eeprom_read_byte(EECONFIG_VELOCIKEY) == 1; +} + +void velocikey_toggle(void) { + if (velocikey_enabled()) + eeprom_update_byte(EECONFIG_VELOCIKEY, 0); + else + eeprom_update_byte(EECONFIG_VELOCIKEY, 1); +} + +void velocikey_accelerate(void) { + if (typing_speed < TYPING_SPEED_MAX_VALUE) typing_speed += (TYPING_SPEED_MAX_VALUE / 100); +} + +void velocikey_decelerate(void) { + static uint16_t decay_timer = 0; + + if (timer_elapsed(decay_timer) > 500 || decay_timer == 0) { + if (typing_speed > 0) typing_speed -= 1; + //Decay a little faster at half of max speed + if (typing_speed > TYPING_SPEED_MAX_VALUE / 2) typing_speed -= 1; + //Decay even faster at 3/4 of max speed + if (typing_speed > TYPING_SPEED_MAX_VALUE / 4 * 3) typing_speed -= 2; + decay_timer = timer_read(); + } +} + +uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue) { + return MAX(minValue, maxValue - (maxValue - minValue) * ((float)typing_speed / TYPING_SPEED_MAX_VALUE)); +} diff --git a/quantum/velocikey.h b/quantum/velocikey.h new file mode 100644 index 000000000000..1910f0f4e96f --- /dev/null +++ b/quantum/velocikey.h @@ -0,0 +1,13 @@ +#ifndef VELOCIKEY_H +#define VELOCIKEY_H + +#include +#include + +bool velocikey_enabled(void); +void velocikey_toggle(void); +void velocikey_accelerate(void); +void velocikey_decelerate(void); +uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue); + +#endif \ No newline at end of file diff --git a/quantum/visualizer/readme.md b/quantum/visualizer/readme.md index 545ba227078b..298efb742f2b 100644 --- a/quantum/visualizer/readme.md +++ b/quantum/visualizer/readme.md @@ -1,7 +1,7 @@ # A visualization library for the TMK keyboard firmware This library is designed to work together with the [TMK keyboard firmware](https://github.com/tmk/tmk_keyboard). Currently it only works for [Chibios](http://www.chibios.org/) - flavors, but it would be possible to add support for other configurations as well. The LCD display functionality is provided by the [uGFX library](http://www.ugfx.org/). + flavors, but it would be possible to add support for other configurations as well. The LCD display functionality is provided by the [uGFX library](https://ugfx.io/). ## To use this library as a user You can and should modify the visualizer\_user.c file. Check the comments in the file for more information. diff --git a/readme.md b/readme.md index 6e6cfaa1bd10..b08c675e4e8c 100644 --- a/readme.md +++ b/readme.md @@ -7,7 +7,7 @@ [![GitHub contributors](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly) [![GitHub forks](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/) -This is a keyboard firmware based on the [tmk\_keyboard firmware](http://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR and ARM controllers, and more specifically, the [OLKB product line](https://olkb.com), the [ErgoDox EZ](http://www.ergodox-ez.com) keyboard, and the [Clueboard product line](http://clueboard.co/). +This is a keyboard firmware based on the [tmk\_keyboard firmware](https://github.com/tmk/tmk_keyboard) with some useful features for Atmel AVR and ARM controllers, and more specifically, the [OLKB product line](https://olkb.com), the [ErgoDox EZ](https://ergodox-ez.com) keyboard, and the [Clueboard product line](https://clueboard.co). ## Documentation @@ -28,8 +28,8 @@ The project also includes community support for [lots of other keyboards](/keybo ## Maintainers -QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [Erez Zukerman](https://github.com/ezuk), the Clueboard by [Zach White](https://github.com/skullydazed), and the Atreus by [Phil Hagelberg](https://github.com/technomancy). +QMK is developed and maintained by Jack Humbert of OLKB with contributions from the community, and of course, [Hasu](https://github.com/tmk). The OLKB product firmwares are maintained by [Jack Humbert](https://github.com/jackhumbert), the Ergodox EZ by [ZSA Technology Labs](https://github.com/zsa), the Clueboard by [Zach White](https://github.com/skullydazed), and the Atreus by [Phil Hagelberg](https://github.com/technomancy). -## Official website +## Official Website -[http://qmk.fm](http://qmk.fm) is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK. +[qmk.fm](https://qmk.fm) is the official website of QMK, where you can find links to this page, the documentation, and the keyboards supported by QMK. diff --git a/show_options.mk b/show_options.mk new file mode 100644 index 000000000000..02e062a8d94a --- /dev/null +++ b/show_options.mk @@ -0,0 +1,137 @@ +BUILD_OPTION_NAMES = \ + BOOTMAGIC_ENABLE \ + MOUSEKEY_ENABLE \ + EXTRAKEY_ENABLE \ + CONSOLE_ENABLE \ + COMMAND_ENABLE \ + NKRO_ENABLE \ + TERMINAL_ENABLE \ + CUSTOM_MATRIX \ + DEBOUNCE_TYPE \ + SPLIT_KEYBOARD \ + DYNAMIC_KEYMAP_ENABLE \ + USB_HID_ENABLE + +HARDWARE_OPTION_NAMES = \ + SLEEP_LED_ENABLE \ + BACKLIGHT_ENABLE \ + BACKLIGHT_CUSTOM_DRIVER \ + RGBLIGHT_ENABLE \ + RGBLIGHT_CUSTOM_DRIVER \ + RGB_MATRIX_ENABLE \ + SERIAL_LINK_ENABLE \ + CIE1931_CURVE \ + MIDI_ENABLE \ + BLUETOOTH_ENABLE \ + AUDIO_ENABLE \ + FAUXCLICKY_ENABLE \ + HD44780_ENABLE \ + ENCODER_ENABLE \ + LCD_ENABLE \ + LED_BREATHING_TABLE \ + LED_TABLES \ + POINTING_DEVICE_ENABLE \ + VISUALIZER_ENABLE + +OTHER_OPTION_NAMES = \ + UNICODE_ENABLE \ + UCIS_ENABLE \ + UNICODEMAP_ENABLE \ + UNICODE_COMMON \ + API_SYSEX_ENABLE \ + AUTO_SHIFT_ENABLE \ + AUTO_SHIFT_MODIFIERS \ + COMBO_ENABLE \ + KEY_LOCK_ENABLE \ + LEADER_ENABLE \ + PRINTING_ENABLE \ + STENO_ENABLE \ + TAP_DANCE_ENABLE \ + VIRTSER_ENABLE \ + OLED_ENABLE \ + LED_BACK_ENABLE \ + LED_UNDERGLOW_ENABLE \ + LED_ANIMATIONS \ + IOS_DEVICE_ENABLE \ + HELIX ZINC \ + ADAFRUIT_BLE_ENABLE \ + AUTOLOG_ENABLE \ + BREATHING_LED_ENABLE \ + DEBUG_ENABLE \ + ENCODER_ENABLE_CUSTOM \ + FADING_LED_ENABLE \ + GERMAN_ENABLE \ + HAPTIC_ENABLE \ + HHKB_RN42_ENABLE \ + ISSI_ENABLE \ + KEYBOARD_LOCK_ENABLE \ + KEYLOGGER_ENABLE \ + KEYMAP_IN_EEPROM_ENABLE \ + KEYMAP_SECTION_ENABLE \ + LCD_BACKLIGHT_ENABLE \ + LEDMAP_ENABLE \ + LEDMAP_IN_EEPROM_ENABLE \ + MACROS_ENABLED \ + ONEHAND_ENABLE \ + PS2_MOUSE_ENABLE \ + RAW_ENABLE \ + SOFTPWM_LED_ENABLE \ + SWAP_HANDS_ENABLE \ + USB_6KRO_ENABLE \ + WATCHDOG_ENABLE \ + XT_ENABLE \ + ERGOINU \ + NO_USB_STARTUP_CHECK \ + DISABLE_PROMICRO_LEDs \ + MITOSIS_DATAGROK_BOTTOMSPACE \ + MITOSIS_DATAGROK_SLOWUART \ + RGB_MATRIX_KEYPRESSES \ + LED_MIRRORED \ + RGBLIGHT_FULL_POWER \ + Link_Time_Optimization \ + LINK_TIME_OPTIMIZATION_ENABLE + +define NAME_ECHO + @echo " $1 = $($1) # $(origin $1)" + +endef + +.PHONY: show_build_options0 show_build_options +show_build_options0: + @echo " KEYBOARD = $(KEYBOARD)" + @echo " KEYMAP = $(KEYMAP)" + @echo " MCU = $(MCU)" + @echo " MCU_SERIES = $(MCU_SERIES)" + @echo " PLATFORM = $(PLATFORM)" + @echo " FIRMWARE_FORMAT = $(FIRMWARE_FORMAT)" + @echo + @echo "Build Options:" + $(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\ + $(call NAME_ECHO,$(A_OPTION_NAME))) + +show_build_options: show_build_options0 + @echo + @echo "If you want to know more, please try 'show_all_features' or 'show_full_features'" + @echo + +.PHONY: show_all_features +show_all_features: show_build_options0 + @echo + @echo "Hardware Options:" + $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ + $(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME)))) + @echo + @echo "Other Options:" + $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ + $(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME)))) + +.PHONY: show_full_features +show_full_features: show_build_options0 + @echo + @echo "Hardware Options:" + $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ + $(call NAME_ECHO,$(A_OPTION_NAME))) + @echo + @echo "Other Options:" + $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ + $(call NAME_ECHO,$(A_OPTION_NAME))) diff --git a/tmk_core/arm_atsam.mk b/tmk_core/arm_atsam.mk index 06823fb629f9..25a3411f4f9f 100644 --- a/tmk_core/arm_atsam.mk +++ b/tmk_core/arm_atsam.mk @@ -6,7 +6,7 @@ CC = arm-none-eabi-gcc OBJCOPY = arm-none-eabi-objcopy OBJDUMP = arm-none-eabi-objdump SIZE = arm-none-eabi-size -AR = arm-none-eabi-ar rcs +AR = arm-none-eabi-ar NM = arm-none-eabi-nm HEX = $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature EEP = $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index 0c3a9624cb4e..6bf86d58a8c9 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -6,7 +6,7 @@ CC = avr-gcc OBJCOPY = avr-objcopy OBJDUMP = avr-objdump SIZE = avr-size -AR = avr-ar rcs +AR = avr-ar NM = avr-nm HEX = $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature EEP = $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) @@ -194,7 +194,7 @@ dfu-split-right: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size $(DFU_PROGRAMMER) $(MCU) flash --eeprom $(QUANTUM_PATH)/split_common/eeprom-righthand.eep;\ else\ $(DFU_PROGRAMMER) $(MCU) erase;\ - $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(QUANTUM_PATH)/split_common/eeprom-rightand.eep;\ + $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(QUANTUM_PATH)/split_common/eeprom-righthand.eep;\ fi $(DFU_PROGRAMMER) $(MCU) flash $(BUILD_DIR)/$(TARGET).hex $(DFU_PROGRAMMER) $(MCU) reset @@ -214,13 +214,20 @@ define EXEC_AVRDUDE mv /tmp/2 /tmp/1; \ done; \ echo ""; \ - echo "Detected controller on USB port at $$USB"; \ + echo "Device $$USB has appeared; assuming it is the controller."; \ if $(GREP) -q -s 'MINGW\|MSYS' /proc/version; then \ USB=`echo "$$USB" | perl -pne 's/\/dev\/ttyS(\d+)/COM.($$1+1)/e'`; \ echo "Remapped MSYS2 USB port to $$USB"; \ + sleep 1; \ + else \ + printf "Waiting for $$USB to become writable."; \ + while [ ! -w "$$USB" ]; do sleep 0.5; printf "."; done; echo ""; \ fi; \ - sleep 1; \ - avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ + if [ -z "$(1)" ]; then \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ + else \ + avrdude -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex -U eeprom:w:$(QUANTUM_PATH)/split_common/$(1); \ + fi \ fi endef @@ -229,9 +236,15 @@ avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware avrdude-loop: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware while true; do \ - $(call EXEC_AVRDUDE) ; \ + $(call EXEC_AVRDUDE) ; \ done +avrdude-split-left: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + $(call EXEC_AVRDUDE,eeprom-lefthand.eep) + +avrdude-split-right: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + $(call EXEC_AVRDUDE,eeprom-righthand.eep) + # Convert hex to bin. bin: $(BUILD_DIR)/$(TARGET).hex $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin @@ -292,14 +305,7 @@ extcoff: $(BUILD_DIR)/$(TARGET).elf bootloader: make -C lib/lufa/Bootloaders/DFU/ clean - printf "#ifndef QMK_KEYBOARD\n#define QMK_KEYBOARD\n\n" > lib/lufa/Bootloaders/DFU/Keyboard.h - printf "%s\n" "`$(GREP) "MANUFACTURER\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h - printf "%s Bootloader\n" "`$(GREP) "PRODUCT\s" $(ALL_CONFIGS) -h | tail -1 | tr -d '\r'`" >> lib/lufa/Bootloaders/DFU/Keyboard.h - printf "%s\n" "`$(GREP) "QMK_ESC_OUTPUT\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h - printf "%s\n" "`$(GREP) "QMK_ESC_INPUT\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h - printf "%s\n" "`$(GREP) "QMK_LED\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h - printf "%s\n" "`$(GREP) "QMK_SPEAKER\s" $(ALL_CONFIGS) -h | tail -1`" >> lib/lufa/Bootloaders/DFU/Keyboard.h - printf "\n#endif" >> lib/lufa/Bootloaders/DFU/Keyboard.h + $(TMK_DIR)/make_dfu_header.sh $(ALL_CONFIGS) make -C lib/lufa/Bootloaders/DFU/ printf "BootloaderDFU.hex copied to $(TARGET)_bootloader.hex\n" cp lib/lufa/Bootloaders/DFU/BootloaderDFU.hex $(TARGET)_bootloader.hex diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 0f665450ac56..44c00bdd151b 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -39,9 +39,13 @@ include $(STARTUP_MK) # HAL-OSAL files (optional). include $(CHIBIOS)/os/hal/hal.mk -PLATFORM_MK = $(CHIBIOS)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/platform.mk +ifeq ("$(PLATFORM_NAME)","") + PLATFORM_NAME = platform +endif + +PLATFORM_MK = $(CHIBIOS)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk ifeq ("$(wildcard $(PLATFORM_MK))","") -PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/platform.mk +PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk endif include $(PLATFORM_MK) @@ -197,6 +201,7 @@ DFU_ARGS ?= ifneq ("$(SERIAL)","") DFU_ARGS += -S $(SERIAL) endif +DFU_SUFFIX_ARGS ?= ST_LINK_ARGS ?= @@ -204,6 +209,7 @@ ST_LINK_ARGS ?= EXTRALIBDIRS = $(RULESPATH)/ld DFU_UTIL ?= dfu-util +DFU_SUFFIX ?= dfu-suffix ST_LINK_CLI ?= st-link_cli # Generate a .qmk for the QMK-FF @@ -255,4 +261,7 @@ st-link-cli: $(BUILD_DIR)/$(TARGET).hex sizeafter $(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst bin: $(BUILD_DIR)/$(TARGET).bin sizeafter + if [ ! -z "$(DFU_SUFFIX_ARGS)" ]; then \ + $(DFU_SUFFIX) $(DFU_SUFFIX_ARGS) -a $(BUILD_DIR)/$(TARGET).bin 1>/dev/null ;\ + fi $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 063115acb1ab..221688755518 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -41,6 +41,11 @@ ifeq ($(PLATFORM),CHIBIOS) TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F103xB TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE + else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB) + TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c + TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c + TMK_COMMON_DEFS += -DEEPROM_EMU_STM32F072xB + TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE else TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c endif @@ -203,6 +208,13 @@ ifeq ($(strip $(SHARED_EP_ENABLE)), yes) TMK_COMMON_DEFS += -DSHARED_EP_ENABLE endif + +ifeq ($(strip $(LINK_TIME_OPTIMIZATION_ENABLE)), yes) + EXTRAFLAGS += -flto + TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATION_ENABLE + TMK_COMMON_DEFS += -DNO_ACTION_MACRO + TMK_COMMON_DEFS += -DNO_ACTION_FUNCTION +endif # Bootloader address ifdef STM32_BOOTLOADER_ADDRESS TMK_COMMON_DEFS += -DSTM32_BOOTLOADER_ADDRESS=$(STM32_BOOTLOADER_ADDRESS) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index ec8d6ed7b9cb..3991a8a9ef8e 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -44,6 +44,9 @@ int retro_tapping_counter = 0; #include #endif +#ifndef TAP_HOLD_CAPS_DELAY +# define TAP_HOLD_CAPS_DELAY 200 +#endif /** \brief Called to execute an action. * * FIXME: Needs documentation. @@ -403,8 +406,8 @@ void process_action(keyrecord_t *record, action_t action) /* Default Layer Bitwise Operation */ if (!event.pressed) { uint8_t shift = action.layer_bitop.part*4; - uint32_t bits = ((uint32_t)action.layer_bitop.bits)< 0) { dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n"); if (action.layer_tap.code == KC_CAPS) { - wait_ms(80); + wait_ms(TAP_HOLD_CAPS_DELAY); } unregister_code(action.layer_tap.code); } else { @@ -537,7 +540,7 @@ void process_action(keyrecord_t *record, action_t action) action_macro_play(action_get_macro(record, action.func.id, action.func.opt)); break; #endif -#ifdef BACKLIGHT_ENABLE +#if defined(BACKLIGHT_ENABLE) | defined(LED_MATRIX_ENABLE) case ACT_BACKLIGHT: if (!event.pressed) { switch (action.backlight.opt) { @@ -853,8 +856,13 @@ void unregister_code(uint8_t code) */ void tap_code(uint8_t code) { register_code(code); + if (code == KC_CAPS) { + wait_ms(TAP_HOLD_CAPS_DELAY); + } #if TAP_CODE_DELAY > 0 + else { wait_ms(TAP_CODE_DELAY); + } #endif unregister_code(code); } diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 47cad996a3de..dfcbc110ad19 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -13,14 +13,14 @@ /** \brief Default Layer State */ -uint32_t default_layer_state = 0; +layer_state_t default_layer_state = 0; /** \brief Default Layer State Set At user Level * * Run user code on default layer state change */ __attribute__((weak)) -uint32_t default_layer_state_set_user(uint32_t state) { +layer_state_t default_layer_state_set_user(layer_state_t state) { return state; } @@ -29,7 +29,7 @@ uint32_t default_layer_state_set_user(uint32_t state) { * Run keyboard code on default layer state change */ __attribute__((weak)) -uint32_t default_layer_state_set_kb(uint32_t state) { +layer_state_t default_layer_state_set_kb(layer_state_t state) { return default_layer_state_set_user(state); } @@ -37,7 +37,7 @@ uint32_t default_layer_state_set_kb(uint32_t state) { * * Static function to set the default layer state, prints debug info and clears keys */ -static void default_layer_state_set(uint32_t state) { +static void default_layer_state_set(layer_state_t state) { state = default_layer_state_set_kb(state); debug("default_layer_state: "); default_layer_debug(); debug(" to "); @@ -62,7 +62,7 @@ void default_layer_debug(void) { * * Sets the default layer state. */ -void default_layer_set(uint32_t state) { +void default_layer_set(layer_state_t state) { default_layer_state_set(state); } @@ -71,21 +71,21 @@ void default_layer_set(uint32_t state) { * * Turns on the default layer based on matching bits between specifed layer and existing layer state */ -void default_layer_or(uint32_t state) { +void default_layer_or(layer_state_t state) { default_layer_state_set(default_layer_state | state); } /** \brief Default Layer And * * Turns on default layer based on matching enabled bits between specifed layer and existing layer state */ -void default_layer_and(uint32_t state) { +void default_layer_and(layer_state_t state) { default_layer_state_set(default_layer_state & state); } /** \brief Default Layer Xor * * Turns on default layer based on non-matching bits between specifed layer and existing layer state */ -void default_layer_xor(uint32_t state) { +void default_layer_xor(layer_state_t state) { default_layer_state_set(default_layer_state ^ state); } #endif @@ -94,14 +94,14 @@ void default_layer_xor(uint32_t state) { #ifndef NO_ACTION_LAYER /** \brief Keymap Layer State */ -uint32_t layer_state = 0; +layer_state_t layer_state = 0; /** \brief Layer state set user * * Runs user code on layer state change */ __attribute__((weak)) -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return state; } @@ -110,7 +110,7 @@ uint32_t layer_state_set_user(uint32_t state) { * Runs keyboard code on layer state change */ __attribute__((weak)) -uint32_t layer_state_set_kb(uint32_t state) { +layer_state_t layer_state_set_kb(layer_state_t state) { return layer_state_set_user(state); } @@ -118,7 +118,7 @@ uint32_t layer_state_set_kb(uint32_t state) { * * Sets the layer to match the specifed state (a bitmask) */ -void layer_state_set(uint32_t state) { +void layer_state_set(layer_state_t state) { state = layer_state_set_kb(state); dprint("layer_state: "); layer_debug(); dprint(" to "); @@ -151,7 +151,7 @@ bool layer_state_is(uint8_t layer) { * * Used for comparing layers {mostly used for unit testing} */ -bool layer_state_cmp(uint32_t cmp_layer_state, uint8_t layer) { +bool layer_state_cmp(layer_state_t cmp_layer_state, uint8_t layer) { if (!cmp_layer_state) { return layer == 0; } return (cmp_layer_state & (1UL<= 0; i--) { + for (int8_t i = sizeof(layer_state_t) * 8 - 1; i >= 0; i--) { if (layers & (1UL << i)) { action = action_for_key(i, key); if (action.code != ACTION_TRANSPARENT) { diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h index 6e2f35d90d11..7fa30c86d69f 100644 --- a/tmk_core/common/action_layer.h +++ b/tmk_core/common/action_layer.h @@ -21,24 +21,32 @@ along with this program. If not, see . #include "keyboard.h" #include "action.h" +#if defined(LAYER_STATE_8BIT) || ( defined(DYNAMIC_KEYMAP_ENABLE) && DYNAMIC_KEYMAP_LAYER_COUNT >= 8 ) +typedef uint8_t layer_state_t; +#elif defined(LAYER_STATE_16BIT) +typedef uint16_t layer_state_t; +#else +typedef uint32_t layer_state_t; +#endif + /* * Default Layer */ -extern uint32_t default_layer_state; +extern layer_state_t default_layer_state; void default_layer_debug(void); -void default_layer_set(uint32_t state); +void default_layer_set(layer_state_t state); __attribute__((weak)) -uint32_t default_layer_state_set_kb(uint32_t state); +layer_state_t default_layer_state_set_kb(layer_state_t state); __attribute__((weak)) -uint32_t default_layer_state_set_user(uint32_t state); +layer_state_t default_layer_state_set_user(layer_state_t state); #ifndef NO_ACTION_LAYER /* bitwise operation */ -void default_layer_or(uint32_t state); -void default_layer_and(uint32_t state); -void default_layer_xor(uint32_t state); +void default_layer_or(layer_state_t state); +void default_layer_and(layer_state_t state); +void default_layer_xor(layer_state_t state); #else #define default_layer_or(state) #define default_layer_and(state) @@ -50,11 +58,11 @@ void default_layer_xor(uint32_t state); * Keymap Layer */ #ifndef NO_ACTION_LAYER -extern uint32_t layer_state; +extern layer_state_t layer_state; -void layer_state_set(uint32_t state); +void layer_state_set(layer_state_t state); bool layer_state_is(uint8_t layer); -bool layer_state_cmp(uint32_t layer1, uint8_t layer2); +bool layer_state_cmp(layer_state_t layer1, uint8_t layer2); void layer_debug(void); void layer_clear(void); @@ -63,9 +71,9 @@ void layer_on(uint8_t layer); void layer_off(uint8_t layer); void layer_invert(uint8_t layer); /* bitwise operation */ -void layer_or(uint32_t state); -void layer_and(uint32_t state); -void layer_xor(uint32_t state); +void layer_or(layer_state_t state); +void layer_and(layer_state_t state); +void layer_xor(layer_state_t state); #else #define layer_state 0 @@ -84,8 +92,8 @@ void layer_xor(uint32_t state); #define layer_xor(state) #endif -uint32_t layer_state_set_user(uint32_t state); -uint32_t layer_state_set_kb(uint32_t state); +layer_state_t layer_state_set_user(layer_state_t state); +layer_state_t layer_state_set_kb(layer_state_t state); /* pressed actions cache */ #if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index 8adf013e16ca..3b67ed152f79 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c @@ -18,8 +18,17 @@ #define IS_TAPPING_PRESSED() (IS_TAPPING() && tapping_key.event.pressed) #define IS_TAPPING_RELEASED() (IS_TAPPING() && !tapping_key.event.pressed) #define IS_TAPPING_KEY(k) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (k))) -#define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < TAPPING_TERM) +__attribute__ ((weak)) +uint16_t get_tapping_term(uint16_t keycode) { + return TAPPING_TERM; +} + +#ifdef TAPPING_TERM_PER_KEY +#define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < get_tapping_term(get_event_keycode(tapping_key.event))) +#else +#define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < TAPPING_TERM) +#endif static keyrecord_t tapping_key = {}; static keyrecord_t waiting_buffer[WAITING_BUFFER_SIZE] = {}; @@ -100,12 +109,17 @@ bool process_tapping(keyrecord_t *keyp) // enqueue return false; } -#if TAPPING_TERM >= 500 || defined PERMISSIVE_HOLD /* Process a key typed within TAPPING_TERM * This can register the key before settlement of tapping, * useful for long TAPPING_TERM but may prevent fast typing. */ - else if (IS_RELEASED(event) && waiting_buffer_typed(event)) { +#if defined(TAPPING_TERM_PER_KEY) || (!defined(PER_KEY_TAPPING_TERM) && TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) +#ifdef TAPPING_TERM_PER_KEY + else if ( ( get_tapping_term(get_event_keycode(tapping_key.event)) >= 500) && IS_RELEASED(event) && waiting_buffer_typed(event)) +#else + else if ( IS_RELEASED(event) && waiting_buffer_typed(event)) +#endif + { debug("Tapping: End. No tap. Interfered by typing key\n"); process_record(&tapping_key); tapping_key = (keyrecord_t){}; diff --git a/tmk_core/common/action_tapping.h b/tmk_core/common/action_tapping.h index 2f143ae8b82d..1db43a442e33 100644 --- a/tmk_core/common/action_tapping.h +++ b/tmk_core/common/action_tapping.h @@ -35,6 +35,8 @@ along with this program. If not, see . #ifndef NO_ACTION_TAPPING +uint16_t get_event_keycode(keyevent_t event); +uint16_t get_tapping_term(uint16_t keycode); void action_tapping_process(keyrecord_t record); #endif diff --git a/tmk_core/common/arm_atsam/suspend.c b/tmk_core/common/arm_atsam/suspend.c index e34965df64e1..ecf8f0ed1892 100644 --- a/tmk_core/common/arm_atsam/suspend.c +++ b/tmk_core/common/arm_atsam/suspend.c @@ -35,7 +35,9 @@ void suspend_power_down_kb(void) { */ void suspend_power_down(void) { +#ifdef RGB_MATRIX_ENABLE I2C3733_Control_Set(0); //Disable LED driver +#endif suspend_power_down_kb(); } @@ -75,10 +77,15 @@ void suspend_wakeup_init_kb(void) { * FIXME: needs doc */ void suspend_wakeup_init(void) { - /* If LEDs are set to enabled, enable the hardware */ +#ifdef RGB_MATRIX_ENABLE +#ifdef USE_MASSDROP_CONFIGURATOR if (led_enabled) { I2C3733_Control_Set(1); } +#else + I2C3733_Control_Set(1); +#endif +#endif suspend_wakeup_init_kb(); } diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c index c4b913280ede..3cdcd2e426b6 100644 --- a/tmk_core/common/avr/bootloader.c +++ b/tmk_core/common/avr/bootloader.c @@ -70,7 +70,7 @@ * http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html */ #define BOOTLOADER_RESET_KEY 0xB007B007 -uint32_t reset_key __attribute__ ((section (".noinit"))); +uint32_t reset_key __attribute__ ((section (".noinit,\"aw\",@nobits;"))); /** \brief initialize MCU status by watchdog reset * diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 1194a040ee77..2259201b5d99 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -11,9 +11,6 @@ #include "led.h" #include "host.h" #include "rgblight_reconfig.h" -#ifdef SPLIT_KEYBOARD - #include "split_flags.h" -#endif #ifdef PROTOCOL_LUFA #include "lufa.h" @@ -135,27 +132,24 @@ static void power_down(uint8_t wdto) { is_suspended = true; rgblight_enabled = rgblight_config.enable; rgblight_disable_noeeprom(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } #endif suspend_power_down_kb(); - // TODO: more power saving - // See PicoPower application note - // - I/O port input with pullup - // - prescale clock - // - BOD disable - // - Power Reduction Register PRR - set_sleep_mode(SLEEP_MODE_PWR_DOWN); - sleep_enable(); - sei(); - sleep_cpu(); - sleep_disable(); - - // Disable watchdog after sleep - wdt_disable(); + // TODO: more power saving + // See PicoPower application note + // - I/O port input with pullup + // - prescale clock + // - BOD disable + // - Power Reduction Register PRR + set_sleep_mode(SLEEP_MODE_PWR_DOWN); + sleep_enable(); + sei(); + sleep_cpu(); + sleep_disable(); + + // Disable watchdog after sleep + wdt_disable(); } #endif @@ -216,9 +210,6 @@ void suspend_wakeup_init(void) { wait_ms(10); #endif rgblight_enable_noeeprom(); - #ifdef SPLIT_KEYBOARD - RGB_DIRTY = true; - #endif } #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_enable(); diff --git a/tmk_core/common/bootmagic.c b/tmk_core/common/bootmagic.c index 9f79fb8eedba..cc780d17abb5 100644 --- a/tmk_core/common/bootmagic.c +++ b/tmk_core/common/bootmagic.c @@ -99,10 +99,10 @@ void bootmagic(void) if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_7)) { default_layer |= (1<<7); } if (default_layer) { eeconfig_update_default_layer(default_layer); - default_layer_set((uint32_t)default_layer); + default_layer_set((layer_state_t)default_layer); } else { default_layer = eeconfig_read_default_layer(); - default_layer_set((uint32_t)default_layer); + default_layer_set((layer_state_t)default_layer); } } diff --git a/tmk_core/common/chibios/eeprom_stm32.h b/tmk_core/common/chibios/eeprom_stm32.h index 892e417b7e6e..083eb16ee6b6 100755 --- a/tmk_core/common/chibios/eeprom_stm32.h +++ b/tmk_core/common/chibios/eeprom_stm32.h @@ -34,6 +34,8 @@ #define MCU_STM32F303CC #elif defined(EEPROM_EMU_STM32F103xB) #define MCU_STM32F103RB +#elif defined(EEPROM_EMU_STM32F072xB) + #define MCU_STM32F072CB #else #error "not implemented." #endif @@ -42,7 +44,7 @@ #if defined (MCU_STM32F103RB) #define FEE_PAGE_SIZE (uint16_t)0x400 // Page size = 1KByte #define FEE_DENSITY_PAGES 2 // How many pages are used - #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) || defined (MCU_STM32F103RD) || defined (MCU_STM32F303CC) + #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) || defined (MCU_STM32F103RD) || defined (MCU_STM32F303CC) || defined(MCU_STM32F072CB) #define FEE_PAGE_SIZE (uint16_t)0x800 // Page size = 2KByte #define FEE_DENSITY_PAGES 4 // How many pages are used #else @@ -51,7 +53,7 @@ #endif #ifndef EEPROM_START_ADDRESS - #if defined (MCU_STM32F103RB) + #if defined (MCU_STM32F103RB) || defined(MCU_STM32F072CB) #define FEE_MCU_FLASH_SIZE 128 // Size in Kb #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) #define FEE_MCU_FLASH_SIZE 512 // Size in Kb diff --git a/tmk_core/common/chibios/flash_stm32.c b/tmk_core/common/chibios/flash_stm32.c index 164654a15eae..832bf3908fed 100755 --- a/tmk_core/common/chibios/flash_stm32.c +++ b/tmk_core/common/chibios/flash_stm32.c @@ -22,6 +22,9 @@ #elif defined(EEPROM_EMU_STM32F103xB) #define STM32F103xB #include "stm32f1xx.h" +#elif defined(EEPROM_EMU_STM32F072xB) + #define STM32F072xB + #include "stm32f0xx.h" #else #error "not implemented." #endif @@ -193,7 +196,7 @@ void FLASH_Lock(void) * This parameter can be any combination of the following values: * @arg FLASH_FLAG_PGERR: FLASH Programming error flag flag * @arg FLASH_FLAG_WRPERR: FLASH Write protected error flag - * @arg FLASH_FLAG_EOP: FLASH End of Programming flag + * @arg FLASH_FLAG_EOP: FLASH End of Programming flag * @retval None */ void FLASH_ClearFlag(uint32_t FLASH_FLAG) diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c index 4a119ccefee6..6027d69b78ea 100644 --- a/tmk_core/common/chibios/suspend.c +++ b/tmk_core/common/chibios/suspend.c @@ -82,7 +82,7 @@ void suspend_wakeup_init_user(void) { } */ __attribute__ ((weak)) void suspend_wakeup_init_kb(void) { - suspend_power_down_user(); + suspend_wakeup_init_user(); } /** \brief suspend wakeup condition diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index aab99290d212..d3884d9fa972 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -151,17 +151,17 @@ static void command_common_help(void) "0-9: Switch to Layer 0-9\n" #endif - STR(MAGIC_KEY_LAYER0_ALT1 ) ": Switch to Layer 0 (alternate key 1)\n" - STR(MAGIC_KEY_LAYER0_ALT2 ) ": Switch to Layer 0 (alternate key 2)\n" - STR(MAGIC_KEY_BOOTLOADER ) ": Jump to Bootloader (Reset)\n" + STR(MAGIC_KEY_LAYER0_ALT ) ": Switch to Layer 0 (alternate)\n" + + STR(MAGIC_KEY_BOOTLOADER ) ": Jump to Bootloader\n" + STR(MAGIC_KEY_BOOTLOADER_ALT) ": Jump to Bootloader (alternate)\n" #ifdef KEYBOARD_LOCK_ENABLE - STR(MAGIC_KEY_LOCK ) ": Lock\n" + STR(MAGIC_KEY_LOCK ) ": Lock Keyboard\n" #endif -#ifdef BOOTMAGIC_ENABLE STR(MAGIC_KEY_EEPROM ) ": Print EEPROM Settings\n" -#endif + STR(MAGIC_KEY_EEPROM_CLEAR) ": Clear EEPROM\n" #ifdef NKRO_ENABLE STR(MAGIC_KEY_NKRO ) ": NKRO Toggle\n" @@ -265,7 +265,6 @@ static void print_status(void) return; } -#ifdef BOOTMAGIC_ENABLE static void print_eeconfig(void) { @@ -305,7 +304,6 @@ static void print_eeconfig(void) #endif /* !NO_PRINT */ } -#endif /* BOOTMAGIC_ENABLE */ static bool command_common(uint8_t code) { @@ -326,14 +324,17 @@ static bool command_common(uint8_t code) break; #endif -#ifdef BOOTMAGIC_ENABLE - // print stored eeprom config case MAGIC_KC(MAGIC_KEY_EEPROM): print("eeconfig:\n"); print_eeconfig(); break; -#endif + + // clear eeprom + case MAGIC_KC(MAGIC_KEY_EEPROM_CLEAR): + print("Clearing EEPROM\n"); + eeconfig_init(); + break; #ifdef KEYBOARD_LOCK_ENABLE @@ -352,8 +353,8 @@ static bool command_common(uint8_t code) #endif // print help - case MAGIC_KC(MAGIC_KEY_HELP1): - case MAGIC_KC(MAGIC_KEY_HELP2): + case MAGIC_KC(MAGIC_KEY_HELP): + case MAGIC_KC(MAGIC_KEY_HELP_ALT): command_common_help(); break; @@ -370,6 +371,7 @@ static bool command_common(uint8_t code) // jump to bootloader case MAGIC_KC(MAGIC_KEY_BOOTLOADER): + case MAGIC_KC(MAGIC_KEY_BOOTLOADER_ALT): clear_keyboard(); // clear to prevent stuck keys print("\n\nJumping to bootloader... "); #ifdef AUDIO_ENABLE @@ -453,8 +455,7 @@ static bool command_common(uint8_t code) // switch layers - case MAGIC_KC(MAGIC_KEY_LAYER0_ALT1): - case MAGIC_KC(MAGIC_KEY_LAYER0_ALT2): + case MAGIC_KC(MAGIC_KEY_LAYER0_ALT): switch_default_layer(0); break; diff --git a/tmk_core/common/command.h b/tmk_core/common/command.h index 052e25184388..e7c7b0ea1d22 100644 --- a/tmk_core/common/command.h +++ b/tmk_core/common/command.h @@ -50,12 +50,12 @@ bool command_proc(uint8_t code); #define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false #endif -#ifndef MAGIC_KEY_HELP1 -#define MAGIC_KEY_HELP1 H +#ifndef MAGIC_KEY_HELP +#define MAGIC_KEY_HELP H #endif -#ifndef MAGIC_KEY_HELP2 -#define MAGIC_KEY_HELP2 SLASH +#ifndef MAGIC_KEY_HELP_ALT +#define MAGIC_KEY_HELP_ALT SLASH #endif #ifndef MAGIC_KEY_DEBUG @@ -86,18 +86,14 @@ bool command_proc(uint8_t code); #define MAGIC_KEY_CONSOLE C #endif -#ifndef MAGIC_KEY_LAYER0_ALT1 -#define MAGIC_KEY_LAYER0_ALT1 ESC -#endif - -#ifndef MAGIC_KEY_LAYER0_ALT2 -#define MAGIC_KEY_LAYER0_ALT2 GRAVE -#endif - #ifndef MAGIC_KEY_LAYER0 #define MAGIC_KEY_LAYER0 0 #endif +#ifndef MAGIC_KEY_LAYER0_ALT +#define MAGIC_KEY_LAYER0_ALT GRAVE +#endif + #ifndef MAGIC_KEY_LAYER1 #define MAGIC_KEY_LAYER1 1 #endif @@ -135,7 +131,11 @@ bool command_proc(uint8_t code); #endif #ifndef MAGIC_KEY_BOOTLOADER -#define MAGIC_KEY_BOOTLOADER PAUSE +#define MAGIC_KEY_BOOTLOADER B +#endif + +#ifndef MAGIC_KEY_BOOTLOADER_ALT +#define MAGIC_KEY_BOOTLOADER_ALT ESC #endif #ifndef MAGIC_KEY_LOCK @@ -146,6 +146,10 @@ bool command_proc(uint8_t code); #define MAGIC_KEY_EEPROM E #endif +#ifndef MAGIC_KEY_EEPROM_CLEAR +#define MAGIC_KEY_EEPROM_CLEAR BSPACE +#endif + #ifndef MAGIC_KEY_NKRO #define MAGIC_KEY_NKRO N #endif @@ -155,5 +159,5 @@ bool command_proc(uint8_t code); #endif -#define XMAGIC_KC(key) KC_##key -#define MAGIC_KC(key) XMAGIC_KC(key) +#define XMAGIC_KC(key) KC_ ## key +#define MAGIC_KC(key) XMAGIC_KC(key) diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 59b2bffbc714..30dc7a48d4c7 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -45,6 +45,11 @@ void eeconfig_init_quantum(void) { eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default eeprom_update_dword(EECONFIG_RGBLIGHT, 0); eeprom_update_byte(EECONFIG_STENOMODE, 0); + eeprom_update_dword(EECONFIG_HAPTIC, 0); + eeprom_update_byte(EECONFIG_VELOCIKEY, 0); +#ifdef EECONFIG_RGB_MATRIX + eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); +#endif eeconfig_init_kb(); } @@ -177,3 +182,9 @@ uint32_t eeconfig_read_user(void) { return eeprom_read_dword(EECONFIG_USER) void eeconfig_update_user(uint32_t val) { eeprom_update_dword(EECONFIG_USER, val); } +uint32_t eeconfig_read_haptic(void) { return eeprom_read_dword(EECONFIG_HAPTIC); } +/** \brief eeconfig update user + * + * FIXME: needs doc + */ +void eeconfig_update_haptic(uint32_t val) { eeprom_update_dword(EECONFIG_HAPTIC, val); } diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index eedd67602c69..0ac3dff07925 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h @@ -40,6 +40,9 @@ along with this program. If not, see . #define EECONFIG_HANDEDNESS (uint8_t *)14 #define EECONFIG_KEYBOARD (uint32_t *)15 #define EECONFIG_USER (uint32_t *)19 +#define EECONFIG_VELOCIKEY (uint8_t *)23 + +#define EECONFIG_HAPTIC (uint32_t*)24 /* debug bit */ #define EECONFIG_DEBUG_ENABLE (1<<0) @@ -94,4 +97,9 @@ void eeconfig_update_kb(uint32_t val); uint32_t eeconfig_read_user(void); void eeconfig_update_user(uint32_t val); +#ifdef HAPTIC_ENABLE +uint32_t eeconfig_read_haptic(void); +void eeconfig_update_haptic(uint32_t val); +#endif + #endif diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c index 6f659b2440a9..85d252548089 100644 --- a/tmk_core/common/keyboard.c +++ b/tmk_core/common/keyboard.c @@ -75,6 +75,12 @@ along with this program. If not, see . #ifdef QWIIC_ENABLE # include "qwiic.h" #endif +#ifdef OLED_DRIVER_ENABLE + #include "oled_driver.h" +#endif +#ifdef VELOCIKEY_ENABLE + #include "velocikey.h" +#endif #ifdef MATRIX_HAS_GHOST extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; @@ -139,6 +145,40 @@ __attribute__ ((weak)) void matrix_setup(void) { } +/** \brief keyboard_pre_init_user + * + * FIXME: needs doc + */ +__attribute__ ((weak)) +void keyboard_pre_init_user(void) { } + +/** \brief keyboard_pre_init_kb + * + * FIXME: needs doc + */ +__attribute__ ((weak)) +void keyboard_pre_init_kb(void) { + keyboard_pre_init_user(); +} + +/** \brief keyboard_post_init_user + * + * FIXME: needs doc + */ + +__attribute__ ((weak)) +void keyboard_post_init_user() {} + +/** \brief keyboard_post_init_kb + * + * FIXME: needs doc + */ + +__attribute__ ((weak)) +void keyboard_post_init_kb(void) { + keyboard_post_init_user(); +} + /** \brief keyboard_setup * * FIXME: needs doc @@ -146,6 +186,7 @@ void matrix_setup(void) { void keyboard_setup(void) { disable_jtag(); matrix_setup(); + keyboard_pre_init_kb(); } /** \brief is_keyboard_master @@ -167,6 +208,9 @@ void keyboard_init(void) { #ifdef QWIIC_ENABLE qwiic_init(); #endif +#ifdef OLED_DRIVER_ENABLE + oled_init(OLED_ROTATION_0); +#endif #ifdef PS2_MOUSE_ENABLE ps2_mouse_init(); #endif @@ -199,6 +243,7 @@ void keyboard_init(void) { #if defined(NKRO_ENABLE) && defined(FORCE_NKRO) keymap_config.nkro = 1; #endif + keyboard_post_init_kb(); /* Always keep this last */ } /** \brief Keyboard task: Do keyboard routine jobs @@ -216,9 +261,6 @@ void keyboard_init(void) { void keyboard_task(void) { static matrix_row_t matrix_prev[MATRIX_ROWS]; -#ifdef MATRIX_HAS_GHOST - // static matrix_row_t matrix_ghost[MATRIX_ROWS]; -#endif static uint8_t led_status = 0; matrix_row_t matrix_row = 0; matrix_row_t matrix_change = 0; @@ -226,25 +268,19 @@ void keyboard_task(void) uint8_t keys_processed = 0; #endif +#if defined(OLED_DRIVER_ENABLE) && !defined(OLED_DISABLE_TIMEOUT) + uint8_t ret = matrix_scan(); +#else matrix_scan(); +#endif + if (is_keyboard_master()) { for (uint8_t r = 0; r < MATRIX_ROWS; r++) { matrix_row = matrix_get_row(r); matrix_change = matrix_row ^ matrix_prev[r]; if (matrix_change) { #ifdef MATRIX_HAS_GHOST - if (has_ghost_in_row(r, matrix_row)) { - /* Keep track of whether ghosted status has changed for - * debugging. But don't update matrix_prev until un-ghosted, or - * the last key would be lost. - */ - //if (debug_matrix && matrix_ghost[r] != matrix_row) { - // matrix_print(); - //} - //matrix_ghost[r] = matrix_row; - continue; - } - //matrix_ghost[r] = matrix_row; + if (has_ghost_in_row(r, matrix_row)) { continue; } #endif if (debug_matrix) matrix_print(); for (uint8_t c = 0; c < MATRIX_COLS; c++) { @@ -280,6 +316,15 @@ void keyboard_task(void) qwiic_task(); #endif +#ifdef OLED_DRIVER_ENABLE + oled_task(); +#ifndef OLED_DISABLE_TIMEOUT + // Wake up oled if user is using those fabulous keys! + if (ret) + oled_on(); +#endif +#endif + #ifdef MOUSEKEY_ENABLE // mousekey repeat & acceleration mousekey_task(); @@ -313,6 +358,10 @@ void keyboard_task(void) midi_task(); #endif +#ifdef VELOCIKEY_ENABLE + if (velocikey_enabled()) { velocikey_decelerate(); } +#endif + // update LED if (led_status != host_keyboard_leds()) { led_status = host_keyboard_leds(); diff --git a/tmk_core/common/keyboard.h b/tmk_core/common/keyboard.h index ea2f336e9dc5..bf8b71fb78f7 100644 --- a/tmk_core/common/keyboard.h +++ b/tmk_core/common/keyboard.h @@ -70,6 +70,11 @@ void keyboard_set_leds(uint8_t leds); /* it runs whenever code has to behave differently on a slave */ bool is_keyboard_master(void); +void keyboard_pre_init_kb(void); +void keyboard_pre_init_user(void); +void keyboard_post_init_kb(void); +void keyboard_post_init_user(void); + #ifdef __cplusplus } #endif diff --git a/tmk_core/common/magic.c b/tmk_core/common/magic.c index 714acc0f5443..2b1a6a6ad256 100644 --- a/tmk_core/common/magic.c +++ b/tmk_core/common/magic.c @@ -33,6 +33,6 @@ void magic(void) uint8_t default_layer = 0; default_layer = eeconfig_read_default_layer(); - default_layer_set((uint32_t)default_layer); + default_layer_set((layer_state_t)default_layer); } diff --git a/tmk_core/common/mousekey.c b/tmk_core/common/mousekey.c index 581e7b8a0725..bb08576b9faf 100644 --- a/tmk_core/common/mousekey.c +++ b/tmk_core/common/mousekey.c @@ -23,13 +23,24 @@ along with this program. If not, see . #include "debug.h" #include "mousekey.h" +inline int8_t times_inv_sqrt2(int8_t x) { + // 181/256 is pretty close to 1/sqrt(2) + // 0.70703125 0.707106781 + // 1 too small for x=99 and x=198 + // This ends up being a mult and discard lower 8 bits + return (x * 181) >> 8; +} - -static report_mouse_t mouse_report = {}; -static uint8_t mousekey_repeat = 0; +static report_mouse_t mouse_report = {0}; +static void mousekey_debug(void); static uint8_t mousekey_accel = 0; +static uint8_t mousekey_repeat = 0; +static uint16_t last_timer = 0; + + + +#ifndef MK_3_SPEED -static void mousekey_debug(void); /* @@ -52,155 +63,263 @@ uint8_t mk_time_to_max = MOUSEKEY_TIME_TO_MAX; uint8_t mk_wheel_max_speed = MOUSEKEY_WHEEL_MAX_SPEED; uint8_t mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX; +static uint8_t move_unit(void) { + uint16_t unit; + if (mousekey_accel & (1<<0)) { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/4; + } else if (mousekey_accel & (1<<1)) { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/2; + } else if (mousekey_accel & (1<<2)) { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed); + } else if (mousekey_repeat == 0) { + unit = MOUSEKEY_MOVE_DELTA; + } else if (mousekey_repeat >= mk_time_to_max) { + unit = MOUSEKEY_MOVE_DELTA * mk_max_speed; + } else { + unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed * mousekey_repeat) / mk_time_to_max; + } + return (unit > MOUSEKEY_MOVE_MAX ? MOUSEKEY_MOVE_MAX : (unit == 0 ? 1 : unit)); +} -static uint16_t last_timer = 0; +static uint8_t wheel_unit(void) { + uint16_t unit; + if (mousekey_accel & (1<<0)) { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/4; + } else if (mousekey_accel & (1<<1)) { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/2; + } else if (mousekey_accel & (1<<2)) { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed); + } else if (mousekey_repeat == 0) { + unit = MOUSEKEY_WHEEL_DELTA; + } else if (mousekey_repeat >= mk_wheel_time_to_max) { + unit = MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed; + } else { + unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed * mousekey_repeat) / mk_wheel_time_to_max; + } + return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit)); +} -inline int8_t times_inv_sqrt2(int8_t x) -{ - // 181/256 is pretty close to 1/sqrt(2) - // 0.70703125 0.707106781 - // 1 too small for x=99 and x=198 - // This ends up being a mult and discard lower 8 bits - return (x * 181) >> 8; +void mousekey_task(void) { + if (timer_elapsed(last_timer) < (mousekey_repeat ? mk_interval : mk_delay*10)) { + return; + } + if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0) { + return; + } + if (mousekey_repeat != UINT8_MAX) mousekey_repeat++; + if (mouse_report.x > 0) mouse_report.x = move_unit(); + if (mouse_report.x < 0) mouse_report.x = move_unit() * -1; + if (mouse_report.y > 0) mouse_report.y = move_unit(); + if (mouse_report.y < 0) mouse_report.y = move_unit() * -1; + /* diagonal move [1/sqrt(2)] */ + if (mouse_report.x && mouse_report.y) { + mouse_report.x = times_inv_sqrt2(mouse_report.x); + if (mouse_report.x == 0) { mouse_report.x = 1; } + mouse_report.y = times_inv_sqrt2(mouse_report.y); + if (mouse_report.y == 0) { mouse_report.y = 1; } + } + if (mouse_report.v > 0) mouse_report.v = wheel_unit(); + if (mouse_report.v < 0) mouse_report.v = wheel_unit() * -1; + if (mouse_report.h > 0) mouse_report.h = wheel_unit(); + if (mouse_report.h < 0) mouse_report.h = wheel_unit() * -1; + mousekey_send(); } -static uint8_t move_unit(void) -{ - uint16_t unit; - if (mousekey_accel & (1<<0)) { - unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/4; - } else if (mousekey_accel & (1<<1)) { - unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed)/2; - } else if (mousekey_accel & (1<<2)) { - unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed); - } else if (mousekey_repeat == 0) { - unit = MOUSEKEY_MOVE_DELTA; - } else if (mousekey_repeat >= mk_time_to_max) { - unit = MOUSEKEY_MOVE_DELTA * mk_max_speed; - } else { - unit = (MOUSEKEY_MOVE_DELTA * mk_max_speed * mousekey_repeat) / mk_time_to_max; - } - return (unit > MOUSEKEY_MOVE_MAX ? MOUSEKEY_MOVE_MAX : (unit == 0 ? 1 : unit)); +void mousekey_on(uint8_t code) { + if (code == KC_MS_UP) mouse_report.y = move_unit() * -1; + else if (code == KC_MS_DOWN) mouse_report.y = move_unit(); + else if (code == KC_MS_LEFT) mouse_report.x = move_unit() * -1; + else if (code == KC_MS_RIGHT) mouse_report.x = move_unit(); + else if (code == KC_MS_WH_UP) mouse_report.v = wheel_unit(); + else if (code == KC_MS_WH_DOWN) mouse_report.v = wheel_unit() * -1; + else if (code == KC_MS_WH_LEFT) mouse_report.h = wheel_unit() * -1; + else if (code == KC_MS_WH_RIGHT) mouse_report.h = wheel_unit(); + else if (code == KC_MS_BTN1) mouse_report.buttons |= MOUSE_BTN1; + else if (code == KC_MS_BTN2) mouse_report.buttons |= MOUSE_BTN2; + else if (code == KC_MS_BTN3) mouse_report.buttons |= MOUSE_BTN3; + else if (code == KC_MS_BTN4) mouse_report.buttons |= MOUSE_BTN4; + else if (code == KC_MS_BTN5) mouse_report.buttons |= MOUSE_BTN5; + else if (code == KC_MS_ACCEL0) mousekey_accel |= (1<<0); + else if (code == KC_MS_ACCEL1) mousekey_accel |= (1<<1); + else if (code == KC_MS_ACCEL2) mousekey_accel |= (1<<2); } -static uint8_t wheel_unit(void) -{ - uint16_t unit; - if (mousekey_accel & (1<<0)) { - unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/4; - } else if (mousekey_accel & (1<<1)) { - unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed)/2; - } else if (mousekey_accel & (1<<2)) { - unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed); - } else if (mousekey_repeat == 0) { - unit = MOUSEKEY_WHEEL_DELTA; - } else if (mousekey_repeat >= mk_wheel_time_to_max) { - unit = MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed; - } else { - unit = (MOUSEKEY_WHEEL_DELTA * mk_wheel_max_speed * mousekey_repeat) / mk_wheel_time_to_max; - } - return (unit > MOUSEKEY_WHEEL_MAX ? MOUSEKEY_WHEEL_MAX : (unit == 0 ? 1 : unit)); +void mousekey_off(uint8_t code) { + if (code == KC_MS_UP && mouse_report.y < 0) mouse_report.y = 0; + else if (code == KC_MS_DOWN && mouse_report.y > 0) mouse_report.y = 0; + else if (code == KC_MS_LEFT && mouse_report.x < 0) mouse_report.x = 0; + else if (code == KC_MS_RIGHT && mouse_report.x > 0) mouse_report.x = 0; + else if (code == KC_MS_WH_UP && mouse_report.v > 0) mouse_report.v = 0; + else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) mouse_report.v = 0; + else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) mouse_report.h = 0; + else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) mouse_report.h = 0; + else if (code == KC_MS_BTN1) mouse_report.buttons &= ~MOUSE_BTN1; + else if (code == KC_MS_BTN2) mouse_report.buttons &= ~MOUSE_BTN2; + else if (code == KC_MS_BTN3) mouse_report.buttons &= ~MOUSE_BTN3; + else if (code == KC_MS_BTN4) mouse_report.buttons &= ~MOUSE_BTN4; + else if (code == KC_MS_BTN5) mouse_report.buttons &= ~MOUSE_BTN5; + else if (code == KC_MS_ACCEL0) mousekey_accel &= ~(1<<0); + else if (code == KC_MS_ACCEL1) mousekey_accel &= ~(1<<1); + else if (code == KC_MS_ACCEL2) mousekey_accel &= ~(1<<2); + if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0) + mousekey_repeat = 0; } -void mousekey_task(void) -{ - if (timer_elapsed(last_timer) < (mousekey_repeat ? mk_interval : mk_delay*10)) - return; - if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0) - return; - if (mousekey_repeat != UINT8_MAX) - mousekey_repeat++; + +#else /* #ifndef MK_3_SPEED */ - if (mouse_report.x > 0) mouse_report.x = move_unit(); - if (mouse_report.x < 0) mouse_report.x = move_unit() * -1; - if (mouse_report.y > 0) mouse_report.y = move_unit(); - if (mouse_report.y < 0) mouse_report.y = move_unit() * -1; - /* diagonal move [1/sqrt(2)] */ - if (mouse_report.x && mouse_report.y) { - mouse_report.x = times_inv_sqrt2(mouse_report.x); - mouse_report.x = mouse_report.x == 0 ? 1 : mouse_report.x; - mouse_report.y = times_inv_sqrt2(mouse_report.y); - mouse_report.y = mouse_report.y == 0 ? 1 : mouse_report.y; - } +enum { + mkspd_unmod, + mkspd_0, + mkspd_1, + mkspd_2, + mkspd_COUNT +}; +#ifndef MK_MOMENTARY_ACCEL +static uint8_t mk_speed = mkspd_1; +#else +static uint8_t mk_speed = mkspd_unmod; +static uint8_t mkspd_DEFAULT = mkspd_unmod; +#endif +static uint16_t last_timer_c = 0; +static uint16_t last_timer_w = 0; +uint16_t c_offsets[mkspd_COUNT] = { + MK_C_OFFSET_UNMOD, MK_C_OFFSET_0, MK_C_OFFSET_1, MK_C_OFFSET_2 +}; +uint16_t c_intervals[mkspd_COUNT] = { + MK_C_INTERVAL_UNMOD, MK_C_INTERVAL_0, MK_C_INTERVAL_1, MK_C_INTERVAL_2 +}; +uint16_t w_offsets[mkspd_COUNT] = { + MK_W_OFFSET_UNMOD, MK_W_OFFSET_0, MK_W_OFFSET_1, MK_W_OFFSET_2 +}; +uint16_t w_intervals[mkspd_COUNT] = { + MK_W_INTERVAL_UNMOD, MK_W_INTERVAL_0, MK_W_INTERVAL_1, MK_W_INTERVAL_2 +}; - if (mouse_report.v > 0) mouse_report.v = wheel_unit(); - if (mouse_report.v < 0) mouse_report.v = wheel_unit() * -1; - if (mouse_report.h > 0) mouse_report.h = wheel_unit(); - if (mouse_report.h < 0) mouse_report.h = wheel_unit() * -1; - mousekey_send(); +void mousekey_task(void) { + // report cursor and scroll movement independently + report_mouse_t const tmpmr = mouse_report; + if ((mouse_report.x || mouse_report.y) && timer_elapsed(last_timer_c) > c_intervals[mk_speed]) { + mouse_report.h = 0; + mouse_report.v = 0; + mousekey_send(); + last_timer_c = last_timer; + mouse_report = tmpmr; + } + if ((mouse_report.h || mouse_report.v) && timer_elapsed(last_timer_w) > w_intervals[mk_speed]) { + mouse_report.x = 0; + mouse_report.y = 0; + mousekey_send(); + last_timer_w = last_timer; + mouse_report = tmpmr; + } } -void mousekey_on(uint8_t code) -{ - if (code == KC_MS_UP) mouse_report.y = move_unit() * -1; - else if (code == KC_MS_DOWN) mouse_report.y = move_unit(); - else if (code == KC_MS_LEFT) mouse_report.x = move_unit() * -1; - else if (code == KC_MS_RIGHT) mouse_report.x = move_unit(); - else if (code == KC_MS_WH_UP) mouse_report.v = wheel_unit(); - else if (code == KC_MS_WH_DOWN) mouse_report.v = wheel_unit() * -1; - else if (code == KC_MS_WH_LEFT) mouse_report.h = wheel_unit() * -1; - else if (code == KC_MS_WH_RIGHT) mouse_report.h = wheel_unit(); - else if (code == KC_MS_BTN1) mouse_report.buttons |= MOUSE_BTN1; - else if (code == KC_MS_BTN2) mouse_report.buttons |= MOUSE_BTN2; - else if (code == KC_MS_BTN3) mouse_report.buttons |= MOUSE_BTN3; - else if (code == KC_MS_BTN4) mouse_report.buttons |= MOUSE_BTN4; - else if (code == KC_MS_BTN5) mouse_report.buttons |= MOUSE_BTN5; - else if (code == KC_MS_ACCEL0) mousekey_accel |= (1<<0); - else if (code == KC_MS_ACCEL1) mousekey_accel |= (1<<1); - else if (code == KC_MS_ACCEL2) mousekey_accel |= (1<<2); +void adjust_speed(void) { + uint16_t const c_offset = c_offsets[mk_speed]; + uint16_t const w_offset = w_offsets[mk_speed]; + if (mouse_report.x > 0) mouse_report.x = c_offset; + if (mouse_report.x < 0) mouse_report.x = c_offset * -1; + if (mouse_report.y > 0) mouse_report.y = c_offset; + if (mouse_report.y < 0) mouse_report.y = c_offset * -1; + if (mouse_report.h > 0) mouse_report.h = w_offset; + if (mouse_report.h < 0) mouse_report.h = w_offset * -1; + if (mouse_report.v > 0) mouse_report.v = w_offset; + if (mouse_report.v < 0) mouse_report.v = w_offset * -1; + // adjust for diagonals + if (mouse_report.x && mouse_report.y) { + mouse_report.x = times_inv_sqrt2(mouse_report.x); + if (mouse_report.x == 0) { mouse_report.x = 1; } + mouse_report.y = times_inv_sqrt2(mouse_report.y); + if (mouse_report.y == 0) { mouse_report.y = 1; } + } + if (mouse_report.h && mouse_report.v) { + mouse_report.h = times_inv_sqrt2(mouse_report.h); + mouse_report.v = times_inv_sqrt2(mouse_report.v); + } } -void mousekey_off(uint8_t code) -{ - if (code == KC_MS_UP && mouse_report.y < 0) mouse_report.y = 0; - else if (code == KC_MS_DOWN && mouse_report.y > 0) mouse_report.y = 0; - else if (code == KC_MS_LEFT && mouse_report.x < 0) mouse_report.x = 0; - else if (code == KC_MS_RIGHT && mouse_report.x > 0) mouse_report.x = 0; - else if (code == KC_MS_WH_UP && mouse_report.v > 0) mouse_report.v = 0; - else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) mouse_report.v = 0; - else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) mouse_report.h = 0; - else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) mouse_report.h = 0; - else if (code == KC_MS_BTN1) mouse_report.buttons &= ~MOUSE_BTN1; - else if (code == KC_MS_BTN2) mouse_report.buttons &= ~MOUSE_BTN2; - else if (code == KC_MS_BTN3) mouse_report.buttons &= ~MOUSE_BTN3; - else if (code == KC_MS_BTN4) mouse_report.buttons &= ~MOUSE_BTN4; - else if (code == KC_MS_BTN5) mouse_report.buttons &= ~MOUSE_BTN5; - else if (code == KC_MS_ACCEL0) mousekey_accel &= ~(1<<0); - else if (code == KC_MS_ACCEL1) mousekey_accel &= ~(1<<1); - else if (code == KC_MS_ACCEL2) mousekey_accel &= ~(1<<2); - - if (mouse_report.x == 0 && mouse_report.y == 0 && mouse_report.v == 0 && mouse_report.h == 0) - mousekey_repeat = 0; +void mousekey_on(uint8_t code) { + uint16_t const c_offset = c_offsets[mk_speed]; + uint16_t const w_offset = w_offsets[mk_speed]; + uint8_t const old_speed = mk_speed; + if (code == KC_MS_UP) mouse_report.y = c_offset * -1; + else if (code == KC_MS_DOWN) mouse_report.y = c_offset; + else if (code == KC_MS_LEFT) mouse_report.x = c_offset * -1; + else if (code == KC_MS_RIGHT) mouse_report.x = c_offset; + else if (code == KC_MS_WH_UP) mouse_report.v = w_offset; + else if (code == KC_MS_WH_DOWN) mouse_report.v = w_offset * -1; + else if (code == KC_MS_WH_LEFT) mouse_report.h = w_offset * -1; + else if (code == KC_MS_WH_RIGHT) mouse_report.h = w_offset; + else if (code == KC_MS_BTN1) mouse_report.buttons |= MOUSE_BTN1; + else if (code == KC_MS_BTN2) mouse_report.buttons |= MOUSE_BTN2; + else if (code == KC_MS_BTN3) mouse_report.buttons |= MOUSE_BTN3; + else if (code == KC_MS_BTN4) mouse_report.buttons |= MOUSE_BTN4; + else if (code == KC_MS_BTN5) mouse_report.buttons |= MOUSE_BTN5; + else if (code == KC_MS_ACCEL0) mk_speed = mkspd_0; + else if (code == KC_MS_ACCEL1) mk_speed = mkspd_1; + else if (code == KC_MS_ACCEL2) mk_speed = mkspd_2; + if (mk_speed != old_speed) adjust_speed(); } -void mousekey_send(void) -{ - mousekey_debug(); - host_mouse_send(&mouse_report); - last_timer = timer_read(); +void mousekey_off(uint8_t code) { +#ifdef MK_MOMENTARY_ACCEL + uint8_t const old_speed = mk_speed; +#endif + if (code == KC_MS_UP && mouse_report.y < 0) mouse_report.y = 0; + else if (code == KC_MS_DOWN && mouse_report.y > 0) mouse_report.y = 0; + else if (code == KC_MS_LEFT && mouse_report.x < 0) mouse_report.x = 0; + else if (code == KC_MS_RIGHT && mouse_report.x > 0) mouse_report.x = 0; + else if (code == KC_MS_WH_UP && mouse_report.v > 0) mouse_report.v = 0; + else if (code == KC_MS_WH_DOWN && mouse_report.v < 0) mouse_report.v = 0; + else if (code == KC_MS_WH_LEFT && mouse_report.h < 0) mouse_report.h = 0; + else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0) mouse_report.h = 0; + else if (code == KC_MS_BTN1) mouse_report.buttons &= ~MOUSE_BTN1; + else if (code == KC_MS_BTN2) mouse_report.buttons &= ~MOUSE_BTN2; + else if (code == KC_MS_BTN3) mouse_report.buttons &= ~MOUSE_BTN3; + else if (code == KC_MS_BTN4) mouse_report.buttons &= ~MOUSE_BTN4; + else if (code == KC_MS_BTN5) mouse_report.buttons &= ~MOUSE_BTN5; +#ifdef MK_MOMENTARY_ACCEL + else if (code == KC_MS_ACCEL0) mk_speed = mkspd_DEFAULT; + else if (code == KC_MS_ACCEL1) mk_speed = mkspd_DEFAULT; + else if (code == KC_MS_ACCEL2) mk_speed = mkspd_DEFAULT; + if (mk_speed != old_speed) adjust_speed(); +#endif } -void mousekey_clear(void) -{ - mouse_report = (report_mouse_t){}; - mousekey_repeat = 0; - mousekey_accel = 0; + + + +#endif /* #ifndef MK_3_SPEED */ + + + + +void mousekey_send(void) { + mousekey_debug(); + host_mouse_send(&mouse_report); + last_timer = timer_read(); +} + +void mousekey_clear(void) { + mouse_report = (report_mouse_t){}; + mousekey_repeat = 0; + mousekey_accel = 0; } -static void mousekey_debug(void) -{ - if (!debug_mouse) return; - print("mousekey [btn|x y v h](rep/acl): ["); - phex(mouse_report.buttons); print("|"); - print_decs(mouse_report.x); print(" "); - print_decs(mouse_report.y); print(" "); - print_decs(mouse_report.v); print(" "); - print_decs(mouse_report.h); print("]("); - print_dec(mousekey_repeat); print("/"); - print_dec(mousekey_accel); print(")\n"); +static void mousekey_debug(void) { + if (!debug_mouse) return; + print("mousekey [btn|x y v h](rep/acl): ["); + phex(mouse_report.buttons); print("|"); + print_decs(mouse_report.x); print(" "); + print_decs(mouse_report.y); print(" "); + print_decs(mouse_report.v); print(" "); + print_decs(mouse_report.h); print("]("); + print_dec(mousekey_repeat); print("/"); + print_dec(mousekey_accel); print(")\n"); } diff --git a/tmk_core/common/mousekey.h b/tmk_core/common/mousekey.h index 9338d0af7799..89c1eaf11a5f 100644 --- a/tmk_core/common/mousekey.h +++ b/tmk_core/common/mousekey.h @@ -16,23 +16,25 @@ along with this program. If not, see . */ #ifndef MOUSEKEY_H -#define MOUSEKEY_H +#define MOUSEKEY_H +#endif #include #include "host.h" +#ifndef MK_3_SPEED /* max value on report descriptor */ #ifndef MOUSEKEY_MOVE_MAX - #define MOUSEKEY_MOVE_MAX 127 + #define MOUSEKEY_MOVE_MAX 127 #elif MOUSEKEY_MOVE_MAX > 127 - #error MOUSEKEY_MOVE_MAX needs to be smaller than 127 + #error MOUSEKEY_MOVE_MAX needs to be smaller than 127 #endif #ifndef MOUSEKEY_WHEEL_MAX - #define MOUSEKEY_WHEEL_MAX 127 + #define MOUSEKEY_WHEEL_MAX 127 #elif MOUSEKEY_WHEEL_MAX > 127 - #error MOUSEKEY_WHEEL_MAX needs to be smaller than 127 + #error MOUSEKEY_WHEEL_MAX needs to be smaller than 127 #endif #ifndef MOUSEKEY_MOVE_DELTA @@ -60,6 +62,59 @@ along with this program. If not, see . #define MOUSEKEY_WHEEL_TIME_TO_MAX 40 #endif +#else /* #ifndef MK_3_SPEED */ + +#ifndef MK_C_OFFSET_UNMOD +#define MK_C_OFFSET_UNMOD 16 +#endif +#ifndef MK_C_INTERVAL_UNMOD +#define MK_C_INTERVAL_UNMOD 16 +#endif +#ifndef MK_C_OFFSET_0 +#define MK_C_OFFSET_0 1 +#endif +#ifndef MK_C_INTERVAL_0 +#define MK_C_INTERVAL_0 32 +#endif +#ifndef MK_C_OFFSET_1 +#define MK_C_OFFSET_1 4 +#endif +#ifndef MK_C_INTERVAL_1 +#define MK_C_INTERVAL_1 16 +#endif +#ifndef MK_C_OFFSET_2 +#define MK_C_OFFSET_2 32 +#endif +#ifndef MK_C_INTERVAL_2 +#define MK_C_INTERVAL_2 16 +#endif + +#ifndef MK_W_OFFSET_UNMOD +#define MK_W_OFFSET_UNMOD 1 +#endif +#ifndef MK_W_INTERVAL_UNMOD +#define MK_W_INTERVAL_UNMOD 40 +#endif +#ifndef MK_W_OFFSET_0 +#define MK_W_OFFSET_0 1 +#endif +#ifndef MK_W_INTERVAL_0 +#define MK_W_INTERVAL_0 360 +#endif +#ifndef MK_W_OFFSET_1 +#define MK_W_OFFSET_1 1 +#endif +#ifndef MK_W_INTERVAL_1 +#define MK_W_INTERVAL_1 120 +#endif +#ifndef MK_W_OFFSET_2 +#define MK_W_OFFSET_2 1 +#endif +#ifndef MK_W_INTERVAL_2 +#define MK_W_INTERVAL_2 20 +#endif + +#endif /* #ifndef MK_3_SPEED */ #ifdef __cplusplus extern "C" { @@ -72,7 +127,6 @@ extern uint8_t mk_time_to_max; extern uint8_t mk_wheel_max_speed; extern uint8_t mk_wheel_time_to_max; - void mousekey_task(void); void mousekey_on(uint8_t code); void mousekey_off(uint8_t code); @@ -82,5 +136,3 @@ void mousekey_send(void); #ifdef __cplusplus } #endif - -#endif diff --git a/tmk_core/make_dfu_header.sh b/tmk_core/make_dfu_header.sh new file mode 100755 index 000000000000..49ba66251a0a --- /dev/null +++ b/tmk_core/make_dfu_header.sh @@ -0,0 +1,16 @@ +#!/bin/sh +ALL_CONFIGS=$* +GREP="grep" + +cat <<- EOF > lib/lufa/Bootloaders/DFU/Keyboard.h +#ifndef QMK_KEYBOARD +#define QMK_KEYBOARD + +$($GREP "MANUFACTURER[ \t]" $ALL_CONFIGS -h | tail -1) +$($GREP "PRODUCT[ \t]" $ALL_CONFIGS -h | tail -1 | tr -d '\r') Bootloader +$($GREP "QMK_ESC_OUTPUT[ \t]" $ALL_CONFIGS -h | tail -1) +$($GREP "QMK_ESC_INPUT[ \t]" $ALL_CONFIGS -h | tail -1) +$($GREP "QMK_LED[ \t]" $ALL_CONFIGS -h | tail -1) +$($GREP "QMK_SPEAKER[ \t]" $ALL_CONFIGS -h | tail -1) +#endif +EOF diff --git a/tmk_core/protocol/arm_atsam.mk b/tmk_core/protocol/arm_atsam.mk index 04e02790a0dc..8d6f724f0996 100644 --- a/tmk_core/protocol/arm_atsam.mk +++ b/tmk_core/protocol/arm_atsam.mk @@ -4,7 +4,10 @@ SRC += $(ARM_ATSAM_DIR)/adc.c SRC += $(ARM_ATSAM_DIR)/clks.c SRC += $(ARM_ATSAM_DIR)/d51_util.c SRC += $(ARM_ATSAM_DIR)/i2c_master.c -SRC += $(ARM_ATSAM_DIR)/led_matrix.c +ifeq ($(RGB_MATRIX_ENABLE),custom) + SRC += $(ARM_ATSAM_DIR)/led_matrix_programs.c + SRC += $(ARM_ATSAM_DIR)/led_matrix.c +endif SRC += $(ARM_ATSAM_DIR)/main_arm_atsam.c SRC += $(ARM_ATSAM_DIR)/spi.c SRC += $(ARM_ATSAM_DIR)/startup.c diff --git a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h index 928af8c7e170..88109186aad9 100644 --- a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h +++ b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h @@ -34,7 +34,10 @@ along with this program. If not, see . #ifndef MD_BOOTLOADER #include "main_arm_atsam.h" +#ifdef RGB_MATRIX_ENABLE #include "led_matrix.h" +#include "rgb_matrix.h" +#endif #include "issi3733_driver.h" #include "./usb/compiler.h" #include "./usb/udc.h" diff --git a/tmk_core/protocol/arm_atsam/i2c_master.c b/tmk_core/protocol/arm_atsam/i2c_master.c index d91a851f3776..1741d9ac5b02 100644 --- a/tmk_core/protocol/arm_atsam/i2c_master.c +++ b/tmk_core/protocol/arm_atsam/i2c_master.c @@ -17,7 +17,7 @@ along with this program. If not, see . #include "arm_atsam_protocol.h" -#ifndef MD_BOOTLOADER +#if !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE) #include @@ -37,7 +37,7 @@ static uint8_t dma_sendbuf[I2C_DMA_MAX_SEND]; //Data being written to I2C volatile uint8_t i2c_led_q_running; -#endif //MD_BOOTLOADER +#endif // !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE) void i2c0_init(void) { @@ -112,7 +112,7 @@ void i2c0_stop(void) } } -#ifndef MD_BOOTLOADER +#if !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE) void i2c1_init(void) { DBGC(DC_I2C1_INIT_BEGIN); @@ -583,4 +583,4 @@ uint8_t i2c_led_q_run(void) return 1; } -#endif //MD_BOOTLOADER +#endif // !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE) diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index 04d05af6db65..42dfccbc50f0 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c @@ -17,9 +17,17 @@ along with this program. If not, see . #include "arm_atsam_protocol.h" #include "tmk_core/common/led.h" +#include "rgb_matrix.h" #include #include +#ifdef USE_MASSDROP_CONFIGURATOR +__attribute__((weak)) +led_instruction_t led_instructions[] = { { .end = 1 } }; +static void led_matrix_massdrop_config_override(int i); +#endif // USE_MASSDROP_CONFIGURATOR + + void SERCOM1_0_Handler( void ) { if (SERCOM1->I2CM.INTFLAG.bit.ERROR) @@ -51,14 +59,17 @@ void DMAC_0_Handler( void ) issi3733_driver_t issidrv[ISSI3733_DRIVER_COUNT]; -issi3733_led_t led_map[ISSI3733_LED_COUNT+1] = ISSI3733_LED_MAP; -issi3733_led_t *lede = led_map + ISSI3733_LED_COUNT; //End pointer of mapping +issi3733_led_t led_map[ISSI3733_LED_COUNT] = ISSI3733_LED_MAP; +RGB led_buffer[ISSI3733_LED_COUNT]; uint8_t gcr_desired; -uint8_t gcr_breathe; -uint8_t gcr_use; uint8_t gcr_actual; uint8_t gcr_actual_last; +#ifdef USE_MASSDROP_CONFIGURATOR +uint8_t gcr_breathe; +float breathe_mult; +float pomod; +#endif #define ACT_GCR_NONE 0 #define ACT_GCR_INC 1 @@ -73,11 +84,14 @@ static uint8_t v_5v_cat_hit; void gcr_compute(void) { uint8_t action = ACT_GCR_NONE; + uint8_t gcr_use = gcr_desired; +#ifdef USE_MASSDROP_CONFIGURATOR if (led_animation_breathing) + { gcr_use = gcr_breathe; - else - gcr_use = gcr_desired; + } +#endif //If the 5v takes a catastrophic hit, disable the LED drivers briefly, assert auto gcr mode, min gcr and let the auto take over if (v_5v < V5_CAT) @@ -151,6 +165,7 @@ void gcr_compute(void) gcr_actual -= LED_GCR_STEP_AUTO; gcr_min_counter = 0; +#ifdef USE_MASSDROP_CONFIGURATOR //If breathe mode is active, the top end can fluctuate if the host can not supply enough current //So set the breathe GCR to where it becomes stable if (led_animation_breathing == 1) @@ -160,12 +175,11 @@ void gcr_compute(void) // and the same would happen maybe one or two more times. Therefore I'm favoring // powering through one full breathe and letting gcr settle completely } +#endif } } } -led_disp_t disp; - void issi3733_prepare_arrays(void) { memset(issidrv,0,sizeof(issi3733_driver_t) * ISSI3733_DRIVER_COUNT); @@ -178,361 +192,309 @@ void issi3733_prepare_arrays(void) issidrv[i].addr = addrs[i]; } - issi3733_led_t *cur = led_map; - - while (cur < lede) + for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) { //BYTE: 1 + (SW-1)*16 + (CS-1) - cur->rgb.g = issidrv[cur->adr.drv-1].pwm + 1 + ((cur->adr.swg-1)*16 + (cur->adr.cs-1)); - cur->rgb.r = issidrv[cur->adr.drv-1].pwm + 1 + ((cur->adr.swr-1)*16 + (cur->adr.cs-1)); - cur->rgb.b = issidrv[cur->adr.drv-1].pwm + 1 + ((cur->adr.swb-1)*16 + (cur->adr.cs-1)); + led_map[i].rgb.g = issidrv[led_map[i].adr.drv-1].pwm + 1 + ((led_map[i].adr.swg-1)*16 + (led_map[i].adr.cs-1)); + led_map[i].rgb.r = issidrv[led_map[i].adr.drv-1].pwm + 1 + ((led_map[i].adr.swr-1)*16 + (led_map[i].adr.cs-1)); + led_map[i].rgb.b = issidrv[led_map[i].adr.drv-1].pwm + 1 + ((led_map[i].adr.swb-1)*16 + (led_map[i].adr.cs-1)); //BYTE: 1 + (SW-1)*2 + (CS-1)/8 //BIT: (CS-1)%8 - *(issidrv[cur->adr.drv-1].onoff + 1 + (cur->adr.swg-1)*2+(cur->adr.cs-1)/8) |= (1<<((cur->adr.cs-1)%8)); - *(issidrv[cur->adr.drv-1].onoff + 1 + (cur->adr.swr-1)*2+(cur->adr.cs-1)/8) |= (1<<((cur->adr.cs-1)%8)); - *(issidrv[cur->adr.drv-1].onoff + 1 + (cur->adr.swb-1)*2+(cur->adr.cs-1)/8) |= (1<<((cur->adr.cs-1)%8)); - - cur++; + *(issidrv[led_map[i].adr.drv-1].onoff + 1 + (led_map[i].adr.swg-1)*2+(led_map[i].adr.cs-1)/8) |= (1<<((led_map[i].adr.cs-1)%8)); + *(issidrv[led_map[i].adr.drv-1].onoff + 1 + (led_map[i].adr.swr-1)*2+(led_map[i].adr.cs-1)/8) |= (1<<((led_map[i].adr.cs-1)%8)); + *(issidrv[led_map[i].adr.drv-1].onoff + 1 + (led_map[i].adr.swb-1)*2+(led_map[i].adr.cs-1)/8) |= (1<<((led_map[i].adr.cs-1)%8)); } } -void disp_calc_extents(void) +void led_matrix_prepare(void) { - issi3733_led_t *cur = led_map; - - disp.left = 1e10; - disp.right = -1e10; - disp.top = -1e10; - disp.bottom = 1e10; - - while (cur < lede) + for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) { - if (cur->x < disp.left) disp.left = cur->x; - if (cur->x > disp.right) disp.right = cur->x; - if (cur->y < disp.bottom) disp.bottom = cur->y; - if (cur->y > disp.top) disp.top = cur->y; - - cur++; + *led_map[i].rgb.r = 0; + *led_map[i].rgb.g = 0; + *led_map[i].rgb.b = 0; } - - disp.width = disp.right - disp.left; - disp.height = disp.top - disp.bottom; - disp.max_distance = sqrtf(powf(disp.width, 2) + powf(disp.height, 2)); } -void disp_pixel_setup(void) +void led_set_one(int i, uint8_t r, uint8_t g, uint8_t b) { - issi3733_led_t *cur = led_map; - - while (cur < lede) + if (i < ISSI3733_LED_COUNT) { - cur->px = (cur->x - disp.left) / disp.width * 100; - cur->py = (cur->y - disp.bottom) / disp.height * 100; - *cur->rgb.r = 0; - *cur->rgb.g = 0; - *cur->rgb.b = 0; - - cur++; +#ifdef USE_MASSDROP_CONFIGURATOR + led_matrix_massdrop_config_override(i); +#else + led_buffer[i].r = r; + led_buffer[i].g = g; + led_buffer[i].b = b; +#endif } } -void led_matrix_prepare(void) +void led_set_all(uint8_t r, uint8_t g, uint8_t b) { - disp_calc_extents(); - disp_pixel_setup(); + for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) + { + led_set_one(i, r, g, b); + } } -uint8_t led_enabled; -float led_animation_speed; -uint8_t led_animation_direction; -uint8_t led_animation_orientation; -uint8_t led_animation_breathing; -uint8_t led_animation_breathe_cur; -uint8_t breathe_step; -uint8_t breathe_dir; -uint8_t led_animation_circular; -uint64_t led_next_run; - -uint8_t led_animation_id; -uint8_t led_lighting_mode; - -issi3733_led_t *led_cur; -uint8_t led_per_run = 15; -float breathe_mult; - -__attribute__ ((weak)) -void led_matrix_run(void) +void init(void) { - float ro; - float go; - float bo; - float po; - - uint8_t led_this_run = 0; - led_setup_t *f = (led_setup_t*)led_setups[led_animation_id]; - - if (led_cur == 0) //Denotes start of new processing cycle in the case of chunked processing - { - led_cur = led_map; + DBGC(DC_LED_MATRIX_INIT_BEGIN); - disp.frame += 1; + issi3733_prepare_arrays(); - breathe_mult = 1; + led_matrix_prepare(); - if (led_animation_breathing) - { - led_animation_breathe_cur += breathe_step * breathe_dir; + gcr_min_counter = 0; + v_5v_cat_hit = 0; - if (led_animation_breathe_cur >= BREATHE_MAX_STEP) - breathe_dir = -1; - else if (led_animation_breathe_cur <= BREATHE_MIN_STEP) - breathe_dir = 1; + DBGC(DC_LED_MATRIX_INIT_COMPLETE); +} - //Brightness curve created for 256 steps, 0 - ~98% - breathe_mult = 0.000015 * led_animation_breathe_cur * led_animation_breathe_cur; - if (breathe_mult > 1) breathe_mult = 1; - else if (breathe_mult < 0) breathe_mult = 0; - } - } +void flush(void) +{ +#ifdef USE_MASSDROP_CONFIGURATOR + if (!led_enabled) { return; } //Prevent calculations and I2C traffic if LED drivers are not enabled +#else + if (!sr_exp_data.bit.SDB_N) { return; } //Prevent calculations and I2C traffic if LED drivers are not enabled +#endif - uint8_t fcur = 0; - uint8_t fmax = 0; + // Wait for previous transfer to complete + while (i2c_led_q_running) {} - //Frames setup - while (f[fcur].end != 1) + // Copy buffer to live DMA region + for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) { - fcur++; //Count frames + *led_map[i].rgb.r = led_buffer[i].r; + *led_map[i].rgb.g = led_buffer[i].g; + *led_map[i].rgb.b = led_buffer[i].b; } - fmax = fcur; //Store total frames count +#ifdef USE_MASSDROP_CONFIGURATOR + breathe_mult = 1; - while (led_cur < lede && led_this_run < led_per_run) + if (led_animation_breathing) { - ro = 0; - go = 0; - bo = 0; - - if (led_lighting_mode == LED_MODE_KEYS_ONLY && led_cur->scan == 255) - { - //Do not act on this LED - } - else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && led_cur->scan != 255) - { - //Do not act on this LED - } - else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) - { - //Do not act on this LED (Only show indicators) - } - else - { - //Act on LED - for (fcur = 0; fcur < fmax; fcur++) - { - - if (led_animation_circular) { - po = sqrtf((powf(fabsf((disp.width / 2) - (led_cur->x - disp.left)), 2) + powf(fabsf((disp.height / 2) - (led_cur->y - disp.bottom)), 2))) / disp.max_distance * 100; - } - else { - if (led_animation_orientation) - { - po = led_cur->py; - } - else - { - po = led_cur->px; - } - } - - float pomod; - pomod = (float)(disp.frame % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed; - - //Add in any moving effects - if ((!led_animation_direction && f[fcur].ef & EF_SCR_R) || (led_animation_direction && (f[fcur].ef & EF_SCR_L))) - { - pomod *= 100.0f; - pomod = (uint32_t)pomod % 10000; - pomod /= 100.0f; - - po -= pomod; - - if (po > 100) po -= 100; - else if (po < 0) po += 100; - } - else if ((!led_animation_direction && f[fcur].ef & EF_SCR_L) || (led_animation_direction && (f[fcur].ef & EF_SCR_R))) - { - pomod *= 100.0f; - pomod = (uint32_t)pomod % 10000; - pomod /= 100.0f; - po += pomod; - - if (po > 100) po -= 100; - else if (po < 0) po += 100; - } + //+60us 119 LED + led_animation_breathe_cur += BREATHE_STEP * breathe_dir; + + if (led_animation_breathe_cur >= BREATHE_MAX_STEP) + breathe_dir = -1; + else if (led_animation_breathe_cur <= BREATHE_MIN_STEP) + breathe_dir = 1; + + //Brightness curve created for 256 steps, 0 - ~98% + breathe_mult = 0.000015 * led_animation_breathe_cur * led_animation_breathe_cur; + if (breathe_mult > 1) breathe_mult = 1; + else if (breathe_mult < 0) breathe_mult = 0; + } - //Check if LED's po is in current frame - if (po < f[fcur].hs) continue; - if (po > f[fcur].he) continue; - //note: < 0 or > 100 continue + //This should only be performed once per frame + pomod = (float)((g_rgb_counters.tick / 10) % (uint32_t)(1000.0f / led_animation_speed)) / 10.0f * led_animation_speed; + pomod *= 100.0f; + pomod = (uint32_t)pomod % 10000; + pomod /= 100.0f; - //Calculate the po within the start-stop percentage for color blending - po = (po - f[fcur].hs) / (f[fcur].he - f[fcur].hs); +#endif // USE_MASSDROP_CONFIGURATOR - //Add in any color effects - if (f[fcur].ef & EF_OVER) - { - ro = (po * (f[fcur].re - f[fcur].rs)) + f[fcur].rs;// + 0.5; - go = (po * (f[fcur].ge - f[fcur].gs)) + f[fcur].gs;// + 0.5; - bo = (po * (f[fcur].be - f[fcur].bs)) + f[fcur].bs;// + 0.5; - } - else if (f[fcur].ef & EF_SUBTRACT) - { - ro -= (po * (f[fcur].re - f[fcur].rs)) + f[fcur].rs;// + 0.5; - go -= (po * (f[fcur].ge - f[fcur].gs)) + f[fcur].gs;// + 0.5; - bo -= (po * (f[fcur].be - f[fcur].bs)) + f[fcur].bs;// + 0.5; - } - else - { - ro += (po * (f[fcur].re - f[fcur].rs)) + f[fcur].rs;// + 0.5; - go += (po * (f[fcur].ge - f[fcur].gs)) + f[fcur].gs;// + 0.5; - bo += (po * (f[fcur].be - f[fcur].bs)) + f[fcur].bs;// + 0.5; - } - } - } + uint8_t drvid; - //Clamp values 0-255 - if (ro > 255) ro = 255; else if (ro < 0) ro = 0; - if (go > 255) go = 255; else if (go < 0) go = 0; - if (bo > 255) bo = 255; else if (bo < 0) bo = 0; + //NOTE: GCR does not need to be timed with LED processing, but there is really no harm + if (gcr_actual != gcr_actual_last) + { + for (drvid=0;drvidrgb.r = (uint8_t)ro; - *led_cur->rgb.g = (uint8_t)go; - *led_cur->rgb.b = (uint8_t)bo; + i2c_led_q_run(); +} -#ifdef USB_LED_INDICATOR_ENABLE - if (keyboard_leds()) +void led_matrix_indicators(void) +{ + uint8_t kbled = keyboard_leds(); + if (kbled && rgb_matrix_config.enable) + { + for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) { - uint8_t kbled = keyboard_leds(); if ( - #if USB_LED_NUM_LOCK_SCANCODE != 255 - (led_cur->scan == USB_LED_NUM_LOCK_SCANCODE && kbled & (1<scan == USB_LED_CAPS_LOCK_SCANCODE && kbled & (1<scan == USB_LED_SCROLL_LOCK_SCANCODE && kbled & (1<scan == USB_LED_COMPOSE_SCANCODE && kbled & (1<scan == USB_LED_KANA_SCANCODE && kbled & (1<rgb.r > 127) *led_cur->rgb.r = 0; - else *led_cur->rgb.r = 255; - if (*led_cur->rgb.g > 127) *led_cur->rgb.g = 0; - else *led_cur->rgb.g = 255; - if (*led_cur->rgb.b > 127) *led_cur->rgb.b = 0; - else *led_cur->rgb.b = 255; + led_buffer[i].r = 255 - led_buffer[i].r; + led_buffer[i].g = 255 - led_buffer[i].g; + led_buffer[i].b = 255 - led_buffer[i].b; } } -#endif //USB_LED_INDICATOR_ENABLE - - led_cur++; - led_this_run++; } -} -uint8_t led_matrix_init(void) -{ - DBGC(DC_LED_MATRIX_INIT_BEGIN); +} - issi3733_prepare_arrays(); +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = led_set_one, + .set_color_all = led_set_all +}; + +/*============================================================================== += Legacy Lighting Support = +==============================================================================*/ + +#ifdef USE_MASSDROP_CONFIGURATOR +// Ported from Massdrop QMK Github Repo + +// TODO?: wire these up to keymap.c +uint8_t led_animation_orientation = 0; +uint8_t led_animation_direction = 0; +uint8_t led_animation_breathing = 0; +uint8_t led_animation_id = 0; +float led_animation_speed = 4.0f; +uint8_t led_lighting_mode = LED_MODE_NORMAL; +uint8_t led_enabled = 1; +uint8_t led_animation_breathe_cur = BREATHE_MIN_STEP; +uint8_t breathe_dir = 1; + +static void led_run_pattern(led_setup_t *f, float* ro, float* go, float* bo, float pos) { + float po; - led_matrix_prepare(); + while (f->end != 1) + { + po = pos; //Reset po for new frame - disp.frame = 0; - led_next_run = 0; - - led_enabled = 1; - led_animation_id = 0; - led_lighting_mode = LED_MODE_NORMAL; - led_animation_speed = 4.0f; - led_animation_direction = 0; - led_animation_orientation = 0; - led_animation_breathing = 0; - led_animation_breathe_cur = BREATHE_MIN_STEP; - breathe_step = 1; - breathe_dir = 1; - led_animation_circular = 0; + //Add in any moving effects + if ((!led_animation_direction && f->ef & EF_SCR_R) || (led_animation_direction && (f->ef & EF_SCR_L))) + { + po -= pomod; - gcr_min_counter = 0; - v_5v_cat_hit = 0; + if (po > 100) po -= 100; + else if (po < 0) po += 100; + } + else if ((!led_animation_direction && f->ef & EF_SCR_L) || (led_animation_direction && (f->ef & EF_SCR_R))) + { + po += pomod; - //Run led matrix code once for initial LED coloring - led_cur = 0; - rgb_matrix_init_user(); - led_matrix_run(); + if (po > 100) po -= 100; + else if (po < 0) po += 100; + } - DBGC(DC_LED_MATRIX_INIT_COMPLETE); + //Check if LED's po is in current frame + if (po < f->hs) { f++; continue; } + if (po > f->he) { f++; continue; } + //note: < 0 or > 100 continue - return 0; -} + //Calculate the po within the start-stop percentage for color blending + po = (po - f->hs) / (f->he - f->hs); -__attribute__ ((weak)) -void rgb_matrix_init_user(void) { + //Add in any color effects + if (f->ef & EF_OVER) + { + *ro = (po * (f->re - f->rs)) + f->rs;// + 0.5; + *go = (po * (f->ge - f->gs)) + f->gs;// + 0.5; + *bo = (po * (f->be - f->bs)) + f->bs;// + 0.5; + } + else if (f->ef & EF_SUBTRACT) + { + *ro -= (po * (f->re - f->rs)) + f->rs;// + 0.5; + *go -= (po * (f->ge - f->gs)) + f->gs;// + 0.5; + *bo -= (po * (f->be - f->bs)) + f->bs;// + 0.5; + } + else + { + *ro += (po * (f->re - f->rs)) + f->rs;// + 0.5; + *go += (po * (f->ge - f->gs)) + f->gs;// + 0.5; + *bo += (po * (f->be - f->bs)) + f->bs;// + 0.5; + } + f++; + } } -#define LED_UPDATE_RATE 10 //ms - -//led data processing can take time, so process data in chunks to free up the processor -//this is done through led_cur and lede -void led_matrix_task(void) +static void led_matrix_massdrop_config_override(int i) { - if (led_enabled) - { - //If an update may run and frame processing has completed - if (timer_read64() >= led_next_run && led_cur == lede) - { - uint8_t drvid; + float ro = 0; + float go = 0; + float bo = 0; + + float po = (led_animation_orientation) + ? (float)g_led_config.point[i].y / 64.f * 100 + : (float)g_led_config.point[i].x / 224.f * 100; + + uint8_t highest_active_layer = biton32(layer_state); + + if (led_lighting_mode == LED_MODE_KEYS_ONLY && HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { + //Do not act on this LED + } else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && !HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { + //Do not act on this LED + } else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) { + //Do not act on this LED (Only show indicators) + } else { + led_instruction_t* led_cur_instruction = led_instructions; + while (!led_cur_instruction->end) { + // Check if this applies to current layer + if ((led_cur_instruction->flags & LED_FLAG_MATCH_LAYER) && + (led_cur_instruction->layer != highest_active_layer)) { + goto next_iter; + } - led_next_run = timer_read64() + LED_UPDATE_RATE; //Set next frame update time + // Check if this applies to current index + if (led_cur_instruction->flags & LED_FLAG_MATCH_ID) { + uint8_t modid = i / 32; //Calculate which id# contains the led bit + uint32_t modidbit = 1 << (i % 32); //Calculate the bit within the id# + uint32_t *bitfield = &led_cur_instruction->id0 + modid; //Add modid as offset to id0 address. *bitfield is now idX of the led id + if (~(*bitfield) & modidbit) { //Check if led bit is not set in idX + goto next_iter; + } + } - //NOTE: GCR does not need to be timed with LED processing, but there is really no harm - if (gcr_actual != gcr_actual_last) - { - for (drvid=0;drvidflags & LED_FLAG_USE_RGB) { + ro = led_cur_instruction->r; + go = led_cur_instruction->g; + bo = led_cur_instruction->b; + } else if (led_cur_instruction->flags & LED_FLAG_USE_PATTERN) { + led_run_pattern(led_setups[led_cur_instruction->pattern_id], &ro, &go, &bo, po); + } else if (led_cur_instruction->flags & LED_FLAG_USE_ROTATE_PATTERN) { + led_run_pattern(led_setups[led_animation_id], &ro, &go, &bo, po); } - for (drvid=0;drvid 255) ro = 255; else if (ro < 0) ro = 0; + if (go > 255) go = 255; else if (go < 0) go = 0; + if (bo > 255) bo = 255; else if (bo < 0) bo = 0; - led_cur = 0; //Signal next frame calculations may begin + if (led_animation_breathing) + { + ro *= breathe_mult; + go *= breathe_mult; + bo *= breathe_mult; } } - //Process more data if not finished - if (led_cur != lede) - { - //DBG_1_OFF; //debug profiling - led_matrix_run(); - //DBG_1_ON; //debug profiling - } + led_buffer[i].r = (uint8_t)ro; + led_buffer[i].g = (uint8_t)go; + led_buffer[i].b = (uint8_t)bo; } +#endif // USE_MASSDROP_CONFIGURATOR diff --git a/tmk_core/protocol/arm_atsam/led_matrix.h b/tmk_core/protocol/arm_atsam/led_matrix.h index 4513234e7f37..1316efd9a4fd 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.h +++ b/tmk_core/protocol/arm_atsam/led_matrix.h @@ -18,6 +18,8 @@ along with this program. If not, see . #ifndef _LED_MATRIX_H_ #define _LED_MATRIX_H_ +#include "quantum.h" + //From keyboard #include "config_led.h" @@ -75,25 +77,20 @@ typedef struct issi3733_led_s { uint8_t scan; //Key scan code from wiring (set 0xFF if no key) } issi3733_led_t; -typedef struct led_disp_s { - uint64_t frame; - float left; - float right; - float top; - float bottom; - float width; - float height; - float max_distance; -} led_disp_t; +extern issi3733_driver_t issidrv[ISSI3733_DRIVER_COUNT]; -uint8_t led_matrix_init(void); -void rgb_matrix_init_user(void); +extern uint8_t gcr_desired; +extern uint8_t gcr_breathe; +extern uint8_t gcr_actual; +extern uint8_t gcr_actual_last; -#define LED_MODE_NORMAL 0 //Must be 0 -#define LED_MODE_KEYS_ONLY 1 -#define LED_MODE_NON_KEYS_ONLY 2 -#define LED_MODE_INDICATORS_ONLY 3 -#define LED_MODE_MAX_INDEX LED_MODE_INDICATORS_ONLY //Must be highest value +void gcr_compute(void); + +void led_matrix_indicators(void); + +/*------------------------- Legacy Lighting Support ------------------------*/ + +#ifdef USE_MASSDROP_CONFIGURATOR #define EF_NONE 0x00000000 //No effect #define EF_OVER 0x00000001 //Overwrite any previous color information with new @@ -114,33 +111,48 @@ typedef struct led_setup_s { uint8_t end; //Set to signal end of the setup } led_setup_t; -extern issi3733_driver_t issidrv[ISSI3733_DRIVER_COUNT]; +extern const uint8_t led_setups_count; +extern void *led_setups[]; -extern uint8_t gcr_desired; -extern uint8_t gcr_breathe; -extern uint8_t gcr_actual; -extern uint8_t gcr_actual_last; +//LED Extra Instructions +#define LED_FLAG_NULL 0x00 //Matching and coloring not used (default) +#define LED_FLAG_MATCH_ID 0x01 //Match on the ID of the LED (set id#'s to desired bit pattern, first LED is id 1) +#define LED_FLAG_MATCH_LAYER 0x02 //Match on the current active layer (set layer to desired match layer) +#define LED_FLAG_USE_RGB 0x10 //Use a specific RGB value (set r, g, b to desired output color values) +#define LED_FLAG_USE_PATTERN 0x20 //Use a specific pattern ID (set pattern_id to desired output pattern) +#define LED_FLAG_USE_ROTATE_PATTERN 0x40 //Use pattern the user has cycled to manually + +typedef struct led_instruction_s { + uint16_t flags; // Bitfield for LED instructions + uint32_t id0; // Bitwise id, IDs 0-31 + uint32_t id1; // Bitwise id, IDs 32-63 + uint32_t id2; // Bitwise id, IDs 64-95 + uint32_t id3; // Bitwise id, IDs 96-127 + uint8_t layer; + uint8_t r; + uint8_t g; + uint8_t b; + uint8_t pattern_id; + uint8_t end; +} led_instruction_t; + +extern led_instruction_t led_instructions[]; +extern uint8_t led_animation_breathing; extern uint8_t led_animation_id; -extern uint8_t led_enabled; extern float led_animation_speed; extern uint8_t led_lighting_mode; -extern uint8_t led_animation_direction; -extern uint8_t led_animation_orientation; -extern uint8_t led_animation_breathing; +extern uint8_t led_enabled; extern uint8_t led_animation_breathe_cur; +extern uint8_t led_animation_direction; extern uint8_t breathe_dir; -extern uint8_t led_animation_circular; -extern const uint8_t led_setups_count; -extern void *led_setups[]; - -extern issi3733_led_t *led_cur; -extern issi3733_led_t *lede; - -void led_matrix_run(void); -void led_matrix_task(void); +#define LED_MODE_NORMAL 0 //Must be 0 +#define LED_MODE_KEYS_ONLY 1 +#define LED_MODE_NON_KEYS_ONLY 2 +#define LED_MODE_INDICATORS_ONLY 3 +#define LED_MODE_MAX_INDEX LED_MODE_INDICATORS_ONLY //Must be highest value -void gcr_compute(void); +#endif // USE_MASSDROP_CONFIGURATOR #endif //_LED_MATRIX_H_ diff --git a/keyboards/massdrop/alt/led_programs.c b/tmk_core/protocol/arm_atsam/led_matrix_programs.c similarity index 99% rename from keyboards/massdrop/alt/led_programs.c rename to tmk_core/protocol/arm_atsam/led_matrix_programs.c index b3b7a7e90e76..cf7478dc312e 100644 --- a/keyboards/massdrop/alt/led_programs.c +++ b/tmk_core/protocol/arm_atsam/led_matrix_programs.c @@ -15,7 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "alt.h" +#ifdef USE_MASSDROP_CONFIGURATOR + #include "led_matrix.h" //Teal <-> Salmon @@ -118,3 +119,5 @@ void *led_setups[] = { }; const uint8_t led_setups_count = sizeof(led_setups) / sizeof(led_setups[0]); + +#endif diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index eaad66e9fc8e..0974a230d4c1 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -203,13 +203,6 @@ void main_subtask_usb_state(void) } } -void main_subtask_led(void) -{ - if (g_usb_state != USB_FSMSTATUS_FSMSTATE_ON_Val) return; //Only run LED tasks if USB is operating - - led_matrix_task(); -} - void main_subtask_power_check(void) { static uint64_t next_5v_checkup = 0; @@ -221,7 +214,9 @@ void main_subtask_power_check(void) v_5v = adc_get(ADC_5V); v_5v_avg = 0.9 * v_5v_avg + 0.1 * v_5v; +#ifdef RGB_MATRIX_ENABLE gcr_compute(); +#endif } } @@ -240,7 +235,6 @@ void main_subtask_usb_extra_device(void) void main_subtasks(void) { main_subtask_usb_state(); - main_subtask_led(); main_subtask_power_check(); main_subtask_usb_extra_device(); } @@ -263,7 +257,9 @@ int main(void) SR_EXP_Init(); +#ifdef RGB_MATRIX_ENABLE i2c1_init(); +#endif // RGB_MATRIX_ENABLE matrix_init(); @@ -281,8 +277,7 @@ int main(void) DBG_LED_OFF; - led_matrix_init(); - +#ifdef RGB_MATRIX_ENABLE while (I2C3733_Init_Control() != 1) {} while (I2C3733_Init_Drivers() != 1) {} @@ -292,6 +287,7 @@ int main(void) for (uint8_t drvid = 0; drvid < ISSI3733_DRIVER_COUNT; drvid++) I2C_LED_Q_ONOFF(drvid); //Queue data +#endif // RGB_MATRIX_ENABLE keyboard_setup(); diff --git a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c index c263ac4aa1d9..b715b702658a 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c +++ b/tmk_core/protocol/arm_atsam/usb/udi_hid_kbd.c @@ -109,9 +109,9 @@ UDC_DESC_STORAGE udi_hid_kbd_report_desc_t udi_hid_kbd_report_desc = { 0x81, 0x02, // Input (Data, Variable, Absolute) 0x81, 0x01, // Input (Constant) 0x19, 0x00, // Usage Minimum (0) - 0x29, 0x65, // Usage Maximum (101) + 0x29, 0xFF, // Usage Maximum (255) 0x15, 0x00, // Logical Minimum (0) - 0x25, 0x65, // Logical Maximum (101) + 0x25, 0xFF, // Logical Maximum (255) 0x75, 0x08, // Report Size (8) 0x95, 0x06, // Report Count (6) 0x81, 0x00, // Input (Data, Array) diff --git a/tmk_core/protocol/arm_atsam/usb/usb2422.c b/tmk_core/protocol/arm_atsam/usb/usb2422.c index d6e192242910..76ec3aaaa76f 100644 --- a/tmk_core/protocol/arm_atsam/usb/usb2422.c +++ b/tmk_core/protocol/arm_atsam/usb/usb2422.c @@ -365,8 +365,10 @@ void USB_ExtraSetState(uint8_t state) if (usb_extra_state == USB_EXTRA_STATE_ENABLED) CDC_print("USB: Extra enabled\r\n"); else if (usb_extra_state == USB_EXTRA_STATE_DISABLED) { - CDC_print("USB: Extra disabled\r\n"); - if (led_animation_breathing) gcr_breathe = gcr_desired; + CDC_print("USB: Extra disabled\r\n"); +#ifdef USE_MASSDROP_CONFIGURATOR + if (led_animation_breathing) gcr_breathe = gcr_desired; +#endif } else if (usb_extra_state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG) CDC_print("USB: Extra disabled until replug\r\n"); else CDC_print("USB: Extra state unknown\r\n"); diff --git a/tmk_core/protocol/bluefruit/main.c b/tmk_core/protocol/bluefruit/main.c index 0dbb637e2cfd..8a6386b4ebaa 100644 --- a/tmk_core/protocol/bluefruit/main.c +++ b/tmk_core/protocol/bluefruit/main.c @@ -42,13 +42,13 @@ along with this program. If not, see . int main(void) -{ +{ CPU_PRESCALE(0); // DDRD = _BV(PD5); // DDRB = _BV(PB0); - + // PORTD = _BV(PD5); // PORTB = _BV(PB0); @@ -59,22 +59,23 @@ int main(void) // while (!usb_configured()) /* wait */ + keyboard_setup(); dprintf("Initializing keyboard...\n"); keyboard_init(); - + // This implementation is pretty simplistic... if the USB connection // is not configured, choose the Bluefruit, otherwise use USB // Definitely would prefer to have this driven by an input pin and make // it switch dynamically - BCG // if (!usb_configured()) { - + // // Send power to Bluefruit... Adafruit says it takes 27 mA, I think - // // the pins should provide 40 mA, but just in case I switch the + // // the pins should provide 40 mA, but just in case I switch the // // Bluefruit using a transistor - BCG // DDRB = _BV(PB6); // PORTB |= _BV(PB6); - + dprintf("Setting host driver to bluefruit...\n"); host_set_driver(bluefruit_driver()); @@ -131,7 +132,7 @@ int main(void) // usb_remote_wakeup(); // } // } -// keyboard_task(); +// keyboard_task(); // } // } diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 5436d4909012..8de55bfe3fd2 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -119,6 +119,8 @@ int main(void) { // TESTING // chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); + keyboard_setup(); + /* Init USB */ init_usb_driver(&USB_DRIVER); diff --git a/tmk_core/protocol/lufa/adafruit_ble.cpp b/tmk_core/protocol/lufa/adafruit_ble.cpp index bee6bb2c193a..80839731fd53 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.cpp +++ b/tmk_core/protocol/lufa/adafruit_ble.cpp @@ -533,8 +533,7 @@ bool adafruit_ble_enable_keyboard(void) { // Disable command echo static const char kEcho[] PROGMEM = "ATE=0"; // Make the advertised name match the keyboard - static const char kGapDevName[] PROGMEM = - "AT+GAPDEVNAME=" STR(PRODUCT) " " STR(DESCRIPTION); + static const char kGapDevName[] PROGMEM = "AT+GAPDEVNAME=" STR(PRODUCT); // Turn on keyboard support static const char kHidEnOn[] PROGMEM = "AT+BLEHIDEN=1"; diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c index f6a0c7e9a4d2..86c2188c878e 100644 --- a/tmk_core/protocol/vusb/main.c +++ b/tmk_core/protocol/vusb/main.c @@ -56,6 +56,7 @@ int main(void) #ifndef NO_UART uart_init(UART_BAUD_RATE); #endif + keyboard_setup(); keyboard_init(); host_set_driver(vusb_driver()); diff --git a/tmk_core/protocol/vusb/usbdrv/usbdrv.c b/tmk_core/protocol/vusb/usbdrv/usbdrv.c index 2e8dd8756b3f..30cdc9dcfc9d 100644 --- a/tmk_core/protocol/vusb/usbdrv/usbdrv.c +++ b/tmk_core/protocol/vusb/usbdrv/usbdrv.c @@ -95,7 +95,7 @@ const PROGMEM int usbDescriptorStringDevice[] = { #if USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER == 0 && USB_CFG_SERIAL_NUMBER_LEN #undef USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER #define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER sizeof(usbDescriptorStringSerialNumber) -PROGMEM int usbDescriptorStringSerialNumber[] = { +const PROGMEM int usbDescriptorStringSerialNumber[] = { USB_STRING_DESCRIPTOR_HEADER(USB_CFG_SERIAL_NUMBER_LEN), USB_CFG_SERIAL_NUMBER }; diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 2e419dd667d4..6d2bb51f075d 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -48,9 +48,6 @@ FORMAT = ihex # (Note: 3 is not always the best optimization level. See avr-libc FAQ.) OPT = s -AUTOGEN ?= false - - # Compiler flag to set the C Standard level. # c89 = "ANSI" C # gnu89 = c89 plus GCC extensions @@ -142,7 +139,7 @@ CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) # files -- see avr-libc docs [FIXME: not yet described there] # -listing-cont-lines: Sets the maximum number of continuation lines of hex # dump that will be displayed for a given single line of source input. -ASFLAGS += $(ADEFS) +ASFLAGS += $(ADEFS) ifndef SKIP_DEBUG_INFO ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 else @@ -260,10 +257,6 @@ gccversion : @$(SILENT) || printf "$(MSG_FLASH) $@" | $(AWK_CMD) $(eval CMD=$(HEX) $< $@) @$(BUILD_CMD) - @if $(AUTOGEN); then \ - $(SILENT) || printf "Copying $(TARGET).hex to keymaps/$(KEYMAP)/$(TARGET).hex\n"; \ - $(COPY) $@ $(KEYMAP_PATH)/$(TARGET).hex; \ - fi %.eep: %.elf @$(SILENT) || printf "$(MSG_EEPROM) $@" | $(AWK_CMD) @@ -297,7 +290,7 @@ BEGIN = gccversion sizebefore @$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD) $(eval CMD=$(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS)) @$(BUILD_CMD) - + define GEN_OBJRULE $1_INCFLAGS := $$(patsubst %,-I%,$$($1_INC)) @@ -338,7 +331,7 @@ $1/%.o : %.S $1/asflags.txt $1/compiler.txt | $(BEGIN) $1/%.a : $1/%.o @mkdir -p $$(@D) @$(SILENT) || printf "Archiving: $$<" | $$(AWK_CMD) - $$(eval CMD=$$(AR) $$@ $$<) + $$(eval CMD=$$(AR) rcs $$@ $$<) @$$(BUILD_CMD) $1/force: @@ -371,7 +364,7 @@ DEPS = $(patsubst %.o,%.d,$(patsubst %.a,%.o,$(OBJ))) .PRECIOUS: $(DEPS) # Empty rule to force recompilation if the .d file is missing $(DEPS): - + $(foreach OUTPUT,$(OUTPUTS),$(eval $(call GEN_OBJRULE,$(OUTPUT)))) @@ -390,6 +383,8 @@ show_path: @echo OBJ=$(OBJ) ifeq ($(findstring avr-gcc,$(CC)),avr-gcc) +SIZE_MARGIN = 1024 + check-size: $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne '/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) $(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi)) @@ -397,7 +392,15 @@ check-size: $(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(MAX_SIZE))) if [ $(MAX_SIZE) -gt 0 ] && [ $(CURRENT_SIZE) -gt 0 ]; then \ $(SILENT) || printf "$(MSG_CHECK_FILESIZE)" | $(AWK_CMD); \ - if [ $(CURRENT_SIZE) -gt $(MAX_SIZE) ]; then printf "\n * $(MSG_FILE_TOO_BIG)"; $(PRINT_ERROR_PLAIN); else $(PRINT_OK); $(SILENT) || printf " * $(MSG_FILE_JUST_RIGHT)"; fi \ + if [ $(CURRENT_SIZE) -gt $(MAX_SIZE) ]; then \ + printf "\n * $(MSG_FILE_TOO_BIG)"; $(PRINT_ERROR_PLAIN); \ + else \ + if [ $(FREE_SIZE) -lt $(SIZE_MARGIN) ]; then \ + $(PRINT_WARNING_PLAIN); printf " * $(MSG_FILE_NEAR_LIMIT)"; \ + else \ + $(PRINT_OK); $(SILENT) || printf " * $(MSG_FILE_JUST_RIGHT)"; \ + fi \ + fi \ fi else check-size: diff --git a/users/333fred/333fred.c b/users/333fred/333fred.c index 12ee9e7d7d2c..3b2b36d020e4 100644 --- a/users/333fred/333fred.c +++ b/users/333fred/333fred.c @@ -9,7 +9,7 @@ typedef enum { static tap_dance_state_enum tap_dance_state; static bool tap_dance_active = false; -void tap_dance_layer_finished(qk_tap_dance_state_t *state, void *user_data) { +void tap_dance_sym_vim_finished(qk_tap_dance_state_t *state, void *user_data) { // Determine the current state if (state->count == 1) { if (state->interrupted || state->pressed == 0) tap_dance_state = SINGLE_TAP; @@ -38,8 +38,7 @@ void tap_dance_layer_finished(qk_tap_dance_state_t *state, void *user_data) { } } - -void tap_dance_layer_reset(qk_tap_dance_state_t *state, void *user_data) { +void tap_dance_sym_vim_reset(qk_tap_dance_state_t *state, void *user_data) { switch(tap_dance_state) { case SINGLE_TAP: clear_oneshot_layer_state(ONESHOT_PRESSED); @@ -53,8 +52,38 @@ void tap_dance_layer_reset(qk_tap_dance_state_t *state, void *user_data) { } } +void tap_dance_copy_paste_finished(qk_tap_dance_state_t *state, void *user_data) { + bool is_paste = state->count == 2; + // If either the one-shot shift is set, or if shift is being held, count as shift being held. + // We'll clear the one-shot shift if it was held + uint8_t one_shot_mods = get_oneshot_mods(); + bool is_shift = false; + + if (get_mods() & MOD_MASK_SHIFT) { + is_shift = true; + } else if (one_shot_mods & MOD_MASK_SHIFT) { + set_oneshot_mods(one_shot_mods & ~MOD_MASK_SHIFT); + is_shift = true; + } + + if (is_paste) { + if (is_shift) { + SEND_STRING(SS_LSFT(SS_TAP(X_INSERT))); + } else { + SEND_STRING(SS_LCTRL("v")); + } + } else { + if (is_shift) { + SEND_STRING(SS_LCTRL(SS_TAP(X_INSERT))); + } else { + SEND_STRING(SS_LCTRL("c")); + } + } +} + qk_tap_dance_action_t tap_dance_actions[] = { - [TD_SYM_VIM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_layer_finished, tap_dance_layer_reset) + [TD_SYM_VIM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_sym_vim_finished, tap_dance_sym_vim_reset), + [TD_COPY_PASTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_copy_paste_finished, NULL) }; void tap_dance_process_record(uint16_t keycode) { diff --git a/users/333fred/333fred.h b/users/333fred/333fred.h index 443930a6b1ab..0e6c6a196f9a 100644 --- a/users/333fred/333fred.h +++ b/users/333fred/333fred.h @@ -13,9 +13,10 @@ // Tap dance config shared between my keyboards enum tap_dance_declarations { - TD_SYM_VIM = 0 + TD_SYM_VIM = 0, + TD_COPY_PASTE, }; -void tap_dance_layer_finished(qk_tap_dance_state_t*, void*); -void tap_dance_layer_reset(qk_tap_dance_state_t*, void*); +void tap_dance_sym_vim_finished(qk_tap_dance_state_t*, void*); +void tap_dance_sym_vim_reset(qk_tap_dance_state_t*, void*); void tap_dance_process_record(uint16_t); diff --git a/users/arkag/arkag.c b/users/arkag/arkag.c index 212d06de67cf..9e8c7af247e3 100644 --- a/users/arkag/arkag.c +++ b/users/arkag/arkag.c @@ -5,34 +5,7 @@ https://github.com/arkag/qmk_firmware/blob/master/keyboards/mechmini/v2/keymaps/arkag/keymap.c */ -// Start: Written by konstantin: vomindoraan -#include -#include -#include - -void send_unicode_hex_string(const char *str) { - if (!str) { return; } // Saftey net - while (*str) { - // Find the next code point (token) in the string - for (; *str == ' '; str++); - size_t n = strcspn(str, " "); // Length of the current token - char code_point[n+1]; - strncpy(code_point, str, n); - code_point[n] = '\0'; // Make sure it's null-terminated - - // Normalize the code point: make all hex digits lowercase - for (char *p = code_point; *p; p++) { - *p = tolower(*p); - } - - // Send the code point as a Unicode input string - unicode_input_start(); - send_string(code_point); - unicode_input_finish(); - str += n; // Move to the first ' ' (or '\0') after the current token - } -} -// End: Written by konstantin: vomindoraan +#include // Start: Written by Chris Lewis #ifndef MIN @@ -78,6 +51,8 @@ Color underglow, flashState flash_state = no_flash; fadeState fade_state = add_fade; activityState state = boot; +bool aesthetic = false, + shifty = false; void set_color (Color new, bool update) { rgblight_sethsv_eeprom_helper(new.h, new.s, new.v, update); @@ -146,7 +121,7 @@ void check_state (void) { case sleeping: if (!slept) { - rgblight_mode_noeeprom(4); + rgblight_mode_noeeprom(5); slept = true; activated = false; deactivated = false; @@ -249,11 +224,6 @@ void set_os (uint8_t os, bool update) { num_extra_flashes_off = 1; } -void tap_key(uint8_t keycode) { - register_code(keycode); - unregister_code(keycode); -} - // register GUI if Mac or Ctrl if other void pri_mod(bool press) { if (press) { @@ -293,13 +263,13 @@ void surround_type(uint8_t num_of_chars, uint16_t keycode, bool use_shift) { register_code(KC_LSFT); } for (int i = 0; i < num_of_chars; i++) { - tap_key(keycode); + tap_code(keycode); } if (use_shift) { unregister_code(KC_LSFT); } for (int i = 0; i < (num_of_chars/2); i++) { - tap_key(KC_LEFT); + tap_code(KC_LEFT); } } @@ -307,7 +277,7 @@ void long_keystroke(size_t num_of_keys, uint16_t keys[]) { for (int i = 0; i < num_of_keys-1; i++) { register_code(keys[i]); } - tap_key(keys[num_of_keys-1]); + tap_code(keys[num_of_keys-1]); for (int i = 0; i < num_of_keys-1; i++) { unregister_code(keys[i]); } @@ -315,7 +285,10 @@ void long_keystroke(size_t num_of_keys, uint16_t keys[]) { void dance_grv (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { - tap_key(KC_GRV); + tap_code(KC_GRV); + if (aesthetic) { + tap_code(KC_SPACE); + } } else if (state->count == 2) { surround_type(2, KC_GRAVE, false); } else { @@ -325,7 +298,10 @@ void dance_grv (qk_tap_dance_state_t *state, void *user_data) { void dance_quot (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { - tap_key(KC_QUOT); + tap_code(KC_QUOT); + if (aesthetic) { + tap_code(KC_SPACE); + } } else if (state->count == 2) { surround_type(2, KC_QUOTE, false); } else if (state->count == 3) { @@ -333,35 +309,73 @@ void dance_quot (qk_tap_dance_state_t *state, void *user_data) { } } -void dance_strk (qk_tap_dance_state_t *state, void *user_data) { +void dance_hyph (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { - surround_type(4, KC_TILDE, true); + tap_code(KC_MINS); + if (aesthetic) { + tap_code(KC_SPACE); + } } else if (state->count == 2) { - if (current_os == OS_MAC) { - long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_4}); - } else if (current_os == OS_WIN) { - long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_S}); - } else { - return; + register_code(KC_LSFT); + tap_code(KC_MINS); + if (aesthetic) { + tap_code(KC_SPACE); } + unregister_code(KC_LSFT); + } else if (state->count == 3) { + send_unicode_hex_string("2014"); } } -void dance_3 (qk_tap_dance_state_t *state, void *user_data) { +void dance_obrck (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { - tap_key(KC_3); + tap_code(KC_LBRC); + if (aesthetic) { + tap_code(KC_SPACE); + } } else if (state->count == 2) { - send_unicode_hex_string("00E8"); - } else if (state->count == 3) { - send_unicode_hex_string("00E9"); + register_code(KC_LSFT); + tap_code(KC_9); + if (aesthetic) { + tap_code(KC_SPACE); + } + unregister_code(KC_LSFT); } } -void dance_c (qk_tap_dance_state_t *state, void *user_data) { +void dance_cbrck (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { - tap_key(KC_C); + tap_code(KC_RBRC); + if (aesthetic) { + tap_code(KC_SPACE); + } } else if (state->count == 2) { - send_unicode_hex_string("00E7"); + register_code(KC_LSFT); + tap_code(KC_0); + if (aesthetic) { + tap_code(KC_SPACE); + } + unregister_code(KC_LSFT); + } +} + +void dance_game (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + + } else if (state->count == 2) { + + } else if (state->count == 3) { + uint8_t layer = biton32(layer_state); + if (layer == _QWERTY) { + layer_off(_QWERTY); + layer_on(_GAMING); + // swirling rgb + rgblight_mode_noeeprom(12); + } else { + layer_off(_GAMING); + layer_on(_QWERTY); + rgblight_mode_noeeprom(1); + } } } @@ -383,13 +397,29 @@ void matrix_scan_user(void) { // begin OS functions SEQ_TWO_KEYS(KC_P, KC_B) { if (current_os == OS_WIN) { - SEND_STRING(SS_DOWN(X_LGUI) SS_TAP(X_PAUSE) SS_UP(X_LGUI)); + long_keystroke(2, (uint16_t[]){KC_LGUI, KC_PAUSE}); + } else { + return; + } + } + SEQ_TWO_KEYS(KC_LSFT, M_PMOD) { + if (current_os == OS_WIN) { + long_keystroke(3, (uint16_t[]){KC_LCTL, KC_LSFT, KC_ESC}); + } else { + } + } + SEQ_TWO_KEYS(KC_S, KC_S) { + if (current_os == OS_MAC) { + long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_4}); + } else if (current_os == OS_WIN) { + long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_S}); } else { + return; } } SEQ_THREE_KEYS(KC_C, KC_A, KC_D) { if (current_os == OS_WIN) { - SEND_STRING(SS_DOWN(X_LCTRL) SS_DOWN(X_LALT) SS_TAP(X_DELETE) SS_UP(X_LALT) SS_UP(X_LCTRL)); + long_keystroke(3, (uint16_t[]){KC_LCTL, KC_LALT, KC_DEL}); } else { } } @@ -415,33 +445,33 @@ void matrix_scan_user(void) { SEQ_ONE_KEY(KC_S) { surround_type(4, KC_GRAVE, true); } - SEQ_TWO_KEYS(KC_S, KC_S) { - if (current_os == OS_MAC) { - long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_4}); - } else if (current_os == OS_WIN) { - long_keystroke(3, (uint16_t[]){KC_LGUI, KC_LSFT, KC_S}); - } else { - return; - } - } SEQ_ONE_KEY(KC_C) { - surround_type(2, KC_GRAVE, false); + send_unicode_hex_string("00E7"); } SEQ_TWO_KEYS(KC_C, KC_C) { + surround_type(2, KC_GRAVE, false); + } + SEQ_THREE_KEYS(KC_C, KC_C, KC_C) { surround_type(6, KC_GRAVE, false); } + SEQ_ONE_KEY(KC_E) { + send_unicode_hex_string("00E8"); + } + SEQ_TWO_KEYS(KC_E, KC_E) { + send_unicode_hex_string("00E9"); + } // end format functions // start fancy functions - SEQ_THREE_KEYS(KC_C, KC_C, KC_C) { + SEQ_THREE_KEYS(KC_C, KC_C, KC_ENT) { surround_type(6, KC_GRAVE, false); pri_mod(true); - tap_key(KC_V); + tap_code(KC_V); pri_mod(false); - tap_key(KC_RGHT); - tap_key(KC_RGHT); - tap_key(KC_RGHT); - tap_key(KC_ENTER); + tap_code(KC_RGHT); + tap_code(KC_RGHT); + tap_code(KC_RGHT); + tap_code(KC_ENTER); } // end fancy functions @@ -450,8 +480,8 @@ void matrix_scan_user(void) { // ™ send_unicode_hex_string("2122"); } - SEQ_THREE_KEYS(KC_G, KC_G, KC_T) { - SEND_STRING("@GrahamGoldenTech.com"); + SEQ_TWO_KEYS(KC_D, KC_D) { + SEND_STRING(".\\Administrator"); } SEQ_THREE_KEYS(KC_L, KC_O, KC_D) { // ಠ__ಠ @@ -482,29 +512,103 @@ void matrix_scan_user(void) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (aesthetic) { + switch (keycode) { + case KC_A ... KC_0: + case KC_SPACE ... KC_SLASH: + if (record->event.pressed) { + state = active; + velocikey_accelerate(); + tap_code(keycode); + tap_code(KC_SPACE); + } + return false; + + case KC_BSPACE: + if (record->event.pressed) { + state = active; + velocikey_accelerate(); + tap_code(keycode); + tap_code(keycode); + } + return false; + default: // Do nothing + break; + } + } + + if (shifty) { + switch (keycode) { + case KC_A ... KC_Z: + if (record->event.pressed) { + int shift = rand() % 2; + state = active; + velocikey_accelerate(); + if (shift == 1){ + register_code(KC_LSFT); + } + tap_code(keycode); + if (shift == 1){ + unregister_code(KC_LSFT); + } + } + return false; + case KC_SPC: + if (record->event.pressed) { + state = active; + velocikey_accelerate(); + tap_code(keycode); + } + return false; + default: // Do nothing + break; + } + } + switch (keycode) { case M_PMOD: - if (record->event.pressed) { - pri_mod(true); - } else { - pri_mod(false); - } + pri_mod(record->event.pressed); return false; case M_SMOD: - if (record->event.pressed) { - sec_mod(true); - } else { - sec_mod(false); - } + sec_mod(record->event.pressed); return false; case M_OS: - if (record->event.pressed) { + if (record->event.pressed){ set_os((current_os+1) % _OS_COUNT, true); } + return false; + case M_SPC: + if(record->event.pressed){ + if (aesthetic) { + aesthetic = false; + rgblight_mode_noeeprom(1); + } else { + aesthetic = true; + shifty = false; + // snake mode + rgblight_mode_noeeprom(20); + } + return false; + } + + case M_SFT: + if(record->event.pressed){ + if (shifty) { + shifty = false; + rgblight_mode_noeeprom(1); + } else { + shifty = true; + aesthetic = false; + // knight mode + rgblight_mode_noeeprom(23); + } + return false; + } + default: if (record->event.pressed) { state = active; @@ -516,13 +620,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { - [TD_3_GRV_ACT] = ACTION_TAP_DANCE_FN (dance_3), - [TD_C_CED] = ACTION_TAP_DANCE_FN (dance_c), [TD_GRV_3GRV] = ACTION_TAP_DANCE_FN (dance_grv), [TD_SING_DOUB] = ACTION_TAP_DANCE_FN (dance_quot), - [TD_STRK_SHOT] = ACTION_TAP_DANCE_FN (dance_strk), - [TD_HYPH_UNDR] = ACTION_TAP_DANCE_DOUBLE (KC_MINS, LSFT(KC_MINS)), - [TD_BRCK_PARN_O] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, LSFT(KC_9)), - [TD_BRCK_PARN_C] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, LSFT(KC_0)), + [TD_HYPH_UNDR] = ACTION_TAP_DANCE_FN (dance_hyph), + [TD_BRCK_PARN_O] = ACTION_TAP_DANCE_FN (dance_obrck), + [TD_BRCK_PARN_C] = ACTION_TAP_DANCE_FN (dance_cbrck), [TD_LALT_RALT] = ACTION_TAP_DANCE_DOUBLE (KC_LALT, KC_RALT), + [TD_GAME] = ACTION_TAP_DANCE_FN (dance_game), }; diff --git a/users/arkag/arkag.h b/users/arkag/arkag.h index a4672a8e82ef..fdc4a5fee64b 100644 --- a/users/arkag/arkag.h +++ b/users/arkag/arkag.h @@ -14,12 +14,13 @@ #define STRIKE TD(TD_STRK_SHOT) #define HYPHEN TD(TD_HYPH_UNDR) #define CEDILLA TD(TD_C_CED) +#define GAME TD(TD_GAME) #define RAISE MO(1) #define LOWER MO(2) -#define KEEB MO(3) -#define MEDIA MO(4) -#define LAZY MO(5) +#define MEDIA MO(3) +#define FUNCT MO(4) +#define KEEB MO(5) #define MOD_CTL_MASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) #define MOD_GUI_MASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) @@ -37,9 +38,10 @@ enum { _QWERTY = 0, _RAISE, _LOWER, - _KEEB, _MEDIA, - _LAZY, + _FUNCT, + _KEEB, + _GAMING, }; typedef enum { @@ -76,22 +78,9 @@ typedef enum { enum custom_keycodes { M_PMOD = SAFE_RANGE, M_SMOD, - M_P_B, - M_C_A_D, - M_CALC, M_OS, - M_TF, - M_TM, - M_GGT, - M_LOD, - M_LENNY, - M_BOLD, - M_ITAL, - M_ULIN, - M_SNIPT, - M_REPO, - M_SHRUG, - M_UF, + M_SFT, + M_SPC, }; enum tapdances { @@ -101,16 +90,13 @@ enum tapdances { TD_SLSH_HTTP, TD_SING_DOUB, TD_HYPH_UNDR, - TD_STRK_SHOT, TD_SPECIAL, TD_BRCK_PARN_O, TD_BRCK_PARN_C, TD_LALT_RALT, - SPC_SFT_NSFT, + TD_GAME, }; -void send_unicode_hex_string(const char *str); - void velocikey_accelerate(void); void velocikey_decelerate(void); uint8_t velocikey_match_speed(uint8_t minValue, uint8_t maxValue); @@ -146,6 +132,7 @@ void dance_quot (qk_tap_dance_state_t *state, void *user_data); void dance_strk (qk_tap_dance_state_t *state, void *user_data); void dance_3 (qk_tap_dance_state_t *state, void *user_data); void dance_c (qk_tap_dance_state_t *state, void *user_data); +void dance_game (qk_tap_dance_state_t *state, void *user_data); int cur_dance (qk_tap_dance_state_t *state); void spc_finished (qk_tap_dance_state_t *state, void *user_data); diff --git a/users/arkag/config.h b/users/arkag/config.h index 2e0a9ad01998..5a89a18f60f2 100644 --- a/users/arkag/config.h +++ b/users/arkag/config.h @@ -1,6 +1,6 @@ #pragma once #define TAPPING_TERM 200 -#define LEADER_TIMEOUT 250 +#define LEADER_TIMEOUT 300 #define LEADER_PER_KEY_TIMING diff --git a/users/bbaserdem/bbaserdem.h b/users/bbaserdem/bbaserdem.h index 86b781d788ee..3a405f2a47cf 100644 --- a/users/bbaserdem/bbaserdem.h +++ b/users/bbaserdem/bbaserdem.h @@ -3,8 +3,6 @@ #include "quantum.h" -// Use 7 wide characters for keymaps -#define _______ KC_TRNS #define XXX KC_NO // Layers diff --git a/users/bcat/config.h b/users/bcat/config.h new file mode 100644 index 000000000000..a29aded713e7 --- /dev/null +++ b/users/bcat/config.h @@ -0,0 +1,31 @@ +/* Turn off RGB lighting when the host goes to sleep. */ +#define RGBLIGHT_SLEEP + +/* Keep backlight and RGB level increments consistent across keyboards. */ +#undef BACKLIGHT_LEVELS +#undef RGBLIGHT_HUE_STEP +#undef RGBLIGHT_SAT_STEP +#undef RGBLIGHT_VAL_STEP + +#define BACKLIGHT_LEVELS 7 +#define RGVLIGHT_HUE_STEP 8 +#define RGVLIGHT_SAT_STEP 17 +#define RGVLIGHT_VAL_STEP 17 + +/* Make mouse operation smoother. */ +#undef MOUSEKEY_DELAY +#undef MOUSEKEY_INTERVAL + +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 16 + +/* Lower mouse speed to adjust for reduced MOUSEKEY_INTERVAL. */ +#undef MOUSEKEY_MAX_SPEED +#undef MOUSEKEY_TIME_TO_MAX +#undef MOUSEKEY_WHEEL_MAX_SPEED +#undef MOUSEKEY_WHEEL_TIME_TO_MAX + +#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_TIME_TO_MAX 150 +#define MOUSEKEY_WHEEL_MAX_SPEED 3 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 150 diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk new file mode 100644 index 000000000000..59f82709ad36 --- /dev/null +++ b/users/bcat/rules.mk @@ -0,0 +1,11 @@ +# Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. +BOOTMAGIC_ENABLE = lite + +# Enable mouse and media keys on all keyboards. +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes + +# Disable some unwanted features on all keyboards. +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +NKRO_ENABLE = no diff --git a/users/billypython/billypython.c b/users/billypython/billypython.c new file mode 100644 index 000000000000..7bdfe33a43c4 --- /dev/null +++ b/users/billypython/billypython.c @@ -0,0 +1,32 @@ +#include "billypython.h" + +__attribute__((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_keymap(keycode, record)) { + return false; + } + + switch (keycode) { + case CLEAR: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); + } + return false; + + default: + return true; + } +} + +__attribute__((weak)) +uint32_t layer_state_set_keymap(uint32_t state) { + return state; +} + +uint32_t layer_state_set_user(uint32_t state) { + return layer_state_set_keymap(state); +} diff --git a/users/billypython/billypython.h b/users/billypython/billypython.h new file mode 100644 index 000000000000..4a444e978701 --- /dev/null +++ b/users/billypython/billypython.h @@ -0,0 +1,34 @@ +#pragma once + +#include "quantum.h" + +#ifdef TAP_DANCE_ENABLE + #include "tap_dance.h" +#endif + +#ifdef LAYER_FN + #define FN MO(L_FN) + #define FN_CAPS LT(L_FN, KC_CAPS) + #define FN_FNLK TT(L_FN) +#endif + +#define TOP LCTL(KC_HOME) +#define BOTTOM LCTL(KC_END) + +enum keycodes_user { + CLEAR = SAFE_RANGE, + + RANGE_KEYMAP, +}; + +enum layers_user { + L_BASE, +#ifdef LAYER_FN + L_FN, +#endif + + L_RANGE_KEYMAP, +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record); +uint32_t layer_state_set_keymap(uint32_t state); diff --git a/users/billypython/config.h b/users/billypython/config.h new file mode 100644 index 000000000000..4609adbbeafd --- /dev/null +++ b/users/billypython/config.h @@ -0,0 +1,17 @@ +#pragma once + +#define FORCE_NKRO + +#define MOUSEKEY_DELAY 50 +#define MOUSEKEY_INTERVAL 15 +#define MOUSEKEY_MAX_SPEED 4 +#define MOUSEKEY_TIME_TO_MAX 50 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 + +#define NO_ACTION_FUNCTION +#define NO_ACTION_MACRO + +#define PERMISSIVE_HOLD +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 diff --git a/users/billypython/rules.mk b/users/billypython/rules.mk new file mode 100644 index 000000000000..915323b49989 --- /dev/null +++ b/users/billypython/rules.mk @@ -0,0 +1,6 @@ +SRC += billypython.c +ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) + SRC += tap_dance.c +endif + +EXTRAFLAGS += -flto diff --git a/users/billypython/tap_dance.c b/users/billypython/tap_dance.c new file mode 100644 index 000000000000..74ae166393fd --- /dev/null +++ b/users/billypython/tap_dance.c @@ -0,0 +1,33 @@ +#include "tap_dance.h" + +#define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ + .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ + .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ + } + +void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; + // Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2 + if (state->count == 1 || state->count == 3) { + register_code(mods->kc1); + } else if (state->count == 2) { + unregister_code(mods->kc1); + register_code(mods->kc2); + } + // Prevent tap dance from sending kc1 and kc2 as weak mods + state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2)); +} + +void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; + if (state->count == 1 || state->count >= 3) { + unregister_code(mods->kc1); + } + if (state->count >= 2) { + unregister_code(mods->kc2); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL), +}; diff --git a/users/billypython/tap_dance.h b/users/billypython/tap_dance.h new file mode 100644 index 000000000000..25819814144d --- /dev/null +++ b/users/billypython/tap_dance.h @@ -0,0 +1,9 @@ +#pragma once + +#include "quantum.h" + +#define RSF_RCT TD(TD_RSF_RCT) + +enum tap_dance { + TD_RSF_RCT, +}; diff --git a/users/bocaj/process_records.h b/users/bocaj/process_records.h index 248df13e1b67..5c55df35e85c 100644 --- a/users/bocaj/process_records.h +++ b/users/bocaj/process_records.h @@ -44,8 +44,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define KC_ADJS TT(_ADJUST) #define KC_NUMS TT(_LOWER) #define KC_GAME TT(_DIABLO) -#define XXXXXXX KC_NO -#define _______ KC_TRNS // Other Keycodes #define KC_RST RESET diff --git a/users/cbbrowne/cbbrowne.c b/users/cbbrowne/cbbrowne.c new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/users/cbbrowne/cbbrowne.h b/users/cbbrowne/cbbrowne.h new file mode 100644 index 000000000000..301636c0533f --- /dev/null +++ b/users/cbbrowne/cbbrowne.h @@ -0,0 +1,39 @@ +#ifndef USERSPACE +#define USERSPACE + +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#include "quantum.h" +#include "config.h" + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#ifndef NO_DEBUG +#define NO_DEBUG +#endif +#ifndef NO_PRINT +#define NO_PRINT +#endif + +/* cbbrowne user configuration */ + +#define randadd 53 +#define randmul 181 +#define randmod 167 + +/* Filler to make layering a bit clearer * + * borrowed from basic keymap */ + +#define _______ KC_TRNS +#define _____ KC_NO + +#define LEADER_TIMEOUT 300 +#ifndef LIGHT_CONFIG_H +#define BACKLIGHT_BREATHING +#endif + +#endif + +#endif diff --git a/users/cbbrowne/rules.mk b/users/cbbrowne/rules.mk new file mode 100644 index 000000000000..497638cdb368 --- /dev/null +++ b/users/cbbrowne/rules.mk @@ -0,0 +1 @@ +SRC += cbbrowne.c diff --git a/users/drashna/.gitignore b/users/drashna/.gitignore new file mode 100644 index 000000000000..f84d34d90792 --- /dev/null +++ b/users/drashna/.gitignore @@ -0,0 +1,3 @@ +secrets.c +secrets.h +drashna_song_list.h \ No newline at end of file diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml index 9b18d44fb32e..679bdf4351db 100644 --- a/users/drashna/.gitlab-ci.yml +++ b/users/drashna/.gitlab-ci.yml @@ -1,9 +1,7 @@ stages: - test - - build - - deploy -Tests: +QMK Firmware: stage: test variables: GIT_SUBMODULE_STRATEGY: recursive @@ -12,64 +10,13 @@ Tests: image: ubuntu:18.10 before_script: - apt-get update -qy - - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip + - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi git libnewlib-arm-none-eabi gcc-avr unzip wget zip - avr-gcc --version - uname -a script: - make test:all - - make planck/rev6:default - -QMK Firmware Defaults: - stage: deploy - variables: - GIT_SUBMODULE_STRATEGY: recursive - tags: - - linux - image: ubuntu:18.10 - before_script: - - apt-get update -qy - - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip - - avr-gcc --version - - uname -a - script: - - make test:all - - make all:default -j16 - -Drashna Firmware: - stage: build - variables: - GIT_SUBMODULE_STRATEGY: recursive - tags: - - linux - image: ubuntu:18.10 - before_script: - - apt-get update -qy - - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip - - avr-gcc --version - script: - - make iris/rev2:drashna iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna - artifacts: - name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" - paths: - - ./*.hex - - ./*.bin - expire_in: 1 month - -Firmware Deploy: - stage: deploy - dependencies: - - Drashna Firmware - variables: - GIT_SUBMODULE_STRATEGY: recursive - tags: - - linux - image: ubuntu:18.10 - before_script: - - apt-get update -qy - - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip - - avr-gcc --version - script: - - make iris/rev2:drashna:production iris/rev2:drashna_old:production ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna:production orthodox/rev1:drashna:production orthodox/rev3:drashna:production crkbd:drashna:production planck/light:drashna planck/rev6:drashna fractal:drashna:production + - make planck/rev6:default planck/rev5:default + - make keebio/iris/rev2:drashna keebio/iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow keebio/viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna primekb/prime_m:drashna -j2 --output-sync artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" paths: diff --git a/users/drashna/config.h b/users/drashna/config.h index 827b1b8acedf..a6d8e752631e 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -2,43 +2,43 @@ #ifdef AUDIO_ENABLE -#define AUDIO_CLICKY -#define STARTUP_SONG SONG(RICK_ROLL) -#define GOODBYE_SONG SONG(SONIC_RING) -#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ - SONG(COLEMAK_SOUND), \ - SONG(DVORAK_SOUND), \ - SONG(OVERWATCH_THEME) \ +# define AUDIO_CLICKY +# define STARTUP_SONG SONG(RICK_ROLL) +# define GOODBYE_SONG SONG(SONIC_RING) +# define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND), \ + SONG(OVERWATCH_THEME) \ } -#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f -// #ifdef RGBLIGHT_ENABLE -// #define NO_MUSIC_MODE -// #endif //RGBLIGHT_ENABLE/ -#ifndef __arm__ -#undef NOTE_REST -#define NOTE_REST 1.00f -#endif // !__arm__ +# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f + +# define UNICODE_SONG_OSX SONG(RICK_ROLL) +# define UNICODE_SONG_LNX SONG(RICK_ROLL) +# define UNICODE_SONG_WIN SONG(RICK_ROLL) +# define UNICODE_SONG_BSD SONG(RICK_ROLL) +# define UNICODE_SONG_WINC SONG(RICK_ROLL) + #endif // !AUDIO_ENABLE #ifdef RGBLIGHT_ENABLE -#define RGBLIGHT_SLEEP -#undef RGBLIGHT_ANIMATIONS -#define RGBLIGHT_EFFECT_BREATHING -#define RGBLIGHT_EFFECT_SNAKE -#define RGBLIGHT_EFFECT_KNIGHT +# define RGBLIGHT_SLEEP +# undef RGBLIGHT_ANIMATIONS +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_KNIGHT #endif // RGBLIGHT_ENABLE #ifndef ONESHOT_TAP_TOGGLE -#define ONESHOT_TAP_TOGGLE 2 +# define ONESHOT_TAP_TOGGLE 2 #endif // !ONESHOT_TAP_TOGGLE #ifndef ONESHOT_TIMEOUT -#define ONESHOT_TIMEOUT 3000 +# define ONESHOT_TIMEOUT 3000 #endif// !ONESHOT_TIMEOUT #ifndef QMK_KEYS_PER_SCAN -#define QMK_KEYS_PER_SCAN 4 +# define QMK_KEYS_PER_SCAN 4 #endif // !QMK_KEYS_PER_SCAN @@ -55,24 +55,27 @@ #define FORCE_NKRO #ifndef TAPPING_TOGGLE -#define TAPPING_TOGGLE 1 +# define TAPPING_TOGGLE 1 #endif #ifdef TAPPING_TERM -#undef TAPPING_TERM +# undef TAPPING_TERM #endif // TAPPING_TERM #if defined(KEYBOARD_ergodox_ez) - #define TAPPING_TERM 185 +# define TAPPING_TERM 185 #elif defined(KEYBOARD_crkbd) - #define TAPPING_TERM 200 +# define TAPPING_TERM 200 #else - #define TAPPING_TERM 175 +# define TAPPING_TERM 175 #endif -// Disable action_get_macro and fn_actions, since we don't use these -// and it saves on space in the firmware. -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION +#define TAP_CODE_DELAY 5 -#define MACRO_TIMER 5 +/* Disable unused and unneeded features to reduce on firmware size */ +#ifdef LOCKING_SUPPORT_ENABLE +# undef LOCKING_SUPPORT_ENABLE +#endif +#ifdef LOCKING_RESYNC_ENABLE +# undef LOCKING_RESYNC_ENABLE +#endif diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index 222824837981..acc6b9f9eda6 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -19,82 +19,78 @@ along with this program. If not, see . userspace_config_t userspace_config; #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - #define DRASHNA_UNICODE_MODE UC_WIN + #define DRASHNA_UNICODE_MODE UC_WIN #else // set to 2 for UC_WIN, set to 4 for UC_WINC - #define DRASHNA_UNICODE_MODE 2 + #define DRASHNA_UNICODE_MODE 2 #endif // This block is for all of the gaming macros, as they were all doing // the same thing, but with differring text sent. bool send_game_macro(const char *str, keyrecord_t *record, bool override) { - if (!record->event.pressed || override) { - uint16_t keycode; - if (userspace_config.is_overwatch) { - keycode = KC_BSPC; - } else { - keycode = KC_ENTER; + if (!record->event.pressed || override) { + uint16_t keycode; + if (userspace_config.is_overwatch) { + keycode = KC_BSPC; + } else { + keycode = KC_ENTER; + } + clear_keyboard(); + tap_code(keycode); + wait_ms(TAP_CODE_DELAY); + send_string_with_delay(str, TAP_CODE_DELAY); + wait_ms(TAP_CODE_DELAY); + tap_code(KC_ENTER); } - clear_keyboard(); - tap_code(keycode); - wait_ms(50); - send_string_with_delay(str, MACRO_TIMER); - wait_ms(50); - tap_code(KC_ENTER); - } - if (override) wait_ms(3000); - return false; + if (override) wait_ms(3000); + return false; } bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed) { - static uint16_t this_timer; - if(pressed) { - this_timer= timer_read(); - } else { - if (timer_elapsed(this_timer) < TAPPING_TERM){ - register_code(code); - unregister_code(code); - } else { - register_code(mod_code); - register_code(code); - unregister_code(code); - unregister_code(mod_code); - } - } - return false; + static uint16_t this_timer; + if(pressed) { + this_timer= timer_read(); + } else { + if (timer_elapsed(this_timer) < TAPPING_TERM){ + tap_code(code); + } else { + register_code(mod_code); + tap_code(code); + unregister_code(mod_code); + } + } + return false; } bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer) { - if(pressed) { - this_timer= timer_read(); - } else { - if (timer_elapsed(this_timer) < TAPPING_TERM){ - register_code(code); - unregister_code(code); - } else { - register_code(mod_code); - register_code(code); - unregister_code(code); - unregister_code(mod_code); - } - } - return false; + if(pressed) { + this_timer= timer_read(); + } else { + if (timer_elapsed(this_timer) < TAPPING_TERM){ + tap_code(code); + } else { + register_code(mod_code); + tap_code(code); + unregister_code(mod_code); + } + } + return false; } void bootmagic_lite(void) { - matrix_scan(); - #if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0 - wait_ms(DEBOUNCING_DELAY * 2); - #elif defined(DEBOUNCE) && DEBOUNCE > 0 - wait_ms(DEBOUNCE * 2); - #else - wait_ms(30); - #endif - matrix_scan(); - if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { - bootloader_jump(); - } + matrix_scan(); + #if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0 + wait_ms(DEBOUNCING_DELAY * 2); + #elif defined(DEBOUNCE) && DEBOUNCE > 0 + wait_ms(DEBOUNCE * 2); + #else + wait_ms(30); + #endif + matrix_scan(); + if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { + bootloader_jump(); + } } // Add reconfigurable functions here, for keymap customization @@ -107,42 +103,48 @@ void matrix_init_keymap(void) {} // Call user matrix init, set default RGB colors and then // call the keymap's init function void matrix_init_user(void) { - userspace_config.raw = eeconfig_read_user(); + userspace_config.raw = eeconfig_read_user(); - #ifdef BOOTLOADER_CATERINA - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); + #ifdef BOOTLOADER_CATERINA + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); - #endif + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); + #endif - #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) - set_unicode_input_mode(DRASHNA_UNICODE_MODE); - get_unicode_input_mode(); - #endif //UNICODE_ENABLE - matrix_init_keymap(); - #ifdef RGBLIGHT_ENABLE - matrix_init_rgb(); - #endif //RGBLIGHT_ENABLE + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(DRASHNA_UNICODE_MODE); + get_unicode_input_mode(); + #endif //UNICODE_ENABLE + matrix_init_keymap(); } +__attribute__((weak)) +void keyboard_post_init_keymap(void){ } + +void keyboard_post_init_user(void){ +#ifdef RGBLIGHT_ENABLE + keyboard_post_init_rgb(); +#endif + keyboard_post_init_keymap(); +} __attribute__ ((weak)) void shutdown_keymap(void) {} void shutdown_user (void) { - #ifdef RGBLIGHT_ENABLE - rgblight_enable_noeeprom(); - rgblight_mode_noeeprom(1); - rgblight_setrgb_red(); - #endif // RGBLIGHT_ENABLE - #ifdef RGB_MATRIX_ENABLE - uint16_t timer_start = timer_read(); - rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); - while(timer_elapsed(timer_start) < 250) { wait_ms(1); } - #endif //RGB_MATRIX_ENABLE - shutdown_keymap(); + #ifdef RGBLIGHT_ENABLE + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(1); + rgblight_setrgb_red(); + #endif // RGBLIGHT_ENABLE + #ifdef RGB_MATRIX_ENABLE + // uint16_t timer_start = timer_read(); + // rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); + // while(timer_elapsed(timer_start) < 250) { wait_ms(1); } + #endif //RGB_MATRIX_ENABLE + shutdown_keymap(); } __attribute__ ((weak)) @@ -156,7 +158,7 @@ __attribute__ ((weak)) void suspend_wakeup_init_keymap(void) {} void suspend_wakeup_init_user(void) { - suspend_wakeup_init_keymap(); + suspend_wakeup_init_keymap(); } @@ -166,52 +168,54 @@ void matrix_scan_keymap(void) {} // No global matrix scan code, so just run keymap's matrix // scan function void matrix_scan_user(void) { - static bool has_ran_yet; - if (!has_ran_yet) { - has_ran_yet = true; - startup_user(); - } + static bool has_ran_yet; + if (!has_ran_yet) { + has_ran_yet = true; + startup_user(); + } #ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. - run_diablo_macro_check(); + run_diablo_macro_check(); #endif // TAP_DANCE_ENABLE #ifdef RGBLIGHT_ENABLE - matrix_scan_rgb(); + matrix_scan_rgb(); #endif // RGBLIGHT_ENABLE - matrix_scan_keymap(); + matrix_scan_keymap(); } __attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { - return state; +layer_state_t layer_state_set_keymap (layer_state_t state) { + return state; } // on layer change, no matter where the change was initiated // Then runs keymap's layer change check -uint32_t layer_state_set_user(uint32_t state) { - state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +layer_state_t layer_state_set_user(layer_state_t state) { + state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); #ifdef RGBLIGHT_ENABLE - state = layer_state_set_rgb(state); + state = layer_state_set_rgb(state); #endif // RGBLIGHT_ENABLE - return layer_state_set_keymap (state); + return layer_state_set_keymap (state); } __attribute__ ((weak)) -uint32_t default_layer_state_set_keymap (uint32_t state) { - return state; +layer_state_t default_layer_state_set_keymap (layer_state_t state) { + return state; } // Runs state check and changes underglow color and animation -uint32_t default_layer_state_set_user(uint32_t state) { - state = default_layer_state_set_keymap(state); +layer_state_t default_layer_state_set_user(layer_state_t state) { + state = default_layer_state_set_keymap(state); +#if 0 #ifdef RGBLIGHT_ENABLE state = default_layer_state_set_rgb(state); #endif // RGBLIGHT_ENABLE - return state; +#endif + return state; } __attribute__ ((weak)) @@ -221,16 +225,16 @@ void led_set_keymap(uint8_t usb_led) {} // So far, I only have keyboard specific code, // So nothing goes here. void led_set_user(uint8_t usb_led) { - led_set_keymap(usb_led); + led_set_keymap(usb_led); } __attribute__ ((weak)) void eeconfig_init_keymap(void) {} void eeconfig_init_user(void) { - userspace_config.raw = 0; - userspace_config.rgb_layer_change = true; - eeconfig_update_user(userspace_config.raw); + userspace_config.raw = 0; + userspace_config.rgb_layer_change = true; + eeconfig_update_user(userspace_config.raw); #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) set_unicode_input_mode(DRASHNA_UNICODE_MODE); get_unicode_input_mode(); diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 0a3d0f632709..507504f04e5c 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -22,38 +22,41 @@ along with this program. If not, see . #include "wrappers.h" #include "process_records.h" #ifdef TAP_DANCE_ENABLE - #include "tap_dances.h" +# include "tap_dances.h" #endif // TAP_DANCE_ENABLE #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - #include "rgb_stuff.h" +# include "rgb_stuff.h" +#endif +#if defined(AUDIO_ENABLE) && __GNUC__ > 7 +# if __has_include("drashna_song_list.h") +# include "drashna_song_list.h" +# endif #endif - /* Define layer names */ enum userspace_layers { - _QWERTY = 0, - _NUMLOCK = 0, - _COLEMAK, - _DVORAK, - _WORKMAN, - _MODS, - _GAMEPAD, - _DIABLO, - _MACROS, - _MEDIA, - _LOWER, - _RAISE, - _ADJUST, + _QWERTY = 0, + _NUMLOCK = 0, + _COLEMAK, + _DVORAK, + _WORKMAN, + _NORMAN, + _MALTRON, + _EUCALYN, + _CARPLAX, + _MODS, /* layer 8 */ + _GAMEPAD, + _DIABLO, + _MACROS, + _MEDIA, + _LOWER, + _RAISE, + _ADJUST, }; /* define modifiers here, since MOD_* doesn't seem to work for these */ -#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) -#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) -#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) - bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed); @@ -64,19 +67,20 @@ void shutdown_keymap(void); void suspend_power_down_keymap(void); void suspend_wakeup_init_keymap(void); void matrix_scan_keymap(void); -uint32_t layer_state_set_keymap (uint32_t state); -uint32_t default_layer_state_set_keymap (uint32_t state); +layer_state_t layer_state_set_keymap (layer_state_t state); +layer_state_t default_layer_state_set_keymap (layer_state_t state); void led_set_keymap(uint8_t usb_led); void eeconfig_init_keymap(void); typedef union { - uint32_t raw; - struct { - bool rgb_layer_change :1; - bool is_overwatch :1; - bool nuke_switch :1; - uint8_t unicode_mod :4; - }; + uint32_t raw; + struct { + bool rgb_layer_change :1; + bool is_overwatch :1; + bool nuke_switch :1; + uint8_t unicode_mod :4; + bool swapped_numbers :1; + }; } userspace_config_t; extern userspace_config_t userspace_config; @@ -88,13 +92,13 @@ But since TD() doesn't work when tap dance is disabled We use custom codes here, so we can substitute the right stuff */ #ifdef TAP_DANCE_ENABLE -#define KC_D3_1 TD(TD_D3_1) -#define KC_D3_2 TD(TD_D3_2) -#define KC_D3_3 TD(TD_D3_3) -#define KC_D3_4 TD(TD_D3_4) +# define KC_D3_1 TD(TD_D3_1) +# define KC_D3_2 TD(TD_D3_2) +# define KC_D3_3 TD(TD_D3_3) +# define KC_D3_4 TD(TD_D3_4) #else // TAP_DANCE_ENABLE -#define KC_D3_1 KC_1 -#define KC_D3_2 KC_2 -#define KC_D3_3 KC_3 -#define KC_D3_4 KC_4 +# define KC_D3_1 KC_1 +# define KC_D3_2 KC_2 +# define KC_D3_3 KC_3 +# define KC_D3_4 KC_4 #endif // TAP_DANCE_ENABLE diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 17d7dc01c52a..770219917e7e 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -4,175 +4,158 @@ uint16_t copy_paste_timer; __attribute__ ((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; + return true; } __attribute__ ((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - return true; + return true; } - // Defines actions tor my global custom keycodes. Defined in drashna.h file // Then runs the _keymap's record handier if not processed here bool process_record_user(uint16_t keycode, keyrecord_t *record) { // If console is enabled, it will print the matrix position and status of each key pressed #ifdef KEYLOGGER_ENABLE - #if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_iris_rev2) - xprintf("KL: col: %u, row: %u, pressed: %u\n", record->event.key.row, record->event.key.col, record->event.pressed); - #else - xprintf("KL: col: %u, row: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed); - #endif +# if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_keebio_iris_rev2) + xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed); +# else + xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); +# endif #endif //KEYLOGGER_ENABLE - switch (keycode) { - case KC_QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - break; - case KC_COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - break; - case KC_DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK); - } - break; - case KC_WORKMAN: - if (record->event.pressed) { - set_single_persistent_default_layer(_WORKMAN); - } - break; - + switch (keycode) { + case KC_QWERTY ... KC_CARPLAX: + if (record->event.pressed) { + set_single_persistent_default_layer(keycode - KC_QWERTY); + } + break; - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - if (!record->event.pressed) { - #if !defined(KEYBOARD_viterbi) - uint8_t temp_mod = get_mods(); - uint8_t temp_osm = get_oneshot_mods(); - clear_mods(); clear_oneshot_mods(); - #endif - send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER); - #if defined(KEYBOARD_viterbi) - send_string_with_delay_P(PSTR(":dfu" SS_TAP(X_ENTER)), MACRO_TIMER); - #else - if (temp_mod & MODS_SHIFT_MASK || temp_osm & MODS_SHIFT_MASK) { - #if defined(__arm__) - send_string_with_delay_P(PSTR(":dfu-util"), MACRO_TIMER); - #elif defined(BOOTLOADER_DFU) - send_string_with_delay_P(PSTR(":dfu"), MACRO_TIMER); - #elif defined(BOOTLOADER_HALFKAY) - send_string_with_delay_P(PSTR(":teensy"), MACRO_TIMER); - #elif defined(BOOTLOADER_CATERINA) - send_string_with_delay_P(PSTR(":avrdude"), MACRO_TIMER); - #endif // bootloader options + case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader + if (!record->event.pressed) { + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + clear_mods(); clear_oneshot_mods(); + send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); +#ifndef MAKE_BOOTLOADER + if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT ) +#endif + { + #if defined(__arm__) + send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY); + #elif defined(BOOTLOADER_DFU) + send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY); + #elif defined(BOOTLOADER_HALFKAY) + send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY); + #elif defined(BOOTLOADER_CATERINA) + send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY); + #endif // bootloader options + } + if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); } +#ifdef RGB_MATRIX_SPLIT_RIGHT + send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); +#endif + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); } - if (temp_mod & MODS_CTRL_MASK || temp_osm & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), MACRO_TIMER); } - send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), MACRO_TIMER); - set_mods(temp_mod); - #endif - } - break; - case VRSN: // Prints firmware version - if (record->event.pressed) { - send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), MACRO_TIMER); - } - break; + break; + + case VRSN: // Prints firmware version + if (record->event.pressed) { + send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); + } + break; -// These are a serious of gaming macros. -// Only enables for the viterbi, basically, -// to save on firmware space, since it's limited. + // These are a serious of gaming macros. + // Only enables for the viterbi, basically, + // to save on firmware space, since it's limited. #ifdef MACROS_ENABLED - case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros - if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeconfig_update_user(userspace_config.raw); } + case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros + if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeconfig_update_user(userspace_config.raw); } #ifdef RGBLIGHT_ENABLE - userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18); + userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18); #endif //RGBLIGHT_ENABLE - break; - case KC_SALT: - return send_game_macro("Salt, salt, salt...", record, false); - case KC_MORESALT: - return send_game_macro("Please sir, can I have some more salt?!", record, false); - case KC_SALTHARD: - return send_game_macro("Your salt only makes me harder, and even more aggressive!", record, false); - case KC_GOODGAME: - return send_game_macro("Good game, everyone!", record, false); - case KC_GLHF: - return send_game_macro("Good luck, have fun!!!", record, false); - case KC_SYMM: - return send_game_macro("Left click to win!", record, false); - case KC_JUSTGAME: - return send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.", record, false); - case KC_TORB: - return send_game_macro("That was positively riveting!", record, false); - case KC_AIM: - send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!", record, true); - return send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!", record, false); - case KC_C9: - return send_game_macro("OMG!!! C9!!!", record, false); - case KC_GGEZ: - return send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!", record, false); + break; + case KC_SALT: + return send_game_macro("Salt, salt, salt...", record, false); + case KC_MORESALT: + return send_game_macro("Please sir, can I have some more salt?!", record, false); + case KC_SALTHARD: + return send_game_macro("Your salt only makes me harder, and even more aggressive!", record, false); + case KC_GOODGAME: + return send_game_macro("Good game, everyone!", record, false); + case KC_GLHF: + return send_game_macro("Good luck, have fun!!!", record, false); + case KC_SYMM: + return send_game_macro("Left click to win!", record, false); + case KC_JUSTGAME: + return send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.", record, false); + case KC_TORB: + return send_game_macro("That was positively riveting!", record, false); + case KC_AIM: + send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!", record, true); + return send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!", record, false); + case KC_C9: + return send_game_macro("OMG!!! C9!!!", record, false); + case KC_GGEZ: + return send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!", record, false); #endif // MACROS_ENABLED - case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them + case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them #ifdef TAP_DANCE_ENABLE - if (record->event.pressed) { - uint8_t dtime; - for (dtime = 0; dtime < 4; dtime++) { - diablo_key_time[dtime] = diablo_times[0]; - } - } + if (record->event.pressed) { + uint8_t dtime; + for (dtime = 0; dtime < 4; dtime++) { + diablo_timer[dtime].key_time = diablo_times[0]; + } + } #endif // TAP_DANCE_ENABLE - break; + break; case KC_CCCV: // One key copy/paste - if(record->event.pressed){ - copy_paste_timer = timer_read(); - } else { - if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy - register_code(KC_LCTL); - tap_code(KC_C); - unregister_code(KC_LCTL); - } else { // Tap, paste - register_code(KC_LCTL); - tap_code(KC_V); - unregister_code(KC_LCTL); - } - } - break; + if(record->event.pressed){ + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + register_code(KC_LCTL); + tap_code(KC_C); + unregister_code(KC_LCTL); + } else { // Tap, paste + register_code(KC_LCTL); + tap_code(KC_V); + unregister_code(KC_LCTL); + } + } + break; #ifdef UNICODE_ENABLE - case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ - if (record->event.pressed) { - send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); - } - break; - case UC_TABL: // ┬─┬ノ( º _ ºノ) - if (record->event.pressed) { - send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); - } - break; - case UC_SHRG: // ¯\_(ツ)_/¯ - if (record->event.pressed) { - send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); - } - break; - case UC_DISA: // ಠ_ಠ - if (record->event.pressed) { - send_unicode_hex_string("0CA0 005F 0CA0"); - } - break; + case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ + if (record->event.pressed) { + send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); + } + break; + case UC_TABL: // ┬─┬ノ( º _ ºノ) + if (record->event.pressed) { + send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); + } + break; + case UC_SHRG: // ¯\_(ツ)_/¯ + if (record->event.pressed) { + send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); + } + break; + case UC_DISA: // ಠ_ಠ + if (record->event.pressed) { + send_unicode_hex_string("0CA0 005F 0CA0"); + } + break; #endif - } - return process_record_keymap(keycode, record) && + } + return process_record_keymap(keycode, record) && #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - process_record_user_rgb(keycode, record) && + process_record_user_rgb(keycode, record) && #endif // RGBLIGHT_ENABLE - process_record_secrets(keycode, record); + process_record_secrets(keycode, record); } diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h index 620997addffe..35adec84cc76 100644 --- a/users/drashna/process_records.h +++ b/users/drashna/process_records.h @@ -2,44 +2,48 @@ #include "drashna.h" #if defined(KEYMAP_SAFE_RANGE) - #define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE +# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE #else - #define PLACEHOLDER_SAFE_RANGE SAFE_RANGE +# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE #endif enum userspace_custom_keycodes { - VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info - KC_QWERTY, // Sets default layer to QWERTY - KC_COLEMAK, // Sets default layer to COLEMAK - KC_DVORAK, // Sets default layer to DVORAK - KC_WORKMAN, // Sets default layer to WORKMAN - KC_DIABLO_CLEAR, // Clears all Diablo Timers - KC_OVERWATCH, // Toggles game macro input mode (so in OW, it defaults to game chat) - KC_SALT, // See drashna.c for details - KC_MORESALT, - KC_SALTHARD, - KC_GOODGAME, - KC_SYMM, - KC_JUSTGAME, - KC_GLHF, - KC_TORB, - KC_AIM, - KC_C9, - KC_GGEZ, - KC_MAKE, // Run keyboard's customized make command - KC_RGB_T, // Toggles RGB Layer Indication mode - KC_SECRET_1, // test1 - KC_SECRET_2, // test2 - KC_SECRET_3, // test3 - KC_SECRET_4, // test4 - KC_SECRET_5, // test5 - KC_CCCV, // Hold to copy, tap to paste - KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! - UC_FLIP, // (ಠ痊ಠ)┻━┻ - UC_TABL, // ┬─┬ノ( º _ ºノ) - UC_SHRG, // ¯\_(ツ)_/¯ - UC_DISA, // ಠ_ಠ - NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes + VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info + KC_QWERTY, // Sets default layer to QWERTY + KC_COLEMAK, // Sets default layer to COLEMAK + KC_DVORAK, // Sets default layer to DVORAK + KC_WORKMAN, // Sets default layer to WORKMAN + KC_NORMAN, // Sets default layer to NORMAN + KC_MALTRON, // Sets default layer to MALTRON + KC_EUCALYN, // Sets default layer to EUCALYN + KC_CARPLAX, // Sets default layer to CARPLAX + KC_DIABLO_CLEAR, // Clears all Diablo Timers + KC_OVERWATCH, // Toggles game macro input mode (so in OW, it defaults to game chat) + KC_SALT, // See drashna.c for details + KC_MORESALT, + KC_SALTHARD, + KC_GOODGAME, + KC_SYMM, + KC_JUSTGAME, + KC_GLHF, + KC_TORB, + KC_AIM, + KC_C9, + KC_GGEZ, + KC_MAKE, // Run keyboard's customized make command + KC_RGB_T, // Toggles RGB Layer Indication mode + KC_SECRET_1, // test1 + KC_SECRET_2, // test2 + KC_SECRET_3, // test3 + KC_SECRET_4, // test4 + KC_SECRET_5, // test5 + KC_CCCV, // Hold to copy, tap to paste + KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! + UC_FLIP, // (ಠ痊ಠ)┻━┻ + UC_TABL, // ┬─┬ノ( º _ ºノ) + UC_SHRG, // ¯\_(ツ)_/¯ + UC_DISA, // ಠ_ಠ + NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes }; bool process_record_secrets(uint16_t keycode, keyrecord_t *record); @@ -52,6 +56,8 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define ADJUST MO(_ADJUST) #define TG_MODS TG(_MODS) #define TG_GAME TG(_GAMEPAD) +#define OS_LWR OSL(_LOWER) +#define OS_RSE OSL(_RAISE) #define KC_SEC1 KC_SECRET_1 #define KC_SEC2 KC_SECRET_2 diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 7d00604b4e7f..7d364fa68688 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -4,84 +4,85 @@ #if defined(RGBLIGHT_ENABLE) extern rgblight_config_t rgblight_config; -#elif defined(RGB_MATRIX_ENABLE) -extern rgb_config_t rgb_matrix_config; +bool has_initialized; #endif #ifdef RGBLIGHT_ENABLE void rgblight_sethsv_default_helper(uint8_t index) { - rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); + rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); } #endif // RGBLIGHT_ENABLE #ifdef INDICATOR_LIGHTS void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { - if (userspace_config.rgb_layer_change && biton32(layer_state) == 0) { - if (this_mod & MODS_SHIFT_MASK || this_led & (1< 10) { - rgblight_fadeout *light = &lights[light_index]; - litup = true; + bool litup = false; + for (uint8_t light_index = 0 ; light_index < RGBLED_NUM ; ++light_index ) { + if (lights[light_index].enabled && timer_elapsed(lights[light_index].timer) > 10) { + rgblight_fadeout *light = &lights[light_index]; + litup = true; - if (light->life) { - light->life -= 1; - if (biton32(layer_state) == 0) { - sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); + if (light->life) { + light->life -= 1; + if (biton32(layer_state) == 0) { + sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); + } + light->timer = timer_read(); + } + else { + if (light->enabled && biton32(layer_state) == 0) { + rgblight_sethsv_default_helper(light_index); + } + litup = light->enabled = false; + } } - light->timer = timer_read(); - } - else { - if (light->enabled && biton32(layer_state) == 0) { rgblight_sethsv_default_helper(light_index); } - litup = light->enabled = false; - } } - } - if (litup && biton32(layer_state) == 0) { - rgblight_set(); - } + if (litup && biton32(layer_state) == 0) { + rgblight_set(); + } } void start_rgb_light(void) { @@ -200,42 +203,42 @@ void start_rgb_light(void) { bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { - if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { - keycode = keycode & 0xFF; - } - switch (keycode) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { + keycode = keycode & 0xFF; + } + switch (keycode) { #ifdef RGBLIGHT_TWINKLE - case KC_A ... KC_SLASH: - case KC_F1 ... KC_F12: - case KC_INSERT ... KC_UP: - case KC_KP_SLASH ... KC_KP_DOT: - case KC_F13 ... KC_F24: - case KC_AUDIO_MUTE ... KC_MEDIA_REWIND: - if (record->event.pressed) { start_rgb_light(); } - return true; break; + case KC_A ... KC_SLASH: + case KC_F1 ... KC_F12: + case KC_INSERT ... KC_UP: + case KC_KP_SLASH ... KC_KP_DOT: + case KC_F13 ... KC_F24: + case KC_AUDIO_MUTE ... KC_MEDIA_REWIND: + if (record->event.pressed) { start_rgb_light(); } + return true; break; #endif // RGBLIGHT_TWINKLE - case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal + case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) - if (record->event.pressed) { - userspace_config.rgb_layer_change ^= 1; - xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - eeconfig_update_user(userspace_config.raw); - if (userspace_config.rgb_layer_change) { - layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) - } - } + if (record->event.pressed) { + userspace_config.rgb_layer_change ^= 1; + xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + eeconfig_update_user(userspace_config.raw); + if (userspace_config.rgb_layer_change) { + layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) + } + } #endif // RGBLIGHT_ENABLE - return false; break; + return false; break; #ifdef RGBLIGHT_ENABLE - case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions - if (record->event.pressed) { //This disables layer indication, as it's assumed that if you're changing this ... you want that disabled - if (userspace_config.rgb_layer_change) { - userspace_config.rgb_layer_change = false; - xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); - eeconfig_update_user(userspace_config.raw); - } - } - return true; break; + case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions + if (record->event.pressed) { //This disables layer indication, as it's assumed that if you're changing this ... you want that disabled + if (userspace_config.rgb_layer_change) { + userspace_config.rgb_layer_change = false; + xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); + eeconfig_update_user(userspace_config.raw); + } + } + return true; break; #endif // RGBLIGHT_ENABLE } return true; @@ -243,123 +246,102 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { - void matrix_init_rgb(void) { - -// #ifdef RGBLIGHT_ENABLE -// if (userspace_config.rgb_layer_change) { -// rgblight_enable_noeeprom(); -// switch (biton32(eeconfig_read_default_layer())) { -// case _COLEMAK: -// rgblight_sethsv_noeeprom_magenta(); break; -// case _DVORAK: -// rgblight_sethsv_noeeprom_springgreen(); break; -// case _WORKMAN: -// rgblight_sethsv_noeeprom_goldenrod(); break; -// default: -// rgblight_sethsv_noeeprom_cyan(); break; -// } -// rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); -// } -// #endif - } +void keyboard_post_init_rgb(void) { +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_STARTUP_ANIMATION) + if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); } + if (rgblight_config.enable) { + layer_state_set_user(layer_state); + uint16_t old_hue = rgblight_config.hue; + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + for (uint16_t i = 255; i > 0; i--) { + rgblight_sethsv_noeeprom( ( i + old_hue) % 255, 255, 255); + matrix_scan(); + wait_ms(10); + } + } +#endif + layer_state_set_user(layer_state); +} void matrix_scan_rgb(void) { #ifdef RGBLIGHT_TWINKLE - scan_rgblight_fadeout(); + scan_rgblight_fadeout(); #endif // RGBLIGHT_ENABLE #ifdef INDICATOR_LIGHTS - matrix_scan_indicator(); + matrix_scan_indicator(); #endif } -uint32_t layer_state_set_rgb(uint32_t state) { +layer_state_t layer_state_set_rgb(layer_state_t state) { #ifdef RGBLIGHT_ENABLE - if (userspace_config.rgb_layer_change) { - switch (biton32(state)) { - case _MACROS: - rgblight_sethsv_noeeprom_orange(); - userspace_config.is_overwatch ? rgblight_effect_snake(RGBLIGHT_MODE_SNAKE + 2) : rgblight_effect_snake(RGBLIGHT_MODE_SNAKE + 3); - break; - case _MEDIA: - rgblight_sethsv_noeeprom_chartreuse(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 1); - break; - case _GAMEPAD: - rgblight_sethsv_noeeprom_orange(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2); - break; - case _DIABLO: - rgblight_sethsv_noeeprom_red(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); - break; - case _RAISE: - rgblight_sethsv_noeeprom_yellow(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); - break; - case _LOWER: - rgblight_sethsv_noeeprom_green(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); - break; - case _ADJUST: - rgblight_sethsv_noeeprom_red(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); - break; - default: // for any other layers, or the default layer - switch (biton32(default_layer_state)) { - case _COLEMAK: - rgblight_sethsv_noeeprom_magenta(); break; - case _DVORAK: - rgblight_sethsv_noeeprom_springgreen(); break; - case _WORKMAN: - rgblight_sethsv_noeeprom_goldenrod(); break; - default: - rgblight_sethsv_noeeprom_cyan(); break; - } - biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it - break; + if (userspace_config.rgb_layer_change) { + switch (biton32(state)) { + case _MACROS: + rgblight_sethsv_noeeprom_orange(); + userspace_config.is_overwatch ? rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2) : rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 3); + break; + case _MEDIA: + rgblight_sethsv_noeeprom_chartreuse(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 1); + break; + case _GAMEPAD: + rgblight_sethsv_noeeprom_orange(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2); + break; + case _DIABLO: + rgblight_sethsv_noeeprom_red(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + break; + case _RAISE: + rgblight_sethsv_noeeprom_yellow(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + break; + case _LOWER: + rgblight_sethsv_noeeprom_green(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); + break; + case _ADJUST: + rgblight_sethsv_noeeprom_red(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); + break; + default: // for any other layers, or the default layer + switch (biton32(default_layer_state)) { + case _COLEMAK: + rgblight_sethsv_noeeprom_magenta(); break; + case _DVORAK: + rgblight_sethsv_noeeprom_springgreen(); break; + case _WORKMAN: + rgblight_sethsv_noeeprom_goldenrod(); break; + case _NORMAN: + rgblight_sethsv_noeeprom_coral(); break; + case _MALTRON: + rgblight_sethsv_noeeprom_yellow(); break; + case _EUCALYN: + rgblight_sethsv_noeeprom_pink(); break; + case _CARPLAX: + rgblight_sethsv_noeeprom_blue(); break; + default: + rgblight_sethsv_noeeprom_cyan(); break; + } + biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it + break; + } } -// layer_state_set_indicator(); // Runs every scan, so need to call this here .... since I can't get it working "right" anyhow - } #endif // RGBLIGHT_ENABLE - return state; + return state; } -uint32_t default_layer_state_set_rgb(uint32_t state) { -#ifdef RGBLIGHT_ENABLE - if (userspace_config.rgb_layer_change) { - rgblight_config_t temp_rgblight_config = rgblight_config; - switch (biton32(state)) { - case _COLEMAK: - temp_rgblight_config.hue = 300; - temp_rgblight_config.val = 255; - temp_rgblight_config.sat = 255; - temp_rgblight_config.mode = 1; - break; - case _DVORAK: - temp_rgblight_config.hue = 150; - temp_rgblight_config.val = 255; - temp_rgblight_config.sat = 255; - temp_rgblight_config.mode = 1; - case _WORKMAN: - temp_rgblight_config.hue = 43; - temp_rgblight_config.val = 218; - temp_rgblight_config.sat = 218; - temp_rgblight_config.mode = 1; - default: - temp_rgblight_config.hue = 180; - temp_rgblight_config.val = 255; - temp_rgblight_config.sat = 255; - temp_rgblight_config.mode = 1; - } - if (temp_rgblight_config.raw != eeconfig_read_rgblight()) { - xprintf("rgblight set default layer hsv [EEPROM]: %u,%u,%u,%u\n", temp_rgblight_config.hue, temp_rgblight_config.sat, temp_rgblight_config.val, temp_rgblight_config.mode); - eeconfig_update_rgblight(temp_rgblight_config.raw); +#ifdef RGB_MATRIX_ENABLE +extern led_config_t g_led_config; +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, uint8_t led_type) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color( i, red, green, blue ); + } } - } -#endif // RGBLIGHT_ENABLE - return state; } +#endif diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 065bda9f9ebd..f5bbd0f3b5fa 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h @@ -13,9 +13,11 @@ typedef struct { bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); void scan_rgblight_fadeout(void); -void matrix_init_rgb(void); +void keyboard_post_init_rgb(void); void matrix_scan_rgb(void); -uint32_t layer_state_set_rgb(uint32_t state); -uint32_t default_layer_state_set_rgb(uint32_t state); +layer_state_t layer_state_set_rgb(layer_state_t state); +layer_state_t default_layer_state_set_rgb(layer_state_t state); void rgblight_sethsv_default_helper(uint8_t index); void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, uint8_t led_type); diff --git a/users/drashna/rgblight_breathe_table.h b/users/drashna/rgblight_breathe_table.h new file mode 100644 index 000000000000..05d347fcd3b4 --- /dev/null +++ b/users/drashna/rgblight_breathe_table.h @@ -0,0 +1,116 @@ +#ifndef RGBLIGHT_EFFECT_BREATHE_TABLE +#define RGBLIGHT_EFFECT_BREATHE_TABLE + +const uint8_t rgblight_effect_breathe_table[] PROGMEM = { + /* #define RGBLIGHT_EFFECT_BREATHE_CENTER 0.00 */ + /* #define RGBLIGHT_EFFECT_BREATHE_MAX 255 */ + + #if RGBLIGHT_BREATHE_TABLE_SIZE == 256 + 0x44, 0x45, 0x47, 0x48, 0x4a, 0x4b, 0x4c, 0x4e, + 0x4f, 0x51, 0x52, 0x54, 0x55, 0x57, 0x58, 0x5a, + 0x5c, 0x5d, 0x5f, 0x60, 0x62, 0x64, 0x65, 0x67, + 0x69, 0x6a, 0x6c, 0x6e, 0x70, 0x72, 0x73, 0x75, + 0x77, 0x79, 0x7b, 0x7c, 0x7e, 0x80, 0x82, 0x84, + 0x86, 0x88, 0x8a, 0x8b, 0x8d, 0x8f, 0x91, 0x93, + 0x95, 0x97, 0x99, 0x9b, 0x9d, 0x9f, 0xa1, 0xa3, + 0xa5, 0xa7, 0xa9, 0xaa, 0xac, 0xae, 0xb0, 0xb2, + 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, 0xbf, 0xc1, + 0xc3, 0xc5, 0xc7, 0xc9, 0xca, 0xcc, 0xce, 0xd0, + 0xd1, 0xd3, 0xd5, 0xd6, 0xd8, 0xda, 0xdb, 0xdd, + 0xde, 0xe0, 0xe1, 0xe3, 0xe4, 0xe5, 0xe7, 0xe8, + 0xe9, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, + 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf8, + 0xf9, 0xfa, 0xfa, 0xfb, 0xfc, 0xfc, 0xfc, 0xfd, + 0xfd, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfd, + 0xfd, 0xfc, 0xfc, 0xfc, 0xfb, 0xfa, 0xfa, 0xf9, + 0xf8, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, + 0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec, 0xeb, 0xe9, + 0xe8, 0xe7, 0xe5, 0xe4, 0xe3, 0xe1, 0xe0, 0xde, + 0xdd, 0xdb, 0xda, 0xd8, 0xd6, 0xd5, 0xd3, 0xd1, + 0xd0, 0xce, 0xcc, 0xca, 0xc9, 0xc7, 0xc5, 0xc3, + 0xc1, 0xbf, 0xbe, 0xbc, 0xba, 0xb8, 0xb6, 0xb4, + 0xb2, 0xb0, 0xae, 0xac, 0xaa, 0xa9, 0xa7, 0xa5, + 0xa3, 0xa1, 0x9f, 0x9d, 0x9b, 0x99, 0x97, 0x95, + 0x93, 0x91, 0x8f, 0x8d, 0x8b, 0x8a, 0x88, 0x86, + 0x84, 0x82, 0x80, 0x7e, 0x7c, 0x7b, 0x79, 0x77, + 0x75, 0x73, 0x72, 0x70, 0x6e, 0x6c, 0x6a, 0x69, + 0x67, 0x65, 0x64, 0x62, 0x60, 0x5f, 0x5d, 0x5c, + 0x5a, 0x58, 0x57, 0x55, 0x54, 0x52, 0x51, 0x4f, + 0x4e, 0x4c, 0x4b, 0x4a, 0x48, 0x47, 0x45, 0x44 + #endif /* 256 bytes table */ + + #if RGBLIGHT_BREATHE_TABLE_SIZE == 128 + 0x44, 0x47, 0x4a, 0x4c, + 0x4f, 0x52, 0x55, 0x58, + 0x5c, 0x5f, 0x62, 0x65, + 0x69, 0x6c, 0x70, 0x73, + 0x77, 0x7b, 0x7e, 0x82, + 0x86, 0x8a, 0x8d, 0x91, + 0x95, 0x99, 0x9d, 0xa1, + 0xa5, 0xa9, 0xac, 0xb0, + 0xb4, 0xb8, 0xbc, 0xbf, + 0xc3, 0xc7, 0xca, 0xce, + 0xd1, 0xd5, 0xd8, 0xdb, + 0xde, 0xe1, 0xe4, 0xe7, + 0xe9, 0xec, 0xee, 0xf0, + 0xf2, 0xf4, 0xf6, 0xf8, + 0xf9, 0xfa, 0xfc, 0xfc, + 0xfd, 0xfe, 0xfe, 0xfe, + 0xfe, 0xfe, 0xfe, 0xfe, + 0xfd, 0xfc, 0xfb, 0xfa, + 0xf8, 0xf7, 0xf5, 0xf3, + 0xf1, 0xef, 0xed, 0xeb, + 0xe8, 0xe5, 0xe3, 0xe0, + 0xdd, 0xda, 0xd6, 0xd3, + 0xd0, 0xcc, 0xc9, 0xc5, + 0xc1, 0xbe, 0xba, 0xb6, + 0xb2, 0xae, 0xaa, 0xa7, + 0xa3, 0x9f, 0x9b, 0x97, + 0x93, 0x8f, 0x8b, 0x88, + 0x84, 0x80, 0x7c, 0x79, + 0x75, 0x72, 0x6e, 0x6a, + 0x67, 0x64, 0x60, 0x5d, + 0x5a, 0x57, 0x54, 0x51, + 0x4e, 0x4b, 0x48, 0x45 + #endif /* 128 bytes table */ + + #if RGBLIGHT_BREATHE_TABLE_SIZE == 64 + 0x44, 0x4a, + 0x4f, 0x55, + 0x5c, 0x62, + 0x69, 0x70, + 0x77, 0x7e, + 0x86, 0x8d, + 0x95, 0x9d, + 0xa5, 0xac, + 0xb4, 0xbc, + 0xc3, 0xca, + 0xd1, 0xd8, + 0xde, 0xe4, + 0xe9, 0xee, + 0xf2, 0xf6, + 0xf9, 0xfc, + 0xfd, 0xfe, + 0xfe, 0xfe, + 0xfd, 0xfb, + 0xf8, 0xf5, + 0xf1, 0xed, + 0xe8, 0xe3, + 0xdd, 0xd6, + 0xd0, 0xc9, + 0xc1, 0xba, + 0xb2, 0xaa, + 0xa3, 0x9b, + 0x93, 0x8b, + 0x84, 0x7c, + 0x75, 0x6e, + 0x67, 0x60, + 0x5a, 0x54, + 0x4e, 0x48 + #endif /* 64 bytes table */ +}; + +static const int table_scale = 256/sizeof(rgblight_effect_breathe_table); + +#endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */ diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 6d8612e71ae8..cdb9e543604f 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -1,35 +1,41 @@ SRC += drashna.c \ process_records.c +LINK_TIME_OPTIMIZATION_ENABLE = yes + ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") - SRC += secrets.c + SRC += secrets.c endif ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += tap_dances.c + SRC += tap_dances.c endif -EXTRAFLAGS += -flto + ifeq ($(strip $(NO_SECRETS)), yes) OPT_DEFS += -DNO_SECRETS endif ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) - SRC += rgb_stuff.c - ifeq ($(strip $(INDICATOR_LIGHTS)), yes) - OPT_DEFS += -DINDICATOR_LIGHTS - endif - ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes) - OPT_DEFS += -DRGBLIGHT_TWINKLE - endif - ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes) - OPT_DEFS += -DRGBLIGHT_NOEEPROM - endif + SRC += rgb_stuff.c + ifeq ($(strip $(INDICATOR_LIGHTS)), yes) + OPT_DEFS += -DINDICATOR_LIGHTS + endif + ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes) + OPT_DEFS += -DRGBLIGHT_TWINKLE + endif + ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes) + OPT_DEFS += -DRGBLIGHT_NOEEPROM + endif + ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes) + OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION + endif endif -ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) - SRC += rgb_stuff.c +RGB_MATRIX_ENABLE ?= no +ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) + SRC += rgb_stuff.c endif @@ -38,7 +44,11 @@ ifeq ($(strip $(MACROS_ENABLED)), yes) endif ifdef CONSOLE_ENABLE - ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) - OPT_DEFS += -DKEYLOGGER_ENABLE - endif + ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) + OPT_DEFS += -DKEYLOGGER_ENABLE + endif +endif + +ifeq ($(strip $(MAKE_BOOTLOADER)), yes) + OPT_DEFS += -DMAKE_BOOTLOADER endif diff --git a/users/drashna/send_unicode.h b/users/drashna/send_unicode.h index 818b6e571b21..743abc58b429 100644 --- a/users/drashna/send_unicode.h +++ b/users/drashna/send_unicode.h @@ -7,65 +7,65 @@ void send_unicode_hex_string(const char* str); /* use X(n) to call the */ #ifdef UNICODEMAP_ENABLE enum unicode_name { - THINK, // thinking face 🤔 - GRIN, // grinning face 😊 - SMRK, // smirk 😏 - WEARY, // good shit 😩 - UNAMU, // unamused 😒 + THINK, // thinking face 🤔 + GRIN, // grinning face 😊 + SMRK, // smirk 😏 + WEARY, // good shit 😩 + UNAMU, // unamused 😒 - SNEK, // snke 🐍 - PENGUIN, // 🐧 - DRAGON, // 🐉 - MONKEY, // 🐒 - CHICK, // 🐥 - BOAR, // 🐗 + SNEK, // snke 🐍 + PENGUIN, // 🐧 + DRAGON, // 🐉 + MONKEY, // 🐒 + CHICK, // 🐥 + BOAR, // 🐗 - OKOK, // 👌 - EFFU, // 🖕 - INUP, // 👆 - THUP, // 👍 - THDN, // 👎 + OKOK, // 👌 + EFFU, // 🖕 + INUP, // 👆 + THUP, // 👍 + THDN, // 👎 - BBB, // dat B 🅱 - POO, // poop 💩 - HUNDR, // 100 💯 - EGGPL, // EGGPLANT 🍆 - WATER, // wet 💦 - TUMBLER, // 🥃 + BBB, // dat B 🅱 + POO, // poop 💩 + HUNDR, // 100 💯 + EGGPL, // EGGPLANT 🍆 + WATER, // wet 💦 + TUMBLER, // 🥃 - LIT, // fire 🔥 - BANG, // ‽ - IRONY, // ⸮ - DEGREE // ° + LIT, // fire 🔥 + BANG, // ‽ + IRONY, // ⸮ + DEGREE // ° }; const uint32_t PROGMEM unicode_map[] = { - [THINK] = 0x1F914, - [GRIN] = 0x1F600, - [BBB] = 0x1F171, - [POO] = 0x1F4A9, - [HUNDR] = 0x1F4AF, - [SMRK] = 0x1F60F, - [WEARY] = 0x1F629, - [EGGPL] = 0x1F346, - [WATER] = 0x1F4A6, - [LIT] = 0x1F525, - [UNAMU] = 0x1F612, - [SNEK] = 0x1F40D, - [PENGUIN] = 0x1F427, - [BOAR] = 0x1F417, - [MONKEY] = 0x1F412, - [CHICK] = 0x1F425, - [DRAGON] = 0x1F409, - [OKOK] = 0x1F44C, - [EFFU] = 0x1F595, - [INUP] = 0x1F446, - [THDN] = 0x1F44E, - [THUP] = 0x1F44D, - [TUMBLER] = 0x1F943, - [BANG] = 0x0203D, - [IRONY] = 0x02E2E, - [DEGREE] = 0x000B0 + [THINK] = 0x1F914, + [GRIN] = 0x1F600, + [BBB] = 0x1F171, + [POO] = 0x1F4A9, + [HUNDR] = 0x1F4AF, + [SMRK] = 0x1F60F, + [WEARY] = 0x1F629, + [EGGPL] = 0x1F346, + [WATER] = 0x1F4A6, + [LIT] = 0x1F525, + [UNAMU] = 0x1F612, + [SNEK] = 0x1F40D, + [PENGUIN] = 0x1F427, + [BOAR] = 0x1F417, + [MONKEY] = 0x1F412, + [CHICK] = 0x1F425, + [DRAGON] = 0x1F409, + [OKOK] = 0x1F44C, + [EFFU] = 0x1F595, + [INUP] = 0x1F446, + [THDN] = 0x1F44E, + [THUP] = 0x1F44D, + [TUMBLER] = 0x1F943, + [BANG] = 0x0203D, + [IRONY] = 0x02E2E, + [DEGREE] = 0x000B0 }; #endif // UNICODEMAP_ENABLE diff --git a/users/drashna/tap_dances.c b/users/drashna/tap_dances.c index cbb3cf54efe5..18ca96e187e7 100644 --- a/users/drashna/tap_dances.c +++ b/users/drashna/tap_dances.c @@ -2,63 +2,64 @@ //define diablo macro timer variables -uint16_t diablo_timer[4]; -uint8_t diablo_times[] = { 0, 1, 3, 5, 10, 30 }; -uint8_t diablo_key_time[4]; +diablo_timer_t diablo_timer[4]; + +uint8_t diablo_times[] = { 0, 0, 1, 3, 5, 10, 30 }; // has the correct number of seconds elapsed (as defined by diablo_times) -bool check_dtimer(uint8_t dtimer) { return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true; }; +bool check_dtimer(uint8_t dtimer) { return (timer_elapsed(diablo_timer[dtimer].key_time) < (diablo_timer[dtimer].timer * 1000)) ? false : true; }; // Cycle through the times for the macro, starting at 0, for disabled. // Max of six values, so don't exceed -void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data, uint8_t diablo_key) { - if (state->count >= 7) { - diablo_key_time[diablo_key] = diablo_times[0]; - reset_tap_dance(state); - } else { - diablo_key_time[diablo_key] = diablo_times[state->count - 1]; - } +void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) { + int index = (int)user_data; + if (state->count >= 7) { + diablo_timer[index].key_time = diablo_times[0]; + reset_tap_dance(state); + } else { + diablo_timer[index].key_time = diablo_times[state->count]; + } } -// Would rather have one function for all of this, but no idea how to do that... -void diablo_tapdance1(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 0); } -void diablo_tapdance2(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 1); } -void diablo_tapdance3(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 2); } -void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 3); } +// One funtion to rule them all!! +#define ACTION_TAP_DANCE_DIABLO(arg) { \ + .fn = { NULL, (void *)diablo_tapdance_master, NULL }, \ + .user_data = (void *)arg, \ + } //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { - // tap once to disable, and more to enable timed micros - [TD_D3_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1), - [TD_D3_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2), - [TD_D3_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3), - [TD_D3_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4), + // tap once to disable, and more to enable timed micros + [TD_D3_1] = ACTION_TAP_DANCE_DIABLO(0), + [TD_D3_2] = ACTION_TAP_DANCE_DIABLO(1), + [TD_D3_3] = ACTION_TAP_DANCE_DIABLO(2), + [TD_D3_4] = ACTION_TAP_DANCE_DIABLO(3), }; // Sends the key press to system, but only if on the Diablo layer void send_diablo_keystroke(uint8_t diablo_key) { - if (IS_LAYER_ON(_DIABLO)) { - switch (diablo_key) { - case 0: - tap_code(KC_1); break; - case 1: - tap_code(KC_2); break; - case 2: - tap_code(KC_3); break; - case 3: - tap_code(KC_4); break; + if (IS_LAYER_ON(_DIABLO)) { + switch (diablo_key) { + case 0: + tap_code(KC_1); break; + case 1: + tap_code(KC_2); break; + case 2: + tap_code(KC_3); break; + case 3: + tap_code(KC_4); break; + } } - } } // Checks each of the 4 timers/keys to see if enough time has elapsed // Runs the "send string" command if enough time has passed, and resets the timer. void run_diablo_macro_check(void) { - uint8_t dtime; - for (dtime = 0; dtime < 4; dtime++) { - if (check_dtimer(dtime) && diablo_key_time[dtime]) { - diablo_timer[dtime] = timer_read(); - send_diablo_keystroke(dtime); + uint8_t dtime; + for (dtime = 0; dtime < 4; dtime++) { + if (check_dtimer(dtime) && diablo_timer[dtime].key_time) { + diablo_timer[dtime].timer = timer_read(); + send_diablo_keystroke(dtime); + } } - } } diff --git a/users/drashna/tap_dances.h b/users/drashna/tap_dances.h index 41d2bacb7b3d..4a293b258207 100644 --- a/users/drashna/tap_dances.h +++ b/users/drashna/tap_dances.h @@ -2,18 +2,21 @@ #include "drashna.h" //define diablo macro timer variables -extern uint16_t diablo_timer[4]; extern uint8_t diablo_times[]; -extern uint8_t diablo_key_time[4]; +typedef struct { + uint16_t timer; + uint8_t key_time; +} diablo_timer_t; +extern diablo_timer_t diablo_timer[4]; void run_diablo_macro_check(void); #ifdef TAP_DANCE_ENABLE enum { - TD_D3_1 = 0, - TD_D3_2, - TD_D3_3, - TD_D3_4 + TD_D3_1 = 0, + TD_D3_2, + TD_D3_3, + TD_D3_4 }; #endif // TAP_DANCE_ENABLE diff --git a/users/drashna/template.c b/users/drashna/template.c index 0e188f3a5ebb..d90e6bdecf24 100644 --- a/users/drashna/template.c +++ b/users/drashna/template.c @@ -62,11 +62,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { __attribute__ ((weak)) -uint32_t layer_state_set_keymap (uint32_t state) { +layer_state_t layer_state_set_keymap (layer_state_t state) { return state; } -uint32_t layer_state_set_user (uint32_t state) { +layer_state_t layer_state_set_user (layer_state_t state) { return layer_state_set_keymap (state); } diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h index 070a5a0a4a6f..93f842f4b2b9 100644 --- a/users/drashna/wrappers.h +++ b/users/drashna/wrappers.h @@ -6,7 +6,7 @@ arguments, we need a wrapper in order for these definitions to be expanded before being used as arguments to the LAYOUT_xxx macro. */ #if (!defined(LAYOUT) && defined(KEYMAP)) -#define LAYOUT KEYMAP +# define LAYOUT KEYMAP #endif #define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) @@ -15,6 +15,7 @@ expanded before being used as arguments to the LAYOUT_xxx macro. #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) #define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) +#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__) /* Blocks for each of the four major keyboard layouts @@ -91,11 +92,11 @@ NOTE: These are all the same length. If you do a search/replace #define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B #define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F -#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J KC_G, KC_COMM +#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM #define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L #define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R -#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X +#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X #define _________________EUCALYN_L1________________ KC_SLSH, KC_COMM, KC_DOT, KC_F, KC_Q diff --git a/users/edvorakjp/edvorakjp.c b/users/edvorakjp/edvorakjp.c index 1ac61079426a..892ce4be3bae 100644 --- a/users/edvorakjp/edvorakjp.c +++ b/users/edvorakjp/edvorakjp.c @@ -1,10 +1,5 @@ #include "edvorakjp.h" -void dvorakj_layer_off(void) { - layer_off(_EDVORAKJ1); - layer_off(_EDVORAKJ2); -} - void matrix_init_user(void) { edvorakjp_status_init(); matrix_init_keymap(); @@ -25,7 +20,6 @@ uint32_t layer_state_set_keymap(uint32_t state) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { return process_record_keymap(keycode, record) &&\ - process_record_edvorakjp_ext(keycode, record) &&\ process_record_edvorakjp_swap_scln(keycode, record) &&\ process_record_edvorakjp_config(keycode, record) &&\ process_record_layer(keycode, record) &&\ diff --git a/users/edvorakjp/edvorakjp.h b/users/edvorakjp/edvorakjp.h index e781bf2378e8..688cdeffb3a9 100644 --- a/users/edvorakjp/edvorakjp.h +++ b/users/edvorakjp/edvorakjp.h @@ -10,9 +10,6 @@ extern keymap_config_t keymap_config; enum edvorakjp_layers { _EDVORAK = 0, - _EDVORAKJ1, - _EDVORAKJ2, - _QWERTY, _LOWER, _RAISE, _ADJUST, @@ -21,26 +18,24 @@ enum edvorakjp_layers { enum edvorakjp_keycodes { EDVORAK = SAFE_RANGE, - QWERTY, LOWER, RAISE, KC_MAC, KC_WIN, - KC_EXTON, - KC_EXTOFF, KC_JPN, KC_ENG, - KC_AI, - KC_OU, - KC_EI, - KC_ANN, - KC_ONN, - KC_ENN, - KC_INN, - KC_UNN, NEW_SAFE_RANGE }; +#define KC_LC(k) LCTL_T(KC_##k) +#define KC_LS(k) LSFT_T(KC_##k) +#define KC_LA(k) LALT_T(KC_##k) +#define KC_LG(k) LGUI_T(KC_##k) +#define KC_RC(k) RCTL_T(KC_##k) +#define KC_RS(k) RSFT_T(KC_##k) +#define KC_RG(k) RGUI_T(KC_##k) +#define KC_RA(k) RALT_T(KC_##k) + enum tap_dance_code { TD_LOWER = 0, TD_RAISE @@ -57,8 +52,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); // status void edvorakjp_status_init(void); -bool get_enable_jp_extra_layer(void); -void set_enable_jp_extra_layer(bool new_state); bool get_enable_kc_lang(void); void set_enable_kc_lang(bool new_state); bool get_japanese_mode(void); @@ -69,7 +62,6 @@ void set_japanese_mode(bool new_state); * return false if processed, or return true if not processed. * You can add your original macros in process_record_keymap() in keymap.c. */ -bool process_record_edvorakjp_ext(uint16_t keycode, keyrecord_t *record); bool process_record_edvorakjp_swap_scln(uint16_t keycode, keyrecord_t *record); bool process_record_edvorakjp_config(uint16_t keycode, keyrecord_t *record); bool process_record_layer(uint16_t keycode, keyrecord_t *record); diff --git a/users/edvorakjp/edvorakjp_process_record.c b/users/edvorakjp/edvorakjp_process_record.c index 2dcdab2a25f9..ecc8db93637d 100644 --- a/users/edvorakjp/edvorakjp_process_record.c +++ b/users/edvorakjp/edvorakjp_process_record.c @@ -7,114 +7,6 @@ static uint16_t time_on_pressed; * Each process_record_* methods defined here are * return false if handle edvorak_keycodes, or return true others. */ -bool process_record_edvorakjp_ext(uint16_t keycode, keyrecord_t *record) { - if (!(default_layer_state == 1UL<<_EDVORAK && - get_enable_jp_extra_layer() && get_japanese_mode())) { - return true; - } - - // consonant keys - // layer_on(J1) or layer_on(J2) are defined based on key positions. - switch (keycode) { - // right hand's left side w/o N - case KC_F: - case KC_G: - case KC_R: - case KC_D: - case KC_T: - case KC_B: - case KC_H: - case KC_J: - if (record->event.pressed) { - layer_on(_EDVORAKJ1); - } - return true; - - // N: toggle layer - case KC_N: - if (record->event.pressed) { - biton32(layer_state) == _EDVORAK ? layer_on(_EDVORAKJ1) : dvorakj_layer_off(); - } - return true; - - // left hand up and right hand's right side - case KC_Y: - case KC_P: - case KC_W: - case KC_Q: - case KC_S: - case KC_M: - case KC_K: - case KC_L: - if (record->event.pressed) { - layer_on(_EDVORAKJ2); - } - return true; - // left hand down - // If return true, QMK sends keycode in new layer, - // but these keys are only available in old layer. - case KC_X: - case KC_C: - case KC_V: - case KC_Z: - if (record->event.pressed) { - layer_on(_EDVORAKJ2); - tap_code(keycode); - } - return false; - } - - // vowel keys, symbol keys and modifier keys - if (record->event.pressed) { - dvorakj_layer_off(); - } - switch (keycode) { - // combination vowel keys - case KC_AI: - if (record->event.pressed) { - SEND_STRING("ai"); - } - return false; - case KC_OU: - if (record->event.pressed) { - SEND_STRING("ou"); - } - return false; - case KC_EI: - if (record->event.pressed) { - SEND_STRING("ei"); - } - return false; - case KC_ANN: - if (record->event.pressed) { - SEND_STRING("ann"); - } - return false; - case KC_ONN: - if (record->event.pressed) { - SEND_STRING("onn"); - } - return false; - case KC_ENN: - if (record->event.pressed) { - SEND_STRING("enn"); - } - return false; - case KC_INN: - if (record->event.pressed) { - SEND_STRING("inn"); - } - return false; - case KC_UNN: - if (record->event.pressed) { - SEND_STRING("unn"); - } - return false; - } - // AOEIU and other (symbol, modifier) keys - return true; -} - bool process_record_edvorakjp_swap_scln(uint16_t keycode, keyrecord_t *record) { #ifdef SWAP_SCLN static const uint8_t shift_bits = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); @@ -146,30 +38,13 @@ bool process_record_edvorakjp_config(uint16_t keycode, keyrecord_t *record) { set_enable_kc_lang(keycode == KC_MAC); } return false; - case KC_EXTON: - case KC_EXTOFF: - if (record->event.pressed) { - set_enable_jp_extra_layer(keycode == KC_EXTON); - } - return false; } return true; } bool process_record_layer(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case EDVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_EDVORAK); - } - return false; - case QWERTY: - if (record->event.pressed) { - dvorakj_layer_off(); - set_single_persistent_default_layer(_QWERTY); - } - return false; #if TAP_DANCE_ENABLE != yes + switch (keycode) { case LOWER: if (record->event.pressed) { layer_on(_LOWER); @@ -196,8 +71,8 @@ bool process_record_layer(uint16_t keycode, keyrecord_t *record) { time_on_pressed = 0; } return false; -#endif } +#endif return true; } diff --git a/users/edvorakjp/edvorakjp_status.c b/users/edvorakjp/edvorakjp_status.c index a60c8d853b0a..128fc3bd28eb 100644 --- a/users/edvorakjp/edvorakjp_status.c +++ b/users/edvorakjp/edvorakjp_status.c @@ -4,8 +4,7 @@ typedef union { uint8_t raw; struct { - bool enable_jp_extra_layer : 1; - bool enable_kc_lang : 1; // for macOS + bool enable_kc_lang; // for macOS }; } edvorakjp_config_t; static edvorakjp_config_t edvorakjp_config; @@ -34,15 +33,6 @@ void edvorakjp_status_init(void) { edvorakjp_config.raw = eeconfig_read_edvorakjp(); } -bool get_enable_jp_extra_layer(void) { - return edvorakjp_config.enable_jp_extra_layer; -} - -void set_enable_jp_extra_layer(bool new_state) { - edvorakjp_config.enable_jp_extra_layer = new_state; - eeconfig_update_edvorakjp(edvorakjp_config.raw); -} - bool get_enable_kc_lang(void) { return edvorakjp_config.enable_kc_lang; } @@ -65,7 +55,6 @@ void set_japanese_mode(bool new_state) { SEND_STRING(SS_LALT("`")); } } else { - dvorakj_layer_off(); if (edvorakjp_config.enable_kc_lang) { SEND_STRING(SS_TAP(X_LANG2)); } else { diff --git a/users/edvorakjp/edvorakjp_tap_dance.c b/users/edvorakjp/edvorakjp_tap_dance.c index 62c0c100a22b..d5369f9266e6 100644 --- a/users/edvorakjp/edvorakjp_tap_dance.c +++ b/users/edvorakjp/edvorakjp_tap_dance.c @@ -8,8 +8,11 @@ enum tap_state { HOLD }; -static int td_status_lower = NONE; -static int td_status_raise = NONE; +typedef struct { + uint8_t lower; + uint8_t raise; +} td_status_t; +static td_status_t td_status = {NONE, NONE}; int cur_dance(qk_tap_dance_state_t *state) { if (state->interrupted || !state->pressed) { @@ -20,14 +23,14 @@ int cur_dance(qk_tap_dance_state_t *state) { } void td_lower_finished(qk_tap_dance_state_t *state, void *user_data) { - td_status_lower = cur_dance(state); - switch(td_status_lower) { + td_status.lower = cur_dance(state); + switch(td_status.lower) { case SINGLE_TAP: set_japanese_mode(false); - register_code(KC_ESC); break; case DOUBLE_TAP: set_japanese_mode(false); + register_code(KC_ESC); break; case HOLD: break; @@ -36,18 +39,19 @@ void td_lower_finished(qk_tap_dance_state_t *state, void *user_data) { } void td_lower_reset(qk_tap_dance_state_t *state, void *user_data) { - if (td_status_lower == SINGLE_TAP) { + if (td_status.lower == DOUBLE_TAP) { unregister_code(KC_ESC); } layer_off(_LOWER); - td_status_lower = NONE; + td_status.lower = NONE; } void td_raise_finished(qk_tap_dance_state_t *state, void *user_data) { - td_status_raise = cur_dance(state); - switch(td_status_raise) { - case SINGLE_TAP: + td_status.raise = cur_dance(state); + switch(td_status.raise) { case DOUBLE_TAP: + // same as single + case SINGLE_TAP: set_japanese_mode(true); break; case HOLD: @@ -58,14 +62,12 @@ void td_raise_finished(qk_tap_dance_state_t *state, void *user_data) { void td_raise_reset(qk_tap_dance_state_t *state, void *user_data) { layer_off(_RAISE); - td_status_raise = NONE; + td_status.raise = NONE; } qk_tap_dance_action_t tap_dance_actions[] = { - [TD_LOWER] = ACTION_TAP_DANCE_FN_ADVANCED_TIME( - NULL, td_lower_finished, td_lower_reset, TAPPING_TERM * 1.5 - ), - [TD_RAISE] = ACTION_TAP_DANCE_FN_ADVANCED_TIME( - NULL, td_raise_finished, td_raise_reset, TAPPING_TERM * 1.5 - ) + [TD_LOWER] = + ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, td_lower_finished, td_lower_reset, 100), + [TD_RAISE] = + ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, td_raise_finished, td_raise_reset, 100) }; diff --git a/users/edvorakjp/readme.md b/users/edvorakjp/readme.md index 077ba4abdcfc..679d84b3deff 100644 --- a/users/edvorakjp/readme.md +++ b/users/edvorakjp/readme.md @@ -5,49 +5,20 @@ epaew's Enhanced Dvorak layout for Japanese Programmer ## Layout overview This is a sample. You can swap any symbol keys and modifier keys. -- Base layer (for ansi layout) +- Basic layout (for ansi) ``` //+----+----+----+----+----+----+----+----+----+----+----+----+----+---------+ ` , ! , @ , # , $ , % , ^ , & , * , ( , ) , [ , ] , BSPC , //+----+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+-------+ - TAB , ' , , , . , Y , P , F , G , R , W , Q , / , = , \ , + TAB , ' , , , . , Y , Q , F , G , R , W , P , / , = , \ , //+------++---++---++---++---++---++---++---++---++---++---++---++---+-------+ CAPS , A , O , E , I , U , D , T , N , S , M , - , ENT , //+-------+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-----------+ - LSFT , ; , X , C , V , Z , B , H , J , K , L , RSFT , + LSFT , : , X , C , V , Z , H , J , K , L , B , RSFT , //+------+--+---++----++---+----+----+----+----+-+--+---++----++------+------+ LCTL , LGUI , LALT , SPACE , RALT , RGUI , MENU , RCTL //+------+------+------+-------------------------+------+------+------+------+ ``` -- Base layer (for iso layout) - - Two C keys are placed, it's on purpose. -``` - //+----+----+----+----+----+----+----+----+----+----+----+----+----+---------+ - ` , ! , @ , # , $ , % , ^ , & , * , ( , ) , [ , ] , BSPC , - //+----+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+-------+ - TAB , ' , , , . , Y , P , F , G , R , W , C , / , = , - //+------++---++---++---++---++---++---++---++---++---++---++---++---++ - CAPS , A , O , E , I , U , D , T , N , S , M , ; , - , ENT , - //+-------+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+------+ - LSFT , Q , X , C , V , Z , B , H , J , K , L , \ , RSFT , - //+------+--+---++----++---+----+----+----+----+-+--+---++----++---+--+------+ - LCTL , LGUI , LALT , SPACE , RALT , RGUI , MENU , RCTL - //+------+------+------+-------------------------+------+------+------+------+ -``` -- Additional layer (common, blanks are transparent) -``` - //+----+----+----+----+----+----+----+----+----+----+----+----+----+---------+ - , , , , , , , , , , , , , , - //+----+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+-------+ - , AI , OU , EI , , , , , , , , , , , - //+------++---++---++---++---++---++---++---++---++---++---++---++---+-------+ - , A , O , E , I , U , , Y1 , N , Y2 , , , , - //+-------+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-+--+-----------+ - ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , - //+------+--+---++----++---+----+----+----+----+-+--+---++----++------+------+ - , , , , , , , - //+------+------+------+-------------------------+------+------+------+------+ -``` And you can see [my iris keyboard layout](../../keyboards/iris/keymaps/edvorakjp/keymap.c) for sample implementation, too. @@ -57,36 +28,25 @@ This is a sample. You can swap any symbol keys and modifier keys. - IME 切り替えキー - 長押しでレイヤー切り替え、短押しでIME切り替え - macOS(かな/英数)、Windows(Alt+\`)の両方に対応 - - DvorakJP()を参考にした日本語入力用キーの導入 - - 拗音入力用のYキーを追加配置 - - 二重母音入力用のキー(AI, OU, EI) - - 撥音入力用のキー(ANN, ONN, ENN, INN, UNN) - - いずれかの子音を押下することで Additional layer が出現し、いずれかの母音を押下することで Base layer に戻ります(※1※2) - - ※1促音の入力に使うため、また連続で同じ指での打鍵を減らすために、 - FGRDTNBHJ を押下した場合はy1が、それ以外の子音を押下した場合はy2が出現しません - - ※2撥音の入力のため、nを2連打すると、Base layerに戻ります - Define some custom keys for typing Japanese - IME switching - act as LOWER/RAISE when hold, act as IME switching when tapped - for macOS(かな/英数), for Windows(Alt+\`) - - oneshot combination keys, inspired from DvorakJP () - - additional Y key to enter a contracted sound - - diphthong keys (AI, OU, EI) - - syllabic nasal (ANN, ONN, ENN, INN, UNN) - - Additional layer is appeared when you taps any consonant keys, and disappeared when you taps any diphthong keys. ## for Programmer - Dvorak 配列をベースに、ショートカットでよく利用される XCV は QWERTY 配列の位置を維持 - 一部にVimユーザ用のキー配置を実施 - HJKL キーを横並びで配置 - - Shift押下時と非押下時で、";"キーの挙動を入れ替え(`config.h` 内で `#define SWAP_SCLN` の宣言が必要です) + - Shift押下時と非押下時で、";"キーの挙動を入れ替え + (`config.h` 内で `#define SWAP_SCLN` の宣言が必要です) - デフォルトレイヤーには、数字キーの代わりに記号 `!@#$%^&*()` を配置 - mainly based on Dvorak layout, but XCV is available in the same position of QWERTY layout - for Vim users - HJKL is lining side by side - - swap the ";" key behavior. i.e. send ":" normally and send ";" when you hold shift. (need `#define SWAP_SCLN` in your `config.h`) + - swap the ";" key behavior. i.e. send ":" normally and send ";" when you hold shift. + (need `#define SWAP_SCLN` in your `config.h`) - we can type `!@#$%^&*()` keys without shift keys in base layer ## License diff --git a/users/gordon/gordon.h b/users/gordon/gordon.h index 92641a8aae11..49b4f0569fec 100644 --- a/users/gordon/gordon.h +++ b/users/gordon/gordon.h @@ -6,11 +6,9 @@ // Fillers to make layering more clear -#define _______ KC_TRNS #define ________ KC_TRNS #define _________ KC_TRNS #define _XXXXXX_ KC_TRNS -#define XXXXXXX KC_NO // KC codes that are too long #define DOLLAR KC_DOLLAR diff --git a/users/ishtob/ishtob.h b/users/ishtob/ishtob.h index ced78a09d820..29d6f250c439 100644 --- a/users/ishtob/ishtob.h +++ b/users/ishtob/ishtob.h @@ -43,9 +43,6 @@ enum userspace_keycodes { #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl @@ -237,4 +234,4 @@ NOTE: These are all the same length. If you do a search/replace -#endif // !USERSPACE \ No newline at end of file +#endif // !USERSPACE diff --git a/users/jarred/config.h b/users/jarred/config.h index f282088144d8..e63ec4d9b7aa 100644 --- a/users/jarred/config.h +++ b/users/jarred/config.h @@ -39,6 +39,7 @@ #undef TAPPING_TERM #undef IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 #define IGNORE_MOD_TAP_INTERRUPT diff --git a/users/jarred/jarred.c b/users/jarred/jarred.c index 33162b6891a4..b37c4cfbb759 100644 --- a/users/jarred/jarred.c +++ b/users/jarred/jarred.c @@ -17,16 +17,81 @@ #include "jarred.h" #include "version.h" +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +bool lowerPressed, raisePressed; + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { + case LOWER: + case RAISE: + // Both lower and raise activate the same layer + if (record->event.pressed) { + layer_on(_LW); + } else { + layer_off(_LW); + } + + // But keep track of each to active adjust layer + if (keycode == LOWER) { + lowerPressed = record->event.pressed; + } else { + raisePressed = record->event.pressed; + } + + // When both are pressed, activate adjust + if (lowerPressed && raisePressed) { + layer_on(_NP); + } else { + layer_off(_NP); + } + + break; + + case NUMPAD: + if (record->event.pressed) { + layer_on(_NP); + } else { + layer_off(_NP); + } + break; + + case NAVI: + if (record->event.pressed) { + layer_on(_NV); + } else { + layer_off(_NV); + + // Release mods set by ALT_TAB and CTL_TAB + unregister_code(KC_LALT); + unregister_code(KC_LCTL); + } + break; + case VRSN: // Prints firmware version if (record->event.pressed) { send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), MACRO_TIMER); } - return false; + break; + + case ALT_TAB: + if (record->event.pressed) { + register_code(KC_LALT); + tap_code(KC_TAB); + } + break; + + case CTL_TAB: + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code(KC_TAB); + } break; } - return true; + return process_record_keymap(keycode, record); } diff --git a/users/jarred/jarred.h b/users/jarred/jarred.h index a6774ce264e7..ae48adb70c15 100644 --- a/users/jarred/jarred.h +++ b/users/jarred/jarred.h @@ -13,6 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + +// TODO: Add Alt-Tab to nav + W layer #ifndef USERSPACE #define USERSPACE @@ -20,31 +22,60 @@ #include "quantum.h" enum userspace_custom_keycodes { - VRSN = SAFE_RANGE // Prints QMK Firmware and board info + VRSN = SAFE_RANGE, // Prints QMK Firmware and board info + ALT_TAB, + CTL_TAB, + + // Layer keys + NAVI, + LOWER, + RAISE, + NUMPAD }; // Layers -#define _QW 0 -#define _LW 1 -#define _NV 2 -#define _NP 3 -#define _MS 4 // Mouse +enum { + _QW = 0, + _GAME, + _LW, + _NV, + _NP, + _MS, +}; + +#define MS_A LT(_MS,KC_A) -#define MS_A LT(_MS,KC_A) +#define WIN_Z LGUI_T(KC_Z) +#define CTL_SLH RCTL_T(KC_SLSH) // Wrappers #define LAYOUT_planck_grid_wrapper(...) LAYOUT_planck_grid(__VA_ARGS__) +#define LAYOUT_atreus62_grid_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_ergotravel_grid_wrapper(...) LAYOUT(__VA_ARGS__) /* Qwerty Layer */ #define QWERTY_L1 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T -#define QWERTY_L2 MO(_NV), KC_A, KC_S, KC_D, KC_F, KC_G -#define QWERTY_L3 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B -#define QWERTY_L4 KC_LCTL, KC_LGUI, MO(_NP), KC_LALT, MO(_LW), KC_SPC +#define QWERTY_L2 NAVI, KC_A, KC_S, KC_D, KC_F, KC_G +#define QWERTY_L3 KC_LSFT, WIN_Z, KC_X, KC_C, KC_V, KC_B +#define QWERTY_L4 KC_LCTL, KC_LGUI, NUMPAD, KC_LALT, LOWER, KC_SPC #define QWERTY_R1 KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC #define QWERTY_R2 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT -#define QWERTY_R3 KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT -#define QWERTY_R4 KC_ENT, MO(_LW), KC_RALT, MO(_MS), KC_APP, KC_RCTL +#define QWERTY_R3 KC_N, KC_M, KC_COMM, KC_DOT, CTL_SLH, KC_RSFT +#define QWERTY_R4 KC_ENT, RAISE, KC_RALT, MO(_MS), KC_APP, KC_RCTL + +#define QWERTY_4_DOX KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT + +/* Game Layer */ +#define GAME_L1 _______, _______, _______, _______, _______, _______ +#define GAME_L2 _______, _______, _______, _______, _______, _______ +#define GAME_L3 _______, _______, _______, _______, _______, _______ +#define GAME_L4 _______, _______, KC_LALT, LOWER, KC_SPC, KC_SPC + +#define GAME_R1 _______, _______, _______, _______, _______, _______ +#define GAME_R2 _______, _______, _______, _______, _______, _______ +#define GAME_R3 _______, _______, _______, _______, _______, _______ +#define GAME_R4 _______, _______, _______, _______, _______, _______ /* Lower / Upper Layer */ #define LOWER_L1 KC_ESC , KC_1, KC_2, KC_3, KC_4, KC_5 @@ -57,27 +88,33 @@ enum userspace_custom_keycodes { #define LOWER_R3 KC_F12, KC_GRV, _______, _______, _______, _______ #define LOWER_R4 _______, _______, _______, _______, _______, _______ +#define LOWER_4_DOX _______, _______, _______, _______, _______, _______ + /* Navigation Layer */ #define NAV_L1 _______, _______, _______, KC_LGUI, KC_DEL, KC_BSPC #define NAV_L2 _______, _______, _______, KC_LSFT, KC_LCTL, KC_ENT #define NAV_L3 _______, _______, _______, _______, _______, _______ -#define NAV_L4 _______, _______, _______, _______, _______, _______ +#define NAV_L4 _______, _______, _______, CTL_TAB, ALT_TAB, _______ #define NAV_R1 _______, KC_HOME, KC_UP , KC_END , KC_INS, _______ #define NAV_R2 _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, _______ #define NAV_R3 _______, KC_PGUP, KC_PGDN, _______, _______, _______ -#define NAV_R4 _______, _______, _______, _______, _______, _______ +#define NAV_R4 _______, KC_APP, _______, _______, _______, _______ + +#define NAV_4_DOX CTL_TAB, ALT_TAB, _______, _______, KC_APP, _______ /* Numpad Layer */ -#define NUMPAD_L1 RGB_TOG, RGB_MOD, _______, _______, RGB_HUD, RGB_HUI +#define NUMPAD_L1 RGB_TOG, RGB_MOD,RGB_RMOD, _______, RGB_HUD, RGB_HUI #define NUMPAD_L2 BL_TOGG, BL_STEP, BL_BRTG, _______, RGB_SAD, RGB_SAI #define NUMPAD_L3 _______, _______, _______, _______, RGB_VAD, RGB_VAI -#define NUMPAD_L4 RESET, VRSN, _______, _______, RGB_SPD, RGB_SPI +#define NUMPAD_L4 _______, _______, _______, _______, RGB_SPD, RGB_SPI + +#define NUMPAD_R1 DF(_QW),DF(_GAME), _______, _______, _______, RESET +#define NUMPAD_R2 _______, _______, _______, _______, _______, _______ +#define NUMPAD_R3 VRSN, _______, _______, _______, _______, _______ +#define NUMPAD_R4 _______, _______, _______, _______, _______, _______ -#define NUMPAD_R1 _______, KC_P7, KC_P8, KC_P9, KC_PMNS, _______ -#define NUMPAD_R2 _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______ -#define NUMPAD_R3 _______, KC_P1, KC_P2, KC_P3, KC_PAST, KC_ENT -#define NUMPAD_R4 _______, KC_P0, XXXXXXX, KC_PDOT, KC_PSLS, KC_ENT +#define NUMPAD_4_DOX _______, _______, _______, _______, _______, _______ /* Mouse Layer */ #define MOUSE_L1 _______, _______, _______, _______, _______, _______ @@ -90,11 +127,20 @@ enum userspace_custom_keycodes { #define MOUSE_R3 _______, _______, _______, _______, _______, _______ #define MOUSE_R4 KC_BTN2, _______, _______, _______, _______, _______ +#define MOUSE_4_DOX _______, _______, _______, _______, _______, _______ + +#define BLANK_12 KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO + #define QWERTY_1_12 QWERTY_L1, QWERTY_R1 #define QWERTY_2_12 QWERTY_L2, QWERTY_R2 #define QWERTY_3_12 QWERTY_L3, QWERTY_R3 #define QWERTY_4_12 QWERTY_L4, QWERTY_R4 +#define GAME_1_12 GAME_L1, GAME_R1 +#define GAME_2_12 GAME_L2, GAME_R2 +#define GAME_3_12 GAME_L3, GAME_R3 +#define GAME_4_12 GAME_L4, GAME_R4 + #define LOWER_1_12 LOWER_L1, LOWER_R1 #define LOWER_2_12 LOWER_L2, LOWER_R2 #define LOWER_3_12 LOWER_L3, LOWER_R3 @@ -116,6 +162,7 @@ enum userspace_custom_keycodes { #define MOUSE_4_12 MOUSE_L4, MOUSE_R4 #define QWERTY_4x12 QWERTY_1_12, QWERTY_2_12, QWERTY_3_12, QWERTY_4_12 +#define GAME_4x12 GAME_1_12, GAME_2_12, GAME_3_12, GAME_4_12 #define LOWER_4x12 LOWER_1_12, LOWER_2_12, LOWER_3_12, LOWER_4_12 #define NAV_4x12 NAV_1_12, NAV_2_12, NAV_3_12, NAV_4_12 #define NUMPAD_4x12 NUMPAD_1_12, NUMPAD_2_12, NUMPAD_3_12, NUMPAD_4_12 diff --git a/users/kageurufu/rules.mk b/users/kageurufu/rules.mk index 1bd16e2626c6..df9ae559a645 100644 --- a/users/kageurufu/rules.mk +++ b/users/kageurufu/rules.mk @@ -11,5 +11,5 @@ MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes COMMAND_ENABLE = yes CONSOLE_ENABLE = yes -RGBLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = no RGBLIGHT_ANIMATIONS = yes diff --git a/users/konstantin/config.h b/users/konstantin/config.h index 800b8e49ba0e..4ca19f824521 100644 --- a/users/konstantin/config.h +++ b/users/konstantin/config.h @@ -2,9 +2,6 @@ #define FORCE_NKRO -#define MAGIC_KEY_LAYER0_ALT1 BSLS -#define MAGIC_KEY_BOOTLOADER ESC - #define MOUSEKEY_DELAY 50 #define MOUSEKEY_INTERVAL 15 #define MOUSEKEY_MAX_SPEED 4 @@ -22,4 +19,4 @@ #define UNICODE_CYCLE_PERSIST false #define UNICODE_SELECTED_MODES UC_WINC, UC_WIN, UC_LNX -#define UNICODE_WINC_KEY KC_RGUI +#define UNICODE_KEY_WINC KC_RGUI diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index 47596279c363..9e3caca41478 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -1,78 +1,102 @@ #include "konstantin.h" -#ifdef LAYER_NUMPAD -static void toggle_numpad(void) { - layer_invert(L_NUMPAD); - bool numpad_on = IS_LAYER_ON(L_NUMPAD); - bool num_lock_on = IS_HOST_LED_ON(USB_LED_NUM_LOCK); - if (num_lock_on != numpad_on) { - tap_code(KC_NLCK); // Toggle Num Lock to match layer state - } +__attribute__((weak)) +void keyboard_pre_init_keymap(void) {} + +void keyboard_pre_init_user(void) { + keyboard_pre_init_keymap(); +} + +__attribute__((weak)) +void eeconfig_init_keymap(void) {} + +void eeconfig_init_user(void) { + eeconfig_init_keymap(); +} + +__attribute__((weak)) +void keyboard_post_init_keymap(void) {} + +void keyboard_post_init_user(void) { + keyboard_post_init_keymap(); } -#endif __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - return true; + return true; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (!process_record_keymap(keycode, record)) { - return false; - } - - switch (keycode) { - case CLEAR: - if (record->event.pressed) { - SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); + if (!process_record_keymap(keycode, record)) { + return false; } - return false; -#ifdef LAYER_FN - static bool fn_lock; + switch (keycode) { + case CLEAR: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); + } + return false; - case FN_FNLK: - if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) { - fn_lock = !IS_LAYER_ON(L_FN); // Fn layer will be toggled after this - } - return true; -#endif + case DST_P_R: + (record->event.pressed ? register_code16 : unregister_code16)( + (get_mods() & DST_MOD_MASK) ? DST_REM : DST_PRV + ); + return false; -#ifdef LAYER_NUMPAD - case NUMPAD: - if (record->event.pressed) { - toggle_numpad(); - } - return false; + case DST_N_A: + (record->event.pressed ? register_code16 : unregister_code16)( + (get_mods() & DST_MOD_MASK) ? DST_ADD : DST_NXT + ); + return false; + +#ifdef LAYER_FN + static bool fn_lock; + + case FN_FNLK: + if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) { + fn_lock = !IS_LAYER_ON(L_FN); // Fn layer will be toggled after this + } + return true; #endif - case KC_ESC: - if (record->event.pressed) { -#ifdef LAYER_NUMPAD - if (IS_LAYER_ON(L_NUMPAD)) { - toggle_numpad(); - return false; - } + case KC_ESC: + if (record->event.pressed) { +#ifdef LAYER_NUMPAD // Disable Numpad layer before Fn layer + if (IS_LAYER_ON(L_NUMPAD)) { + layer_off(L_NUMPAD); + return false; + } #endif #ifdef LAYER_FN - if (IS_LAYER_ON(L_FN) && fn_lock) { - layer_off(L_FN); - return fn_lock = false; - } + if (IS_LAYER_ON(L_FN) && fn_lock) { + layer_off(L_FN); + return fn_lock = false; + } #endif - } - return true; + } + return true; - default: - return true; - } + default: + return true; + } } __attribute__((weak)) uint32_t layer_state_set_keymap(uint32_t state) { - return state; + return state; } uint32_t layer_state_set_user(uint32_t state) { - return layer_state_set_keymap(state); + state = layer_state_set_keymap(state); + +#ifdef LAYER_NUMPAD + bool numpad = state & 1UL<count == 1 || state->count == 3) { - register_code(mods->kc1); - } else if (state->count == 2) { - unregister_code(mods->kc1); - register_code(mods->kc2); - } - // Prevent tap dance from sending kc1 and kc2 as weak mods - state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2)); +#define ACTION_TAP_DANCE_DOUBLE_MOD(mod1, mod2) { \ + .fn = { td_double_mod_each, NULL, td_double_mod_reset }, \ + .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ + } + +void td_double_mod_each(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data; + + // Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2 + if (state->count == 1 || state->count == 3) { + register_code(data->kc1); + } else if (state->count == 2) { + unregister_code(data->kc1); + register_code(data->kc2); + } + // Prevent tap dance from sending the mods as weak mods + state->weak_mods &= ~(MOD_BIT(data->kc1) | MOD_BIT(data->kc2)); } -void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; - if (state->count == 1 || state->count >= 3) { - unregister_code(mods->kc1); - } - if (state->count >= 2) { - unregister_code(mods->kc2); - } +void td_double_mod_reset(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data; + + if (state->count == 1 || state->count >= 3) { + unregister_code(data->kc1); + } + if (state->count >= 2) { + unregister_code(data->kc2); + } } -struct { - bool fn_on; // Layer state when tap dance started - bool started; -} td_fn_rctrl_data; - -void td_fn_rctrl_each(qk_tap_dance_state_t *state, void *user_data) { - if (!td_fn_rctrl_data.started) { - td_fn_rctrl_data.fn_on = IS_LAYER_ON(L_FN); - td_fn_rctrl_data.started = true; - } - // Single tap → Fn, double tap → RCtrl, triple tap etc. → Fn+RCtrl - if (state->count == 1 || state->count == 3) { - layer_on(L_FN); - } else if (state->count == 2) { - if (!td_fn_rctrl_data.fn_on) { - layer_off(L_FN); +#define ACTION_TAP_DANCE_MOD_LAYER(mod, layer) { \ + .fn = { td_mod_layer_each, NULL, td_mod_layer_reset }, \ + .user_data = &(qk_tap_dance_dual_role_t){ mod, layer }, \ + } + +void td_mod_layer_each(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; + + // Single tap → mod, double tap → layer, triple tap etc. → mod+layer + if (state->count == 1 || state->count == 3) { + register_code(data->kc); + } else if (state->count == 2) { + unregister_code(data->kc); + // Prevent tap dance from sending the mod as a weak mod + state->weak_mods &= ~MOD_BIT(data->kc); + layer_on(data->layer); } - register_code(KC_RCTL); - } } -void td_fn_rctrl_reset(qk_tap_dance_state_t *state, void *user_data) { - if ((state->count == 1 || state->count >= 3) && !td_fn_rctrl_data.fn_on) { - layer_off(L_FN); - } - if (state->count >= 2) { - unregister_code(KC_RCTL); - } - td_fn_rctrl_data.started = false; +void td_mod_layer_reset(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data; + + if (state->count == 1 || state->count >= 3) { + unregister_code(data->kc); + } + if (state->count >= 2) { + layer_off(data->layer); + } } -void td_lsft_fn_each(qk_tap_dance_state_t *state, void *user_data) { - // Single tap → LShift, double tap → Fn, triple tap etc. → Fn+LShift - if (state->count == 1 || state->count == 3) { - register_code(KC_LSFT); - } else if (state->count == 2) { - unregister_code(KC_LSFT); - // Prevent tap dance from sending LShift as a weak mod - state->weak_mods &= ~MOD_BIT(KC_LSFT); - layer_on(L_FN); - } +#define ACTION_TAP_DANCE_LAYER_MOD(layer, mod) { \ + .fn = { td_layer_mod_each, NULL, td_layer_mod_reset }, \ + .user_data = &(qk_tap_dance_layer_mod_t){ layer, mod, 0, 0 }, \ + } + +typedef struct { + uint8_t layer; + uint16_t kc; + bool layer_on; // Layer state when tap dance started + bool started; +} qk_tap_dance_layer_mod_t; + +void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data; + if (!data->started) { + data->layer_on = IS_LAYER_ON(data->layer); + data->started = true; + } + + // Single tap → layer, double tap → mod, triple tap etc. → layer+mod + if (state->count == 1 || state->count == 3) { + layer_on(data->layer); + } else if (state->count == 2) { + if (!data->layer_on) { + layer_off(data->layer); + } + register_code(data->kc); + } } -void td_lsft_fn_reset(qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1 || state->count >= 3) { - unregister_code(KC_LSFT); - } - if (state->count >= 2) { - layer_off(L_FN); - } +void td_layer_mod_reset(qk_tap_dance_state_t *state, void *user_data) { + qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data; + + if ((state->count == 1 || state->count >= 3) && !data->layer_on) { + layer_off(data->layer); + } + if (state->count >= 2) { + unregister_code(data->kc); + } + + data->started = false; } qk_tap_dance_action_t tap_dance_actions[] = { - [TD_DESKTOP] = ACTION_TAP_DANCE_DOUBLE(LCTL(LGUI(KC_D)), LCTL(LGUI(KC_F4))), // Add/close virtual desktop + [TD_DST_A_R] = ACTION_TAP_DANCE_DOUBLE(DST_ADD, DST_REM), - [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_LALT), - [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RALT, KC_RGUI), - [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RCTL, KC_RSFT), + [TD_RAL_LAL] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_LALT), + [TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_RGUI), + [TD_RCT_RSF] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RCTL, KC_RSFT), - [TD_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset), - [TD_LSFT_FN] = ACTION_TAP_DANCE_FN_ADVANCED(td_lsft_fn_each, NULL, td_lsft_fn_reset), + [TD_LSFT_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_LSFT, L_FN), + [TD_RCTL_FN] = ACTION_TAP_DANCE_MOD_LAYER(KC_RCTL, L_FN), + [TD_FN_RCTL] = ACTION_TAP_DANCE_LAYER_MOD(L_FN, KC_RCTL), }; diff --git a/users/konstantin/tap_dance.h b/users/konstantin/tap_dance.h index 922a63514166..13d682a60390 100644 --- a/users/konstantin/tap_dance.h +++ b/users/konstantin/tap_dance.h @@ -2,24 +2,24 @@ #include "quantum.h" -#define DESKTOP TD(TD_DESKTOP) -#define DSKTP_L LCTL(LGUI(KC_LEFT)) -#define DSKTP_R LCTL(LGUI(KC_RGHT)) +#define DST_A_R TD(TD_DST_A_R) #define RAL_LAL TD(TD_RAL_LAL) #define RAL_RGU TD(TD_RAL_RGU) #define RCT_RSF TD(TD_RCT_RSF) -#define FN_RCTL TD(TD_FN_RCTL) #define LSFT_FN TD(TD_LSFT_FN) +#define RCTL_FN TD(TD_RCTL_FN) +#define FN_RCTL TD(TD_FN_RCTL) enum tap_dance { - TD_DESKTOP, + TD_DST_A_R, - TD_RAL_LAL, - TD_RAL_RGU, - TD_RCT_RSF, + TD_RAL_LAL, + TD_RAL_RGU, + TD_RCT_RSF, - TD_FN_RCTL, - TD_LSFT_FN, + TD_LSFT_FN, + TD_RCTL_FN, + TD_FN_RCTL, }; diff --git a/users/konstantin/unicode.c b/users/konstantin/unicode.c new file mode 100644 index 000000000000..8ef5aaa1ec35 --- /dev/null +++ b/users/konstantin/unicode.c @@ -0,0 +1,7 @@ +#include "unicode.h" + +#ifdef UNICODEMAP_ENABLE +const uint32_t PROGMEM unicode_map[] = { + FOREACH_UNICODE(UCM_ENTRY) +}; +#endif diff --git a/users/konstantin/unicode.h b/users/konstantin/unicode.h index 09af7e1c7f6c..b2616d120b4d 100644 --- a/users/konstantin/unicode.h +++ b/users/konstantin/unicode.h @@ -2,10 +2,33 @@ #include "quantum.h" -#define COMMA UC(0x002C) -#define L_PAREN UC(0x0028) -#define R_PAREN UC(0x0029) -#define EQUALS UC(0x003D) -#define TIMES UC(0x00D7) -#define DIVIDE UC(0x00F7) -#define MINUS UC(0x2212) +#define FOREACH_UNICODE(M) \ + M(COMMA, 0x002C) \ + M(L_PAREN, 0x0028) \ + M(R_PAREN, 0x0029) \ + M(EQUALS, 0x003D) \ + M(TIMES, 0x00D7) \ + M(DIVIDE, 0x00F7) \ + M(MINUS, 0x2212) + +#define UC_KEYCODE(name, code) name = UC(code), + +#define UCM_NAME(name, code) UCM_ ## name, +#define UCM_ENTRY(name, code) [UCM_ ## name] = code, +#define UCM_KEYCODE(name, code) name = X(UCM_ ## name), + +#if defined(UNICODE_ENABLE) +enum unicode_keycodes { + FOREACH_UNICODE(UC_KEYCODE) +}; +#elif defined(UNICODEMAP_ENABLE) +enum unicode_names { + FOREACH_UNICODE(UCM_NAME) +}; + +extern const uint32_t PROGMEM unicode_map[]; + +enum unicode_keycodes { + FOREACH_UNICODE(UCM_KEYCODE) +}; +#endif diff --git a/users/kuatsure/kuatsure.c b/users/kuatsure/kuatsure.c index a18713626ec1..f935e83c7445 100644 --- a/users/kuatsure/kuatsure.c +++ b/users/kuatsure/kuatsure.c @@ -1,35 +1,62 @@ #include "kuatsure.h" +#include "version.h" -void tmux_prefix(void) { - register_code(KC_LCTL); - register_code(KC_SPC); +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LT), + [TD_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_GT) +}; - unregister_code(KC_LCTL); - unregister_code(KC_SPC); +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; } -void tmux_pane_zoom(void) { - tmux_prefix(); +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KB_MAKE: + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP SS_TAP(X_ENTER)); + } + return false; + break; + + case KB_VRSN: + if (!record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + + case KB_FLSH: + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP + #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) + ":dfu " + #elif defined(BOOTLOADER_HALFKAY) + ":teensy " + #elif defined(BOOTLOADER_CATERINA) + ":avrdude " + #endif + SS_TAP(X_ENTER) + ); + + reset_keyboard(); + } + return false; + break; + } - register_code(KC_Z); - unregister_code(KC_Z); + return process_record_keymap(keycode, record); } -void tmux_pane_switch(uint16_t keycode) { - tmux_prefix(); - - register_code(KC_Q); - unregister_code(KC_Q); - - register_code(keycode); - unregister_code(keycode); +void tmux_prefix(void) { + tap_code16(LCTL(KC_SPC)); } -void tmux_window_switch(uint16_t keycode) { +void tmux_pane_zoom(void) { tmux_prefix(); - register_code(keycode); - unregister_code(keycode); + SEND_STRING("z"); } LEADER_EXTERNS(); @@ -43,69 +70,70 @@ void matrix_scan_user(void) { // anything you can do in a macro https://docs.qmk.fm/macros.html // https://docs.qmk.fm/feature_leader_key.html + // Stop music and lock computer via alfred + SEQ_ONE_KEY(KC_H) { + SEND_STRING(SS_LGUI(" ") SS_TAP(X_LGUI) "afk" SS_TAP(X_ENTER)); + } + + // Stop music and lock computer via alfred + SEQ_TWO_KEYS(KC_H, KC_H) { + SEND_STRING(SS_LGUI(" ") SS_TAP(X_LGUI) "afk" SS_TAP(X_ENTER) SS_TAP(X_MEDIA_PLAY_PAUSE)); + } + // Whole Screen Shot SEQ_ONE_KEY(KC_A) { - register_code(KC_LGUI); - register_code(KC_LSFT); - register_code(KC_3); - - unregister_code(KC_3); - unregister_code(KC_LSFT); - unregister_code(KC_LGUI); + SEND_STRING(SS_LGUI(SS_LSFT("3"))); } // Selective Screen Shot SEQ_ONE_KEY(KC_S) { - register_code(KC_LGUI); - register_code(KC_LSFT); - register_code(KC_4); - - unregister_code(KC_4); - unregister_code(KC_LSFT); - unregister_code(KC_LGUI); + SEND_STRING(SS_LGUI(SS_LSFT("4"))); } // TMUX - shift to pane 1 and zoom SEQ_ONE_KEY(KC_J) { - tmux_pane_switch(KC_1); + tmux_prefix(); + SEND_STRING("q1"); tmux_pane_zoom(); } + // TMUX - shift to first window + SEQ_TWO_KEYS(KC_J, KC_J) { + tmux_prefix(); + SEND_STRING("1"); + } + // TMUX - shift to pane 2 and zoom SEQ_ONE_KEY(KC_K) { - tmux_pane_switch(KC_2); + tmux_prefix(); + SEND_STRING("q2"); tmux_pane_zoom(); } + // TMUX - shift to second window + SEQ_TWO_KEYS(KC_K, KC_K) { + tmux_prefix(); + SEND_STRING("2"); + } + // TMUX - shift to pane 3 and zoom SEQ_ONE_KEY(KC_L) { - tmux_pane_switch(KC_3); + tmux_prefix(); + SEND_STRING("q3"); tmux_pane_zoom(); } + // TMUX - shift to third window + SEQ_TWO_KEYS(KC_L, KC_L) { + tmux_prefix(); + SEND_STRING("3"); + } + // TMUX - shift to last pane and zoom SEQ_ONE_KEY(KC_SCOLON) { tmux_prefix(); - - register_code(KC_SCOLON); - unregister_code(KC_SCOLON); - + SEND_STRING(";"); tmux_pane_zoom(); } - - // TMUX - shift to first window - SEQ_ONE_KEY(KC_U) { - tmux_window_switch(KC_1); - } - - // TMUX - shift to second window - SEQ_ONE_KEY(KC_I) { - tmux_window_switch(KC_2); - } - - // TMUX - shift to third window - SEQ_ONE_KEY(KC_O) { - tmux_window_switch(KC_3); - } } } diff --git a/users/kuatsure/kuatsure.h b/users/kuatsure/kuatsure.h index 23d3c617cbcd..8961d5621306 100644 --- a/users/kuatsure/kuatsure.h +++ b/users/kuatsure/kuatsure.h @@ -3,12 +3,32 @@ #include "quantum.h" +enum kuatsure_keycodes { + KB_MAKE = SAFE_RANGE, + KB_FLSH, + KB_VRSN, + + USER_SAFE_RANGE, +}; + +enum { + TD_LBRC = 0, + TD_RBRC, +}; + +#define KT_LBRC TD(TD_LBRC) +#define KT_RBRC TD(TD_RBRC) + +#define TAPPING_TERM 200 + +#define LEADER_TIMEOUT 250 +#define LEADER_PER_KEY_TIMING + void tmux_prefix(void); void tmux_pane_zoom(void); -void tmux_pane_switch(uint16_t keycode); -void tmux_window_switch(uint16_t keycode); #define KT_CESC CTL_T(KC_ESC) +#define KT_MTAB MEH_T(KC_TAB) #undef LEADER_TIMEOUT #define LEADER_TIMEOUT 300 @@ -18,6 +38,9 @@ void tmux_window_switch(uint16_t keycode); #define _________________NUMBER_L1_________________ KC_1, KC_2, KC_3, KC_4, KC_5 #define _________________NUMBER_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0 +#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define _________________SYMBOL_R1_________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN + #define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T #define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G #define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B @@ -30,4 +53,9 @@ void tmux_window_switch(uint16_t keycode); #define ____________FUNCTION_2____________ KC_F5, KC_F6, KC_F7, KC_F8 #define ____________FUNCTION_3____________ KC_F9, KC_F10, KC_F11, KC_F12 +#define ___SQBRACKETS___ KT_LBRC, KT_RBRC +#define _____PARENS_____ KC_LPRN, KC_RPRN +#define ____CRBRACES____ KC_LCBR, KC_RCBR +#define ___ANBRACKETS___ KC_LT, KC_GT + #endif diff --git a/users/kuatsure/rules.mk b/users/kuatsure/rules.mk index f0d295aad05a..ed7e92905468 100644 --- a/users/kuatsure/rules.mk +++ b/users/kuatsure/rules.mk @@ -1,3 +1,4 @@ CONSOLE_ENABLE = no +TAP_DANCE_ENABLE = yes SRC += kuatsure.c diff --git a/users/losinggeneration/losinggeneration-common.h b/users/losinggeneration/losinggeneration-common.h index c1d6724c5d22..857117ca1652 100644 --- a/users/losinggeneration/losinggeneration-common.h +++ b/users/losinggeneration/losinggeneration-common.h @@ -3,9 +3,6 @@ /* Custom keys & combinations to be shorter for keymaps */ #define KC_LCA LCA(KC_NO) -/* Fillers to make layering more clear */ -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define OSM_LSFT OSM(MOD_LSFT) #define TD_CTL TD(TD_CTL_CTLALT) diff --git a/users/mechmerlin/changelog.md b/users/mechmerlin/changelog.md index 11b3ba708f6b..f1116b2d2b13 100644 --- a/users/mechmerlin/changelog.md +++ b/users/mechmerlin/changelog.md @@ -1,6 +1,18 @@ # Changelog All notable changes to my userspace will be documented in this file. +## [0.2.2] - 2019-04-22 +### Fixed +- `config.h` usage of turning on `RGBLIGHT_ENABLE` when it is not enabled on boards other than my two clueboards were causing issues with boards that didn't have RGB underglow on it. + +## [0.2.1] - 2019-03-01 +### Fixed +- `config.h` usage of `#ifdef RGBLIGHT_ENABLE` caused problems for other of my boards that had `RGBLIGHT_ENABLE`. + +## [0.2.0] - 2019-02-27 +### Changed +- Moved `AUDIO_CLICKY` from community layout `66_ansi` into user space. + ## [0.1.1] - 2018-10-26 ### Added - Added a changelog, aka THIS VERY FILE! diff --git a/users/mechmerlin/config.h b/users/mechmerlin/config.h index 3d58c230af65..fe8f9c9ffb2a 100644 --- a/users/mechmerlin/config.h +++ b/users/mechmerlin/config.h @@ -1,5 +1,31 @@ #pragma once #ifdef RGBLIGHT_ENABLE -#define RGBLIGHT_SLEEP + #define RGBLIGHT_SLEEP + #define RGBLIGHT_ANIMATIONS #endif // RGBLIGHT_ENABLE + +#ifdef AUDIO_CLICKY + #define AUDIO_CLICKY_ON + #define AUDIO_CLICKY_FREQ_DEFAULT 261.63f + #define AUDIO_CLICKY_FREQ_MIN 65.41f + #define AUDIO_CLICKY_FREQ_MAX 1046.5f + //#define AUDIO_CLICKY_FREQ_FACTOR 1.18921f + //#define AUDIO_CLICKY_FREQ_FACTOR 2.71828f // e + #define AUDIO_CLICKY_FREQ_FACTOR 1.61803f // golden ratio + #define AUDIO_CLICKY_FREQ_RANDOMNESS 17.0f +#endif + +// Enable features depending on keyboard +#if defined(KEYBOARD_clueboard_66_hotswap_prototype) + #ifndef RGBLIGHT_ENABLE + #define RGBLIGHT_ENABLE + #endif + #ifndef AUDIO_CLICKY + #define AUDIO_CLICKY + #endif +#elif defined(KEYBOARD_clueboard_66_hotswap_gen1) + #ifndef AUDIO_CLICKY + #define AUDIO_CLICKY + #endif +#endif diff --git a/users/mechmerlin/readme.md b/users/mechmerlin/readme.md index 1e86a64107fc..24335a7ce22d 100644 --- a/users/mechmerlin/readme.md +++ b/users/mechmerlin/readme.md @@ -1,4 +1,4 @@ -# MechMerlin's Userspace v0.1.1 +# MechMerlin's Userspace v0.2.0 This is a collection of my most commonly used QMK features. @@ -38,3 +38,11 @@ This is just a wrapper for `CTL_T(KC_CAPS)`. This is a hold for control and tap ### RGBLIGHT_SLEEP Ensures that when my computer is in sleep mode, the keyboard underglow lights will also be off. + +### Audio Clicky + +If a board has a speaker, enable beeps and boops per switch actuation. This is currently only available on prototype/gen1 clueboard 66_hotswaps. + +### Velocikey + +[Velocikey](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_velocikey.md) is an RGBLIGHT feature in which the faster you type, the faster the ARE GEE BEES. diff --git a/users/mechmerlin/rules.mk b/users/mechmerlin/rules.mk index 70c20ec71ecd..088743c4679c 100644 --- a/users/mechmerlin/rules.mk +++ b/users/mechmerlin/rules.mk @@ -1 +1 @@ -SRC += mechmerlin.c \ No newline at end of file +SRC += mechmerlin.c diff --git a/users/mtdjr/mtdjr.h b/users/mtdjr/mtdjr.h index 85ca1596dce8..4d0b046fc323 100644 --- a/users/mtdjr/mtdjr.h +++ b/users/mtdjr/mtdjr.h @@ -55,8 +55,6 @@ enum user_tapdance { // Custom Keycodes #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_xxxx KC_NO #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/users/not-quite-neo/nqn-common.h b/users/not-quite-neo/nqn-common.h index a04dc7a18f15..bcd79505f751 100644 --- a/users/not-quite-neo/nqn-common.h +++ b/users/not-quite-neo/nqn-common.h @@ -6,9 +6,4 @@ This file holds some commen NQN definitions */ - -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - #endif diff --git a/users/pvinis/config.h b/users/pvinis/config.h new file mode 100644 index 000000000000..8e2efb40a4b1 --- /dev/null +++ b/users/pvinis/config.h @@ -0,0 +1,10 @@ +#pragma once + +#ifdef AUDIO_ENABLE +// #define STARTUP_SONG SONG(SONIC_RING) +// #define DAC_SAMPLE_MAX 65535U // maybe this works for volume? +#endif + +// allow rolling when keys have hold functionality +#define IGNORE_MOD_TAP_INTERRUPT +// #define TAPPING_TERM 150 diff --git a/users/pvinis/pvinis.c b/users/pvinis/pvinis.c new file mode 100644 index 000000000000..e97edcb98cc0 --- /dev/null +++ b/users/pvinis/pvinis.c @@ -0,0 +1,89 @@ +#include "pvinis.h" +#include "version.h" + +#ifdef AUDIO_ENABLE +#include "audio.h" +#endif // AUDIO_ENABLE + + +#ifdef AUDIO_ENABLE +// float tone_katamari_rolling_star[][2] = SONG(KATAMARI_ROLLING_STAR); +#endif // AUDIO_ENABLE + + +// SYMBOL + SYSCTL = KBCTL +uint32_t layer_state_set_user(uint32_t state) { + uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL); + intermediate_state = layer_state_set_user_local(intermediate_state); + return intermediate_state; +} + + +// functions for the individual keymaps to implement if they need something extra +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + + +// handle my own keycodes +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + + case PV_VRSN: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + + case PV_MAKE: + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP +#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) + ":dfu" +#elif defined(BOOTLOADER_HALFKAY) + ":teensy" +#elif defined(BOOTLOADER_CATERINA) + ":avrdude" +#endif + SS_TAP(X_ENTER) + ); + } + return false; + + case PV_FLSH: + reset_keyboard(); + return false; + + case PV_KTMR: + if (record->event.pressed) { +#ifdef AUDIO_ENABLE + // PLAY_SONG(tone_katamari_rolling_star); +#endif + } + return false; + } + return process_record_keymap(keycode, record); +} + + +#ifdef TAP_DANCE_ENABLE +qk_tap_dance_action_t tap_dance_actions[] = { +}; +#endif // TAP_DANCE_ENABLE + + +// init stuff +void keyboard_post_init_user(void) { + keyboard_post_init_user_local(); +} + + +// default functions +__attribute__ ((weak)) +void keyboard_post_init_user_local(void) {} + +__attribute__ ((weak)) +uint32_t layer_state_set_user_local(uint32_t state) { + return state; +} diff --git a/users/pvinis/pvinis.h b/users/pvinis/pvinis.h new file mode 100644 index 000000000000..0c75c6a6615a --- /dev/null +++ b/users/pvinis/pvinis.h @@ -0,0 +1,152 @@ +#pragma once + +#include "quantum.h" + + +// my own keycodes +enum userspace_custom_keycodes { + PV_ = SAFE_RANGE, + + PV_VRSN, // prints firmware version + PV_MAKE, // prints the make command of the keyboard + PV_FLSH, // resets keyboard + PV_KTMR, // play katamari music + + PV_SAFE_RANGE, // used for extra keycodes in the individual keymaps +}; + +enum tap_dance_indexes { + // tap dance + TD_FLSH, // flash keyboard (as if the physical flash key was pressed) +}; + +#define ALLM(kc) LCAG(kc) // easier name for left ctrl-alt-gui +#define PV_ESCC CTL_T(KC_ESC) // esc on tap, ctrl on hold +#define PV_LOCK LCTL(LSFT(KC_PWR)) // lock computer +#define TD_3FLS TD(TD_FLSH) // tap dance 3 times for flash + + +// layers +enum { + LR_BASE = 0, // used for basic keys like the surrounding ctrl, cmd, etc + + LR_QWERTY, + LR_CARPALX, + + LR_SYMBOL, // symbol input (!, @, #, etc) + LR_SYSCTL, // system control (music, volume, keyboard flash, etc) + LR_KBCTL, // keyboard control (version, make, flash, etc) +}; + + +// layer switchers +#define BASE TO(LR_BASE) +#define QWERTY TO(LR_QWERTY) +#define CARPALX TO(LR_CARPALX) + +#define SYMBOL MO(LR_SYMBOL) +#define SYSCTL MO(LR_SYSCTL) +#define KBCTL MO(LR_KBCTL) + + +// layout parts for easy reuse between keyboard keymaps + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define ________________NUMBERS_L__________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMBERS_R__________________ KC_6, KC_7, KC_8, KC_9, KC_0 + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define ______________________F_L__________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define ______________________F_R__________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | Q | W | E | R | T | | Y | U | I | O | P | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | A | S | D | F | G | | H | J | K | L | ; | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | Z | X | C | V | B | | N | M | , | . | / | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define _________________QWERTY_L1_________________ KC_Q , KC_W , KC_E , KC_R , KC_T +#define _________________QWERTY_L2_________________ KC_A , KC_S , KC_D , KC_F , KC_G +#define _________________QWERTY_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_B + +#define _________________QWERTY_R1_________________ KC_Y , KC_U , KC_I , KC_O , KC_P +#define _________________QWERTY_R2_________________ KC_H , KC_J , KC_K , KC_L , KC_SCLN +#define _________________QWERTY_R3_________________ KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH + +#define _____________MOD_QWERTY_L2_________________ CTL_T(KC_A), SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G +#define _____________MOD_QWERTY_R2_________________ KC_H , ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), CTL_T(KC_SCLN) + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | Q | G | M | L | W | | Y | F | I | O | P | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | D | S | T | N | R | | I | A | K | L | ; | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | Z | X | C | V | J | | K | P | , | . | / | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define ________________CARPALX_L1_________________ KC_Q , KC_G , KC_M , KC_L , KC_W +#define ________________CARPALX_L2_________________ KC_D , KC_S , KC_T , KC_N , KC_R +#define ________________CARPALX_L3_________________ KC_Z , KC_X , KC_C , KC_V , KC_J + +#define ________________CARPALX_R1_________________ KC_Y , KC_F , KC_U , KC_B , KC_SCLN +#define ________________CARPALX_R2_________________ KC_I , KC_A , KC_E , KC_O , KC_H +#define ________________CARPALX_R3_________________ KC_K , KC_P , KC_COMM, KC_DOT , KC_SLSH + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | ! | @ | { | } | _ | | \ | | ` | | | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | # | $ | ( | ) | - | | = | & | ' | " | | | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | % | ^ | [ | ] | + | | * | ~ | < | > | / | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define _________________SYMBOL_L1_________________ KC_EXLM, KC_AT , KC_LCBR, KC_RCBR, KC_UNDS +#define _________________SYMBOL_L2_________________ KC_HASH, KC_DLR , KC_LPRN, KC_RPRN, KC_MINS +#define _________________SYMBOL_L3_________________ KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PLUS + +#define _________________SYMBOL_R1_________________ KC_BSLS, _______, KC_GRV , _______, _______ +#define _________________SYMBOL_R2_________________ KC_EQL , KC_AMPR, KC_QUOT, KC_DQUO, KC_PIPE +#define _________________SYMBOL_R3_________________ KC_ASTR, KC_TILD, KC_LABK, KC_RABK, KC_SLSH + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// | | | | | | |MUTE |HOME | ^ | END | | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | | | | | | |VOLUP| < | v | > | | +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// | | | | | | |VOLDN|MPREV|MPLAY|MNEXT| | +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define _________________SYSCTL_L1_________________ +#define _________________SYSCTL_L2_________________ +#define _________________SYSCTL_L3_________________ + +// vol v ctl v +#define _________________SYSCTL_R1_________________ KC_MUTE , KC_HOME , KC_UP , KC_END , PV_LOCK +#define _________________SYSCTL_R2_________________ KC_VOLU , KC_LEFT , KC_DOWN , KC_RGHT /* < arrows */ , KC_SLEP +#define _________________SYSCTL_R3_________________ KC_VOLD , KC_MPRV , KC_MPLY , KC_MNXT /* < music */ , KC_PWR + +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|VERSN|MAKE |FLASH|XXXXX| +// ,-----+-----+-----x-----x-----, ,-----x-----x-----+-----+-----, +// |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| |XXXXX|XXXXX|XXXXX|XXXXX|XXXXX| +// ,-----+-----+-----+-----+-----, ,-----+-----+-----+-----+-----, +#define __________________KBCTL_L1_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define __________________KBCTL_L2_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +#define __________________KBCTL_L3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + +#define __________________KBCTL_R1_________________ XXXXXXX, XXXXXXX, XXXXXXX, PV_KTMR, XXXXXXX +#define __________________KBCTL_R2_________________ XXXXXXX, PV_VRSN, PV_MAKE, PV_FLSH, XXXXXXX +#define __________________KBCTL_R3_________________ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + +// we need wrappers in order for these definitions, because they need to be expanded before being used as arguments to the LAYOUT_xxx macro +#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) + + +// extra stuff that might be needed +void keyboard_post_init_user_local(void); +uint32_t layer_state_set_user_local(uint32_t state); diff --git a/users/pvinis/rules.mk b/users/pvinis/rules.mk new file mode 100644 index 000000000000..da10cc74371f --- /dev/null +++ b/users/pvinis/rules.mk @@ -0,0 +1,15 @@ +# add userspace file +SRC += pvinis.c + +AUDIO_ENABLE = no # piezo speaker sounds +RGBLIGHT_ENABLE = no # rgb leds underlight +TAP_DANCE_ENABLE = yes +BACKLIGHT_ENABLE = no # leds under keycaps +#MOUSEKEY_ENABLE = no +#SLEEP_LED_ENABLE = no # no led blinking while sleeping +#NKRO_ENABLE = yes + +# make firmware smaller +LINK_TIME_OPTIMIZATION_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no diff --git a/users/replicaJunction/replicaJunction.h b/users/replicaJunction/replicaJunction.h index ab0e8ab3e3a5..9b5772543384 100644 --- a/users/replicaJunction/replicaJunction.h +++ b/users/replicaJunction/replicaJunction.h @@ -20,7 +20,6 @@ // #define L_LL_I 10 // Keyboard aliases -#define _______ KC_TRNS #define ooooooo KC_TRNS #define MO_FUNC MO(L_FUNC) diff --git a/users/romus/romus.h b/users/romus/romus.h index 265c942e9208..b65e32eb5b8a 100644 --- a/users/romus/romus.h +++ b/users/romus/romus.h @@ -4,8 +4,6 @@ #include "quantum.h" -// Use 7 wide characters for keymaps -#define _______ KC_TRNS #define XXX KC_NO // Layers diff --git a/keyboards/iris/keymaps/rs/karabiner.json b/users/rs/karabiner.json similarity index 100% rename from keyboards/iris/keymaps/rs/karabiner.json rename to users/rs/karabiner.json diff --git a/users/rs/readme.md b/users/rs/readme.md new file mode 100644 index 000000000000..60b34ea32fb1 --- /dev/null +++ b/users/rs/readme.md @@ -0,0 +1,30 @@ +# RS: Code Friendly 40% – 60% Keymaps + +The rs keymap collection is an evolution of my previous keymap optimized for coding with a 60% keyboards like the Iris. I tried to keep the simplicity of my previous keymap with all the keys necessary for coding on a single layer in addition to the base one. It work well with any 40% and 60% keyboard, split or not. + +To build it, use: + + make :rs + +Example: + + make keebio/iris:rs + make crkbd:rs + make planck:rs + make preonic:rs + make ergotravel:rs + make handwired/rs60:rs + +Because I sometime have to use my internal keyboard I my macbook, a [karabiner configuration](karabiner.json) is also provided to get most of the features of this keyboard, including the code layer / backspace on right command key etc. + +This set of keymaps have been tested with those keyboards: +- [Planck](../../keyboards/planck/) +- [Preonic](../../keyboards/preonic/) +- [My preonic clone](../../keyboards/handwired/rs60/) + +This keymap in is also available for other keyboards: +- [Crkdb/rs](../../keyboards/crkbd/keymaps/rs/keymap.c) +- [Iris/rs](../../keyboards/keebio/iris/keymaps/rs/keymap.c) +- [Ergotravel/rs](../../keyboards/ergotravel/keymaps/rs/keymap.c) +- [ortho_5x12/rs](../../layouts/community/ortho_5x12/rs/keymap.c) +- [ortho_4x12/rs](../../layouts/community/ortho_4x12/rs/keymap.c) diff --git a/users/rs/rs.c b/users/rs/rs.c new file mode 100644 index 000000000000..fa634bb92842 --- /dev/null +++ b/users/rs/rs.c @@ -0,0 +1,74 @@ + +#include "rs.h" + +// process_record_user is like process_record_user for keymaps including this file. +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +// rgb_mod_changed_keymap is called any time the RGB mod has been changed. +__attribute__ ((weak)) +void rgb_mod_changed_keymap(void) { +} + +// keylog_set_keymap is called for every key press. +__attribute__ ((weak)) +void keylog_set_keymap(uint16_t keycode, keyrecord_t *record) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + keylog_set_keymap(keycode, record); + } + + switch (keycode) { + case NEQL: // != + if (record->event.pressed) { + SEND_STRING("!="); + } + return false; + case LPLT: // ( or < with shift + if (record->event.pressed) { + if (get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) { + // < + tap_code(KC_COMM); // shift is already registered + } else { + // ( + register_mods(MOD_BIT(KC_LSFT)); + tap_code(KC_9); + unregister_mods(MOD_BIT(KC_LSFT)); + } + } + return false; + case RPGT: // ) or > with shift + if (record->event.pressed) { + if (get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) { + // < + tap_code(KC_DOT); // shift is already registered + } else { + // ) + register_mods(MOD_BIT(KC_LSFT)); + tap_code(KC_0); + unregister_mods(MOD_BIT(KC_LSFT)); + } + } + return false; +#ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_step(); + rgb_mod_changed_keymap(); + } + return false; + case RGBRST: + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + rgb_mod_changed_keymap(); + } + return false; +#endif + } + return process_record_keymap(keycode, record); +} \ No newline at end of file diff --git a/users/rs/rs.h b/users/rs/rs.h new file mode 100644 index 000000000000..722d6ed19e3e --- /dev/null +++ b/users/rs/rs.h @@ -0,0 +1,50 @@ +#pragma once +#include "quantum.h" + +enum layers { + _QWERTY, + _CODE, + _FN, +}; + +enum custom_keycodes { + CODE = SAFE_RANGE, + FN, + LPLT, + RPGT, + NEQL, +#ifdef RGBLIGHT_ENABLE + RGBRST, +#endif +}; + +#define KC_ KC_TRNS + +#define KC_ESCC MT(MOD_LCTL, KC_ESC) +#define KC_ENTS MT(MOD_LSFT, KC_ENT) +#define KC_LTGT LTGT // > or < with shift +#define KC_LPLT LPLT // ( or < with shift +#define KC_RPGT RPGT // ) or > with shift +#define KC_NEQL NEQL // != +#define KC_CODE MO(_CODE) +#define KC_BCOD LT(_CODE, KC_BSPC) +#define KC_FN MO(_FN) +#define KC_RST RESET +#define KC_CTRA LCTL(KC_A) +#define KC_CTRE LCTL(KC_E) +#define KC_BLTG BL_TOGG +#define KC_BLUP BL_INC +#define KC_BLDN BL_DEC +#define KC_BLBR BL_BRTG + +#ifdef RGBLIGHT_ENABLE +#define KC_LRST RGBRST +#define KC_LTOG RGB_TOG +#define KC_LHUI RGB_HUI +#define KC_LHUD RGB_HUD +#define KC_LSAI RGB_SAI +#define KC_LSAD RGB_SAD +#define KC_LVAI RGB_VAI +#define KC_LVAD RGB_VAD +#define KC_LMOD RGB_MOD +#endif \ No newline at end of file diff --git a/users/rs/rules.mk b/users/rs/rules.mk new file mode 100644 index 000000000000..edb5be0f5bb4 --- /dev/null +++ b/users/rs/rules.mk @@ -0,0 +1 @@ +SRC += rs.c \ No newline at end of file diff --git a/users/spacebarracecar/spacebarracecar.h b/users/spacebarracecar/spacebarracecar.h index b57cbed82425..690971c39b04 100644 --- a/users/spacebarracecar/spacebarracecar.h +++ b/users/spacebarracecar/spacebarracecar.h @@ -90,6 +90,8 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define CTLENT CTL_T(KC_ENT) +#define EMOJI LWIN(KC_DOT) + /* Templates for Keys, with custom shifted and non shifted Characters */ diff --git a/users/stanrc85/config.h b/users/stanrc85/config.h new file mode 100644 index 000000000000..42306727ceba --- /dev/null +++ b/users/stanrc85/config.h @@ -0,0 +1,9 @@ +#pragma once + +#define TAPPING_TERM 250 +#define RETRO_TAPPING + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_LIMIT_VAL 175 + #define RGBLIGHT_SLEEP +#endif diff --git a/users/stanrc85/layer_rgb.c b/users/stanrc85/layer_rgb.c new file mode 100644 index 000000000000..58f17489a125 --- /dev/null +++ b/users/stanrc85/layer_rgb.c @@ -0,0 +1,29 @@ +#include "stanrc85.h" + +void matrix_init_user(void) { + rgblight_setrgb(0xFF, 0x00, 0x00); +}; + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case 0: + rgblight_setrgb (0xFF, 0x00, 0x00); + break; + case 1: + rgblight_setrgb (0x00, 0xFF, 0x00); + break; + case 2: + rgblight_setrgb (0x00, 0x00, 0xFF); + break; + case 3: + rgblight_setrgb (0xFF, 0xFF, 0xFF); + break; + case 4: + rgblight_setrgb (0xFF, 0x00, 0xFF); + break; + default: // for any other layers, or the default layer + rgblight_setrgb (0xFF, 0x00, 0x00); + break; + } + return state; +} diff --git a/users/stanrc85/readme.md b/users/stanrc85/readme.md new file mode 100644 index 000000000000..9009a71d5f11 --- /dev/null +++ b/users/stanrc85/readme.md @@ -0,0 +1,52 @@ + + +# Stanrc85's Standard ANSI 60% Layout + +Shared keymap between two 60% PCB: +- 1upkeyboards60HSE +- DZ60 (hotswap) + +## Keymap Notes +- Layer 0 is default QWERTY layout with additional custom features: + - SpaceFN to function layer 2 on `Space` + - `CTRL` when held and `ESC` when tapped on `CAPS LOCK` + - Tap Dance on `Fn1` for `CTRL+ALT+DEL` and `WIN+L` + - Tap Dance on `ESC` for `ESC` and ` ` ` + +![Base QWERTY Layer](https://imgur.com/lGcyLJx.png) + +- Layer 1 is default QWERTY with no custom features used mostly for gaming + - Enabled by `Fn2+CAPS` from base layer + +![Default ANSI Layer](https://imgur.com/M7T9PNT.png) + +- Layer 2 is Function layer: + - F keys + - Arrows + - Volume and Media controls + - AutoHotkey shortcuts based on [Speaker Control](https://github.com/stanrc85/Speaker-Control) script + - AHK Mic is used to mute/unmute microphone + - AHK Speaker switches audio output between headphones and speakers + +![Function Layer](https://imgur.com/YPl0JrU.png) + +- Layer 3 is RGB Underglow control and RESET + - `Fn2+CAPS` used to toggle Default QWERTY layer on and off + +![RGB and RESET Layer](https://imgur.com/PyB8z7k.png) + +### Build +To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85-ansi`. diff --git a/users/stanrc85/rules.mk b/users/stanrc85/rules.mk new file mode 100644 index 000000000000..4b66f9692db0 --- /dev/null +++ b/users/stanrc85/rules.mk @@ -0,0 +1,16 @@ +TAP_DANCE_ENABLE = yes +EXTRAKEY_ENABLE = yes +BACKLIGHT_ENABLE = no +COMMAND_ENABLE = no +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +AUDIO_ENABLE = no +CONSOLE_ENABLE = no +NKRO_ENABLE = no + +SRC += stanrc85.c + +ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) + # Include my fancy rgb functions source here + SRC += layer_rgb.c +endif diff --git a/users/stanrc85/stanrc85.c b/users/stanrc85/stanrc85.c new file mode 100644 index 000000000000..e3da6d64667a --- /dev/null +++ b/users/stanrc85/stanrc85.c @@ -0,0 +1,93 @@ +#include "stanrc85.h" + +static td_state_t td_state; + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +// determine the tapdance state to return +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) { return SINGLE_TAP; } + else { return SINGLE_HOLD; } + } + if (state->count == 2) { return DOUBLE_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 ctl_copy_finished (qk_tap_dance_state_t *state, void *user_data) { + td_state = cur_dance(state); + switch (td_state) { + case SINGLE_TAP: + SEND_STRING(SS_LCTRL("c")); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_RCTL)); + break; + case DOUBLE_TAP: + SEND_STRING(SS_LCTRL("v")); + } +} + +void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (td_state) { + case SINGLE_TAP: + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_RCTL)); + break; + case DOUBLE_TAP: + break; + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), + [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV), + [TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctl_copy_finished, ctl_copy_reset) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_MAKE: + if (!record->event.pressed) { + uint8_t mods = get_mods(); + clear_mods(); + send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), 10); + if (mods & MOD_MASK_SHIFT) { + //RESET board for flashing if SHIFT held or tapped with KC_MAKE + #if defined(__arm__) + send_string_with_delay_P(PSTR(":dfu-util"), 10); + #elif defined(BOOTLOADER_DFU) + send_string_with_delay_P(PSTR(":dfu"), 10); + #elif defined(BOOTLOADER_HALFKAY) + send_string_with_delay_P(PSTR(":teensy"), 10); + #elif defined(BOOTLOADER_CATERINA) + send_string_with_delay_P(PSTR(":avrdude"), 10); + #endif // bootloader options + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); + reset_keyboard(); + } + if (mods & MOD_MASK_CTRL) { + send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10); + } + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); + set_mods(mods); + } + break; + case KC_RDP: //Opens Windows RDP + if (!record->event.pressed) { + register_code(KC_LGUI); + tap_code(KC_R); + unregister_code(KC_LGUI); + wait_ms(200); + send_string_with_delay_P(PSTR("mstsc"), 10); + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); + } + break; + } + return process_record_keymap(keycode, record); +} diff --git a/users/stanrc85/stanrc85.h b/users/stanrc85/stanrc85.h new file mode 100644 index 000000000000..ceb7167e1030 --- /dev/null +++ b/users/stanrc85/stanrc85.h @@ -0,0 +1,54 @@ +#pragma once + +#include "quantum.h" +#include "version.h" + +enum my_layers { + _NUMPAD = 0, //Macropad numpad + _NAVKEY, //Macropad nav keys + _MEDIA, //Macropad media controls + _RGB, //Macropad RGB controls + _FN1PAD, //Macropad reset and make commands + _QWERTY = 0, //Qwerty with custom shortcuts and functions + _DEFAULT, //Default ANSI for gaming, enable with FN2+RCtl + _FN1_60, //Function keys, arrows, custom shortcuts, volume control + _FN2_60 //RGB Underglow controls and RESET +}; + +//Aliases for longer keycodes +#define KC_CAD LALT(LCTL(KC_DEL)) +#define KC_LOCK LGUI(KC_L) +#define CA_QUOT LCA(KC_QUOT) +#define CA_SCLN LCA(KC_SCLN) +#define KC_CTLE LCTL_T(KC_ESC) +#define LT_SPCF LT(_FN1_60, KC_SPC) +#define TD_TESC TD(TD_ESC) +#define TD_TWIN TD(TD_WIN) +#define TD_TCTL TD(TD_RCTL) +#define CA_COPY LCTL(KC_C) +#define CA_PSTE LCTL(KC_V) + +enum cust_keys { + KC_MAKE = SAFE_RANGE, + KC_RDP +}; + +enum tap_dance { + TD_WIN, + TD_ESC, + TD_RCTL +}; + +// define a type containing as many tapdance states as you need +typedef enum { + SINGLE_TAP, + SINGLE_HOLD, + DOUBLE_TAP +} td_state_t; + +// function to determine the current tapdance state +int cur_dance (qk_tap_dance_state_t *state); + +// `finished` and `reset` functions for each tapdance keycode +void ctl_copy_finished (qk_tap_dance_state_t *state, void *user_data); +void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data); diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h index 4436c0a0440d..496a6222a92f 100644 --- a/users/talljoe/talljoe.h +++ b/users/talljoe/talljoe.h @@ -35,9 +35,6 @@ enum tap_dancers { TD_QUOTE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define MO_NAV MO(_NAV) #define MO_ADJ MO(_ADJUST) #define MO_RST MO(_RESET) diff --git a/users/wanleg/config.h b/users/wanleg/config.h index 0c8b048af7b4..d29054694c85 100644 --- a/users/wanleg/config.h +++ b/users/wanleg/config.h @@ -6,9 +6,9 @@ //MIGHT HAVE TO SPLIT THIS INTO TWO CONDITIONS -#if defined(TAP_DANCE_ENABLE) && defined(KEYBOARD_lets_split_rev2) || defined(KEYBOARD_iris_rev2) +#if defined(TAP_DANCE_ENABLE) && defined(KEYBOARD_lets_split_rev2) || defined(KEYBOARD_keebio_iris_rev2) //Kailh Coppers activate quickly and don't need a long tapping term -#define TAPPING_TERM 100 +#define TAPPING_TERM 180 #elif defined(TAP_DANCE_ENABLE) && defined(KEYBOARD_bigswitch) #define TAPPING_TERM 700 @@ -38,7 +38,14 @@ #define NO_ACTION_FUNCTION #define NO_ACTION_ONESHOT -// Disable mod tap interrrupt -#ifndef IGNORE_MOD_TAP_INTERRUPT -#define IGNORE_MOD_TAP_INTERRUPT -#endif // !mod tap interrrupt \ No newline at end of file + +#define PERMISSIVE_HOLD +//// Disable mod tap interrrupt +//#ifndef IGNORE_MOD_TAP_INTERRUPT +//#define IGNORE_MOD_TAP_INTERRUPT +//#endif // !mod tap interrrupt + +//set max breathing brightness on kbd6x +#if defined(KEYBOARD_kbdfans_kbd6x) +#define RGBLIGHT_EFFECT_BREATHE_MAX 128 // 0-255 +#endif diff --git a/users/wanleg/readme.md b/users/wanleg/readme.md index f687b92f48f2..4276111280d2 100644 --- a/users/wanleg/readme.md +++ b/users/wanleg/readme.md @@ -1,14 +1,125 @@ -Copyright 2018 Brian Fong @wanleg +# Contents + * [Git Basics](#git-basics) + * [Update a Feature Branch](#update-a-development-branch) + * [Delete Branch Locally and Remotely](#delete-branch-locally-and-remotely) + * [Merge TEST branch into DEV branch](#merge-test-branch-into-dev-branch) + * [STM32F103C8T6 Setup](#STM32F103C8T6-setup) + * [Bootloader](#bootloader) + * [Flashing QMK](#flashing-qmk) -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. +--- +## Git Basics +### Update a Development Branch -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. +This is how to update a working branch with upstream changes. +First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch) +```bash +$ git checkout master +``` -You should have received a copy of the GNU General Public License -along with this program. If not, see . +Fetch the remote, bringing the branches and their commits from the remote repository. +You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master +```bash +$ git fetch -p origin +``` + +Merge the changes from origin/master into your local master branch. This brings your master branch in sync with the remote repository, without losing your local changes. If your local branch didn't have any unique commits, Git will instead perform a "fast-forward". +```bash +$ git merge origin/master +``` + +Checkout the branch you want to merge into +```bash +$ git checkout +``` + +Merge your (now updated) master branch into your feature branch to update it with the latest changes from your team. +```bash +$ git merge master +``` + +This will open your git-configured text editor. Edit the message as desired, save, and exit the editor. + +The above steps only update your local feature branch. To update it on GitHub, push your changes. +```bash +$ git push origin +``` + +### Delete Branch Locally and Remotely + +Executive Summary +```bash +$ git push --delete +$ git branch -d +``` +Note that in most cases the remote name is origin. + +Delete Local Branch +To delete the local branch use one of the following: +```bash +$ git branch -d branch_name +$ git branch -D branch_name +``` +Note: The -d option is an alias for --delete, which only deletes the branch if it has already been fully merged in its upstream branch. You could also use -D, which is an alias for --delete --force, which deletes the branch "irrespective of its merged status." [Source: man git-branch] + +Delete Remote Branch [Updated on 8-Sep-2017] +As of Git v1.7.0, you can delete a remote branch using +```bash +$ git push --delete +``` +which might be easier to remember than +```bash +$ git push : +``` +which was added in Git v1.5.0 "to delete a remote branch or a tag." + +Starting on Git v2.8.0 you can also use `git push` with the `-d` option as an alias for `--delete`. + +Therefore, the version of Git you have installed will dictate whether you need to use the easier or harder syntax. + +### Merge TEST branch into DEV branch + +Executive Summary +```bash +$ git checkout DEV +$ git merge TEST +$ git push DEV +$ git branch -d TEST +$ git push :TEST +``` +Note that in most cases the remote name is origin. +The above code will merge, push to remote, and delete both the local and remote TEST branches + +--- +## STM32F103C8T6 Setup +Cheap "Blue/Black Pills" typically do not come with a bootloader installed. The Black Pill uses [generic_boot20_pb12.bin](https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/binaries/generic_boot20_pb12.bin). The Blue Pill uses [generic_boot20_pc13.bin](https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/binaries/generic_boot20_pc13.bin). +The following instructions have been adapted from [here](http://wiki.stm32duino.com/index.php?title=Burning_the_bootloader). +### Bootloader +Flashing a bootloader on to a Black Pill can be done via a USB to Serial converter (e.g. CP2102). This process should be roughly the same for all F103 boards. + +1. Download the correct bootloader binary +2. Set the 'boot 0' pin/jumper high, and 'boot 1' low + B0+ to center pin + B1- to center pin +3. Connect the board to the PC using a USB to serial converter + RX to PA9 + TX to PA10 + GND to Ground + 3.3V to 3.3 Volts +4. Download and install __Flash Loader Demonstrator__ from [here](http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/flasher-stm32.html) +5. Use __Flash Loader Demonstrator__ to flash the bootloader + Ensure the correct COM port is selected. Leave other options with their default values/selections. + Use the "Download to Device" option, with "Erase necessary pages" selected +6. After a successful flash, set 'boot 0' pin/jumper low + B0- to center pin + B1- to center pin (no change) + +### Flashing QMK +As of April 2019, the `:dfu-util` target doesn't work on a \*Pill. You will need to use dfu-util directly. +1. Use QMK to build your `.bin` +2. Run `dfu-util.exe -d 1eaf:0003 -a 2 -D YOUR_FIRMWARE.bin"` + If this is the first QMK flash on the \*Pill, you will need to synchronize your Reset Button-push with starting the command. By default, the \*Pill only stays in bootloader mode for about 3 seconds before returning to normal operation. + +See [this page](https://docs.qmk.fm/#/faq_build?id=unknown-device-for-dfu-bootloader) if Windows can't see anything to upload to. + +--- diff --git a/users/wanleg/rules.mk b/users/wanleg/rules.mk index b069cd8d3874..eb66a49e6fa2 100644 --- a/users/wanleg/rules.mk +++ b/users/wanleg/rules.mk @@ -36,4 +36,10 @@ ifeq ($(strip $(padc)), yes) endif ifeq ($(strip $(padl)), yes) OPT_DEFS += -DPADL +endif + +#change gherkin orientation (i.e. move USB port from right side to left side) +#example usage: make gherkin:wanleg flip=yes +ifeq ($(strip $(flip)), yes) + OPT_DEFS += -DFLIP endif \ No newline at end of file diff --git a/users/wanleg/wanleg.c b/users/wanleg/wanleg.c index 274c74f728c8..aa7b1c9a4c42 100644 --- a/users/wanleg/wanleg.c +++ b/users/wanleg/wanleg.c @@ -6,20 +6,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - print("mode just switched to qwerty and this is a huge string\n"); set_single_persistent_default_layer(_QW); + #if defined(RGBLIGHT_ENABLE) + rgblight_sethsv_noeeprom(0,0,128); + rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING); + #endif } return false; break; case GHERKIN: if (record->event.pressed) { set_single_persistent_default_layer(_GK); + #if defined(RGBLIGHT_ENABLE) + rgblight_sethsv_noeeprom(128,255,64); + #endif } return false; break; case gGHERKIN: if (record->event.pressed) { set_single_persistent_default_layer(gGK); + #if defined(RGBLIGHT_ENABLE) + rgblight_sethsv_noeeprom(128,255,128); + rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT); + #endif } return false; break; @@ -113,6 +123,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + //on RESET, underglow red if present + case RESET: + if (record->event.pressed) { + #if defined(RGBLIGHT_ENABLE) + rgblight_enable_noeeprom(); // enables Rgb, without saving settings + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_sethsv_noeeprom_red(); + #endif + } + return true; // Let QMK send the press/release events as normal + break; } return true; } @@ -128,6 +149,7 @@ void matrix_init_keymap(void) {} // Call user matrix init, then call the keymap's init function void matrix_init_user(void) { +//turn off pro micro LEDs #if defined(KEYBOARD_lets_split_rev2) DDRD &= ~(1<<5); PORTD &= ~(1<<5); @@ -135,5 +157,20 @@ void matrix_init_user(void) { DDRB &= ~(1<<0); PORTB &= ~(1<<0); #endif + +//disable backlight breathing for keyboard using random flashing RGB LEDs for backlight +//(breathing provides insufficient power to integrated LED IC) +#if defined(KEYBOARD_kbdfans_kbd6x) && defined(BACKLIGHT_BREATHING) + breathing_disable(); +#endif matrix_init_keymap(); -} \ No newline at end of file +} + +//at end of firmware startup process, change powerup default layer and underglow colour for kbd6x +void keyboard_post_init_user(void) { + #if defined(KEYBOARD_kbdfans_kbd6x) + set_single_persistent_default_layer(_QW); + rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 5); + rgblight_sethsv_noeeprom(0,0,128); + #endif +} diff --git a/users/wanleg/wanleg.h b/users/wanleg/wanleg.h index 9d07760a7bd9..2aea1a31e7e7 100644 --- a/users/wanleg/wanleg.h +++ b/users/wanleg/wanleg.h @@ -3,7 +3,7 @@ #include "quantum.h" // Define layer names and order -#ifdef KEYBOARD_gherkin +#if defined(KEYBOARD_40percentclub_gherkin) || defined(KEYBOARD_kbdfans_kbd6x) enum userspace_layers { gGK = 0, gNUM, @@ -118,22 +118,22 @@ enum { // lengths consistent. -/* Pure Gherkin +/* Gherkin * .-----------------------------------------------------------------------------------------. * | Q//ESC | W | E | R | T | Y | U | I | O | P | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | A | S | D | F | G | H | J | K | L | SPACE | * | | | | | | | | | |SFThold | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | Z | X | C | V/gNUM | B/gETC | N | M/gDIR | ,/GUI | ./ALT | BSPC | + * | Z | X | C | V/gNUM | B/gETC | N/Fn | M/gDIR | ,/GUI | ./ALT | BSPC | * | SFThold| | | | | | | | |CTRLhold| * '-----------------------------------------------------------------------------------------' */ #define _______________Gherkin_Row_0_______________ TD(TD_Q_ESC), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P #define _______________Gherkin_Row_1_______________ KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SPC) -#define _______________Gherkin_Row_2_______________ SFT_T(KC_Z), KC_X, KC_C, LT(gNUM,KC_V), LT(gETC,KC_B), KC_N, LT(gDIR,KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC) +#define _______________Gherkin_Row_2_______________ SFT_T(KC_Z), KC_X, KC_C, LT(gNUM,KC_V), LT(gETC,KC_B), LT(_FN,KC_N), LT(gDIR,KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC) -/* Directional Keys +/* Gherkin Directional Keys * .-----------------------------------------------------------------------------------------. * | TAB | up | | INS | CTRL | SHIFT | PgUp | HOME | - | = | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| @@ -146,7 +146,7 @@ enum { #define _______________Gherkin_DIR_1_______________ KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR, KC_LSFT, KC_RCTL, KC_PGDN, KC_END, KC_LBRC, KC_RBRC #define _______________Gherkin_DIR_2_______________ KC_PAUS, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_LALT, KC_SLSH -/* Numbers +/* Gherkin Numbers * .-----------------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| @@ -160,16 +160,16 @@ enum { #define _______________Gherkin_NUM_1_______________ KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 #define _______________Gherkin_NUM_2_______________ KC_F11, KC_F12, _______,_______, _______, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC) -/* Et Cetera +/* Gherkin Et Cetera * .-----------------------------------------------------------------------------------------. - * | ` | mUP | | | RESET | SHIFT | mScrDn | mScrUp | | \ | + * | ` | mUP | | ESC | RESET | SHIFT | mScrDn | mScrUp | | \ | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | mLeft | mDown | mRight | | SHIFT | mBtn3 | mBtn1 | mBtn2 | ; | ' | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | Sft//Cp| CAPS | | | | C-A-D | mScrL | mScrR | ALT | DEL | * '-----------------------------------------------------------------------------------------' */ -#define _______________Gherkin_ETC_0_______________ KC_GRV, KC_MS_U, _______,_______, RESET, KC_RSFT, KC_WH_D, KC_WH_U, _______, KC_BSLS +#define _______________Gherkin_ETC_0_______________ KC_GRV, KC_MS_U, _______,KC_ESC, RESET, KC_RSFT, KC_WH_D, KC_WH_U, _______, KC_BSLS #define _______________Gherkin_ETC_1_______________ KC_MS_L, KC_MS_D, KC_MS_R,_______, KC_LSFT, KC_BTN3, KC_BTN1, KC_BTN2, KC_SCLN, KC_QUOT #define _______________Gherkin_ETC_2_______________ TD(TD_SFT_CAPS),KC_CAPS, _______,_______, _______, LALT(LCTL(KC_DEL)), KC_WH_L, KC_WH_R, KC_LALT, KC_DEL @@ -180,7 +180,7 @@ enum { * | TAB | A | S | D | F | G | H | J | K | L | SPACE | ' | * | | | | | | | | | | |SFThold | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * |SFT/CAPS| Z | X | C | V/NUM | B/ETC | N | M/DIR | ,/GUI | ./ALT | BSPC | ENT/SFT| + * |SFT/CAPS| Z | X | C | V/NUM | B/ETC | N/Fn | M/DIR | ,/GUI | ./ALT | BSPC | ENT/SFT| * | |SFThold | | | | | | | | |CTRLhold| | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | LCTRL | LGUI | ALT | ONEHAND| NUM | ETC | SPACE | DIR | RGUI | ALT | DEL | CTRL | @@ -188,7 +188,7 @@ enum { */ #define _______________GherkinLike_0_______________ KC_ESC, _______________Gherkin_Row_0_______________, KC_BSPC #define _______________GherkinLike_1_______________ KC_TAB, _______________Gherkin_Row_1_______________, KC_QUOT -#define _______________GherkinLike_2_______________ TD(TD_SFT_CAPS), SFT_T(KC_Z), KC_X, KC_C, LT(NUM, KC_V),LT(ETC, KC_B),KC_N, LT(DIR, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC), SFT_T(KC_ENT) +#define _______________GherkinLike_2_______________ TD(TD_SFT_CAPS), SFT_T(KC_Z), KC_X, KC_C, LT(NUM, KC_V),LT(ETC, KC_B),LT(_FN,KC_N), LT(DIR, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC), SFT_T(KC_ENT) #define _______________GherkinLike_3_______________ KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, NUMBER, ETCETERA, KC_SPC,DIRECTION, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL #define _______________GherkinLike_3_OneHand_______ KC_LCTL, KC_LGUI, KC_LALT, ONEHAND, NUMBER, ETCETERA, KC_SPC,DIRECTION, KC_RGUI, KC_RALT, ONEHAND, KC_RCTL @@ -241,7 +241,7 @@ enum { #define _______________SUBTER_Row__2_______________ _______, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_RGUI,ALT_T(KC_DOT), CTL_T(KC_BSPC), _______ #define _______________SUBTER_Row__3_______________ _______, _______, GHERKIN, _______, _______, _______, KC_ENT, KC_LSFT, _______,_______, _______, _______ -/* Gherkin Numbers +/* Gherkin-Like Numbers * .-----------------------------------------------------------------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | BSPC | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| @@ -259,7 +259,7 @@ enum { #define _______________NUMBERS_Row_3_______________ _______, _______, _______, _______, _______, _______, KC_ENT, KC_RSFT, KC_RGUI, _______, _______, _______ -/* Gherkin Directional Keys +/* Gherkin-Like Directional Keys * .-----------------------------------------------------------------------------------------------------------. * | | TAB | up | | INS | CTRL | SHIFT | PgUp | HOME | - | = | DEL | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| @@ -275,9 +275,9 @@ enum { #define _____________DIRECTIONS_Row__2_____________ _______, _______________Gherkin_DIR_2_______________, _______ #define _____________DIRECTIONS_Row__3_____________ _______, _______, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, _______ -/* Gherkin Et Cetera +/* Gherkin-Like Et Cetera * .-----------------------------------------------------------------------------------------------------------. - * | | ` | mUP | | | RESET | SHIFT | mScrUp |mScrDown| | \ | DEL | + * | | ` | mUP | | | RESET | SHIFT | mScrDn | mScrUp | | \ | DEL | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | | mLeft | mDown | mRight | | SHIFT | mBtn3 | mBtn1 | mBtn2 | ; | ' | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| @@ -290,7 +290,7 @@ enum { #define ______________ETCETERA_Row__1______________ _______, _______________Gherkin_ETC_1_______________, _______ #define ______________ETCETERA_Row__2______________ _______, _______________Gherkin_ETC_2_______________, _______ #define ______________ETCETERA_Row__3______________ _______, _______, _______, _______, _______, _______, LALT(LCTL(KC_DEL)), _______, _______, _______, _______, _______ - + /* Single 4x4 board only * .-----------------------------------. * | 7 | 8 | 9 | BSPC | @@ -307,3 +307,16 @@ enum { #define _______________NUMPAD_Row__1_______________ KC_KP_4, KC_KP_5, KC_KP_6, KC_SPC #define _______________NUMPAD_Row__2_______________ KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT #define _______________NUMPAD_Row__3_______________ KC_KP_0, TD(LYR_TAP_DANCE), KC_KP_DOT, KC_PMNS + +/* Gherkin FN/Lighting + * .-----------------------------------------------------------------------------------------------------. + * | BL_breathe | BL_brite- | BL_brite+ | BL_toggle | BL_briteCyc | BL_briteMax | | | | | + * |------------+-----------+-----------+-----------+-------------+-------------+-----+-----+-----+------| + * | UG_breathe | UG_brite- | UG_brite+ | UG_toggle | UG_modeCycle| | | | | | + * |------------+-----------+-----------+-----------+-------------+-------------+-----+-----+-----+------| + * | UG_hue- | UG_hue+ | UG_sat- | UG_sat+ | | | | | |QWERTY| + * '-----------------------------------------------------------------------------------------------------' + */ +#define _______________Gherkin_FN_0________________ BL_BRTG, BL_DEC, BL_INC, BL_TOGG, BL_STEP, BL_ON, _______, _______, _______, _______ +#define _______________Gherkin_FN_1________________ RGB_M_B, RGB_VAD, RGB_VAI, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______ +#define _______________Gherkin_FN_2________________ RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, QWERTY diff --git a/users/xulkal/config.h b/users/xulkal/config.h new file mode 100644 index 000000000000..c794530d4567 --- /dev/null +++ b/users/xulkal/config.h @@ -0,0 +1,30 @@ +#pragma once + +#undef TAPPING_FORCE_HOLD + +#undef TAPPING_TERM +#define TAPPING_TERM 175 + +#define SPACE_CADET_MODIFIER_CARRYOVER +#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_LBRC +#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC +#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS +#define RCPC_KEYS KC_RCTL, KC_TRNS, KC_EQL + +// Running out of firmware space +#if defined(__AVR__) +#undef RGB_MATRIX_KEYPRESSES +#undef RGB_MATRIX_KEYRELEASES +#undef RGB_MATRIX_FRAMEBUFFER_EFFECTS +#else +#define RGB_MATRIX_KEYPRESSES +#undef RGB_MATRIX_KEYRELEASES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#endif + +// No need for the single versions when multi performance isn't a problem =D +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH diff --git a/users/xulkal/layouts.h b/users/xulkal/layouts.h new file mode 100644 index 000000000000..5180992a8842 --- /dev/null +++ b/users/xulkal/layouts.h @@ -0,0 +1,119 @@ +#pragma once + + /* Qwerty Layout + * ,-----------------------------------------. ,-----------------------------------------. + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BkSp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |FN(CAPS)| A | S | D | F | G | | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Sft[ | Z | X | C | V | B | | N | M | , | . | / | Sft] | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | Win | ADJ | FN | Alt | Space| | Space| Left | Up | Down | Right| Ctrl | + * `-----------------------------------------' `-----------------------------------------' + */ + +#define _________________QWERTY_L1_________________ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5 +#define _________________QWERTY_L2_________________ TD_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T +#define _________________QWERTY_L3_________________ RIS_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G +#define _________________QWERTY_L4_________________ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B +#define _________________QWERTY_L5_________________ KC_LCPO, KC_LGUI, LOWER, RAISE, KC_LALT, KC_SPC + +#define _________________QWERTY_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0, TD_BSPC +#define _________________QWERTY_R2_________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS +#define _________________QWERTY_R3_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT +#define _________________QWERTY_R4_________________ KC_N, KC_M, TD_COMM, KC_DOT, KC_SLASH, KC_RSPC +#define _________________QWERTY_R5_________________ KC_SPC, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_RCPC + + +#define ___________________GAME_L1_________________ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5 +#define ___________________GAME_L2_________________ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T +#define ___________________GAME_L3_________________ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G +#define ___________________GAME_L4_________________ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B +#define ___________________GAME_L5_________________ KC_LCTL, KC_LGUI, LOWER, RAISE, KC_LALT, KC_SPC + +#define ___________________GAME_R1_________________ KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC +#define ___________________GAME_R2_________________ KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS +#define ___________________GAME_R3_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT +#define ___________________GAME_R4_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH, KC_RSFT +#define ___________________GAME_R5_________________ KC_SPC, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_RCTL + + + /* RAISE Layout + * ,-----------------------------------------. ,-----------------------------------------. + * | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | PGDN | UP | PGUP | |QWERTY| | | INS | HOME | PGUP | PRINT| | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | LEFT | DOWN | RIGHT| | GAME | | | DEL | END | PGDN |SCRLCK| | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | PREV | VOL+ | VOL- | NEXT | PLAY | + * `-----------------------------------------' `-----------------------------------------' + */ + +#define __________________RAISE_L1_________________ KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define __________________RAISE_L2_________________ _______, KC_PGDN, KC_UP, KC_PGUP, _______, QWERTY +#define __________________RAISE_L3_________________ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, GAME +#define __________________RAISE_L4_________________ _______, _______, _______, _______, _______, _______ +#define __________________RAISE_L5_________________ _______, _______, _______, _______, _______, _______ + +#define __________________RAISE_R1_________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 +#define __________________RAISE_R2_________________ _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, _______ +#define __________________RAISE_R3_________________ _______, KC_DEL, KC_END, KC_PGDN, KC_SLCK, _______ +#define __________________RAISE_R4_________________ _______, _______, _______, _______, _______, _______ +#define __________________RAISE_R5_________________ _______, KC_MPRV, KC_VOLU, KC_VOLD, KC_MNXT, KC_MPLY + + /* LOWER Layout + * ,-----------------------------------------. ,-----------------------------------------. + * | |RGBMD |RGBRMD|RGBTOG| | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | SPDI | SAI | VAI | HUI | RESET| | | | | 7 | 8 | 9 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | SPDD | SAD | VAD | HUD |RGBRST| | | | | 4 | 5 | 6 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | 1 | 2 | 3 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | 0 | . | | + * `-----------------------------------------' `-----------------------------------------' + */ + +#define __________________LOWER_L1_________________ _______, RGB_RMOD, RGB_MOD, RGB_TOG, _______, _______ +#define __________________LOWER_L2_________________ RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, RESET, _______ +#define __________________LOWER_L3_________________ RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, RGBRST, _______ +#define __________________LOWER_L4_________________ _______, _______, _______, _______, _______, _______ +#define __________________LOWER_L5_________________ _______, _______, _______, _______, _______, _______ + +#define __________________LOWER_R1_________________ _______, _______, _______, _______, _______, KC_DEL +#define __________________LOWER_R2_________________ _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, _______ +#define __________________LOWER_R3_________________ _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, _______ +#define __________________LOWER_R4_________________ _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, _______ +#define __________________LOWER_R5_________________ _______, _______, _______, KC_KP_0, KC_PDOT, _______ + + /* ADJUST Layout + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | RESET| DEBUG| | | | | |TERM_ON|TERM_OFF| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |MusMod|Aud on|AudOff|AGnorm| |AGswap|ClkUp |ClkDwn| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn| |MidOff|ClkOn |ClkOff| | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + */ + +#define _________________ADJUST_L1_________________ _______, _______, _______, _______, _______, _______ +#define _________________ADJUST_L2_________________ _______, RESET, DEBUG, _______, _______, _______ +#define _________________ADJUST_L3_________________ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM +#define _________________ADJUST_L4_________________ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON +#define _________________ADJUST_L5_________________ _______, _______, _______, _______, _______, _______ + +#define _________________ADJUST_R1_________________ _______, _______, _______, _______, _______, _______ +#define _________________ADJUST_R2_________________ _______, TERM_ON, TERM_OFF, _______, _______, _______ +#define _________________ADJUST_R3_________________ AG_SWAP, CK_UP, CK_DOWN, _______, _______, _______ +#define _________________ADJUST_R4_________________ MI_OFF, CK_ON, CK_OFF, _______, _______, _______ +#define _________________ADJUST_R5_________________ _______, _______, _______, _______, _______, _______ diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c new file mode 100644 index 000000000000..5ba59965fb88 --- /dev/null +++ b/users/xulkal/process_records.c @@ -0,0 +1,56 @@ +#include "process_records.h" + +#ifdef TAP_DANCE_ENABLE +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [COMM_QUOT] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_QUOT), + [BACKSPACE] = ACTION_TAP_DANCE_DOUBLE (KC_BSPACE, LCTL(KC_BSPACE)), + [TAP_TAB] = ACTION_TAP_DANCE_DOUBLE (KC_TAB, LSFT(KC_TAB)), + [CTRL_MINUS] = ACTION_TAP_DANCE_DOUBLE (KC_LCTL, KC_MINS), + [CTRL_PLUS] = ACTION_TAP_DANCE_DOUBLE (KC_RCTL, KC_EQL) +}; +#endif + +#if defined(RGB_MATRIX_ENABLE) +extern void eeconfig_update_rgb_matrix_default(void); +#endif + +#ifdef TRILAYER_ENABLED +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint16_t reset_timer; + switch (keycode) { + case RGBRST: +#if defined(RGBLIGHT_ENABLE) + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } +#elif defined(RGB_MATRIX_ENABLE) + if (record->event.pressed) { + eeconfig_update_rgb_matrix_default(); + } +#endif + return false; + case RESET: + if (record->event.pressed) { + reset_timer = timer_read(); + } else { + if (timer_elapsed(reset_timer) >= 500) { + reset_keyboard(); + } + } + return false; + } + + return process_record_keymap(keycode, record); +} + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/users/xulkal/process_records.h b/users/xulkal/process_records.h new file mode 100644 index 000000000000..8a195df5cd3b --- /dev/null +++ b/users/xulkal/process_records.h @@ -0,0 +1,59 @@ +#pragma once +#include "quantum.h" + +#define RIS_ESC LT(_RAISE, KC_ESC) +#define RIS_CAPS LT(_RAISE, KC_CAPS) + +#define QWERTY DF(_QWERTY) + +#ifndef GAMELAYER_DISABLE +#define GAME DF(_GAME) +#else +#define GAME KC_TRANSPARENT +#endif + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +#ifdef TAP_DANCE_ENABLE +#include "process_tap_dance.h" + +//Tap Dance Declarations +enum { + COMM_QUOT = 0, + BACKSPACE, + TAP_TAB, + CTRL_MINUS, + CTRL_PLUS +}; + +#define TD_COMM TD(COMM_QUOT) +#define TD_BSPC TD(BACKSPACE) +#define TD_TAB TD(TAP_TAB) +#define TD_LCTL TD(CTRL_MINUS) +#define TD_RCTL TD(CTRL_PLUS) +#else +#define TD_COMM KC_COMM +#define TD_BSPC KC_BSPACE +#define TD_TAB KC_TAB +#define TD_LCTL KC_LCTL +#define TD_RCTL KC_RCTL +#endif + +enum layer_number { + _QWERTY = 0, +#ifndef GAMELAYER_DISABLE + _GAME, +#endif + _LOWER, + _RAISE, +#ifdef TRILAYER_ENABLED + _ADJUST +#endif +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record); diff --git a/users/xulkal/rules.mk b/users/xulkal/rules.mk new file mode 100644 index 000000000000..6758f52f5ff7 --- /dev/null +++ b/users/xulkal/rules.mk @@ -0,0 +1,13 @@ +SRC += xulkal.c \ + process_records.c + +# Some usual defaults +MOUSEKEY_ENABLE = no # Mouse keys (+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control (+450) +TAP_DANCE_ENABLE = yes # Enable the tap dance feature. (+1100) + +ifneq ($(strip $(DISABLE_LTO)), yes) + EXTRAFLAGS += -flto + OPT_DEFS += -DNO_ACTION_MACRO + OPT_DEFS += -DNO_ACTION_FUNCTION +endif diff --git a/users/xulkal/xulkal.c b/users/xulkal/xulkal.c new file mode 100644 index 000000000000..ea9b6bdbbe2a --- /dev/null +++ b/users/xulkal/xulkal.c @@ -0,0 +1 @@ +#include "xulkal.h" diff --git a/users/xulkal/xulkal.h b/users/xulkal/xulkal.h new file mode 100644 index 000000000000..ae73599239b1 --- /dev/null +++ b/users/xulkal/xulkal.h @@ -0,0 +1,4 @@ +#pragma once + +#include "process_records.h" +#include "layouts.h" diff --git a/users/zer09/zer09.h b/users/zer09/zer09.h index acac8ab09fcc..cc91cd6f287b 100644 --- a/users/zer09/zer09.h +++ b/users/zer09/zer09.h @@ -11,7 +11,6 @@ enum custom_keycodes { NEW_SAFE_RANGE }; -#define _______ KC_TRNS #define KC_RGUP RGUP #define KC_RGDWN RGDWN #define KC_YREG YREG diff --git a/util/atmega32a_program.py b/util/atmega32a_program.py index b777b911066b..9438c7e779b1 100755 --- a/util/atmega32a_program.py +++ b/util/atmega32a_program.py @@ -19,18 +19,19 @@ import os import sys import time +import argparse import usb -def checkForKeyboardInNormalMode(): +def check_keyboard_normal_mode(vendor, product): """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found.""" - return usb.core.find(idVendor=0x20A0, idProduct=0x422D) + return usb.core.find(idVendor=vendor, idProduct=product) -def checkForKeyboardInBootloaderMode(): +def check_keyboard_bootloader_mode(): """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise.""" return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None) -def flashKeyboard(firmware_file): +def flash_keyboard(firmware_file): """Calls bootloadHID to flash the given file to the device.""" print('Flashing firmware to device ...') if os.system('bootloadHID -r "%s"' % firmware_file) == 0: @@ -38,7 +39,7 @@ def flashKeyboard(firmware_file): else: print('\nbootloadHID returned an error.') -def printDeviceInfo(dev): +def print_device_info(dev): """Prints all infos for a given USB device""" print('Device Information:') print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) @@ -47,15 +48,15 @@ def printDeviceInfo(dev): print('Serial: %s' % (dev.iSerialNumber)) print('Product: %s' % (dev.iProduct), end='\n\n') -def sendDeviceToBootloaderMode(dev): +def send_device_to_bootloader_mode(dev): """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing.""" try: dev.set_configuration() request_type = usb.util.build_request_type( - usb.util.CTRL_OUT, - usb.util.CTRL_TYPE_CLASS, - usb.util.CTRL_RECIPIENT_DEVICE) + usb.util.CTRL_OUT, + usb.util.CTRL_TYPE_CLASS, + usb.util.CTRL_RECIPIENT_DEVICE) USBRQ_HID_SET_REPORT = 0x09 HID_REPORT_OPTION = 0x0301 @@ -65,16 +66,21 @@ def sendDeviceToBootloaderMode(dev): # for some reason I keep getting USBError, but it works! pass +def auto_int(value): + """Helper for argparse to enable auto base detection""" + return int(value, 0) -if len(sys.argv) < 2: - print('Usage: %s ' % sys.argv[0]) - sys.exit(1) +parser = argparse.ArgumentParser(description='Flash bootloadHID device') +parser.add_argument('--vendor', type=auto_int, default=0x20A0, help='Non bootloader idVendor to search for (default: 0x%(default)04x)') +parser.add_argument('--product', type=auto_int, default=0x422D, help='Non bootloader idProduct to search for (default: 0x%(default)04x)') +parser.add_argument('firmware_hex', type=argparse.FileType('r'), help='Firmware hex file to flash') +args = parser.parse_args() -kb = checkForKeyboardInNormalMode() +kb = check_keyboard_normal_mode(args.vendor, args.product) if kb is not None: print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='') - sendDeviceToBootloaderMode(kb) + send_device_to_bootloader_mode(kb) print(' done.') print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.") print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode") @@ -84,9 +90,9 @@ def sendDeviceToBootloaderMode(dev): for attempt in range(1, attempts + 1): print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='') - if checkForKeyboardInBootloaderMode(): + if check_keyboard_bootloader_mode(): print('Found', end='\n\n') - flashKeyboard(sys.argv[1]) + flash_keyboard(args.firmware_hex.name) found = True break else: @@ -102,4 +108,3 @@ def sendDeviceToBootloaderMode(dev): if not found: print("Couldn't find a flashable keyboard. Aborting.") sys.exit(2) - diff --git a/util/bootloader_atmega32a_1_0_0.hex b/util/bootloader_atmega32a_1_0_0.hex new file mode 100644 index 000000000000..b35a310d55ad --- /dev/null +++ b/util/bootloader_atmega32a_1_0_0.hex @@ -0,0 +1,154 @@ +:107000000C9468380C94A0380C9485380C9485380E +:107010000C9485380C9485380C9485380C948538FC +:107020000C9485380C9485380C9485380C948538EC +:107030000C9485380C9485380C9485380C948538DC +:107040000C9485380C9485380C9485380C948538CC +:107050000C9485380403090412036F006200640075 +:10706000650076002E00610074001003480049009E +:10707000440042006F006F00740012011001000014 +:107080000008C016DF05000101020001090222000C +:107090000101008032090400000103000000092101 +:1070A00001010001222100070581030800C8060034 +:1070B000FF0901A101150026FF007508850195064D +:1070C0000900B20201850295830900B20201C000E5 +:1070D00011241FBECFE5D8E0DEBFCDBF10E0A0E693 +:1070E000B0E0ECE6F9E702C005900D92AA36B107D0 +:1070F000D9F710E0AAE6B0E001C01D92A43AB107AA +:10710000E1F70E94173C0C94B43C0C940038A82F73 +:10711000B92F80E090E041E050EA609530E009C08E +:107120002D9182279795879510F084279527305EBB +:10713000C8F36F5FA8F30895EADF8D939D930895D8 +:10714000CF93CFB7CF93C395839BE9F7839B09C0B8 +:10715000839B07C0839B05C0839B03C0839B01C0A7 +:10716000A3C0DF93C0918700DD27C257DF4F839B09 +:1071700002C0DF91EBCF2F930F931F9300B32FEF3C +:1071800003FB20F94F933F9310B34FEF012703FB0D +:1071900021F93BE031C04E7F012F10B3216028C0A0 +:1071A000102F4D7F2260000000B329C04B7F246068 +:1071B000012F000010B32BC010B3477F28602AC0F6 +:1071C0004F7E00B320612CC04F7D10B320622FC0D2 +:1071D0004F7B00B3206432C0422700B349934FEF86 +:1071E0000000102713FB20F910B31C70C9F1297F90 +:1071F00091F2012703FB21F900B3237F89F231507B +:1072000058F1102713FB22F910B3277E79F20127DA +:1072100003FB23F92F7C81F200B3102713FB24F921 +:107220002F7971F200C010B3012703FB25F92F73EA +:1072300059F200C000B3102713FB26F9223040F2A8 +:1072400000C010B3012703FB27F9243028F64F773D +:10725000206810B30000F9CF10E41ABF002719C04E +:107260003B503195C31BD04010E41ABF0881033C4A +:10727000F9F00B34E9F0209185001981110F1213F8 +:10728000EDCF4A81441F093641F10D3211F0013E24 +:1072900029F700938C003F914F911F910F912F91EF +:1072A000DF91CAB7C6FD4FCFCF91CFBFCF91189511 +:1072B00020918C00222379F310918A00112321F56B +:1072C000343022F130938A00209386001091870099 +:1072D0003BE0311B3093870019C000918A000130D8 +:1072E0009CF40AE54F7081F43091600034FD10C0C9 +:1072F00000936000C9E7D0E00FC02795A8F4515073 +:10730000A9F4220F0000F9CF4AE503C042ED01C005 +:10731000432FC4E1D0E032E011B31C60939A11BB5B +:1073200002B320E41CE05F93012756E002BB2795DF +:1073300020F4515021F4220FF9CF012756E000002C +:107340003B5A02BBD0F2279528F4515029F4220F62 +:107350000000F9CF012756E0279502BB20F45150D9 +:1073600021F4220FF9CF012756E02991332302BBE4 +:1073700021F6037F10918B00110FC651D04002BB44 +:1073800011F01093850010E41ABF086011B3137F49 +:10739000402F437F5F9100C000C002BB11BB42BBC6 +:1073A0007ACF80916D00882309F445C088EB9BE07B +:1073B0000197F1F780916A008F5F80936A00909146 +:1073C00061008917B1F510926A0080916B008230DC +:1073D000C1F0833028F4882341F0813041F50CC09E +:1073E0008330B9F0843019F519C082B38C7A82BB2E +:1073F00081E080936B0017C082B3836582BB82E01B +:1074000004C082B38C7A82BB83E080936B008FE7E9 +:107410000BC082B3836582BB84E0F7CF82B38C7AE2 +:1074200082BB10926B008FEF8093610002C01092BC +:107430006B0081E0089529B3237040916E000DC068 +:1074400089B330E090E0837090702817390711F00D +:1074500040E001C04F5F29B32370463088F320938A +:10746000720040936E00233018F481E080936D0029 +:1074700080916D00089585B7826085BF8BB7806469 +:107480008BBF0895F89481E180935700E8951BBE67 +:1074900015BE81E08BBF1BBE8B9AE0917700F09107 +:1074A0007800099521E020936C00FC0181818930EE +:1074B00069F48281823029F420937500209384003E +:1074C00003C082E0809384008FEF0895813011F033 +:1074D00080E0089582E690E0909389008093880090 +:1074E00087E00895CF93DF93DC01C0917000D091C5 +:1074F0007100413051F410926F001196CC911197A8 +:107500001296DC9112971496645030916F00360FEA +:1075100030936F00AE014F7751F4F89483E0FE0191 +:1075200080935700E895789407B600FCFDCFF89457 +:10753000AE018D919C91119721E0FE010C012093E9 +:107540005700E895112478942296FE01EF7751F4C4 +:10755000F89485E0FA0180935700E895789407B68F +:1075600000FCFDCF625011F01296D4CFD093710081 +:10757000C0937000832F8078DF91CF910895CF93CF +:10758000DF93FC0180918400813071F4809175005B +:10759000813029F410927500CF0141E002C0CF0183 +:1075A00040E00E94723A2FC0823061F581818130C3 +:1075B00011F40E94423A8F3F21F484E090E06FEF93 +:1075C00019C08E3F91F482B3836582BBC0E0D0E0E6 +:1075D000CE016FEF0E94A73C219684E0C030D8070F +:1075E000B9F782B38C7A82BB0BC08D3F31F48281B4 +:1075F000938164810E94A73C03C081E08093760060 +:107600001092840081E0DF91CF9108951F93CF9372 +:10761000DF9360918A00635067FDBAC08091870054 +:10762000CCE0D0E0C81BD109C257DF4F8091860063 +:107630008D3209F09AC0683009F0A8C083EC8093BD +:1076400079008AE5809360001092740088818076CA +:1076500041F0CE010E94523A282F8F3F09F474C0A6 +:107660007AC09A81109282008981882321F4109235 +:10767000830022E062C0853019F490938B005CC0D7 +:10768000863009F04AC08B81813019F48AE790E78F +:107690001BC0823041F48CE890E79093890080937E +:1076A000880022E236C08330F9F48A81882341F4CD +:1076B00084E590E7909389008093880024E029C0B6 +:1076C000813041F488E590E79093890080938800A9 +:1076D00022E11FC08230E1F48AE690E790938900AE +:1076E0008093880020E115C0813241F48EE990E753 +:1076F000909389008093880029E00BC0823241F486 +:107700008EEA90E7909389008093880021E201C07F +:1077100020E080E4809374001EC0883021F421E0D2 +:107720008DE890E00CC0893019F490938D0004C06E +:107730008A3011F421E001C020E082E890E09093CB +:1077400089008093880007C0888187FD2E8180E8AA +:107750008093740006C08F81882319F48E8182176C +:1077600008F0822F8093690011C08091740087FF18 +:107770000DC0CE010E94BF3A8F3F21F48EE180936D +:10778000600004C0882311F01092690010928A00F2 +:107790008091600084FF3DC0809169008F3FC9F1F6 +:1077A000182F893008F018E0811B809369008091C0 +:1077B000790098E88927809379001123E1F0E0911E +:1077C0008800F09189008091740086FF09C0912F94 +:1077D000AAE7B0E084918D9331969150D9F707C014 +:1077E000912FAAE7B0E081918D939150E1F7F0934A +:1077F0008900E09388008AE790E0612F0E949C381E +:10780000612F6C5F6C3019F08FEF8093690060938B +:10781000600094E180B38C7031F49150D9F71092EC +:107820008B0010928500DF91CF911F91089581B355 +:10783000836581BB82B38C7A82BB8D98959A8AB31B +:107840008C7F8ABB8BB383608BBBB89AC09881E076 +:1078500090E00E948E3C80937300882349F481E07D +:1078600080936D0081E090E06FEF0E94A73C08C01C +:10787000E0E0F0E0E491EF3F19F481E080936D00E7 +:107880000E94D139882309F447C081E08BBF82E090 +:107890008BBF0E943B3A88E991E00E948E3C88238E +:1078A00049F48B9A20E0A89588EB9BE00197F1F7CB +:1078B0002150C9F78B9878940FEF10E0C0E0D0E02A +:1078C00080916C008823B9F483E0C93ED80714F492 +:1078D000219611C0F89481E090E060E00E94963C0F +:1078E0008B9A28E088E190E00FB6F894A89581BDC6 +:1078F0000FBE21BDFFCFA8950E94063B8091760068 +:10790000882331F0002319F4115011F405C00150FF +:107910000E94D1398823A1F60E94423AE199FECF14 +:107920009FBB8EBBE09A99278DB30895262FE199CE +:10793000FECF9FBB8EBBE09A01970DB2021631F0CD +:107940002DBB0FB6F894E29AE19A0FBE0895262F48 +:10795000E199FECF9FBB8EBB2DBB0FB6F894E29A88 +:0C796000E19A0FBE01960895F894FFCF45 +:0A796C005A7F01800000800000FF38 +:040000030000700089 +:00000001FF diff --git a/util/docker_build.sh b/util/docker_build.sh index 26075cc90834..c573ebcae2dc 100755 --- a/util/docker_build.sh +++ b/util/docker_build.sh @@ -35,15 +35,16 @@ else fi if [ -n "$target" ]; then if [ "$(uname)" = "Linux" ] || docker-machine active >/dev/null 2>&1; then - usb_args="--privileged -v /dev/bus/usb:/dev/bus/usb" + usb_args="--privileged -v /dev:/dev" else echo "Error: target requires docker-machine to work on your platform" >&2 echo "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos" >&2 + echo "Consider flashing with QMK Toolbox (https://github.com/qmk/qmk_toolbox) instead" >&2 exit 3 fi fi dir=$(pwd -W 2>/dev/null) || dir=$PWD # Use Windows path if on Windows # Run container and build firmware -docker run --rm $usb_args -v "$dir":/qmk_firmware qmkfm/qmk_firmware \ +docker run --rm -it $usb_args -v "$dir":/qmk_firmware qmkfm/qmk_firmware \ make "$keyboard${keymap:+:$keymap}${target:+:$target}" diff --git a/util/freebsd_install.sh b/util/freebsd_install.sh index 25ea80a7fcb5..c8696e8cc751 100755 --- a/util/freebsd_install.sh +++ b/util/freebsd_install.sh @@ -15,4 +15,5 @@ pkg install -y \ arm-none-eabi-gcc \ arm-none-eabi-binutils \ arm-none-eabi-newlib \ - diffutils + diffutils \ + python3 diff --git a/util/linux_install.sh b/util/linux_install.sh index d6e6b86cdc4f..df7039e09a05 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -25,6 +25,7 @@ if grep ID /etc/os-release | grep -qE "fedora"; then kernel-headers \ make \ perl \ + python3 \ unzip \ wget \ zip @@ -34,7 +35,7 @@ elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then DEBCONF_NONINTERACTIVE_SEEN=true export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN sudo apt-get update - sudo apt-get install \ + sudo apt-get -yq install \ build-essential \ avr-libc \ binutils-arm-none-eabi \ @@ -47,13 +48,13 @@ elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then gcc-avr \ git \ libnewlib-arm-none-eabi \ + python3 \ unzip \ wget \ zip elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then - # install avr-gcc 8.1 until 8.3 is available. See #3657 for details of the bug. - sudo pacman -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.1.0-1-x86_64.pkg.tar.xz + sudo pacman -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz sudo pacman -S \ arm-none-eabi-binutils \ arm-none-eabi-gcc \ @@ -66,6 +67,7 @@ elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then diffutils \ gcc \ git \ + python \ unzip \ wget \ zip @@ -87,6 +89,7 @@ elif grep ID /etc/os-release | grep -q gentoo; then app-arch/zip \ app-mobilephone/dfu-util \ dev-embedded/avrdude \ + dev-lang/python:3.5 \ net-misc/wget \ sys-devel/gcc \ sys-devel/crossdev @@ -102,6 +105,7 @@ elif grep ID /etc/os-release | grep -q sabayon; then app-arch/zip \ app-mobilephone/dfu-util \ dev-embedded/avrdude \ + dev-lang/python \ net-misc/wget \ sys-devel/gcc \ sys-devel/crossdev @@ -125,6 +129,7 @@ elif grep ID /etc/os-release | grep -qE "opensuse|tumbleweed"; then dfu-tool \ dfu-programmer \ gcc \ + python3 \ unzip \ wget \ zip @@ -143,7 +148,8 @@ elif grep ID /etc/os-release | grep -q slackware; then dfu-util \ arm-binutils \ arm-gcc \ - newlib + newlib \ + python3 echo "Done!" else echo "Quitting..." diff --git a/util/macos_install.sh b/util/macos_install.sh index d2629a8cb4ae..93f3ed0b96f0 100755 --- a/util/macos_install.sh +++ b/util/macos_install.sh @@ -22,5 +22,5 @@ fi brew tap osx-cross/avr brew tap PX4/homebrew-px4 brew update -brew install avr-gcc@7 gcc-arm-none-eabi dfu-programmer avrdude dfu-util +brew install avr-gcc@7 gcc-arm-none-eabi dfu-programmer avrdude dfu-util python3 brew link --force avr-gcc@7 diff --git a/util/msys2_install.sh b/util/msys2_install.sh index fcb4882494f8..bcb628ab21f2 100755 --- a/util/msys2_install.sh +++ b/util/msys2_install.sh @@ -7,7 +7,7 @@ armtools=gcc-arm-none-eabi installflip=false echo "Installing dependencies needed for the installation (quazip)" -pacman --needed -S msys/unzip msys/p7zip base-devel msys/git mingw-w64-x86_64-toolchain +pacman --needed -S base-devel mingw-w64-x86_64-toolchain msys/git msys/p7zip msys/python3 msys/unzip source "$dir/win_shared_install.sh" diff --git a/util/new_keyboard.sh b/util/new_keyboard.sh new file mode 100755 index 000000000000..e9ce3097845a --- /dev/null +++ b/util/new_keyboard.sh @@ -0,0 +1,159 @@ +#!/bin/bash + +# This script generates a new keyboard directory under keyboards/, +# and copies the template files from quantum/template/ into it. + +# Print an error message with the word "ERROR" in red. +echo_error() { + echo -e "[\033[0;91mERROR\033[m]: $1" +} + +# Print a message in bold. +echo_bold() { + echo -e "\033[1m$1\033[m" +} + +# Prompt the user for information, showing the default value in brackets. +prompt() { + local message="$1" + local default="$2" + + [ -n "$default" ] && message+=" [$default]" + message+=": " + + read -rp "$message" prompt_return + [ -z "$prompt_return" ] && prompt_return="$default" +} + +# Grab a username from Git config. +set_git_username() { + git_username="$(git config --get user.name)" +} + +# Copy the template files to the new keyboard directory. +copy_templates() { + echo -n "Copying base template files..." + cp -r "quantum/template/base" "${keyboard_dir}" + echo " done" + + echo -n "Copying $keyboard_type template files..." + cp -r "quantum/template/${keyboard_type}/." "${keyboard_dir}" + echo " done" + + echo -n "Renaming keyboard files..." + mv "${keyboard_dir}/template.c" "${keyboard_dir}/${keyboard_name}.c" + mv "${keyboard_dir}/template.h" "${keyboard_dir}/${keyboard_name}.h" + echo " done" +} + +# Set the inplace editing parameter for sed. +# macOS/BSD sed expects a file extension immediately following -i. +set_sed_i() { + sed_i=(-i) + + case $(uname -a) in + *Darwin*) sed_i=(-i "") + esac +} + +# Replace a token with a value in the given list of files. +replace_placeholders() { + local replace_token="$1" + local replace_value="$2" + shift 2 + local replace_filenames=("$@") + + echo -n "Replacing $replace_token with $replace_value..." + for replace_filename in "${replace_filenames[@]}"; do + sed "${sed_i[@]}" -e "s/${replace_token}/${replace_value}/g" "$replace_filename" + done + echo " done" +} + +# Replace %KEYBOARD% with the keyboard name. +replace_keyboard_placeholders() { + local replace_keyboard_filenames=( + "${keyboard_dir}/config.h" + "${keyboard_dir}/readme.md" + "${keyboard_dir}/${keyboard_name}.c" + "${keyboard_dir}/keymaps/default/readme.md" + ) + replace_placeholders "%KEYBOARD%" "$keyboard_name" "${replace_keyboard_filenames[@]}" +} + +# Replace %YOUR_NAME% with the username. +replace_name_placeholders() { + local replace_name_filenames=( + "${keyboard_dir}/config.h" + "${keyboard_dir}/readme.md" + "${keyboard_dir}/${keyboard_name}.c" + "${keyboard_dir}/${keyboard_name}.h" + "${keyboard_dir}/keymaps/default/config.h" + "${keyboard_dir}/keymaps/default/keymap.c" + ) + replace_placeholders "%YOUR_NAME%" "$username" "${replace_name_filenames[@]}" +} + +# Check if an array contains an element. +array_contains() { + local e match="$1" + shift + for e; do + [[ "$e" == "$match" ]] && return 0; + done + + return 1 +} + +# If we've been started from util/, we want to be in qmk_firmware/ +[[ "$PWD" == *util ]] && cd .. + +# The root qmk_firmware/ directory should have a subdirectory called quantum/ +if [ ! -d "quantum" ]; then + echo_error "Could not detect the QMK firmware directory!" + echo_error "Are you sure you're in the right place?" + exit 1 +fi + +echo_bold "Generating a new QMK keyboard directory" +echo + +# Keyboard name is required, so keep prompting until we get one +while [ -z "$keyboard_name" ]; do + prompt "Keyboard Name" "" + keyboard_name=$prompt_return +done + +keyboard_dir="keyboards/$keyboard_name" + +if [ -d "$keyboard_dir" ]; then + echo_error "Keyboard $keyboard_name already exists!" + exit 1 +fi + +KEYBOARD_TYPES=("avr" "ps2avrgb") + +prompt "Keyboard Type" "avr" +keyboard_type=$prompt_return + +if ! array_contains "$keyboard_type" "${KEYBOARD_TYPES[@]}"; then + echo_error "Keyboard type must be one of: ${KEYBOARD_TYPES[*]}" + exit 1 +fi + +set_git_username +prompt "Your Name" "$git_username" +username=$prompt_return + +echo + +copy_templates +set_sed_i +replace_keyboard_placeholders +[ -n "$username" ] && replace_name_placeholders + +echo +echo_bold "Created a new keyboard called $keyboard_name." +echo +echo_bold "To start working on things, cd into keyboards/$keyboard_name," +echo_bold "or open the directory in your favourite text editor." diff --git a/util/new_project.sh b/util/new_project.sh deleted file mode 100755 index d1d1ed82ca38..000000000000 --- a/util/new_project.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -# Script to make a new quantum project -# Jack Humbert 2015 - -KEYBOARD=$1 -KEYBOARD_TYPE=$2 - -if [ -z "$KEYBOARD" ]; then - echo "Usage: $0 " - echo "Example: $0 gh60 avr" - echo "Example: $0 bfake ps2avrgb" - exit 1 -elif [ -z "$KEYBOARD_TYPE" ]; then - KEYBOARD_TYPE=avr -fi - -if [ "$KEYBOARD_TYPE" != "avr" ] && [ "$KEYBOARD_TYPE" != "ps2avrgb" ]; then - echo "Invalid keyboard type target" - exit 1 -fi - -if [ -e "keyboards/$1" ]; then - echo "Error! keyboards/$1 already exists!" - exit 1 -fi - -cd "$(dirname "$0")/.." || exit - -KEYBOARD_NAME=$(basename "$1") -KEYBOARD_NAME_UPPERCASE=$(echo "$KEYBOARD_NAME" | awk '{print toupper($0)}') -NEW_KBD=keyboards/${KEYBOARD} - - -cp -r quantum/template/base "$NEW_KBD" -cp -r "quantum/template/$KEYBOARD_TYPE/." "$NEW_KBD" - -mv "${NEW_KBD}/template.c" "${NEW_KBD}/${KEYBOARD_NAME}.c" -mv "${NEW_KBD}/template.h" "${NEW_KBD}/${KEYBOARD_NAME}.h" -find "${NEW_KBD}" -type f -exec sed -i '' -e "s;%KEYBOARD%;${KEYBOARD_NAME};g" {} \; -find "${NEW_KBD}" -type f -exec sed -i '' -e "s;%KEYBOARD_UPPERCASE%;${KEYBOARD_NAME_UPPERCASE};g" {} \; - -GIT=$(whereis git) -if [ "$GIT" != "" ]; then - IS_GIT_REPO=$($GIT log >>/dev/null 2>&1; echo $?) - if [ "$IS_GIT_REPO" -eq 0 ]; then - ID="'$($GIT config --get user.name)'" - echo "Using $ID as user name" - - for i in "$NEW_KBD/config.h" \ - "$NEW_KBD/$KEYBOARD_NAME.c" \ - "$NEW_KBD/$KEYBOARD_NAME.h" \ - "$NEW_KBD/keymaps/default/config.h" \ - "$NEW_KBD/keymaps/default/keymap.c" - do - awk -v id="$ID" '{sub(/REPLACE_WITH_YOUR_NAME/,id); print}' < "$i" > "$i.$$" - mv "$i.$$" "$i" - done - fi -fi - -cat <<-EOF -###################################################### -# $NEW_KBD project created. To start -# working on things, cd into $NEW_KBD -###################################################### -EOF diff --git a/util/rgblight_breathing_table_calc.c b/util/rgblight_breathing_table_calc.c new file mode 100644 index 000000000000..fc4d49ea5879 --- /dev/null +++ b/util/rgblight_breathing_table_calc.c @@ -0,0 +1,49 @@ +// +// calculate rgblight_effect_breathe_table[] values +// +// this is host program for quantum/rgblight.c:void rgblight_effect_breathing(); +// +// example: +// $ edit util/rgblight_breathing_table_calc.c +// $ cc -o util/rgblight_breathing_table_calc util/rgblight_breathing_table_calc.c +// $ ./util/rgblight_breathing_table_calc > keyboards/KEYBOARD_NAME/keymaps/KEYMAP_NAME/rgblight_breathe_table.h +// +#include +#include +#include + +/// customize breeathing effect part /////////////////////////// +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +//////////////////////////////////////////////////////////////// + +int main(void) { + int pos, step; + int table[256]; + for (pos = 0; pos < 256; pos ++ ) { + table[pos] = (uint8_t)( + (exp(sin((pos/255.0)*M_PI))- RGBLIGHT_EFFECT_BREATHE_CENTER/M_E) + * (RGBLIGHT_EFFECT_BREATHE_MAX/(M_E-1/M_E)) + ); + } + printf("#ifndef RGBLIGHT_EFFECT_BREATHE_TABLE\n"); + printf("#define RGBLIGHT_EFFECT_BREATHE_TABLE\n\n"); + printf("const uint8_t rgblight_effect_breathe_table[] PROGMEM = {\n"); + printf(" /* #define RGBLIGHT_EFFECT_BREATHE_CENTER %.2f */\n", RGBLIGHT_EFFECT_BREATHE_CENTER); + printf(" /* #define RGBLIGHT_EFFECT_BREATHE_MAX %d */\n", RGBLIGHT_EFFECT_BREATHE_MAX); + + for (int s = 0, step = (1<=256?"":"," ); + if ((pos+step) % 8 == 0) + printf("\n"); + } + printf(" #endif /* %d bytes table */\n", s == 0 ? 256:(s== 1 ? 128: 64)); + } + printf("};\n"); + printf("\nstatic const int table_scale = 256/sizeof(rgblight_effect_breathe_table);\n"); + printf("\n#endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */\n"); + return 0; +} diff --git a/util/travis_build.sh b/util/travis_build.sh index d12a87a942c3..2c6c62931fec 100755 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -5,9 +5,9 @@ TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" -MAKE_ALL="make all:default AUTOGEN=\"true\"" +MAKE_ALL="make all:default" -if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then +if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then exit_code=0 git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} if [ $? -eq 128 ]; then @@ -17,28 +17,30 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then else NEFM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/)' | grep -Ev '^(docs/)' | wc -l) BRANCH=$(git rev-parse --abbrev-ref HEAD) + # is this branch master or a "non docs, non keyboards" change if [ $NEFM -gt 0 -o "$BRANCH" = "master" ]; then echo "Making default keymaps for all keyboards" eval $MAKE_ALL : $((exit_code = $exit_code + $?)) else - MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_\/]+)(?=\/)' | sort -u) + # keyboards project format + # /keyboards/board1/rev/keymaps/ + # /keyboards/board2/keymaps/ + # ensure we strip everything off after and including the keymaps folder to get board and/or revision + MKB=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards\/)([a-zA-Z0-9_\/]+)(?=\/)' | sed 's^/keymaps/.*^^' | sort -u) for KB in $MKB ; do - if [[ $KB == *keymaps* ]]; then - continue - fi KEYMAP_ONLY=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ev '^(keyboards/'${KB}'/keymaps/)' | wc -l) if [[ $KEYMAP_ONLY -gt 0 ]]; then echo "Making all keymaps for $KB" - make ${KB}:all AUTOGEN=true + make ${KB}:all : $((exit_code = $exit_code + $?)) else MKM=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -oP '(?<=keyboards/'${KB}'/keymaps/)([a-zA-Z0-9_]+)(?=\/)' | sort -u) for KM in $MKM ; do - echo "Making $KM for $KB" - make ${KB}:${KM} AUTOGEN=true + echo "Making $KM for $KB" + make ${KB}:${KM} : $((exit_code = $exit_code + $?)) - done + done fi done fi diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index 66b3beb6cef5..d76030f8310f 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -1,9 +1,6 @@ #!/bin/bash -TRAVIS_BRANCH="${TRAVIS_BRANCH:master}" -TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST:false}" -TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" -TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" +source util/travis_push.sh set -o errexit -o nounset @@ -12,17 +9,6 @@ echo "Using git hash ${rev}" if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then -git config --global user.name "QMK Bot" -git config --global user.email "hello@qmk.fm" - -openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d -tar xvf secrets.tar - -chmod 600 id_rsa_qmk_firmware -chmod 600 id_rsa_qmk.fm -eval `ssh-agent -s` -ssh-add id_rsa_qmk_firmware - # convert to unix line-endings git checkout master git diff --diff-filter=M --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix @@ -69,10 +55,9 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then # rm -f compiled/*.hex # ignore errors here - for file in ../qmk_firmware/keyboards/*/keymaps/*/*_default.hex; do mv -v "$file" "compiled/${file##*/}" || true; done - for file in ../qmk_firmware/keyboards/*/*/keymaps/*/*_default.hex; do mv -v "$file" "compiled/${file##*/}" || true; done - for file in ../qmk_firmware/keyboards/*/*/*/keymaps/*/*_default.hex; do mv -v "$file" "compiled/${file##*/}" || true; done - for file in ../qmk_firmware/keyboards/*/*/*/*/keymaps/*/*_default.hex; do mv -v "$file" "compiled/${file##*/}" || true; done + # In theory, this is more flexible, and will allow for additional expansion of additional types of files and other names + mv ../qmk_firmware/*_default.*[hb][ei][xn] ./compiled/ || true + bash _util/generate_keyboard_page.sh git add -A git commit -m "generated from qmk/qmk_firmware@${rev}" diff --git a/util/travis_push.sh b/util/travis_push.sh index 7eea88b14820..d100f9d48f7a 100755 --- a/util/travis_push.sh +++ b/util/travis_push.sh @@ -5,13 +5,15 @@ TRAVIS_PULL_REQUEST="${TRAVIS_PULL_REQUEST:false}" TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" -git config --global user.name "QMK Bot" -git config --global user.email "hello@qmk.fm" +if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then + git config --global user.name "QMK Bot" + git config --global user.email "hello@qmk.fm" -openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d -tar xvf secrets.tar + openssl aes-256-cbc -K $encrypted_b0ee987fd0fc_key -iv $encrypted_b0ee987fd0fc_iv -in secrets.tar.enc -out secrets.tar -d + tar xvf secrets.tar -chmod 600 id_rsa_qmk_firmware -chmod 600 id_rsa_qmk.fm -eval `ssh-agent -s` -ssh-add id_rsa_qmk_firmware + chmod 600 id_rsa_qmk_firmware + chmod 600 id_rsa_qmk.fm + eval `ssh-agent -s` + ssh-add id_rsa_qmk_firmware +fi diff --git a/util/travis_test.sh b/util/travis_test.sh new file mode 100644 index 000000000000..6c48f898ce5a --- /dev/null +++ b/util/travis_test.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE:-none}" +TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" + +# test force push +#TRAVIS_COMMIT_RANGE="c287f1bfc5c8...81f62atc4c1d" + +NUM_IMPACTING_CHANGES=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} | grep -Ecv '^(docs/)') +BRANCH=$(git rev-parse --abbrev-ref HEAD) + +if [[ "$TRAVIS_COMMIT_MESSAGE" == *"[skip test]"* ]]; then + echo "Skipping due to commit message" + exit 0 +fi + +if [ "$BRANCH" != "master" ] && [ "$NUM_IMPACTING_CHANGES" == "0" ]; then + echo "Skipping due to changes not impacting tests" + exit 0 +fi + +make test:all diff --git a/util/usb_detach/Makefile b/util/usb_detach/Makefile new file mode 100644 index 000000000000..533c1928f494 --- /dev/null +++ b/util/usb_detach/Makefile @@ -0,0 +1,18 @@ +# the compiler: gcc for C program, define as g++ for C++ +CC = gcc + +# compiler flags: +# -g adds debugging information to the executable file +# -Wall turns on most, but not all, compiler warnings +CFLAGS = -g -Wall + +# the build target executable: +TARGET = usb_detach + +all: $(TARGET) + +$(TARGET): $(TARGET).c + $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c + +clean: + $(RM) $(TARGET) diff --git a/keyboards/jj40/tools/README.md b/util/usb_detach/readme.md similarity index 84% rename from keyboards/jj40/tools/README.md rename to util/usb_detach/readme.md index 081984ed44bc..ac42944ee470 100644 --- a/keyboards/jj40/tools/README.md +++ b/util/usb_detach/readme.md @@ -1,16 +1,14 @@ -# JJ40 Tools - -## usb_detach.c +# usb_detach When trying to flash on Linux, you may encounter a "Resource Unavailable" error. This means that Linux's HID driver has taken exclusive control of the keyboard, and the program script can't flash it. This program can force Linux to give up a device, so that the programming script can reset it. -### To compile: -``` -gcc usb_detach.c -o usb_detach +## To compile: +```bash +make clean && make ``` -### To run: +## To run: 1. Use `lsusb` to discover the Bus and Device numbers for your keyboard. 2. Run the program: `sudo ./usb_detach /dev/bus/usb//`. 3. Build and program the firmware as normal. diff --git a/keyboards/jj4x4/tools/usb_detach.c b/util/usb_detach/usb_detach.c similarity index 98% rename from keyboards/jj4x4/tools/usb_detach.c rename to util/usb_detach/usb_detach.c index c21e47a7a439..786ab5e674e8 100644 --- a/keyboards/jj4x4/tools/usb_detach.c +++ b/util/usb_detach/usb_detach.c @@ -1,5 +1,6 @@ /* Found at https://www.linuxquestions.org/questions/linux-hardware-18/how-to-unclaim-usb-device-558138/#post3406986 */ #include +#include #include #include #include