mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-22 17:24:41 +00:00
Compare commits
111 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 | ||
![]() |
004826e1b8 | ||
![]() |
f445a7f971 | ||
![]() |
13e1388f2d | ||
![]() |
fe56fffe7d | ||
![]() |
d069a42c07 | ||
![]() |
029234f1f1 | ||
![]() |
ddf49e8b21 | ||
![]() |
371922ad61 | ||
![]() |
f868a3bb86 | ||
![]() |
5329a80f6c | ||
![]() |
32bb8f6b8a | ||
![]() |
1683d3a559 | ||
![]() |
b79a4cfeba | ||
![]() |
44d9ad95b7 | ||
![]() |
fad967af4c | ||
![]() |
20e18d15e3 | ||
![]() |
83af62322c | ||
![]() |
2d77f9cbb9 | ||
![]() |
c9a0436422 | ||
![]() |
fca03e15b9 | ||
![]() |
bc98b0d9eb | ||
![]() |
38261920a9 | ||
![]() |
f9881793e3 | ||
![]() |
04b9b62bdc | ||
![]() |
b2bbbc2dfc | ||
![]() |
6169cd52ba | ||
![]() |
101b998ac2 | ||
![]() |
7b65b7e948 | ||
![]() |
4c1164c469 | ||
![]() |
e555e42aae | ||
![]() |
38da7795f4 | ||
![]() |
8c10b60c5f | ||
![]() |
c8fca10f0d | ||
![]() |
1f6002db3f | ||
![]() |
07017871e5 | ||
![]() |
f4949fdd32 | ||
![]() |
750f8ec94e | ||
![]() |
49c32021db | ||
![]() |
76d807fe7d | ||
![]() |
bf1fedc05e | ||
![]() |
5960d0349c | ||
![]() |
0afaed8535 | ||
![]() |
688343f218 | ||
![]() |
4d421ee31c | ||
![]() |
0bb457e573 | ||
![]() |
364aeeec53 | ||
![]() |
2e3b99f7f1 | ||
![]() |
bcfba27101 |
18
.editorconfig
Normal file
18
.editorconfig
Normal file
@@ -0,0 +1,18 @@
|
||||
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
|
||||
# editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# We recommend you to keep these unchanged
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
indent_size = 4
|
9
.gitignore
vendored
9
.gitignore
vendored
@@ -4,6 +4,7 @@
|
||||
*.eep
|
||||
*.elf
|
||||
*.hex
|
||||
*.qmk
|
||||
!util/bootloader.hex
|
||||
!quantum/tools/eeprom_reset.hex
|
||||
*.log
|
||||
@@ -27,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
|
||||
@@ -38,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
|
||||
|
6
.vscode/extensions.json
vendored
Normal file
6
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// Suggested extensions
|
||||
{
|
||||
"recommendations": [
|
||||
"EditorConfig.EditorConfig"
|
||||
]
|
||||
}
|
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)
|
||||
|
@@ -70,6 +70,8 @@ ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
|
||||
OPT_DEFS += -DPOINTING_DEVICE_ENABLE
|
||||
OPT_DEFS += -DMOUSE_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/pointing_device.c
|
||||
endif
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
* [Install Build Tools](getting_started_build_tools.md)
|
||||
* Alternative: [Vagrant Guide](getting_started_vagrant_guide.md)
|
||||
* [Build/Compile instructions](getting_started_make_guide.md)
|
||||
* [Flashing instructions](flashing.md)
|
||||
* [Contributing to QMK](contributing.md)
|
||||
* [How to Use Github](getting_started_github.md)
|
||||
|
||||
@@ -21,6 +22,7 @@
|
||||
* [Features](features.md)
|
||||
* [Advanced Keycodes](feature_advanced_keycodes.md)
|
||||
* [Audio](feature_audio.md)
|
||||
* [Auto Shift](feature_auto_shift.md)
|
||||
* [Backlight](feature_backlight.md)
|
||||
* [Bootmagic](feature_bootmagic.md)
|
||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||
@@ -31,6 +33,7 @@
|
||||
* [Mouse keys](feature_mouse_keys.md)
|
||||
* [Pointing Device](feature_pointing_device.md)
|
||||
* [PS2 Mouse](feature_ps2_mouse.md)
|
||||
* [RGB Lighting](feature_rgblight.md)
|
||||
* [Space Cadet](feature_space_cadet.md)
|
||||
* [Stenography](feature_stenography.md)
|
||||
* [Tap Dance](feature_tap_dance.md)
|
||||
@@ -39,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)
|
||||
@@ -46,25 +65,10 @@
|
||||
* [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_common_shortcuts.md#switching-and-toggling-layers)
|
||||
* [Mod+Key](feature_common_shortcuts.md#modifier-keys)
|
||||
* [Mod Tap](feature_common_shortcuts.md#mod-tap)
|
||||
* [One Shot Keys](feature_common_shortcuts.md#one-shot-keys)
|
||||
* [Quantum](quantum_keycodes.md)
|
||||
* [RGB Light](feature_rgblight.md#rgblight-keycodes)
|
||||
* [Shifted Keys](feature_common_shortcuts.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
|
||||
* [Hand Wiring Guide](hand_wiring.md)
|
||||
* [Hand Wiring Guide](hand_wire.md)
|
||||
* [ISP flashing guide](isp_flashing_guide.md)
|
||||
* [Modding your keyboard](modding_your_keyboard.md)
|
||||
|
||||
|
@@ -109,6 +109,8 @@ If you define these options you will enable the associated feature, which may in
|
||||
|
||||
* `#define TAPPING_TERM 200`
|
||||
* how long before a tap becomes a hold
|
||||
* `#define RETRO_TAPPING`
|
||||
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
||||
* `#define TAPPING_TOGGLE 2`
|
||||
* how many taps before triggering the toggle
|
||||
* `#define PERMISSIVE_HOLD`
|
||||
|
@@ -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.
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
## What Differences Are There Between QMK and TMK?
|
||||
|
||||
TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert's](https://github.com/jackhumbert) fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
|
||||
TMK was originally designed and implemented by [Jun Wako](https://github.com/tmk). QMK started as [Jack Humbert](https://github.com/jackhumbert)'s fork of TMK for the Planck. After a while Jack's fork had diverged quite a bit from TMK, and in 2015 Jack decided to rename his fork to QMK.
|
||||
|
||||
From a technical standpoint QMK builds upon TMK by adding several new features. Most notably QMK has expanded the number of available keycodes and uses these to implement advanced features like `S()`, `LCTL()`, and `MO()`. You can see a complete list of these keycodes in [Keycodes](keycodes.md).
|
||||
|
||||
|
@@ -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.
|
||||
|
||||
@@ -136,24 +136,22 @@ completely normal and with no intention of shifted keys.
|
||||
|
||||
#### An example run
|
||||
|
||||
'''
|
||||
hello world. my name is john doe. i am a computer programmer playing with
|
||||
keyboards right now.
|
||||
hello world. my name is john doe. i am a computer programmer playing with
|
||||
keyboards right now.
|
||||
|
||||
[PRESS KC_ASDN quite a few times]
|
||||
[PRESS KC_ASDN quite a few times]
|
||||
|
||||
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
|
||||
KEYboArDS RiGHT NOw.
|
||||
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
|
||||
KEYboArDS RiGHT NOw.
|
||||
|
||||
[PRESS KC_ASUP a few times]
|
||||
[PRESS KC_ASUP a few times]
|
||||
|
||||
hello world. my name is john Doe. i am a computer programmer playing with
|
||||
keyboarDs right now.
|
||||
hello world. my name is john Doe. i am a computer programmer playing with
|
||||
keyboarDs right now.
|
||||
|
||||
[PRESS KC_ASRP]
|
||||
[PRESS KC_ASRP]
|
||||
|
||||
115
|
||||
'''
|
||||
115
|
||||
|
||||
The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT`
|
||||
value. You are now set! Practice on the *D* key a little bit that showed up
|
||||
|
@@ -200,12 +200,12 @@ typedef struct {
|
||||
int cur_dance (qk_tap_dance_state_t *state) {
|
||||
if (state->count == 1) {
|
||||
//If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP
|
||||
if (state->interrupted || state->!pressed) return SINGLE_TAP;
|
||||
if (state->interrupted || state->pressed==0) return SINGLE_TAP;
|
||||
else return SINGLE_HOLD;
|
||||
}
|
||||
//If count = 2, and it has been interrupted - assume that user is trying to type the letter associated
|
||||
//with single tap. In example below, that means to send `xx` instead of `Escape`.
|
||||
else if (state->count = 2) {
|
||||
else if (state->count == 2) {
|
||||
if (state->interrupted) return DOUBLE_SINGLE_TAP;
|
||||
else if (state->pressed) return DOUBLE_HOLD;
|
||||
else return DOUBLE_TAP;
|
||||
|
@@ -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.
|
||||
|
||||
|
@@ -5,20 +5,22 @@ QMK has a staggering number of features for building your keyboard. It can take
|
||||
|
||||
* [Advanced Keycodes](feature_advanced_keycodes.md) - Change layers, type shifted keys, and more. Go beyond typing simple characters.
|
||||
* [Audio](feature_audio.md) - Connect a speaker to your keyboard for audio feedback, midi support, and music mode.
|
||||
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard
|
||||
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys
|
||||
* [Auto Shift](feature_auto_shift.md) - Tap for the normal key, hold slightly longer for its shifted state.
|
||||
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard.
|
||||
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
|
||||
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
||||
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
|
||||
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
|
||||
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
|
||||
* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key
|
||||
* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard
|
||||
* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key.
|
||||
* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard.
|
||||
* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
|
||||
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a ps2 mouse directly to your keyboard.
|
||||
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
|
||||
* [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
|
||||
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want
|
||||
* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard
|
||||
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want.
|
||||
* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard.
|
||||
* [Thermal Printer](feature_thermal_printer.md) - Connect a thermal printer to your keyboard to be able to toggle on a printed log of everything you type.
|
||||
* [Unicode](feature_unicode.md) - Unicode input support.
|
||||
* [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards
|
||||
* [Userspace](feature_userspace.md) - Share code between different keymaps and keyboards.
|
||||
|
74
docs/flashing.md
Normal file
74
docs/flashing.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Flashing Intrustructions
|
||||
|
||||
There are quite a few different types of bootloaders that keyboards use, and just about all of the use a different flashing method. Luckily, projects like the [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) aim to be compatible with all the different types without having to think about it much, but this article will describe the different types of bootloaders, and available methods for flashing them.
|
||||
|
||||
## DFU
|
||||
|
||||
Atmel's DFU bootloader comes on all atmega32u4 chips by default, and is used by many keyboards that have their own ICs on their PCBs (Older OLKB boards, Clueboards). Some keyboards may also use LUFA's DFU bootloader (or QMK's fork) (Newer OLKB boards) that adds in additional features specific to that hardware.
|
||||
|
||||
These bootloaders are usually 4096 bytes for the atmega32u4 chip.
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
||||
* [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer) / `:dfu` in QMK (recommended commandline)
|
||||
* [Atmel's Flip](http://www.atmel.com/tools/flip.aspx) (not recommended)
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Press the `RESET` keycode, or tap the RESET button (or short RST to GND).
|
||||
2. Wait for the OS to detect the device
|
||||
3. Erase the memory (may be done automatically)
|
||||
4. Flash a .hex file
|
||||
5. Reset the device into application mode (may be done automatically)
|
||||
|
||||
or:
|
||||
|
||||
make <keyboard>:<keymap>:dfu
|
||||
|
||||
## Caterina
|
||||
|
||||
Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina.
|
||||
|
||||
This block of code allows for Caterina compatibility in QMK:
|
||||
|
||||
#define CATERINA_BOOTLOADER
|
||||
|
||||
These bootloaders are usually 4096 bytes for the atmega32u4 chip.
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
||||
* [avrdude](http://www.nongnu.org/avrdude/) with avr109 / `:avrdude` (recommended commandline)
|
||||
* [AVRDUDESS](https://github.com/zkemble/AVRDUDESS)
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
|
||||
2. Wait for the OS to detect the device
|
||||
4. Flash a .hex file
|
||||
5. Wait for the device to reset automatically
|
||||
|
||||
or
|
||||
|
||||
make <keyboard>:<keymap>:avrdude
|
||||
|
||||
## Halfkay
|
||||
|
||||
Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0).
|
||||
|
||||
This bootloader is 512 bytes.
|
||||
|
||||
Compatible flashers:
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
||||
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
|
||||
* [Teensy Loader Command Line](https://www.pjrc.com/teensy/loader_cli.html) (recommended commandline)
|
||||
|
||||
Flashing sequence:
|
||||
|
||||
1. Press the `RESET` keycode, or short RST to GND quickly (you only have 7 seconds to flash once it enters)
|
||||
2. Wait for the OS to detect the device
|
||||
4. Flash a .hex file
|
||||
5. Reset the device into application mode (may be done automatically)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Installing Build Tools
|
||||
|
||||
This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4.)
|
||||
This page describes setting up the build environment for QMK. These instructions cover AVR processors (such as the atmega32u4).
|
||||
|
||||
<!-- FIXME: We should have ARM instructions somewhere. -->
|
||||
|
||||
@@ -44,7 +44,7 @@ By default, this will download compilers for both AVR and ARM. If you don't need
|
||||
|
||||
nix-shell --arg arm false
|
||||
|
||||
## Mac
|
||||
## macOS
|
||||
If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
||||
|
||||
brew tap osx-cross/avr
|
||||
@@ -58,10 +58,10 @@ This is the recommended method. If you don't have homebrew, [install it!](http:/
|
||||
|
||||
## Windows with msys2 (recommended)
|
||||
|
||||
The best environment to use, for Windows Vista through any later version (tested on 7 and 10,) is [msys2](http://www.msys2.org).
|
||||
The best environment to use, for Windows Vista through any later version (tested on 7 and 10), is [msys2](http://www.msys2.org).
|
||||
|
||||
* Install msys2 by downloading and following the instructions here: http://www.msys2.org
|
||||
* Open the "MSYS2 MingGW 64-bit" shortcut
|
||||
* Install msys2 by downloading it and following the instructions here: http://www.msys2.org
|
||||
* Open the ``MSYS2 MingGW 64-bit`` shortcut
|
||||
* Navigate to your qmk checkout. For example, if it's in the root of your c drive:
|
||||
* `$ cd /c/qmk_firmware`
|
||||
* Run `util/msys2_install.sh` and follow the prompts
|
||||
@@ -80,7 +80,7 @@ If you already have cloned the repository on your Windows file system you can ig
|
||||
|
||||
You will need to clone the repository to your Windows file system using the normal Git for Windows and **not** the WSL Git. So if you haven't installed Git before, [download](https://git-scm.com/download/win) and install it. Then [set it up](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), it's important that you setup the e-mail and user name, especially if you are planning to contribute.
|
||||
|
||||
Once Git is installed, open the Git bash command and change the directory to where you want to clone QMK, note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one.
|
||||
Once Git is installed, open the Git Bash command and change the directory to where you want to clone QMK; note that you have to use forward slashes, and that your c drive is accessed like this `/c/path/to/where/you/want/to/go`. Then run `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`, this will create a new folder `qmk_firmware` as a subfolder of the current one.
|
||||
|
||||
### Toolchain setup
|
||||
The Toolchain setup is done through the Windows Subsystem for Linux, and the process is fully automated. If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information.
|
||||
@@ -122,8 +122,11 @@ If this is a bit complex for you, Docker might be the turn-key solution you need
|
||||
# defaults are ergodox/default
|
||||
|
||||
docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
|
||||
```
|
||||
|
||||
# On windows docker seems to have issue with VOLUME tag in Dockerfile, and $('pwd') won't print a windows compliant path, use full path instead like this
|
||||
On Windows Docker seems to have issues with the VOLUME tag in Dockerfile, and `$('pwd')` won't print a Windows compliant path; use full path instead, like this:
|
||||
|
||||
```bash
|
||||
docker run -e keymap=default -e keyboard=ergobox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
|
||||
|
||||
```
|
||||
@@ -131,4 +134,4 @@ docker run -e keymap=default -e keyboard=ergobox_ez --rm -v D:/Users/Sacapuces/D
|
||||
This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash.
|
||||
|
||||
## Vagrant
|
||||
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](vagrant_guide.md).
|
||||
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](getting_started_vagrant.md).
|
||||
|
@@ -52,7 +52,7 @@ To https://github.com/whoeveryouare/qmk_firmware.git
|
||||
+ 20043e64...7da94ac5 master -> master
|
||||
```
|
||||
|
||||
Your changes now exist on your fork on Github - if you go back there (https://github.com/<whoeveryouare>/qmk_firmware), you can create a "New Pull Request" by clicking this button:
|
||||
Your changes now exist on your fork on Github - if you go back there (`https://github.com/<whoeveryouare>/qmk_firmware`), you can create a "New Pull Request" by clicking this button:
|
||||
|
||||

|
||||
|
||||
@@ -60,4 +60,4 @@ Here you'll be able to see exactly what you've committed - if it all looks good,
|
||||
|
||||

|
||||
|
||||
After submitting, we may talk to you about your changes, ask that you make changes, and eventually accept it! Thanks for contributing to QMK :)
|
||||
After submitting, we may talk to you about your changes, ask that you make changes, and eventually accept it! Thanks for contributing to QMK :)
|
||||
|
@@ -1,22 +1,22 @@
|
||||
# Introduction
|
||||
|
||||
This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a UNIX shell, but does not assume you are familiar with C or with compiling using make.
|
||||
This page attempts to explain the basic information you need to know to work with the QMK project. It assumes that you are familiar with navigating a Unix shell, but does not assume you are familiar with C or with compiling using make.
|
||||
|
||||
## Basic QMK structure
|
||||
|
||||
QMK is a fork of @tmk's [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
|
||||
### Keyboard project structure
|
||||
|
||||
Within the `handwired` and `keyboard` folders is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within you'll find the following structure:
|
||||
Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure:
|
||||
|
||||
* `keymaps/`: Different keymaps that can be built
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`.
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`
|
||||
* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
|
||||
|
||||
### Keymap structure
|
||||
|
||||
In every keymap folder, the following files may be found. Only `keymap.c` is required, if the rest of the files are not found the default options will be chosen.
|
||||
In every keymap folder, the following files may be found. Only `keymap.c` is required, and if the rest of the files are not found the default options will be chosen.
|
||||
|
||||
* `config.h`: the options to configure your keymap
|
||||
* `keymap.c`: all of your keymap code, required
|
||||
@@ -30,13 +30,13 @@ There are 2 `config.h` locations:
|
||||
* keyboard (`/keyboards/<keyboard>/config.h`)
|
||||
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
||||
|
||||
If the keymap `config.h` exists that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
|
||||
If the keymap `config.h` exists, that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
|
||||
|
||||
```
|
||||
#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
|
||||
|
5
keyboards/6ball/6ball.c
Normal file
5
keyboards/6ball/6ball.c
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "6ball.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
16
keyboards/6ball/6ball.h
Normal file
16
keyboards/6ball/6ball.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef SIXBALL_H
|
||||
#define SIXBALL_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
k01, k02, k03, \
|
||||
k04, k05, k06 \
|
||||
) \
|
||||
{ \
|
||||
{ k02, k03, k06, k05, k04, k01 } \
|
||||
}
|
||||
|
||||
#define KC_KEYMAP(k01, k02, k03, k04, k05, k06) KEYMAP(KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06)
|
||||
|
||||
#endif
|
53
keyboards/6ball/config.h
Normal file
53
keyboards/6ball/config.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@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 CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xCEEB
|
||||
#define PRODUCT_ID 0x0007
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER That-Canadian
|
||||
#define PRODUCT 6-Ball
|
||||
#define DESCRIPTION 6-Ball Macropuck
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 1
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
/* pin-out */
|
||||
#define MATRIX_ROW_PINS { F5 }
|
||||
#define MATRIX_COL_PINS { F4, D4, B5, B6, B2, F6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
#define RGB_DI_PIN F7
|
||||
#define RGBLIGHT_TIMER
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 6 // Number of LEDs
|
||||
#define ws2812_PORTREG PORTD
|
||||
#define ws2812_DDRREG DDRD
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#endif
|
28
keyboards/6ball/keymaps/default/keymap.c
Normal file
28
keyboards/6ball/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "6ball.h"
|
||||
|
||||
#define _MAIN 0
|
||||
#define _FN 1
|
||||
|
||||
#define KC_ KC_TRNS
|
||||
|
||||
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
|
||||
#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
|
||||
#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
|
||||
#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
|
||||
#define KC_X0 LT(_FN, KC_ESC)
|
||||
#define KC_RTOG RGB_TOG
|
||||
#define KC_RMOD RGB_MOD
|
||||
#define KC_RHUI RGB_HUI
|
||||
#define KC_RHUD RGB_HUD
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MAIN] = KC_KEYMAP(
|
||||
F , X0 ,LCTL,
|
||||
R , D , M
|
||||
),
|
||||
|
||||
[_FN] = KC_KEYMAP(
|
||||
F , ,RHUI,
|
||||
RTOG,RMOD,RHUD
|
||||
)
|
||||
};
|
3
keyboards/6ball/keymaps/default/rules.mk
Normal file
3
keyboards/6ball/keymaps/default/rules.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
14
keyboards/6ball/readme.md
Normal file
14
keyboards/6ball/readme.md
Normal file
@@ -0,0 +1,14 @@
|
||||
6-Ball
|
||||
======
|
||||
|
||||
A circular 6-key macropad made by ThatCanadian.
|
||||
|
||||
Keyboard Maintainer: QMK Community
|
||||
Hardware Supported: Pro Micro ATmega32U4
|
||||
Hardware Availability: ThatCanadian
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 6ball: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.
|
67
keyboards/6ball/rules.mk
Normal file
67
keyboards/6ball/rules.mk
Normal file
@@ -0,0 +1,67 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = yes # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
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)
|
||||
|
31
keyboards/chimera_ortho/chimera_ortho.c
Normal file
31
keyboards/chimera_ortho/chimera_ortho.c
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "chimera_ortho.h"
|
||||
|
||||
void uart_init(void) {
|
||||
SERIAL_UART_INIT();
|
||||
}
|
||||
|
||||
void led_init(void) {
|
||||
DDRD |= (1<<1);
|
||||
PORTD |= (1<<1);
|
||||
DDRF |= (1<<4) | (1<<5);
|
||||
PORTF |= (1<<4) | (1<<5);
|
||||
}
|
||||
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
uart_init();
|
||||
led_init();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
|
||||
}
|
66
keyboards/chimera_ortho/chimera_ortho.h
Normal file
66
keyboards/chimera_ortho/chimera_ortho.h
Normal file
@@ -0,0 +1,66 @@
|
||||
#ifndef CHIMERA_ORTHO_H
|
||||
#define CHIMERA_ORTHO_H
|
||||
|
||||
#include "quantum.h"
|
||||
#include "matrix.h"
|
||||
#include "backlight.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#define red_led_off PORTF |= (1<<5)
|
||||
#define red_led_on PORTF &= ~(1<<5)
|
||||
#define blu_led_off PORTF |= (1<<4)
|
||||
#define blu_led_on PORTF &= ~(1<<4)
|
||||
#define grn_led_off PORTD |= (1<<1)
|
||||
#define grn_led_on PORTD &= ~(1<<1)
|
||||
|
||||
#define set_led_off red_led_off; grn_led_off; blu_led_off
|
||||
#define set_led_red red_led_on; grn_led_off; blu_led_off
|
||||
#define set_led_blue red_led_off; grn_led_off; blu_led_on
|
||||
#define set_led_green red_led_off; grn_led_on; blu_led_off
|
||||
#define set_led_yellow red_led_on; grn_led_on; blu_led_off
|
||||
#define set_led_magenta red_led_on; grn_led_off; blu_led_on
|
||||
#define set_led_cyan red_led_off; grn_led_on; blu_led_on
|
||||
#define set_led_white red_led_on; grn_led_on; blu_led_on
|
||||
|
||||
/*
|
||||
#define LED_B 5
|
||||
#define LED_R 6
|
||||
#define LED_G 7
|
||||
|
||||
#define all_leds_off PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
|
||||
|
||||
#define red_led_on PORTF |= (1<<LED_R)
|
||||
#define red_led_off PORTF &= ~(1<<LED_R)
|
||||
#define grn_led_on PORTF |= (1<<LED_G)
|
||||
#define grn_led_off PORTF &= ~(1<<LED_G)
|
||||
#define blu_led_on PORTF |= (1<<LED_B)
|
||||
#define blu_led_off PORTF &= ~(1<<LED_B)
|
||||
|
||||
#define set_led_off PORTF &= ~(1<<LED_B) & ~(1<<LED_R) & ~(1<<LED_G)
|
||||
#define set_led_red PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_G) | (1<<LED_R)
|
||||
#define set_led_blue PORTF = PORTF & ~(1<<LED_G) & ~(1<<LED_R) | (1<<LED_B)
|
||||
#define set_led_green PORTF = PORTF & ~(1<<LED_B) & ~(1<<LED_R) | (1<<LED_G)
|
||||
#define set_led_yellow PORTF = PORTF & ~(1<<LED_B) | (1<<LED_R) | (1<<LED_G)
|
||||
#define set_led_magenta PORTF = PORTF & ~(1<<LED_G) | (1<<LED_R) | (1<<LED_B)
|
||||
#define set_led_cyan PORTF = PORTF & ~(1<<LED_R) | (1<<LED_B) | (1<<LED_G)
|
||||
#define set_led_white PORTF |= (1<<LED_B) | (1<<LED_R) | (1<<LED_G)
|
||||
*/
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The first section contains all of the arguements
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define KEYMAP( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, \
|
||||
k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, \
|
||||
k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42, k43, k44,\
|
||||
k45, k46, k47, k48 \
|
||||
) \
|
||||
{ \
|
||||
{ KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k08, KC_##k09, KC_##k10, KC_##k11, KC_##k12 }, \
|
||||
{ KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26 }, \
|
||||
{ KC_##k29, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k37, KC_##k38, KC_##k41, KC_##k42, KC_##k43 }, \
|
||||
{ KC_NO, KC_##k06, KC_##k20, KC_##k35, KC_##k46, KC_##k47, KC_##k36, KC_##k21, KC_##k07, KC_NO }, \
|
||||
{ KC_NO, KC_##k28, KC_##k14, KC_##k00, KC_##k45, KC_##k48, KC_##k13, KC_##k27, KC_##k44, KC_NO }, \
|
||||
}
|
||||
|
||||
#endif
|
87
keyboards/chimera_ortho/config.h
Normal file
87
keyboards/chimera_ortho/config.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@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 CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER unknown
|
||||
#define PRODUCT Chimera Ortho
|
||||
#define DESCRIPTION q.m.k. keyboard firmware for Chimera Ortho
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 10
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
//#define BACKLIGHT_LEVELS 3
|
||||
|
||||
#define ONESHOT_TIMEOUT 500
|
||||
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
/* 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
|
||||
|
||||
//UART settings for communication with the RF microcontroller
|
||||
#define SERIAL_UART_BAUD 1000000
|
||||
#define SERIAL_UART_DATA UDR1
|
||||
#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1)
|
||||
#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
|
||||
#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1))
|
||||
#define SERIAL_UART_INIT() do { \
|
||||
/* baud rate */ \
|
||||
UBRR1L = SERIAL_UART_UBRR; \
|
||||
/* baud rate */ \
|
||||
UBRR1H = SERIAL_UART_UBRR >> 8; \
|
||||
/* enable TX and RX */ \
|
||||
UCSR1B = _BV(TXEN1) | _BV(RXEN1); \
|
||||
/* 8-bit data */ \
|
||||
UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
|
||||
} while(0)
|
||||
|
||||
#endif
|
193
keyboards/chimera_ortho/keymaps/default/keymap.c
Normal file
193
keyboards/chimera_ortho/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,193 @@
|
||||
// this is the style you want to emulate.
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
|
||||
#include "chimera_ortho.h"
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum chimera_ortho_layers
|
||||
{
|
||||
_QWERTY,
|
||||
_CAPS,
|
||||
_NUMPAD,
|
||||
_SYMBOLS,
|
||||
_MACROS,
|
||||
_NAV
|
||||
};
|
||||
|
||||
#define KC_NMPD TG(_NUMPAD)
|
||||
#define KC_SYMB TG(_SYMBOLS)
|
||||
#define KC_SPFN LT(_NAV,KC_EQL)
|
||||
#define KC_SCTL MT(MOD_LCTL, KC_LBRC)
|
||||
#define KC_SCTR MT(MOD_LCTL, KC_RBRC)
|
||||
#define KC_SPLT MT(MOD_LALT, KC_MINS)
|
||||
#define KC_SPRT MT(MOD_LALT, KC_1)
|
||||
#define KC_GBRC MT(MOD_RGUI, KC_8)
|
||||
#define KC_GQOT MT(MOD_LGUI, KC_QUOT)
|
||||
#define KC_MESC LT(_MACROS, KC_ESC)
|
||||
#define KC_INCL M(0)
|
||||
#define KC_PULL M(1)
|
||||
#define KC_PUSH M(2)
|
||||
#define KC_SCAP M(3)
|
||||
#define KC_SCOF M(4)
|
||||
#define KC_CAD LALT(LCTL(KC_DEL))
|
||||
|
||||
#define LONGPRESS_DELAY 150
|
||||
//#define LAYER_TOGGLE_DELAY 300
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
#define KC_ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = KEYMAP(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
MESC, Q , W , E , R , T ,SCTL, SCTR, Y , U , I , O , P ,QUOT,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
TAB , A , S , D , F , G ,SPLT, SPRT, H , J , K , L ,SCLN,ENT ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
LSPO, Z , X , C , V , B ,SPFN, GBRC, N , M ,COMM,DOT ,SLSH,RSPC,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
NMPD,BSPC, SPC ,SYMB
|
||||
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||
),
|
||||
|
||||
[_CAPS] = KEYMAP(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
, , , , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , ,UNDS, , , , , ,COLN, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
SCOF, , , , , , , , , , , , ,SCOF,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , ,
|
||||
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||
),
|
||||
|
||||
[_NUMPAD] = KEYMAP(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
, ,COLN , , , , , , , 7 , 8 , 9 ,ASTR,MINS,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, ,DOT , , , , , , , 4 , 5 , 6 ,PLUS, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , , , , , 1 , 2 , 3 ,SLSH, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , 0
|
||||
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||
),
|
||||
|
||||
[_SYMBOLS] = KEYMAP(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LPRN,RPRN,BSLS,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, F1 , F2 , F3 , F4 , F5 , , ,TILD,COLN,UNDS,LCBR,RCBR, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, F6 , F7 , F8 , F9 ,F10 , , ,GRV ,SCLN,MINS,LBRC,RBRC, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
PIPE, , ,
|
||||
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||
),
|
||||
|
||||
[_NAV] = KEYMAP(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
, , , , , , , , , , UP , ,PSCR, ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , , , , ,LEFT,DOWN,RGHT, , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , , , , , , , ,PGUP,PGDN, , , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
,DEL , ,
|
||||
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||
),
|
||||
|
||||
[_MACROS] = KEYMAP(
|
||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||
, , , , , , , , , ,INCL, , , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , ,CAD , , , , , , , , , , ,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
SCAP, , , , , , , , , ,PULL,PUSH, ,SCAP,
|
||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||
, , ,
|
||||
// \------------------+----+----+---/ \---+----+----+-------------------/
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
switch(id) {
|
||||
/* include some kind of library or header */
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("#include <>");
|
||||
return MACRO( T(LEFT), END);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("git pull");
|
||||
return MACRO( T(ENT), END );
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (record->event.pressed){
|
||||
SEND_STRING("git push");
|
||||
return MACRO( T(ENT), END );
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (record->event.pressed){
|
||||
layer_on(_CAPS);
|
||||
register_code(KC_CAPSLOCK);
|
||||
unregister_code(KC_CAPSLOCK);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (record->event.pressed){
|
||||
layer_off(_CAPS);
|
||||
register_code(KC_CAPSLOCK);
|
||||
unregister_code(KC_CAPSLOCK);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
switch (layer) {
|
||||
case _QWERTY:
|
||||
set_led_green;
|
||||
break;
|
||||
case _CAPS:
|
||||
set_led_white;
|
||||
break;
|
||||
case _NUMPAD:
|
||||
set_led_blue;
|
||||
break;
|
||||
case _SYMBOLS:
|
||||
set_led_red;
|
||||
break;
|
||||
case _NAV:
|
||||
set_led_magenta;
|
||||
break;
|
||||
case _MACROS:
|
||||
set_led_cyan;
|
||||
break;
|
||||
default:
|
||||
set_led_green;
|
||||
break;
|
||||
}
|
||||
};
|
164
keyboards/chimera_ortho/matrix.c
Normal file
164
keyboards/chimera_ortho/matrix.c
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako
|
||||
Copyright 2014 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#if defined(__AVR__)
|
||||
#include <avr/io.h>
|
||||
#endif
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "timer.h"
|
||||
|
||||
#if (MATRIX_COLS <= 8)
|
||||
# define print_matrix_header() print("\nr/c 01234567\n")
|
||||
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop(matrix[i])
|
||||
# define ROW_SHIFTER ((uint8_t)1)
|
||||
#elif (MATRIX_COLS <= 16)
|
||||
# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
|
||||
# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop16(matrix[i])
|
||||
# define ROW_SHIFTER ((uint16_t)1)
|
||||
#elif (MATRIX_COLS <= 32)
|
||||
# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
|
||||
# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
|
||||
# define matrix_bitpop(i) bitpop32(matrix[i])
|
||||
# define ROW_SHIFTER ((uint32_t)1)
|
||||
#endif
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_quantum(void) {
|
||||
matrix_init_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_quantum(void) {
|
||||
matrix_scan_kb();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_rows(void) {
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_cols(void) {
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
SERIAL_UART_INIT();
|
||||
|
||||
uint32_t timeout = 0;
|
||||
|
||||
//the s character requests the RF slave to send the matrix
|
||||
SERIAL_UART_DATA = 's';
|
||||
|
||||
//trust the external keystates entirely, erase the last data
|
||||
uint8_t uart_data[11] = {0};
|
||||
|
||||
//there are 10 bytes corresponding to 10 columns, and an end byte
|
||||
for (uint8_t i = 0; i < 11; i++) {
|
||||
//wait for the serial data, timeout if it's been too long
|
||||
//this only happened in testing with a loose wire, but does no
|
||||
//harm to leave it in here
|
||||
while(!SERIAL_UART_RXD_PRESENT){
|
||||
timeout++;
|
||||
if (timeout > 10000){
|
||||
break;
|
||||
}
|
||||
}
|
||||
uart_data[i] = SERIAL_UART_DATA;
|
||||
}
|
||||
|
||||
//check for the end packet, the key state bytes use the LSBs, so 0xE0
|
||||
//will only show up here if the correct bytes were recieved
|
||||
if (uart_data[10] == 0xE0)
|
||||
{
|
||||
//shifting and transferring the keystates to the QMK matrix variable
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
matrix_scan_quantum();
|
||||
return 1;
|
||||
}
|
||||
|
||||
inline
|
||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||
{
|
||||
return (matrix[row] & ((matrix_row_t)1<col));
|
||||
}
|
||||
|
||||
inline
|
||||
matrix_row_t matrix_get_row(uint8_t row)
|
||||
{
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void)
|
||||
{
|
||||
print_matrix_header();
|
||||
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row); print(": ");
|
||||
print_matrix_row(row);
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
count += matrix_bitpop(i);
|
||||
}
|
||||
return count;
|
||||
}
|
19
keyboards/chimera_ortho/readme.md
Normal file
19
keyboards/chimera_ortho/readme.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Chimera Ortho
|
||||
|
||||

|
||||
|
||||
A split wireless 40% ortholinear keyboard
|
||||
|
||||
Keyboard Maintainer: [William Wilson](https://github.com/GlenPickle)
|
||||
|
||||
|
||||
Hardware Supported: Chimera Ortho PCB, WaveShare core nRF51822
|
||||
|
||||
Hardware Availability: [Gerbers](https://github.com/GlenPickle/Chimera/tree/master/ortho/gerbers)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make chimera_ortho: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.
|
||||
|
78
keyboards/chimera_ortho/rules.mk
Normal file
78
keyboards/chimera_ortho/rules.mk
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
OPT_DEFS += -DCHIMERA_ORTHO_PROMICRO
|
||||
OPT_DEFS += -DCATERINA_BOOTLOADER
|
||||
CHIMERA_ORTHO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
|
||||
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
|
||||
|
||||
# # project specific files
|
||||
SRC = matrix.c
|
||||
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# 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
|
||||
# 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 = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
|
||||
# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
# MIDI_ENABLE = YES # MIDI controls
|
||||
UNICODE_ENABLE = YES # Unicode
|
||||
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
||||
USB = /dev/ttyACM0
|
12
keyboards/clueboard/66/info.json
Normal file
12
keyboards/clueboard/66/info.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "Clueboard 66%",
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "atmel-dfu",
|
||||
"width": 16.5,
|
||||
"height": 5,
|
||||
"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"}]
|
||||
}
|
||||
}
|
||||
}
|
3
keyboards/clueboard/66/rev1/info.json
Normal file
3
keyboards/clueboard/66/rev1/info.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"identifier":"c1ed:2301:0003"
|
||||
}
|
3
keyboards/clueboard/66/rev2/info.json
Normal file
3
keyboards/clueboard/66/rev2/info.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"identifier":"c1ed:2320:0001"
|
||||
}
|
3
keyboards/clueboard/66/rev3/info.json
Normal file
3
keyboards/clueboard/66/rev3/info.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"identifier":"c1ed:2370:0001"
|
||||
}
|
4
keyboards/clueboard/info.json
Normal file
4
keyboards/clueboard/info.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"manufacturer": "Clueboard",
|
||||
"maintainer": "skullydazed"
|
||||
}
|
@@ -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"
|
||||
|
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define USE_SERIAL
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define _MASTER_RIGHT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
|
||||
|
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define USE_SERIAL
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define _MASTER_RIGHT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
|
||||
|
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define USE_SERIAL
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define _MASTER_RIGHT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -8,7 +8,20 @@
|
||||
#include "rev2.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#endif
|
||||
// Used to create a keymap using only KC_ prefixed keys
|
||||
#define KC_KEYMAP( \
|
||||
k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \
|
||||
k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \
|
||||
k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \
|
||||
k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \
|
||||
) \
|
||||
{ \
|
||||
{ KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k010, KC_##k011, KC_##k012, KC_##k013, KC_##k014 }, \
|
||||
{ KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k110, KC_##k111, KC_##k112, KC_##k113, KC_##k114 }, \
|
||||
{ KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k210, KC_##k211, KC_##k212, KC_##k213, KC_##k214 }, \
|
||||
{ KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k310, KC_##k311, KC_##k312, KC_##k313, KC_##k314 } \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
120
keyboards/eco/keymaps/hexwire/keymap.c
Normal file
120
keyboards/eco/keymaps/hexwire/keymap.c
Normal file
@@ -0,0 +1,120 @@
|
||||
|
||||
// Default ECO Layout
|
||||
// KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039
|
||||
|
||||
#include "eco.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
#define _FN3 3
|
||||
|
||||
enum eco_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define KC_ KC_TRNS
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
#define KC_RST RESET
|
||||
#define KC_DBUG DEBUG
|
||||
#define KC_LOWR MO(_LOWER)
|
||||
#define KC_RASE MO(_RAISE)
|
||||
#define KC_ENTS MT(MOD_LSFT, KC_ENT)
|
||||
#define KC_ESCC MT(MOD_LCTL, KC_ESC)
|
||||
#define KC_GRVF LT(_FN3, KC_GRV)
|
||||
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
|
||||
#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
|
||||
#define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen
|
||||
#define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen
|
||||
#define KC_RTOG RGB_TOG
|
||||
#define KC_RMOD RGB_MOD
|
||||
#define KC_RHUI RGB_HUI
|
||||
#define KC_RHUD RGB_HUD
|
||||
#define KC_RSAI RGB_SAI
|
||||
#define KC_RSAD RGB_SAD
|
||||
#define KC_RVAI RGB_VAI
|
||||
#define KC_RVAD RGB_VAD
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
|
||||
TAB , Q , W , E , R , T ,LPRN,RPRN, Y , U , I , O , P ,MINS,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
ESCC, A , S , D , F , G ,LBRC,RBRC, H , J , K , L ,SCLN,QUOT,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
LSFT, Z , X , C , V , B ,LCBR,RCBR, N , M ,COMM,DOT ,SLSH,ENTS,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
GRVF,LCTL,LALT,LGUI,LOWR,SPC ,SPC ,BSPC,BSPC,RASE,LEFT,DOWN, UP ,RGHT
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
),
|
||||
|
||||
|
||||
[_LOWER] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
|
||||
, 1 , 2 , 3 , 4 , 5 ,LPRN,RPRN, 6 , 7 , 8 , 9 , 0 , ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
DEL ,CAPP,LEFT,RGHT, UP ,LBRC,LBRC,RBRC,RBRC, P4 , P5 , P6 ,PLUS,PIPE,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
,CPYP, , ,DOWN,LCBR,LCBR,RCBR,RCBR, P1 , P2 , P3 ,MINS, ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
, , , , , , ,DEL ,DEL , , P0 ,PDOT, ,
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
),
|
||||
|
||||
[_RAISE] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
|
||||
,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LPRN,RPRN, ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
DEL ,MPRV,MNXT,VOLU,PGUP,UNDS, , ,EQL ,HOME, , , ,BSLS,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
, , , , , , , , , , , , ,
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
),
|
||||
|
||||
[_FN3] = KC_KEYMAP(
|
||||
//,----+----+----+----+----+----+----+----+----+----+----+----+----+----.
|
||||
F12 , F1 , F2 , F3 , F4 , F5 , , , F6 , F7 , F8 , F9 ,F10 ,F11 ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
RTOG,RMOD,RHUI,RSAI,RVAI, , , , , , , , , ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
RST ,DBUG,RHUD,RSAD,RVAD, , , , , , , , , ,
|
||||
//|----+----+----+----+----+----+----+----+----+----+----+----+----+----|
|
||||
, , , , , , , , , , , , ,
|
||||
//`----+----+----+----+----+----+----+----+----+----+----+----+----+----'
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
25
keyboards/eco/keymaps/hexwire/rules.mk
Normal file
25
keyboards/eco/keymaps/hexwire/rules.mk
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
@@ -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.
|
||||
|
@@ -61,11 +61,46 @@ void ergodox_blink_all_leds(void)
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_3_on();
|
||||
_delay_ms(50);
|
||||
#ifdef LEFT_LEDS
|
||||
ergodox_left_led_1_on();
|
||||
_delay_ms(50);
|
||||
if (!mcp23018_status) {
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
}
|
||||
ergodox_left_led_2_on();
|
||||
_delay_ms(50);
|
||||
if (!mcp23018_status) {
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
}
|
||||
ergodox_left_led_3_on();
|
||||
_delay_ms(50);
|
||||
if (!mcp23018_status) {
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
}
|
||||
#endif
|
||||
ergodox_right_led_1_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_2_off();
|
||||
_delay_ms(50);
|
||||
ergodox_right_led_3_off();
|
||||
#ifdef LEFT_LEDS
|
||||
_delay_ms(50);
|
||||
ergodox_left_led_1_off();
|
||||
if (!mcp23018_status) {
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
}
|
||||
_delay_ms(50);
|
||||
ergodox_left_led_2_off();
|
||||
if (!mcp23018_status) {
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
}
|
||||
_delay_ms(50);
|
||||
ergodox_left_led_3_off();
|
||||
if (!mcp23018_status) {
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
}
|
||||
#endif
|
||||
|
||||
//ergodox_led_all_on();
|
||||
//_delay_ms(333);
|
||||
ergodox_led_all_off();
|
||||
@@ -107,11 +142,49 @@ uint8_t init_mcp23018(void) {
|
||||
out:
|
||||
i2c_stop();
|
||||
|
||||
#ifdef LEFT_LEDS
|
||||
if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update();
|
||||
#endif // LEFT_LEDS
|
||||
|
||||
// SREG=sreg_prev;
|
||||
|
||||
return mcp23018_status;
|
||||
}
|
||||
|
||||
#ifdef LEFT_LEDS
|
||||
uint8_t ergodox_left_leds_update(void) {
|
||||
if (mcp23018_status) { // if there was an error
|
||||
return mcp23018_status;
|
||||
}
|
||||
#define LEFT_LED_1_SHIFT 7 // in MCP23018 port B
|
||||
#define LEFT_LED_2_SHIFT 6 // in MCP23018 port B
|
||||
#define LEFT_LED_3_SHIFT 7 // in MCP23018 port A
|
||||
|
||||
// set logical value (doesn't matter on inputs)
|
||||
// - unused : hi-Z : 1
|
||||
// - input : hi-Z : 1
|
||||
// - driving : hi-Z : 1
|
||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE);
|
||||
if (mcp23018_status) goto out;
|
||||
mcp23018_status = i2c_write(OLATA);
|
||||
if (mcp23018_status) goto out;
|
||||
mcp23018_status = i2c_write(0b11111111
|
||||
& ~(ergodox_left_led_3<<LEFT_LED_3_SHIFT)
|
||||
);
|
||||
if (mcp23018_status) goto out;
|
||||
mcp23018_status = i2c_write(0b11111111
|
||||
& ~(ergodox_left_led_2<<LEFT_LED_2_SHIFT)
|
||||
& ~(ergodox_left_led_1<<LEFT_LED_1_SHIFT)
|
||||
);
|
||||
if (mcp23018_status) goto out;
|
||||
|
||||
out:
|
||||
i2c_stop();
|
||||
return mcp23018_status;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef ONEHAND_ENABLE
|
||||
__attribute__ ((weak))
|
||||
// swap-hands action needs a matrix to define the swap
|
||||
|
@@ -46,12 +46,31 @@ inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6);
|
||||
inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); }
|
||||
inline void ergodox_right_led_off(uint8_t led) { DDRB &= ~(1<<(led+4)); PORTB &= ~(1<<(led+4)); }
|
||||
|
||||
#ifdef LEFT_LEDS
|
||||
bool ergodox_left_led_1;
|
||||
bool ergodox_left_led_2;
|
||||
bool ergodox_left_led_3;
|
||||
|
||||
inline void ergodox_left_led_1_on(void) { ergodox_left_led_1 = 1; }
|
||||
inline void ergodox_left_led_2_on(void) { ergodox_left_led_2 = 1; }
|
||||
inline void ergodox_left_led_3_on(void) { ergodox_left_led_3 = 1; }
|
||||
|
||||
inline void ergodox_left_led_1_off(void) { ergodox_left_led_1 = 0; }
|
||||
inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; }
|
||||
inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; }
|
||||
#endif // LEFT_LEDS
|
||||
|
||||
inline void ergodox_led_all_on(void)
|
||||
{
|
||||
ergodox_board_led_on();
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_3_on();
|
||||
#ifdef LEFT_LEDS
|
||||
ergodox_left_led_1_on();
|
||||
ergodox_left_led_2_on();
|
||||
ergodox_left_led_3_on();
|
||||
#endif // LEFT_LEDS
|
||||
}
|
||||
|
||||
inline void ergodox_led_all_off(void)
|
||||
@@ -60,6 +79,11 @@ inline void ergodox_led_all_off(void)
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
#ifdef LEFT_LEDS
|
||||
ergodox_left_led_1_off();
|
||||
ergodox_left_led_2_off();
|
||||
ergodox_left_led_3_off();
|
||||
#endif // LEFT_LEDS
|
||||
}
|
||||
|
||||
inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; }
|
||||
|
@@ -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,18 +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
|
||||
|
||||
#define FORCE_NKRO
|
||||
|
||||
#endif
|
@@ -1,820 +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;
|
||||
|
||||
#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_urine rgblight_sethsv (0x3C, 0xFF, 0xFF);
|
||||
#define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF);
|
||||
//This is both for underglow, and Diablo 3 macros
|
||||
|
||||
static uint8_t current_layer = 0;
|
||||
|
||||
//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) {
|
||||
rgblight_enable();
|
||||
rgblight_mode(1);
|
||||
rgblight_setrgb(0xff,0x00,0x00);
|
||||
reset_keyboard();
|
||||
reset_tap_dance(state);
|
||||
}
|
||||
}
|
||||
|
||||
// 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_LEAD,
|
||||
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, KC_FN1,
|
||||
KC_LALT, 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, KC_FN1,
|
||||
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, KC_FN1,
|
||||
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, KC_FN1,
|
||||
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_NO, 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
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB),
|
||||
// FN1 - Momentary Layer 1 (Symbols)
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// 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) {
|
||||
rgblight_mode(1);
|
||||
}
|
||||
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 ergodox_ez:drashna-custom:teensy"SS_TAP(X_ENTER));
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// Sends the key press to system, but only if on the Diablo layer
|
||||
void send_diablo_keystroke (uint8_t diablo_key) {
|
||||
if (current_layer == 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void matrix_init_user(void) { // Runs boot tasks for keyboard
|
||||
|
||||
};
|
||||
|
||||
LEADER_EXTERNS();
|
||||
|
||||
void matrix_scan_user(void) { // runs frequently to update info
|
||||
uint8_t modifiders = get_mods();
|
||||
uint8_t layer = biton32(layer_state);
|
||||
static bool has_layer_changed = true;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
if (layer != current_layer) {
|
||||
has_layer_changed = true;
|
||||
current_layer = layer;
|
||||
}
|
||||
// Check layer, and apply color if its changed since last check
|
||||
if (has_layer_changed) {
|
||||
uint8_t default_layer = 0;
|
||||
default_layer = eeconfig_read_default_layer();
|
||||
|
||||
switch (layer) {
|
||||
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_urine;
|
||||
rgblight_mode(1);
|
||||
break;
|
||||
case 7:
|
||||
rgblight_sethsv (255,255,255);
|
||||
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;
|
||||
}
|
||||
has_layer_changed = false;
|
||||
}
|
||||
|
||||
// Run Diablo 3 macro checking code.
|
||||
run_diablo_macro_check();
|
||||
#ifdef LEADER_KEYS
|
||||
LEADER_DICTIONARY() {
|
||||
leading = false;
|
||||
leader_end();
|
||||
SEQ_ONE_KEY(KC_C) {
|
||||
SEND_STRING("Covecube");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_S, KC_D) {
|
||||
SEND_STRING("StableBit DrivePool");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_C, KC_D) {
|
||||
SEND_STRING("StableBit CloudDrive");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_S, KC_C) {
|
||||
SEND_STRING("StableBit Scanner");
|
||||
}
|
||||
SEQ_TWO_KEYS(KC_S, KC_T) {
|
||||
SEND_STRING("StableBit Troubleshooter");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
@@ -1,10 +0,0 @@
|
||||
TAP_DANCE_ENABLE = yes
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
RGBLIGHT_ENABLE = yes
|
||||
MIDI_ENABLE = no
|
||||
CONSOLE_ENABLE = no
|
||||
LEADER_KEYS = no
|
||||
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,195 +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
|
||||
bool has_layer_changed = true;
|
||||
|
||||
#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)
|
||||
};
|
||||
// on each tap, light up one led, from right to left
|
||||
// on the forth tap, turn them off from right to left
|
||||
|
||||
// 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_scan_user(void) {
|
||||
|
||||
uint8_t new_layer = biton32(layer_state);
|
||||
|
||||
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
|
||||
static uint8_t old_layer = 0;
|
||||
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();
|
||||
}
|
||||
|
||||
if (old_layer != new_layer) {
|
||||
has_layer_changed = true;
|
||||
old_layer = new_layer;
|
||||
}
|
||||
if (has_layer_changed) {
|
||||
switch (new_layer) {
|
||||
case 1:
|
||||
rgblight_set_red;
|
||||
break;
|
||||
case 2:
|
||||
rgblight_set_blue;
|
||||
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;
|
||||
break;
|
||||
}
|
||||
has_layer_changed = false;
|
||||
}
|
||||
|
||||
#else
|
||||
switch (new_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
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
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:
|
||||
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_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();
|
||||
|
@@ -202,6 +202,9 @@ uint8_t matrix_scan(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef LEFT_LEDS
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
#endif // LEFT_LEDS
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
select_row(i);
|
||||
wait_us(30); // without this wait read unstable value.
|
||||
|
@@ -66,6 +66,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
# If you have Left LEDs (see
|
||||
# https://geekhack.org/index.php?topic=22780.msg873819#msg873819 for
|
||||
# details), include the following define:
|
||||
# OPT_DEFS += -DLEFT_LEDS
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
|
25
keyboards/ergodox_infinity/keymaps/dudeofawesome/README.md
Normal file
25
keyboards/ergodox_infinity/keymaps/dudeofawesome/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# DudeOfAwesome's ErgoDox Infinity Layout
|
||||
|
||||
A basic ErgoDox layout with Planck-like tri-layer support.
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
- Planck-like tri-layer
|
||||
- Workman layout
|
||||
- In-progress gaming layer
|
||||
- Numpad
|
||||
- LCD colors are linked together, like the default KLL firmware
|
||||
|
||||
## Building and flashing
|
||||
|
||||
1. Put your board in DFU mode with either the button on the bottom, or with a software key in your current firmware
|
||||
1. Flash left half:
|
||||
```bash
|
||||
$ make ergodox_infinity:dudeofawesome:dfu-util
|
||||
```
|
||||
1. Flash right half:
|
||||
```bash
|
||||
$ make ergodox_infinity:dudeofawesome:dfu-util MASTER=right
|
||||
```
|
568
keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c
Normal file
568
keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c
Normal file
@@ -0,0 +1,568 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
enum custom_layers {
|
||||
_QWERTY,
|
||||
_DVORAK,
|
||||
_WORKMAN,
|
||||
_GAME,
|
||||
_MOUSE,
|
||||
_NUM,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
DVORAK,
|
||||
WORKMAN,
|
||||
LOWER,
|
||||
RAISE,
|
||||
GAME,
|
||||
MOUSE,
|
||||
NUM,
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic QWERTY layer
|
||||
*
|
||||
* ,---------------------------------------------. ,---------------------------------------------.
|
||||
* | - | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
||||
* | Tab | Q | W | E | R | T | [{ | | ]} | Y | U | I | O | P | BSPC |
|
||||
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
||||
* | ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | '" |
|
||||
* |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------|
|
||||
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | Enter |
|
||||
* `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------'
|
||||
* | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right |
|
||||
* `------------------------------' `------------------------------'
|
||||
* ,------------. ,------------.
|
||||
* |Play |Mouse | | Num |Mouse|
|
||||
* ,----|-----|------| |------+-----+-----.
|
||||
* | | | Alt | | Alt | | |
|
||||
* |BSPC|LOWER|------| |------|RAISE|Space|
|
||||
* | | | LGUI | | LGUI | | |
|
||||
* `-----------------' `------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_MINUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRACKET,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_FN1,
|
||||
TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
||||
|
||||
KC_MPLY, TG(_MOUSE),
|
||||
KC_LALT,
|
||||
LOWER, KC_BSPACE, KC_LGUI,
|
||||
|
||||
// right hand
|
||||
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
||||
KC_RBRACKET, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE,
|
||||
KC_FN1, KC_N, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), KC_ENTER,
|
||||
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
||||
|
||||
TG(_NUM), TG(_MOUSE),
|
||||
KC_LALT,
|
||||
KC_LGUI, KC_SPACE, RAISE
|
||||
),
|
||||
|
||||
/* Keymap 0: Basic Dvorak layer
|
||||
*
|
||||
* ,---------------------------------------------. ,--------------------------------------------.
|
||||
* | - | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
||||
* | Tab | ' | , | . | P | Y | [{ | | ]} | F | G | C | R | L | BSPC |
|
||||
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
||||
* | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | / |
|
||||
* |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------|
|
||||
* | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | Enter |
|
||||
* `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------'
|
||||
* | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right |
|
||||
* `------------------------------' `------------------------------'
|
||||
* ,------------. ,------------.
|
||||
* |Play |Mouse | | Num |Mouse|
|
||||
* ,----|-----|------| |------+-----+-----.
|
||||
* | | | Alt | | Alt | | |
|
||||
* |BSPC|LOWER|------| |------|RAISE|Space|
|
||||
* | | | LGUI | | LGUI | | |
|
||||
* `-----------------' `------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_MINUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRACKET,
|
||||
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_LSPO, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, KC_FN1,
|
||||
TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
||||
|
||||
KC_MPLY, TG(_MOUSE),
|
||||
KC_LALT,
|
||||
KC_BSPACE, LOWER, KC_LGUI,
|
||||
|
||||
// right hand
|
||||
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
||||
KC_RBRACKET, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE,
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, LT(MOUSE, KC_SLSH),
|
||||
KC_FN1, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENTER,
|
||||
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
||||
|
||||
TG(_NUM), TG(_MOUSE),
|
||||
KC_LALT,
|
||||
KC_LGUI, RAISE, KC_SPACE
|
||||
),
|
||||
|
||||
/* Keymap 0: Basic Workman layer
|
||||
*
|
||||
* ,---------------------------------------------. ,--------------------------------------------.
|
||||
* | - | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | = |
|
||||
* |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------|
|
||||
* | Tab | Q | D | R | W | B | [{ | | ]} | J | F | U | P | ; | BSPC |
|
||||
* |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------|
|
||||
* | ESC | A | S | H | T | G |------| |------| Y | N | E | O | I | '" |
|
||||
* |--------+-----+-----+-----+-----+-----| L1 | | L1 |-----+-----+-----+-----+-----+--------|
|
||||
* | LShift | Z | X | M | C | V | | | | K | L | , | . | / | Enter |
|
||||
* `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------'
|
||||
* | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right |
|
||||
* `------------------------------' `------------------------------'
|
||||
* ,------------. ,------------.
|
||||
* |Play |Mouse | | Num |Mouse|
|
||||
* ,----|-----|------| |------+-----+-----.
|
||||
* | | | Alt | | Alt | | |
|
||||
* |BSPC|LOWER|------| |------|RAISE|Space|
|
||||
* | | | LGUI | | LGUI | | |
|
||||
* `-----------------' `------------------'
|
||||
*/
|
||||
[_WORKMAN] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_MINUS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC,
|
||||
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LBRACKET,
|
||||
KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G,
|
||||
KC_LSPO, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_FN1,
|
||||
TG(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER,
|
||||
|
||||
KC_MPLY, TG(_MOUSE),
|
||||
KC_LALT,
|
||||
KC_BSPACE, LOWER, KC_LGUI,
|
||||
|
||||
// right hand
|
||||
KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL,
|
||||
KC_RBRACKET, KC_J, KC_F, KC_U, KC_P, KC_SCOLON, KC_BSPACE,
|
||||
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE,
|
||||
KC_FN1, KC_K, KC_L, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), KC_ENTER,
|
||||
RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,
|
||||
|
||||
NUM, TG(_MOUSE),
|
||||
KC_LALT,
|
||||
KC_LGUI, RAISE, KC_SPACE
|
||||
),
|
||||
|
||||
/* Lower
|
||||
*
|
||||
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
|
||||
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | |
|
||||
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | _ | + | { | } | | |
|
||||
* |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | Home | End | |
|
||||
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* |Animat| | |Toggle|Solid |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* |Bright|Bright| | | |Hue- |Hue+ |
|
||||
* |ness- |ness+ |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
|
||||
// right hand
|
||||
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||
KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
|
||||
_______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
/* Raise
|
||||
*
|
||||
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | - | = | [ | ] | \ |
|
||||
* |---------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
|
||||
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* |Animat| | |Toggle|Solid |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* |Bright|Bright| | | |Hue- |Hue+ |
|
||||
* |ness- |ness+ |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
|
||||
// right hand
|
||||
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||
KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
||||
_______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
/* Adjust
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* |Version | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | |Reset |Debug | | | | | | | |TRM on|TRMoff| | | Del |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | |AG Nrm|------| |------|AG Swp|QWERTY|Wrkman|Dvorak| | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
VRSN, _______, _______, _______, _______, _______, _______,
|
||||
_______, RESET, DEBUG, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, AG_NORM,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
|
||||
// right hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL,
|
||||
AG_SWAP, QWERTY, WORKMAN, DVORAK, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | Lclk | MsUp | Rclk |Wh Up | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght|Wh Dn |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | |Brwser|Brwser|
|
||||
* | Lclk | Rclk |------| |------|Back |Fwd |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// MOUSE
|
||||
[_MOUSE] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_D, _______,
|
||||
_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U,
|
||||
_______, _______, KC_WH_L, KC_BTN3, KC_WH_R, _______, TO(_GAME),
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
KC_WH_D,
|
||||
KC_BTN1, KC_BTN2, KC_WH_U,
|
||||
|
||||
// right hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, KC_MPLY,
|
||||
TO(_GAME), _______, _______, KC_MPRV, KC_MNXT, _______, _______,
|
||||
KC_VOLU, KC_VOLD, KC_MUTE, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, KC_WBAK, KC_WFWD
|
||||
),
|
||||
|
||||
/* Keymap 2: GAME
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | Lclk | MsUp | Rclk | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | Prev | Next | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | |VolUp |VolDn | Mute | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | |Brwser|Brwser|
|
||||
* | Lclk | Rclk |------| |------|Back |Fwd |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_GAME] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
KC_SPACE, KC_LGUI, KC_LALT,
|
||||
|
||||
// right hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
TG(_MOUSE), TG(_NUM),
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
|
||||
/* Keymap 2: NUMPAD
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
|
||||
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | | | | | | | 7 | 8 | 9 | * | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| | 4 | 5 | 6 | + | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | | 1 | 2 | 3 | \ | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | . | 0 | 0 | = | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_NUM] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
|
||||
_______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______,
|
||||
_______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV,
|
||||
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
|
||||
// right hand
|
||||
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, _______,
|
||||
_______, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, _______,
|
||||
_______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_SLASH, _______,
|
||||
KC_KP_DOT, KC_KP_0, KC_KP_0, KC_KP_EQUAL, _______,
|
||||
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
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) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) { // For resetting EEPROM
|
||||
eeconfig_init();
|
||||
}
|
||||
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;
|
||||
break;
|
||||
case WORKMAN:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_WORKMAN);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
if (IS_LAYER_ON(_ADJUST)) {
|
||||
layer_off(_LOWER);
|
||||
layer_off(_RAISE);
|
||||
}
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
if (IS_LAYER_ON(_ADJUST)) {
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_RAISE);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
if (IS_LAYER_ON(_ADJUST)) {
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
}
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
if (IS_LAYER_ON(_ADJUST)) {
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_LOWER);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
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;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs just one time when the keyboard initializes.
|
||||
*/
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Runs constantly in the background, in a loop.
|
||||
*/
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
|
||||
switch (layer) {
|
||||
case _LOWER:
|
||||
ergodox_right_led_1_on();
|
||||
break;
|
||||
case _RAISE:
|
||||
ergodox_right_led_2_on();
|
||||
break;
|
||||
case _ADJUST:
|
||||
ergodox_right_led_3_on();
|
||||
break;
|
||||
}
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user