Compare commits
63 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b702c08825 | ||
|
ec3e065f0d | ||
|
3c15c48e6a | ||
|
49d8f1c5ed | ||
|
5cdf47a79e | ||
|
3f1aab0c2e | ||
|
43edc83998 | ||
|
dd60038eeb | ||
|
716ff76f5b | ||
|
eef94b0b40 | ||
|
309a400b3e | ||
|
c2c3aa4f08 | ||
|
392121b10e | ||
|
0533362e82 | ||
|
4df4fa7c26 | ||
|
66f13e4972 | ||
|
bb11df6b7a | ||
|
e236f1eba1 | ||
|
847ade44fc | ||
|
7044dafe59 | ||
|
fd1a0d6753 | ||
|
c2c9d9b386 | ||
|
05f15b789f | ||
|
7e2223f822 | ||
|
3b5381d689 | ||
|
aee6785476 | ||
|
363aa8aa2e | ||
|
ef2961798c | ||
|
3e861c2fd5 | ||
|
f113f1927f | ||
|
27ee425892 | ||
|
89357b96d4 | ||
|
16843bc8c9 | ||
|
7854746704 | ||
|
245b3376d6 | ||
|
2c703b1528 | ||
|
90a6fea4e8 | ||
|
e45290a62e | ||
|
1d3a19757c | ||
|
cf9f6bbd91 | ||
|
41df0dc9a7 | ||
|
30dc34d529 | ||
|
e899cb8940 | ||
|
80e489e122 | ||
|
29d1abff07 | ||
|
b546da0a19 | ||
|
f357bd0ccc | ||
|
685d4c2f97 | ||
|
535c2f60a9 | ||
|
65eaab8a1a | ||
|
18f3cd1123 | ||
|
e45ce2dcb3 | ||
|
137456e5b1 | ||
|
ec59147507 | ||
|
074b78700a | ||
|
432674781a | ||
|
4e41beeaa6 | ||
|
00733f4b87 | ||
|
19753788c1 | ||
|
54a8abd785 | ||
|
d6ad9787a0 | ||
|
e2e387f8f8 | ||
|
039cc8c932 |
8
.gitignore
vendored
8
.gitignore
vendored
@@ -28,7 +28,14 @@ cmake-build-debug
|
||||
/util/win_downloaded
|
||||
/keyboards/*/Makefile
|
||||
/keyboards/*/*/Makefile
|
||||
/keyboards/*/*/*/Makefile
|
||||
/keyboards/*/*/*/*/Makefile
|
||||
/keyboards/*/*/*/*/*/Makefile
|
||||
/keyboards/*/keymaps/Makefile
|
||||
/keyboards/*/*/keymaps/Makefile
|
||||
/keyboards/*/*/*/keymaps/Makefile
|
||||
/keyboards/*/*/*/*/keymaps/Makefile
|
||||
/keyboards/*/*/*/*/*/keymaps/Makefile
|
||||
|
||||
# Eclipse/PyCharm/Other IDE Settings
|
||||
.cproject
|
||||
@@ -39,6 +46,7 @@ cmake-build-debug
|
||||
*.stackdump
|
||||
util/Win_Check_Output.txt
|
||||
# Let these ones be user specific, since we have so many different configurations
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/tasks.json
|
||||
.vscode/last.sql
|
||||
|
339
LICENSE
Normal file
339
LICENSE
Normal file
@@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
@@ -94,6 +94,23 @@ endif
|
||||
|
||||
OPT_DEFS += -DKEYBOARD_$(KEYBOARD_FILESAFE)
|
||||
|
||||
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/$(KEYBOARD_FOLDER_1).h)","")
|
||||
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_1).h
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/$(KEYBOARD_FOLDER_2).h)","")
|
||||
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_2).h
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_3)/$(KEYBOARD_FOLDER_3).h)","")
|
||||
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_3).h
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/$(KEYBOARD_FOLDER_4).h)","")
|
||||
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_4).h
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/$(KEYBOARD_FOLDER_5).h)","")
|
||||
QMK_KEYBOARD_H = $(KEYBOARD_FOLDER_5).h
|
||||
endif
|
||||
|
||||
# We can assume a ChibiOS target When MCU_FAMILY is defined , since it's not used for LUFA
|
||||
ifdef MCU_FAMILY
|
||||
PLATFORM=CHIBIOS
|
||||
@@ -233,10 +250,12 @@ ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
include $(VISUALIZER_PATH)/visualizer.mk
|
||||
endif
|
||||
|
||||
ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H)
|
||||
|
||||
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
|
||||
$(KEYMAP_OUTPUT)_SRC := $(SRC)
|
||||
$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) \
|
||||
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(KEYBOARD_FOLDER_1).h\" -DQMK_KEYBOARD_CONFIG_H=\"$(KEYBOARD_PATH_1)/config.h\" \
|
||||
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(QMK_KEYBOARD_H)\" -DQMK_KEYBOARD_CONFIG_H=\"$(KEYBOARD_PATH_1)/config.h\" \
|
||||
-DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" \
|
||||
-DQMK_SUBPROJECT -DQMK_SUBPROJECT_H -DQMK_SUBPROJECT_CONFIG_H
|
||||
$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS)
|
||||
|
@@ -42,6 +42,22 @@
|
||||
* [Unicode](feature_unicode.md)
|
||||
* [Userspace](feature_userspace.md)
|
||||
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [Basic](keycodes_basic.md)
|
||||
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
||||
* [Mod Tap](feature_advanced_keycodes.md#mod-tap)
|
||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
||||
* [Stenography](feature_stenography.md#keycode-reference)
|
||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
|
||||
* Reference
|
||||
* [Config Options](config_options.md)
|
||||
* [Customizing Functionality](custom_quantum_functions.md)
|
||||
@@ -49,21 +65,6 @@
|
||||
* [Documentation Templates](documentation_templates.md)
|
||||
* [Glossary](glossary.md)
|
||||
* [Keymap overview](keymap.md)
|
||||
* [Keycodes](keycodes.md)
|
||||
* [Backlight](feature_backlight.md#backlight-keycodes)
|
||||
* [Basic](keycodes_basic.md)
|
||||
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes)
|
||||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes)
|
||||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers)
|
||||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys)
|
||||
* [Mod Tap](feature_advanced_keycodes.md#mod-tap)
|
||||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes)
|
||||
* [Stenography](feature_stenography.md#keycode-reference)
|
||||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes)
|
||||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)
|
||||
* [Unit Testing](unit_testing.md)
|
||||
|
||||
* For Makers and Modders
|
||||
|
@@ -104,6 +104,8 @@ Most first-time QMK contributors start with their personal keymaps. We try to ke
|
||||
* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
|
||||
* 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 `)
|
||||
|
||||
## Keyboards
|
||||
|
||||
@@ -114,6 +116,9 @@ We also ask that you follow these guidelines:
|
||||
* Write a `readme.md` using [the template](https://docs.qmk.fm/documentation_templates.html#).
|
||||
* Keep the number of commits reasonable or we will squash your PR
|
||||
* 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/<kb1>/<kb2>/<kb2>.[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 `)
|
||||
|
||||
## Quantum/TMK Core
|
||||
|
||||
|
@@ -159,6 +159,7 @@ byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
|
||||
And see this discussion for further reference.
|
||||
https://github.com/tmk/tmk_keyboard/issues/179
|
||||
|
||||
If you are using a TeensyUSB, there is a [known bug](https://github.com/qmk/qmk_firmware/issues/164) in which the hardware reset button prevents the RESET key from working. Unplugging the keyboard and plugging it back in should resolve the problem.
|
||||
|
||||
## Special Extra key doesn't work(System, Audio control keys)
|
||||
You need to define `EXTRAKEY_ENABLE` in `rules.mk` to use them in QMK.
|
||||
|
@@ -49,6 +49,8 @@ Once you have a good feel for how layers work and what you can do, you can get m
|
||||
|
||||
Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem.
|
||||
|
||||
Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](../tmk_core/common/action_layer.h).
|
||||
|
||||
# Modifier keys
|
||||
|
||||
These functions allow you to combine a mod with a keycode. When pressed the keydown for the mod will be sent first, and then *kc* will be sent. When released the keyup for *kc* will be sent and then the mod will be sent.
|
||||
@@ -145,6 +147,8 @@ You can control the behavior of one shot keys by defining these in `config.h`:
|
||||
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
|
||||
* `OSL(layer)` - momentary switch to *layer*.
|
||||
|
||||
Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](../tmk_core/common/action.c#L429).
|
||||
|
||||
## Permissive Hold
|
||||
|
||||
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
|
||||
|
@@ -42,7 +42,7 @@ Yes, unfortunately.
|
||||
|
||||
Add to your `rules.mk` in the keymap folder:
|
||||
|
||||
AUTO_SHIFT_ENABLE = YES
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
|
||||
If no `rules.mk` exists, you can create one.
|
||||
|
||||
|
@@ -30,4 +30,58 @@ Please include authorship (your name, github username, email), and optionally [a
|
||||
|
||||
## Example
|
||||
|
||||
For a brief example, checkout `/users/_example/` until we have more reasonable and useful examples.
|
||||
For a brief example, checkout `/users/_example/` , or for a more detailed examples check out [`template.h`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.h) and [`template.c`](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/template.c) in `/users/drashna/` .
|
||||
|
||||
### Consolidated Macros
|
||||
|
||||
If you wanted to consoludate macros and other functions into your userspace for all of your keymaps, you can do that. The issue is that you then cannot call any function defined in your userspace, or it gets complicated. To better handle this, you can call the functions here and create new functions to use in individual keymaps.
|
||||
|
||||
First, you'd want to go through all of your `keymap.c` files and replace `process_record_user` with `process_record_keymap` instead. This way, you can still use keyboard specific codes on those boards, and use your custom "global" keycodes as well. You'll also want to replace `SAFE_RANGE` with `NEW_SAFE_RANGE` so that you wont have any overlappind keycodes
|
||||
|
||||
Then add `#include <name.h>` to all of your keymap.c files. This allows you to use these new keycodes without having to redefine them in each keymap.
|
||||
|
||||
Once you've done that, you'll want to set the keycode definitions that you need to the `<name>.h` file. For instance:
|
||||
```
|
||||
#ifndef USERSPACE
|
||||
#define USERSPACE
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
// Define all of
|
||||
enum custom_keycodes {
|
||||
KC_MAKE = SAFE_RANGE,
|
||||
NEW_SAFE_RANGE //use "NEW_SAFE_RANGE" for keymap specific codes
|
||||
};
|
||||
|
||||
#endif
|
||||
```
|
||||
|
||||
Now you want to create the `<name>.c` file, and add this content to it:
|
||||
|
||||
```
|
||||
#include "<name>.h"
|
||||
#include "quantum.h"
|
||||
#include "action.h"
|
||||
#include "version.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) {
|
||||
switch (keycode) {
|
||||
case KC_MAKE:
|
||||
if (!record->event.pressed) {
|
||||
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP);
|
||||
SEND_STRING(SS_TAP(X_ENTER));
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return process_record_keymap(keycode, record);
|
||||
}
|
||||
```
|
||||
|
||||
This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make <keyboard>:<keymap">`, 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.
|
||||
|
||||
|
@@ -36,7 +36,7 @@ If the keymap `config.h` exists, that file is included by the build system and t
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
#include "config_common.h"
|
||||
```
|
||||
|
||||
If you want to override a setting from the parent `config.h` file, you need to `#undef` and then `#define` the setting again, like this:
|
||||
|
@@ -14,7 +14,7 @@ Other than having Vagrant and Virtualbox installed and possibly a restart of you
|
||||
|
||||
The "easy" way to flash the firmware is using a tool from your host OS:
|
||||
|
||||
* [QMK Flasher](https://github.com/qmk/qmk_flasher)
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox) (reccommened)
|
||||
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
|
||||
* [Atmel FLIP](http://www.atmel.com/tools/flip.aspx)
|
||||
|
||||
|
@@ -6,7 +6,7 @@ Parts list:
|
||||
* Keyboard plate (metal, plastic, cardboard, etc)
|
||||
* Wire (strained for wiring to the Teensy, anything for the rows/columns)
|
||||
* Soldering iron set at 600ºF or 315ºC (if temperature-controlled)
|
||||
* Resin-cored solder (leaded or lead-free)
|
||||
* Rosin-cored solder (leaded or lead-free)
|
||||
* Adequate ventilation/a fan
|
||||
* Tweezers (optional)
|
||||
* Wire cutters/snippers
|
||||
|
@@ -16,6 +16,94 @@ In an effort to keep the repo size down, we're no longer accepting images of any
|
||||
|
||||
Any sort of hardware file (plate, case, pcb) can't be stored in qmk_firmware, but we have the [qmk.fm repo](https://github.com/qmk/qmk.fm) where such files (as well as in-depth info) can be stored and viewed on [qmk.fm](http://qmk.fm). Downloadable files are stored in `/<keyboard>/` (name follows the same format as above) which are served at `http://qmk.fm/<keyboard>/`, and pages are generated from `/_pages/<keyboard>/` which are served at the same location (.md files are generated into .html files through Jekyll). Check out the `lets_split` directory for an example.
|
||||
|
||||
## Keyboard Metadata
|
||||
|
||||
As QMK grows so does the ecosystem surrounding QMK. To make it easier for projects in that ecosystem to tie into QMK as we make changes we are developing a metadata system to expose information about keyboards in QMK.
|
||||
|
||||
You can create `info.json` files at every level under `qmk_firmware/keyboards/<name>` to specify this metadata. These files are combined, with more specific files overriding keys in less specific files. This means you do not need to duplicate your metadata information. For example, `qmk_firmware/keyboards/clueboard/info.json` specifies `manufacturer` and `maintainer`, while `qmk_firmware/keyboards/clueboard/66/info.json` specifies more specific information about Clueboard 66%.
|
||||
|
||||
### `info.json` Format
|
||||
|
||||
The `info.json` file is a JSON formatted dictionary with the following keys available to be set. You do not have to set all of them, merely the keys that apply to your keyboard.
|
||||
|
||||
* `keyboard_name`
|
||||
* A free-form text string describing the keyboard.
|
||||
* Example: `Clueboard 66%`
|
||||
* `manufacturer`
|
||||
* A free-form text string naming the manufacturer.
|
||||
* Example: `Clueboard`
|
||||
* `identifier`
|
||||
* The Vendor, Product, and Revision ID's joined by a :
|
||||
* Example: `c1ed:2370:0001`
|
||||
* `url`
|
||||
* A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard.
|
||||
* `processor`
|
||||
* The MCU or CPU this keyboard uses.
|
||||
* Example: `atmega32u4` or `stm32f303`
|
||||
* `bootloader`
|
||||
* What bootloader this keyboard uses. Available options:
|
||||
* `atmel-dfu`
|
||||
* `kiibohd-dfu-util`
|
||||
* `lufa-dfu`
|
||||
* `qmk-dfu`
|
||||
* `stm32-dfu-util`
|
||||
* (FIXME: This list is incomplete.)
|
||||
* `maintainer`
|
||||
* GitHub username of the maintainer, or `qmk` for community maintained boards
|
||||
* `width`
|
||||
* Width of the board in Key Units
|
||||
* `height`
|
||||
* Height of the board in Key Units
|
||||
* `layouts`
|
||||
* Physical Layout representations. See the next section for more detail.
|
||||
|
||||
#### Layout Format
|
||||
|
||||
Within our `info.json` file the `layouts` portion of the dictionary contains several nested dictionaries. The outer layer consists of QMK layout macros, for example `LAYOUT_ansi` or `LAYOUT_iso`. Within each layout macro are keys for `width`, `height`, and `key_count`, each of which should be self-explanatory.
|
||||
|
||||
* `width`
|
||||
* Optional: The width of the layout in Key Units
|
||||
* `height`
|
||||
* Optional: The height of the layout in Key Units
|
||||
* `key_count`
|
||||
* **Required**: The number of keys in this layout
|
||||
* `layout`
|
||||
* A list of Key Dictionaries describing the physical layout. See the next section for more details.
|
||||
|
||||
#### Key Dictionary Format
|
||||
|
||||
Each Key Dictionary in a layout describes the physical properties of a key. If you are familiar with the Raw Code for <http://keyboard-layout-editor.com> you will find many of the concepts the same. We re-use the same key names and layout choices wherever possible, but unlike keyboard-layout-editor each key is stateless, inheriting no properties from the keys that came before it.
|
||||
|
||||
All key positions and rotations are specified in relation to the top-left corner of the keyboard, and the top-left corner of each key.
|
||||
|
||||
* `X`
|
||||
* **Required**: The absolute position of the key in the horizontal axis, in Key Units.
|
||||
* `Y`
|
||||
* **Required**: The absolute position of the key in the vertical axis, in Key Units.
|
||||
* `W`
|
||||
* The width of the key, in Key Units. Ignored if `ks` is provided. Default: `1`
|
||||
* `H`
|
||||
* The height of the key, in Key Units. Ignored if `ks` is provided. Default: `1`
|
||||
* `R`
|
||||
* How many degrees clockwise to rotate the key.
|
||||
* `RX`
|
||||
* The absolute position of the point to rotate the key around in the horizontal axis. Default: `x`
|
||||
* `RY`
|
||||
* The absolute position of the point to rotate the key around in the vertical axis. Default: `y`
|
||||
* `KS`
|
||||
* Key Shape: define a polygon by providing a list of points, in Key Units.
|
||||
* **Important**: These are relative to the top-left of the key, not absolute.
|
||||
* Example ISO Enter: `[ [0,0], [1.5,0], [1.5,2], [0.25,2], [0.25,1], [0,1], [0,0] ]`
|
||||
|
||||
### How Is The Metadata Exposed?
|
||||
|
||||
This metadata is primarily used in two ways:
|
||||
|
||||
* To allow web-based configurators to dynamically generate UI
|
||||
* To support the new `make keyboard:keymap:qmk` target, which bundles this metadata up with the firmware to allow QMK Toolbox to be smarter.
|
||||
|
||||
Configurator authors can see the [QMK Compiler](https://docs.compile.qmk.fm/api_docs.html) docs for more information on using the JSON API.
|
||||
|
||||
## Non-production/handwired projects
|
||||
|
||||
We're happy to accept any project that uses QMK, including prototypes and handwired ones, but we have a separate `/keyboards/handwired/` folder for them, so the main `/keyboards/` folder doesn't get overcrowded. If a prototype project becomes a production project at some point in the future, we'd be happy to move it to the main `/keyboards/` folder!
|
||||
|
@@ -115,7 +115,7 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
|
||||
|`KC_DOWN`||DownArrow|
|
||||
|`KC_UP`||UpArrow|
|
||||
|`KC_APPLICATION`|`KC_APP`|Application|
|
||||
|`KC_POWER`||Power|
|
||||
|`KC_POWER`||Old power button scancode. MS has deprecated this in favor of `KC_SYSTEM_POWER`.|
|
||||
|`KC_EXECUTE`||Execute|
|
||||
|`KC_HELP`||Help|
|
||||
|`KC_MENU`||Menu|
|
||||
@@ -138,7 +138,7 @@ When defining a [keymap](keymap.md) each key needs a valid key definition. This
|
||||
|`KC_CLEAR_AGAIN`||Clear/Again|
|
||||
|`KC_CRSEL`||CrSel/Props|
|
||||
|`KC_EXSEL`||ExSel|
|
||||
|`KC_SYSTEM_POWER`|`KC_PWR`|System Power Down|
|
||||
|`KC_SYSTEM_POWER`|`KC_PWR`|System Power Down. Recommended over `KC_POWER`.|
|
||||
|`KC_SYSTEM_SLEEP`|`KC_SLEP`|System Sleep|
|
||||
|`KC_SYSTEM_WAKE`|`KC_WAKE`|System Wake|
|
||||
|`KC_MAIL`|`KC_MAIL`||
|
||||
|
@@ -28,14 +28,12 @@ Respective layers can be validated simultaneously. Layers are indexed with 0 to
|
||||
Sometimes, the action code stored in keymap may be referred as keycode in some documents due to the TMK history.
|
||||
|
||||
### Keymap layer status
|
||||
Keymap layer has its state in two 32 bit parameters:
|
||||
The state of the Keymap layer is determined by two 32 bit parameters:
|
||||
|
||||
* **`default_layer_state`** indicates a base keymap layer(0-31) which is always valid and to be referred.
|
||||
* **`layer_state`** () has current on/off status of the layer on its each bit.
|
||||
* **`default_layer_state`** indicates a base keymap layer (0-31) which is always valid and to be referred (the default layer).
|
||||
* **`layer_state`** has current on/off status of each layer in its bits.
|
||||
|
||||
Keymap has its state in two parameter **`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit.
|
||||
Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`.
|
||||
To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
|
||||
Keymap layer '0' is usually `default_layer`, wither other layers initially off after booting up the firmware, although this can configured differently in `config.h`. It is useful to change `default_layer` when you completely switch a key layout, for example, if you want to switch to Colemak instead of Qwerty.
|
||||
|
||||
Initial state of Keymap Change base layout
|
||||
----------------------- ------------------
|
||||
@@ -52,7 +50,7 @@ To change `default_layer` will be useful when you switch key layout completely,
|
||||
`--- default_layer = 0 `--- default_layer = 1
|
||||
layer_state = 0x00000001 layer_state = 0x00000002
|
||||
|
||||
On the other hand, you shall change `layer_state` to overlay base layer with some layers for feature such as navigation keys, function key(F1-F12), media keys or special actions.
|
||||
On the other hand, you can change `layer_state` to overlay the base layer with other layers for features such as navigation keys, function keys (F1-F12), media keys, and/or special actions.
|
||||
|
||||
Overlay feature layer
|
||||
--------------------- bit|status
|
||||
|
28
keyboards/acr60/acr60.c
Normal file
28
keyboards/acr60/acr60.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "acr60.h"
|
||||
#include "led.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// Keyboard start-up code goes here
|
||||
// Runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
led_init_ports();
|
||||
};
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// Looping keyboard code goes here
|
||||
// This runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
};
|
||||
|
||||
void led_init_ports(void) {
|
||||
// Set caps lock LED pin as output
|
||||
DDRB |= (1 << 2);
|
||||
// Default to off
|
||||
PORTB |= (1 << 2);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// Code for caps lock LED as reported by the OS
|
||||
// Set this per keymap, instead of globally
|
||||
led_set_user(usb_led);
|
||||
}
|
107
keyboards/acr60/acr60.h
Normal file
107
keyboards/acr60/acr60.h
Normal file
@@ -0,0 +1,107 @@
|
||||
#ifndef ARC60_H
|
||||
#define ARC60_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
|
||||
K400, K401, K403, K404, K406, K408, 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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
|
||||
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \
|
||||
}
|
||||
|
||||
#define KEYMAP_HHKB( \
|
||||
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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
|
||||
K401, K403, K406, K411, K413 \
|
||||
) { \
|
||||
{ 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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
|
||||
{ KC_NO, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, KC_NO } \
|
||||
}
|
||||
|
||||
#define KEYMAP_TRUE_HHKB( \
|
||||
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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
|
||||
K401, K403, K406, K410, K411 \
|
||||
) { \
|
||||
{ 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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \
|
||||
{ KC_NO, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, KC_NO, KC_NO } \
|
||||
}
|
||||
|
||||
#define KEYMAP_2_SHIFTS( \
|
||||
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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \
|
||||
K400, K401, K403, K404, K406, K408, 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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
|
||||
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \
|
||||
}
|
||||
|
||||
#define KEYMAP_DIRECTIONAL( \
|
||||
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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K312, K313, K314, \
|
||||
K400, K401, K403, K404, K406, K408, 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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, KC_NO, K312, K313, K314 }, \
|
||||
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \
|
||||
}
|
||||
|
||||
/* Mitch's keymap, "MitchSplit":
|
||||
* Standard 60% base, split right shift, 3-split space, standard modifier row.
|
||||
* Split shift is 2.75u + 1.25u + 2.25u (total of 6.25u). Might not work with other orientations.
|
||||
*/
|
||||
/*
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* |K000 |K001 |K002 |K003 |K004 |K005 |K006 |K007 |K008 |K009 |K010 |K011 |K012 | 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 | K313 |K314 |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | K400 | K401 | K403 | K404 | K406 | K408 | K410 | K411 | K413 | K414 |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
#define MITCHSPLIT( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, 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, K313, K314, \
|
||||
K400, K401, K403, K404, K406, K408, K410, K411, K413, K414 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, 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, KC_NO, K313, K314 }, \
|
||||
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \
|
||||
}
|
||||
|
||||
#endif
|
54
keyboards/acr60/config.h
Normal file
54
keyboards/acr60/config.h
Normal file
@@ -0,0 +1,54 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x2260
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER MechKeysCa
|
||||
#define PRODUCT ACR60
|
||||
#define DESCRIPTION ACR60 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, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_PIN B6
|
||||
#define BACKLIGHT_LEVELS 5
|
||||
|
||||
/* 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
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 20
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
||||
#endif
|
69
keyboards/acr60/keymaps/default/keymap.c
Normal file
69
keyboards/acr60/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "acr60.h"
|
||||
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*
|
||||
* Default keymap with standard 60% layout. Split space possible but entirely optional with this layout, as this
|
||||
* layout covers all three split space keys as space keycodes. This also has alt right next to the space bar
|
||||
* on both sides (Windows keyboard layout), no right-side system/GUI key, and momentary layer switching on
|
||||
* the right modifiers into the 3rd (macro) and 2nd (function/sfx) layers, respectively. This also has the grave
|
||||
* accent key set up on the 2nd layer, although on the first layer it includes grave key (tilde) when shift is held down,
|
||||
* via the function actions code at the bottom.
|
||||
*/
|
||||
KEYMAP(
|
||||
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,
|
||||
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,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_NO, MO(1), KC_RCTL),
|
||||
|
||||
KEYMAP(
|
||||
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, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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_DEC, BL_TOGG, 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),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), M(12), KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
204
keyboards/acr60/keymaps/mitch/keymap.c
Normal file
204
keyboards/acr60/keymaps/mitch/keymap.c
Normal file
@@ -0,0 +1,204 @@
|
||||
#include "acr60.h"
|
||||
|
||||
#define _DFT 0
|
||||
#define _NGUI 1
|
||||
#define _FN 2
|
||||
#define _SFX 3
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define ______ KC_TRNS
|
||||
#define bbbbbb KC_NO
|
||||
#define GUIOFF MAGIC_NO_GUI
|
||||
#define GUION MAGIC_UNNO_GUI
|
||||
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
/* TODO: create handy quick-ref list here for easy grokking of the actual shortcuts in place */
|
||||
|
||||
/*
|
||||
* This is Mitch's default ACR60 layout (also DZ60, on which the ACR60 is based). This is a
|
||||
* Mac-oriented layout, as noted by the GUI keys immediately next to the space bar area of the
|
||||
* lower modifier row. This uses the MITCHSPLIT keymap as defined in arc60.h, which uses a
|
||||
* 3-split space bar and a split right shift. Otherwise it's a standard 60% layout (for now).
|
||||
*
|
||||
* For me, this is a great place to start getting used to a split key setup and still mostly
|
||||
* sticking to a standard staggered 60% layout so my entire game isn't thrown off.
|
||||
*
|
||||
* Layers (0-based index because we're devs!):
|
||||
*
|
||||
* 0: Default QWERTY layer
|
||||
* Note Fn and Alt keys on the right side of the spacebar, not sure if those are
|
||||
* normal position but that's what I'm used to at this point. YMMV
|
||||
*
|
||||
* 1: Function Layer
|
||||
* Function keys, Grave Key, Delete, Caps lock on the tab, media keys, and directional
|
||||
* keys. Also you can hit the Alt key position to switch (and lock) into the 3rd layer
|
||||
* if you really want to mess with your SFX for a bit.
|
||||
*
|
||||
* 2: Special Effects Layer
|
||||
* RGB and backlight settings access. RGB cycle on "S" key position and if locked into
|
||||
* the third layer you can hold shift to cycle backwards (see notes below). Bootloader
|
||||
* access is on this layer. If layer locked, hit right Alt key to get back to layer 0.
|
||||
*
|
||||
* The keymap layer definitions below look pretty bad when soft-wrapped by your IDE / text editor.
|
||||
* Be sure to disable wrapping to make things more readable with lines preserved.
|
||||
*/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Layer 0
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bksp |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | 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 | , | . | / | RShift | FN |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | LCtrl | LAlt | LGUI | Space | Space| Space | RGUI | Fn | RAlt | RCtrl |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
/* Qwerty gui/alt/space/alt/gui /
|
||||
*
|
||||
* Hit MO(_FN) and Alt in that order to lock into the _FN layer.
|
||||
*/
|
||||
[_DFT] = MITCHSPLIT( /* Basic QWERTY */
|
||||
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, \
|
||||
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_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_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, MO(_FN), LT(_SFX, KC_RALT),KC_RCTL \
|
||||
),
|
||||
|
||||
/* Gaming
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | |BLOCKED| | | |BLOCKED| | | |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
/* I disable the GUI / System key for gaming, as usually that's windows and I hit that at the most
|
||||
* inopportune moments. And games don't use the windows key. I'd use the Bootmagic MAGIC_NO_GUI and
|
||||
* MAGIC_UNNO_GUI keycodes, but that actually disables it and has it persist beyond disconnection
|
||||
* of the board. That's less convenient (and more confusing) for me than this approach, which is
|
||||
* basically just blocking the GUI keys when this layer is active and not letting them flow through
|
||||
* to the default layer.
|
||||
*/
|
||||
/* Layer 2: "special effects": RGB lighting, backlighting, bootloader */
|
||||
[_NGUI] = MITCHSPLIT(
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, bbbbbb, ______, ______, ______, bbbbbb, ______, ______, ______ \
|
||||
),
|
||||
|
||||
/* Fn Layer / Layer 1
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* |KC_GRV| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | CAPS | | | | | |Home | Pgup| Up | PgDn| End | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Vol-| Vol+| Mute| | | | Left| Down|Right| | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | |Prev |Play |Next | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | LrSfx | |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
/*
|
||||
* Pok3r-style layer switching on M and "," keys (_DFT and _NGUI layers, respectively). Note that
|
||||
* these don't enable/disable those layers (i.e. latching keys), they actually switch to that layer.
|
||||
* To go to the _NGUI layer, Fn+comma, to go to _DFT from _NGUI, hit Fn+M.
|
||||
*/
|
||||
/* Layer 1: Functions, primary layer switching, media controls, directional */
|
||||
[_FN] = MITCHSPLIT(
|
||||
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, bbbbbb, bbbbbb, bbbbbb, bbbbbb, bbbbbb, KC_HOME, KC_PGUP, KC_UP , KC_PGDOWN,KC_END, bbbbbb, bbbbbb, bbbbbb, \
|
||||
______, KC_VOLD, KC_VOLU, KC_MUTE, bbbbbb, bbbbbb, bbbbbb, KC_LEFT, KC_DOWN, KC_RIGHT, bbbbbb, bbbbbb, ______, \
|
||||
______, KC_MPRV, KC_MPLY, KC_MNXT, bbbbbb, bbbbbb, bbbbbb,TO(_DFT),TO(_NGUI), bbbbbb, bbbbbb, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______,TG(_SFX),______ \
|
||||
),
|
||||
|
||||
/* Special Effects Layer / Layer 2
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | |Plain|Brth |Rnbw |Swirl|Snake|Knght|Xmas |Grdnt| | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | BL |BLSTEP| BL- | BL+ | | | | | | | | |Bootldr |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | RGBT| RGBM| | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | Hue+| Hue-| Sat+| Sat-| Val+| Val-| | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | |LrDflt | |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
/* Tap RAlt to get back to default layer (0).
|
||||
*
|
||||
* See https://docs.qmk.fm/feature_rgblight.html#rgblight-keycodes for details about
|
||||
* RGB codes. Quick summary, though:
|
||||
*
|
||||
* RGB_MODE_PLAIN RGB_M_P Switch to the static no animation mode
|
||||
* RGB_MODE_BREATHE RGB_M_B Switch to the breathing mode
|
||||
* RGB_MODE_RAINBOW RGB_M_R Switch to the rainbow mode (cycles through colors)
|
||||
* RGB_MODE_SWIRL RGB_M_SW Switch to the swirl mode (like an animated gradient)
|
||||
* RGB_MODE_SNAKE RGB_M_SN Switch to the snake mode
|
||||
* RGB_MODE_KNIGHT RGB_M_K Switch to the knight animation
|
||||
* RGB_MODE_XMAS RGB_M_X Switch to the Christmas animation
|
||||
* RGB_MODE_GRADIENT RGB_M_G Switch to the static gradient mode
|
||||
*
|
||||
* Note that there are more animation variations, usually timer-based variations, by using the
|
||||
* "S" key to cycle through modes. Use one of the deciated keys to get to
|
||||
* the general mode where you want it, then cycle through variations of that mode to get
|
||||
* something specific more quickly.
|
||||
*/
|
||||
/* Layer 2: "special effects": RGB lighting, backlighting, bootloader */
|
||||
[_SFX] = MITCHSPLIT(
|
||||
______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_M_X, RGB_M_G,______, ______, ______, ______, ______, \
|
||||
______, BL_TOGG, BL_STEP, BL_DEC, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \
|
||||
______, RGB_TOG, RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
|
||||
______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, ______, \
|
||||
______, ______, ______, ______, ______, ______, ______, ______,TO(_DFT),______ \
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
15
keyboards/acr60/readme.md
Normal file
15
keyboards/acr60/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# ACR60
|
||||
|
||||

|
||||
|
||||
A customizable 60% keyboard based on the DZ60.
|
||||
|
||||
Keyboard Maintainer: QMK Community
|
||||
Hardware Supported: ACR60
|
||||
Hardware Availability: [mechkeysca](https://mechkeys.ca/products/acr60)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make acr60:default
|
||||
|
||||
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.
|
56
keyboards/acr60/rules.mk
Normal file
56
keyboards/acr60/rules.mk
Normal file
@@ -0,0 +1,56 @@
|
||||
# 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 = 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
|
@@ -30,24 +30,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
},
|
||||
|
||||
[KEYNAV] = {
|
||||
{KC_ESC, MEH(KC_A), RCTL(KC_Z), RCTL(KC_S), MEH(KC_B), KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, },
|
||||
{MEH(KC_C), MEH(KC_D), RSFT(KC_TAB), KC_TAB, MEH(KC_E), KC_TRNS, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), },
|
||||
{MEH(KC_F), MEH(KC_G), MEH(KC_H), MEH(KC_I), MEH(KC_J), KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, },
|
||||
{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, MEH(KC_F9), RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP, },
|
||||
{MEH(KC_F11), MEH(KC_F12), RSFT(KC_TAB), KC_TAB, MEH(KC_A), KC_TRNS, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), },
|
||||
{MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F), KC_TRNS, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), }
|
||||
},
|
||||
|
||||
[KEYSEL] = {
|
||||
{KC_TRNS, KC_TRNS, RCTL(KC_Z), RCTL(KC_S), KC_TRNS, KC_TRNS, KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), },
|
||||
{KC_TRNS, KC_TRNS, RSFT(KC_TAB), KC_TAB, KC_TRNS, KC_TRNS, RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RCTL(KC_C),RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), },
|
||||
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), }
|
||||
{MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS, KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), },
|
||||
{MEH(KC_L), MEH(KC_M),MEH(KC_N), MEH(KC_O), MEH(KC_P), KC_TRNS, RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), },
|
||||
{MEH(KC_Q), MEH(KC_R),MEH(KC_S), MEH(KC_T), MEH(KC_U), KC_TRNS, KC_TRNS, RCTL(KC_C),RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), },
|
||||
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), }
|
||||
},
|
||||
|
||||
[COMBINED] = {
|
||||
{KC_ESC, KC_LABK, KC_RABK, KC_DQUO, KC_GRAVE, KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, },
|
||||
{KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS, KC_TRNS, KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, },
|
||||
{KC_LCBR, KC_RCBR, KC_BSLS, KC_PIPE, KC_TILD, KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, },
|
||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_TRNS, KC_TRNS, }
|
||||
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, },
|
||||
{KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS, KC_TRNS, KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, },
|
||||
{KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_AMPR, KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, },
|
||||
{KC_TRNS, KC_TILD, KC_GRAVE, KC_CIRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_PIPE, KC_BSLS, }
|
||||
},
|
||||
|
||||
[MOUSE] = {
|
||||
|
62
keyboards/atreus62/keymaps/mfluid/keymap.c
Normal file
62
keyboards/atreus62/keymaps/mfluid/keymap.c
Normal file
@@ -0,0 +1,62 @@
|
||||
#include "atreus62.h"
|
||||
|
||||
#include "action_layer.h"
|
||||
|
||||
#define OOOOOOO KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = {
|
||||
{ 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 },
|
||||
{ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC },
|
||||
{ KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(1), KC_BSPC, KC_ENT, KC_SPC, MO(2), KC_DEL, KC_EQL, KC_LBRC, KC_RBRC }
|
||||
},
|
||||
|
||||
[1] = {
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______ },
|
||||
{ _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______ },
|
||||
{ _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PGUP },
|
||||
{ _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, KC_PGDN },
|
||||
{ _______, _______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______ }
|
||||
},
|
||||
|
||||
[2] = {
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______ },
|
||||
{ _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______ },
|
||||
{ _______, _______, KC_MPLY, KC_MRWD, KC_MFFD, _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, _______ },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, OOOOOOO, _______, _______, _______, _______ }
|
||||
},
|
||||
|
||||
[3] = {
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, KC_COPY, KC_PGUP, _______, _______, KC_PASTE, KC_DEL },
|
||||
{ _______, _______, _______, KC_PGDN, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______ },
|
||||
{ _______, _______, KC_CUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
||||
{ _______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
16
keyboards/atreus62/keymaps/mfluid/readme.md
Normal file
16
keyboards/atreus62/keymaps/mfluid/readme.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Mfluid Keymap for the Atreus62
|
||||
|
||||
## Program
|
||||
|
||||
`make atreus62:mfluid:avrdude`
|
||||
|
||||
## Layers
|
||||
|
||||
[0-default](https://i.imgur.com/dpBdPn8.png)
|
||||
|
||||
[1-numpad](https://i.imgur.com/JMN8Fk9.png)
|
||||
|
||||
[2-multimedia](https://i.imgur.com/ZCSzKsZ.png)
|
||||
|
||||
[3-vim](https://i.imgur.com/J15xCqW.png)
|
||||
|
@@ -4,5 +4,9 @@
|
||||
"bootloader": "atmel-dfu",
|
||||
"width": 16.5,
|
||||
"height": 5,
|
||||
"layouts": {"KEYMAP": [{"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": 12, "y": 0, "w": 1}, {"x": 13, "y": 0, "w": 1}, {"x": 14, "y": 0, "w": 1}, {"x": 15.5, "y": 0, "w": 1}, {"x": 0, "y": 1, "w": 1.5}, {"x": 1.5, "y": 1, "w": 1}, {"x": 2.5, "y": 1, "w": 1}, {"x": 3.5, "y": 1, "w": 1}, {"x": 4.5, "y": 1, "w": 1}, {"x": 5.5, "y": 1, "w": 1}, {"x": 6.5, "y": 1, "w": 1}, {"x": 7.5, "y": 1, "w": 1}, {"x": 8.5, "y": 1, "w": 1}, {"x": 9.5, "y": 1, "w": 1}, {"x": 10.5, "y": 1, "w": 1}, {"x": 11.5, "y": 1, "w": 1}, {"x": 12.5, "y": 1, "w": 1}, {"x": 13.5, "y": 1, "w": 1.5}, {"x": 15.5, "y": 1, "w": 1}, {"x": 0, "y": 2, "w": 1.75}, {"x": 1.75, "y": 2, "w": 1}, {"x": 2.75, "y": 2, "w": 1}, {"x": 3.75, "y": 2, "w": 1}, {"x": 4.75, "y": 2, "w": 1}, {"x": 5.75, "y": 2, "w": 1}, {"x": 6.75, "y": 2, "w": 1}, {"x": 7.75, "y": 2, "w": 1}, {"x": 8.75, "y": 2, "w": 1}, {"x": 9.75, "y": 2, "w": 1}, {"x": 10.75, "y": 2, "w": 1}, {"x": 11.75, "y": 2, "w": 1}, {"x": 12.75, "y": 2, "w": 1}, {"x": 13.75, "y": 2, "w": 1.25}, {"x": 0, "y": 3, "w": 1.25}, {"x": 1.25, "y": 3, "w": 1}, {"x": 2.25, "y": 3, "w": 1}, {"x": 3.25, "y": 3, "w": 1}, {"x": 4.25, "y": 3, "w": 1}, {"x": 5.25, "y": 3, "w": 1}, {"x": 6.25, "y": 3, "w": 1}, {"x": 7.25, "y": 3, "w": 1}, {"x": 8.25, "y": 3, "w": 1}, {"x": 9.25, "y": 3, "w": 1}, {"x": 10.25, "y": 3, "w": 1}, {"x": 11.25, "y": 3, "w": 1}, {"x": 12.25, "y": 3, "w": 1}, {"x": 13.25, "y": 3, "w": 1.25}, {"x": 14.5, "y": 3, "w": 1}, {"x": 0, "y": 4, "w": 1.25}, {"x": 1.25, "y": 4, "w": 1}, {"x": 2.25, "y": 4, "w": 1.25}, {"x": 3.5, "y": 4, "w": 1.25}, {"x": 4.75, "y": 4, "w": 2}, {"x": 6.75, "y": 4, "w": 2}, {"x": 8.75, "y": 4, "w": 1.25}, {"x": 10, "y": 4, "w": 1.25}, {"x": 11.25, "y": 4, "w": 1}, {"x": 12.25, "y": 4, "w": 1.25}, {"x": 13.5, "y": 4, "w": 1}, {"x": 14.5, "y": 4, "w": 1}, {"x": 15.5, "y": 4, "w": 1}]}
|
||||
"layouts": {
|
||||
"KEYMAP": {
|
||||
"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": 12.75, "y": 2, "w": 1, "label": "ISOHASH"}, {"x": 13.75, "y": 2, "w": 1.25, "label": "ENTER"}, {"x": 0, "y": 3, "w": 1.25, "label": "LSHIFT"}, {"x": 1.25, "y": 3, "w": 1, "label": "ISOBACKSLASH"}, {"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": 12.25, "y": 3, "w": 1, "label": "JPBACKSLASH"}, {"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"}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ This is a port of TMK's converter/terminal_usb to QMK.
|
||||
It supports PS/2 Scan Code Set 3 and runs on USB AVR chips such like PJRC Teensy.
|
||||
I tested the converter on ATMega32U4 with 1392595(102keys) and 6110345(122keys).
|
||||
|
||||
Source code: https://github.com/tmk/tmk_keyboard
|
||||
Source code: https://github.com/qmk/qmk_firmware.git
|
||||
Article: http://geekhack.org/index.php?topic=27272.0
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ And VCC and GND, of course. See RESOURCE for keyboard connector pin assign.
|
||||
|
||||
BUILD
|
||||
-----
|
||||
$ git clone https://github.com/tmk/tmk_keyboard.git
|
||||
$ cd converter/terminal_usb
|
||||
$ make
|
||||
$ git clone https://github.com/qmk/qmk_firmware.git
|
||||
$ cd qmk_firmware
|
||||
$ make converter/ibm_terminal:default
|
||||
|
||||
|
||||
RESOURCE
|
@@ -1,6 +1 @@
|
||||
#include "ibm_terminal.h"
|
||||
|
||||
// void matrix_init_kb(void) {
|
||||
|
||||
// matrix_init_user();
|
||||
// }
|
@@ -13,13 +13,18 @@ Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
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.
|
||||
|
||||
Note that you have to choose the right hardware variant as your subproject, otherwise you will probably have issues.
|
||||
|
||||
Troubleshooting & Known Issues
|
||||
------------------------------
|
||||
The Pro Micro variant runs at 8MHz, hence the following line in `usb_usb/rules.mk`:
|
||||
`F_CPU ?= 8000000`
|
||||
If the firmware doesn't work, try changing that line to
|
||||
`F_CPU ?= 16000000`
|
||||
or override the `F_CPU` variable in the `rules.mk` of your keymap.
|
||||
If something doesn't work, it's probably because of the CPU clock.
|
||||
Be sure to select the correct subproject (the middle part of the `make` argument) according to your hardware.
|
||||
If you are sure you have this correct, try changeing the default in `usb_usb/rules.mk` or overriding the value in the `rules.mk` of your keymap.
|
||||
|
||||
The Pro Micro variant uses a 3.3V Pro Micro and thus runs at 8MHz, hence the following line in `usb_usb/pro_micro/rules.mk`:
|
||||
`F_CPU = 8000000`
|
||||
The converter sold by Hasu runs at 16MHz and so the corresponding line in `usb_usb/hasu/rules.mk` is:
|
||||
`F_CPU = 16000000`
|
||||
|
||||
Getting the Hardware
|
||||
--------------------
|
||||
|
1
keyboards/converter/usb_usb/ble/ble.c
Normal file
1
keyboards/converter/usb_usb/ble/ble.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "ble.h"
|
6
keyboards/converter/usb_usb/ble/ble.h
Normal file
6
keyboards/converter/usb_usb/ble/ble.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef BLE_H
|
||||
#define BLE_H
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#endif
|
13
keyboards/converter/usb_usb/ble/config.h
Normal file
13
keyboards/converter/usb_usb/ble/config.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef CONFIG_BLE_H
|
||||
#define CONFIG_BLE_H
|
||||
|
||||
#undef PRODUCT
|
||||
#define PRODUCT QMK BLE Adapter
|
||||
#undef DESCRIPTION
|
||||
#define DESCRIPTION
|
||||
|
||||
// Turn off the mode leds on the BLE module
|
||||
#define ADAFRUIT_BLE_ENABLE_MODE_LEDS 0
|
||||
#define ADAFRUIT_BLE_ENABLE_POWER_LED 0
|
||||
|
||||
#endif
|
4
keyboards/converter/usb_usb/ble/rules.mk
Normal file
4
keyboards/converter/usb_usb/ble/rules.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
BLUETOOTH = AdafruitBLE
|
||||
ADAFRUIT_BLE_ENABLE = yes
|
||||
OPT_DEFS += -DCATERINA_BOOTLOADER
|
||||
F_CPU = 8000000
|
@@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// do not #include "config_common.h" because the pin names conflict with the USB HID code.
|
||||
// CUSTOM_MATRIX is defined it that file, though, and we need it, so we define it ourselves.
|
||||
// It's a hack, yeah...
|
||||
|
||||
#define CUSTOM_MATRIX 2
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
|
@@ -35,6 +35,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "host.h"
|
||||
#include "keyboard.h"
|
||||
|
||||
extern "C" {
|
||||
#include "quantum.h"
|
||||
}
|
||||
|
||||
/* KEY CODE to Matrix
|
||||
*
|
||||
@@ -62,7 +65,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
// Integrated key state of all keyboards
|
||||
static report_keyboard_t keyboard_report;
|
||||
static report_keyboard_t local_keyboard_report;
|
||||
|
||||
static bool matrix_is_mod = false;
|
||||
|
||||
@@ -98,13 +101,13 @@ extern "C"
|
||||
}
|
||||
|
||||
static void or_report(report_keyboard_t report) {
|
||||
// integrate reports into keyboard_report
|
||||
keyboard_report.mods |= report.mods;
|
||||
// integrate reports into local_keyboard_report
|
||||
local_keyboard_report.mods |= report.mods;
|
||||
for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
|
||||
if (IS_ANY(report.keys[i])) {
|
||||
for (uint8_t j = 0; j < KEYBOARD_REPORT_KEYS; j++) {
|
||||
if (! keyboard_report.keys[j]) {
|
||||
keyboard_report.keys[j] = report.keys[i];
|
||||
if (! local_keyboard_report.keys[j]) {
|
||||
local_keyboard_report.keys[j] = report.keys[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -130,7 +133,7 @@ extern "C"
|
||||
last_time_stamp4 = kbd_parser4.time_stamp;
|
||||
|
||||
// clear and integrate all reports
|
||||
keyboard_report = {};
|
||||
local_keyboard_report = {};
|
||||
or_report(kbd_parser1.report);
|
||||
or_report(kbd_parser2.report);
|
||||
or_report(kbd_parser3.report);
|
||||
@@ -138,9 +141,9 @@ extern "C"
|
||||
|
||||
matrix_is_mod = true;
|
||||
|
||||
dprintf("state: %02X %02X", keyboard_report.mods, keyboard_report.reserved);
|
||||
dprintf("state: %02X %02X", local_keyboard_report.mods, local_keyboard_report.reserved);
|
||||
for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
|
||||
dprintf(" %02X", keyboard_report.keys[i]);
|
||||
dprintf(" %02X", local_keyboard_report.keys[i]);
|
||||
}
|
||||
dprint("\r\n");
|
||||
} else {
|
||||
@@ -177,12 +180,12 @@ extern "C"
|
||||
uint8_t code = CODE(row, col);
|
||||
|
||||
if (IS_MOD(code)) {
|
||||
if (keyboard_report.mods & ROW_BITS(code)) {
|
||||
if (local_keyboard_report.mods & ROW_BITS(code)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
|
||||
if (keyboard_report.keys[i] == code) {
|
||||
if (local_keyboard_report.keys[i] == code) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -192,14 +195,14 @@ extern "C"
|
||||
matrix_row_t matrix_get_row(uint8_t row) {
|
||||
uint16_t row_bits = 0;
|
||||
|
||||
if (IS_MOD(CODE(row, 0)) && keyboard_report.mods) {
|
||||
row_bits |= keyboard_report.mods;
|
||||
if (IS_MOD(CODE(row, 0)) && local_keyboard_report.mods) {
|
||||
row_bits |= local_keyboard_report.mods;
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
|
||||
if (IS_ANY(keyboard_report.keys[i])) {
|
||||
if (row == ROW(keyboard_report.keys[i])) {
|
||||
row_bits |= ROW_BITS(keyboard_report.keys[i]);
|
||||
if (IS_ANY(local_keyboard_report.keys[i])) {
|
||||
if (row == ROW(local_keyboard_report.keys[i])) {
|
||||
row_bits |= ROW_BITS(local_keyboard_report.keys[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,9 +212,9 @@ extern "C"
|
||||
uint8_t matrix_key_count(void) {
|
||||
uint8_t count = 0;
|
||||
|
||||
count += bitpop(keyboard_report.mods);
|
||||
count += bitpop(local_keyboard_report.mods);
|
||||
for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
|
||||
if (IS_ANY(keyboard_report.keys[i])) {
|
||||
if (IS_ANY(local_keyboard_report.keys[i])) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
@@ -233,6 +236,7 @@ extern "C"
|
||||
kbd2.SetReport(0, 0, 2, 0, 1, &usb_led);
|
||||
kbd3.SetReport(0, 0, 2, 0, 1, &usb_led);
|
||||
kbd4.SetReport(0, 0, 2, 0, 1, &usb_led);
|
||||
led_set_kb(usb_led);
|
||||
}
|
||||
|
||||
};
|
||||
|
1
keyboards/converter/usb_usb/hasu/hasu.c
Normal file
1
keyboards/converter/usb_usb/hasu/hasu.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "hasu.h"
|
6
keyboards/converter/usb_usb/hasu/hasu.h
Normal file
6
keyboards/converter/usb_usb/hasu/hasu.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef HASU_H
|
||||
#define HASU_H
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#endif
|
1
keyboards/converter/usb_usb/hasu/rules.mk
Normal file
1
keyboards/converter/usb_usb/hasu/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
F_CPU = 16000000
|
@@ -3,13 +3,4 @@
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#undef PRODUCT
|
||||
#define PRODUCT QMK BLE Adapter
|
||||
#undef DESCRIPTION
|
||||
#define DESCRIPTION
|
||||
|
||||
// Turn off the mode leds on the BLE module
|
||||
#define ADAFRUIT_BLE_ENABLE_MODE_LEDS 0
|
||||
#define ADAFRUIT_BLE_ENABLE_POWER_LED 0
|
||||
|
||||
#endif
|
||||
|
@@ -1,3 +0,0 @@
|
||||
BLUETOOTH = AdafruitBLE
|
||||
ADAFRUIT_BLE_ENABLE = yes
|
||||
OPT_DEFS += -DCATERINA_BOOTLOADER
|
1
keyboards/converter/usb_usb/pro_micro/pro_micro.c
Normal file
1
keyboards/converter/usb_usb/pro_micro/pro_micro.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "pro_micro.h"
|
6
keyboards/converter/usb_usb/pro_micro/pro_micro.h
Normal file
6
keyboards/converter/usb_usb/pro_micro/pro_micro.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef PRO_MICRO_H
|
||||
#define PRO_MICRO_H
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#endif
|
1
keyboards/converter/usb_usb/pro_micro/rules.mk
Normal file
1
keyboards/converter/usb_usb/pro_micro/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
F_CPU = 8000000
|
@@ -13,7 +13,15 @@ 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
|
||||
|
||||
# Since there are different hardware variations of these adapters and since these
|
||||
# have different CPU clocks, the clock speed should be set in the rules.mk file of the
|
||||
# respective hardware variantion (i.e. subproject). For example, in /pro_micro/rules.mk
|
||||
# this is set to 8000000.
|
||||
# The value here is only a fallback and is ignored if it is defined in the subproject.
|
||||
F_CPU ?= 16000000
|
||||
|
||||
DEFAULT_FOLDER = converter/usb_usb/hasu
|
||||
|
||||
|
||||
#
|
||||
|
@@ -1 +1 @@
|
||||
#include "usb_usb.h"
|
||||
#include "usb_usb.h"
|
||||
|
@@ -1,9 +1,28 @@
|
||||
#include "dz60.h"
|
||||
#include "led.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// Keyboard start-up code goes here
|
||||
// Runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
led_init_ports();
|
||||
};
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// Looping keyboard code goes here
|
||||
// This runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
};
|
||||
|
||||
void led_init_ports(void) {
|
||||
// Set caps lock LED pin as output
|
||||
DDRB |= (1 << 2);
|
||||
// Default to off
|
||||
PORTB |= (1 << 2);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
||||
} else {
|
||||
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
||||
}
|
||||
}
|
||||
// Code for caps lock LED as reported by the OS
|
||||
// Set this per keymap, instead of globally
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
@@ -92,4 +92,4 @@ ONEHAND_ENABLE = no # Disable Onehand
|
||||
RGBLIGHT_ENABLE = no
|
||||
MIDI_ENABLE = no
|
||||
|
||||
LAYOUTS = ergodox ergodox_80
|
||||
LAYOUTS = ergodox
|
||||
|
@@ -87,6 +87,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define USB_MAX_POWER_CONSUMPTION 500
|
||||
|
||||
// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
|
||||
/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_3 0x00, 0xFF, 0x00 */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_4 0xFF, 0xFF, 0x00 */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_5 0x00, 0xFF, 0xFF */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_6 0xFF, 0x00, 0xFF */
|
||||
/* #define RGBLIGHT_COLOR_LAYER_7 0xFF, 0xFF, 0xFF */
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
|
@@ -194,30 +194,82 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_0
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
};
|
||||
|
||||
// Runs whenever there is a layer state change.
|
||||
uint32_t layer_state_set_user(uint32_t 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 SYMB:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case MDIA:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
uint8_t layer = biton32(state);
|
||||
switch (layer) {
|
||||
case 0:
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_0
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
|
||||
#else
|
||||
rgblight_init();
|
||||
#endif
|
||||
break;
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_1
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_2
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
|
||||
#endif
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_3
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
|
||||
#endif
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_4
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
|
||||
#endif
|
||||
break;
|
||||
case 5:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_5
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
|
||||
#endif
|
||||
break;
|
||||
case 6:
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_6
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
|
||||
#endif
|
||||
break;
|
||||
case 7:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef RGBLIGHT_COLOR_LAYER_7
|
||||
rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return state;
|
||||
};
|
||||
|
@@ -1,16 +0,0 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
#include "../../config.h"
|
||||
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLIGHT_SAT_STEP
|
||||
#define RGBLIGHT_SAT_STEP 12
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 7
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#endif
|
@@ -1,832 +0,0 @@
|
||||
/*
|
||||
This is the keymap for the keyboard
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
Copyright 2017 Art Ortenburger
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
#include "keymap_german.h"
|
||||
|
||||
#include "keymap_nordic.h"
|
||||
|
||||
// Define layer names
|
||||
#define QWERTY 0
|
||||
#define COLEMAK 1
|
||||
#define DVORAK 2
|
||||
#define WORKMAN 3
|
||||
#define SYMB 8
|
||||
#define OVERWATCH 9
|
||||
#define DIABLO 10
|
||||
#define MOUS 12
|
||||
|
||||
//Leader Key stuff
|
||||
#ifdef LEADER_TIMEOUT
|
||||
#undef LEADER_TIMEOUT
|
||||
#endif
|
||||
#define LEADER_TIMEOUT 1500
|
||||
|
||||
//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 layer change stuff for underglow indicator
|
||||
bool skip_leds = false;
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF);
|
||||
#define rgblight_set_red rgblight_sethsv (0x00, 0xFF, 0xFF);
|
||||
#define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF);
|
||||
#define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF);
|
||||
#define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF);
|
||||
#define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF);
|
||||
#define rgblight_set_yellow rgblight_sethsv (0x3C, 0xFF, 0xFF);
|
||||
#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF);
|
||||
#endif
|
||||
|
||||
//define diablo macro timer variables
|
||||
static uint16_t diablo_timer[4];
|
||||
static uint8_t diablo_times[] = {0, 1, 3, 5, 10, 30};
|
||||
static uint8_t diablo_key_time[4];
|
||||
|
||||
bool check_dtimer(uint8_t dtimer) {
|
||||
// has the correct number of seconds elapsed (as defined by diablo_times)
|
||||
return (timer_elapsed(diablo_timer[dtimer]) < ( diablo_key_time[dtimer] * 1000 ) ) ? false : true;
|
||||
};
|
||||
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD,
|
||||
RGB_0000FF,
|
||||
RGB_008000,
|
||||
RGB_FF0000,
|
||||
RGB_800080,
|
||||
RGB_00FF90,
|
||||
KC_DIABLO_CLEAR,
|
||||
KC_QWERTY,
|
||||
KC_COLEMAK,
|
||||
KC_DVORAK,
|
||||
KC_WORKMAN,
|
||||
KC_MAKEQMK
|
||||
};
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
enum {
|
||||
TD_FLSH = 0,
|
||||
TD_DIABLO_1,
|
||||
TD_DIABLO_2,
|
||||
TD_DIABLO_3,
|
||||
TD_DIABLO_4
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// on each tap, light up one led, from right to left
|
||||
// on the forth tap, turn them off from right to left
|
||||
|
||||
void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (!skip_leds) {
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
skip_leds = true;
|
||||
}
|
||||
switch (state->count) {
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// on the fourth tap, set the keyboard on flash state
|
||||
// and set the underglow to red, because red == bad
|
||||
void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count >= 4) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0xff,0x00,0x00);
|
||||
#endif
|
||||
reset_tap_dance(state);
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
// 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];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
// if the flash state didnt happen, then turn off leds, left to right
|
||||
void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_3_off();
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(500);
|
||||
skip_leds = false;
|
||||
}
|
||||
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
//Once for Blue, Twice for Green, Thrice for Red, and four to flash
|
||||
[TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED (dance_flsh_each, dance_flsh_finished, dance_flsh_reset),
|
||||
// tap once to disable, and more to enable timed micros
|
||||
[TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
|
||||
[TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
|
||||
[TD_DIABLO_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
|
||||
[TD_DIABLO_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | Q | W | E | R | T | TG(3)| |TG(3) | Y | U | I | O | P | \ | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " |
|
||||
* |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------|
|
||||
* | Shift | Z | X | C | V | B | | | | N | M | , < | . > | ? / | Shift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | `/SYM| ' " | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,--------------. ,--------------.
|
||||
* |Alt/Ap| Win | | Alt |Ctl/Esc|
|
||||
* ,------|------|-------| |------+-------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space| Bksp |-------| |------| DEL |Enter |
|
||||
* | | | End | | PgDn | | |
|
||||
* `---------------------' `---------------------'
|
||||
*/
|
||||
[QWERTY] = KEYMAP(
|
||||
KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(DIABLO),
|
||||
KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSHIFT, LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH),
|
||||
LT(SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
|
||||
ALT_T(KC_APPLICATION), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPACE, KC_BSPACE, KC_END,
|
||||
|
||||
TG(MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
|
||||
TG(DIABLO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_QUOTE),
|
||||
TG(OVERWATCH), KC_N, KC_M, KC_COMMA, KC_DOT, RCTL_T(KC_SLASH),KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(SYMB),
|
||||
KC_LEAD, CTL_T(KC_ESCAPE),
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' |
|
||||
* |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[COLEMAK] = KEYMAP(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(DIABLO),
|
||||
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(OVERWATCH),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
TG(MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(DIABLO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||
KC_H, KC_N, KC_E, KC_I, KC_O, GUI_T(KC_QUOTE),
|
||||
TG(OVERWATCH),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | O | E | U | I |------| |------| D | H | T | N |S / L2| - |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |:/Ctrl| Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[DVORAK] = KEYMAP(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS),
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(DIABLO),
|
||||
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_LSFT, LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(OVERWATCH),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET, KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
TG(MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
TG(DIABLO), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||
TG(OVERWATCH),KC_B, KC_M, KC_W, KC_V, RCTL_T(KC_Z), KC_RSHIFT,
|
||||
KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, TT(SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' |
|
||||
* |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[WORKMAN] = KEYMAP(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(MOUS),
|
||||
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, TG(DIABLO),
|
||||
KC_BSPC, KC_A, KC_S, KC_H, KC_T, KC_G,
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V, TG(OVERWATCH),
|
||||
LT(SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
TG(MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(DIABLO), KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
|
||||
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE,
|
||||
TG(OVERWATCH),KC_K, KC_L, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
),
|
||||
|
||||
/* Keymap 3: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | VERSION| ! | @ | { | } | | | | | | + | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | MAKE | # | $ | ( | ) | ` |------| |------| - | 4 | 5 | 6 | / | PrtSc |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | RESET | % | ^ | [ | ] | ~ | | | | NUM | 1 | 2 | 3 | = | PAUSE |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LT0 | & | * | : | ; | | | 0 | NUM. | ENT | ENT |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | RGBM | RED | | OFF | SOLID|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | GREEN| | | | |
|
||||
* | RGB | RGB |------| |------| NUM0 | NUME |
|
||||
* | DARK |BRITE | BLUE | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[SYMB] = KEYMAP(
|
||||
KC_ESCAPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_WORKMAN,
|
||||
VRSN, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_DVORAK,
|
||||
KC_MAKEQMK, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE,
|
||||
TD(TD_FLSH), KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK,
|
||||
KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_DVORAK, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12,
|
||||
KC_KP_MINUS,KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_SLASH, KC_PSCREEN,
|
||||
KC_COLEMAK, KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, KC_PAUSE,
|
||||
KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_TRNS,
|
||||
RGB_TOG, RGB_SLD,
|
||||
KC_NO,
|
||||
KC_KP_DOT, KC_KP_0, KC_KP_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 4: Customized Overwatch Layout
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | | | | | | | | | F9 | F10 | F11 | F12 | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | F1 | K | Q | W | E | R | T | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | TAB | G | A | S | D | F |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | LCTR | LSHFT| Z | X | C | V | | | | N | M | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | J | U | I | Y | T | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | O | P | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | LGUI | | | | |
|
||||
* | V | SPACE|------ |------| | Enter|
|
||||
* | | | H | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[OVERWATCH] = KEYMAP(
|
||||
KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F,
|
||||
KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS,
|
||||
KC_G, KC_U, KC_I, KC_Y, KC_T,
|
||||
KC_O, KC_P,
|
||||
KC_LGUI,
|
||||
KC_V, KC_SPACE, KC_H,
|
||||
|
||||
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||
KC_NO, 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(OVERWATCH), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 3:
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | V | D | ALT | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | S | I | F | M | T | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Q | 1 | 2 | 3 | 4 | G |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | NUMLOCK| NUM1 | NUM2 | NUM3 | NUM4 | Z | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LCTL | MAC1 | MAC2 | MAC3 | MAC4 | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | L | J | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | G | | | | |
|
||||
* | SPACE| Q |------ |------| | |
|
||||
* | SHIFT| ALT | 0MAC | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[DIABLO] = KEYMAP(
|
||||
KC_ESCAPE, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO,
|
||||
KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_TRNS,
|
||||
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G,
|
||||
KC_LCTL, TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), KC_Z, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_L, KC_J,
|
||||
KC_F,
|
||||
SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR,
|
||||
|
||||
|
||||
|
||||
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, 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_NO, KC_NO,
|
||||
KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 4: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | MsUp | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | |MsLeft|MsDown|MsRght| | |------| |------| | | Acc0 | Acc1 | Acc2 | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | Acc0 | Acc1 | Acc2 | | | | | | | Mute |VolDn |VolUp | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | Play | Stop | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | MWUp | | | | |
|
||||
* | Lclk | Rclk |------| |------| MBn4 | MBn5 |
|
||||
* | | | MWDn | | Mclk | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[MOUS] = KEYMAP(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
|
||||
KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_WH_U,
|
||||
KC_BTN1, KC_BTN2, KC_WH_D,
|
||||
|
||||
KC_TRNS, 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_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO,KC_NO,
|
||||
KC_NO,
|
||||
KC_MS_BTN3,KC_MS_BTN4,KC_MS_BTN5
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
|
||||
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) {
|
||||
#ifdef CONSOLE_ENABLE
|
||||
xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.col, record->event.key.row, record->event.pressed);
|
||||
#endif
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
case EPRM:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_init();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
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;
|
||||
|
||||
case RGB_0000FF:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0x00,0x00,0xff);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case RGB_008000:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0x00,0x80,0x00);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case RGB_FF0000:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0xff,0x00,0x00);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case RGB_800080:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0x80,0x00,0x80);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
case RGB_00FF90:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0x00,0xff,0x90);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_DIABLO_CLEAR: // reset all Diable timers, disabling them
|
||||
if (record->event.pressed) {
|
||||
uint8_t dtime;
|
||||
|
||||
for (dtime = 0; dtime < 4; dtime++) {
|
||||
diablo_key_time[dtime] = diablo_times[0];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_QWERTY:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL << QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL << COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_DVORAK:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL << DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_WORKMAN:
|
||||
if (record->event.pressed) {
|
||||
persistent_default_layer_set(1UL << WORKMAN);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_MAKEQMK:
|
||||
if (!record->event.pressed) {
|
||||
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP ":teensy"SS_TAP(X_ENTER));
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
|
||||
// Sends the key press to system, but only if on the Diablo layer
|
||||
void send_diablo_keystroke (uint8_t diablo_key) {
|
||||
if (biton32(layer_state) == DIABLO) {
|
||||
switch (diablo_key) {
|
||||
case 0:
|
||||
SEND_STRING("1");
|
||||
break;
|
||||
case 1:
|
||||
SEND_STRING("2");
|
||||
break;
|
||||
case 2:
|
||||
SEND_STRING("3");
|
||||
break;
|
||||
case 3:
|
||||
SEND_STRING("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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void matrix_init_user(void) { // Runs boot tasks for keyboard
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
uint8_t default_layer = eeconfig_read_default_layer();
|
||||
|
||||
rgblight_enable();
|
||||
if (default_layer & (1UL << COLEMAK)) {
|
||||
rgblight_set_magenta;
|
||||
}
|
||||
else if (default_layer & (1UL << DVORAK)) {
|
||||
rgblight_set_green;
|
||||
}
|
||||
else if (default_layer & (1UL << WORKMAN)) {
|
||||
rgblight_set_purple;
|
||||
}
|
||||
else {
|
||||
rgblight_set_teal;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) { // runs frequently to update info
|
||||
uint8_t modifiders = get_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, independantly.
|
||||
if ( modifiders & MODS_SHIFT_MASK) {
|
||||
ergodox_right_led_2_on();
|
||||
}
|
||||
if ( modifiders & MODS_CTRL_MASK) {
|
||||
ergodox_right_led_1_on();
|
||||
}
|
||||
if ( modifiders & MODS_ALT_MASK) {
|
||||
ergodox_right_led_3_on();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Run Diablo 3 macro checking code.
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
run_diablo_macro_check();
|
||||
#endif
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
SEQ_ONE_KEY(KC_C) {
|
||||
SEND_STRING("Covecube");
|
||||
}
|
||||
SEQ_ONE_KEY(KC_D) {
|
||||
SEND_STRING("StableBit CloudDrive");
|
||||
}
|
||||
SEQ_ONE_KEY(KC_L) {
|
||||
register_code(KC_LGUI);
|
||||
register_code(KC_L);
|
||||
unregister_code(KC_L);
|
||||
unregister_code(KC_LGUI);
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_S, KC_D) {
|
||||
SEND_STRING("StableBit DrivePool");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_S, KC_C) {
|
||||
SEND_STRING("StableBit Scanner");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_S, KC_T) {
|
||||
SEND_STRING("StableBit Troubleshooter");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
uint32_t layer_state_set_kb(uint32_t state) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
uint8_t default_layer = eeconfig_read_default_layer();
|
||||
|
||||
switch (biton32(state)) {
|
||||
case SYMB:
|
||||
rgblight_set_blue;
|
||||
rgblight_mode(2);
|
||||
break;
|
||||
case OVERWATCH:
|
||||
rgblight_set_orange;
|
||||
rgblight_mode(17);
|
||||
break;
|
||||
case DIABLO:
|
||||
rgblight_set_red;
|
||||
rgblight_mode(5);
|
||||
break;
|
||||
case MOUS:
|
||||
rgblight_set_yellow;
|
||||
rgblight_mode(1);
|
||||
break;
|
||||
default:
|
||||
if (default_layer & (1UL << COLEMAK)) {
|
||||
rgblight_set_green;
|
||||
}
|
||||
else if (default_layer & (1UL << DVORAK)) {
|
||||
rgblight_set_magenta;
|
||||
}
|
||||
else if (default_layer & (1UL << WORKMAN)) {
|
||||
rgblight_set_purple;
|
||||
}
|
||||
else {
|
||||
rgblight_set_teal;
|
||||
}
|
||||
rgblight_mode(1);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return state;
|
||||
}
|
@@ -1,13 +0,0 @@
|
||||
TAP_DANCE_ENABLE = yes
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
RGBLIGHT_ENABLE = yes
|
||||
MIDI_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
LEADER_KEYS = no
|
||||
|
||||
EXTRAFLAGS = -flto
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@@ -1,11 +1,17 @@
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
#include "../../config.h"
|
||||
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
// make this easy to toggle behavior, so that it can be more easily toggled
|
||||
#define LAYER_UNDERGLOW_LIGHTING
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLIGHT_SAT_STEP
|
||||
#define RGBLIGHT_SAT_STEP 12
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 7
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 7
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
#undef RGBLIGHT_ANIMATIONS
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -1,194 +1,574 @@
|
||||
/*
|
||||
This is the keymap for the keyboard
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
Copyright 2017 Art Ortenburger
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "drashna.h"
|
||||
|
||||
#include "keymap_german.h"
|
||||
|
||||
#include "keymap_nordic.h"
|
||||
|
||||
#define VERSION M(0)
|
||||
|
||||
|
||||
// Define layer names
|
||||
#define BASE 0
|
||||
#define SYMB 1
|
||||
#define MOUS 2
|
||||
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
#define rgblight_set_teal rgblight_setrgb(0x00, 0xFF, 0xFF)
|
||||
#define rgblight_set_red rgblight_setrgb(0xFF, 0x00, 0x00)
|
||||
#define rgblight_set_blue rgblight_setrgb(0x00, 0xFF, 0x00);
|
||||
#define rgblight_set_green rgblight_setrgb(0x00, 0x00, 0xFF);
|
||||
#define rgblight_set_yellow rgblight_setrgb(0xFF, 0xFF, 0x00);
|
||||
//define layer change stuff for underglow indicator
|
||||
bool skip_leds = false;
|
||||
|
||||
|
||||
#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))
|
||||
#endif
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
|
||||
//define diablo macro timer variables
|
||||
static uint16_t diablo_timer[4];
|
||||
static uint8_t diablo_times[] = { 0, 1, 3, 5, 10, 30 };
|
||||
static uint8_t diablo_key_time[4];
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
EPRM,
|
||||
VRSN,
|
||||
#ifndef LAYER_UNDERGLOW_LIGHTING
|
||||
RGB_SLD,
|
||||
#endif
|
||||
bool check_dtimer(uint8_t dtimer) {
|
||||
// has the correct number of seconds elapsed (as defined by diablo_times)
|
||||
return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = KEYMAP(KC_EQUAL,KC_1,KC_2,KC_3,KC_4,KC_5,KC_LEFT,KC_DELETE,KC_Q,KC_W,KC_E,KC_R,KC_T,TG(1),KC_BSPACE,KC_A,KC_S,KC_D,KC_F,KC_G,KC_LSHIFT,CTL_T(KC_Z),KC_X,KC_C,KC_V,KC_B,ALL_T(KC_NO),LT(1,KC_GRAVE),KC_QUOTE,LALT(KC_LSHIFT),KC_LEFT,KC_RIGHT,ALT_T(KC_APPLICATION),KC_LGUI,KC_HOME,KC_SPACE,KC_BSPACE,KC_END,KC_RIGHT,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINUS,TG(1),KC_Y,KC_U,KC_I,KC_O,KC_P,KC_BSLASH,KC_H,KC_J,KC_K,KC_L,LT(2,KC_SCOLON),GUI_T(KC_QUOTE),MEH_T(KC_NO),KC_N,KC_M,KC_COMMA,KC_DOT,CTL_T(KC_SLASH),KC_RSHIFT,KC_UP,KC_DOWN,KC_LBRACKET,KC_RBRACKET,MO(1),KC_LALT,CTL_T(KC_ESCAPE),KC_PGUP,KC_PGDOWN,KC_TAB,KC_ENTER),
|
||||
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
[1] = KEYMAP(KC_ESCAPE,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_TRANSPARENT,VERSION,KC_EXLM,KC_AT,KC_LCBR,KC_RCBR,KC_PIPE,KC_TRANSPARENT,VRSN,KC_HASH,KC_DLR,KC_LPRN,KC_RPRN,KC_GRAVE,RESET,KC_PERC,KC_CIRC,KC_LBRACKET,KC_RBRACKET,KC_TILD,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,RGB_VAD,RGB_VAI,KC_TRANSPARENT,KC_TRANSPARENT,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_TRANSPARENT,KC_UP,KC_7,KC_8,KC_9,KC_ASTR,KC_F12,KC_DOWN,KC_4,KC_5,KC_6,KC_PLUS,KC_TRANSPARENT,KC_TRANSPARENT,KC_AMPR,KC_1,KC_2,KC_3,KC_BSLASH,KC_TRANSPARENT,KC_TRANSPARENT,KC_DOT,KC_0,KC_EQUAL,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT),
|
||||
#else
|
||||
[1] = KEYMAP(KC_ESCAPE,KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_TRANSPARENT,VERSION,KC_EXLM,KC_AT,KC_LCBR,KC_RCBR,KC_PIPE,KC_TRANSPARENT,VRSN,KC_HASH,KC_DLR,KC_LPRN,KC_RPRN,KC_GRAVE,RESET,KC_PERC,KC_CIRC,KC_LBRACKET,KC_RBRACKET,KC_TILD,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,RGB_MOD,KC_TRANSPARENT,KC_TRANSPARENT,RGB_VAD,RGB_VAI,KC_TRANSPARENT,KC_TRANSPARENT,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_TRANSPARENT,KC_UP,KC_7,KC_8,KC_9,KC_ASTR,KC_F12,KC_DOWN,KC_4,KC_5,KC_6,KC_PLUS,KC_TRANSPARENT,KC_TRANSPARENT,KC_AMPR,KC_1,KC_2,KC_3,KC_BSLASH,KC_TRANSPARENT,KC_TRANSPARENT,KC_DOT,KC_0,KC_EQUAL,KC_TRANSPARENT,RGB_TOG,RGB_SLD,KC_TRANSPARENT,KC_TRANSPARENT,RGB_HUD,RGB_HUI),
|
||||
#endif
|
||||
|
||||
[2] = KEYMAP(KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_UP,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MS_BTN1,KC_MS_BTN2,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PLAY_PAUSE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_MEDIA_PREV_TRACK,KC_MEDIA_NEXT_TRACK,KC_TRANSPARENT,KC_TRANSPARENT,KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_AUDIO_MUTE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_WWW_BACK),
|
||||
|
||||
enum {
|
||||
TD_FLSH = 0,
|
||||
TD_DIABLO_1,
|
||||
TD_DIABLO_2,
|
||||
TD_DIABLO_3,
|
||||
TD_DIABLO_4
|
||||
};
|
||||
|
||||
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)
|
||||
{
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
case EPRM:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_init();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case VRSN:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
#ifndef LAYER_UNDERGLOW_LIGHTING
|
||||
case RGB_SLD:
|
||||
if (record->event.pressed) {
|
||||
rgblight_mode(1);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
#endif
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
rgblight_enable();
|
||||
rgblight_set_teal;
|
||||
rgblight_mode(1);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
// on each tap, light up one led, from right to left
|
||||
// on the forth tap, turn them off from right to left
|
||||
|
||||
void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (!skip_leds) {
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
uint8_t modifiders = get_mods();
|
||||
|
||||
if ( modifiders & MODS_SHIFT_MASK) {
|
||||
ergodox_right_led_1_on();
|
||||
}
|
||||
if ( modifiders & MODS_CTRL_MASK) {
|
||||
ergodox_right_led_2_on();
|
||||
}
|
||||
if ( modifiders & MODS_ALT_MASK) {
|
||||
ergodox_right_led_3_on();
|
||||
}
|
||||
#else
|
||||
uint8_t layer = biton32(layer_state);
|
||||
switch (layer) {
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 5:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 6:
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 7:
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
skip_leds = true;
|
||||
}
|
||||
switch (state->count) {
|
||||
case 1:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case 2:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case 4:
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// on the fourth tap, set the keyboard on flash state
|
||||
// and set the underglow to red, because red == bad
|
||||
void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||
if (state->count >= 4) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0xff, 0x00, 0x00);
|
||||
#endif
|
||||
reset_tap_dance(state);
|
||||
reset_keyboard();
|
||||
}
|
||||
}
|
||||
|
||||
// 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];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
// if the flash state didnt happen, then turn off leds, left to right
|
||||
void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_3_off();
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(200);
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(500);
|
||||
skip_leds = false;
|
||||
}
|
||||
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
//Once for Blue, Twice for Green, Thrice for Red, and four to flash
|
||||
[TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED(dance_flsh_each, dance_flsh_finished, dance_flsh_reset),
|
||||
// tap once to disable, and more to enable timed micros
|
||||
[TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
|
||||
[TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
|
||||
[TD_DIABLO_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
|
||||
[TD_DIABLO_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | Q | W | E | R | T | TG(3)| |TG(3) | Y | U | I | O | P | \ | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " |
|
||||
* |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------|
|
||||
* | Shift | Z | X | C | V | B | | | | N | M | , < | . > | ? / | Shift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | `/SYM| ' " | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,--------------. ,--------------.
|
||||
* |Alt/Ap| Win | | Alt |Ctl/Esc|
|
||||
* ,------|------|-------| |------+-------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space| Bksp |-------| |------| DEL |Enter |
|
||||
* | | | End | | PgDn | | |
|
||||
* `---------------------' `---------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ergodox(
|
||||
KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(_DIABLO),
|
||||
KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSHIFT, LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(_OVERWATCH),
|
||||
LT(_SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
|
||||
ALT_T(KC_APPLICATION), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPACE, KC_BSPACE, KC_END,
|
||||
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
|
||||
TG(_DIABLO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_QUOTE),
|
||||
TG(_OVERWATCH), KC_N, KC_M, KC_COMMA, KC_DOT, RCTL_T(KC_SLASH),KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
||||
KC_PGUP,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' |
|
||||
* |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[_COLEMAK] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(_OVERWATCH),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||
KC_H, KC_N, KC_E, KC_I, KC_O, GUI_T(KC_QUOTE),
|
||||
TG(_OVERWATCH),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | O | E | U | I |------| |------| D | H | T | N |S / L2| - |
|
||||
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |:/Ctrl| Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[_DVORAK] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_LSFT, LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(_OVERWATCH),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET, KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
TG(_DIABLO), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||
TG(_OVERWATCH),KC_B, KC_M, KC_W, KC_V, RCTL_T(KC_Z), KC_RSHIFT,
|
||||
KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
),
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' |
|
||||
* |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | App | LGui | | Alt |Ctrl/Esc|
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | | Home | | PgUp | | |
|
||||
* | Space|Backsp|------| |------| Tab |Enter |
|
||||
* | |ace | End | | PgDn | | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
|
||||
// Otherwise, it needs KC_*
|
||||
[_WORKMAN] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_S, KC_H, KC_T, KC_G,
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V, TG(_OVERWATCH),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
KC_SPC,KC_BSPC,KC_END,
|
||||
// right hand
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
|
||||
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE,
|
||||
TG(_OVERWATCH),KC_K, KC_L, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
KC_PGDN,KC_DELETE, KC_ENT
|
||||
),
|
||||
|
||||
/* Keymap 3: Symbol Layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | VERSION| ! | @ | { | } | | | | | | + | 7 | 8 | 9 | * | F12 |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | MAKE | # | $ | ( | ) | ` |------| |------| - | 4 | 5 | 6 | / | PrtSc |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | RESET | % | ^ | [ | ] | ~ | | | | NUM | 1 | 2 | 3 | = | PAUSE |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LT0 | & | * | : | ; | | | 0 | NUM. | ENT | ENT |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | RGBM | RED | | OFF | SOLID|
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | GREEN| | | | |
|
||||
* | RGB | RGB |------| |------| NUM0 | NUME |
|
||||
* | DARK |BRITE | BLUE | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_SYMB] = LAYOUT_ergodox(
|
||||
KC_ESCAPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_WORKMAN,
|
||||
VRSN, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_DVORAK,
|
||||
KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE,
|
||||
KC_RESET, KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK,
|
||||
KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
|
||||
KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
KC_DVORAK, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12,
|
||||
KC_KP_MINUS,KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_SLASH, KC_PSCREEN,
|
||||
KC_COLEMAK, KC_NUMLOCK, KC_KP_1, KC_KP_2, KC_KP_3, KC_EQUAL, KC_PAUSE,
|
||||
KC_KP_0, KC_KP_0, KC_KP_DOT, KC_KP_ENTER, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_KP_DOT, KC_KP_0, KC_KP_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 4: Customized Overwatch Layout
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | | | | | | | | | F9 | F10 | F11 | F12 | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | F1 | K | Q | W | E | R | T | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | TAB | G | A | S | D | F |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | LCTR | LSHFT| Z | X | C | V | | | | N | M | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | J | U | I | Y | T | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | O | P | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | LGUI | | | | |
|
||||
* | V | SPACE|------ |------| | Enter|
|
||||
* | | | H | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_OVERWATCH] = LAYOUT_ergodox(
|
||||
KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F,
|
||||
KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS,
|
||||
KC_G, KC_U, KC_I, KC_Y, KC_T,
|
||||
KC_O, KC_P,
|
||||
KC_LGUI,
|
||||
KC_V, KC_SPACE, KC_H,
|
||||
|
||||
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
||||
KC_NO, 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(_OVERWATCH), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 3:
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | ESC | V | D | ALT | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | TAB | S | I | F | M | T | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Q | 1 | 2 | 3 | 4 | G |------| |------| | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | NUMLOCK| NUM1 | NUM2 | NUM3 | NUM4 | Z | | | | | | | | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | LCTL | MAC1 | MAC2 | MAC3 | MAC4 | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | L | J | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | G | | | | |
|
||||
* | SPACE| Q |------ |------| | |
|
||||
* | SHIFT| ALT | 0MAC | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_DIABLO] = LAYOUT_ergodox(
|
||||
KC_ESCAPE, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO,
|
||||
KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_TRNS,
|
||||
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G,
|
||||
KC_LCTL, TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), KC_Z, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_L, KC_J,
|
||||
KC_F,
|
||||
SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DIABLO_CLEAR,
|
||||
|
||||
|
||||
|
||||
KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, 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_NO, KC_NO,
|
||||
KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_NO,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
|
||||
/* Keymap 4: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | MsUp | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | |MsLeft|MsDown|MsRght| | |------| |------| | | Acc0 | Acc1 | Acc2 | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | Acc0 | Acc1 | Acc2 | | | | | | | Mute |VolDn |VolUp | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | Play | Stop | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | MWUp | | | | |
|
||||
* | Lclk | Rclk |------| |------| MBn4 | MBn5 |
|
||||
* | | | MWDn | | Mclk | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_MOUS] = LAYOUT_ergodox(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
|
||||
KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_WH_U,
|
||||
KC_BTN1, KC_BTN2, KC_WH_D,
|
||||
|
||||
KC_TRNS, 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_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO,
|
||||
KC_TRNS, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO,KC_NO,
|
||||
KC_NO,
|
||||
KC_MS_BTN3,KC_MS_BTN4,KC_MS_BTN5
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
uint32_t layer_state_set_kb(uint32_t state) {
|
||||
#ifdef LAYER_UNDERGLOW_LIGHTING
|
||||
switch (biton32(state)) {
|
||||
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
|
||||
// Sends the key press to system, but only if on the Diablo layer
|
||||
void send_diablo_keystroke(uint8_t diablo_key) {
|
||||
if (biton32(layer_state) == _DIABLO) {
|
||||
switch (diablo_key) {
|
||||
case 0:
|
||||
SEND_STRING("1");
|
||||
break;
|
||||
case 1:
|
||||
rgblight_set_red;
|
||||
SEND_STRING("2");
|
||||
break;
|
||||
case 2:
|
||||
rgblight_set_blue;
|
||||
SEND_STRING("3");
|
||||
break;
|
||||
case 3:
|
||||
rgblight_set_green;
|
||||
break;
|
||||
case 4:
|
||||
rgblight_set_yellow;
|
||||
break;
|
||||
case 5:
|
||||
rgblight_setrgb(0xFF, 0xFF, 0x00);
|
||||
break;
|
||||
case 6:
|
||||
rgblight_setrgb(0xFF, 0xFF, 0x00);
|
||||
break;
|
||||
case 7:
|
||||
rgblight_setrgb(0xFF, 0xFF, 0xFF);
|
||||
break;
|
||||
default:
|
||||
rgblight_set_teal;
|
||||
SEND_STRING("4");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
void matrix_init_keymap(void) { // Runs boot tasks for keyboard
|
||||
};
|
||||
|
||||
|
||||
void matrix_scan_keymap(void) { // runs frequently to update info
|
||||
uint8_t modifiders = get_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, independantly.
|
||||
if (modifiders & MODS_SHIFT_MASK) {
|
||||
ergodox_right_led_2_on();
|
||||
}
|
||||
if (modifiders & MODS_CTRL_MASK) {
|
||||
ergodox_right_led_1_on();
|
||||
}
|
||||
if (modifiders & MODS_ALT_MASK) {
|
||||
ergodox_right_led_3_on();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Run Diablo 3 macro checking code.
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
run_diablo_macro_check();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@@ -1,9 +0,0 @@
|
||||
# Drashna's ErgoDox EZ Underglow Mod
|
||||
|
||||
This is based on the default Ergodox EZ keymap.
|
||||
|
||||
This modifieds the keymay so that it uses the underglow to indicate which layer you're on, rather than the top LEDs.
|
||||
|
||||
Default colors are "teal" for base layer, "red" for Symbols, and "green" for mouse/media. Blue would be the next layer, if you had more.
|
||||
|
||||
Additionally, the top LEDs are Shift/Control/Alt indicators instead (in that order).
|
@@ -1,5 +1,10 @@
|
||||
RGBLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ANIMATION = no
|
||||
TAP_DANCE_ENABLE = yes
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
RGBLIGHT_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
|
||||
EXTRAFLAGS = -flto
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
|
@@ -14,4 +14,5 @@ Layers
|
||||
* KEYSEL: similar to KEYNAV, except for shift-selection
|
||||
* COMBINED: this is a layer that combines numbers, brackets and special characters. !@#$%^&*( can be type by shift+COMBINED+1/2/3/etc..
|
||||
* MOUSE: mouse navigation, as well as browser tab-left/tab-right shortcuts
|
||||
* SHELL_NAV: Linux Bash shortcuts (move forward/backward in command line, move between screen windows, Ctrl+C, recall last argument, etc
|
||||
* SHELL_NAV: Linux Bash shortcuts (move forward/backward in command line, Ctrl+C, recall last argument, etc
|
||||
* SHELL_SCREEN: Linux screen (run multiple terminals in one window) shortcuts such as open new tabs, switch between tabs
|
@@ -14,16 +14,33 @@ enum custom_keycodes {
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD,
|
||||
// shell nav macros
|
||||
SHELL_LS,
|
||||
SHELL_LSLTR,
|
||||
SHELL_CDPRE,
|
||||
SHELL_LESS,
|
||||
SHELL_PLESS,
|
||||
SHELL_PGREP,
|
||||
SHELL_TAILF,
|
||||
|
||||
SHELL_PWD,
|
||||
SHELL_H3,
|
||||
SHELL_AMMCOLO,
|
||||
SHELL_SCREENRD,
|
||||
SHELL_SCREEN_NEW,
|
||||
SHELL_SCREEN_LIST,
|
||||
SHELL_MKE,
|
||||
SHELL_HTCSTATUS,
|
||||
};
|
||||
|
||||
|
||||
#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 MOUSE 4 // mouse layer (can be locked with lock key)
|
||||
#define COMBINED 5 // combined numbers and symbols layer
|
||||
#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 MOUSE 5 // mouse layer (can be locked with lock key)
|
||||
#define COMBINED 6 // combined numbers and symbols layer
|
||||
|
||||
// macros
|
||||
#define MOUSE_TOGGLE 1
|
||||
@@ -34,103 +51,123 @@ enum custom_keycodes {
|
||||
#define SWITCH_NDS 7
|
||||
#define SCREEN_COPY_MODE 8
|
||||
#define SCREEN_PASTE 9
|
||||
#define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 15
|
||||
#define SCREEN_RENAME 10
|
||||
#define SCREEN_NUMBER 11
|
||||
#define SCREEN_0 12
|
||||
#define SCREEN_1 13
|
||||
#define SCREEN_2 14
|
||||
#define SCREEN_3 15
|
||||
#define SCREEN_4 16
|
||||
#define SCREEN_5 17
|
||||
#define SCREEN_6 18
|
||||
#define SCREEN_7 19
|
||||
#define SCREEN_8 20
|
||||
#define SCREEN_9 21
|
||||
#define SCREEN_DETACH 22
|
||||
#define SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND 30
|
||||
|
||||
|
||||
#define MACRO_SCREEN_NUM(MACRO_NAME,NUM) \
|
||||
case MACRO_NAME:\
|
||||
if (record->event.pressed) {\
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(NUM), END);\
|
||||
}\
|
||||
break;\
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[BASE] = KEYMAP(
|
||||
// left hand
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MEH(KC_2),
|
||||
MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
MEH(KC_0), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MEH(KC_3),
|
||||
MEH(KC_1), OSM(MOD_LSFT), OSM(MOD_LCTL), M(MOUSE_TOGGLE), MO(KEYSEL),
|
||||
|
||||
// left thumb cluster
|
||||
MEH(KC_4), MEH(KC_5),
|
||||
MEH(KC_6),
|
||||
MO(COMBINED),MO(KEYNAV), OSM(MOD_LALT),
|
||||
|
||||
// right hand
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MEH(KC_9),
|
||||
MEH(KC_7), KC_F, KC_G, KC_C, KC_R, KC_L, MEH(KC_F1),
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, MEH(KC_F2),
|
||||
MEH(KC_8), KC_B, KC_M, KC_W, KC_V, KC_Z, MEH(KC_F3),
|
||||
KC_BSPC, RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT),MEH(KC_F4),
|
||||
// left hand
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
|
||||
KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, MEH(KC_2),
|
||||
OSL(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
OSL(SHELL_SCREEN), KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, MEH(KC_3),
|
||||
MEH(KC_1), OSM(MOD_LSFT), OSM(MOD_LCTL), M(MOUSE_TOGGLE), MO(KEYSEL),
|
||||
|
||||
// left thumb cluster
|
||||
MEH(KC_4), MEH(KC_5),
|
||||
MEH(KC_6),
|
||||
MO(COMBINED),MO(KEYNAV), OSM(MOD_LALT),
|
||||
|
||||
// right hand
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MEH(KC_9),
|
||||
MEH(KC_7), KC_F, KC_G, KC_C, KC_R, KC_L, MEH(KC_F1),
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, MEH(KC_F2),
|
||||
MEH(KC_8), KC_B, KC_M, KC_W, KC_V, KC_Z, MEH(KC_F3),
|
||||
KC_BSPC, RCTL(KC_BSPC), KC_CAPSLOCK, OSM(MOD_LSFT),MEH(KC_F4),
|
||||
|
||||
// right thumb cluster
|
||||
MEH(KC_F5),MEH(KC_F6),MEH(KC_F7),MEH(KC_F8),KC_ENTER,KC_SPACE
|
||||
// right thumb cluster
|
||||
MEH(KC_F5),MEH(KC_F6),MEH(KC_F7),MEH(KC_F8),KC_ENTER,KC_SPACE
|
||||
|
||||
),
|
||||
|
||||
[KEYNAV] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_ESC, MEH(KC_F9), RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS,
|
||||
KC_TRNS,MEH(KC_F11), MEH(KC_F12), RSFT(KC_TAB), KC_TAB, MEH(KC_A),
|
||||
KC_TRNS,MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F), KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// left thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,TO(MOUSE),KC_TRNS,KC_TRNS,
|
||||
|
||||
// right hand
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MEH(KC_G),
|
||||
KC_TRNS,KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, MEH(KC_H),
|
||||
LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), MEH(KC_I),
|
||||
KC_TRNS,KC_NO, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, MEH(KC_J),
|
||||
KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), MEH(KC_K),
|
||||
|
||||
// right thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS
|
||||
// left hand
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_ESC, MEH(KC_F9), RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS,
|
||||
KC_TRNS,MEH(KC_F11), MEH(KC_F12), RSFT(KC_TAB), KC_TAB, MEH(KC_A),
|
||||
KC_TRNS,MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F), KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
// left thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,TO(MOUSE),KC_TRNS,KC_TRNS,
|
||||
|
||||
// right hand
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MEH(KC_G),
|
||||
KC_TRNS,KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, MEH(KC_H),
|
||||
LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), MEH(KC_I),
|
||||
KC_TRNS,KC_NO, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN, MEH(KC_J),
|
||||
KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), MEH(KC_K),
|
||||
|
||||
// right thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS
|
||||
),
|
||||
|
||||
// key selection layer
|
||||
[KEYSEL] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS,
|
||||
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
|
||||
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, MEH(KC_Q),
|
||||
RSFT(KC_PGUP), KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), MEH(KC_R),
|
||||
RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), MEH(KC_S),
|
||||
RSFT(KC_PGDN), KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), MEH(KC_T),
|
||||
// bottom row
|
||||
KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), MEH(KC_U),
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
// key selection layer
|
||||
[KEYSEL] = KEYMAP(
|
||||
// left hand
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,MEH(KC_G), MEH(KC_H),MEH(KC_I), MEH(KC_J), MEH(KC_K), KC_TRNS,
|
||||
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
|
||||
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, MEH(KC_Q),
|
||||
RSFT(KC_PGUP), KC_TRNS, RSFT(KC_HOME), RSFT(KC_UP), RSFT(KC_END), RSFT(KC_PGUP), MEH(KC_R),
|
||||
RSFT(RCTL(KC_LEFT)), RSFT(KC_LEFT), RSFT(KC_DOWN), RSFT(KC_RIGHT), RSFT(RCTL(KC_RIGHT)), MEH(KC_S),
|
||||
RSFT(KC_PGDN), KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), RSFT(KC_PGDN), MEH(KC_T),
|
||||
// bottom row
|
||||
KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE), MEH(KC_U),
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
// shell navigation layer
|
||||
[SHELL_NAV] = KEYMAP(
|
||||
// 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,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_TRNS, SHELL_PGREP, SHELL_PLESS, SHELL_LESS, KC_TRNS, SHELL_H3,
|
||||
KC_TRNS,SHELL_MKE, SHELL_CDPRE, SHELL_LSLTR, SHELL_LS, SHELL_PWD,
|
||||
KC_TRNS,SHELL_SCREEN_LIST, SHELL_SCREENRD, SHELL_SCREEN_NEW, SHELL_TAILF, SHELL_HTCSTATUS, SHELL_AMMCOLO,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,
|
||||
LALT(KC_D),
|
||||
KC_TRNS,RCTL(KC_W),KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(SWITCH_NDS),
|
||||
RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, LALT(KC_D), RCTL(KC_R),
|
||||
LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT),
|
||||
RCTL(KC_C), RCTL(KC_U), M(SCREEN_COPY_MODE), M(SCREEN_PASTE), MEH(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND),
|
||||
// bottom row
|
||||
M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(SWITCH_NDS),
|
||||
RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, KC_TRNS, RCTL(KC_R),
|
||||
LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT),
|
||||
RCTL(KC_C), RCTL(KC_U), M(SCREEN_COPY_MODE), M(SCREEN_PASTE), MEH(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND),
|
||||
// bottom row (match functionality of base layer)
|
||||
KC_BSPC, RCTL(KC_W), KC_DELETE, LALT(KC_D), RCTL(KC_U),
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
@@ -138,52 +175,78 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
|
||||
|
||||
// linux screen layer
|
||||
[SHELL_SCREEN] = KEYMAP(
|
||||
// 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,
|
||||
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, M(SCREEN_NEW_TAB), M(SCREEN_7), M(SCREEN_8), M(SCREEN_9), M(SCREEN_RENAME), KC_TRNS,
|
||||
M(SCREEN_TAB_LEFT), M(SCREEN_4), M(SCREEN_5), M(SCREEN_6), M(SCREEN_TAB_RIGHT), KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, M(SCREEN_1), M(SCREEN_2), M(SCREEN_3), M(SCREEN_NUMBER), KC_TRNS,
|
||||
// bottom row
|
||||
M(SCREEN_0), KC_TRNS, KC_TRNS, KC_TRNS, M(SCREEN_DETACH),
|
||||
// thumb cluster
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS
|
||||
),
|
||||
|
||||
|
||||
[COMBINED] = KEYMAP(
|
||||
|
||||
// left hand
|
||||
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,
|
||||
KC_TRNS,KC_ESC, KC_LABK, KC_RABK, KC_DQUO, KC_GRAVE,KC_TRNS,
|
||||
KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS,
|
||||
KC_TRNS,KC_LCBR, KC_RCBR, KC_BSLS, KC_PIPE, KC_TILD,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, MEH(KC_L),
|
||||
KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, MEH(KC_M),
|
||||
KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, MEH(KC_N),
|
||||
KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, MEH(KC_O),
|
||||
// bottom row
|
||||
KC_0, KC_DOT, KC_TRNS, KC_TRNS, MEH(KC_P),
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS),
|
||||
// left hand
|
||||
KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS,
|
||||
KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRACKET, KC_RBRACKET, KC_UNDS,
|
||||
KC_TRNS,KC_COLN, KC_DQUO, KC_LCBR, KC_RCBR, KC_AMPR, KC_TRNS,
|
||||
// bottom row
|
||||
KC_TRNS,KC_TRNS, KC_TILD, KC_GRAVE, KC_CIRC,
|
||||
// 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, MEH(KC_L),
|
||||
KC_TRNS, KC_PLUS, KC_7, KC_8, KC_9, KC_ASTR, MEH(KC_M),
|
||||
KC_MINS, KC_4, KC_5, KC_6, KC_SLSH, MEH(KC_N),
|
||||
KC_TRNS, KC_EQUAL, KC_1, KC_2, KC_3, KC_QUES, MEH(KC_O),
|
||||
// bottom row
|
||||
KC_0, KC_DOT, KC_PIPE, KC_BSLS, MEH(KC_P),
|
||||
// thumb cluster
|
||||
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS),
|
||||
|
||||
|
||||
[MOUSE] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_PGUP, KC_MS_WH_UP, KC_UP, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_MS_ACCEL0, KC_PGDN, KC_MS_WH_DOWN, KC_DOWN, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, M(MOUSE_LOCK), KC_TRNS, KC_MS_ACCEL0,
|
||||
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_BTN3, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_UP, KC_HOME, KC_MS_U, KC_END, KC_MS_WH_UP, KC_TRNS,
|
||||
KC_DOWN, KC_MS_L, KC_MS_D, KC_MS_R, KC_MS_WH_DOWN, KC_TRNS,
|
||||
KC_TRNS, MEH(KC_X), MEH(KC_Y), MEH(KC_Z), KC_F5, RCTL(KC_W), KC_TRNS,
|
||||
// browser tab control
|
||||
RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_BTN1, KC_BTN2
|
||||
),
|
||||
|
||||
[MOUSE] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_PGUP, KC_MS_WH_UP, KC_UP, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_MS_ACCEL0, KC_PGDN, KC_MS_WH_DOWN, KC_DOWN, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, M(MOUSE_LOCK), KC_TRNS, KC_MS_ACCEL0,
|
||||
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_BTN3, KC_TRNS,
|
||||
// right hand
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_UP, KC_HOME, KC_MS_U, KC_END, KC_MS_WH_UP, KC_TRNS,
|
||||
KC_DOWN, KC_MS_L, KC_MS_D, KC_MS_R, KC_MS_WH_DOWN, KC_TRNS,
|
||||
KC_TRNS, MEH(KC_X), MEH(KC_Y), MEH(KC_Z), KC_F5, RCTL(KC_W), KC_TRNS,
|
||||
// browser tab control
|
||||
RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), KC_TRNS,
|
||||
KC_TRNS, KC_TRNS,
|
||||
KC_TRNS,
|
||||
KC_TRNS, KC_BTN1, KC_BTN2
|
||||
),
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -195,26 +258,26 @@ const uint16_t PROGMEM fn_actions[] = {
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
case MOUSE_TOGGLE:
|
||||
case MOUSE_TOGGLE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(MOUSE);
|
||||
layer_on(MOUSE);
|
||||
} else {
|
||||
if(!mouse_lock)
|
||||
layer_off(MOUSE);
|
||||
}
|
||||
break;
|
||||
case MOUSE_LOCK:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
if(mouse_lock)
|
||||
{
|
||||
mouse_lock = false;
|
||||
layer_off(MOUSE);
|
||||
}
|
||||
else
|
||||
mouse_lock = true;
|
||||
}
|
||||
break;
|
||||
if(!mouse_lock)
|
||||
layer_off(MOUSE);
|
||||
}
|
||||
break;
|
||||
case MOUSE_LOCK:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
if(mouse_lock)
|
||||
{
|
||||
mouse_lock = false;
|
||||
layer_off(MOUSE);
|
||||
}
|
||||
else
|
||||
mouse_lock = true;
|
||||
}
|
||||
break;
|
||||
case SCREEN_TAB_LEFT:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(P), END);
|
||||
@@ -230,6 +293,41 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(C), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_DETACH:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(D), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_RENAME:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(A), U(LSFT), END);
|
||||
}
|
||||
break;
|
||||
case SCREEN_NUMBER:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), D(LSFT), T(SCOLON), U(LSFT),
|
||||
T(N),
|
||||
T(U),
|
||||
T(M),
|
||||
T(B),
|
||||
T(E),
|
||||
T(R),
|
||||
T(SPC),
|
||||
END);
|
||||
}
|
||||
break;
|
||||
|
||||
MACRO_SCREEN_NUM(SCREEN_0,0);
|
||||
MACRO_SCREEN_NUM(SCREEN_1,1);
|
||||
MACRO_SCREEN_NUM(SCREEN_2,2);
|
||||
MACRO_SCREEN_NUM(SCREEN_3,3);
|
||||
MACRO_SCREEN_NUM(SCREEN_4,4);
|
||||
MACRO_SCREEN_NUM(SCREEN_5,5);
|
||||
MACRO_SCREEN_NUM(SCREEN_6,6);
|
||||
MACRO_SCREEN_NUM(SCREEN_7,7);
|
||||
MACRO_SCREEN_NUM(SCREEN_8,8);
|
||||
MACRO_SCREEN_NUM(SCREEN_9,9);
|
||||
|
||||
case SCREEN_COPY_MODE:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(A), U(LCTL), T(ESC), END);
|
||||
@@ -243,13 +341,13 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
case SWITCH_NDS:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LSFT),
|
||||
T(F11),
|
||||
U(LSFT),
|
||||
W(255),
|
||||
D(LALT),
|
||||
T(TAB),
|
||||
U(LALT),
|
||||
END);
|
||||
T(F11),
|
||||
U(LSFT),
|
||||
W(255),
|
||||
D(LALT),
|
||||
T(TAB),
|
||||
U(LALT),
|
||||
END);
|
||||
}
|
||||
break;
|
||||
case SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND:
|
||||
@@ -282,8 +380,74 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
// shell macros
|
||||
if(record->event.pressed) {
|
||||
switch (keycode) {
|
||||
case SHELL_LS:
|
||||
SEND_STRING("ls\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_LSLTR:
|
||||
SEND_STRING("ls -ltr\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_CDPRE:
|
||||
SEND_STRING("cd ..\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_LESS:
|
||||
SEND_STRING("less ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_PLESS:
|
||||
SEND_STRING(" | less");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_PGREP:
|
||||
SEND_STRING(" | grep ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_TAILF:
|
||||
SEND_STRING("tail -f ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_PWD:
|
||||
SEND_STRING("echo `pwd`/");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_H3:
|
||||
SEND_STRING("h3\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_AMMCOLO:
|
||||
SEND_STRING("ammcolo\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_SCREENRD:
|
||||
SEND_STRING("screen -r -d ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_SCREEN_NEW:
|
||||
SEND_STRING("screen -S ");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_SCREEN_LIST:
|
||||
SEND_STRING("screen -list\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_MKE:
|
||||
SEND_STRING("mke\n");
|
||||
return true;
|
||||
break;
|
||||
case SHELL_HTCSTATUS:
|
||||
SEND_STRING("htcStatus -j ");
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -303,13 +467,15 @@ void matrix_scan_user(void) {
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
case COMBINED:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case KEYNAV:
|
||||
case KEYSEL:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case COMBINED:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case SHELL_NAV:
|
||||
case SHELL_SCREEN:
|
||||
case KEYNAV:
|
||||
case KEYSEL:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
case MOUSE:
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
|
@@ -86,4 +86,4 @@ LED_DRIVER = is31fl3731c
|
||||
LED_WIDTH = 7
|
||||
LED_HEIGHT = 7
|
||||
|
||||
LAYOUTS = ergodox ergodox_80
|
||||
LAYOUTS = ergodox
|
||||
|
@@ -8,6 +8,7 @@
|
||||
enum QFR_layers {
|
||||
_COLEMAK,
|
||||
_QWERTY,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_MOUSE
|
||||
};
|
||||
@@ -15,18 +16,26 @@ enum QFR_layers {
|
||||
enum QFR_keycodes {
|
||||
COLEMAK = SAFE_RANGE,
|
||||
QWERTY,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
MOUSE
|
||||
};
|
||||
|
||||
enum custom_macros {
|
||||
R_PIPE,
|
||||
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
|
||||
[0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space,
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(_LOWER), //Hold for momentary Mouse, Tap for toggle Mouse
|
||||
[2] = ACTION_LAYER_TAP_TOGGLE(_MOUSE), //Hold for momentary Lower, Tap for toggle Lower
|
||||
[1] = ACTION_LAYER_MOMENTARY(_MOUSE) //Hold for momentary MOUSE
|
||||
|
||||
};
|
||||
|
||||
#define SPC_LW FUNC(0)
|
||||
#define LWR FUNC(1)
|
||||
#define MSE FUNC(2)
|
||||
#define MSE FUNC(1)
|
||||
#define PIPE M(R_PIPE)
|
||||
#define POINT M(R_POINT)
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
@@ -48,33 +57,60 @@ 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_DEL, KC_END, KC_PGDN, \
|
||||
KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \
|
||||
KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
|
||||
KC_LCTL,KC_LGUI,KC_LALT, SPC_LW, MSE, KC_RGUI , KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_DVORAK] = KEYMAP_TKL(\
|
||||
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_QUOT,KC_COMM,KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \
|
||||
KC_BSPC,KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_QUOT, KC_ENT, \
|
||||
KC_LSFT,KC_NUBS,KC_SCLN,KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \
|
||||
KC_LCTL,KC_LGUI,KC_LALT, SPC_LW, MSE, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_LOWER] = KEYMAP_TKL(\
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK,_______, \
|
||||
RESET, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, _______, KC_MUTE, KC_VOLD, KC_VOLU, QWERTY, COLEMAK,DVORAK, \
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_UNDS, KC_PLUS, KC_BSPC, _______,_______,_______, \
|
||||
KC_TAB, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN4, KC_BTN5, XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE, _______,_______,_______, \
|
||||
KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, _______, _______, \
|
||||
_______,XXXXXXX,_______,_______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, \
|
||||
KC_TAB, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE, _______,_______,_______, \
|
||||
KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, \
|
||||
_______,XXXXXXX,POINT,PIPE, KC_LCBR, KC_LBRC, KC_GRV, KC_PIPE, KC_RBRC, KC_RCBR, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, KC_RALT, _______, _______, _______, _______,_______,_______ \
|
||||
),
|
||||
|
||||
[_MOUSE] = KEYMAP_TKL(\
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,_______,_______, \
|
||||
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_TAB, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_BSLS, _______,_______,_______, \
|
||||
KC_BSPC, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, \
|
||||
_______,XXXXXXX,KC_Z,KC_X, KC_C, KC_V, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, \
|
||||
KC_TAB, KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN4, KC_BTN5, XXXXXXX, KC_LBRC, KC_RBRC, KC_BSLS, _______,_______,_______, \
|
||||
KC_BSPC, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, _______, \
|
||||
_______,XXXXXXX,PIPE,POINT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, KC_ACL2, MSE, _______, _______, _______, _______,_______,_______ \
|
||||
)
|
||||
};
|
||||
|
||||
// Macros to send R pointer & dplyr pipe
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
switch(id) {
|
||||
case R_POINT:
|
||||
if (record->event.pressed) { // pointer
|
||||
SEND_STRING("<- ");
|
||||
// return MACRO(D(LSFT), T(COMM), U(LSFT), T(MINS), END);
|
||||
}
|
||||
break;
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -85,6 +121,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
@@ -39,7 +39,7 @@ The base layout is Colemak by default, but this can be changed to QWERTY via the
|
||||
### LOWER
|
||||
```
|
||||
,----. ,-------------------. ,-------------------. ,-------------------. ,--------------.
|
||||
|ESC | | F1 | F2 | F3 | F4 | | F5 | F6 | F7 | F8 | | F9 |F10 |F11 |F12 | |QWTY|CLMK|PsBk|
|
||||
|ESC | | F1 | F2 | F3 | F4 | |>/|||Stop| << | >> | | F9 |MUTE|Vol-|Vol+| |QWTY|CLMK|PsBk|
|
||||
'----' '-------------------' '-------------------' '-------------------' '--------------'
|
||||
,-------------------------------------------------------------------------. ,--------------.
|
||||
| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | Bspc | | Ins|Home|PgUp|
|
||||
@@ -48,7 +48,7 @@ The base layout is Colemak by default, but this can be changed to QWERTY via the
|
||||
|-------------------------------------------------------------------------| '--------------'
|
||||
| Bckspc|PgDn|Left|Down|Rght| | | | | | | ' | Enter |
|
||||
|-------------------------------------------------------------------------| ,----.
|
||||
| LSPO | Z | X | C | V | | | | , | . | / | RSPC | | Up |
|
||||
| LSPO | <- |%>% | { | [ | ` | | | ] | } | . | / | RSPC | | Up |
|
||||
|-------------------------------------------------------------------------| ,--------------.
|
||||
|Ctrl|LGUI|LAlt| |RAlt|RGUI|Menu|Ctrl| |Left|Down|Rght|
|
||||
'-------------------------------------------------------------------------' '--------------'
|
||||
|
@@ -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 = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
|
17
keyboards/gh60/info.json
Normal file
17
keyboards/gh60/info.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"keyboard_name": "GH60",
|
||||
"identifier": "FEED:6060:0001",
|
||||
"layout": {
|
||||
"LAYOUT_60_ansi": {
|
||||
"layout": [{"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":14, "y":0, "label":"Backspace", "w":2}, {"x":0.5, "y":1, "label":"Tab", "w":1.5}, {"x":1.5, "y":1, "label":"Q"}, {"x":2.5, "y":1, "label":"W"}, {"x":3.5, "y":1, "label":"E"}, {"x":4.5, "y":1, "label":"R"}, {"x":5.5, "y":1, "label":"T"}, {"x":6.5, "y":1, "label":"Y"}, {"x":7.5, "y":1, "label":"U"}, {"x":8.5, "y":1, "label":"I"}, {"x":9.5, "y":1, "label":"O"}, {"x":10.5, "y":1, "label":"P"}, {"x":11.5, "y":1, "label":"{"}, {"x":12.5, "y":1, "label":"}"}, {"x":14, "y":1, "label":"|", "w":1.5}, {"x":0.75, "y":2, "label":"Caps Lock", "w":1.75}, {"x":1.75, "y":2, "label":"A"}, {"x":2.75, "y":2, "label":"S"}, {"x":3.75, "y":2, "label":"D"}, {"x":4.75, "y":2, "label":"F"}, {"x":5.75, "y":2, "label":"G"}, {"x":6.75, "y":2, "label":"H"}, {"x":7.75, "y":2, "label":"J"}, {"x":8.75, "y":2, "label":"K"}, {"x":9.75, "y":2, "label":"L"}, {"x":10.75, "y":2, "label":":"}, {"x":11.75, "y":2, "label":"\""}, {"x":14, "y":2, "label":"Enter", "w":2.25}, {"x":1.25, "y":3, "label":"Shift", "w":2.25}, {"x":2.25, "y":3, "label":"Z"}, {"x":3.25, "y":3, "label":"X"}, {"x":4.25, "y":3, "label":"C"}, {"x":5.25, "y":3, "label":"V"}, {"x":6.25, "y":3, "label":"B"}, {"x":7.25, "y":3, "label":"N"}, {"x":8.25, "y":3, "label":"M"}, {"x":9.25, "y":3, "label":"<"}, {"x":10.25, "y":3, "label":">"}, {"x":11.25, "y":3, "label":"?"}, {"x":14, "y":3, "label":"Shift", "w":2.75}, {"x":0.25, "y":4, "label":"Ctrl", "w":1.25}, {"x":1.5, "y":4, "label":"Win", "w":1.25}, {"x":2.75, "y":4, "label":"Alt", "w":1.25}, {"x":9, "y":4, "w":6.25}, {"x":10.25, "y":4, "label":"Alt", "w":1.25}, {"x":11.5, "y":4, "label":"Win", "w":1.25}, {"x":12.75, "y":4, "label":"Menu", "w":1.25}, {"x":14, "y":4, "label":"Ctrl", "w":1.25}]
|
||||
}
|
||||
},
|
||||
"maintainer": "qmk",
|
||||
"keyboard_folder": "gh60",
|
||||
"width": 15,
|
||||
"bootloader": "atmel-dfu",
|
||||
"processor": "atmega32u4",
|
||||
"height": 5,
|
||||
"url": "http://qmk.fm/keyboards/gh60",
|
||||
"manufacturer": "geekhack"
|
||||
}
|
@@ -29,6 +29,8 @@ extern keymap_config_t keymap_config;
|
||||
|
||||
enum terminus_mini_layers {
|
||||
_COLEMAK,
|
||||
_QWERTY,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_FUNCTION,
|
||||
@@ -38,25 +40,32 @@ enum terminus_mini_layers {
|
||||
|
||||
enum terminus_mini_keycodes {
|
||||
COLEMAK = SAFE_RANGE,
|
||||
QWERTY,
|
||||
DVORAK,
|
||||
LOWER,
|
||||
RAISE,
|
||||
FUNCTION,
|
||||
MOUSE
|
||||
};
|
||||
|
||||
enum 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_TAP_TOGGLE(_LOWER), //Hold for momentary Lower, Tap for toggle Lower
|
||||
[3] = ACTION_LAYER_TAP_TOGGLE(_MOUSE), //Hold for momentary Mouse, Tap for toggle Mouse
|
||||
[4] = ACTION_LAYER_MOMENTARY(_FUNCTION), //Hold for momentary Function
|
||||
[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 LWR FUNC(2)
|
||||
#define FNC FUNC(2)
|
||||
#define MSE FUNC(3)
|
||||
#define FNC FUNC(4)
|
||||
#define PIPE M(R_PIPE)
|
||||
#define POINT M(R_POINT)
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
@@ -72,16 +81,52 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |-----+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | LSPO| Z | X | C | V | B | K | M | , | . | / | RSPC |
|
||||
* |-----+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl| LGUI | Lower| LAlt | SpaceLW | RSEnter | Fn | Mouse| Menu | Ctrl |
|
||||
* | Ctrl| LGUI | Lower| LAlt | Space/Lower | Enter/Raise | Fn | Mouse| Menu | Ctrl |
|
||||
* `----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = TERMINUS_MINI(
|
||||
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, LWR, KC_LALT, SPC_LW, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \
|
||||
KC_LCTL, KC_LGUI, LOWER, KC_LALT, SPC_LW, ENT_RS, FNC, MSE, KC_APP, KC_RCTL \
|
||||
),
|
||||
|
||||
/* QWERTY -
|
||||
* ,----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Del |
|
||||
* |-----+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | BS | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |-----+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | LSPO| Z | X | C | V | B | N | M | , | . | / | RSPC |
|
||||
* |-----+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl| LGUI | Lower| LAlt | Space/Lower | Enter/Raise | Fn | Mouse| Menu | Ctrl |
|
||||
* `----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = TERMINUS_MINI(
|
||||
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 \
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | BS | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | LSPO | ; | Q | J | K | X | B | M | W | V | Z | RSPC |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | LGUI | Lower| LAlt | Space/Lower | Enter/Raise | Fn | Mouse| Menu |Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = TERMINUS_MINI(
|
||||
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 \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | PgUp | Home | Up | End | / | 7 | 8 | 9 | * | | Del |
|
||||
@@ -90,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | LSPO | Z | X | C | V | = | 1 | 2 | 3 | Enter| | RSPC |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | LGUI | Lower| LAlt | Space/Lower | 0 | . | Fn | Menu | Ctrl |
|
||||
* | Ctrl | LGUI | Lower| LAlt | Space/Lower | 0 | . | Fn |ADJUST| Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
Want to add tap-dance function to 0 key: Tap=0, doubleTap=Ent
|
||||
*/
|
||||
@@ -99,7 +144,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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, _______, _______ \
|
||||
_______, _______, _______, _______, _______, KC_0, KC_DOT, FNC, RAISE, _______ \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
@@ -108,22 +153,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | BS | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | " |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | LSPO | | | { | [ | ` | \ | ] | } | . | ? | RSPC |
|
||||
* | LSPO | <- | %>% | { | [ | ` | \ | ] | } | . | ? | RSPC |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | LGUI | | LAlt | Space/Lower | Raise/Enter | Fn | Mouse| Menu | Ctrl |
|
||||
* | Ctrl | LGUI | | LAlt | Space/Lower | Enter/Raise | Fn | Mouse| Raise| Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_RAISE] = TERMINUS_MINI(
|
||||
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, _______, \
|
||||
_______, XXXXXXX, XXXXXXX, KC_LCBR, KC_LBRC, KC_GRV, KC_BSLS, KC_RBRC, KC_RCBR, KC_DOT, KC_SLSH, _______, \
|
||||
_______, 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, _______, _______ \
|
||||
),
|
||||
|
||||
/*Function
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | Mute | Vol- | Vol+ | | RESET| POWER| F1 | F2 | F3 | F4 | Ins |
|
||||
* | Esc | Mute | Vol- | Vol+ | | | | F1 | F2 | F3 | F4 | Ins |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Caps | Stop | |<< | >/|| | >>| | | | F5 | F6 | F7 | F8 |PrtSc |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
@@ -134,17 +179,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
|
||||
[_FUNCTION] = TERMINUS_MINI(
|
||||
_______, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, RESET, KC_PWR, 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, \
|
||||
_______, _______, _______, _______, _______, _______, FNC, _______, _______, KC_PAUS \
|
||||
_______, 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
|
||||
* ,---------------------------------------------------------------------------------------.
|
||||
* | Esc | WhlU | WhlL | MsUp | WhlR | | | M1 | M2 | M3 | | |
|
||||
* | Esc | WhlU | WhlL | MsUp | WhlR | | | M1 | M2 | M3 | | |
|
||||
* |------+-------+------+-------+------+------+------+-------+-------+------+------+------|
|
||||
* | | WhlD | MsL | MsDn | MsR | | |LClick |RClick | | | |
|
||||
* | | WhlD | MsL | MsDn | MsR | | |LClick |RClick | | | |
|
||||
* |------+-------+------+-------+------+------+------+-------+-------+------+------+------|
|
||||
* | LSPO | | | | | | | | | | | RSCB |
|
||||
* |------+-------+------+-------+------+------+------+-------+-------+------+------+------|
|
||||
@@ -156,9 +201,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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 \
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, KC_ACL2, KC_ACL0, XXXXXXX, MSE, XXXXXXX, KC_RCTL \
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | |RESET | |TermOn|TermOf| | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | |Qwerty|Colemk|Dvorak| | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_ADJUST] = TERMINUS_MINI(
|
||||
_______, _______, _______, _______, _______, RESET, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \
|
||||
_______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
@@ -166,17 +230,48 @@ 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) {
|
||||
case COLEMAK:
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_COLEMAK);
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
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);
|
||||
|
@@ -2,51 +2,80 @@ Copyright 2017 James Morgan <ja.morgan1@outlook.com>
|
||||
|
||||
#MogranJM's terminus_mini layout - A handwired keyboard inspired by the UniKeyboard Terminus Mini 2.
|
||||
|
||||
```
|
||||
make handwired/terminus_mini:default:teensy
|
||||
```
|
||||
|
||||
This keymap is modified from the Planck default layout. Credit for the layout name goes to UniKeyboard & reddit's /u/blahlicus)
|
||||
|
||||
The terminus_mini is a handwired 4x12 ortholinear keyboard with two 2U thumb bar keys. The microcontroller is a Teensy 2.0
|
||||
|
||||
The TERMINUS_MINI layout (../../../terminus\_mini/terminus\_mini.h) is handwired and the 2U keys are handled using KC\_NO to detail that two columns do not have a 4th column.
|
||||
```
|
||||
.----------------------------------------. .-----------------------------------------.
|
||||
| Tab | Q | W | F | P | G | | J | L | U | Y | ; | Del |
|
||||
|-----+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| BS | A | R | S | T | D | | H | N | E | I | O | ' |
|
||||
|-----+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| LSPO| Z | X | C | V | B | | K | M | , | \. | / | RSPC |
|
||||
|-----+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Ctrl| LGUI | LAlt | Lower| Space/Lower | | Enter/Raise | Fn | Mouse| Menu | Ctrl |
|
||||
'----------------------------------------' '-----------------------------------------'
|
||||
.---------------------------------------------------------------------------------.
|
||||
| Tab | Q | W | F | P | G | J | L | U | Y | ; | Del |
|
||||
|-----+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| BS | A | R | S | T | D | H | N | E | I | O | ' |
|
||||
|-----+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| LSPO| Z | X | C | V | B | K | M | , | . | / | RSPC |
|
||||
|-----+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Ctrl| LGUI | LAlt | Lower| Space/Lower | Enter/Raise | Fn | Mouse| Menu | Ctrl |
|
||||
'----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
|
||||
### Base Layer - Colemak
|
||||
The base layout is Colemak. Since the CapsLock key is replaced with BackSpace, this layout has the delete key in the traditional backspace location.
|
||||
|
||||
* QWERTY and Dvorak layers have been removed from the keymap that was initially developed from the default Planck keymap.
|
||||
* QWERTY and Dvorak layers are accessible via the Adjust layer using the standard case switch macro as defined in the default Planck keymap.
|
||||
* I've implemented COLEMAK = SAFE\_RANGE when enumerating the custom\_keycodes, but I don't actually know what this does...
|
||||
* Space cadet is implemented in the shift keys (hold for shift, tap for respective parentheses)
|
||||
* I never find myself using the right-modifiers on a standard keyboard, so I've only implemented LGUI and LALT. I have intentions of improving my use of the ctrl key in correct hand alternation, so CTRL is implemented in both outside corners of the home row.
|
||||
|
||||
|
||||
#### Layer Shifting
|
||||
* The 4th key on the bottom row of the left hand PCB is a **TAP_TOGGLE** macro for the *LOWER* layer
|
||||
* The 4th key on the bottom row of the left hand PCB is used to access the *LOWER* layer via Tap/Toggle
|
||||
* The left 2U key is a **TAP_KEY** macro - Hold for momentary *LOWER* layer, Tap for Space.
|
||||
* The right 2U key is a **TAP_KEY** macro - Hold for momentary *RAISE* layer, Tap for Enter
|
||||
* The 2nd key on the bottom row of the right hand PCB is a **LAYER_MOMENTARY** for the *FUNCTION* layer
|
||||
* The 3rd key on the bottom row of the right hand PCB is a **TAP_TOGGLE** macro for the *MOUSE* layer
|
||||
|
||||
### Alternate Base Layers - QWERTY & Dvorak
|
||||
```
|
||||
QWERTY
|
||||
.----------------------------------------------------------------------------------.
|
||||
| Tab | Q | W | E | R | T | Y | U | I | O | P | \ |
|
||||
|-----+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| BS | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
|-----+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| LSPO| Z | X | C | V | B | N | M | , | . | / | RSPC |
|
||||
|-----+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Ctrl| LGUI | Lower| LAlt | SpaceLW | RSEnter | Fn | Mouse| Menu | Ctrl |
|
||||
`----------------------------------------------------------------------------------'
|
||||
|
||||
DVORAK
|
||||
.----------------------------------------------------------------------------------.
|
||||
| Tab | " | , | . | P | Y | F | G | C | R | L | \ |
|
||||
|------+------+------+------+------+-----+------+------+------+------+------+------|
|
||||
| BS | A | O | E | U | I | D | H | T | N | S | / |
|
||||
|------+------+------+------+------+-----+------+------+------+------+------+------|
|
||||
| LSPO | ; | Q | J | K | X | B | M | W | V | Z | RSPC |
|
||||
|------+------+------+------+------+-----+------+------+------+------+------+------|
|
||||
| Ctrl | LGUI | Lower| LAlt | SpaceLW | RSEnter | Fn | Mouse| Menu | Ctrl |
|
||||
`----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
||||
### LOWER - Numpad & Navigation keys
|
||||
```
|
||||
,-----------------------------------------. .-----------------------------------------.
|
||||
| Tab | PgUp | Home | Up | End | | | 7 | 8 | 9 | \+ | | Del |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| BS | PgDn | Left | Down |Right | | | 4 | 5 | 6 | Enter| | ' |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| LSPO | Z | X | C | V | | | 1 | 2 | 3 | Enter| | RSPC |
|
||||
|------+------+------+------+-------------| |-------------+------+------+------+------|
|
||||
| Ctrl | LGUI | Alt | LOWER| Space/Lower | | 0 | \. | Fn | Menu | Ctrl |
|
||||
'-----------------------------------------' '-----------------------------------------'
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| Tab | PgUp | Home | Up | End | | 7 | 8 | 9 | + | | Del |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| BS | PgDn | Left | Down |Right | | 4 | 5 | 6 | Enter| | ' |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| LSPO | Z | X | C | V | | 1 | 2 | 3 | Enter| | RSPC |
|
||||
|------+------+------+------+-------------+-------------+------+------+------+------|
|
||||
| Ctrl | LGUI | Alt | LOWER| Space/Lower | 0 | . | Fn | Menu | Ctrl |
|
||||
'-----------------------------------------------------------------------------------'
|
||||
```
|
||||
The *LOWER* layer contains a navigation cluster on the left hand and a numpad on the right. This layer is momentary when the left thumb-bar or LOWER key is held and toggled on/off when the LOWER key is tapped.
|
||||
|
||||
@@ -61,35 +90,35 @@ The *LOWER* layer contains a navigation cluster on the left hand and a numpad on
|
||||
|
||||
### RAISE - Symbol Layer
|
||||
```
|
||||
,-----------------------------------. .-----------------------------------.
|
||||
| Tab | | | | | | | | | | | | \ |
|
||||
|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----|
|
||||
| BS | ! | @ | # | $ | % | | ^ | & | * | - | + | ' |
|
||||
|-----+-----+-----+-----+-----------| |-----+-----+-----+-----+-----+-----|
|
||||
| LSPO| | | { | [ | ` | | | | ] | } | . | ? |RSPC |
|
||||
|-----+-----+-----+-----+-----+-----| |-----+-----+-----+-----+-----+-----|
|
||||
| Ctrl|LGUI | |Lower|Space/Lower| |Enter/Raise| Fn |Mouse| Menu| Ctrl|
|
||||
'-----------------------------------' '-----------------------------------'
|
||||
,-----------------------------------------------------------------------.
|
||||
| Tab | | | | | | | | | | | \ |
|
||||
|-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
| BS | ! | @ | # | $ | % | ^ | & | * | - | + | ' |
|
||||
|-----+-----+-----+-----+-----------+-----+-----+-----+-----+-----+-----|
|
||||
| LSPO| <- | %>% | { | [ | ` | | | ] | } | . | ? |RSPC |
|
||||
|-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
| Ctrl|LGUI | |Lower|Space/Lower|Enter/Raise| Fn |Mouse| Menu| Ctrl|
|
||||
'-----------------------------------------------------------------------'
|
||||
```
|
||||
The *RAISE* layer contains the symbols. This layer is momentary when the right thumb bar is held.
|
||||
|
||||
* Standard symbols can be found on the home row, in the traditional number row order as they occur on a standard keyboard.
|
||||
* Shifted symbols can be found on the second-from bottom row, abovee the bars - these include brackets, braces, grave and pipe keys.
|
||||
* At this stage, you need to shift to get to the Tilde key. I'd like to remove the shift requirement as I've done with the Pipe, but we'll see.
|
||||
* The Terminus_Mini implements the symbols on the top row, with numbers implemented on the home row. Implementing a third set of number keys (Base, *LOWER*, * RAISE*) in this keymap is probably overkill, but the current *RAISE* layout replicates the standard number row, so I don't see reason to change it.
|
||||
* Special operators for R (Pointer: <- and dplyr pipe: %>%) can be found next to the left shift key
|
||||
* The bottom row of this layer is a replication of that of the Base layer, except that the **TAP_TOGGLE** *LOWER* key is blocked with XXXXXXX.
|
||||
|
||||
### FUNCTION - Function & Media keys
|
||||
```
|
||||
,-----------------------------------------. .-----------------------------------------.
|
||||
| Esc | Mute | Vol- | Vol+ | | RESET| | POWER| | | | | Ins |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Caps | Stop | |<< | >/|| | >>| | | | | | | | |PrtSc |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| LSOB | | | | | | | | | | | |ScrLk |
|
||||
|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
| Ctrl | LGUI | Alt | | Space/Lower | | Enter/Raise | Fn | Mouse| |PsBrk |
|
||||
'-----------------------------------------' '-----------------------------------------'
|
||||
,-----------------------------------------------------------------------------------.
|
||||
| Esc | Mute | Vol- | Vol+ | | | | | | | | Ins |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Caps | Stop | |<< | >/|| | >>| | | | | | | |PrtSc |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| LSOB | | | | | | | | | | |ScrLk |
|
||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
| Ctrl | LGUI | Alt | | Space/Lower | Enter/Raise | Fn | Mouse| |PsBrk |
|
||||
'-----------------------------------------------------------------------------------'
|
||||
```
|
||||
The *FUNCTION* layer contains media keys as well as the F-row. This layer is momentary and requires Fn to be held.
|
||||
|
||||
@@ -97,19 +126,18 @@ The *FUNCTION* layer contains media keys as well as the F-row. This layer is mom
|
||||
* Mute, and Vol +/- are next to each other in ascending (L->R) volume order, Stop is below Mute.
|
||||
* Insert, Print Screen, Scroll Lock & Pause Break are all implemented on the far right column. I don't really use these keys so their position is not optimised.
|
||||
* Caps lock is implemented on this layer, in the traditional position, in place of BackSpace on the Base layer.
|
||||
* The RESET key will reset the Teensy for flashing and the Power key will initiate a shutdown of the PC. I've placed these in the far-reach index positions so that they are least likely to be pressed on accident. The power key is particularly dangerous, so I've placed it conciously on the right hand so that it becomes very awkward to activate with one hand (Fn needs to be held with the middle finger at the same time)
|
||||
|
||||
### MOUSE - Mouse keys: The functionality of this layer is not as optimal as using a true mouse, generally slower but will work in a pinch.
|
||||
```
|
||||
,----------------------------------------. .----------------------------------------.
|
||||
| Tab | WhlU | WhlL | MsUp | WhlR | | | | M3 | M4 | M5 | | |
|
||||
|------+------+------+------+------+-----| |-----+------+------+------+------+------|
|
||||
| | WhlD | MsL | MsDn | MsR | | | |LClick|RClick| | | |
|
||||
|------+------+------+------+------+-----| |-----+------+------+------+------+------|
|
||||
| LSPO | | | | | | | | | | | | RSCB |
|
||||
|------+------+------+------+------+-----| |-----+------+------+------+------+------|
|
||||
| Ctrl | | | |Sensitivity | | Sensitivity| |MOUSE | | Ctrl |
|
||||
'----------------------------------------' '----------------------------------------'
|
||||
,---------------------------------------------------------------------------------.
|
||||
| Tab | WhlU | WhlL | MsUp | WhlR | | | M3 | M4 | M5 | | |
|
||||
|------+------+------+------+------+-----+-----+------+------+------+------+------|
|
||||
| | WhlD | MsL | MsDn | MsR | | |LClick|RClick| | | |
|
||||
|------+------+------+------+------+-----+-----+------+------+------+------+------|
|
||||
| LSPO | | | | | | | | | | | RSCB |
|
||||
|------+------+------+------+------+-----+-----+------+------+------+------+------|
|
||||
| Ctrl | | | |Sensitivity | Sensitivity| |MOUSE | | Ctrl |
|
||||
'---------------------------------------------------------------------------------'
|
||||
```
|
||||
The *MOUSE* layer contains keys replicating functions found on the mouse.
|
||||
|
||||
@@ -117,3 +145,16 @@ The *MOUSE* layer contains keys replicating functions found on the mouse.
|
||||
keys.
|
||||
*) The primary click (right & left) buttons are on the right home row (index & middle fingers)
|
||||
* Secondary click buttons are above the standard keys (M3/Wheel click, M4, M5) but I do not use this function.
|
||||
|
||||
### ADJUST - Keyboard Settings: Primarily used to change the base layer at this stage
|
||||
```
|
||||
,----------------------------------------------------------------------------------.
|
||||
| | | | | |RESET | |TermOn|TermOf| | | Del |
|
||||
|------+------+------+------+------+------+-----+------+------+------+------+------|
|
||||
| | | | | | | |Qwerty|Colemk|Dvorak| | |
|
||||
|------+------+------+------+------+------+-----+------+------+------+------+------|
|
||||
| | | | | | | | | | | | |
|
||||
|------+------+------+------+------+------+-----+------+------+------+------+------|
|
||||
| | |/LOWER| | | | | |/RAISE| |
|
||||
`----------------------------------------------------------------------------------'
|
||||
```
|
||||
|
@@ -28,13 +28,13 @@
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLED_NUM 7 // Number of LEDs
|
||||
#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 2
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 4
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
|
@@ -14,37 +14,21 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "woodpad.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.
|
||||
#define _NUMLOCK 0
|
||||
#define _NAV 1
|
||||
#define _DIABLO 2
|
||||
#define _MACROS 3
|
||||
#define _MEDIA 4
|
||||
// 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
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define rgblight_set_blue rgblight_sethsv (0xFF, 0xFF, 0xFF);
|
||||
#define rgblight_set_red rgblight_sethsv (0x00, 0xFF, 0xFF);
|
||||
#define rgblight_set_green rgblight_sethsv (0x78, 0xFF, 0xFF);
|
||||
#define rgblight_set_orange rgblight_sethsv (0x1E, 0xFF, 0xFF);
|
||||
#define rgblight_set_teal rgblight_sethsv (0xC3, 0xFF, 0xFF);
|
||||
#define rgblight_set_magenta rgblight_sethsv (0x12C, 0xFF, 0xFF);
|
||||
#define rgblight_set_yellow rgblight_sethsv (0x3C, 0xFF, 0xFF);
|
||||
#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF);
|
||||
#endif
|
||||
|
||||
//define layer change stuff for underglow indicator
|
||||
bool skip_leds = false;
|
||||
|
||||
bool is_overwatch = false;
|
||||
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
//define diablo macro timer variables
|
||||
@@ -54,76 +38,61 @@ static uint8_t diablo_key_time[4];
|
||||
|
||||
|
||||
bool check_dtimer(uint8_t dtimer) {
|
||||
// has the correct number of seconds elapsed (as defined by diablo_times)
|
||||
return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true;
|
||||
// has the correct number of seconds elapsed (as defined by diablo_times)
|
||||
return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
KC_DIABLO_CLEAR,
|
||||
KC_OVERWATCH,
|
||||
KC_SALT,
|
||||
KC_MORESALT,
|
||||
KC_SALTHARD,
|
||||
KC_GOODGAME,
|
||||
KC_SYMM,
|
||||
KC_DOOMFIST,
|
||||
KC_JUSTGAME,
|
||||
KC_GLHF,
|
||||
KC_TORB,
|
||||
KC_MAKE
|
||||
};
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
enum {
|
||||
TD_DIABLO_1 = 0,
|
||||
TD_DIABLO_2,
|
||||
TD_DIABLO_3,
|
||||
TD_DIABLO_4
|
||||
TD_D3_1 = 0,
|
||||
TD_D3_2,
|
||||
TD_D3_3,
|
||||
TD_D3_4
|
||||
};
|
||||
|
||||
|
||||
// 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];
|
||||
}
|
||||
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];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
diablo_tapdance_master(state, user_data, 3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// tap once to disable, and more to enable timed micros
|
||||
[TD_DIABLO_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
|
||||
[TD_DIABLO_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
|
||||
[TD_DIABLO_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
|
||||
[TD_DIABLO_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
|
||||
// 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),
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -148,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_ESC, _______, _______, _______,\
|
||||
KC_S, KC_F, KC_I, KC_M, \
|
||||
KC_1, KC_2, KC_3, KC_4, \
|
||||
TD(TD_DIABLO_1), TD(TD_DIABLO_2), TD(TD_DIABLO_3), TD(TD_DIABLO_4), \
|
||||
TD(TD_D3_1), TD(TD_D3_2), TD(TD_D3_3), TD(TD_D3_4), \
|
||||
_______, KC_DIABLO_CLEAR, KC_Q, SFT_T(KC_SPACE) \
|
||||
),
|
||||
#else
|
||||
@@ -166,11 +135,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_OVERWATCH, _______, _______, XXXXXXX,\
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_JUSTGAME, \
|
||||
KC_SYMM, KC_DOOMFIST, KC_TORB, KC_GOODGAME, \
|
||||
KC_SYMM, KC_TORB, XXXXXXX, KC_GOODGAME, \
|
||||
KC_SALT, KC_MORESALT, KC_SALTHARD, KC_GLHF \
|
||||
),
|
||||
[_MEDIA] = KEYMAP( /* Base */
|
||||
RESET, KC_MUTE, KC_VOLD, KC_VOLU,\
|
||||
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, \
|
||||
@@ -181,249 +150,89 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
void numlock_led_on(void) {
|
||||
PORTF |= (1<<7);
|
||||
PORTF |= (1 << 7);
|
||||
}
|
||||
|
||||
void numlock_led_off(void) {
|
||||
PORTF &= ~(1<<7);
|
||||
PORTF &= ~(1 << 7);
|
||||
}
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint16_t kc;
|
||||
if (is_overwatch) {
|
||||
kc = KC_BSPC;
|
||||
} else {
|
||||
kc = KC_ENTER;
|
||||
}
|
||||
switch (keycode) {
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
case KC_DIABLO_CLEAR: // reset all Diable timers, disabling them
|
||||
if (record->event.pressed) {
|
||||
uint8_t dtime;
|
||||
case KC_DIABLO_CLEAR: // reset all Diable timers, disabling them
|
||||
if (record->event.pressed) {
|
||||
uint8_t dtime;
|
||||
|
||||
for (dtime = 0; dtime < 4; dtime++) {
|
||||
diablo_key_time[dtime] = diablo_times[0];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
for (dtime = 0; dtime < 4; dtime++) {
|
||||
diablo_key_time[dtime] = diablo_times[0];
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
#endif
|
||||
case KC_OVERWATCH:
|
||||
if (record->event.pressed) {
|
||||
is_overwatch = !is_overwatch;
|
||||
}
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
is_overwatch ? rgblight_mode(17) : rgblight_mode(18);
|
||||
#endif
|
||||
return false;
|
||||
break;
|
||||
case KC_SALT:
|
||||
if (!record->event.pressed) {
|
||||
register_code(kc);
|
||||
unregister_code(kc);
|
||||
_delay_ms(50);
|
||||
SEND_STRING("Salt, salt, salt...");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_MORESALT:
|
||||
if (!record->event.pressed) {
|
||||
register_code(kc);
|
||||
unregister_code(kc);
|
||||
_delay_ms(50);
|
||||
SEND_STRING("Please sir, can I have some more salt?!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_SALTHARD:
|
||||
if (!record->event.pressed) {
|
||||
register_code(kc);
|
||||
unregister_code(kc);
|
||||
_delay_ms(50);
|
||||
SEND_STRING("Your salt only makes my penis that much harder, and even more aggressive!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_GOODGAME:
|
||||
if (!record->event.pressed) {
|
||||
register_code(kc);
|
||||
unregister_code(kc);
|
||||
_delay_ms(50);
|
||||
SEND_STRING("Good game, everyone!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_GLHF:
|
||||
if (!record->event.pressed) {
|
||||
register_code(kc);
|
||||
unregister_code(kc);
|
||||
_delay_ms(50);
|
||||
SEND_STRING("Good luck, have fun!!!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_SYMM:
|
||||
if (!record->event.pressed) {
|
||||
register_code(kc);
|
||||
unregister_code(kc);
|
||||
_delay_ms(50);
|
||||
SEND_STRING("Left click to win!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_DOOMFIST:
|
||||
if (!record->event.pressed) {
|
||||
register_code(kc);
|
||||
unregister_code(kc);
|
||||
_delay_ms(50);
|
||||
SEND_STRING("Hey, look at me. I'm Doomfist, and I'm overpowered! All I do is spam punches all day! I'm DPS, tank and defense, rolled into one! All I need is team healing to be complete!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_JUSTGAME:
|
||||
|
||||
if (!record->event.pressed) {
|
||||
register_code(kc);
|
||||
unregister_code(kc);
|
||||
_delay_ms(50);
|
||||
SEND_STRING("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.");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_TORB:
|
||||
|
||||
if (!record->event.pressed) {
|
||||
register_code(kc);
|
||||
unregister_code(kc);
|
||||
_delay_ms(50);
|
||||
SEND_STRING("That was positively riveting!");
|
||||
register_code(KC_ENTER);
|
||||
unregister_code(KC_ENTER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_MAKE:
|
||||
if (!record->event.pressed) {
|
||||
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP SS_TAP(X_ENTER));
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
|
||||
// Sends the key press to system, but only if on the Diablo layer
|
||||
void send_diablo_keystroke(uint8_t diablo_key) {
|
||||
if (biton32(layer_state) == _DIABLO) {
|
||||
switch (diablo_key) {
|
||||
case 0:
|
||||
SEND_STRING("1");
|
||||
break;
|
||||
case 1:
|
||||
SEND_STRING("2");
|
||||
break;
|
||||
case 2:
|
||||
SEND_STRING("3");
|
||||
break;
|
||||
case 3:
|
||||
SEND_STRING("4");
|
||||
break;
|
||||
}
|
||||
if (biton32(layer_state) == _DIABLO) {
|
||||
switch (diablo_key) {
|
||||
case 0:
|
||||
SEND_STRING("1");
|
||||
break;
|
||||
case 1:
|
||||
SEND_STRING("2");
|
||||
break;
|
||||
case 2:
|
||||
SEND_STRING("3");
|
||||
break;
|
||||
case 3:
|
||||
SEND_STRING("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;
|
||||
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);
|
||||
}
|
||||
for (dtime = 0; dtime < 4; dtime++) {
|
||||
if (check_dtimer(dtime) && diablo_key_time[dtime]) {
|
||||
diablo_timer[dtime] = timer_read();
|
||||
send_diablo_keystroke(dtime);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
void matrix_init_user(void) {
|
||||
// set Numlock LED to output and low
|
||||
DDRF |= (1<<7);
|
||||
PORTF &= ~(1<<7);
|
||||
void matrix_init_keymap(void) {
|
||||
// set Numlock LED to output and low
|
||||
DDRF |= (1 << 7);
|
||||
PORTF &= ~(1 << 7);
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable();
|
||||
rgblight_set_teal;
|
||||
rgblight_mode(1);
|
||||
#endif
|
||||
|
||||
if (!(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK)) ){
|
||||
register_code(KC_NUMLOCK);
|
||||
unregister_code(KC_NUMLOCK);
|
||||
}
|
||||
if (!(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK))) {
|
||||
register_code(KC_NUMLOCK);
|
||||
unregister_code(KC_NUMLOCK);
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
numlock_led_off();
|
||||
if (is_overwatch && biton32(layer_state) == _MACROS) {
|
||||
numlock_led_on();
|
||||
}
|
||||
void matrix_scan_keymap(void) {
|
||||
numlock_led_off();
|
||||
if ((is_overwatch && biton32(layer_state) == _MACROS) || (biton32(layer_state) == _NAV)) {
|
||||
numlock_led_on();
|
||||
}
|
||||
|
||||
// Run Diablo 3 macro checking code.
|
||||
// Run Diablo 3 macro checking code.
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
run_diablo_macro_check();
|
||||
run_diablo_macro_check();
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_kb(uint32_t state) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
// Check layer, and apply color if its changed since last check
|
||||
switch (biton32(state)) {
|
||||
case _NAV:
|
||||
rgblight_set_blue;
|
||||
rgblight_mode(1);
|
||||
break;
|
||||
case _MACROS:
|
||||
rgblight_set_orange;
|
||||
is_overwatch ? rgblight_mode(17) : rgblight_mode(18);
|
||||
break;
|
||||
case _DIABLO:
|
||||
rgblight_set_red;
|
||||
rgblight_mode(5);
|
||||
break;
|
||||
case _MEDIA:
|
||||
rgblight_set_green;
|
||||
rgblight_mode(22);
|
||||
break;
|
||||
default:
|
||||
rgblight_set_teal;
|
||||
rgblight_mode(1);
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
return state;
|
||||
}
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
||||
|
@@ -4,6 +4,7 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
RGBLIGHT_ENABLE = yes
|
||||
MIDI_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
NKRO_ENABLE = yes
|
||||
|
||||
EXTRAFLAGS = -flto
|
||||
|
||||
|
@@ -29,8 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define TAPPING_TOGGLE 3
|
||||
|
||||
#define NO_UART 1
|
||||
#define BOOTLOADHID_BOOTLOADER 1
|
||||
|
@@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "jj40.h"
|
||||
#include "action_layer.h"
|
||||
#include "rgblight.h"
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
|
@@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "jj40.h"
|
||||
#include "action_layer.h"
|
||||
#include "rgblight.h"
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
@@ -45,24 +44,24 @@ 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_SCLN, KC_ENT, \
|
||||
KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER), KC_LSFT, MO(_RAISE), KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_LSFT, TT(_RAISE), KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | Left | Down | Up |Right | | |
|
||||
* | Ins | | | | | | Left | Down | Up |Right | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | Back | Fwd | | | | | | Mute | Vol- | Vol+ | |
|
||||
* |PrScr | Back | Fwd | | | | | | Mute | Vol- | Vol+ | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | Lock | | | Prev | Stop | Play | Next |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = KEYMAP( \
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
|
||||
KC_DEL, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
_______, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \
|
||||
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_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
KC_PSCR, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \
|
||||
_______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \
|
||||
),
|
||||
|
||||
@@ -70,17 +69,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Caps | & | * | _ | ( | ) | 7 | 8 | 9 | = | Bksp | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Ins | $ | % | ^ | [ | ] | 4 | 5 | 6 | - | + | | |
|
||||
* | Tab | $ | % | ^ | [ | ] | 4 | 5 | 6 | - | + |Enter |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | ` | ! | @ | # | { | } | 1 | 2 | 3 | . | \ | ' |
|
||||
* | ` | ! | @ | # | { | } | 1 | 2 | 3 | . | \ | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | OS | Alt | |Shift | | 0 | Home | PgDn | PgUp | End |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = KEYMAP( \
|
||||
KC_CAPS, KC_AMPR, KC_ASTR, KC_UNDS, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_EQL, KC_BSPC, KC_DEL, \
|
||||
KC_INS, KC_DLR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, KC_PIPE, \
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, _______, KC_BSLS, _______, \
|
||||
KC_TAB, KC_DLR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, _______, \
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, _______, KC_BSLS, KC_PIPE, \
|
||||
_______, _______, _______, _______, _______, _______, KC_0, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
|
||||
)
|
||||
};
|
||||
|
190
keyboards/knops/mini/config.h
Normal file
190
keyboards/knops/mini/config.h
Normal file
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
Copyright 2017 Pawnerd
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEFD
|
||||
#define PRODUCT_ID 0x9460
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Alltrons IT
|
||||
#define PRODUCT Knops Mini
|
||||
#define DESCRIPTION Advanced 3x2 macrokeyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 1
|
||||
#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 { D0 }
|
||||
#define MATRIX_COL_PINS { F7, F6, F5, F4, F1, F0 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
// #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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* 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
|
||||
|
||||
#endif
|
24
keyboards/knops/mini/keymaps/default/config.h
Normal file
24
keyboards/knops/mini/keymaps/default/config.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2017 Pawnerd
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
361
keyboards/knops/mini/keymaps/default/keymap.c
Normal file
361
keyboards/knops/mini/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,361 @@
|
||||
#include "mini.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
KEYMAP(
|
||||
LT(3, KC_MSTP), KC_VOLU, KC_MPLY, KC_MPRV, KC_VOLD, KC_MNXT),
|
||||
|
||||
KEYMAP(
|
||||
LT(3, KC_ESC), M(3), M(4), M(5), M(6), M(7)),
|
||||
|
||||
KEYMAP(
|
||||
LT(3, KC_1), KC_2, KC_3, KC_4, M(0), M(1)),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, RESET, TO(0), TO(1), TO(2)),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
//keyevent_t event = record->event;
|
||||
|
||||
switch (id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(T), T(G), T(L), T(H), T(F), T(ENT), END );
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( T(T), T(G), T(G), T(ENT), END );
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(NO), T(L), U(NO), END );
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(Z), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), D(LSFT), T(Z), U(LSFT), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(X), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(C), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (record->event.pressed) {
|
||||
return MACRO( D(LCTL), T(V), U(LCTL), END );
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
void set_switch_led(int ledId, bool state) {
|
||||
if(state) {
|
||||
switch(ledId) {
|
||||
case 1:
|
||||
PORTD |= (1<<7);
|
||||
break;
|
||||
case 2:
|
||||
PORTC |= (1<<6);
|
||||
break;
|
||||
case 3:
|
||||
PORTD |= (1<<4);
|
||||
break;
|
||||
case 4:
|
||||
PORTE |= (1<<6);
|
||||
break;
|
||||
case 5:
|
||||
PORTB |= (1<<4);
|
||||
break;
|
||||
case 6:
|
||||
PORTD |= (1<<6);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch(ledId) {
|
||||
case 1:
|
||||
PORTD &= ~(1<<7);
|
||||
break;
|
||||
case 2:
|
||||
PORTC &= ~(1<<6);
|
||||
break;
|
||||
case 3:
|
||||
PORTD &= ~(1<<4);
|
||||
break;
|
||||
case 4:
|
||||
PORTE &= ~(1<<6);
|
||||
break;
|
||||
case 5:
|
||||
PORTB &= ~(1<<4);
|
||||
break;
|
||||
case 6:
|
||||
PORTD &= ~(1<<6);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void set_layer_led(int layerId) {
|
||||
PORTD |= (1<<5);
|
||||
PORTB &= ~(1<<6);
|
||||
PORTB |= (1<<0);
|
||||
switch(layerId) {
|
||||
case 0:
|
||||
PORTD &= ~(1<<5);
|
||||
break;
|
||||
case 1:
|
||||
PORTB |= (1<<6);
|
||||
break;
|
||||
case 2:
|
||||
PORTB &= ~(1<<0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
led_init_ports();
|
||||
|
||||
|
||||
PORTD |= (1<<7);
|
||||
PORTC |= (1<<6);
|
||||
PORTD |= (1<<4);
|
||||
PORTE |= (1<<6);
|
||||
PORTB |= (1<<4);
|
||||
PORTD |= (1<<6);
|
||||
|
||||
set_layer_led(0);
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
void led_init_ports() {
|
||||
// led voor switch #1
|
||||
DDRD |= (1<<7);
|
||||
PORTD &= ~(1<<7);
|
||||
|
||||
// led voor switch #2
|
||||
DDRC |= (1<<6);
|
||||
PORTC &= ~(1<<6);
|
||||
|
||||
// led voor switch #3
|
||||
DDRD |= (1<<4);
|
||||
PORTD &= ~(1<<4);
|
||||
|
||||
// led voor switch #4
|
||||
DDRE |= (1<<6);
|
||||
PORTE &= ~(1<<6);
|
||||
|
||||
// led voor switch #5
|
||||
DDRB |= (1<<4);
|
||||
PORTB &= ~(1<<4);
|
||||
|
||||
// led voor switch #6
|
||||
DDRD |= (1<<6);
|
||||
PORTD &= ~(1<<6);
|
||||
|
||||
/*
|
||||
DDRD |= (1<<7);
|
||||
PORTD |= (1<<7);
|
||||
|
||||
DDRC |= (1<<6);
|
||||
PORTC |= (1<<6);
|
||||
|
||||
DDRD |= (1<<4);
|
||||
PORTD |= (1<<4);
|
||||
|
||||
DDRE |= (1<<6);
|
||||
PORTE |= (1<<6);
|
||||
|
||||
DDRB |= (1<<4);
|
||||
PORTB |= (1<<4);
|
||||
|
||||
DDRD |= (1<<6);
|
||||
PORTD |= (1<<6);
|
||||
// */
|
||||
|
||||
DDRD |= (1<<5);
|
||||
DDRB |= (1<<6);
|
||||
DDRB |= (1<<0);
|
||||
//led_set_layer(0);
|
||||
}
|
||||
|
||||
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)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
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 {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* NOTE:
|
||||
*
|
||||
* In case you don't understand this coding stuff, please
|
||||
* feel free to mail me or post something
|
||||
* at the /r/knops subreddit and I will configure the code as
|
||||
* you wish for your needs to make the LEDs do what you want :-).
|
||||
*
|
||||
* Contact me at: support@knops.io
|
||||
*
|
||||
*
|
||||
* Knops Mini LED Numbers:
|
||||
* _____ _____ _____
|
||||
* | | | | | |
|
||||
* | 1 | | 2 | | 3 | <---
|
||||
* |_____| |_____| |_____| | These LEDs are called 'Switch LEDs'
|
||||
* _____ _____ _____ |----- To turn on/off these leds, use:
|
||||
* | | | | | | | set_switch_led( [1-6], [true/false]);
|
||||
* | 4 | | 5 | | 6 | <---
|
||||
* |_____| |_____| |_____|
|
||||
*
|
||||
* < 0 > < 1 > < 2 > <--- These front-LEDs are called 'Layer LEDs'
|
||||
* To turn one of them on, use:
|
||||
* set_layer_led( [0-2] );
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* This function led_set_layer gets called when you switch between layers.
|
||||
* It allows you to turn on and off leds for each different layer and do
|
||||
* other cool stuff. Currently the GUI does not have LED support. I am working
|
||||
* on that, but takes time.
|
||||
*/
|
||||
void led_set_layer(int layer) {
|
||||
switch(layer) {
|
||||
|
||||
/**
|
||||
* Here is an example to turn LEDs on and of. By default:
|
||||
* - the LEDs are turned on in layer 0
|
||||
* - the LEDs are turned off in layer 1
|
||||
* - the LEDs don't change from state for layer 2
|
||||
*/
|
||||
|
||||
case 0:
|
||||
set_layer_led(0); // Turn on only the first/left layer indicator
|
||||
set_switch_led(1, true);
|
||||
set_switch_led(2, true);
|
||||
set_switch_led(3, true);
|
||||
set_switch_led(4, true);
|
||||
set_switch_led(5, true);
|
||||
set_switch_led(6, true);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
set_layer_led(1); // Turn on only the second/middle layer indicator
|
||||
set_switch_led(1, false);
|
||||
set_switch_led(2, false);
|
||||
set_switch_led(3, false);
|
||||
set_switch_led(4, false);
|
||||
set_switch_led(5, false);
|
||||
set_switch_led(6, false);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
set_layer_led(2); // Turn on only the third/right layer indicator
|
||||
|
||||
// Keep leds for layer two in their current state, since we don't use set_switch_led(SWITCH_ID, TRUE_OR_FALSE)
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case TO(0):
|
||||
if (record->event.pressed) {
|
||||
led_set_layer(0);
|
||||
}
|
||||
break;
|
||||
case TO(1):
|
||||
if (record->event.pressed) {
|
||||
led_set_layer(1);
|
||||
}
|
||||
break;
|
||||
case TO(2):
|
||||
if (record->event.pressed) {
|
||||
led_set_layer(2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
7
keyboards/knops/mini/keymaps/default/readme.md
Normal file
7
keyboards/knops/mini/keymaps/default/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Default Knops Mini Layout
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
This is the default layout that comes flashed on every Knops Mini. For your use, you probably want to change this. We suggest you to use [our configurator tool](http://knops.io/configurator.html) for this.
|
44
keyboards/knops/mini/mini.c
Normal file
44
keyboards/knops/mini/mini.c
Normal file
@@ -0,0 +1,44 @@
|
||||
/* Copyright 2017 Kayle Knops
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "mini.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);
|
||||
}
|
||||
*/
|
30
keyboards/knops/mini/mini.h
Normal file
30
keyboards/knops/mini/mini.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Copyright 2017 Pawnerd
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "quantum.h"
|
||||
|
||||
#ifndef KNOPS_MINI_H
|
||||
#define KNOPS_MINI_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 KEYMAP( \
|
||||
K00, K01, K02, K03, K04, K05 \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05 }, \
|
||||
}
|
||||
#endif
|
21
keyboards/knops/mini/readme.md
Normal file
21
keyboards/knops/mini/readme.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Knops Mini
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
A fully customizable 3x2 macropad. An exploded view of the keyboard is [available here](https://i.imgur.com/H83l5H8.gif).
|
||||
|
||||
*The best way to change settings on your keyboard*, is by using [our official configurator tool](http://knops.io/configurator.html).
|
||||
|
||||
* Keyboard Maintainer: [Pawnerd](https://github.com/pawnerd)
|
||||
* Contact / Questions (by e-mail): kayle `at` knops `dot` io
|
||||
* Hardware Supported: Knops Mini
|
||||
* rev1 (1.0) (Sold by CMStore EU/USA/CAD from 27th of august, 2017)
|
||||
* Hardware Availability: [knops.io](http://knops.io/knopsmini.html), [Direct EU](http://www.cmstore.eu/maker-made/knops-mini-macro-keyboard/), [Direct USA/CAN](http://www.cmstore-usa.com/knops-mini-macro-keyboard/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make knops/mini:default
|
||||
|
||||
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.
|
68
keyboards/knops/mini/rules.mk
Normal file
68
keyboards/knops/mini/rules.mk
Normal file
@@ -0,0 +1,68 @@
|
||||
# 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
|
||||
|
||||
|
||||
# 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
|
10
keyboards/knops/readme.md
Normal file
10
keyboards/knops/readme.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Knops
|
||||
|
||||

|
||||
|
||||
[Knops](http://www.knops.io/) makes fully customizable custom keyboards in a variety of formfactors. So far the Knops Mini, a 3x2 macro keypad is the biggest success. Inside this directory you'll find support for the entire line of Knops products.
|
||||
|
||||
* Maintainer: [Pawnerd](https://github.com/pawnerd)
|
||||
* Hardware Supported:
|
||||
* [`Mini`](mini/): Knops Mini
|
||||
* Hardware Availability: [knops.io](https://www.knops.io/)
|
@@ -23,7 +23,6 @@
|
||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
|
||||
)
|
||||
|
||||
#define LAYOUT_ortho_4x12 KEYMAP
|
||||
#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -128,8 +128,13 @@ void matrix_init(void)
|
||||
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;
|
||||
|
||||
|
@@ -57,4 +57,6 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#define LAYOUT_ortho_4x12 KEYMAP
|
||||
|
||||
#endif
|
||||
|
@@ -23,7 +23,6 @@
|
||||
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \
|
||||
)
|
||||
|
||||
#define LAYOUT_ortho_4x12 KEYMAP
|
||||
#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -57,4 +57,6 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#define LAYOUT_ortho_4x12 KEYMAP
|
||||
|
||||
#endif
|
||||
|
@@ -57,4 +57,6 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#define LAYOUT_ortho_4x12 KEYMAP
|
||||
|
||||
#endif
|
||||
|
22
keyboards/mitosis/keymaps/datagrok/config.h
Normal file
22
keyboards/mitosis/keymaps/datagrok/config.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// I use a pro micro clocked at 8Mhz. It can't reach 1M baud, so this is the
|
||||
// next fastest possible baud without errors. I don't notice any difference in
|
||||
// behavior at this slower speed. (So I think it should maybe be the default,
|
||||
// to allow a single codebase to support both available flavors of pro micro.)
|
||||
// This requires a corresponding change to the wireless module firmware; see
|
||||
// https://github.com/reversebias/mitosis/pull/10
|
||||
#undef SERIAL_UART_BAUD // avoids redefinition warning
|
||||
#define SERIAL_UART_BAUD 250000
|
||||
|
||||
// TODO: figure out which of these I can safely enable to reduce firmware size.
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT // can't; errors
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
@@ -1,34 +1,12 @@
|
||||
#include "mitosis.h"
|
||||
|
||||
// Arrows in a layer in the home position.
|
||||
// Fn+Arrows = PgUp PgDn Home End, which is intuitive for me
|
||||
//
|
||||
// Since QWERTY and WORKMAN keep angle brackets together, I wanted to place
|
||||
// other enclosing symbols on the same keys. So, 9 and 0 and [ and ] land there
|
||||
// in other layers. That informed the numbers placement, which informed the
|
||||
// function-key placement.
|
||||
//
|
||||
// To do:
|
||||
// - Improve LED indications (may require modding bluetooth firmware):
|
||||
// - Is any board nonresponsive (which one?)
|
||||
// - Does either board have a low battery?
|
||||
// - Use "shifted keys" hack to make programming symbols easier to type
|
||||
// - Add "media" keysyms, Insert, PrintScr, Pause/Break
|
||||
// - Dynamically toggle QWERTY or other layouts
|
||||
// - See if the henkans placement is at all useful for Japanese speakers, or
|
||||
// abuse different keysyms
|
||||
// - Overlay a 10key numpad somewhere
|
||||
// - Mod a speaker onto my receiver and enable tones
|
||||
// - Mod more indicator LEDs onto my receiver
|
||||
// - Do something with Num/Caps/Scroll lock?
|
||||
// - Improve tri-layer behavior
|
||||
|
||||
enum mitosis_layers
|
||||
{
|
||||
_WORKMAN,
|
||||
_FUNC,
|
||||
_NUMS,
|
||||
_NMFN
|
||||
_xW, // workman
|
||||
_xQ, // qwerty
|
||||
_xS, // symbols
|
||||
_xN, // numbers
|
||||
_xF // functions
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
@@ -38,67 +16,125 @@ enum mitosis_layers
|
||||
#define KC_LMTA KC_LALT // For fun, name the mods like the space cadet keyboard does
|
||||
#define KC_RMTA KC_RALT // META
|
||||
#define KC_LSUP KC_LGUI // SUPER
|
||||
#define KC_RSUP KC_RGUI //
|
||||
#define KC_RSUP KC_RGUI //
|
||||
#define KC_RHYP KC_INT4 // HYPER (actually muhenkan 無変換 and henkan 変換)
|
||||
#define KC_LHYP KC_INT5 // or NFER/XFER.
|
||||
|
||||
// I didn't want to mess about with new keymappings and custom logic etc. to
|
||||
// enable tri-state layers like mitosis default does. This layout accomplishes
|
||||
// it with a small quirk that triggering both layers then releasing one
|
||||
// out-of-order will leave the tri-state triggered. Which doesn't bother me.
|
||||
// Momentary tri-state layers. Mitosis default keymap does this too but employs
|
||||
// new keymappings and a bunch of conditional code. This simpler keymap
|
||||
// accomplishes it, but with a small quirk: triggering both layers then
|
||||
// releasing one out-of-order will leave the tri-state triggered until the
|
||||
// other is released. Which doesn't bother me.
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_WORKMAN] = {
|
||||
{KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN},
|
||||
{KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I},
|
||||
{KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH},
|
||||
{XXXXXXX, MO(_NUMS), KC_LCTL, KC_LSFT, KC_BSPC, KC_SPC, KC_RSFT, KC_RCTL, MO(_NUMS), XXXXXXX},
|
||||
{XXXXXXX, KC_LHYP, KC_LSUP, KC_LMTA, MO(_FUNC), MO(_FUNC), KC_RMTA, KC_RSUP, KC_RHYP, XXXXXXX}
|
||||
},
|
||||
[_FUNC] = {
|
||||
{KC_ESC, _______, KC_UP, _______, _______, _______, _______, _______, _______, KC_QUOT},
|
||||
{KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_GRV},
|
||||
{_______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS},
|
||||
{XXXXXXX, MO(_NMFN), _______, _______, KC_DEL, KC_ENT, _______, _______, MO(_NMFN), XXXXXXX},
|
||||
{XXXXXXX, _______, _______, _______, ___M___, ___M___, _______, _______, _______, XXXXXXX},
|
||||
},
|
||||
[_NUMS] = {
|
||||
{_______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_4},
|
||||
{_______, _______, _______, _______, _______, _______, KC_5, KC_6, KC_7, KC_8},
|
||||
{_______, _______, _______, _______, _______, _______, KC_MINS, KC_9, KC_0, KC_EQL},
|
||||
{XXXXXXX, ___M___, _______, _______, _______, _______, _______, _______, ___M___, XXXXXXX},
|
||||
{XXXXXXX, _______, _______, _______, MO(_NMFN), MO(_NMFN), _______, _______, _______, XXXXXXX},
|
||||
},
|
||||
[_NMFN] = {
|
||||
{_______, _______, KC_PGUP, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4},
|
||||
{_______, KC_HOME, KC_PGDN, KC_END, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8},
|
||||
{_______, _______, _______, _______, _______, _______, KC_F8, KC_F9, KC_F10, KC_F12},
|
||||
{XXXXXXX, ___M___, _______, _______, _______, _______, _______, _______, ___M___, XXXXXXX},
|
||||
{XXXXXXX, _______, _______, _______, ___M___, ___M___, _______, _______, _______, XXXXXXX},
|
||||
},
|
||||
[_xW] = {
|
||||
{KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN},
|
||||
{KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I},
|
||||
{KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_QUOT},
|
||||
{XXXXXXX, KC_LSUP, KC_LCTL, MO(_xN), KC_LSFT, KC_RSFT, MO(_xN), KC_RCTL, KC_RSUP, XXXXXXX},
|
||||
{XXXXXXX, KC_LHYP, KC_LMTA, MO(_xS), KC_BSPC, KC_SPC, MO(_xS), KC_RMTA, KC_RHYP, XXXXXXX}
|
||||
},
|
||||
[_xQ] = {
|
||||
{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_QUOT},
|
||||
{XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX},
|
||||
{XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX}
|
||||
},
|
||||
[_xS] = {
|
||||
{KC_ESC, _______, KC_UP, _______, _______, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TILD},
|
||||
{KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_CIRC, KC_AMPR, KC_PIPE, KC_GRV, KC_UNDS},
|
||||
{KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_RABK, KC_LABK, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH},
|
||||
{XXXXXXX, _______, _______, MO(_xF), _______, _______, MO(_xF), _______, _______, XXXXXXX},
|
||||
{XXXXXXX, _______, _______, ___M___, KC_DEL, KC_ENT, ___M___, _______, _______, XXXXXXX},
|
||||
},
|
||||
[_xN] = {
|
||||
{_______, _______, _______, _______, _______, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_P0},
|
||||
{_______, _______, _______, _______, _______, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS},
|
||||
{_______, _______, _______, _______, _______, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_PEQL},
|
||||
{XXXXXXX, _______, _______, ___M___, _______, _______, ___M___, _______, _______, XXXXXXX},
|
||||
{XXXXXXX, _______, _______, MO(_xF), _______, KC_PENT, MO(_xF), _______, _______, XXXXXXX},
|
||||
},
|
||||
[_xF] = {
|
||||
{_______, _______, KC_PGUP, _______, KC_VOLU, KC_F13, KC_F7, KC_F8, KC_F9, KC_F10},
|
||||
{_______, KC_HOME, KC_PGDN, KC_END, KC_VOLD, KC_F14, KC_F4, KC_F5, KC_F6, KC_F11},
|
||||
{TG(_xQ), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_F15, KC_F1, KC_F2, KC_F3, KC_F12},
|
||||
{XXXXXXX, _______, _______, ___M___, _______, _______, ___M___, _______, _______, XXXXXXX},
|
||||
{XXXXXXX, _______, _______, _______, ___M___, ___M___, _______, _______, _______, XXXXXXX},
|
||||
},
|
||||
};
|
||||
|
||||
// This is a hack to place <question mark> on <shift-comma> and <exclaimation
|
||||
// mark> on <shift-period>, when using an operating system configured for a
|
||||
// US/qwerty layout.
|
||||
bool comm_shifted = false;
|
||||
bool ques_shifted = false;
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
uint8_t shifted;
|
||||
uint16_t s_keycode;
|
||||
bool *k_shifted;
|
||||
|
||||
switch (keycode) {
|
||||
case KC_COMM:
|
||||
s_keycode = KC_SLSH;
|
||||
k_shifted = &comm_shifted;
|
||||
break;
|
||||
case KC_DOT:
|
||||
s_keycode = KC_1;
|
||||
k_shifted = &ques_shifted;
|
||||
break;
|
||||
default:
|
||||
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.
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the bits of A selected by MASK to the corresponding bits of B
|
||||
#define setbits(A, B, MASK) A = (A & (B | ~MASK)) | (B & MASK)
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
//
|
||||
// Bit # 7 6 5 4 3 2 1 0
|
||||
// layer_state: [ | | | _xF | _xN | _xS | _xQ | _xW ]
|
||||
// usb_led [ | | |kana |cmps |scrl |caps | num ]
|
||||
// PORTB: [ NC | 10 | 9 | 8 | 14 | 16 | 15 |rxled]
|
||||
// PORTC: [ NC | 5 | | | | | | ]
|
||||
// PORTD: [ 6 | NC |txled| 4 | tx* | rx* | grn | p29 ]
|
||||
// PORTE: [ | 7 | | | | | | ]
|
||||
// PORTF: [ a0 | a1 | red | blu | | | NC | NC ]
|
||||
//
|
||||
// PD0 is connected to the pairing switch and p29 on the wireless module.
|
||||
// PF0,PF1,PB7,PC7,PD6 are not broken out by the pro micro board. I don't understand why.
|
||||
// PB1-PB6,PD4,PD5,PD6,PF6,PF7 are not connected to the Mitosis receiver
|
||||
// board. Each may be connected to an LED by way of a resistor (4.7k to
|
||||
// match the others) for a total of 14 additional indicators.
|
||||
|
||||
switch (layer) {
|
||||
case _WORKMAN:
|
||||
red_led_off;
|
||||
grn_led_off;
|
||||
break;
|
||||
case _FUNC:
|
||||
red_led_off;
|
||||
grn_led_on;
|
||||
break;
|
||||
case _NUMS:
|
||||
red_led_on;
|
||||
grn_led_off;
|
||||
break;
|
||||
case _NMFN:
|
||||
red_led_on;
|
||||
grn_led_on;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
// A simple (but technically inaccurate) model of the momentary layer state:
|
||||
// Fn1 key makes _xS active; indicator = red
|
||||
// Fn2 key makes _xN active; indicator = blue
|
||||
// Both keys make _xF active; indicator = purple
|
||||
// Toggling QWERTY mode makes indicator include green, so (red/blue/purple becomes yellow/cyan/white)
|
||||
|
||||
// negated because for ports 0=LED on.
|
||||
uint32_t portf_bits = ~(layer_state|layer_state<<1|(layer_state&0b100)<<3);
|
||||
setbits(PORTF, portf_bits, 0b00110000);
|
||||
setbits(PORTD, ~layer_state, 0b00000010);
|
||||
}
|
||||
|
||||
// vim: set sw=2 et:
|
||||
|
74
keyboards/mitosis/keymaps/datagrok/readme.md
Normal file
74
keyboards/mitosis/keymaps/datagrok/readme.md
Normal file
@@ -0,0 +1,74 @@
|
||||

|
||||
|
||||
[Keyboard layout editor source](http://www.keyboard-layout-editor.com/#/gists/e1a6a7a480fd4984c0bed38ee35f6c4f)
|
||||
|
||||
# a layout for the Mitosis
|
||||
|
||||
- Emphasis on momentary modifiers, all usable from either hand, arranged
|
||||
symmetrically, but distinguishable left/right by the OS. Shift, Fn1
|
||||
("Lower"), Fn2 ("Raise"), Super ("Windows"), Meta ("Alt"), Hyper.
|
||||
|
||||
- Fn1 and Fn2 are used to momentary-enable (like a shift key) one of three layers:
|
||||
|
||||
- Fn1 (Red): Symbols layer
|
||||
- Fn2 (Blue): Numbers layer
|
||||
- Both: Functions layer
|
||||
|
||||
- The base layer is a slight variant of [Workman][]. QWERTY may be toggled-on.
|
||||
|
||||
- Paired programming symbols (braces, brackets, parentheses) are arranged
|
||||
symmetrically in the symbols layer. `?` and `!` are moved to take the place
|
||||
of `<` and `>`.
|
||||
|
||||
- No OS keymap modification required.
|
||||
|
||||
## Design notes
|
||||
|
||||
- **I use an 8Mhz Pro Micro.** If you want to use this keymap with the standard
|
||||
16Mhz Pro Micro specified in the Mitosis design:
|
||||
|
||||
- Remove the lines in `rules.mk` mentioning `F_CPU` and `F_USB`.
|
||||
- Remove the lines in `config.h` mentioning `SERIAL_UART_BAUD`.
|
||||
|
||||
- I'm learning a new key placement, so might as well go all out and use an
|
||||
optimal non-QWERTY layout.
|
||||
|
||||
- I like the way Workman feels and some of its advantages over Colemak.
|
||||
Unfortunately, it was designed using a weighting system based on a standard
|
||||
column-staggered keyboard so is probably not as optimal as one could achieve
|
||||
on an ergonomic board like the Mitosis.
|
||||
|
||||
- Arrows in the home position (on a layer). Mod+Arrows = PgUp/PgDn/Home/End,
|
||||
which is intuitive for me
|
||||
|
||||
### Abandoned ideas
|
||||
|
||||
- ~~"Since QWERTY and Workman keep angle brackets together, place other
|
||||
enclosing symbols on the same keys. This informs the numbers placement,
|
||||
which informs the function-key placement."~~
|
||||
|
||||
- I tried this and it was bad. I don't like having to pick the right
|
||||
modifier to get the right flavor of bracket. Instead, now, one modifier
|
||||
activates a symbols layer where all brackets are easily accessible.
|
||||
|
||||
- Space/Enter to the left of layer select for Enter doesn't work well; I always
|
||||
trigger space first.
|
||||
|
||||
- I used to have Blue layer on ring finger, but that was too hard to use in
|
||||
conjunction with shift.
|
||||
|
||||
## To do
|
||||
|
||||
- Improve LED indications (may require modding bluetooth firmware):
|
||||
- Is any board nonresponsive (which one?)
|
||||
- Does either board have a low battery?
|
||||
- Add Insert, PrintScr, Pause/Break
|
||||
- Make QWERTY base layer for people who customize layout in software? Store
|
||||
default base layer in eeprom?
|
||||
- See if the henkans placement is at all useful for Japanese speakers, or abuse
|
||||
different keysyms
|
||||
- Mod a speaker onto my receiver and enable tones
|
||||
- Implement "layer lock" key
|
||||
- Improve tri-layer behavior
|
||||
|
||||
[Workman]: https://viralintrospection.wordpress.com/2010/09/06/a-different-philosophy-in-designing-keyboard-layouts/
|
15
keyboards/mitosis/keymaps/datagrok/rules.mk
Normal file
15
keyboards/mitosis/keymaps/datagrok/rules.mk
Normal file
@@ -0,0 +1,15 @@
|
||||
# I use an 8Mhz Pro Micro
|
||||
F_CPU = 8000000
|
||||
# Necessary, with above change?
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
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
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
# vim: set ts=8 noet:
|
@@ -28,4 +28,15 @@ void matrix_scan_kb(void) {
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ONEHAND_ENABLE
|
||||
__attribute__ ((weak))
|
||||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{{9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
|
||||
{{9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
|
||||
{{9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
|
||||
{{9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
|
||||
{{9, 4}, {8, 4}, {7, 4}, {6, 4}, {5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}},
|
||||
};
|
||||
#endif
|
||||
|
207
keyboards/mt40/config.h
Normal file
207
keyboards/mt40/config.h
Normal file
@@ -0,0 +1,207 @@
|
||||
/*
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x20A0
|
||||
#define PRODUCT_ID 0x422D
|
||||
|
||||
#define DEVICE_VER 0x0001
|
||||
|
||||
#define MANUFACTURER ThomasDehaeze
|
||||
#define PRODUCT mt40
|
||||
|
||||
#define DESCRIPTION A Planck clone
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 8
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
#define RGB_DI_PIN C0
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 12
|
||||
#define RGBLIGHT_SAT_STEP 15
|
||||
#define RGBLIGHT_VAL_STEP 18
|
||||
|
||||
#define NO_UART 1
|
||||
#define BOOTLOADHID_BOOTLOADER 1
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
/*
|
||||
* 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 CC6 0x63 // C3 */
|
||||
/* #define CB6 0x37 // B7 */
|
||||
/* #define CC7 0x62 // C2 */
|
||||
|
||||
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 }
|
||||
#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 */
|
||||
/* #define DIODE_DIRECTION COL2ROW */
|
||||
|
||||
#define BACKLIGHT_PIN D2
|
||||
|
||||
/* number of backlight levels */
|
||||
#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
|
||||
|
||||
|
||||
/* 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
|
||||
|
||||
#endif
|
104
keyboards/mt40/i2c.c
Normal file
104
keyboards/mt40/i2c.c
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <util/twi.h>
|
||||
|
||||
#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<<TWINT) | (1<<TWSTA) | (1<<TWEN);
|
||||
while (!(TWCR & (1<<TWINT)));
|
||||
|
||||
// check if the start condition was successfully transmitted
|
||||
if ((TWSR & 0xF8) != TW_START) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// transmit address and wait
|
||||
TWDR = address;
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
while (!(TWCR & (1<<TWINT)));
|
||||
|
||||
// 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 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void i2c_stop(void) {
|
||||
TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO);
|
||||
}
|
||||
|
||||
uint8_t i2c_write(uint8_t data) {
|
||||
TWDR = data;
|
||||
|
||||
// transmit data and wait
|
||||
TWCR = (1<<TWINT) | (1<<TWEN);
|
||||
while (!(TWCR & (1<<TWINT)));
|
||||
|
||||
if ((TWSR & 0xF8) != TW_MT_DATA_ACK) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length) {
|
||||
if (i2c_start(address)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (uint16_t i = 0; i < length; i++) {
|
||||
if (i2c_write(data[i])) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
i2c_stop();
|
||||
|
||||
return 0;
|
||||
}
|
25
keyboards/mt40/i2c.h
Normal file
25
keyboards/mt40/i2c.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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
|
84
keyboards/mt40/keymaps/default/keymap.c
Normal file
84
keyboards/mt40/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,84 @@
|
||||
/* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "mt40.h"
|
||||
#include "action_layer.h"
|
||||
#include "rgblight.h"
|
||||
|
||||
#define _______ KC_TRNS
|
||||
#define OOOOOOO KC_TRNS
|
||||
|
||||
#define C_LCTL MT(MOD_LCTL, KC_QUOT)
|
||||
#define C_RCTL MT(MOD_RCTL, KC_GRV)
|
||||
|
||||
#define C_LGUI MT(MOD_LGUI, KC_LBRC)
|
||||
#define C_RGUI MT(MOD_RGUI, KC_RBRC)
|
||||
|
||||
#define C_ESC MT(MOD_LCTL, KC_ESC)
|
||||
#define C_ENT MT(MOD_RCTL, KC_ENT)
|
||||
|
||||
|
||||
/*
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | 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 |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Brite| Ctrl | Alt | GUI |Lower | SPC | BSP |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||
C_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, C_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, \
|
||||
C_LCTL, C_LGUI, MOD_LALT, MO(3), MO(1), KC_SPC, KC_SPC, MO(2), MO(4), MOD_RALT, C_RGUI, C_RCTL),
|
||||
|
||||
[1] = KEYMAP(
|
||||
_______, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, RGB_MOD, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, \
|
||||
_______, KC_F5, KC_F6, KC_F7, KC_F8, RGB_VAD, RGB_VAI, KC_P4, KC_P5, KC_P6, KC_PAST, _______, \
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, BL_TOGG, BL_INC, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_PGUP, \
|
||||
_______, _______, _______, _______, OOOOOOO, _______, _______, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, KC_PGDN),
|
||||
|
||||
[2] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_QUOT, KC_EQL, KC_LBRC, KC_RBRC, KC_NUBS, \
|
||||
KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, OOOOOOO, KC_HOME, KC_PGDOWN, KC_PGUP, KC_END),
|
||||
|
||||
[3] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, KC_COPY, KC_PGUP, _______, _______, KC_PASTE, KC_DEL, \
|
||||
_______, _______, _______, KC_PGDN, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, \
|
||||
_______, _______, KC_CUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, OOOOOOO, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
[4] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, \
|
||||
KC_PSCR, KC_INS, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, \
|
||||
KC_CAPS, _______, KC_MPLY, KC_MRWD, KC_MFFD, _______, _______, _______, KC_BTN1, KC_BTN2, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, OOOOOOO, _______, _______, _______),
|
||||
|
||||
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_MOMENTARY(1),
|
||||
[1] = ACTION_LAYER_MOMENTARY(2),
|
||||
[2] = ACTION_LAYER_MOMENTARY(3),
|
||||
[3] = ACTION_LAYER_MOMENTARY(4),
|
||||
};
|
||||
|
17
keyboards/mt40/keymaps/default/readme.md
Normal file
17
keyboards/mt40/keymaps/default/readme.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Default Layout on a Planck Clone Keyboard
|
||||
|
||||
## Base Layer
|
||||
[Imgur](https://i.imgur.com/XivfDS0.png)
|
||||
|
||||
## FN1 Layer - Numpad and Function keys
|
||||
[Imgur](https://i.imgur.com/sXTYfAn.png)
|
||||
|
||||
## FN2 Layer - Numbers and Symbols
|
||||
[Imgur](https://i.imgur.com/Z4Nqp7g.png)
|
||||
|
||||
## FN3 Layer - Vim
|
||||
[Imgur](https://i.imgur.com/5whRGOx.png)
|
||||
|
||||
## FN3 Layer - Multimedia
|
||||
[Imgur](https://i.imgur.com/K0jfHIO.png)
|
||||
|
106
keyboards/mt40/matrix.c
Normal file
106
keyboards/mt40/matrix.c
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
|
||||
#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<<PIND7);
|
||||
// all columns are pulled-up
|
||||
PORTA = 0xFF;
|
||||
PORTC |= (0b111111<<2);
|
||||
PORTD |= (1<<PIND7);
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
matrix[row] = 0x00;
|
||||
matrix_debouncing[row] = 0x00;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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) {
|
||||
}
|
43
keyboards/mt40/mt40.c
Normal file
43
keyboards/mt40/mt40.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "mt40.h"
|
||||
#include "rgblight.h"
|
||||
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#include "action_layer.h"
|
||||
#include "i2c.h"
|
||||
#include "quantum.h"
|
||||
|
||||
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_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
rgblight_task();
|
||||
}
|
87
keyboards/mt40/mt40.h
Normal file
87
keyboards/mt40/mt40.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef MT40_H
|
||||
#define MT40_H
|
||||
|
||||
#include "quantum_keycodes.h"
|
||||
#include "keycode.h"
|
||||
#include "action.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 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 \
|
||||
) { \
|
||||
{ K31, K32, K33, KC_NO, K34, K35, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K37, KC_NO, KC_NO, KC_NO }, \
|
||||
{ K20, K21, K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K2A, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||
{ K30, K11, K12, K13, K14, K15, KC_NO, KC_NO, KC_NO, KC_NO, K1A, K1B, KC_NO, KC_NO, KC_NO }, \
|
||||
{ K10, K01, K02, K03, K04, K05, KC_NO, KC_NO, KC_NO, KC_NO, K0A, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||
{ K00, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K0B }, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||
{ KC_NO, KC_NO, K06, K16, K26, K36, K38, K3A, K39, K3B, KC_NO, KC_NO, K07, K17, K27 }, \
|
||||
{ KC_NO, KC_NO, K09, K19, K29, KC_NO, K2B, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K08, K18, K28 } \
|
||||
}
|
||||
|
||||
/* #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 \ */
|
||||
/* ) \ */
|
||||
/* { \ */
|
||||
/* { KC_##k31, KC_##k32, KC_##k33, KC_NO, KC_##k34, KC_##k35, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k37, KC_NO, KC_NO, KC_NO, KC_NO }, \ */
|
||||
/* { KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k2a, KC_NO, KC_NO, KC_NO }, \ */
|
||||
/* { KC_##k30, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k1b, KC_##k1a, KC_NO, KC_NO, KC_NO }, \ */
|
||||
/* { KC_##k10, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k0a, KC_NO, KC_NO, KC_NO }, \ */
|
||||
/* { KC_##k00, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k0b }, \ */
|
||||
/* { KC_NO, KC_NO, KC_##k06, KC_##k16, KC_##k26, KC_##k36, KC_##k38, KC_##k3a, KC_##k17, KC_##k07, KC_NO, KC_NO, KC_##k3b, KC_##k39, KC_##k27 } \ */
|
||||
/* { KC_NO, KC_NO, KC_##k09, KC_##k19, KC_##k29, KC_NO, KC_NO, KC_##k2b, KC_##k18, KC_##k08, KC_NO, KC_NO, KC_NO, KC_NO, KC_##k28 } \ */
|
||||
/* } */
|
||||
|
||||
/* #define FR_A KC_A */
|
||||
/* #define FR_B KC_B */
|
||||
/* #define FR_C KC_C */
|
||||
/* #define FR_D KC_D */
|
||||
/* #define FR_E KC_E */
|
||||
/* #define FR_F KC_F */
|
||||
/* #define FR_G KC_G */
|
||||
/* #define FR_H KC_H */
|
||||
/* #define FR_I KC_I */
|
||||
/* #define FR_J KC_J */
|
||||
/* #define FR_K KC_K */
|
||||
/* #define FR_L KC_L */
|
||||
/* #define FR_M KC_M */
|
||||
/* #define FR_N KC_N */
|
||||
/* #define FR_O KC_O */
|
||||
/* #define FR_P KC_P */
|
||||
/* #define FR_Q KC_Q */
|
||||
/* #define FR_R KC_R */
|
||||
/* #define FR_S KC_S */
|
||||
/* #define FR_T KC_T */
|
||||
/* #define FR_U KC_U */
|
||||
/* #define FR_V KC_V */
|
||||
/* #define FR_W KC_W */
|
||||
/* #define FR_X KC_X */
|
||||
/* #define FR_Y KC_Y */
|
||||
/* #define FR_Z KC_Z */
|
||||
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user